仅在 Android 手机的 GPRS/EDGE 环境下 Http 请求超时
我正在开发一个 Android 应用程序,它将连接到互联网以加载一些数据。
我用WIFI测试了一下,效果很好。但是当我切换到使用EDGE/GPRS时,它总是超时,我为httpclient设置了一个很大的超时参数,但它没有帮助。
可能是服务器端没有返回Content-Length头造成的。但我无法更改服务器代码。
以前有人经历过这种情况吗?
I am developing an Android app, it will connect to the internet to load some data back.
I tested it with WIFI and it works well. But when I switched to use EDGE/GPRS, it always timed out, I have set a big timeout parameter for httpclient, but it did not help.
It may caused by the server side that it did not return back a Content-Length header. But I can not change the server code.
Anyone have experienced this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道为什么,第二天问题就消失了,看来是移动网络的问题。
I do not know why, the problem disappeared the next day, seems a mobile network problem.