thrawn01 / h2c-golang-example

Example HTTP/2 Cleartext (H2C) server and client in golang
110 stars 25 forks source link

when doing post to the h2c server: response.Write on hijacked connection #3

Open ldemailly opened 3 years ago

ldemailly commented 3 years ago

if you try to post against the server:

curl --http2 -d foo localhost:1010

you get

Listening [0.0.0.0:1010]...
2021/01/08 19:45:45 http: response.Write on hijacked connection from fmt.Fprintf (print.go:205)

(and no reply)

ps: curl --http2-prior-knowledge -d foo localhost:1010 does work, it's only when upgrading that something happens to the response writer... I think it's because the body is supposed to become bi directional but I haven't figured that out yet

ldemailly commented 2 years ago

fix in https://github.com/golang/go/issues/52882