Skip to content

x/net/http2: *http2responseWriter does not implement http.Hijacker #14797

Closed
@wathiede

Description

@wathiede
  1. What version of Go are you using (go version)?
    go version go1.6 freebsd/amd64
  2. What operating system and processor architecture are you using (go env)?
    go version go1.6 freebsd/amd64
  3. What did you do?

I'm not sure if this is a bug report or a feature request, but the response writer used for HTTP2 doesn't support hijacking even though the HTTP/1.1 + TLS does.

Example code:
http://play.golang.org/p/2o6LE5FHj3

Run with:
$ GODEBUG=http2server=0 go run main.go

Response says:

*http.response implements http.Hijack: true

Run with:
$ GODEBUG=http2server=1 go run main.go

Response says:

*http.http2responseWriter implements http.Hijack: false
  1. What did you expect to see?
    I expected http.Handlers that Hijack connections with HTTP/1.x plaintext & TLS to work with HTTP/2 connections.
  2. What did you see instead?
    Code failing because the response writer didn't support hijacking.

CC @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions