开发者

POST data getting lost: Content Length = 0

开发者 https://www.devze.com 2023-04-03 18:02 出处:网络
I am randomly getting content-length = 0 errors on my server with the following setup: iPhone POST\'s data synchronously using ASIFormDataRequest to the nginx proxy for UWSGI server.

I am randomly getting content-length = 0 errors on my server with the following setup:

iPhone POST's data synchronously using ASIFormDataRequest to the nginx proxy for UWSGI server.

The error appears randomly maybe once out of 200 requests.

I have searched for this problem but didn't find any clear answer. One of the pos开发者_JAVA技巧t mentioned weird ASIHTTPRequest behavior, bug. But it's not for sure.


Ok, found an answer.

There is a problem in ASIHTTPRequest with a persistant connections as described here: https://github.com/pokeb/asi-http-request/issues/94

The workarround is to use

[request setShouldAttemptPersistentConnection:NO];

This was fixed in a newer version of the ASIHTTPRequest.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号