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:
SocketsHttpHandler:
- HTTP 1.1: reads
Content-Length bytes, no error
- HTTP 2.0: reads the entire content, no error
WinHttpHandler