azureblob: explicitly set Expect header on methods that need it

This commit is contained in:
adriancole 2013-03-03 17:24:17 -08:00
parent 1c2090fd08
commit 1e98bc51ab
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,8 @@
*/ */
package org.jclouds.azureblob; package org.jclouds.azureblob;
import static com.google.common.net.HttpHeaders.EXPECT;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -217,6 +219,7 @@ public interface AzureBlobAsyncClient {
@Named("PutBlob") @Named("PutBlob")
@PUT @PUT
@Path("{container}/{name}") @Path("{container}/{name}")
@Headers(keys = EXPECT, values = "100-continue")
@ResponseParser(ParseETagHeader.class) @ResponseParser(ParseETagHeader.class)
ListenableFuture<String> putBlob( ListenableFuture<String> putBlob(
@PathParam("container") @ParamValidators(ContainerNameValidator.class) String container, @PathParam("container") @ParamValidators(ContainerNameValidator.class) String container,

View File

@ -97,7 +97,7 @@ public class AzureBlobRequestSignerTest extends BaseAsyncClientTest<AzureBlobAsy
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/container/name HTTP/1.1"); assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/container/name HTTP/1.1");
assertNonPayloadHeadersEqual( assertNonPayloadHeadersEqual(
request, request,
"Authorization: SharedKeyLite identity:ssvK6ZB8GMqRcp1lBpY9vIzbLKL9Goxh7wZ2YhfHNzQ=\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nx-ms-blob-type: BlockBlob\nx-ms-version: 2009-09-19\n"); "Authorization: SharedKeyLite identity:ssvK6ZB8GMqRcp1lBpY9vIzbLKL9Goxh7wZ2YhfHNzQ=\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nExpect: 100-continue\nx-ms-blob-type: BlockBlob\nx-ms-version: 2009-09-19\n");
assertContentHeadersEqual(request, "text/plain", null, null, null, (long) 2l, new byte[] { 0, 2, 4, 8 }, new Date(1000)); assertContentHeadersEqual(request, "text/plain", null, null, null, (long) 2l, new byte[] { 0, 2, 4, 8 }, new Date(1000));
assertEquals(request.getFilters().size(), 0); assertEquals(request.getFilters().size(), 0);