On Mon, 2008-10-27 at 15:46 +0100, Cech. Ulrich wrote:
> Hello,
> 
> I have a problem with SSL target over a proxy. I use the example of the
> HttpClient-code (4.0 beta), without an SSL-target, everything work fine.
> But if I change the target to port 443 and https (s. commented line), I
> receive the "HTTP/1.0 407 Proxy Authentication Required" from the proxy (and
> nothing else as a hint).
> NTLM is not the problem, because authentication works with an un-SSL-ed
> target.
> There is no certificate error (and the certificate is installed correctly),
> and the site is displayed well in the normal browser (IE and Firefox
> tested).
> 
> Has someone a hint, where the problem is?
> 
> Thanks in advance,
> Ulrich
> 

Ulrich

I assume you have followed the instructions of the NTLM guide:

http://hc.apache.org/httpcomponents-client/ntlm.html

If that is the case, could you please produce a context / wire log of
the session that exhibits the problem? 

You need to pass the following settings to the JVM to activate the logs

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog 
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG

Oleg

> 
> Here is the main-method from the example-class:
> 
> 
>     public static void main(String[] args) throws Exception {
>         
>         DefaultHttpClient httpclient = new DefaultHttpClient();
> 
>         httpclient.getAuthSchemes().register("NTLM", new
> NTLMSchemeFactory());
>         httpclient.getCredentialsProvider().setCredentials(
>                 new AuthScope(AuthScope.ANY), 
>                 new NTCredentials(user, pw, workstation, domain));
> 
>         //HttpHost targetHost = new HttpHost("www.verisign.com", 443,
> "https"); 
>         HttpHost targetHost = new HttpHost("www.verisign.com", 80, "http");
>         
>         HttpHost proxy = new HttpHost("s-hqw2k3bd", 3128); 
> 
>         httpclient.getParams().setParameter
>             (ConnRoutePNames.DEFAULT_PROXY, proxy);
> 
>         HttpGet httpget = new HttpGet("/");
>         
>         System.out.println("executing request: " +
> httpget.getRequestLine());
>         System.out.println("via proxy: " + proxy);
>         System.out.println("to target: " + targetHost);
>         
>         HttpResponse response = httpclient.execute(targetHost, httpget);
>         HttpEntity entity = response.getEntity();
> 
>         System.out.println("----------------------------------------");
>         System.out.println(response.getStatusLine());
>         if (entity != null) {
>             System.out.println("Response content length: " +
> entity.getContentLength());
>         }
>         if (entity != null) {
>             entity.consumeContent();
>         }
>     }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to