Skip to content

Commit 69e50ce

Browse files
authored
Fix content range header in chunked upload (force US locale)
1 parent 9b7c7e5 commit 69e50ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cloudinary-core/src/main/java/com/cloudinary/Uploader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.io.*;
99
import java.util.Arrays;
1010
import java.util.HashMap;
11+
import java.util.Locale;
1112
import java.util.Map;
1213

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

0 commit comments

Comments
 (0)