0

我使用 Ion 从服务器获取 Json

Ion.with(getActivity()).load(url).setLogging(getClass().getSimpleName(),Log.VERBOSE).asJsonObject().setCallback(this);

如果我使用wifi,我可以正确获取 JSON。如果我切换到 GPRS (HSDPA),我无法获得 JSON。错误信息无法解析 Json。WIFI 和 HSDPA 使用不同的互联网服务提供商。

logcat 显示存在内部服务器错误。但是,让我感到困惑的是,请求永远不会到达我的服务器。意味着电信提供商中的代理阻止请求并给出 HTTP 500 错误

02-24 22:36:33.171: (0 ms) http://www.detik.com: preparing request
02-24 22:36:33.211: (0 ms) http://www.detik.com: Executing request.
02-24 22:36:33.651: (449 ms) http://www.detik.com: Connecting socket
02-24 22:36:33.651: (449 ms) http://www.detik.com: Using proxy: 202.152.240.50:8080
02-24 22:36:33.701: (500 ms) http://www.detik.com: socket connected
02-24 22:36:33.711: (507 ms) http://www.detik.com: 
02-24 22:36:33.711: GET / HTTP/1.1
02-24 22:36:33.711: Host: www.detik.com
02-24 22:36:33.711: User-Agent: Dalvik/1.6.0 (Linux; U; Android 4.3; C5302 Build/12.1.A.1.207)
02-24 22:36:33.711: Accept-Encoding: gzip, deflate
02-24 22:36:33.711: Connection: keep-alive
02-24 22:36:33.711: Accept: */*
02-24 22:36:33.711: 
02-24 22:36:33.711: (508 ms) http://www.detik.com: request completed
02-24 22:36:33.812: (600 ms) http://www.detik.com: Received headers:
02-24 22:36:33.812: HTTP/1.1 500 Internal Server Error
02-24 22:36:33.812: Cache-Control: no-cache
02-24 22:36:33.812: Pragma: no-cache
02-24 22:36:33.812: Content-Type: text/html; charset=utf-8
02-24 22:36:33.812: X-Cnection: close
02-24 22:36:33.812: Content-Length: 685
02-24 22:36:33.812: 
02-24 22:36:33.812: (606 ms) http://www.detik.com: Response is not cacheable
02-24 22:36:33.812: (607 ms) http://www.detik.com: Final (post cache resp02-24 22:36:33.822: D/(15396): <HTML><HEAD>
02-24 22:36:33.822: D/(15396): <TITLE>Appliance Error</TITLE>
02-24 22:36:33.822: D/(15396): </HEAD>
02-24 22:36:33.822: D/(15396): <BODY>
02-24 22:36:33.822: D/(15396): <FONT face="Helvetica">
02-24 22:36:33.822: D/(15396): <big><strong></strong></big><BR>
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): <blockquote>
02-24 22:36:33.822: D/(15396): <TABLE border=0 cellPadding=1 width="80%">
02-24 22:36:33.822: D/(15396): <TR><TD>
02-24 22:36:33.822: D/(15396): <FONT face="Helvetica">
02-24 22:36:33.822: D/(15396): <big>Appliance Error (internal_error)</big>
02-24 22:36:33.822: D/(15396): <BR>
02-24 22:36:33.822: D/(15396): <BR>
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): </TD></TR>
02-24 22:36:33.822: D/(15396): <TR><TD>
02-24 22:36:33.822: D/(15396): <FONT face="Helvetica">
02-24 22:36:33.822: D/(15396): An unrecoverable error was encountered: ""
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): </TD></TR>
02-24 22:36:33.822: D/(15396): <TR><TD>
02-24 22:36:33.822: D/(15396): <FONT face="Helvetica">
02-24 22:36:33.822: D/(15396): This problem is unexpected. Please use the contact information below to obtain assistance.
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): </TD></TR>
02-24 22:36:33.822: D/(15396): <TR><TD>
02-24 22:36:33.822: D/(15396): <FONT face="Helvetica" SIZE=2>
02-24 22:36:33.822: D/(15396): <BR>
02-24 22:36:33.822: D/(15396): For assistance, contact your network support team.
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): </TD></TR>
02-24 22:36:33.822: D/(15396): </TABLE>
02-24 22:36:33.822: D/(15396): </blockquote>
02-24 22:36:33.822: D/(15396): </FONT>
02-24 22:36:33.822: D/(15396): </BODY></HTML>
4

0 回答 0