From 0ba6652fae60fd9dd74bc435eb121b9566d3029e Mon Sep 17 00:00:00 2001 From: Marco Ziccardi Date: Fri, 2 Oct 2015 22:32:49 +0200 Subject: [PATCH] Make resumable upload request use PUT instead of POST --- .../src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java b/gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java index f8949381b175..d64841cd5252 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java @@ -451,7 +451,7 @@ public void write(String uploadId, byte[] toWrite, int toWriteOffset, StorageObj long destOffset, int length, boolean last) throws StorageException { try { GenericUrl url = new GenericUrl(uploadId); - HttpRequest httpRequest = storage.getRequestFactory().buildPostRequest(url, + HttpRequest httpRequest = storage.getRequestFactory().buildPutRequest(url, new ByteArrayContent(null, toWrite, toWriteOffset, length)); long limit = destOffset + length; StringBuilder range = new StringBuilder("bytes ");