You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by micky <mi...@cyberpowersystems.com.tw> on 2008/02/28 10:19:09 UTC

cookie or session-id is different from the same HttpClient connection?!

Dear,


I use the HttpClient to login some page, and it will have a cookie according to my login.

But when I try to access another page (needed for logon) by the same HttpClient, the response is access denied. 

Then I print out the cookies of the two connection, I found them are different.

But the document said I don't need to care the cookie issue when I use HttpClient to login and continue browsing other pages.

Here is some sample pseudo code to demo.

---------
DefaultHttpClient httpclient = new DefaultHttpClient();

HttpPost httpPost = new HttpPost("http://127.0.0.1/login.html");

// response 200, and login ok!
HttpResponse response = httpclient.execute(httpPost);

HttpEntity entity = response.getEntity(); // cookie with a session id "1" for example

// continue to another page
httpPost = new HttpPost("http://127.0.0.1/info.html");

// response 200, and access denied
HttpResponse response2 = httpclient.execute(httpPost);

HttpEntity entity2 = response2.getEntity(); // cookie with a session id "2" for example

// the session is different
---------

I think the session id in the cookie should be the same, so that I can browse all pages after the first logon action.

But the truth is not?! How it can be that??

Thanks for any reply or suggestion.

Sincerely,
Micky




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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2008-03-11 at 21:23 +0800, micky wrote:
> Dear, 
> 
> I solved the cookie issues according to the article mentioned by Roland at
> http://www.nabble.com/forum/ViewPost.jtp?post=15912252&framed=y
> 
> After I "GET" a request to the server, the session will be established. 
> The following sequences like POST a data or request any other pages by GET
> or POST will be in the right behavior.
> 
> But if I "POST" a request with data to the server first instead of "GET",
> the following sequences just have different sessions and I will get a
> "Accessed Denied" warning.
> 
> 
> I think it's because the HttpClient library will store cookie after the
> "FIRST" GET request automatically, and will use it through the following
> browsing.
> If the "FIRST" request is a POST, the HttpClient won't store cookie for the
> following requests.
> 
> Am I right ? or any hint?
> 

I do not think so. There is absolutely no difference between POST, GET
or any other method as far as cookie management is concerned.

Please try to put together a self-contained test case and I'll happily
take a look at it.

Oleg 


> 
> Sincerely,
> Micky
> 
> -----Original Message-----
> From: micky [mailto:micky_lee@cyberpowersystems.com.tw] 
> Sent: Sunday, March 09, 2008 5:24 PM
> To: 'HttpClient User Discussion'
> Subject: RE: cookie or session-id is different from the same HttpClient
> connection?!
> 
> Dear Oleg,
> 
> 
> > Because HttpClient does not find the first cookie when executing the
> > second request. You are not creating a new instance of HttpClient for
> >each request, are you?
> 
> No, I am using the same instance of HttpClient for each request.
> 
> Any suggestion for debugging?
> 
> Sincerely, 
> Micky
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 


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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by micky <mi...@cyberpowersystems.com.tw>.
Dear, 

I solved the cookie issues according to the article mentioned by Roland at
http://www.nabble.com/forum/ViewPost.jtp?post=15912252&framed=y

After I "GET" a request to the server, the session will be established. 
The following sequences like POST a data or request any other pages by GET
or POST will be in the right behavior.

But if I "POST" a request with data to the server first instead of "GET",
the following sequences just have different sessions and I will get a
"Accessed Denied" warning.


I think it's because the HttpClient library will store cookie after the
"FIRST" GET request automatically, and will use it through the following
browsing.
If the "FIRST" request is a POST, the HttpClient won't store cookie for the
following requests.

Am I right ? or any hint?


Sincerely,
Micky

-----Original Message-----
From: micky [mailto:micky_lee@cyberpowersystems.com.tw] 
Sent: Sunday, March 09, 2008 5:24 PM
To: 'HttpClient User Discussion'
Subject: RE: cookie or session-id is different from the same HttpClient
connection?!

Dear Oleg,


> Because HttpClient does not find the first cookie when executing the
> second request. You are not creating a new instance of HttpClient for
>each request, are you?

No, I am using the same instance of HttpClient for each request.

Any suggestion for debugging?

Sincerely, 
Micky





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


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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by micky <mi...@cyberpowersystems.com.tw>.
Dear Oleg,


