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
HTTP/2 should send a reset of NO_ERROR instead of CANCEL if already sent response headers #2729
Comments
hyper does send a reset frame after you've responded and dropped the request body without reading. The error seems to suggest it's related to SSL, not to HTTP/2. |
@seanmonstar thank you. i don't think it is related to SSL. It it performance well in http1.1;if i read the request body,it performance well in http2.0,too. Does hyper send a reset frame with an error code of NO ERROR already?in which version?i don‘t see this code by searching keyword send_reset?I only find send_reset(h2::Reason::INTERNAL_ERROR) |
The automatic sending of a reset is handled in |
@seanmonstar chrome report ERR_HTTP2_PROTOCOL_ERROR ,not ERR_SSL_PROTOCOL_ERROR ,i wrote error last time |
Does this happen with other clients? Firefox? curl? Some other language client? |
@seanmonstar yes,i try chrome,firefox,Microsoft Edge,all report ERR_HTTP2_PROTOCOL_ERROR |
@seanmonstar if i read all request body, then response status code 413, it is ok. if i response status code 413 without reading request body, it is not ok.I think hyper should send RST_STREAM frame with error code of NO ERROR after respone status code 413 without waiting for all request body. |
@seanmonstar i open hyper trace log,hyper send reset frame with error_code CANCEL. FramedWrite::buffer�[0m�[1m{�[0mframe=Reset { stream_id: StreamId(647), error_code: CANCEL |
Ah, I see. So currently, if you drop all handles to the stream while there is still things to read, it will automatically send a reset of CANCEL. The |
@seanmonstar do you have a plan to fix this issue? |
I have not prioritized fixing this myself, but we welcome contributions if you'd like to join in, or anyone else :) |
I believe this issue was fixed in hyperium/h2#634 |
Ah yes! |
I write a proxy service that use hyper.I upload a file by chrome browser use http2 to my proxy service.In my proxy service,i check the file size by request header content-length and find it is too large, i retrun response with status code 413 without reading the request body immediately.chrome report ERR_HTTP2_PROTOCOL_ERROR, but it is ok in http1.1.
I read http2.0 protocol rfc7540 and find program should send RST_STREAM frame with an error code of NO ERROR after sending a complete response.
Does hyper provide a solution to this problem?How to solve the problem?
The text was updated successfully, but these errors were encountered: