hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Harry <krisha...@gmail.com>
Subject Re: ntlm problem
Date Fri, 23 Sep 2005 11:51:45 GMT
Thanks Roland, for your help,
Yes, you are correct.. email editor is adding the <> part. Getting
what you have expected.
I have checked the proxy settings, everything (i.e proxy host, proxy
port and domain) specified is correct. Any idea why am getting the
following error with ntlm authentication...

httpclient.wire.header - >> "CONNECT uat.dcconnect.dc.com:443 HTTP/1.1"
httpclient.wire.header - >> "User-Agent: Jakarta
Commons-HttpClient/3.0-rc3[\r][\n]"
httpclient.wire.header - >> "Host: uat.dcconnect.dc.com[\r][\n]"
httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]"
httpclient.wire.header - >> "[\r][\n]"
httpclient.wire.header - << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
httpclient.wire.header - << "Date: Thu, 23 Sep 2005 05:34:01 GMT[\r][\n]"
httpclient.wire.header - << "Server: Apache/2.0.46[\r][\n]"
httpclient.wire.header - << "Allow: GET,HEAD,POST,OPTIONS,TRACE[\r][\n]"
httpclient.wire.header - << "Content-Length: 235[\r][\n]"
httpclient.wire.header - << "Content-Type: text/html;
charset=iso-8859-1[\r][\n]"
httpclient.wire.content - << "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML
2.0//EN">[\n]"
httpclient.wire.content - << "<html><head>[\n]"
httpclient.wire.content - << "<title>405 Method Not Allowed</title>[\n]"
httpclient.wire.content - << "</head><body>[\n]"
httpclient.wire.content - << "<h1>Method Not Allowed</h1>[\n]"
httpclient.wire.content - << "<p>The requested method CONNECT is not
allowed for the URL /index.html.</p>[\n]"
httpclient.wire.content - << "</body></html>[\n]"



On 9/22/05, Roland Weber <ROLWEBER@de.ibm.com> wrote:
> Hi Kris,
>
> sorry, I don't have the time to dig into your code.
> This here looks fishy, but I don't know whether
> this is real output or something that was screwed
> up by a mail editor:
>
> >  httpclient.wire.header - >> "CONNECT
> > uat.dcconnect.dc.com:443<http://uat.dcconnect.dc.com:443>HTTP/1.1"
> > httpclient.wire.header - >> "Host: uat.dcconnect.dc.com[\r][\n]"
>
> where does the URL part between < > come from?
> It should read like
>
> CONNECT / HTTP/1.1[\r][\n]
> Host: uat.dcconnect.dc.com[\r][\n]
>
> > > Protocol authhttps = new Protocol("https", new
> > > AuthSSLProtocolSocketFactory(), 443);
> > > Protocol.registerProtocol("https", authhttps);
> > > client.getHostConfiguration().setProxy(ProxyHost,ProxyPort);
> > > client.getState().setCredentials(AuthScope.ANY,new
> > > NTCredentials(ProxyUser,ProxyUserPwd,"uat.dcconnect.dc.com",myDomain));
>
> What's this strange thing in the NTCredentials?
>
> > > hostconfig.setHost(hostname, 443, authhttps);
>
> make sure 'hostname' is a plain name like uat.dcconnect.dc.com
> and not http://whatever:443
>
> Good luck,
> Roland
>
> > >
> > > wire log
> > > --------
> > > httpclient.wire.header - >> "CONNECT
> > > uat.dcconnect.dc.com:443 <http://uat.dcconnect.dc.com:443><
> > > http://uat.dcconnect.dc.com:443>HTTP/1.1"
> > > httpclient.wire.header - >> "User-Agent: Jakarta
> > > Commons-HttpClient/3.0-rc3[\r][\n]"
> > > httpclient.wire.header - >> "Host: uat.dcconnect.dc.com[\r][\n]"
> > > httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]"
> > > httpclient.wire.header - >> "[\r][\n]"
> > > httpclient.wire.header - << "HTTP/1.1 501 Method CONNECT is not
> defined in
> > > RFC 2068 and is not supported by the Servlet API [\r][\n]"
> > > httpclient.wire.header - << "Content-Type:
> > > text/html;charset=ISO-8859-1[\r][\n]"
> > > httpclient.wire.header - << "Connection: close[\r][\n]"
> > > httpclient.wire.header - << "Content-Language: en-GB[\r][\n]"
> > > httpclient.wire.header - << "Date: Thu, 22 Sep 2005 07:52:53
> GMT[\r][\n]"
> > > httpclient.wire.header - << "Server: Apache Tomcat/4.1.24 (HTTP/1.1
> > > Connector)[\r][\n]"
> > > httpclient.wire.content - << "<html><head><title>Apache
Tomcat/4.1.24
> -
> > > Error report</title><STYLE><!--H1{font-family :
> > sans-serif,
> > Arial,Tahoma;color : white;background-color : #0086b2;}
> > H3{font-
> > family : sans-serif,Arial,Tahoma;color : white;background-color :
> >
> > #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color :
> >
> > black;background-color : white;} B{color : white;background-color :
>
> > > #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>HTTP
> Status
> > > 501
> > > - Method CONNECT is not defined in RFC 2068 and is not supported by
> the
> > > Servlet API </h1><HR size="1" noshade><p><b>type</b>
Status
> > > report</p><p><b>message</b> <u>Method CONNECT
is not defined in RFC
> 2068
> > > and
> > > is not supported by the Servlet API </u></p><p><b>description</b>
> <u>The
> > > server does not support the functionality needed to fulfill this
> request
> > > (Method CONNECT is not defined in RFC 2068 and is not supported by the
> > > Servlet API ).</u></p><HR size="1" noshade><h3>Apache
> > > Tomcat/4.1.24</h3></body></html>"
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> httpclient-user-help@jakarta.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message