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>