net/http: http2 and http1 inconsistency with `Write(nil)` #21826
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Sorry, I believe I was mistaken - it seems the headers are not touched only if it's a hijacked connection. Or else HTTP/1.1 writes the headers as well.
This is becoming tedious. Would be nice if there's a way to find out if the connection is Hijacked without forcing a write. Hijacking, like it or not, due to historical reasons is now a part of Http1.1, and is exposed as an interface. While it's good to realize that interface way of exposing things was not the best design, I just wish this was just exposed in the interface. Because, this just make it one more quirk, and causes more problems.
Closing this as the assumption of the issue was incorrect after further digging.