-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Client: handle RST_STREAM
with NO_ERROR
set for the reason
#2872
Comments
Yea, I think we've talked about this in a previous issue, but don't remember where. |
But somewhere in the stack it should probably just suppress the |
Yes, it should return the response, that's why I mean. And then the body can return that there was a |
Stumbled on this. How can I suppress the specific failure |
I don’t think it should be propagated at all: That’s actually legit scenario when body of request wasn’t consumed because server already responded back with valid response.And seems this behavior corresponds the H2 specification. This is already long story, started here - hyperium/h2#600 (comment), and then the behavior was changed here (what is actually correct). And I just extended the test in h2 to make it more clear (hyperium/h2#703) UPD: I've prepared the fix on hyper client level |
Closes hyperium#2872 for `0.14.x` version. Added test is failing against version without these changes.
Closes hyperium#2872 Added test is failing against version without these changes.
Hi, any chance we could get this in a release soon? |
…rium#3275) Closes hyperium#2872 Signed-off-by: Sven Pfennig <[email protected]>
Version
Platform
Description
I've found that Google Cloud Storage's API can respond with HTTP/2
RST_STREAM
frame withNO_ERROR
set for the reason, which appears to mean "stop sending the request body and read my response" according to https://datatracker.ietf.org/doc/html/rfc7540#section-8.1I believe this is happening in response to a
PutObject
request when the bucket is being rate limited for writes. The server is trying to tell the client to stop sending the request body because it won't be processed, and instead it should immediately read the response to discover the429 Too Many Requests
error code.However, Hyper's client implementation appears to just return the
RST_STREAM
message as an error and discards the response instead of handling it, which gives a hilariously confusing error message of:To be compliant with the spec, the implementation should stop sending the body and immediately read the response and return it.
For context, I'm using the Gcloud Storage API via https://crates.io/crates/aws-sdk-s3 (because the Gcloud Rust SDK doesn't support streaming bodies, but thankfully Gcloud Storage exposes an S3-compatible API), which uses Hyper internally.
aws-sdk-s3
appears to be returning the error from Hyper verbatim, however.The text was updated successfully, but these errors were encountered: