We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f49443 commit c30b069Copy full SHA for c30b069
src/main/java/com/box/sdk/BinaryBodyUtils.java
@@ -101,9 +101,10 @@ private static long getContentLengthFromAPIResponse(BoxAPIResponse response) {
101
102
if (headerValue != null) {
103
try {
104
- length = Long.parseLong(headerValue);
+ length = Long.parseLong(headerValue.trim());
105
} catch (NumberFormatException e) {
106
- throw new RuntimeException("Invalid content length: " + headerValue);
+ throw new RuntimeException("Invalid content length: " + headerValue.trim() + "with: "
107
+ + headerValue.trim().length() + "number of characters.");
108
}
109
110
0 commit comments