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

Issue 10465043: http/client: Set Content-Length

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by jameinel
Modified:
10 years, 10 months ago
Reviewers:
gz, mp+170976, dave, dimitern
Visibility:
Public.

Description

http/client: Set Content-Length The net/http.Request object takes a Reader so you have to set ContentLength as an attribute or it will not set in in the POST request. Fixes bug #1124561. Oddly enough, we always buffer everything anyway, (probably to handle retries?). I would have thought for at least BinaryRequest we would have not touched the io.Reader that we got. https://code.launchpad.net/~jameinel/goose/transfer-content-length-1124561/+merge/170976 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : http/client: Set Content-Length #

Patch Set 3 : http/client: Set Content-Length #

Patch Set 4 : http/client: Set Content-Length #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -7 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M http/client.go View 1 chunk +1 line, -0 lines 0 comments Download
M http/client_test.go View 1 2 3 5 chunks +51 lines, -7 lines 0 comments Download

Messages

Total messages: 8
jameinel
Please take a look.
10 years, 10 months ago (2013-06-23 09:15:26 UTC) #1
gz
LGTM, let's land this so it's in the next juju-core release. https://codereview.appspot.com/10465043/diff/1/http/client_test.go File http/client_test.go (right): ...
10 years, 10 months ago (2013-06-26 14:59:43 UTC) #2
dave_cheney.net
https://codereview.appspot.com/10465043/diff/1/http/client_test.go File http/client_test.go (right): https://codereview.appspot.com/10465043/diff/1/http/client_test.go#newcode59 http/client_test.go:59: headers := http.Header{} var headers http.Header https://codereview.appspot.com/10465043/diff/1/http/client_test.go#newcode110 http/client_test.go:110: c.Assert(body, ...
10 years, 10 months ago (2013-06-26 23:48:37 UTC) #3
dave_cheney.net
> this is weird, i cannot see how body will ever not be nil Urgh. ...
10 years, 10 months ago (2013-06-26 23:50:05 UTC) #4
jameinel
Please take a look. https://codereview.appspot.com/10465043/diff/1/http/client_test.go File http/client_test.go (right): https://codereview.appspot.com/10465043/diff/1/http/client_test.go#newcode59 http/client_test.go:59: headers := http.Header{} On 2013/06/26 ...
10 years, 10 months ago (2013-06-27 06:12:15 UTC) #5
jameinel
Please take a look.
10 years, 10 months ago (2013-06-27 06:17:24 UTC) #6
jameinel
Please take a look.
10 years, 10 months ago (2013-06-27 06:50:35 UTC) #7
dimitern
10 years, 10 months ago (2013-06-27 12:07:06 UTC) #8
LGTM
Sign in to reply to this message.

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