-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/http2: GET fails on content with very large header #20689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc HTTP2 squad @bradfitz @tombergan |
The GFE hung up on us before sending anything. Maybe the GFE didn't like our MAX_HEADER_LIST_SIZE = 16384 and decided that since it can't fit in 16KB, they'd just hang up. Can you click the checkbox to make https://storage.googleapis.com/veener-jba/metadata-test be publicly readable to ease debugging? |
@bradfitz or any other folks investigating I've started a repro here https://github.com/odeke-em/bugs/tree/master/golang/20689 and can't yet reproduce with a very large header https://github.com/odeke-em/bugs/blob/master/golang/20689/server.go#L10 or inlined package main
import (
"log"
"net/http"
"strings"
)
func withLargeHeader(w http.ResponseWriter, r *http.Request) {
w.Header().Set("x-wimmie", strings.Repeat("wimmie nah", 100001))
}
func main() {
http.HandleFunc("/", withLargeHeader)
err := http.ListenAndServeTLS(":9999", "cert.pem", "key.pem", nil)
if err != nil {
log.Fatal(err)
}
} |
Done. |
@odeke-em Consistent with Brad's guess that Google's front end is the culprit. |
On the other hand, this works: |
Fun. The GFE or the GCS backend indeed hangs with our request:
|
There's no change if I modify the Go http2 Transport to not send MAX_HEADER_LIST_SIZE=10MB in our initial settings frame. (Omitting it means unlimited) No change:
|
@Capstan, any ideas? |
Chrome can't load it either: Works with curl + HTTP/1.1 though. |
@jba, that's Python, right? I bet it's HTTP/1.1 and not HTTP/2. |
Yap yap, I can confirm what @bradfitz said about Chrome not loading, it fails with |
@bradfitz, yes, gsutil is Python. |
I am surprised you can create an object with metadata that large. I was under the impression we enforced a 4KB limit on user-provided metadata. |
False impression. We currently don't enforce any limit. |
I filed internal bug 62956673. |
Confirmed that this is a GFE bug, so I'm closing. |
Update: fixed in GFE and deployed. |
What version of Go are you using (
go version
)?go1.8.1.typealias
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
Tried to read a GCS object with large metadata, which results in a large header (value is 100,000 bytes long).
I can do this if you need it.
What did you expect to see?
Here's the http2debug=2 output when the metadata value has size 100:
What did you see instead?
With size 100000:
The text was updated successfully, but these errors were encountered: