Commit 2bb5d80
committed
fix: filter stream initiator in recv_go_away (#885)
recv_go_away closes all streams with id > last_stream_id, regardless
of which endpoint initiated them. When a client sends GOAWAY(0) to a
server, client-initiated streams (e.g. stream 1) are incorrectly
closed, killing in-progress response bodies before any DATA frames
are sent.
Add peer.is_local_init(stream.id) check so only locally-initiated
streams above last_stream_id are closed, per RFC 9113 Section 6.8.
Added test client_goaway_does_not_kill_remote_initiated_streams that
verifies the server completes a streaming response body on stream 1
after receiving client GOAWAY(NO_ERROR, last_stream_id=0). The test
fails without the fix and passes with it.1 parent 5634ddd commit 2bb5d80
2 files changed
+65
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
730 | 731 | | |
731 | | - | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
760 | 823 | | |
761 | 824 | | |
762 | 825 | | |
| |||
0 commit comments