> Because HttpClient does not find the first cookie when executing the
> second request. You are not creating a new instance of HttpClient for
>each request, are you?

No, I am using the same instance of HttpClient for each request.

Any suggestion for debugging?

Sincerely, 
Micky





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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2008-03-07 at 13:24 +0800, micky wrote:
> Dear,
> 
> I finally figure out how to log!!
> 

> Please help me find out why these two connections' cookie are different.
> 

Because HttpClient does not find the first cookie when executing the
second request. You are not creating a new instance of HttpClient for
each request, are you?

Oleg 

> Thanks for your kindly help.
> 
> 
> Sincerely,
> Micky
> 
> 
> 
> 
> -----Original Message-----
> From: Roland Weber [mailto:ossfwot@dubioso.net] 
> Sent: Thursday, March 06, 2008 1:02 AM
> To: HttpClient User Discussion
> Subject: Re: cookie or session-id is different from the same HttpClient connection?!
> 
> Hello Micky,
> 
> > I just use HttpsURLConnection.getHeaderField("Set-Cookie") to get a cookie String, then I use HttpURLConnection.setRequestProperty("Cookie", cookie String) for the next connection.
> > And it worked well. 
> 
> That surprises me.
> 
> > It seems Sun HttpURLConnection didn't handle cookie internally.
> 
> So it didn't work before you copied the cookie in your application.
> Interesting.
> 
> >> HttpClient maintains a shared default session state for all
> >> connections. If you don't do something to prevent it, it will
> >> pick up the cookies that were previously set.
> > I think HttpClient should do this as you said too. But I don't know why it doesn't work for my code now.
> 
> Logging should help to find that out. You can also modify the
> code and put some System.out.println()s into interesting places,
> when the cookies for the request being sent are selected.
> 
> > Should I handle the cookie management in the server? 
> > The server is Struts on Tomcat, and I didn't do any additional action for handling cookie because I think the server should handle it itself.
> 
> If it's about a session cookie and your server-side application
> is a servlet or some other standard J2EE thing, you don't have
> to worry about session management.
> 
> > When I print the cookie content from HttpClient.getCookieStore().getCookies(), it shows as followings.
> > ----
> > [version: 0][name: JSESSIONID][name: 8C20EDB1D409B3AFCE1A1D25CCDE59CE][domain: 127.0.0.1][path: /agent][expiry: null]
> > ----
> 
> This looks OK. However, it specifies both a domain "127.0.0.1" and
> a path "/agent". If your next request is NOT to 127.0.0.1, then the
> cookie will not be sent. The comparison is on the string level, so
> if the next request goes to "localhost" instead of "127.0.0.1", then
> it will NOT match. Also, if your next request does not go to a path
> starting with /agent, this cookie will not match.
> 
> cheers,
>    Roland
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 


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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by micky <mi...@cyberpowersystems.com.tw>.
Dear,

I finally figure out how to log!!

The SimpleLog can't work, but the log4j works.

Below is the log.



