-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network connection lost reported by iOS clients. #487
Comments
Long story short, 1) if the body of an HTTP request from an iOS client to a Kitura-based server app has a semi-large amount of data (e.g. ~600kb), 2) and the body of that HTTP request is not consumed (i.e. read) at all on the Kitura-based server, 3) and a response is sent to the iOS client, 4) then a network connect lost or a network timed out error is reported by the iOS application. Now if the body of the http request is consumed and, only after that, a response is sent to the iOS app, then no errors are reported on the iOS side. I can now reproduce this easily and have code to demonstrate this issue if needed. The question now seems to be: What changes are needed in Kitura so that a response can be sent to a client without having to consume the body of the http request? Not being able to send a response without having to consume the body of the request is having a negative impact on the MCA Server SDK and also on any Kitura-based application that needs to send a response without having to consume the HTTP request body (~ >600kb). |
I can't reproduce the problem. I sent an almost 2MB picture with wrong token, and got an error from the server, but no connection lost/network timeout. Could you please provide more information how to reproduce this? |
@irar2 - The easiest way to reproduce this problem is to clone the following branch: Once you have reproduced the problem, you can also take the following steps. Go to the following file on the server side:
Now, try to upload an image again using the iOS app. Now that you are consuming the request body the error should not occur. In other words, the |
…end a response while request's body hasn't been read
@rolivieri Please validate |
@irar2 Tested the fix and it is working! Thanks for your help. |
Description of the problem will be added below.
The text was updated successfully, but these errors were encountered: