Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(110)

Issue 217048: code review 217048: Unified body transfer (read & write) logic in http.Requ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by petar-m
Modified:
15 years, 7 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : code review 217048: Unified body transfer (read & write) logic in http.Requ... #

Patch Set 3 : code review 217048: Unified body transfer (read & write) logic in http.Requ... #

Total comments: 6

Patch Set 4 : code review 217048: Unified body transfer (read & write) logic in http.Requ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -348 lines) Patch
M src/pkg/http/Makefile View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/http/readrequest_test.go View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/http/request.go View 1 2 3 7 chunks +41 lines, -53 lines 0 comments Download
M src/pkg/http/requestwrite_test.go View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M src/pkg/http/response.go View 5 chunks +18 lines, -291 lines 0 comments Download
A src/pkg/http/transfer.go View 1 chunk +419 lines, -0 lines 0 comments Download

Messages

Total messages: 4
petar-m
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years, 7 months ago (2010-02-19 14:51:49 UTC) #1
rsc
looks good http://codereview.appspot.com/217048/diff/22/25 File src/pkg/http/request.go (right): http://codereview.appspot.com/217048/diff/22/25#newcode94 src/pkg/http/request.go:94: // ContentLength records the length of the ...
15 years, 7 months ago (2010-02-19 16:19:51 UTC) #2
petar-m
Done. http://codereview.appspot.com/217048/diff/22/25 File src/pkg/http/request.go (right): http://codereview.appspot.com/217048/diff/22/25#newcode94 src/pkg/http/request.go:94: // ContentLength records the length of the associated ...
15 years, 7 months ago (2010-02-19 16:26:41 UTC) #3
rsc
15 years, 7 months ago (2010-02-19 16:38:42 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=78cf751607b4 ***

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
http://codereview.appspot.com/217048

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b