Hi, I posted below a part of the log. As it is too large I tried to put the important parts of it -- wish I am really doing this :) -- The log corresponds to the case where follow redired is set to true. Here is the log:
. . . 188 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.open() 188 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Open connection to proxy.sadac.com:80 219 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.execute(HttpState, HttpConnection) 219 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequest(HttpState, HttpConnection) 219 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection) 234 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String) 234 [main] DEBUG httpclient.wire.header - >> "GET http://www.google.com/ HTTP/1.1[\r][\n]" . . . 234 [main] DEBUG httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]" . . . 250 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 407 Proxy Authentication Required[\r][\n]" . . . 250 [main] DEBUG httpclient.wire.header - << "Proxy-Authenticate: NTLM[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Cache-Control: no-cache[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Pragma: no-cache[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Content-Type: text/html; charset=utf-8[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Proxy-Connection: close[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Set-Cookie: BCSI-CA120A2033=2; Path=/[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Connection: close[\r][\n]" 250 [main] DEBUG httpclient.wire.header - << "Content-Length: 838[\r][\n]" . . . 281 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.canResponseHaveBody(int) 281 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Authorization required 281 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - enter HttpMethodBase.processAuthenticationResponse(HttpState, HttpConnection) 281 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor - Supported authentication schemes in the order of preference: [ntlm, digest, basic] 281 [main] INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor - ntlm authentication scheme selected 281 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor - Using authentication scheme: ntlm 281 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor - Authorization challenge processed 281 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Proxy authentication scope: NTLM <any realm>@proxy.sadac.com:80 297 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.getProxyCredentials(AuthScope) 297 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Retry authentication 297 [main] DEBUG httpclient.wire.content - << "<HTML><HEAD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TITLE>Access Denied</TITLE>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</HEAD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<BODY>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 297 [main] DEBUG httpclient.wire.content - << "<big><strong></strong></big><BR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 97 [main] DEBUG httpclient.wire.content - << "<blockquote>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TABLE border=0 cellPadding=1 width="80%">[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 297 [main] DEBUG httpclient.wire.content - << "<big>Access Denied (authentication_failed)</big>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 297 [main] DEBUG httpclient.wire.content - << "Your credentials could not be authenticated: "Credentials required.". You will not be permitted access until your credentials can be verified.[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 297 [main] DEBUG httpclient.wire.content - << "This is typically caused by an incorrect username and/or password, but could also be caused by network problems.[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica" SIZE=2>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "<big><strong>For assistance, contact your network support team.</strong></big>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</TABLE>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</blockquote>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 297 [main] DEBUG httpclient.wire.content - << "</BODY></HTML>[\n]" 297 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Should close connection in response to directive: close 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.close() 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection() 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Connection is locked. Call to releaseConnection() ignored. 297 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Authenticating with NTLM <any realm>@proxy.sadac.com:80 297 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.getProxyCredentials(AuthScope) 297 [main] DEBUG org.apache.commons.httpclient.auth.NTLMScheme - enter NTLMScheme.authenticate(Credentials, HttpMethod) 297 [main] DEBUG org.apache.commons.httpclient.params.HttpMethodParams - Credential charset not configured, using HTTP element charset 297 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - HttpMethodBase.addRequestHeader(Header) 297 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1 to process request . . . 297 [main] DEBUG httpclient.wire.header - >> "Proxy-Authorization: NTLM TlRMTVNTUAABAAAABlIAAA4ADgAuAAAADgAOACAAAABDUkdNWjAyUk5ELTAwM0NPUlAuU0FN QkEuQ09N[\r][\n]" 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 297 [main] DEBUG httpclient.wire.header - >> "Host: www.google.com[\r][\n]" 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 297 [main] DEBUG httpclient.wire.header - >> "Cookie: $Version=0; BCSI-CS0A0A2027=2; $Path=/[\r][\n]" 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 297 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 297 [main] DEBUG httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]" . . . 313 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 407 Proxy Authentication Required[\r][\n]" . . . 313 [main] DEBUG httpclient.wire.header - << "Proxy-Authenticate: NTLM TlRMTVNTUAACAAAABAAEADgAAAAGAoECgHEOwWG+heoAAAAAAAAAAJIAkgA8AAAABQLODgAA AA9DT1JQAgAIAEMATwBSAFAAAQAOAEMARABDAFMAVABHADIABAAcAGMAbwByAHAALgBzAGEA bQBiAGEALgBjAG8AbQADACwAYwBkAGMAcwB0AGcAMgAuAGMAbwByAHAALgBzAGEAbQBiAGEA LgBjAG8AbQAFABwAYwBvAHIAcAAuAHMAYQBtAGIAYQAuAGMAbwBtAAAAAAA=[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Cache-Control: no-cache[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Pragma: no-cache[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Content-Type: text/html; charset=utf-8[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Proxy-Connection: Keep-Alive[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Set-Cookie: BCSI-CS0A0A2027=2; Path=/[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Connection: Keep-Alive[\r][\n]" 313 [main] DEBUG httpclient.wire.header - << "Content-Length: 858[\r][\n]" . . . 313 [main] DEBUG httpclient.wire.content - << "<HTML><HEAD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TITLE>Access Denied</TITLE>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</HEAD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<BODY>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 313 [main] DEBUG httpclient.wire.content - << "<big><strong></strong></big><BR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<blockquote>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TABLE border=0 cellPadding=1 width="80%">[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 313 [main] DEBUG httpclient.wire.content - << "<big>Access Denied (authentication_failed)</big>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 313 [main] DEBUG httpclient.wire.content - << "Your credentials could not be authenticated: "Another round of authentication required.". You will not be permitted access until your credentials can be verified.[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica">[\n]" 313 [main] DEBUG httpclient.wire.content - << "This is typically caused by an incorrect username and/or password, but could also be caused by network problems.[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<TR><TD>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<FONT face="Helvetica" SIZE=2>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<BR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "<big><strong>For assistance, contact your network support team.</strong></big>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</TD></TR>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</TABLE>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</blockquote>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</FONT>[\n]" 313 [main] DEBUG httpclient.wire.content - << "</BODY></HTML>[\n]" 313 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Should NOT close connection in response to directive: Keep-Alive 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.isResponseAvailable() 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection() 313 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Connection is locked. Call to releaseConnection() ignored. 313 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Authenticating with NTLM <any realm>@proxy.sadac.com:80 313 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.getProxyCredentials(AuthScope) .313 [main] DEBUG org.apache.commons.httpclient.auth.NTLMScheme - enter NTLMScheme.authenticate(Credentials, HttpMethod) 313 [main] DEBUG org.apache.commons.httpclient.params.HttpMethodParams - Credential charset not configured, using HTTP element charset 531 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - HttpMethodBase.addRequestHeader(Header) 531 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1 to process request 547 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.execute(HttpState, HttpConnection) 547 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequest(HttpState, HttpConnection) 547 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection) 547 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String) 547 [main] DEBUG httpclient.wire.header - >> "GET http://www.google.com/ HTTP/1.1[\r][\n]" . . . 547 [main] DEBUG httpclient.wire.header - >> "Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAGIAAAAAAAAAegAAAA4ADgBAAAAABgAGAE4AAAAOAA4AVAAAAAAA AAB6AAAABlIAAENPUlAuU0FNQkEuQ09NQzExMTYwQ1JHTVowMlJORC0wMDPYnBxxaNd5wvax O5TbT6MZS2SJrtICZ78=[\r][\n]" 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 547 [main] DEBUG httpclient.wire.header - >> "Host: www.google.com[\r][\n]" 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 547 [main] DEBUG httpclient.wire.header - >> "Cookie: $Version=0; BCSI-CS0A0A2027=2; $Path=/[\r][\n]" 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 547 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 547 [main] DEBUG httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]" . . . 750 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 302 Found[\r][\n]" 750 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) 750 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.getResponseInputStream() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HeaderParser.parseHeaders(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 750 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 750 [main] DEBUG httpclient.wire.header - << "Location: http://www.google.com.sa/[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Cache-Control: private[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Content-Type: text/html[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Server: gws[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Date: Wed, 09 Jan 2008 07:18:39 GMT[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Content-length: 222[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Proxy-Connection: Keep-Alive[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Connection: Keep-Alive[\r][\n]" 750 [main] DEBUG httpclient.wire.header - << "Set-Cookie: PREF=ID=9ac198e2f37bfc36:TM=1199863119:LM=1199863119:S=sfaZ2WPstd9nG5O2; expires=Fri, 08-Jan-2010 07:18:39 GMT; path=/; domain=.google.com[\r][\n]" 750 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.processResponseHeaders(HttpState, HttpConnection) 750 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.parse(String, port, path, boolean, String) 750 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.parse(String, port, path, boolean, Header) 766 [main] DEBUG org.apache.commons.httpclient.Cookie - enter Cookie(String, String, String, String, Date, boolean) 766 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter RFC2109Spec.validate(String, int, String, boolean, Cookie) 766 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.validate(String, port, path, boolean, Cookie) 766 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.addCookie(Cookie) 766 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter RFC2109Spec.formatCookie(Cookie) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Cookie accepted: "$Version=0; PREF=ID=9ac198e2f37bfc36:TM=1199863119:LM=1199863119:S=sfaZ2WPstd9nG5O2; $Domain=.google.com; $Path=/" 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseBody(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseBody(HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.getResponseInputStream() 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.canResponseHaveBody(int) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Redirect required 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Redirect requested to location 'http://www.google.com.sa/' 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Redirecting from 'http://www.google.com:80/' to 'http://www.google.com.sa/ 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Execute redirect 1 of 100 766 [main] DEBUG httpclient.wire.content - << "<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">[\n]" 766 [main] DEBUG httpclient.wire.content - << "<TITLE>302 Moved</TITLE></HEAD><BODY>[\n]" 766 [main] DEBUG httpclient.wire.content - << "<H1>302 Moved</H1>[\n]" 766 [main] DEBUG httpclient.wire.content - << "The document has moved[\n]" 766 [main] DEBUG httpclient.wire.content - << "<A HREF="http://www.google.com.sa/">here</A>.[\r][\n]" 766 [main] DEBUG httpclient.wire.content - << "</BODY></HTML>[\r][\n]" 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Should NOT close connection in response to directive: Keep-Alive 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.isResponseAvailable() 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection() 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Connection is locked. Call to releaseConnection() ignored. 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection() 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Releasing connection back to connection manager. 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.close() 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Attempt number 1 to process request 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.open() 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Open connection to proxy.sadac.com:80 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.execute(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequest(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String) 766 [main] DEBUG httpclient.wire.header - >> "GET http://www.google.com.sa/ HTTP/1.1[\r][\n]" 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 766 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Adding Host request header 766 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection) 766 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.getCookies() 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.match(String, int, String, boolean, Cookie[]) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.match(String, int, String, boolean, Cookie 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.match(String, int, String, boolean, Cookie 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.addProxyConnectionHeader(HttpState, HttpConnection) 781 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc3[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 781 [main] DEBUG httpclient.wire.header - >> "Host: www.google.com.sa[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 781 [main] DEBUG httpclient.wire.header - >> "Proxy-Connection: Keep-Alive[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.print(String) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.writeLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[]) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.write(byte[], int, int) 781 [main] DEBUG httpclient.wire.header - >> "[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.flushRequestOutputStream() 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponse(HttpState, HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readStatusLine(HttpState, HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.readLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 407 Proxy Authentication Required[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.getResponseInputStream() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HeaderParser.parseHeaders(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 781 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 781 [main] DEBUG httpclient.wire.header - << "Proxy-Authenticate: NTLM[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Cache-Control: no-cache[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Pragma: no-cache[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Content-Type: text/html; charset=utf-8[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Proxy-Connection: close[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Set-Cookie: BCSI-CS0A0A2027=2; Path=/[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Connection: close[\r][\n]" 781 [main] DEBUG httpclient.wire.header - << "Content-Length: 838[\r][\n]" 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.processResponseHeaders(HttpState, HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.parse(String, port, path, boolean, String) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.parse(String, port, path, boolean, Header) 781 [main] DEBUG org.apache.commons.httpclient.HeaderElement - enter HeaderElement.parseElements(char[]) 781 [main] DEBUG org.apache.commons.httpclient.Cookie - enter Cookie(String, String, String, String, Date, boolean) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter RFC2109Spec.validate(String, int, String, boolean, Cookie) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter CookieSpecBase.validate(String, port, path, boolean, Cookie) 781 [main] DEBUG org.apache.commons.httpclient.HttpState - enter HttpState.addCookie(Cookie) 781 [main] DEBUG org.apache.commons.httpclient.cookie.CookieSpec - enter RFC2109Spec.formatCookie(Cookie) 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Cookie accepted: "$Version=0; BCSI-CS0A0A2027=2; $Path=/" 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseBody(HttpState, HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.readResponseBody(HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.getResponseInputStream() 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - enter HttpMethodBase.canResponseHaveBody(int) 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Authorization required 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - enter HttpMethodBase.processAuthenticationResponse(HttpState, HttpConnection) 781 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor - Using authentication scheme: ntlm 781 [main] DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor - Authorization challenge processed 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Proxy authentication scope: NTLM <any realm>@proxy.sadac.com:80 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Proxy credentials required 781 [main] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Proxy credentials provider not available 781 [main] INFO org.apache.commons.httpclient.HttpMethodDirector - Failure authenticating with NTLM <any realm>@proxy.sadac.com:80 HTTP/1.1 407 Proxy Authentication Required ALL thanks, -----Original Message----- From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 1:22 AM To: HttpClient User Discussion Subject: RE: FW: Proxy Authentication Required On Tue, 2008-01-08 at 18:08 +0300, Fadi M. Maali wrote: > Hi, > > Thanks a lot for your suggestions. It seems that I am now able to pass > the NTLM authentication, but there still some error. > More specifically, > When I use *method.setFollowRedirects(true);* I get HTTP/1.1 407 Proxy > Authentication Required > While if I set redirect to false I get HTTP/1.1 302 Found > And the response body is: > <HTML><HEAD><meta http-equiv="content-type" > content="text/html;charset=utf-8"> > <TITLE>302 Moved</TITLE></HEAD><BODY> > <H1>302 Moved</H1> > The document has moved > <A HREF="http://www.google.com.sa/">here</A>. > </BODY></HTML> > > After looking at the log -- Hopefully that I didn't misunderstood > anything -- it seems that I am passing the authentication but something > then goes wrong. > > Any help please? You would stand a better chance of getting some help here if posted the log. Oleg > Many thanks, > > > -----Original Message----- > From: Roland Weber [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 06, 2008 4:58 PM > To: HttpClient User Discussion > Subject: Re: FW: Proxy Authentication Required > > Fadi M. Maali wrote: > > I was able to connect to a site using java.net.URL after setting the > > proxy using System.setProperty() . But I am getting a "HTTP/1.1 407 > > Proxy Authentication Required" response when I am trying to use > > HttpClient. > > Your proxy is probably configured to require NTLM authentication. > Sun JDK on Windows does that automatically, using the Windows > login credentials. HttpClient cannot do that. > > http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedNTLMQuestions#h > ead-6176b4c53057743b8762e7505d05d36a34a0446a > http://hc.apache.org/httpclient-3.x/authentication.html > > hope this helps, > Roland > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > IMPORTANT NOTICE: CONFIDENTIAL AND LEGAL PRIVILEGE > > This electronic communication is intended by the sender only for the access and use by the addressee and may contain legally privileged and confidential information. If you are not the addressee, you are notified that any transmission, disclosure, use, access to, storage or photocopying of this e-mail and any attachments is strictly prohibited. The legal privilege and confidentiality attached to this e-mail and any attachments is not waived, lost or destroyed by reason of a mistaken delivery to you. If you have received this e-mail and any attachments in error please immediately delete it and all copies from your system and notify the sender by e-mail. Nothing in this communication is intended to operate as an electronic signature under any applicable law... > > --------------------------------------------------------------------- > 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] IMPORTANT NOTICE: CONFIDENTIAL AND LEGAL PRIVILEGE This electronic communication is intended by the sender only for the access and use by the addressee and may contain legally privileged and confidential information. If you are not the addressee, you are notified that any transmission, disclosure, use, access to, storage or photocopying of this e-mail and any attachments is strictly prohibited. The legal privilege and confidentiality attached to this e-mail and any attachments is not waived, lost or destroyed by reason of a mistaken delivery to you. If you have received this e-mail and any attachments in error please immediately delete it and all copies from your system and notify the sender by e-mail. Nothing in this communication is intended to operate as an electronic signature under any applicable law... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
