Skip to content

x/website: update 1.16 release notes to indicate that ReverseProxy no longer changes transfer-encoding: chunked to content-length for small responses #48996

@ameowlia

Description

@ameowlia

What version of Go are you using (go version)?

$ go version
go version go1.17 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/adowns/Library/Caches/go-build"
GOENV="/Users/adowns/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/adowns/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/adowns/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/adowns/workspace/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4c/1b3s36l94blb6xg1_4p_13800000gn/T/go-build2945905512=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. I ran a small app that set Transfer-Encoding: chunked
  2. I ran a reverse proxy that points to the app.
  3. I curled the app via the reverse proxy.

See example in playground: https://play.golang.org/p/pRkFwyre5Bt.

What did you expect to see?

Prior to golang 1.16.0, the response would contain the Content-Length header.

What did you see instead?

Since golang 1.16.0, the response contains the Transfer-Encoding: chunked header.

I was able to use git bisect to narrow it down to this commit that changed things.

This change broke some of our clients and it would be nice to call it out in the release notes.

Current Release Note

ReverseProxy now flushes buffered data more aggressively when proxying streamed responses with unknown body lengths.

Link to release note

Proposed Release Note

ReverseProxy now flushes buffered data more aggressively when proxying streamed responses with unknown body lengths. Because of this, when a backend sends a small response with the Transfer-Encoding: chunked header, this header is no longer replaced with the Content-Length header.

Sending a CL momentarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.website

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions