Skip to content
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

net/http: make Transport ignore 408 timeout messages from server #32310

Closed
bradfitz opened this issue May 29, 2019 · 4 comments
Closed

net/http: make Transport ignore 408 timeout messages from server #32310

bradfitz opened this issue May 29, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@bradfitz
Copy link
Member

@bradfitz bradfitz commented May 29, 2019

Apparently HTTP 408 is a thing:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408
https://tools.ietf.org/html/rfc7231#section-6.5.7

I learned of this because I just saw this in some logs from our ppc64 buildlet. I suspect the TCP connection was to Google's GFE to Google Cloud Storage.

Unsolicited response received on idle HTTP channel starting with "HTTP/1.0 408 Request Time-out\r\nCache-Control: no-cache\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n"; err=<nil>

We should silently ignore those.

@bradfitz bradfitz added the NeedsFix label May 29, 2019
@bradfitz bradfitz added this to the Go1.13 milestone May 29, 2019
@bradfitz bradfitz self-assigned this May 29, 2019
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 29, 2019

Change https://golang.org/cl/179457 mentions this issue: net/http: prevent Transport from spamming stderr on server 408 reply

@gopherbot gopherbot closed this in ba66d89 May 30, 2019
@bradfitz

This comment has been minimized.

Copy link
Member Author

@bradfitz bradfitz commented May 31, 2019

@gopherbot, please backport.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 31, 2019

Backport issue(s) opened: #32366 (for 1.11), #32367 (for 1.12).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jun 7, 2019

Change https://golang.org/cl/181239 mentions this issue: [release-branch.go1.12] net/http: prevent Transport from spamming stderr on server 408 reply

gopherbot pushed a commit that referenced this issue Jun 7, 2019
…err on server 408 reply

HTTP 408 responses now exist and are seen in the wild (e.g. from
Google's GFE), so make Go's HTTP client not spam about them when seen.
They're normal (now).

Fixes #32367
Updates #32310

Change-Id: I558eb4654960c74cf20db1902ccaae13d03310f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/179457
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit ba66d89)
Reviewed-on: https://go-review.googlesource.com/c/go/+/181239
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.