As an important note testing with #3702 the above works as expected. Since the mentioned PR appears to be fixing a different issue I think it's still important to mention here, but please let me know if this should be closed in favor of #3702.
Responses with status codes 1xx, 204 or 304 don't have a response body. For
these, don't parse these headers:
This change ensures that HTTP/2 upgrades work even if a
"Content-Length: 0" or a "Transfer-Encoding: chunked" header is present.
Co-authored-by: Daniel Stenberg