You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered that the content length parsing in the decoder assumes that the value can be read into an integer. It's actually quite easy to pass the bounds of an integer when dealing with bytes since Integer.MAX_VALUE translates to ~2.15gb. I reached this limit in one my own apps when attempting a large download. From some of the other issues ( #90 | #202 ) it looks like large downloads have a number of problems (buffering completely, etc).
Sun Jun 11 20:18:35 CDT 2017 [client-loop] ERROR - should not happen
java.lang.NumberFormatException: For input string: "4262924399"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:583)
at java.lang.Integer.parseInt(Integer.java:615)
at org.httpkit.client.Decoder.readHeaders(Decoder.java:167)
For reference:
JDK 1.8.0_102
lein 2.7.1
[http-kit "2.2.0"]
The text was updated successfully, but these errors were encountered:
RutledgePaulV
changed the title
Content length is assumed to fit within integer but may not
Content length of client response is assumed to fit within integer but may not
Jun 12, 2017
Indeed, might not be worth trying to fix this in isolation given the other known issues with http-kit and large files.
Unless you (or someone else) felt strongly motivated enough to really look at tackling proper large-file support for http-kit, I think this is unlikely to be addressed.
Hello!
I discovered that the content length parsing in the decoder assumes that the value can be read into an integer. It's actually quite easy to pass the bounds of an integer when dealing with bytes since Integer.MAX_VALUE translates to ~2.15gb. I reached this limit in one my own apps when attempting a large download. From some of the other issues ( #90 | #202 ) it looks like large downloads have a number of problems (buffering completely, etc).
For reference:
JDK 1.8.0_102
lein 2.7.1
[http-kit "2.2.0"]
The text was updated successfully, but these errors were encountered: