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

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

Closed
ameowlia opened this issue Oct 14, 2021 · 2 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website
Milestone

Comments

@ameowlia
Copy link
Contributor

ameowlia commented Oct 14, 2021

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.

@gopherbot gopherbot added this to the Unreleased milestone Oct 14, 2021
@gopherbot
Copy link

Change https://golang.org/cl/355951 mentions this issue: x/website: update 1.16 net/http/httputil note

@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Oct 15, 2021
@jamalc
Copy link

jamalc commented Jun 15, 2022

Closing this. See the CL for context.

@jamalc jamalc closed this as completed Jun 15, 2022
@golang golang locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. website
Projects
None yet
Development

No branches or pull requests

4 participants