Ion can't be used if using GPRS connection

2019-03-05 23:18发布

问题:

I use Ion to get Json from server

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

If i use wifi i can get JSON correctly. I can't get JSON, if i switch to GPRS (HSDPA). The error message is unable to parse Json. WIFI and HSDPA use different internet service provider.

The logcat shows there is internal server error. But, what make me confuse is, the request never reach my server. Meaning the proxy in telecommunication provider block the request and give HTTP 500 error

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>
标签: android ion