Commit 4079cdd
http2: fix Http2Response.sendDate
The `sendDate` flag was not being respected
by the current implementation and the `Date`
header was being sent regardless of the config.
This commit fixes that and adds tests for this case.
Fixes: #34841
PR-URL: #34850
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent 06c5120 commit 4079cddCopy full SHA for 4079cdd
File tree
Expand file treeCollapse file tree
4 files changed
+49
-7
lines changedOpen diff view settings
Filter options
- lib/internal/http2
- test/parallel
Expand file treeCollapse file tree
4 files changed
+49
-7
lines changedOpen diff view settings
Collapse file
lib/internal/http2/compat.js
Copy file name to clipboardExpand all lines: lib/internal/http2/compat.js+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
583 | 583 | |
584 | 584 | |
585 | 585 | |
| 586 | + |
| 587 | + |
| 588 | + |
| 589 | + |
| 590 | + |
| 591 | + |
| 592 | + |
586 | 593 | |
587 | 594 | |
588 | 595 | |
| ||
775 | 782 | |
776 | 783 | |
777 | 784 | |
| 785 | + |
778 | 786 | |
779 | 787 | |
780 | 788 | |
|
Collapse file
+10-7Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2183 | 2183 | |
2184 | 2184 | |
2185 | 2185 | |
2186 | | - |
| 2186 | + |
2187 | 2187 | |
2188 | 2188 | |
2189 | 2189 | |
| ||
2200 | 2200 | |
2201 | 2201 | |
2202 | 2202 | |
2203 | | - |
2204 | | - |
2205 | | - |
| 2203 | + |
| 2204 | + |
| 2205 | + |
| 2206 | + |
| 2207 | + |
| 2208 | + |
2206 | 2209 | |
2207 | 2210 | |
2208 | 2211 | |
| ||
2528 | 2531 | |
2529 | 2532 | |
2530 | 2533 | |
2531 | | - |
| 2534 | + |
2532 | 2535 | |
2533 | 2536 | |
2534 | 2537 | |
| ||
2594 | 2597 | |
2595 | 2598 | |
2596 | 2599 | |
2597 | | - |
| 2600 | + |
2598 | 2601 | |
2599 | 2602 | |
2600 | 2603 | |
| ||
2655 | 2658 | |
2656 | 2659 | |
2657 | 2660 | |
2658 | | - |
| 2661 | + |
2659 | 2662 | |
2660 | 2663 | |
2661 | 2664 | |
|
Collapse file
test/parallel/test-http2-compat-serverresponse-headers-send-date.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
Collapse file
test/parallel/test-http2-compat-serverresponse-headers.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-compat-serverresponse-headers.js+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
114 | 114 | |
115 | 115 | |
116 | 116 | |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
117 | 122 | |
118 | 123 | |
119 | 124 | |
|
0 commit comments