Skip to content

ContentLength equals zero with response body #2398

Closed
@Ne0nd0g

Description

@Ne0nd0g

I'm currently trying to use v0.14.4 of quic-go. When a HTTP3 response is returned, the ContentLength is set to zero but the response body has valid data. I'm getting an error later while processing the response body because the ContentLength is 0. I was previously using v0.10.2 without error and mostly just upgraded library version in my go.mod file without really changing the code base. I was expecting for the ContentLength to be anything except for zero (i.e -1 or 6016). The response body is a gob encoded JWE object. KeepAlive is set to false in the quic config for both the server and the client. The reqDoneClose field is set to true so I'm assuming the connection is done. I'm not really sure how to troubleshoot more and any help would be appreciated.

Example of debug output from the response:

[DEBUG]HTTP Response:
&{Status:200 OK StatusCode:200 Proto:HTTP/3 ProtoMajor:3 ProtoMinor:0 Header:map[Content-Type:[application/octet-stream]] Body:0xc000410040 ContentLength:0 TransferEncoding:[] Close:false Uncompressed:false Trailer:map[] Request:<nil> TLS:<nil>}
[DEBUG]ContentLength: 0
[DEBUG]Body: &{str:0xc0001961e0 isRequest:false reqDone:0xc00002e360 reqDoneClosed:true onFrameError:0x914e30 bytesRemainingInFrame:0}
[DEBUG]Body Length(read): 6016

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions