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.
content-length
1 parent 7f49443 commit fa11d14Copy full SHA for fa11d14
src/main/java/com/box/sdk/BinaryBodyUtils.java
@@ -100,10 +100,12 @@ private static long getContentLengthFromAPIResponse(BoxAPIResponse response) {
100
}
101
102
if (headerValue != null) {
103
+ String trimmedHeaderValue = headerValue.trim();
104
try {
- length = Long.parseLong(headerValue);
105
+ length = Long.parseLong(trimmedHeaderValue);
106
} catch (NumberFormatException e) {
- throw new RuntimeException("Invalid content length: " + headerValue);
107
+ throw new RuntimeException("Invalid content length: " + trimmedHeaderValue + " with: "
108
+ + trimmedHeaderValue.length() + " number of characters.");
109
110
111
0 commit comments