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
{{ message }}
Repository navigation
net/http/httputil: ReverseProxy FlushInterval no longer flushes headers in go1.12 #31125
Proxied to a backend that writes and flushes headers, then streams response chunks (which can be arbitrarily delayed from the original header write/flush).
What did you expect to see?
Clients making requests to the proxy should see the headers from the backend no later than the FlushInterval
What did you see instead?
Clients making requests to the proxy receive no data until the first body chunk is written.
The change in 5440bfc#diff-d863507a61be206d112f6e00e6d812a2L343 removed the goroutine that ensured the FlushInterval was honored while blocking in copyResponse, even prior to the first Write() call being encountered. The time.After() ticker it sets up doesn't get set up until the first Write() call is made.
changed the title [-]httputil.ReverseProxy FlushInterval no longer flushes headers in go1.12[/-][+]net/http/httputil: ReverseProxy FlushInterval no longer flushes headers in go1.12[/+]on Mar 29, 2019
Activity
gopherbot commentedon Mar 29, 2019
Change https://golang.org/cl/170066 mentions this issue:
net/http/httputil: make ReverseProxy flush headers on FlushIntervalthaJeztah commentedon Mar 29, 2019
Could this be tracked for Go 1.12.2 ? (is a separate tracking issue needed for that?)
[-]httputil.ReverseProxy FlushInterval no longer flushes headers in go1.12[/-][+]net/http/httputil: ReverseProxy FlushInterval no longer flushes headers in go1.12[/+]ALTree commentedon Mar 29, 2019
cc @bradfitz for investigation and decision regarding a possible backport
In general, after the issue has been investigated, a team member will decide if it qualifies for a backport. Then a backport issue will be opened.
PaulSD commentedon Mar 29, 2019
Work-around for Go 1.12:
bradfitz commentedon Mar 29, 2019
@gopherbot, please backport to Go 1.12.
gopherbot commentedon Mar 29, 2019
Backport issue(s) opened: #31144 (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.
Up minimum go version to 1.12.4