Repository navigation
Commit b64f1fa
committed
internal/http3: add server support for "Trailer:" magic prefix
Similar to our HTTP/1 and HTTP/2 implementations, allow HTTP/3 server
handler to send trailer headers that have not been declared prior to
writing response body by using the "Trailer:" magic prefix.
To support this, also modify transport to accept all trailers, even
those that have not been declared. This is consistent with the behavior
of our HTTP/1 and HTTP/2 implementations. Note the following,
unfortunately somewhat convoluted, behavior:
1. Transport will never send undeclared trailers.
2. Transport will accept undeclared trailers.
3. Server will never accept undeclared trailers.
4. Server will never send undeclared trailers, unless they use the
"Trailer:" magic prefix.
For golang/go#70914
Change-Id: Ifa5e026eb6ce68af9a8364845e4f2def6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/net/+/785860
Reviewed-by: Damien Neil <[email protected]>
Reviewed-by: Viacheslav Danilin <[email protected]>
LUCI-TryBot-Result: [email protected] <[email protected]>
Reviewed-by: Nicholas Husin <[email protected]>1 parent 2707ee2 commit b64f1fa
4 files changed
Lines changed: 66 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
191 | 200 | | |
192 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
193 | 204 | | |
194 | 205 | | |
195 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
| 561 | + | |
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
565 | 566 | | |
566 | | - | |
| 567 | + | |
| 568 | + | |
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
| |||
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
595 | | - | |
| 597 | + | |
| 598 | + | |
596 | 599 | | |
597 | 600 | | |
598 | 601 | | |
599 | 602 | | |
600 | | - | |
| 603 | + | |
| 604 | + | |
601 | 605 | | |
602 | 606 | | |
603 | 607 | | |
| |||
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
640 | | - | |
| 644 | + | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| |||
655 | 659 | | |
656 | 660 | | |
657 | 661 | | |
| 662 | + | |
| 663 | + | |
658 | 664 | | |
659 | 665 | | |
660 | 666 | | |
| |||
680 | 686 | | |
681 | 687 | | |
682 | 688 | | |
683 | | - | |
| 689 | + | |
684 | 690 | | |
685 | 691 | | |
686 | 692 | | |
| |||
698 | 704 | | |
699 | 705 | | |
700 | 706 | | |
| 707 | + | |
| 708 | + | |
701 | 709 | | |
702 | 710 | | |
703 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
503 | 504 | | |
504 | 505 | | |
505 | 506 | | |
506 | | - | |
507 | | - | |
508 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
| |||
578 | 580 | | |
579 | 581 | | |
580 | 582 | | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
581 | 589 | | |
582 | 590 | | |
583 | 591 | | |
| |||
608 | 616 | | |
609 | 617 | | |
610 | 618 | | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
611 | 625 | | |
612 | 626 | | |
613 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
801 | | - | |
802 | | - | |
803 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
| |||
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
841 | | - | |
842 | | - | |
843 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
844 | 846 | | |
845 | 847 | | |
846 | 848 | | |
| |||
858 | 860 | | |
859 | 861 | | |
860 | 862 | | |
| 863 | + | |
| 864 | + | |
861 | 865 | | |
| 866 | + | |
862 | 867 | | |
863 | 868 | | |
864 | 869 | | |
| |||
871 | 876 | | |
872 | 877 | | |
873 | 878 | | |
874 | | - | |
875 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
876 | 882 | | |
877 | 883 | | |
878 | 884 | | |
| |||
888 | 894 | | |
889 | 895 | | |
890 | 896 | | |
| 897 | + | |
| 898 | + | |
891 | 899 | | |
| 900 | + | |
892 | 901 | | |
893 | 902 | | |
894 | 903 | | |
| |||
900 | 909 | | |
901 | 910 | | |
902 | 911 | | |
903 | | - | |
904 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
905 | 915 | | |
906 | 916 | | |
907 | 917 | | |
| |||
0 commit comments