Skip to content

x/net/http2: Transport hangs on malformed response headers #16572

@icing

Description

@icing

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go1.7rc4
  2. What operating system and processor architecture are you using (go env)?
    OS X ( 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64)
  3. What did you do?
    Tested the http2 implementation of go against Apache mod_h2, using a simple GET on a python CGI.
  4. What did you expect to see?
    The output from the CGI.
  5. What did you see instead?
    Go did hang and did not produce any results. The difference between a stuck GET and a successful one seems to be the EOF handling. On most responses Apache sets the EOF flag on the last DATA frame. However with CGI processes, the EOF is only encountered when the last DATA has already been written. In this case, Apache send a last DATA frame with length 0 and EOF=1. This seems to be ignored by the go implemenation, keeping it waiting.

Additionally to that, Apache will close the connection after a timeout, but the go client still will not return although the connection was properly closed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions