I am trying to work with a java.net.HttpURLConnection object on a http:// url. The JVM runs behind a firewall. I do get a response code of 200 (OK), but only 'sometimes'. Most of the times I get a "HTTP/1.1 407 Proxy Authorization Required" message. Also, if I use a https:// url, I get the same 407 message. Can anyone explain this inconsistency? Please help. -Nikhil
posted 13 years ago
In order to do proxy authentication you must send the Proxy username and password base64 encoded within the Proxy-Authorization header.