Andrew Gerrand
89adf5dce4
http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose
...
R=bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/4432085
2011-05-01 12:37:20 -07:00
Brad Fitzpatrick
cb375ffbb0
http: new error for reading a body after it's been closed
...
R=adg
CC=golang-dev
https://golang.org/cl/4433094
2011-04-30 19:54:08 -07:00
Brad Fitzpatrick
9d12307a12
ioutil: add Discard, update tree.
...
This also removes an unnecessary allocation in
http/transfer.go
R=r, rsc1, r2, adg
CC=golang-dev
https://golang.org/cl/4426066
2011-04-27 15:47:04 -07:00
Brad Fitzpatrick
6e4966eb7f
http: ignore Transfer-Encoding on HEAD responses
...
Amazon S3 sends Transfer-Encoding "chunked"
on its 404 responses to HEAD requests for
missing objects.
We weren't ignoring the Transfer-Encoding
and were thus interpretting the subsequent
response headers as a chunk header from the
previous responses body (but a HEAD response
can't have a body)
R=rsc, adg
CC=golang-dev
https://golang.org/cl/4346050
2011-04-04 19:43:36 -07:00
Petar Maymounkov
b8fa61885a
http: introduce Header type, implement with net/textproto
...
textproto: introduce Header type
websocket: use new interface to access Header
R=rsc, mattn
CC=golang-dev
https://golang.org/cl/4185053
2011-02-23 00:39:25 -05:00
Brad Fitzpatrick
2aaabfc828
http: handle unchunked, un-lengthed HTTP/1.1 responses
...
Fixes #716
This CL simply resumes the previous CL in-flight at
https://golang.org/cl/906042/
R=rsc, petar-m, dsymonds
CC=golang-dev
https://golang.org/cl/4157042
2011-02-08 20:35:02 -08:00
Ryan Hitchman
062406bc64
throughout: simplify two-variable ranges with unused second variable
...
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/3529041
2010-12-08 21:36:56 -08:00
Brad Fitzpatrick
e198a5086a
strings: Contains
...
Tiny helper to avoid strings.Index(s, sub) != -1
R=rsc, r2, r
CC=golang-dev
https://golang.org/cl/2265044
2010-11-01 14:32:48 -07:00
Russ Cox
17c32ad712
http: do not close connection after sending HTTP/1.0 request
...
Fixes #671 .
R=adg, cw
CC=golang-dev
https://golang.org/cl/2431042
2010-10-19 23:29:25 -04:00
Brad Fitzpatrick
fbab1f1bad
http: support HTTP/1.0 Keep-Alive
...
R=rsc, bradfitz1
CC=golang-dev
https://golang.org/cl/2261042
2010-09-27 21:55:04 -04:00
James Whitehead
18d8c7dac6
http/transferWriter: Write body when content length unknown
...
Fixes #923 .
R=adg, rsc
CC=golang-dev
https://golang.org/cl/1846043
2010-07-19 14:05:27 +10:00
Rob Pike
38f1231f3e
strings and bytes.Split: make count of 0 mean 0, not infinite.
...
Use a count of -1 for infinity. Ditto for Replace.
R=rsc
CC=golang-dev
https://golang.org/cl/1704044
2010-07-01 14:08:14 -07:00
Russ Cox
c7122a3c58
simplify various code using new map index rule
...
R=r
CC=golang-dev
https://golang.org/cl/833044
2010-03-30 10:51:11 -07:00
Russ Cox
37666561b2
http: fix handling of Close, use Close in http.Post
...
default to HTTP/1.1
R=petar-m
CC=golang-dev
https://golang.org/cl/224041
2010-02-24 15:13:39 -08:00
Petar Maymounkov
1480ce373e
http: unified body transfer (read & write) logic in http.Request/Response.
...
Compliance issue addressed here: POST requests carrying form data are required
to use "identity" transfer encoding by common nginx and apache server configurations,
e.g. wordpress.com (and many others). So, Request needed to be able to send
non-chunked encodings.
Thus, Request is extended to support identity and chunked encodings, like
Response. Since the Read() and Write() logic are shared by both (and are
quite long), it is exported in a separate file transfer.go.
R=rsc
CC=golang-dev
https://golang.org/cl/217048
2010-02-19 08:38:40 -08:00