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
// See https://github.com/golang/go/issues/26414
func director(req *http.Request) {
// apply hack only to GET requests, as we have only seen these type of reqs from apt-get.
if req.Method == "GET" {
quietReq := req.WithContext(context.Background())
*req = *quietReq
}
}
Disable keep-alives on the server
server.SetKeepAlivesEnabled(false)
Disable closeNotify method if method is GET for HTTP pipelining: Thanks to @juliens
@bradfitz What do you think about disabling the closeNotify mechanism for pipelined GET requests?
// If the protocol is HTTP/1.1 and CloseNotify is called while
// processing an idempotent request (such a GET) while
// HTTP/1.1 pipelining is in use, the arrival of a subsequent
// pipelined request may cause a value to be sent on the
// returned channel. In practice HTTP/1.1 pipelining is not
// enabled in browsers and not seen often in the wild. If this
// is a problem, use HTTP/2 or only use CloseNotify on methods
// such as POST.
From my point of view I would consider apt-get as an important client.
Thanks
The text was updated successfully, but these errors were encountered:
This is a new issue to re-open #20617
The problem is still there, and
apt-get
is still suffering from it.What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build994157374=/tmp/go-build -gno-record-gcc-switches"
[root@cbox-redirector-02 cboxredirectd]#
What did you do?
Please read #20617 for the root of the problem.
result in
There are three workarounds for this issue:
Add a custom director: Thanks to @rgeronimi
Disable keep-alives on the server
Disable closeNotify method if method is GET for HTTP pipelining: Thanks to @juliens
@juliens disabled the closeNotify logic for the traefik proxy here: traefik/traefik#3108
@bradfitz What do you think about disabling the closeNotify mechanism for pipelined GET requests?
From my point of view I would consider apt-get as an important client.
Thanks
The text was updated successfully, but these errors were encountered: