hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phani Sajja <sajja.ph...@gmail.com>
Subject Re: Handling Redirects automatically in HttpClient4.0.1
Date Fri, 23 Apr 2010 11:31:50 GMT
Hi Oleg,
       Here is the complete log

16:50:57,484 DEBUG PropertyConfigurator:574 - Parsing for [root] with
value=[debug, stdout].
16:50:57,500 DEBUG PropertyConfigurator:589 - Level token is [debug].
16:50:57,500 DEBUG PropertyConfigurator:606 - Category root set to DEBUG.
16:50:57,500 DEBUG PropertyConfigurator:623 - Parsing appender named
"stdout".
16:50:57,531 DEBUG PropertyConfigurator:676 - Parsing layout options for
"stdout".
16:50:57,546 DEBUG PropertySetter:222 - Setting property [conversionPattern]
to [%d{ABSOLUTE} %5p %c{1}:%L - %m%n].
16:50:57,578 DEBUG PropertyConfigurator:684 - End of parsing for "stdout".
16:50:57,578 DEBUG PropertySetter:222 - Setting property [target] to
[System.out].
16:50:57,578 DEBUG PropertyConfigurator:693 - Parsed "stdout" options.
16:50:57,578 DEBUG PropertyConfigurator:389 - Finished configuring.
16:50:57,953 DEBUG SingleClientConnManager:195 - Get connection for route
HttpRoute[{}->http://172.31.100.14:3128->
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp]
16:50:58,000 DEBUG RequestAddCookies:131 - CookieSpec selected: best-match
16:50:58,015 DEBUG DefaultHttpClient:481 - Attempt 1 to execute request
16:50:58,015 DEBUG DefaultClientConnection:244 - Sending request: GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1
16:50:58,015 DEBUG wire:78 - >> "GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1[EOL]"
16:50:58,015 DEBUG wire:78 - >> "Host:
www.tkdl.res.in/tkdl/langdefault/common/home.asp[EOL]"
16:50:58,015 DEBUG wire:78 - >> "Proxy-Connection: Keep-Alive[EOL]"
16:50:58,015 DEBUG wire:78 - >> "User-Agent: Apache-HttpClient/4.0.1 (java
1.5)[EOL]"
16:50:58,015 DEBUG wire:78 - >> "[EOL]"
16:50:58,015 DEBUG headers:248 - >> GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1
16:50:58,031 DEBUG headers:251 - >> Host:
www.tkdl.res.in/tkdl/langdefault/common/home.asp
16:50:58,031 DEBUG headers:251 - >> Proxy-Connection: Keep-Alive
16:50:58,031 DEBUG headers:251 - >> User-Agent: Apache-HttpClient/4.0.1
(java 1.5)
16:50:58,031 DEBUG wire:78 - << "HTTP/1.0 407 Proxy Authentication
Required[EOL]"
16:50:58,031 DEBUG wire:78 - << "Server: squid[EOL]"
16:50:58,031 DEBUG wire:78 - << "Mime-Version: 1.0[EOL]"
16:50:58,031 DEBUG wire:78 - << "Date: Fri, 23 Apr 2010 11:28:54 GMT[EOL]"
16:50:58,031 DEBUG wire:78 - << "Content-Type: text/html[EOL]"
16:50:58,031 DEBUG wire:78 - << "Content-Length: 1722[EOL]"
16:50:58,031 DEBUG wire:78 - << "X-Squid-Error: ERR_CACHE_ACCESS_DENIED
0[EOL]"
16:50:58,031 DEBUG wire:78 - << "Proxy-Authenticate: Basic realm="Enter Your
Username and password"[EOL]"
16:50:58,031 DEBUG wire:78 - << "X-Cache: MISS from proxyserver[EOL]"
16:50:58,046 DEBUG wire:78 - << "Via: 1.0 proxyserver (squid)[EOL]"
16:50:58,046 DEBUG wire:78 - << "Proxy-Connection: close[EOL]"
16:50:58,046 DEBUG wire:78 - << "[EOL]"
16:50:58,046 DEBUG DefaultClientConnection:229 - Receiving response:
HTTP/1.0 407 Proxy Authentication Required
16:50:58,046 DEBUG headers:232 - << HTTP/1.0 407 Proxy Authentication
Required
16:50:58,046 DEBUG headers:235 - << Server: squid
16:50:58,046 DEBUG headers:235 - << Mime-Version: 1.0
16:50:58,046 DEBUG headers:235 - << Date: Fri, 23 Apr 2010 11:28:54 GMT
16:50:58,046 DEBUG headers:235 - << Content-Type: text/html
16:50:58,046 DEBUG headers:235 - << Content-Length: 1722
16:50:58,046 DEBUG headers:235 - << X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
16:50:58,046 DEBUG headers:235 - << Proxy-Authenticate: Basic realm="Enter
Your Username and password"
16:50:58,046 DEBUG headers:235 - << X-Cache: MISS from proxyserver
16:50:58,046 DEBUG headers:235 - << Via: 1.0 proxyserver (squid)
16:50:58,046 DEBUG headers:235 - << Proxy-Connection: close
16:50:58,046 DEBUG DefaultHttpClient:1054 - Proxy requested authentication
16:50:58,046 DEBUG DefaultProxyAuthenticationHandler:132 - Authentication
schemes in the order of preference: [ntlm, digest, basic]
16:50:58,046 DEBUG DefaultProxyAuthenticationHandler:155 - Challenge for
ntlm authentication scheme not available
16:50:58,046 DEBUG DefaultProxyAuthenticationHandler:155 - Challenge for
digest authentication scheme not available
16:50:58,046 DEBUG DefaultProxyAuthenticationHandler:142 - basic
authentication scheme selected
16:50:58,062 DEBUG DefaultHttpClient:1134 - Authorization challenge
processed
16:50:58,062 DEBUG DefaultHttpClient:1162 - Authentication scope: BASIC
'Enter Your Username and password'@172.31.100.14:3128
16:50:58,062 DEBUG DefaultHttpClient:1169 - Found credentials
16:50:58,062 DEBUG DefaultClientConnection:153 - Connection closed
16:50:58,078 DEBUG RequestAddCookies:131 - CookieSpec selected: best-match
16:50:58,093 DEBUG DefaultHttpClient:481 - Attempt 2 to execute request
16:50:58,093 DEBUG DefaultClientConnection:244 - Sending request: GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1
16:50:58,093 DEBUG wire:78 - >> "GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1[EOL]"
16:50:58,093 DEBUG wire:78 - >> "Host:
www.tkdl.res.in/tkdl/langdefault/common/home.asp[EOL]"
16:50:58,187 DEBUG wire:78 - >> "Proxy-Connection: Keep-Alive[EOL]"
16:50:58,187 DEBUG wire:78 - >> "User-Agent: Apache-HttpClient/4.0.1 (java
1.5)[EOL]"
16:50:58,187 DEBUG wire:78 - >> "Proxy-Authorization: Basic
cGhhbmk6c2FqamFAMQ==[EOL]"
16:50:58,187 DEBUG wire:78 - >> "[EOL]"
16:50:58,187 DEBUG headers:248 - >> GET
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/ HTTP/1.1
16:50:58,187 DEBUG headers:251 - >> Host:
www.tkdl.res.in/tkdl/langdefault/common/home.asp
16:50:58,187 DEBUG headers:251 - >> Proxy-Connection: Keep-Alive
16:50:58,203 DEBUG headers:251 - >> User-Agent: Apache-HttpClient/4.0.1
(java 1.5)
16:50:58,203 DEBUG headers:251 - >> Proxy-Authorization: Basic
cGhhbmk6c2FqamFAMQ==
16:50:58,343 DEBUG wire:78 - << "HTTP/1.0 302 Moved Temporarily[EOL]"
16:50:58,343 DEBUG wire:78 - << "Date: Fri, 23 Apr 2010 11:32:12 GMT[EOL]"
16:50:58,343 DEBUG wire:78 - << "Server: Microsoft-IIS/6.0[EOL]"
16:50:58,343 DEBUG wire:78 - << "X-Powered-By: ASP.NET[EOL]"
16:50:58,343 DEBUG wire:78 - << "Location:
/tkdl/includes/errhandler/myeh_500-100.asp?404;
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/[EOL]"
16:50:58,343 DEBUG wire:78 - << "X-Cache: MISS from proxyserver[EOL]"
16:50:58,343 DEBUG wire:78 - << "Via: 1.0 proxyserver (squid)[EOL]"
16:50:58,343 DEBUG wire:78 - << "Proxy-Connection: close[EOL]"
16:50:58,343 DEBUG wire:78 - << "[EOL]"
16:50:58,343 DEBUG DefaultClientConnection:229 - Receiving response:
HTTP/1.0 302 Moved Temporarily
16:50:58,343 DEBUG headers:232 - << HTTP/1.0 302 Moved Temporarily
16:50:58,343 DEBUG headers:235 - << Date: Fri, 23 Apr 2010 11:32:12 GMT
16:50:58,343 DEBUG headers:235 - << Server: Microsoft-IIS/6.0
16:50:58,343 DEBUG headers:235 - << X-Powered-By: ASP.NET
16:50:58,343 DEBUG headers:235 - << Location:
/tkdl/includes/errhandler/myeh_500-100.asp?404;
http://www.tkdl.res.in/tkdl/langdefault/common/home.asp/
16:50:58,343 DEBUG headers:235 - << X-Cache: MISS from proxyserver
16:50:58,343 DEBUG headers:235 - << Via: 1.0 proxyserver (squid)
16:50:58,343 DEBUG headers:235 - << Proxy-Connection: close
----------------------------------------
HTTP/1.0 302 Moved Temporarily
Response content length: -1
16:50:58,359 DEBUG SingleClientConnManager:250 - Releasing connection
org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@8fce95
16:50:58,359 DEBUG SingleClientConnManager:268 - Released connection open
but not reusable.
16:50:58,359 DEBUG DefaultClientConnection:141 - Connection shut down



On Fri, Apr 23, 2010 at 3:45 PM, Oleg Kalnichevski <olegk@apache.org> wrote:

> On Fri, 2010-04-23 at 15:02 +0530, Phani Sajja wrote:
> > Hi all,
> >         I am using HttpClient version 4.0.1. When I execute a method on a
> > link I am getting error 302 saying HTTP/1.0 302 Moved Temporarily. How to
> > handle redirects automatically so that I can get the final page. Help me
> > please!
> >
>
> Generate a wire log of the HTTP session that exhibits the problem, as
> described below, and post the log to this list:
>
> http://hc.apache.org/httpcomponents-client-4.0.1/logging.html
>
> Oleg
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>


-- 
Regards
Phani. S

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message