[jclouds/jclouds] Remove Expect header for PUT and POST reqs with content-length=0 (#1120)

2017-07-17 Thread Chaithanya Ganta
Without request body, there's no point in asking for 100-continue. With [JavaUrlHttpCommandExecutor](https://github.com/jclouds/jclouds/blob/f3c3f3b30620ad62dc502cf79bf121ec1773396e/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java), HttpUrlConnection is throwin

Re: [jclouds/jclouds] Remove Expect header for PUT and POST reqs with content-length=0 (#1120)

2017-07-17 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -357,6 +357,22 @@ public GeneratedHttpRequest apply(Invocation invocation) > { if (request.getPayload() != null) { contentMetadataCodec.fromHeaders(request.getPayload().getContentMetadata(), headers); } + + boolean

Re: [jclouds/jclouds] Remove Expect header for PUT and POST reqs with content-length=0 (#1120)

2017-07-18 Thread Chaithanya Ganta
@ChaithanyaGK pushed 1 commit. 467eecc Refactored the code and added a unit test -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1120/files/e12e21821dd3c54bdbae0954216d7d0a1f8514d9..467eeccb71b1e041301b0b4d720c6b22

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-18 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -357,6 +357,22 @@ public GeneratedHttpRequest apply(Invocation invocation) > { if (request.getPayload() != null) { contentMetadataCodec.fromHeaders(request.getPayload().getContentMetadata(), headers); } + + boolean

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-18 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -73,7 +73,7 @@ public void testZeroLengthPutHasContentLengthHeader() > throws IOException, Interr RecordedRequest request = server.takeRequest(); assertEquals(request.getRequestLine(), "PUT /bucket/object HTTP/1.1"); assertE

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-18 Thread Chaithanya Ganta
@andrewgaul Please have a look at the Charles screenshot attached, where two calls are made in case of azure putBlob operation with zero length blob. ![charles1](https://user-images.githubusercontent.com/28896513/28322642-3d1b2142-6bf4-11e7-856e-1d3c00d6d9e2.png) I've added a unit test case to c

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-18 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -779,6 +782,22 @@ private static void addHeader(Multimap > headers, Headers header, return parts.build(); } + private static GeneratedHttpRequest stripExpectHeaderIfContentZero(GeneratedHttpRequest request) { + boolean isBod

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-19 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -779,6 +782,22 @@ private static void addHeader(Multimap > headers, Headers header, return parts.build(); } + private static GeneratedHttpRequest stripExpectHeaderIfContentZero(GeneratedHttpRequest request) { + boolean isBod

Re: [jclouds/jclouds] Remove Expect header for requests with empty body (#1120)

2017-07-19 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -779,6 +782,22 @@ private static void addHeader(Multimap > headers, Headers header, return parts.build(); } + private static GeneratedHttpRequest stripExpectHeaderIfContentZero(GeneratedHttpRequest request) { + boolean isBod

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-19 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -73,7 +74,7 @@ public void testZeroLengthPutHasContentLengthHeader() > throws IOException, Interr RecordedRequest request = server.takeRequest(); assertEquals(request.getRequestLine(), "PUT /bucket/object HTTP/1.1"); assertE

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-19 Thread Chaithanya Ganta
> could you explain the motivation for this change? I don't understand what > this addresses except optimizing the rare case of a zero-length PUT. @andrewgaul Every time I initiate a multipart upload to azure using S3Proxy it creates an [empty blob](https://github.com/andrewgaul/s3proxy/blob/m

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-20 Thread Chaithanya Ganta
ChaithanyaGK commented on this pull request. > @@ -779,6 +782,22 @@ private static void addHeader(Multimap > headers, Headers header, return parts.build(); } + private static GeneratedHttpRequest stripExpectHeaderIfContentZero(GeneratedHttpRequest request) { + boolean isBod

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-20 Thread Chaithanya Ganta
@ChaithanyaGK pushed 1 commit. 22692e6 Code cleanup and added integration tests -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1120/files/467eeccb71b1e041301b0b4d720c6b22ec37a401..22692e66b2ddc8adec4f55a74cbe9f1f9

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-20 Thread Chaithanya Ganta
> You should add a test for putting a zero-length blob to > BaseBlobStoreIntegrationTest and test this against a few providers. We > probably want a second test for streaming zero-length InputStream payloads as > well. @andrewgaul I've added integration tests for zero-length `String`, `ByteSour

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-07-25 Thread Chaithanya Ganta
@andrewgaul Could you please let me know is there anything else that needs to be addressed here. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1120#issuecomment-317779896

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-08-04 Thread Chaithanya Ganta
@ChaithanyaGK pushed 1 commit. dad7d0a Code review changes -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1120/files/22692e66b2ddc8adec4f55a74cbe9f1f987da28c..dad7d0a8f95829b8b96e54e1a3337f4cf7d585e3

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-08-06 Thread Chaithanya Ganta
@andrewgaul This PR doesn't introduce any regression. `putBlob` with zero-length inputstream is failing before as well on google-cloud. The thing is we don't have a test case for that scenario before, so you didn't see any test failure. -- You are receiving this because you are subscribed to t

Re: [jclouds/jclouds] JCLOUDS-1322: Remove Expect header for requests with empty body (#1120)

2017-08-07 Thread Chaithanya Ganta
@andrewgaul Currently, I don't have any performance numbers with me. As I have mentioned before, we were comparing the no. of requests being made for a multi-part upload using S3Proxy vs using Azure directly, where I've encountered this redundant request and raised the PR to fix the same. --

[jira] [Created] (JCLOUDS-1322) Zero length putBlob is making two network calls

2017-07-19 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1322: - Summary: Zero length putBlob is making two network calls Key: JCLOUDS-1322 URL: https://issues.apache.org/jira/browse/JCLOUDS-1322 Project: jclouds

[jira] [Created] (JCLOUDS-1327) putBlob with zero length Inputstream is failing on google-cloud-storage

2017-08-05 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1327: - Summary: putBlob with zero length Inputstream is failing on google-cloud-storage Key: JCLOUDS-1327 URL: https://issues.apache.org/jira/browse/JCLOUDS-1327

[jira] [Commented] (JCLOUDS-1327) putBlob with zero length Inputstream is failing on google-cloud-storage

2017-08-06 Thread Chaithanya Ganta (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115909#comment-16115909 ] Chaithanya Ganta commented on JCLOUDS-1327: --- [~argaul] This issue has not

[jira] [Created] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)
Chaithanya Ganta created JCLOUDS-1345: - Summary: testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule Key: JCLOUDS-1345 URL: https://issues.apache.org/jira/browse/JCLOUDS-1345

[jira] [Commented] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174610#comment-16174610 ] Chaithanya Ganta commented on JCLOUDS-1345: --- Jclouds creates resp

[jira] [Comment Edited] (JCLOUDS-1345) testMetadata test is failing if we use ApacheHCHttpCommandExecutorServiceModule

2017-09-21 Thread Chaithanya Ganta (JIRA)
[ https://issues.apache.org/jira/browse/JCLOUDS-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174610#comment-16174610 ] Chaithanya Ganta edited comment on JCLOUDS-1345 at 9/21/17 11:4