Skip to content

Commit 7a854b2

Browse files
Change DefaultStorageRpc to noop sometimes.
Specifically for !last 0-length writes.
1 parent 7af5787 commit 7a854b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java

+4
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ public void write(String uploadId, byte[] toWrite, int toWriteOffset, long destO
476476
range.append('*');
477477
}
478478
httpRequest.getHeaders().setContentRange(range.toString());
479+
} else {
480+
if (!last) {
481+
return;
482+
}
479483
}
480484
int code;
481485
String message;

0 commit comments

Comments
 (0)