jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chaithanya Ganta <notificati...@github.com>
Subject [jclouds/jclouds] Remove Expect header for PUT and POST reqs with content-length=0 (#1120)
Date Mon, 17 Jul 2017 11:24:51 GMT
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 throwing an [IOException](https://github.com/jclouds/jclouds/blob/f3c3f3b30620ad62dc502cf79bf121ec1773396e/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java#L96)
if we expect 100-continue for an PUT/POST request with empty body although it is returning
201 response code, it is resulting in another network call when we do [getHeaderFields](https://github.com/jclouds/jclouds/blob/f3c3f3b30620ad62dc502cf79bf121ec1773396e/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java#L113)
on the connection.

This issue can be easily replicated by invoking putBlob operation with zero-length blob.
ByteSource payload = ByteSource.empty();
Blob blob = blobStore.blobBuilder(blobName)
blobStore.putBlob(containerName, blob);
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Remove Expect header for PUT and POST reqs with content-length=0

-- File Changes --

    M apis/s3/src/test/java/org/jclouds/s3/S3ClientMockTest.java (2)
    M core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java (16)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:

View raw message