_kCFStreamErrorCodeKey=-2102 only with wifi of some ISPs

五迷三道 提交于 2019-11-29 03:37:35
Husein Behboodi Rad

I finally solved my problem by adding Content-Length to the request.

When we do not add the Content-Length header to the request, NSURLConnection send it as a chunked request and it seems such problems is common with chunked requests.

Actually I do not found the root cause of the problem with this chunked request (I searched many subjects in web, reads many articles, talked with several other programmers but do not find any root cause, so I decide to use the other solution ) but I shared this solution for someone that can use non-chunked request in their business. As I know most usages of chunked requests are in real time streaming that we do not know the Content-Length so if you can add Content-Length, I suggest to use it for avoiding chunked problems like this.

If you are running an enterprise version of application, check with your server admin to see if your Cert is up to date and compatible with your firewall server. Mine isn't.

I've just solved the issue ...

I hope this could help you if you don't find the solution on the Internet because this is a personal experience.

I've had configured all HTTP headers, all parameters and checked all programming on Objective-C, but I had forgotten to check server side, my architecture included 3 components: The app, REST server and a File server, file server was having networking issues with the domain so that's the reason because app was not working, after solving the issue it worked perfectly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!