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

Issue 6463064: [http issue 115] NetHttpTransport drops Content-Length header when posting 0-length data (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by yanivi
Modified:
11 years, 8 months ago
Reviewers:
mharris, rmistry
Base URL:
https://google-http-java-client.googlecode.com/hg/
Visibility:
Public.

Patch Set 1 #

Total comments: 7

Patch Set 2 : deprecate HttpRequest.setAllowEmptyContent and other stuff #

Patch Set 3 : upgrade warning #

Total comments: 4

Patch Set 4 : fixes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -36 lines) Patch
A google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java View 1 1 chunk +55 lines, -0 lines 0 comments Download
M google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java View 1 2 3 3 chunks +8 lines, -0 lines 1 comment Download
M google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java View 1 4 chunks +14 lines, -4 lines 0 comments Download
M google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java View 1 2 3 1 chunk +109 lines, -0 lines 0 comments Download
A google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
A google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java View 1 1 chunk +40 lines, -0 lines 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java View 1 1 chunk +2 lines, -1 line 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java View 1 1 chunk +1 line, -0 lines 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java View 1 2 chunks +9 lines, -31 lines 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java View 1 2 chunks +45 lines, -0 lines 0 comments Download

Messages

Total messages: 8
yanivi
11 years, 8 months ago (2012-08-17 22:09:52 UTC) #1
rmistry
http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java (right): http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java:76: // TODO(yanivi): deprecate HttpRequest.setAllowEmptyContent()? Lets remove the TODO because ...
11 years, 8 months ago (2012-08-22 12:22:16 UTC) #2
rmistry
http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java (right): http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java#newcode93 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java:93: // for HEAD, OPTIONS, DELETE, or TRACE it would ...
11 years, 8 months ago (2012-08-22 14:36:44 UTC) #3
yanivi
http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java (right): http://codereview.appspot.com/6463064/diff/1/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java:76: // TODO(yanivi): deprecate HttpRequest.setAllowEmptyContent()? On 2012/08/22 12:22:16, rmistry wrote: ...
11 years, 8 months ago (2012-08-22 18:55:07 UTC) #4
rmistry
Also, I am assuming http://codereview.appspot.com/6458156/ will be changed to set the empty content? http://codereview.appspot.com/6463064/diff/7001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java File ...
11 years, 8 months ago (2012-08-22 19:00:08 UTC) #5
yanivi
http://codereview.appspot.com/6463064/diff/7001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java File google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java (right): http://codereview.appspot.com/6463064/diff/7001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java#newcode2 google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java:2: * Copyright (c) 2011 Google Inc. On 2012/08/22 19:00:09, ...
11 years, 8 months ago (2012-08-22 19:08:58 UTC) #6
rmistry
LGTM
11 years, 8 months ago (2012-08-22 20:09:55 UTC) #7
mharris
11 years, 8 months ago (2012-08-27 21:59:12 UTC) #8
FYI

https://codereview.appspot.com/6463064/diff/2003/google-http-client/src/main/...
File
google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java
(right):

https://codereview.appspot.com/6463064/diff/2003/google-http-client/src/main/...
google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:604:
+ " use setEmptyContent instead (if needed)");
"setEmptyContent" is confusing, as there is no such method. It would be very
helpful if this message said setContent(new EmptyContent()).
Sign in to reply to this message.

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