]> Cypherpunks repositories - gostls13.git/commit
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)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 26 Aug 2015 20:28:07 +0000 (20:28 +0000)
commita34b8cb733d689dc26adf7427a175b74a00ca5f1
treecc1621643c8a9f1b67d1a4af66082a8a4bf26d2b
parentb1b3243a1b98121911c351bc16cb95489024dc1d
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>
src/net/http/httputil/reverseproxy.go
src/net/http/httputil/reverseproxy_test.go