go/src
Brad Fitzpatrick 9c436ab7dc http: fix handling of 0-lengthed http requests
Via Russ Ross' bug report on golang-nuts, it was not possible
to send an HTTP request with a zero length body with either a
Content-Length (it was stripped) or chunking (it wasn't set).

This means Go couldn't upload 0-length objects to Amazon S3.
(which aren't as silly as they might sound, as S3 objects can
have key/values associated with them, set in the headers)

Amazon further doesn't supported chunked uploads. (not Go's
problem, but we should be able to let users set an explicit
Content-Length, even if it's zero.)

To fix the ambiguity of an explicit zero Content-Length and
the Request struct's default zero value, users need to
explicit set TransferEncoding to []string{"identity"} to force
the Request.Write to include a Content-Length: 0.  identity is
in RFC 2616 but is ignored pretty much everywhere.  We don't
even then serialize it on the wire, since it's kinda useless,
except as an internal sentinel value.

The "identity" value is then documented, but most users can
ignore that because NewRequest now sets that.

And adds more tests.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4603041
2011-06-08 15:59:23 -07:00
..
cmd gofmt: update test script so that it passes again 2011-06-08 12:05:40 -07:00
lib9 lib9/create.c: delete unused variable 2011-04-13 23:12:48 -07:00
libbio
libmach libmach: use the standardized format for designated initializers. 2011-06-06 06:56:09 +00:00
pkg http: fix handling of 0-lengthed http requests 2011-06-08 15:59:23 -07:00
Make.ccmd make: add nuke target for C commands and libs 2011-05-11 22:53:42 -04:00
Make.clib make: add nuke target for C commands and libs 2011-05-11 22:53:42 -04:00
Make.cmd make: add nuke target for C commands and libs 2011-05-11 22:53:42 -04:00
Make.common make: prevent rm provoking 'text file busy' errors. 2011-04-15 08:25:44 -04:00
Make.inc
Make.pkg src: Make.pkg don't create $(TARGDIR) with goinstall. 2011-05-30 12:35:55 +10:00
all-qemu.bash all-qemu.bash: remove DISABLE_NET_TESTS 2011-04-26 00:16:12 -04:00
all.bash
clean.bash build: reenable clean.bash without gomake 2011-03-21 00:27:50 -03:00
env.bash rc/env.bash: fix for Go tool-chain build on windows under msys. 2011-04-23 11:34:08 -07:00
make.bash make.bash: remove old bash version of gotest on Windows 2011-05-04 11:16:55 +10:00
quietgcc.bash quietgcc: fix typo, respect $TMPDIR 2011-05-25 13:20:50 -04:00
run.bash tutorial: replace the forever loops with finite counts in sieve programs. 2011-04-27 09:59:27 -07:00
sudo.bash
version.bash version.bash: strip changeset hash from 'hg tags' output 2011-04-04 10:06:09 +10:00