]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] net/http/httputil: permit nil request body in ReverseProxy
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 26 Aug 2015 17:53:59 +0000 (10:53 -0700)
committerChris Broadfoot <cbro@golang.org>
Tue, 8 Sep 2015 18:01:50 +0000 (18:01 +0000)
commitc0dd2011132f179e77f7f6e1ccd88b5a0e0ee659
treef241844ea6195cca4b776b3a576c38d29b4fd557
parenta7e30ce9312e8ebfa89194bc899c8afdffa14906
[release-branch.go1.5] net/http/httputil: permit nil request body in ReverseProxy

Accepting a request with a nil body was never explicitly supported but
happened to work in the past.

This doesn't happen in most cases because usually people pass
a Server's incoming Request to the ReverseProxy's ServeHTTP method,
and incoming server requests are guaranteed to have non-nil bodies.

Still, it's a regression, so fix.

Fixes #12344

Change-Id: Id9a5a47aea3f2875d195b66c9a5f8581c4ca2aed
Reviewed-on: https://go-review.googlesource.com/13935
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/14245
src/net/http/httputil/reverseproxy.go
src/net/http/httputil/reverseproxy_test.go