Closed
Description
- What version of Go are you using (
go version
)?
go version go1.6 freebsd/amd64 - What operating system and processor architecture are you using (
go env
)?
go version go1.6 freebsd/amd64 - 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
- 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. - What did you see instead?
Code failing because the response writer didn't support hijacking.
CC @bradfitz