On Mon, 2011-01-31 at 07:17 -0800, Pifagor wrote:
> Oleg
> 
> Your advice needed:
> 
> When I import browser proxy settings into HttpClient in applet using:
> 
>         DefaultHttpClient hc = new DefaultHttpClient();
>         ProxySelectorRoutePlanner routePlanner = new
> ProxySelectorRoutePlanner(
>             hc.getConnectionManager().getSchemeRegistry(),
>             ProxySelector.getDefault()
>         );
>         hc.setRoutePlanner(routePlanner);
>         hc.getProxyAuthenticationHandler();
>         ...
>         HttpResponse resp = hc.execute(m);
> 
> I get the following error:
> 
>         "Proxy Authentication Required"
> 
> I tried both basic and digest authentication with Squid. When applet
> initializes it shows a Java popup window
> 
>          "Authentication Required"
>          "Enter login details to access Squid proxy proxy-caching webserver
> at ..."
> 
> and username and password fields and accepts them which means, I assume,
> that proxy authenticates applet. My .java.policy is here:
> 
> grant {
>   permission java.io.FilePermission "<<ALL FILES>>", "read";
>   permission java.net.NetPermission "getProxySelector";
>   permission java.net.SocketPermission "*","connect,resolve";
> };
> 
> Applet is signed. What can cause this error?

I know next to nothing about applets. I may take a look at a wire /
context log of the session, if you produce one, but I will not be able
to do much about applet specific stuff, if it turns out that the
ProxySelectorRoutePlanner did not pick up proxy settings correctly.

Oleg  



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to