Skip to content

SocketsHttpHandler (and WinHttpHandler) do not enforce response Content-Length correctness #62906

Open
@antonfirsov

Description

@antonfirsov

Discovered during #62870, similar to #62258:

In HTTP 2.0, a response payload body size that mismatches Content-Length is protocol violation, and should result in RST_STREAM according to the RFC:
https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.6
https://datatracker.ietf.org/doc/html/rfc7540#section-5.4.2

WinHttpHandler doesn't respect this either. Current behavior:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions