-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
Transfer-Encoding header is missing when http.Request.Header is printed/accessed.
What version of Go are you using (go version
)?
go version go1.10.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN="/Users/user/go/bin"
GOCACHE="/Users/sumalepa/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="linux"
GOPATH="/Users/user/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="0"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/76/trlnwqwj0bs5003x850kzpg00000gn/T/go-build494326801=/tmp/go-build -gno-record-gcc-switches"
What did you do?
We have a nginx server that routes the requests to go based http server.
https://play.golang.org/p/EA1vcoiFi_J
What did you expect to see?
We expected to see the header Transfer-Encoding
What did you see instead?
Missing header Transfer-Encoding
Few Details:
Http-Client (User-Agent [Go-http-client/1.1]) -> Nginx -> Http server (Go based server)
Sent a PUT request from client with chunked encoding header to nginx in turn nginx sends the request to http server.
I was able to see the headers in the pcap dumps captured at client, nginx. But on go http server I didn't the header.
But in the go http server output I didn't see the Transfer-Encoding header.
As a part of debug process I replaces go http server with python http server. I was able to see the Transfer-Encoding header on http python server.