-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP2 locally-originated stream resets use the NO_ERROR code #36200
Comments
cc @alyssawilk |
Looks like a bug. I suspect the cause is The one gotcha is if the peer sends NO_ERROR we do want to propogate that, so I'd suggest also adding a new check around here |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
HTTP2 locally-originated stream resets use the NO_ERROR code: When envoy originates a stream reset on an HTTP2 codec it sends a RST_STREAM frame but erroneously uses the NO_ERROR error code, causing clients to think the stream terminated successfully
Description:
When envoy's HTTP2 codec sends a stream reset, it converts the stream reset reason into an HTTP2 error code here. Only two reset reasons are covered, and the remainder reset with NO_ERROR. From the RFC, NO_ERROR indicates:
The other reset reasons (see all here) are terminated as NO_ERROR indicating that the stream is complete.
Here's an example where I ran into this issue:
Transfer-Encoding: chunked
HPE_INVALID_EOF_STATE
Repro steps:
Python server to provide partial chunked responses over HTTP/1.1:
Envoy config:
then reach envoy via an nghttp client (settings, priority, window_update frames omitted):
with partial chunked response:
with complete response:
Envoy trace logs around the event:
Desired behavior:
Envoy should use a non-zero error code when resetting HTTP2 streams. For the chunked encoding case,
PROTOCOL_ERROR
would seem appropriate.I have a PR (will submit soon) that should fix this, but it will require us to make some decisions about what the right error codes are for each situation.
The text was updated successfully, but these errors were encountered: