The log msg is attached. The program waits for a while after "Proxy-Connection: Keep-Alive" line and throws a 504 error (connection time out).
lili Thanks. -----Original Message----- From: Michael Becke [mailto:[EMAIL PROTECTED] Sent: Sunday, May 09, 2004 6:21 PM To: Commons HttpClient Project Subject: Re: proxy authentication Hi lili, It sounds like an internal problem with the proxy server, but it's difficult to tell. If you post a wire log <http://jakarta.apache.org/commons/httpclient/logging.html> we should be able to get a better idea of what's happening. Mike On May 9, 2004, at 7:30 PM, Lili Liu wrote: > > My proxy authentication code (basic host) works well unless I ran it > on a > special IP address. > The internet traffic on this special IP has to go through a proxy > server > (The same proxy I used in the code). > In another word, if I access internet using a browser, I have to > specify a > valid proxy server. Otherwise, there is no internet access. > > My proxy authentication code is as follows: > > client.getState().setAuthenticationPreemptive(true); > client.getHostConfiguration().setProxy(proxyhost, > 80); > client.getState().setProxyCredentials(null, > proxyhost, > new > UsernamePasswordCredentials(proxyusername, proxypwd)); > > And I got the follwing error msg: > > May 9, 2004 4:13:01 PM org.apache.commons.httpclient.HttpMethodBase > readResponseBody > WARNING: Response content length is not known > status is .....504 > Proxy Error ( Connection timed out ) > Via: 1.1 PROXY02 > > Pragma: no-cache > > Cache-Control: no-cache > > Content-Type: text/html > > If I ran the program not from the special IP address, I got following > success msg: > > May 9, 2004 4:07:01 PM org.apache.commons.httpclient.HttpMethodBase > processAuthenticationResponse > Via: 1.1 PROXY02 > > Proxy-Connection: Keep-Alive > > Content-Length: 4431 > > Content-Type: text/html > > Server: Microsoft-IIS/5.1 > > Date: Sun, 09 May 2004 23:07:01 GMT > > WWW-Authenticate: Basic realm="INXIGHT" > > ---------------Basic realm="INXIGHT" > Trying basic authetication > OK > 200 > > > Any help is appreciated! > lili > > > --------------------------------------------------------------------- > 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]