Java, does proxy setting affect received data?

不想你离开。 提交于 2019-12-11 14:34:34

问题


I'd asked a question about How to bypass Web Proxy setting?

However, i didn't get my desired response. Therefore, I want to change my question.

My question is, when i set proxy for surfing Internet (this is set automatically by mobile 3g operator), I can't get correct data. Correct data is in XML format while I get it wrapped in HTML code. I have no idea this HTML comes from where! "Server returns XML data not HTML code", as mentioned by server side programmer.

I really confused what is happening here?

  • Application works fine when its connected to Internet through Wifi (I think its working because proxy doesn't apply to it)
  • Application doesn't work just with some limited types of devices (for example it doesn't work with Xperia neo and SG2 while application works in SGS). All of this devices are connecting to same mobile operator.

What is you idea? Did you face with this problem before? Any suggestion would be appreciated.


回答1:


There is a possibility that the request is being manipulated by the proxy which is injecting ads or something similar. Could you perhaps capture the response and see what has changed?

Something you could try is to make the request of a secure connection, that way the proxy should not be able to modify the content of the response.



来源:https://stackoverflow.com/questions/11359233/java-does-proxy-setting-affect-received-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!