Storage: Content-Range header is formatted with default locale #2972
Labels
api: storage
Issues related to the googleapis/java-storage API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
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
ps
)Any additional information below
The range header is generated formatting the numbers using the default locale. So for
ps
we getbytes ۰-۹۲۱۷۳۷۵/۹۲۱۷۳۷۶
when it should bebytes 0-9217376/9217376
See 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
%s
instead of%d
perhaps?The text was updated successfully, but these errors were encountered: