-
Notifications
You must be signed in to change notification settings - Fork 84
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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
java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/HttpContentRange.java
Line 94 in 68e1cf2
return String.format("bytes %d-%d/*", spec.beginOffset(), spec.endOffsetInclusive()); java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/HttpContentRange.java
Line 148 in 68e1cf2
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?
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/java-storage API.Issues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.