Commit 3eb9327
committed
http2: do not retry RoundTrip after peer sends a stream protocol error
Years back, our HTTP/2 server implementation had a stream accounting bug
that would cause it to improperly report a PROTOCOL_ERROR. In response
to this, we modified our Transport to retry RoundTrip when a RST_STREAM
with PROTOCOL_ERROR was received from a peer.
At this point, this retry logic had outlived its usefulness. Instead, it
might cause issues, e.g. a client that sends a malformed request will
keep retrying repeatedly, despite there being zero chance for the
request to actually succeed.
Fixes golang/go#77843
Change-Id: Ic043723e3535f68f91db33d8f6bcd7fc2dbce856
Reviewed-on: https://go-review.googlesource.com/c/net/+/750720
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>1 parent 60b3f6f commit 3eb9327
2 files changed
Lines changed: 15 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | 715 | | |
720 | 716 | | |
721 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4838 | 4838 | | |
4839 | 4839 | | |
4840 | 4840 | | |
4841 | | - | |
4842 | | - | |
| 4841 | + | |
| 4842 | + | |
4843 | 4843 | | |
4844 | | - | |
4845 | | - | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
4846 | 4848 | | |
4847 | | - | |
4848 | | - | |
4849 | | - | |
| 4849 | + | |
4850 | 4850 | | |
4851 | 4851 | | |
4852 | 4852 | | |
| |||
4866 | 4866 | | |
4867 | 4867 | | |
4868 | 4868 | | |
4869 | | - | |
| 4869 | + | |
4870 | 4870 | | |
4871 | 4871 | | |
4872 | 4872 | | |
4873 | 4873 | | |
4874 | 4874 | | |
4875 | 4875 | | |
4876 | 4876 | | |
4877 | | - | |
| 4877 | + | |
4878 | 4878 | | |
4879 | 4879 | | |
4880 | 4880 | | |
4881 | 4881 | | |
4882 | | - | |
4883 | | - | |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
4884 | 4888 | | |
4885 | | - | |
4886 | | - | |
4887 | | - | |
4888 | | - | |
4889 | | - | |
4890 | | - | |
4891 | | - | |
4892 | | - | |
4893 | | - | |
4894 | | - | |
4895 | | - | |
4896 | | - | |
4897 | | - | |
4898 | | - | |
4899 | | - | |
4900 | | - | |
4901 | | - | |
4902 | | - | |
4903 | | - | |
4904 | | - | |
4905 | | - | |
4906 | | - | |
4907 | 4889 | | |
4908 | 4890 | | |
4909 | 4891 | | |
| |||
0 commit comments