Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vikasu

macrumors newbie
Original poster
Nov 6, 2007
12
0
When bypassing proxy IP in "Network Settings->Advanced...->Proxies->Bypass Hosts & Domains" field is given as IP-Subnet combination, e.g. 192.168.60/24, then in Java while trying to connect with HttpUrlConnection's connect() method, and then getting response code using HttpUrlConnection's getResponseCode() method it returns response code 407 i.e. Proxy is required. But safari works well for that,

This Java API works well when I directly give IP as 192.168.60.X it works (Java API) well.

I tried System.getProperties().setProperties("http.nonProxyHosts","192.168.60/24") then also it doesn't works.

Please tell me any solution or workaround or any document that proves it can't be done through Java API.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.