• Brad Fitzpatrick's avatar
    http: better handling of 0-length Request.Body · 5d4eea6a
    Brad Fitzpatrick authored
    As rsc suggested after change 58a6bdac3d12 was committed, we
    now read the first byte of Request.Body when the
    Request.ContentLength is 0 to disambiguate between a truly
    zero-length body and a body of unknown length where the user
    didn't set the ContentLength field.
    
    This was also causing the reverse proxy problem where incoming
    requests (which always have a body, of private type http.body,
    even for 0-lengthed requests) were being relayed to the http
    Transport for fetching, which was serializing the request as a
    chunked request (since ContentLength was 0 and Body was
    non-nil)
    
    Fixes #1999
    
    R=golang-dev, kevlar
    CC=golang-dev
    https://golang.org/cl/4628063
    5d4eea6a
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-qemu.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...