executing: POST https://127.0.0.1/agent/xml/login.xml HTTP/1.1
----
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.max-redirects': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection-manager.timeout': null
DEBUG [org.apache.http.impl.conn.SingleClientConnManager] SingleClientConnManager.getConnection: HttpRoute[{s}->https://127.0.0.1]
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.tcp.nodelay': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.linger': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.buffer-size': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-header-count': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-status-line-garbage': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.stalecheck': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Stale connection check
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.virtual-host': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.default-headers': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.useragent': Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.expect-continue': true
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-policy': null
DEBUG [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-datepatterns': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.single-cookie-header': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Attempt 1 to execute request
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.wire] >> "POST /agent/xml/login.xml HTTP/1.1[EOL]"
DEBUG [org.apache.http.wire] >> "Content-Length: 225[EOL]"
DEBUG [org.apache.http.wire] >> "Content-Type: application/x-www-form-urlencoded[EOL]"
DEBUG [org.apache.http.wire] >> "Host: 127.0.0.1[EOL]"
DEBUG [org.apache.http.wire] >> "Connection: Keep-Alive[EOL]"
DEBUG [org.apache.http.wire] >> "User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)[EOL]"
DEBUG [org.apache.http.wire] >> "Expect: 100-Continue[EOL]"
DEBUG [org.apache.http.wire] >> "[EOL]"
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.headers] >> POST /agent/xml/login.xml HTTP/1.1
DEBUG [org.apache.http.headers] >> Content-Length: 225
DEBUG [org.apache.http.headers] >> Content-Type: application/x-www-form-urlencoded
DEBUG [org.apache.http.headers] >> Host: 127.0.0.1
DEBUG [org.apache.http.headers] >> Connection: Keep-Alive
DEBUG [org.apache.http.headers] >> User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.headers] >> Expect: 100-Continue
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.wait-for-continue': null
DEBUG [org.apache.http.wire] << "HTTP/1.1 100 Continue[EOL]"
DEBUG [org.apache.http.headers] << HTTP/1.1 100 Continue
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.wire] >> "jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A"
DEBUG [org.apache.http.wire] << "HTTP/1.1 302 Moved Temporarily[EOL]"
DEBUG [org.apache.http.wire] << "Server: Apache-Coyote/1.1[EOL]"
DEBUG [org.apache.http.wire] << "Set-Cookie: JSESSIONID=A8DEFC59DB38202BBEF794ABF9556991; Path=/agent; Secure[EOL]"
DEBUG [org.apache.http.wire] << "Pragma: No-cache[EOL]"
DEBUG [org.apache.http.wire] << "Cache-Control: no-cache,no-store,max-age=0[EOL]"
DEBUG [org.apache.http.wire] << "Expires: Thu, 01 Jan 1970 00:00:00 GMT[EOL]"
DEBUG [org.apache.http.wire] << "Location: https://127.0.0.1:8443/agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A[EOL]"
DEBUG [org.apache.http.wire] << "Content-Type: text/html[EOL]"
DEBUG [org.apache.http.wire] << "Content-Length: 0[EOL]"
DEBUG [org.apache.http.wire] << "Date: Fri, 07 Mar 2008 05:10:44 GMT[EOL]"
DEBUG [org.apache.http.headers] << HTTP/1.1 302 Moved Temporarily
DEBUG [org.apache.http.headers] << Server: Apache-Coyote/1.1
DEBUG [org.apache.http.headers] << Set-Cookie: JSESSIONID=A8DEFC59DB38202BBEF794ABF9556991; Path=/agent; Secure
DEBUG [org.apache.http.headers] << Pragma: No-cache
DEBUG [org.apache.http.headers] << Cache-Control: no-cache,no-store,max-age=0
DEBUG [org.apache.http.headers] << Expires: Thu, 01 Jan 1970 00:00:00 GMT
DEBUG [org.apache.http.headers] << Location: https://127.0.0.1:8443/agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A
DEBUG [org.apache.http.headers] << Content-Type: text/html
DEBUG [org.apache.http.headers] << Content-Length: 0
DEBUG [org.apache.http.headers] << Date: Fri, 07 Mar 2008 05:10:44 GMT
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.client.protocol.ResponseProcessCookies] Cookie accepted: "[version: 0][name: JSESSIONID][name: A8DEFC59DB38202BBEF794ABF9556991][domain: 127.0.0.1][path: /agent][expiry: null]". 
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.handle-redirects': null
DEBUG [org.apache.http.impl.client.DefaultRedirectHandler] Redirect requested to location 'https://127.0.0.1:8443/agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A'
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.allow-circular-redirects': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.route.forced-route': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.route.local-address': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.route.default-proxy': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Redirecting to 'https://127.0.0.1:8443/agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A' via HttpRoute[{s}->https://127.0.0.1:8443]
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Connection kept alive
DEBUG [org.apache.http.impl.conn.SingleClientConnManager] SingleClientConnManager.getConnection: HttpRoute[{s}->https://127.0.0.1:8443]
DEBUG [org.apache.http.impl.conn.DefaultClientConnection] Connection shut down
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.tcp.nodelay': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.linger': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.buffer-size': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-header-count': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-status-line-garbage': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.stalecheck': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Stale connection check
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.virtual-host': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.default-headers': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.useragent': Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-policy': null
DEBUG [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-datepatterns': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.single-cookie-header': null
DEBUG [org.apache.http.client.protocol.RequestAddCookies] Cookie [version: 0][name: JSESSIONID][name: A8DEFC59DB38202BBEF794ABF9556991][domain: 127.0.0.1][path: /agent][expiry: null] match [(secure)127.0.0.1:8443/agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991]
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Attempt 2 to execute request
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.wire] >> "GET /agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A HTTP/1.1[EOL]"
DEBUG [org.apache.http.wire] >> "Host: 127.0.0.1:8443[EOL]"
DEBUG [org.apache.http.wire] >> "Connection: Keep-Alive[EOL]"
DEBUG [org.apache.http.wire] >> "User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)[EOL]"
DEBUG [org.apache.http.wire] >> "Cookie: JSESSIONID=A8DEFC59DB38202BBEF794ABF9556991[EOL]"
DEBUG [org.apache.http.wire] >> "Cookie2: $Version=1[EOL]"
DEBUG [org.apache.http.wire] >> "[EOL]"
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.headers] >> GET /agent/xml/login.xml;jsessionid=A8DEFC59DB38202BBEF794ABF9556991?jaxbString=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%0A%3Clogin%3E%0A++++%3CphaseKey%3Epowerpanel.encryption.key%3C%2FphaseKey%3E%0A++++%3Cresult%3E-1%3C%2Fresult%3E%0A%3C%2Flogin%3E%0A HTTP/1.1
DEBUG [org.apache.http.headers] >> Host: 127.0.0.1:8443
DEBUG [org.apache.http.headers] >> Connection: Keep-Alive
DEBUG [org.apache.http.headers] >> User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.headers] >> Cookie: JSESSIONID=A8DEFC59DB38202BBEF794ABF9556991
DEBUG [org.apache.http.headers] >> Cookie2: $Version=1
DEBUG [org.apache.http.wire] << "HTTP/1.1 200 OK[EOL]"
DEBUG [org.apache.http.wire] << "Server: Apache-Coyote/1.1[EOL]"
DEBUG [org.apache.http.wire] << "Pragma: No-cache[EOL]"
DEBUG [org.apache.http.wire] << "Cache-Control: no-cache,no-store,max-age=0[EOL]"
DEBUG [org.apache.http.wire] << "Expires: Thu, 01 Jan 1970 00:00:00 GMT[EOL]"
DEBUG [org.apache.http.wire] << "Content-Type: text/xml;charset=UTF-8[EOL]"
DEBUG [org.apache.http.wire] << "Content-Length: 147[EOL]"
DEBUG [org.apache.http.wire] << "Date: Fri, 07 Mar 2008 05:10:44 GMT[EOL]"
DEBUG [org.apache.http.headers] << HTTP/1.1 200 OK
DEBUG [org.apache.http.headers] << Server: Apache-Coyote/1.1
DEBUG [org.apache.http.headers] << Pragma: No-cache
DEBUG [org.apache.http.headers] << Cache-Control: no-cache,no-store,max-age=0
DEBUG [org.apache.http.headers] << Expires: Thu, 01 Jan 1970 00:00:00 GMT
DEBUG [org.apache.http.headers] << Content-Type: text/xml;charset=UTF-8
DEBUG [org.apache.http.headers] << Content-Length: 147
DEBUG [org.apache.http.headers] << Date: Fri, 07 Mar 2008 05:10:44 GMT
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.handle-redirects': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.handle-authentication': null



When I success login the xml page, I continue to next page.




executing: POST http://127.0.0.1/agent/xml/update_communication.xml HTTP/1.1
----
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.max-redirects': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection-manager.timeout': null
DEBUG [org.apache.http.impl.conn.SingleClientConnManager] SingleClientConnManager.getConnection: HttpRoute[{}->http://127.0.0.1]
DEBUG [org.apache.http.impl.conn.DefaultClientConnection] Connection shut down
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.tcp.nodelay': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.timeout': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.linger': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.socket.buffer-size': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.element-charset': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-header-count': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-line-length': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.max-status-line-garbage': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.connection.stalecheck': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Stale connection check
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.virtual-host': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.default-headers': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.useragent': Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-policy': null
DEBUG [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.cookie-datepatterns': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.single-cookie-header': null
DEBUG [org.apache.http.impl.client.DefaultClientRequestDirector] Attempt 1 to execute request
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.wire] >> "POST /agent/xml/update_communication.xml HTTP/1.1[EOL]"
DEBUG [org.apache.http.wire] >> "Content-Length: 0[EOL]"
DEBUG [org.apache.http.wire] >> "Host: 127.0.0.1[EOL]"
DEBUG [org.apache.http.wire] >> "Connection: Keep-Alive[EOL]"
DEBUG [org.apache.http.wire] >> "User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)[EOL]"
DEBUG [org.apache.http.wire] >> "[EOL]"
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.headers] >> POST /agent/xml/update_communication.xml HTTP/1.1
DEBUG [org.apache.http.headers] >> Content-Length: 0
DEBUG [org.apache.http.headers] >> Host: 127.0.0.1
DEBUG [org.apache.http.headers] >> Connection: Keep-Alive
DEBUG [org.apache.http.headers] >> User-Agent: Apache-HttpClient/4.0-alpha3 (java 1.4)
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.wire] << "HTTP/1.1 200 OK[EOL]"
DEBUG [org.apache.http.wire] << "Server: Apache-Coyote/1.1[EOL]"
DEBUG [org.apache.http.wire] << "Set-Cookie: JSESSIONID=6095180651415AEF58669DE43A36096D; Path=/agent[EOL]"
DEBUG [org.apache.http.wire] << "Pragma: No-cache[EOL]"
DEBUG [org.apache.http.wire] << "Cache-Control: no-cache,no-store,max-age=0[EOL]"
DEBUG [org.apache.http.wire] << "Expires: Thu, 01 Jan 1970 00:00:00 GMT[EOL]"
DEBUG [org.apache.http.wire] << "Content-Type: text/html;charset=UTF-8[EOL]"
DEBUG [org.apache.http.wire] << "Transfer-Encoding: chunked[EOL]"
DEBUG [org.apache.http.wire] << "Date: Fri, 07 Mar 2008 05:10:44 GMT[EOL]"
DEBUG [org.apache.http.headers] << HTTP/1.1 200 OK
DEBUG [org.apache.http.headers] << Server: Apache-Coyote/1.1
DEBUG [org.apache.http.headers] << Set-Cookie: JSESSIONID=6095180651415AEF58669DE43A36096D; Path=/agent
DEBUG [org.apache.http.headers] << Pragma: No-cache
DEBUG [org.apache.http.headers] << Cache-Control: no-cache,no-store,max-age=0
DEBUG [org.apache.http.headers] << Expires: Thu, 01 Jan 1970 00:00:00 GMT
DEBUG [org.apache.http.headers] << Content-Type: text/html;charset=UTF-8
DEBUG [org.apache.http.headers] << Transfer-Encoding: chunked
DEBUG [org.apache.http.headers] << Date: Fri, 07 Mar 2008 05:10:44 GMT
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.version': HTTP/1.1
DEBUG [org.apache.http.client.protocol.ResponseProcessCookies] Cookie accepted: "[version: 0][name: JSESSIONID][name: 6095180651415AEF58669DE43A36096D][domain: 127.0.0.1][path: /agent][expiry: null]". 
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.handle-redirects': null
DEBUG [org.apache.http.impl.client.ClientParamsStack] 'http.protocol.handle-authentication': null




The return message is "Access denied" because the "check session" on server failed.

Please help me find out why these two connections' cookie are different.

Thanks for your kindly help.


Sincerely,
Micky




-----Original Message-----
From: Roland Weber [mailto:ossfwot@dubioso.net] 
Sent: Thursday, March 06, 2008 1:02 AM
To: HttpClient User Discussion
Subject: Re: cookie or session-id is different from the same HttpClient connection?!

Hello Micky,

> I just use HttpsURLConnection.getHeaderField("Set-Cookie") to get a cookie String, then I use HttpURLConnection.setRequestProperty("Cookie", cookie String) for the next connection.
> And it worked well. 

That surprises me.

> It seems Sun HttpURLConnection didn't handle cookie internally.

So it didn't work before you copied the cookie in your application.
Interesting.

>> HttpClient maintains a shared default session state for all
>> connections. If you don't do something to prevent it, it will
>> pick up the cookies that were previously set.
> I think HttpClient should do this as you said too. But I don't know why it doesn't work for my code now.

Logging should help to find that out. You can also modify the
code and put some System.out.println()s into interesting places,
when the cookies for the request being sent are selected.

> Should I handle the cookie management in the server? 
> The server is Struts on Tomcat, and I didn't do any additional action for handling cookie because I think the server should handle it itself.

If it's about a session cookie and your server-side application
is a servlet or some other standard J2EE thing, you don't have
to worry about session management.

