]> Cypherpunks repositories - gostls13.git/commit
net/http/httputil: ReverseProxy should pass on unannounced Trailers
authorTristan Colgate <tcolgate@gmail.com>
Sat, 20 May 2017 13:50:06 +0000 (14:50 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 22 May 2017 18:34:09 +0000 (18:34 +0000)
commit1611839b29a5447f3132e93f14c75b1639a34490
tree2b5f941878c053e678fdbb1726d4d1ba6f72158c
parentbc495c5751201854366b422e5a642ac55b42414a
net/http/httputil: ReverseProxy should pass on unannounced Trailers

Trailers that are not announced in the Trailer must be passed on to
the downstream client.

Rather than iterate over each and find missing trailer values,
this re-adds all trailers to the headers if there is a disparity
between the number of announced trailers and the final number.

This fixes #20437

Change-Id: I867e85f45feff68616a9a9bd6f65f12d73825eb7
Reviewed-on: https://go-review.googlesource.com/43712
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/httputil/reverseproxy.go
src/net/http/httputil/reverseproxy_test.go