]> Cypherpunks repositories - gostls13.git/commit
http: unified body transfer (read & write) logic in http.Request/Response.
authorPetar Maymounkov <petarm@gmail.com>
Fri, 19 Feb 2010 16:38:40 +0000 (08:38 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 19 Feb 2010 16:38:40 +0000 (08:38 -0800)
commit1480ce373e38b1dc6b4c54c083c609ec519acc54
treeb0a676d4e6ee299d70f4d59836436c3138a81965
parent8d9c2b2eab723f442ea623ec59300a6cb9765448
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
src/pkg/http/Makefile
src/pkg/http/readrequest_test.go
src/pkg/http/request.go
src/pkg/http/requestwrite_test.go
src/pkg/http/response.go
src/pkg/http/transfer.go [new file with mode: 0644]