Skip to content

HTTP/2 should send a reset of NO_ERROR instead of CANCEL if already sent response headers #2729

@maxbear1988

Description

@maxbear1988

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http2Area: HTTP/2 specific.C-bugCategory: bug. Something is wrong. This is bad!E-mediumEffort: medium. Some knowledge of how hyper internal works would be useful.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions