[CIO] java.io.EOFException when parsing response to multi-part form data
See original GitHub issueKtor Version and Engine Used (client or server and name)
1.2.6 and 1.3.0-beta-2, ktor-client-cio
Describe the bug
About 30% of the time, when sending a multi-part form data request to Discord’s servers, the CIO client fails to parse the response sent by the server and ceases to function. The error thrown is java.io.EOFException: Failed to parse HTTP response: unexpected EOF
, which causes a java.io.IOException: Connection reset by peer
, which essentially softlocks the HttpClient. This does not happen with ktor-client-okhttp
, only CIO. The trace is here: https://hastebin.com/cikecature.txt
To Reproduce I can’t provide an easy method of reproduction, as I’m not sure what part of the response is causing this behavior, and it could be specific to this scenario. If it helps, I can provide a packet capture from Wireshark.
Expected behavior I expected the client to correctly parse the response.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Hi, @serebit. I’ve just merged the fix, so it will be included in
1.3.0
.Yep, just updated to
1.3.0-rc
and hammered my test application with attachments, seems like that did it! Much appreciated.