> When I print the cookie content from HttpClient.getCookieStore().getCookies(), it shows as followings.
> ----
> [version: 0][name: JSESSIONID][name: 8C20EDB1D409B3AFCE1A1D25CCDE59CE][domain: 127.0.0.1][path: /agent][expiry: null]
> ----

This looks OK. However, it specifies both a domain "127.0.0.1" and
a path "/agent". If your next request is NOT to 127.0.0.1, then the
cookie will not be sent. The comparison is on the string level, so
if the next request goes to "localhost" instead of "127.0.0.1", then
it will NOT match. Also, if your next request does not go to a path
starting with /agent, this cookie will not match.

cheers,
   Roland


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


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


Re: cookie or session-id is different from the same HttpClient connection?!

Posted by Roland Weber <os...@dubioso.net>.
Hello Micky,

> I just use HttpsURLConnection.getHeaderField("Set-Cookie") to get a cookie String, then I use HttpURLConnection.setRequestProperty("Cookie", cookie String) for the next connection.
> And it worked well. 

That surprises me.

> It seems Sun HttpURLConnection didn't handle cookie internally.

So it didn't work before you copied the cookie in your application.
Interesting.

>> HttpClient maintains a shared default session state for all
>> connections. If you don't do something to prevent it, it will
>> pick up the cookies that were previously set.
> I think HttpClient should do this as you said too. But I don't know why it doesn't work for my code now.

Logging should help to find that out. You can also modify the
code and put some System.out.println()s into interesting places,
when the cookies for the request being sent are selected.

> Should I handle the cookie management in the server? 
> The server is Struts on Tomcat, and I didn't do any additional action for handling cookie because I think the server should handle it itself.

If it's about a session cookie and your server-side application
is a servlet or some other standard J2EE thing, you don't have
to worry about session management.

> When I print the cookie content from HttpClient.getCookieStore().getCookies(), it shows as followings.
> ----
> [version: 0][name: JSESSIONID][name: 8C20EDB1D409B3AFCE1A1D25CCDE59CE][domain: 127.0.0.1][path: /agent][expiry: null]
> ----

This looks OK. However, it specifies both a domain "127.0.0.1" and
a path "/agent". If your next request is NOT to 127.0.0.1, then the
cookie will not be sent. The comparison is on the string level, so
if the next request goes to "localhost" instead of "127.0.0.1", then
it will NOT match. Also, if your next request does not go to a path
starting with /agent, this cookie will not match.

cheers,
   Roland


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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by micky <mi...@cyberpowersystems.com.tw>.
Dear Roland,

> You set up the configuration, then you run your application.
> Note that the website has instructions for HttpClient 3.x.
> The package names as well as the name of the wire logger(s)
> have changed in 4.0.
I will try how to use the loggers in HttpClient 4.0.

> I am sure the server response a valid cookie because of the old code I wrote can work well.
> The old code I use are HttpsURLConnection and HttpURLConnection . 
> I get a cookie from HttpsURLConnection.getHeaderField(), then I set the cookie with HttpURLConnection.setRequestProperty() for next connection, and it works well.

> How can you be sure that the cookie is valid if you just
> get the header field without parsing and validating it?
> The header field by which cookies are received is "Set-Cookie"
> or "Set-Cookie2". The header field by which cookies are sent
> is "Cookie" and has a different format. Does your code take
> that into account?
I just use HttpsURLConnection.getHeaderField("Set-Cookie") to get a cookie String, then I use HttpURLConnection.setRequestProperty("Cookie", cookie String) for the next connection.
And it worked well. 

> If not, then the reason why it works is probably that the
> Sun HttpURLConnection internally handles cookies, just like
> HttpClient does.
It seems Sun HttpURLConnection didn't handle cookie internally.

> > Please note that the first one I use is HttpsURLConnection and the second one is HttpURLConnection.

> Unless the "secure" flag of the cookie is set, that doesn't
> make a difference.
OK, thanks.

>> Does it mean if the protocol changed from HTTPS to HTTP, the connection session will be different from each other even if I use the same HttpClient instance?
> HttpClient maintains a shared default session state for all
> connections. If you don't do something to prevent it, it will
> pick up the cookies that were previously set.
I think HttpClient should do this as you said too. But I don't know why it doesn't work for my code now.

