Skip to content

Commit

Permalink
Fix content range header in chunked upload (force US locale)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzanj authored Jul 10, 2018
1 parent 9b7c7e5 commit 69e50ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloudinary-core/src/main/java/com/cloudinary/Uploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.io.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

@SuppressWarnings({"rawtypes", "unchecked"})
Expand Down Expand Up @@ -194,7 +195,7 @@ private Map uploadLargeParts(InputStream input, Map options, int bufferSize, lon
System.arraycopy(buffer, 0, finalBuffer, 0, currentBufferSize);
buffer = finalBuffer;
}
String range = String.format("bytes %d-%d/%d", currentLoc, currentLoc + currentBufferSize - 1, length);
String range = String.format(Locale.US, "bytes %d-%d/%d", currentLoc, currentLoc + currentBufferSize - 1, length);
extraHeaders.put("Content-Range", range);
Map sentParams = new HashMap();
sentParams.putAll(params);
Expand Down

0 comments on commit 69e50ce

Please sign in to comment.