Skip to content

net/http: Response.Write has bogus Connection header after auto-ungzipped Content-Length response #15367

Closed
@sbadame

Description

@sbadame

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6 linux/amd64
  2. What did you do?
    I can't use the playground because this requires localhost, which the playground doesn't support.
    https://gist.github.com/sbadame/6672153feb5a5430a0129d40b263d8e9
  3. What did you expect to see?
    Either "Connection: close" or "Connection:keep-alive" and a content length. Or maybe chunk encoding?
  4. What did you see instead?

http.Transport.RoundTrip response: HTTP/1.1 200 OK
Connection: close
Connection: keep-alive
Keep-Alive: timeout=7200

http.DefaultClient.Do Response: HTTP/1.1 200 OK
Connection: close
Connection: keep-alive
Keep-Alive: timeout=7200

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions