<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/pkg/http/requestwrite_test.go, branch main</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2011-11-03T20:26:43Z</updated>
<entry>
<title>net: renamings</title>
<updated>2011-11-03T20:26:43Z</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2011-11-03T20:26:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=de03d502c7e0bd07c6f084ed9b5bb0446df29b49'/>
<id>urn:sha1:de03d502c7e0bd07c6f084ed9b5bb0446df29b49</id>
<content type='text'>
This is Go 1 package renaming CL #3.
This one merely moves the source; the import strings will be
changed after the next weekly release.
This one moves pieces into net.

http -&gt; net/http
http/cgi -&gt; net/http/cgi
http/fcgi -&gt; net/http/fcgi
http/pprof -&gt; net/http/pprof
http/httptest -&gt; net/http/httptest
mail -&gt; net/mail
rpc -&gt; net/rpc
rpc/jsonrpc -&gt; net/rpc/jsonrpc
smtp -&gt; net/smtp
url -&gt; net/url

Also remove rand (now math/rand) from NOTEST - it has a test.

The only edits are in Makefiles and deps.bash.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5335048
</content>
</entry>
<entry>
<title>src/pkg/[a-m]*: gofix -r error -force=error</title>
<updated>2011-11-02T02:04:37Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2011-11-02T02:04:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c2049d2dfeeea3d41fafa91e3e3f0e47c285355b'/>
<id>urn:sha1:c2049d2dfeeea3d41fafa91e3e3f0e47c285355b</id>
<content type='text'>
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5322051
</content>
</entry>
<entry>
<title>http: remove Request.RawURL</title>
<updated>2011-10-12T18:48:25Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-10-12T18:48:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=36036781d55c03e1120911e299ea6a48ed718524'/>
<id>urn:sha1:36036781d55c03e1120911e299ea6a48ed718524</id>
<content type='text'>
Its purpose is not only undocumented, it's also unknown (to me
and Russ, at least) and leads to complexity, bugs and
confusion.

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5213043
</content>
</entry>
<entry>
<title>http: always include Content-Length header, even for 0</title>
<updated>2011-09-19T18:41:09Z</updated>
<author>
<name>Dave Grijalva</name>
<email>dgrijalva@ngmoco.com</email>
</author>
<published>2011-09-19T18:41:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=80700eb817a099c74fd71a9a19c3e2a7445c19df'/>
<id>urn:sha1:80700eb817a099c74fd71a9a19c3e2a7445c19df</id>
<content type='text'>
fixes #2221

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4952052
</content>
</entry>
<entry>
<title>http: prevent DumpRequest from adding implicit headers</title>
<updated>2011-09-19T17:22:53Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-09-19T17:22:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6b6cb725e99da3bf74be53489521636ee8ee4798'/>
<id>urn:sha1:6b6cb725e99da3bf74be53489521636ee8ee4798</id>
<content type='text'>
Fixes #2272

R=rsc
CC=golang-dev
https://golang.org/cl/5043051
</content>
</entry>
<entry>
<title>http: check explicit wrong Request.ContentLength values</title>
<updated>2011-09-19T16:01:32Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-09-19T16:01:32Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=48ff4a849c7c532cbdd0cfa4a0f66859967c65a0'/>
<id>urn:sha1:48ff4a849c7c532cbdd0cfa4a0f66859967c65a0</id>
<content type='text'>
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5070041
</content>
</entry>
<entry>
<title>url: new package</title>
<updated>2011-08-17T03:36:02Z</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2011-08-17T03:36:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1d8f822c170891ac72e85020178c27aded27c644'/>
<id>urn:sha1:1d8f822c170891ac72e85020178c27aded27c644</id>
<content type='text'>
This is just moving the URL code from package http into its own package,
which has been planned for a while.
Besides clarity, this also breaks a nascent dependency cycle the new template
package was about to introduce.

Add a gofix module, url, and use it to generate changes outside http and url.

Sadness about the churn, gladness about some of the naming improvements.

R=dsymonds, bradfitz, rsc, gustavo, r
CC=golang-dev
https://golang.org/cl/4893043
</content>
</entry>
<entry>
<title>http: better handling of 0-length Request.Body</title>
<updated>2011-06-24T23:46:14Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-06-24T23:46:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=5d4eea6a2f50e0a07a4878f97146e1e3355523e3'/>
<id>urn:sha1:5d4eea6a2f50e0a07a4878f97146e1e3355523e3</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>http: make Headers be source of truth</title>
<updated>2011-06-16T20:02:28Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-06-16T20:02:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6e9b1a78ff1a394a60a815b23564ad58a0cf0ce1'/>
<id>urn:sha1:6e9b1a78ff1a394a60a815b23564ad58a0cf0ce1</id>
<content type='text'>
Previously Request and Response had redundant fields for
Referer, UserAgent, and cookies which caused confusion and
bugs.  It also didn't allow us to expand the package over
time, since the way to access fields would be in the Headers
one day and promoted to a field the next day.  That would be
hard to gofix, especially with code ranging over Headers.

After a discussion on the mail package's design with a similar
problem, we've designed to make the Headers be the source of
truth and add accessors instead.

Request:
change: Referer -&gt; Referer()
change: UserAgent -&gt; UserAgent()
change: Cookie -&gt; Cookies()
new: Cookie(name) *Cookie
new: AddCookie(*Cookie)

Response:
change: Cookie -&gt; Cookies()

Cookie:
new: String() string

R=rsc
CC=golang-dev
https://golang.org/cl/4620049
</content>
</entry>
<entry>
<title>http: fix handling of 0-lengthed http requests</title>
<updated>2011-06-08T22:59:23Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-06-08T22:59:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9c436ab7dca9898d013eef321f5b51feb56feb56'/>
<id>urn:sha1:9c436ab7dca9898d013eef321f5b51feb56feb56</id>
<content type='text'>
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
</content>
</entry>
</feed>