>> I think I need not to know which cookie version or protocol I receive or send because the HttpClient's default cookie policy is "Best Match", am I right?
> If you are using HttpClient 4.0 alpha3, the default policy
> is "best match" and you shouldn't have to worry. If you are
> still on alpha2, there is no "best match" cookie policy.
> The feature was added in alpha3. If you are having problems
> with it, we need to know what goes wrong. There could still
> be a bug somewhere.
Yes, I am using HttpClient 4.0 alpha3. 
And it still can't work well when I want to login a https page then browse to another http page since the cookie issue occurred.



> In previous releases, the default strategy required strict
> conformance to the specification, while most browsers and
> probably also HttpURLConnection tolerate malformed cookies.
So I have another question.
Should I handle the cookie management in the server? 
The server is Struts on Tomcat, and I didn't do any additional action for handling cookie because I think the server should handle it itself.
When I print the cookie content from HttpClient.getCookieStore().getCookies(), it shows as followings.
----
[version: 0][name: JSESSIONID][name: 8C20EDB1D409B3AFCE1A1D25CCDE59CE][domain: 127.0.0.1][path: /agent][expiry: null]
----

Does it a malformed cookies? Is the "expiry" is null normal?

Is there any other ways to figure out this problem?

Thanks for your kindly reply.

Sincerely,
Micky


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


Re: cookie or session-id is different from the same HttpClient connection?!

Posted by Roland Weber <os...@dubioso.net>.
Hello Micky,

> The website only demonstrate how to setup the configuration instead of how to use it for logging...

You set up the configuration, then you run your application.
Note that the website has instructions for HttpClient 3.x.
The package names as well as the name of the wire logger(s)
have changed in 4.0.

> I am sure the server response a valid cookie because of the old code I wrote can work well.
> The old code I use are HttpsURLConnection and HttpURLConnection . 
> I get a cookie from HttpsURLConnection.getHeaderField(), then I set the cookie with HttpURLConnection.setRequestProperty() for next connection, and it works well.

How can you be sure that the cookie is valid if you just
get the header field without parsing and validating it?
The header field by which cookies are received is "Set-Cookie"
or "Set-Cookie2". The header field by which cookies are sent
is "Cookie" and has a different format. Does your code take
that into account?
If not, then the reason why it works is probably that the
Sun HttpURLConnection internally handles cookies, just like
HttpClient does.

> Please note that the first one I use is HttpsURLConnection and the second one is HttpURLConnection.

Unless the "secure" flag of the cookie is set, that doesn't
make a difference.

> Does it mean if the protocol changed from HTTPS to HTTP, the connection session will be different from each other even if I use the same HttpClient instance?

HttpClient maintains a shared default session state for all
connections. If you don't do something to prevent it, it will
pick up the cookies that were previously set.

> I think I need not to know which cookie version or protocol I receive or send because the HttpClient's default cookie policy is "Best Match", am I right?

If you are using HttpClient 4.0 alpha3, the default policy
is "best match" and you shouldn't have to worry. If you are
still on alpha2, there is no "best match" cookie policy.
The feature was added in alpha3. If you are having problems
with it, we need to know what goes wrong. There could still
be a bug somewhere.
In previous releases, the default strategy required strict
conformance to the specification, while most browsers and
probably also HttpURLConnection tolerate malformed cookies.

cheers,
   Roland


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


RE: cookie or session-id is different from the same HttpClient connection?!

Posted by micky <mi...@cyberpowersystems.com.tw>.
Dear Oleg,

Sorry for that I don't know how to use the logger to log the needed or important log for HttpClient. 
The website only demonstrate how to setup the configuration instead of how to use it for logging...

--
Dear Roland,

I know the cookie issue, and had already read the document you provide for me.

The prerequisite I forgot to tell you is that I connect and login to HTTPS page first, then I connect to HTTP page.

I am sure the server response a valid cookie because of the old code I wrote can work well.
The old code I use are HttpsURLConnection and HttpURLConnection . 
I get a cookie from HttpsURLConnection.getHeaderField(), then I set the cookie with HttpURLConnection.setRequestProperty() for next connection, and it works well.
Please note that the first one I use is HttpsURLConnection and the second one is HttpURLConnection.

Now when I transfer the old code to the new code with HttpClient, there is a cookie problem I can't figure out.
Does it mean if the protocol changed from HTTPS to HTTP, the connection session will be different from each other even if I use the same HttpClient instance?

