You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Go are you using (go version)?
go1.6
What operating system and processor architecture are you using (go env)?
Ubuntu 15.10 amd64
What did you do?
package main
import (
"log"
"net/http"
)
func main() {
// Enables HTTP/2 in the DefaultClient on Go 1.6.0
if tr, ok := http.DefaultTransport.(*http.Transport); ok {
tr.ExpectContinueTimeout = 0
}
req, err := http.NewRequest("GET", "https://www.google.com", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Transfer-Encoding", "trailers")
_, err = http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
}
What did you expect to see?
No error
What did you see instead? http2: invalid Transfer-Encoding request header.
checkConnHeaders fails on any Transfer-Encoding header values other than chunked, but encodeHeaders ignores any Transfer-Encoding headers anyway. This is contrary to the spec which says
The only exception to this is the TE header field, which MAY be present in an HTTP/2 request; when it is, it MUST NOT contain any value other than "trailers".
The text was updated successfully, but these errors were encountered:
go version
)?go1.6
go env
)?Ubuntu 15.10 amd64
No error
http2: invalid Transfer-Encoding request header
.checkConnHeaders
fails on anyTransfer-Encoding
header values other thanchunked
, butencodeHeaders
ignores anyTransfer-Encoding
headers anyway. This is contrary to the spec which saysThe text was updated successfully, but these errors were encountered: