> @@ -70,7 +70,7 @@ public String execute(String container, Blob blob) {
>        while (offset < length) {
>           blockCount++;
>           long chunkSize = MAX_BLOCK_SIZE;
> -         if (blockCount >= totalBlocks) {
> +         if (length - offset < MAX_BLOCK_SIZE) {

Can we add a test case that

* fails with the old code (i.e. tries to send a block of length 0 - from what I 
understand, that was the problem?)
* succeeds after the change?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/99/files#r5603450

Reply via email to