The cookie content got from server is " [version: 0][name: JSESSIONID][name: 8012FD6E805E69A2FAF5F463A8FA8281][domain: 192.168.20.73][path: /agent][expiry: null]" after the first login action.
The cookie content got from server is " [version: 0][name: JSESSIONID][name: D1CC1767F69A03AF99F8AC55C1DF1E0D][domain: 192.168.20.73][path: /agent][expiry: null]" after the second action.

Does it mean I need to set the previous cookie with the next HttpClient.execute(HttpPost, HttpContext), which HttpContext has the previous connection's cookie attribute?

Or even if the different protocol connections are proceed, the HttpClient still can handle the cookie issue, and I don't care how it works?

I think I need not to know which cookie version or protocol I receive or send because the HttpClient's default cookie policy is "Best Match", am I right?


Thanks for your kindly help.

Sincerely,
Micky

-----Original Message-----
From: Roland Weber [mailto:ossfwot@dubioso.net] 
Sent: Saturday, March 01, 2008 1:44 PM
To: HttpClient User Discussion
Subject: Re: cookie or session-id is different from the same HttpClient connection?!

micky wrote:
> Then I print out the cookies of the two connection, I found them are different.
> 
> But the document said I don't need to care the cookie issue when I use
> HttpClient to login and continue browsing other pages.

You don't have to take care of the cookies, but you have to make
sure that the correct cookie policy is in place and that the
server doesn't send invalid cookies.

http://wiki.apache.org/HttpComponents/ForAbsoluteBeginners#head-1cf332662ef015b4aa19e06dc24c24e391ecda69

The cookie guide is for the old API, but the ideas are still the same.
The latest release of HttpClient has a "Best Match" cookie policy that
automatically determines the kind of cookie sent by the server.
http://hc.apache.org/httpclient-3.x/cookies.html

cheers,
   Roland


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


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


Re: cookie or session-id is different from the same HttpClient connection?!

Posted by Roland Weber <os...@dubioso.net>.
micky wrote:
> Then I print out the cookies of the two connection, I found them are different.
> 
> But the document said I don't need to care the cookie issue when I use
> HttpClient to login and continue browsing other pages.

You don't have to take care of the cookies, but you have to make
sure that the correct cookie policy is in place and that the
server doesn't send invalid cookies.

http://wiki.apache.org/HttpComponents/ForAbsoluteBeginners#head-1cf332662ef015b4aa19e06dc24c24e391ecda69

The cookie guide is for the old API, but the ideas are still the same.
The latest release of HttpClient has a "Best Match" cookie policy that
automatically determines the kind of cookie sent by the server.
http://hc.apache.org/httpclient-3.x/cookies.html

cheers,
   Roland


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


Re: cookie or session-id is different from the same HttpClient connection?!

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2008-02-28 at 17:19 +0800, micky wrote:
> Dear,
> 
> 
> I use the HttpClient to login some page, and it will have a cookie according to my login.
> 
> But when I try to access another page (needed for logon) by the same HttpClient, the response is access denied. 
> 
> Then I print out the cookies of the two connection, I found them are different.
> 
> But the document said I don't need to care the cookie issue when I use HttpClient to login and continue browsing other pages.
> 
> Here is some sample pseudo code to demo.
> 
> ---------
> DefaultHttpClient httpclient = new DefaultHttpClient();
> 
> HttpPost httpPost = new HttpPost("http://127.0.0.1/login.html");
> 
> // response 200, and login ok!
> HttpResponse response = httpclient.execute(httpPost);
> 
> HttpEntity entity = response.getEntity(); // cookie with a session id "1" for example
> 
> // continue to another page
> httpPost = new HttpPost("http://127.0.0.1/info.html");
> 
> // response 200, and access denied
> HttpResponse response2 = httpclient.execute(httpPost);
> 
> HttpEntity entity2 = response2.getEntity(); // cookie with a session id "2" for example
> 
> // the session is different
> ---------
> 
> I think the session id in the cookie should be the same, so that I can browse all pages after the first logon action.
> 
> But the truth is not?! How it can be that??
> 
> Thanks for any reply or suggestion.
> 
> Sincerely,
> Micky
> 

Micky,

Please execute your application with the 'org.apache.http' logger set to
DEBUG. 

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

Feel free to post the log to this list if you need help figuring out the
cause of the problem.

Oleg  


> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 


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