仅在 Android 手机的 GPRS/EDGE 环境下 Http 请求超时

发布于 2024-09-03 11:27:06 字数 201 浏览 5 评论 0原文

我正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

带刺的爱情 2024-09-10 11:27:06

不知道为什么,第二天问题就消失了,看来是移动网络的问题。

I do not know why, the problem disappeared the next day, seems a mobile network problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文