Skip to content

net/http: request fails when server replies with a short gzip body #7750

Closed
@snaury

Description

@snaury
When doing a request to a server that replies with a truncated gzip body the request
immediately fails with ErrUnexpectedEOF and writes "RoundTripper returned a
response & error; ignoring response" to the log. ErrUnexpectedEOF should only
happen when I try to read from the response body, so I have a chance to inspect headers
first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions