]> Cypherpunks repositories - gostls13.git/commit
httputil: accumulate X-Forwarded-For header info
authorBobby Powers <bobbypowers@gmail.com>
Mon, 30 Jul 2012 22:38:49 +0000 (08:38 +1000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 30 Jul 2012 22:38:49 +0000 (08:38 +1000)
commit7520f0b4aa3efe9b5eea5bb79fe47c81051d478d
tree1c5e37647ac075d54cc450ab7f9e3944407b6139
parentad058cacfb63b697664c0781607c49d10650f9ef
httputil: accumulate X-Forwarded-For header info

If the X-Forwarded-For header already exists on a request, we
should append our client's IP to it after a comma+space instead
of overwriting it.

Fixes #3846.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6448053
src/pkg/net/http/httputil/reverseproxy.go
src/pkg/net/http/httputil/reverseproxy_test.go