Environment details
OS type and version: Mac OS X/15.3.1/aarch64
3. Java version: Oracle Corporation/OpenJDK 64-Bit Server VM/23/23+37-2369
4. version(s): 2.48.2
Steps to reproduce
- Run Java with locale that uses non-english number characters (e.g.
ps)
- Execute a resumable upload
Any additional information below
The range header is generated formatting the numbers using the default locale. So for ps we get
bytes ۰-۹۲۱۷۳۷۵/۹۲۱۷۳۷۶ when it should be bytes 0-9217376/9217376
See examples of the issue
|
return String.format("bytes %d-%d/*", spec.beginOffset(), spec.endOffsetInclusive()); |
|
return String.format("bytes %d-%d/%d", spec.beginOffset(), spec.endOffsetInclusive(), size); |
It seems it could be resolved by using %s instead of %d perhaps?
Environment details
OS type and version:
Mac OS X/15.3.1/aarch643. Java version:
Oracle Corporation/OpenJDK 64-Bit Server VM/23/23+37-23694. version(s):
2.48.2Steps to reproduce
ps)Any additional information below
The range header is generated formatting the numbers using the default locale. So for
pswe getbytes ۰-۹۲۱۷۳۷۵/۹۲۱۷۳۷۶when it should bebytes 0-9217376/9217376See examples of the issue
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/HttpContentRange.java
Line 94 in 68e1cf2
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/HttpContentRange.java
Line 148 in 68e1cf2
It seems it could be resolved by using
%sinstead of%dperhaps?