<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-20180</id>
	<title>Nabble - HttpClient-User</title>
	<updated>2009-11-13T17:42:58Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/HttpClient-User-f20180.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HttpClient-User-f20180.html" />
	<subtitle type="html">User forum for the HttpClient component.
&lt;br&gt;&amp;nbsp;- The Jakarta Commons HttpClient component provides an efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations.
&lt;br&gt;&amp;nbsp;- Designed for extension while providing robust support for the base HTTP protocol, the HttpClient component may be of interest to anyone building HTTP-aware client applications such as web browsers, web service clients, or systems that leverage or extend the HTTP protocol for distributed communication.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26346264</id>
	<title>HC 4.1 release date</title>
	<published>2009-11-13T17:42:58Z</published>
	<updated>2009-11-13T17:42:58Z</updated>
	<author>
		<name>Natarajan_Valli</name>
	</author>
	<content type="html">When is HttpClient 4.1 GA release planned?
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/HC-4.1-release-date-tp26346264p26346264.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26342346</id>
	<title>NullPointerException in AsyncNHttpClientHandler</title>
	<published>2009-11-13T11:43:28Z</published>
	<updated>2009-11-13T11:43:28Z</updated>
	<author>
		<name>Yongxing Wang-2</name>
	</author>
	<content type="html">Oleg,
&lt;br&gt;&lt;br&gt;I am using http nio/core (version 4.0.1) and I got some NullPointerException when the connection times out. 
&lt;br&gt;&lt;br&gt;[10002 /127.0.0.1:3556] 2009/11/13 11:29:58.665-0800 DEBUG;[nio.impl.HttpIoReactor:218] Unhandled RuntimeException: 
&lt;br&gt;java.lang.NullPointerException
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.nio.protocol.AsyncNHttpClientHandler.timeout(AsyncNHttpClientHandler.java:344)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.DefaultClientIOEventDispatch.timeout(DefaultClientIOEventDispatch.java:158)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.reactor.BaseIOReactor.timeoutCheck(BaseIOReactor.java:255)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:203)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:260)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:96)
&lt;br&gt;&amp;nbsp; &amp;nbsp; at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:556)
&lt;br&gt;&lt;br&gt;Looking at the code, 
&lt;br&gt;&lt;br&gt;ClientConnState connState = (ClientConnState) context.getAttribute(CONN_STATE);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (connState.getOutputState() == ClientConnState.EXPECT_CONTINUE) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }catch(IOException e){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; handleTimeout();
&lt;br&gt;&lt;br&gt;&lt;br&gt;It could happen if the attribute get removed somehow before execution comes here.... It might be safer to check it being NULL or not....
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Yong
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26342346&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26342346&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/NullPointerException-in-AsyncNHttpClientHandler-tp26342346p26342346.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26334684</id>
	<title>Re: redirection in 4.0</title>
	<published>2009-11-13T02:44:14Z</published>
	<updated>2009-11-13T02:44:14Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">Juanjo wrote:
&lt;br&gt;&amp;gt; Hi folks,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any ideas about it? 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I have an idea. How about reading documentation [1] of searching through 
&lt;br&gt;the mail archive [2]
&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;http://hc.markmail.org/search/?q=&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.markmail.org/search/?q=&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt; De: Juanjo [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;juanjogoga@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Enviado el: miércoles, 11 de noviembre de 2009 11:08
&lt;br&gt;&amp;gt; Para: 'HttpClient User Discussion'
&lt;br&gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't know what is Web Server 1.0, it is in the response that it isn`t in
&lt;br&gt;&amp;gt; my hands.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How can I do to disable 'expect-continue'?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It work properly on Windows but not on Linux.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think that the server is a websphere. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt; De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] Enviado el: miércoles, 11 de
&lt;br&gt;&amp;gt; noviembre de 2009 10:55
&lt;br&gt;&amp;gt; Para: HttpClient User Discussion
&lt;br&gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, 2009-11-10 at 18:36 +0100, Juanjo wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi Oleg, thanks for your answer.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; These are the diferences
&lt;br&gt;&amp;gt;&amp;gt; Number 2 under windows is running fine. 
&lt;br&gt;&amp;gt;&amp;gt; The code is the same in boths environment but in the log, there is a 
&lt;br&gt;&amp;gt;&amp;gt; diference in the order that postparams are sent.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ¿any ideas?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For the love of Jesus, what on earth is Web Server 1.0? Whatever that piece
&lt;br&gt;&amp;gt; of software is, it appears to have issues with 'expect-continue'
&lt;br&gt;&amp;gt; handshaking. Interestingly enough, 'expect-continue' appears to work
&lt;br&gt;&amp;gt; properly on Linux and to fail on Windows. So, try disabling
&lt;br&gt;&amp;gt; 'expect-continue' and see if that makes any difference.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; STACK NUMBER 1- LINUX
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.client.DefaultRequestDirector
&lt;br&gt;&amp;gt;&amp;gt; - Attempt 1 to execute request DEBUG http-8080-17 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request:
&lt;br&gt;&amp;gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm;
&lt;br&gt;&amp;gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; POST /posturl HTTP/1.1 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm;
&lt;br&gt;&amp;gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams....&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt;&amp;gt; 16:59:56 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; STACK NUMBER 2 - WINDOWS
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.client.DefaultRequestDirector - 
&lt;br&gt;&amp;gt;&amp;gt; Attempt 1 to execute request DEBUG http-8080-2 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request:
&lt;br&gt;&amp;gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n;
&lt;br&gt;&amp;gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; POST /postrul HTTP/1.1 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com DEBUG
&lt;br&gt;&amp;gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive DEBUG
&lt;br&gt;&amp;gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n;
&lt;br&gt;&amp;gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams...&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt;&amp;gt; org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt;&amp;gt; 16:51:53 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot; 
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt;&amp;gt; De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] Enviado el: martes, 10 
&lt;br&gt;&amp;gt;&amp;gt; de noviembre de 2009 14:08
&lt;br&gt;&amp;gt;&amp;gt; Para: HttpClient User Discussion
&lt;br&gt;&amp;gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The same error.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Juanjo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Use context / wire logging to examine the HTTP session and find out 
&lt;br&gt;&amp;gt;&amp;gt; why your application behaves differently in different environments.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; It connect to a website by post, sending parameters, that return a 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 302. Then, It reads the Location head an makes a Get call.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; head returns the home url, not the right one.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Please help,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Tanks
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Juanjo
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334684&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26334684.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26334660</id>
	<title>Re: jakartacommons-httpclient-3.x: 3 seconds additional latency in response times</title>
	<published>2009-11-13T02:42:31Z</published>
	<updated>2009-11-13T02:42:31Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">Amit M Bhosle wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; occasionally, the response sent by my server arrives at my client after a
&lt;br&gt;&amp;gt; delay of 3 seconds! the delay occurs only occasionally (e.g., 1 in few 100
&lt;br&gt;&amp;gt; or so requests is impacted).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've verified that there's no delay in setting up the connection, and the
&lt;br&gt;&amp;gt; request from the client reaching the server, but the response gets delayed
&lt;br&gt;&amp;gt; for whatever reason. someone pointed me to the TCP 3-way handshake which
&lt;br&gt;&amp;gt; includes the SYN retry (which has a default retry after 3 seconds), and the
&lt;br&gt;&amp;gt; TCP handshake is executed both at connection setup and tear-down stages. but
&lt;br&gt;&amp;gt; I'm not sure if the connection tear-down is blocking for the communication.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm considering moving to persistent connections for other reasons too, but
&lt;br&gt;&amp;gt; that would not help if the tear-down is non-blocking.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; my client uses JakartaCommons-httpclient-3.0.1 , and was wondering if
&lt;br&gt;&amp;gt; there's any known issue with this version.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; any insights/pointers would be appreciated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; thanks
&lt;br&gt;&amp;gt; AB
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;I am nor aware of reports of this kind of problem by other users. 
&lt;br&gt;Regardless, you should consider upgrading to version 4.0
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334660&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26334660&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/jakartacommons-httpclient-3.x%3A-3-seconds-additional-latency-in--response-times-tp26333433p26334660.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26332655</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-12T23:52:27Z</published>
	<updated>2009-11-12T23:52:27Z</updated>
	<author>
		<name>Juanjo-9</name>
	</author>
	<content type="html">Hi folks,
&lt;br&gt;&lt;br&gt;Any ideas about it? 
&lt;br&gt;&lt;br&gt;-----Mensaje original-----
&lt;br&gt;De: Juanjo [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;juanjogoga@...&lt;/a&gt;] 
&lt;br&gt;Enviado el: miércoles, 11 de noviembre de 2009 11:08
&lt;br&gt;Para: 'HttpClient User Discussion'
&lt;br&gt;Asunto: RE: redirection in 4.0
&lt;br&gt;&lt;br&gt;I don't know what is Web Server 1.0, it is in the response that it isn`t in
&lt;br&gt;my hands.
&lt;br&gt;&lt;br&gt;How can I do to disable 'expect-continue'?
&lt;br&gt;&lt;br&gt;It work properly on Windows but not on Linux.
&lt;br&gt;&lt;br&gt;I think that the server is a websphere. 
&lt;br&gt;&lt;br&gt;-----Mensaje original-----
&lt;br&gt;De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] Enviado el: miércoles, 11 de
&lt;br&gt;noviembre de 2009 10:55
&lt;br&gt;Para: HttpClient User Discussion
&lt;br&gt;Asunto: RE: redirection in 4.0
&lt;br&gt;&lt;br&gt;On Tue, 2009-11-10 at 18:36 +0100, Juanjo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Oleg, thanks for your answer.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; These are the diferences
&lt;br&gt;&amp;gt; Number 2 under windows is running fine. 
&lt;br&gt;&amp;gt; The code is the same in boths environment but in the log, there is a 
&lt;br&gt;&amp;gt; diference in the order that postparams are sent.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ¿any ideas?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;For the love of Jesus, what on earth is Web Server 1.0? Whatever that piece
&lt;br&gt;of software is, it appears to have issues with 'expect-continue'
&lt;br&gt;handshaking. Interestingly enough, 'expect-continue' appears to work
&lt;br&gt;properly on Linux and to fail on Windows. So, try disabling
&lt;br&gt;'expect-continue' and see if that makes any difference.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 1- LINUX
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.client.DefaultRequestDirector
&lt;br&gt;&amp;gt; - Attempt 1 to execute request DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request:
&lt;br&gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm;
&lt;br&gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; POST /posturl HTTP/1.1 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm;
&lt;br&gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams....&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt; 16:59:56 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 2 - WINDOWS
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.client.DefaultRequestDirector - 
&lt;br&gt;&amp;gt; Attempt 1 to execute request DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request:
&lt;br&gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n;
&lt;br&gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; POST /postrul HTTP/1.1 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com DEBUG
&lt;br&gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive DEBUG
&lt;br&gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n;
&lt;br&gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams...&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt; 16:51:53 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt; De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] Enviado el: martes, 10 
&lt;br&gt;&amp;gt; de noviembre de 2009 14:08
&lt;br&gt;&amp;gt; Para: HttpClient User Discussion
&lt;br&gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;br&gt;&amp;gt; &amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt; &amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt; &amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt; &amp;gt; The same error.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Use context / wire logging to examine the HTTP session and find out 
&lt;br&gt;&amp;gt; why your application behaves differently in different environments.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. 
&lt;br&gt;&amp;gt; &amp;gt; It connect to a website by post, sending parameters, that return a 
&lt;br&gt;&amp;gt; &amp;gt; 302. Then, It reads the Location head an makes a Get call.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location 
&lt;br&gt;&amp;gt; &amp;gt; head returns the home url, not the right one.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using 
&lt;br&gt;&amp;gt; &amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Please help,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Tanks
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26332655&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26332655.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26333433</id>
	<title>jakartacommons-httpclient-3.x: 3 seconds additional latency in  response times</title>
	<published>2009-11-12T18:42:12Z</published>
	<updated>2009-11-12T18:42:12Z</updated>
	<author>
		<name>bhosle</name>
	</author>
	<content type="html">Hi:
&lt;br&gt;&lt;br&gt;occasionally, the response sent by my server arrives at my client after a
&lt;br&gt;delay of 3 seconds! the delay occurs only occasionally (e.g., 1 in few 100
&lt;br&gt;or so requests is impacted).
&lt;br&gt;&lt;br&gt;I've verified that there's no delay in setting up the connection, and the
&lt;br&gt;request from the client reaching the server, but the response gets delayed
&lt;br&gt;for whatever reason. someone pointed me to the TCP 3-way handshake which
&lt;br&gt;includes the SYN retry (which has a default retry after 3 seconds), and the
&lt;br&gt;TCP handshake is executed both at connection setup and tear-down stages. but
&lt;br&gt;I'm not sure if the connection tear-down is blocking for the communication.
&lt;br&gt;&lt;br&gt;I'm considering moving to persistent connections for other reasons too, but
&lt;br&gt;that would not help if the tear-down is non-blocking.
&lt;br&gt;&lt;br&gt;my client uses JakartaCommons-httpclient-3.0.1 , and was wondering if
&lt;br&gt;there's any known issue with this version.
&lt;br&gt;&lt;br&gt;any insights/pointers would be appreciated.
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;AB
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/jakartacommons-httpclient-3.x%3A-3-seconds-additional-latency-in--response-times-tp26333433p26333433.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26326693</id>
	<title>Re: MultipartEntity and HttpMultipart</title>
	<published>2009-11-12T13:24:07Z</published>
	<updated>2009-11-12T13:24:07Z</updated>
	<author>
		<name>Scott Yeadon</name>
	</author>
	<content type="html">Hi Oleg,
&lt;br&gt;&lt;br&gt;Yes, that answers my question, thanks.
&lt;br&gt;&lt;br&gt;Scott.
&lt;br&gt;&lt;br&gt;Oleg Kalnichevski wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, 2009-11-12 at 15:47 +1100, Scott Yeadon wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Using HTTP components 4.0 I wanted to create a POST request using the 
&lt;br&gt;&amp;gt;&amp;gt; multipart/mixed content type. However the MultipartEntity does not allow 
&lt;br&gt;&amp;gt;&amp;gt; the contentType to be set and is hardcoded to multipart/form-data. 
&lt;br&gt;&amp;gt;&amp;gt; Looking through the API it looks as though the HttpMultipart class (and 
&lt;br&gt;&amp;gt;&amp;gt; its associated classes) are available to address the various multipart 
&lt;br&gt;&amp;gt;&amp;gt; media types, however it appears to be incompatible with HttpPost addPart 
&lt;br&gt;&amp;gt;&amp;gt; method as HttpMultipart does not implement the HttpEntity interface. I 
&lt;br&gt;&amp;gt;&amp;gt; could not locate an obvious class used for request handling for 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;HttpMultipart&amp;quot;-based requests. It appears the simplest means to POST a 
&lt;br&gt;&amp;gt;&amp;gt; request with multipart/mixed contentType is to create a new entity class 
&lt;br&gt;&amp;gt;&amp;gt; implementing HttpEntity (e.g. MultipartMixedEntity) - is that correct or 
&lt;br&gt;&amp;gt;&amp;gt; are there other means of doing this with the 4.0 API?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You will be better off just overriding the #generateContentTypre method
&lt;br&gt;&amp;gt; of the MultipartEntity class.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Also, what is the relation between these sets of entity classes - the 
&lt;br&gt;&amp;gt;&amp;gt; HttpEntity implentations appear in the &amp;quot;entity&amp;quot; package and the others 
&lt;br&gt;&amp;gt;&amp;gt; appear in the &amp;quot;mime&amp;quot; package? Is there some sort of de-lineation or 
&lt;br&gt;&amp;gt;&amp;gt; usage rules for these classes I should be aware of?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; HttpMime is somewhat special because it is not fully API stable due to
&lt;br&gt;&amp;gt; its dependency on Mime4j, which is still considered API unstable. &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hope this answers your question.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Scott.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26326693&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MultipartEntity-and-HttpMultipart-tp26313423p26326693.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26324816</id>
	<title>Re: Poor performance of pooled connections worse in 4.0</title>
	<published>2009-11-12T11:27:00Z</published>
	<updated>2009-11-12T11:27:00Z</updated>
	<author>
		<name>Jared Jacobs-2</name>
	</author>
	<content type="html">Hi Tony.
&lt;br&gt;&lt;br&gt;Oleg was right to question my initial benchmark. In the connection pool
&lt;br&gt;benchmark, I was only issuing one request per thread, and contrary to my
&lt;br&gt;intuition, each thread runs slowly at first, even if other threads have
&lt;br&gt;already run the same code (i.e. it has already been JIT compiled).
&lt;br&gt;Subsequent requests in each thread were much faster. It didn't take anywhere
&lt;br&gt;near 10,000 requests to reach stable, optimal performance, though. The
&lt;br&gt;second and third requests in each thread, for example, were just as fast as
&lt;br&gt;the rest.
&lt;br&gt;&lt;br&gt;You might be wondering if the slowness of the first request that I'm talking
&lt;br&gt;about can be attributed to establishing an HTTP connection that is then
&lt;br&gt;reused by subsequent requests. Nope. I saw the same effect even when using a
&lt;br&gt;new HttpClient per request (i.e. no connection pooling or reuse).
&lt;br&gt;&lt;br&gt;Initially, my observations on one of our production servers rose two
&lt;br&gt;questions in my mind:
&lt;br&gt;1) Is the overhead for pooling and reusing connections greater than the
&lt;br&gt;overhead of establishing new HTTP connections?
&lt;br&gt;2) Is the performance of pooled connections significantly worse in
&lt;br&gt;HttpClient 4.0 than in 3.1?
&lt;br&gt;&lt;br&gt;After improving my benchmarks, I've concluded that, in general, the answer
&lt;br&gt;to both questions is &amp;quot;no&amp;quot; (as one would expect). Reusing connections
&lt;br&gt;increases throughput a bit when there's a steady stream of requests that
&lt;br&gt;need to be made to a particular host, and 4.0's
&lt;br&gt;ThreadSafeClientConnManager performs
&lt;br&gt;roughly as well as 3.1's MultiThreadedHttpConnectionManager. Our server that
&lt;br&gt;was having problems was both low on memory and occasionally CPU bound. I
&lt;br&gt;believe it was those conditions that made 4.0's ThreadSafeClientConnManager
&lt;br&gt;slow for us when we first switched to it in production.
&lt;br&gt;&lt;br&gt;I'm still not certain which configuration minimizes request latency when
&lt;br&gt;requests need to made to a single host pretty often, but at random times. I
&lt;br&gt;hope to have the time to answer this question for our use case by
&lt;br&gt;experimentation in the coming week.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Jared
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Nov 12, 2009 at 5:38 AM, Tony Poppleton
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324816&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tony.poppleton@...&lt;/a&gt;&amp;gt;wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Jared,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I would be very interested to know if you have made any further progress on
&lt;br&gt;&amp;gt; this potential problem.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Tony
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Jared Jacobs wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks again for your response, Oleg.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; We're dealing with a latency problem. The total duration of each and every
&lt;br&gt;&amp;gt;&amp;gt; request needs to be reliably small. Throughput isn't very important in our
&lt;br&gt;&amp;gt;&amp;gt; application.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I'll get to the bottom of the issue with some profiling.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt; Jared
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; Orange vous informe que cet &amp;nbsp;e-mail a ete controle par l'anti-virus mail.
&lt;br&gt;&amp;gt;&amp;gt; Aucun virus connu a ce jour par nos services n'a ete detecte.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324816&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324816&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Poor-performance-of-pooled-connections-worse-in-4.0-tp26207729p26324816.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26324256</id>
	<title>Re: httpclient and mulitthreaded connection manager</title>
	<published>2009-11-12T10:47:42Z</published>
	<updated>2009-11-12T10:47:42Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">monmohan wrote:
&lt;br&gt;&amp;gt; thanks for the response.
&lt;br&gt;&amp;gt; I have observed that whenever the number of simultaneous threads is close to
&lt;br&gt;&amp;gt; the max limit, the threads go to infinite waiting state. Is this a known
&lt;br&gt;&amp;gt; issue? 
&lt;br&gt;&lt;br&gt;HttpClient 3.x is not known to have such an issue. Most likely your 
&lt;br&gt;application code leaks connections by failing to release them back to 
&lt;br&gt;the pool.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;I am running on Ubuntu Linux, sun jdk 1.5, http client 3.0.1
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; regards
&lt;br&gt;&amp;gt; Monmohan
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; olegk wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Wed, 2009-11-11 at 18:36 -0800, monmohan wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I need to implement a scenario where a http request is sent to the same
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; host
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; by multiple threads and requires login but the login credentials are
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; always
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; same. In order to avoid logging in all the time I am planning to use a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; single instance of HTTPClient with a multithreaded connection manager.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; However, while testing I ran into scenarios where different threads were
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; waiting infinitely for a connection. This seems to happen when the number
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; threads is close to the maximum number of connections set up for the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; connection manager. In general what is the connection pooling strategy
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; for
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; this connection manager? Does the pool grow in size as the number of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; simultaneous requests are greater than the configured pool size?
&lt;br&gt;&amp;gt;&amp;gt; No, it does not. The connection pool will not grow beyond the max limit.
&lt;br&gt;&amp;gt;&amp;gt; This is the whole point of having a max limit in the first place.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp;Is there an
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; alternate way to achieve what I am trying to do?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; regards
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Monmohan
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324256&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324256&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324256&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26324256&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/httpclient-and-mulitthreaded-connection-manager-tp26312457p26324256.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318822</id>
	<title>Re: Poor performance of pooled connections worse in 4.0</title>
	<published>2009-11-12T05:38:50Z</published>
	<updated>2009-11-12T05:38:50Z</updated>
	<author>
		<name>Tony Poppleton-2</name>
	</author>
	<content type="html">Hi Jared,
&lt;br&gt;&lt;br&gt;I would be very interested to know if you have made any further progress 
&lt;br&gt;on this potential problem.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Tony
&lt;br&gt;&lt;br&gt;Jared Jacobs wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks again for your response, Oleg.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; We're dealing with a latency problem. The total duration of each and every
&lt;br&gt;&amp;gt; request needs to be reliably small. Throughput isn't very important in our
&lt;br&gt;&amp;gt; application.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'll get to the bottom of the issue with some profiling.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Jared
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Orange vous informe que cet &amp;nbsp;e-mail a ete controle par l'anti-virus mail. 
&lt;br&gt;&amp;gt; Aucun virus connu a ce jour par nos services n'a ete detecte.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318822&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318822&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Poor-performance-of-pooled-connections-worse-in-4.0-tp26207729p26318822.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318632</id>
	<title>Re: httpclient and mulitthreaded connection manager</title>
	<published>2009-11-12T05:25:55Z</published>
	<updated>2009-11-12T05:25:55Z</updated>
	<author>
		<name>monmohan</name>
	</author>
	<content type="html">thanks for the response.
&lt;br&gt;I have observed that whenever the number of simultaneous threads is close to the max limit, the threads go to infinite waiting state. Is this a known issue? I am running on Ubuntu Linux, sun jdk 1.5, http client 3.0.1
&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;Monmohan
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;olegk wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On Wed, 2009-11-11 at 18:36 -0800, monmohan wrote:
&lt;br&gt;&amp;gt; I need to implement a scenario where a http request is sent to the same host
&lt;br&gt;&amp;gt; by multiple threads and requires login but the login credentials are always
&lt;br&gt;&amp;gt; same. In order to avoid logging in all the time I am planning to use a
&lt;br&gt;&amp;gt; single instance of HTTPClient with a multithreaded connection manager.
&lt;br&gt;&amp;gt; However, while testing I ran into scenarios where different threads were
&lt;br&gt;&amp;gt; waiting infinitely for a connection. This seems to happen when the number of
&lt;br&gt;&amp;gt; threads is close to the maximum number of connections set up for the
&lt;br&gt;&amp;gt; connection manager. In general what is the connection pooling strategy for
&lt;br&gt;&amp;gt; this connection manager? Does the pool grow in size as the number of
&lt;br&gt;&amp;gt; simultaneous requests are greater than the configured pool size?
&lt;br&gt;&lt;br&gt;No, it does not. The connection pool will not grow beyond the max limit.
&lt;br&gt;This is the whole point of having a max limit in the first place.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;Is there an
&lt;br&gt;&amp;gt; alternate way to achieve what I am trying to do?
&lt;br&gt;&amp;gt; regards
&lt;br&gt;&amp;gt; Monmohan
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
&lt;br&gt;For additional commands, e-mail: httpclient-users-help@hc.apache.org
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/httpclient-and-mulitthreaded-connection-manager-tp26312457p26318632.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26318063</id>
	<title>RE: bidirectional communication based on HttpDefaultClient</title>
	<published>2009-11-12T04:47:35Z</published>
	<updated>2009-11-12T04:47:35Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Thu, 2009-11-12 at 09:55 +0100, Simeon Mitev wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Oleg,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When I use a common socket communication I can get InputStream and
&lt;br&gt;&amp;gt; OutputStream from the connection. Then I am able to read and write as many
&lt;br&gt;&amp;gt; times I need without closing the connection at all.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The same I need to do over http and have it done many times but without
&lt;br&gt;&amp;gt; using httpclient component up to now. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Let say the scenario is as follows:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1. there are 2 applications (A and B)
&lt;br&gt;&amp;gt; 2. A posts data (HTTP POST) to B
&lt;br&gt;&amp;gt; 3. B posts back to A the data received (2) plus providing an authentication
&lt;br&gt;&amp;gt; key
&lt;br&gt;&amp;gt; 4. A compares what has been initially sent (2) against what has been
&lt;br&gt;&amp;gt; recently received from B (3)
&lt;br&gt;&amp;gt; 5. A responses back to B with OK or FALSE
&lt;br&gt;&amp;gt; 6. A checks whether the status for the last post (5) is HTTP 200 OK (the
&lt;br&gt;&amp;gt; request has been properly received from B)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I can do this only using socket connection but then I need to deal with all
&lt;br&gt;&amp;gt; HTTP protocol's stuffs. Therefore I want to use org.apache.httpcomponents in
&lt;br&gt;&amp;gt; order to facilitate the work. The whole communication described must be done
&lt;br&gt;&amp;gt; without session tracing and using the same connection initially established
&lt;br&gt;&amp;gt; by application A. Finally, A is responsible to close it.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;That would be a direct violation, or at the very least bastardization,
&lt;br&gt;of the HTTP protocol. HttpClient cannot be used to support such a
&lt;br&gt;scenario and I doubt any of the existing HTTP clients could. 
&lt;br&gt;&lt;br&gt;If you are absolutely sure you need to pervert HTTP in this way your
&lt;br&gt;only option seems to be using HttpCore low level classes.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; @Simeon
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Sent: Mittwoch, 11. November 2009 20:55
&lt;br&gt;&amp;gt; To: HttpClient User Discussion
&lt;br&gt;&amp;gt; Subject: Re: bidirectional communication based on HttpDefaultClient
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Simeon Mitev wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi guys,
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I am pretty new to the mailing list and I already have a question :-)
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; If you are familiar with PayPal instant payment notifications (IPN) you
&lt;br&gt;&amp;gt; &amp;gt; probably know the mechanism:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 1.	PayPal server sends (http post) a notification to provide by the
&lt;br&gt;&amp;gt; &amp;gt; customer URL.
&lt;br&gt;&amp;gt; &amp;gt; 2.	The receiver is obligated to send back received data and provide
&lt;br&gt;&amp;gt; &amp;gt; a secured key in addition.
&lt;br&gt;&amp;gt; &amp;gt; 3.	PayPal server validates and confirms whether the data has been
&lt;br&gt;&amp;gt; &amp;gt; really sent by him and whether the data is properly parsed by the
&lt;br&gt;&amp;gt; &amp;gt; receiver.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I need to implement the same kind of proof of receive via http and the
&lt;br&gt;&amp;gt; &amp;gt; question is how can I do this using 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; HttpDefaultClient, HttpPost and ResponseHandler ? 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Is it possible once to open communication channels (read and write) and
&lt;br&gt;&amp;gt; &amp;gt; then reuse them until the communication between both sides completes?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am not entirely sure I understand the question. Of course, HttpClient 
&lt;br&gt;&amp;gt; supports bidirectional communication as required by the HTTP spec. 
&lt;br&gt;&amp;gt; However, HTTP protocol is based on the concept of request / response 
&lt;br&gt;&amp;gt; exchanges. The client must issue a request in order to get a response 
&lt;br&gt;&amp;gt; from the server, or, in other words, HTTP client is always an initiator 
&lt;br&gt;&amp;gt; of a request / response exchange.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For details on HttpClient programming see:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hope this helps
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Thanks 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; @Simeon
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26318063&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bidirectional-communication-based-on-HttpDefaultClient-tp26300484p26318063.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26317940</id>
	<title>Re: MultipartEntity and HttpMultipart</title>
	<published>2009-11-12T04:38:22Z</published>
	<updated>2009-11-12T04:38:22Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Thu, 2009-11-12 at 15:47 +1100, Scott Yeadon wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Using HTTP components 4.0 I wanted to create a POST request using the 
&lt;br&gt;&amp;gt; multipart/mixed content type. However the MultipartEntity does not allow 
&lt;br&gt;&amp;gt; the contentType to be set and is hardcoded to multipart/form-data. 
&lt;br&gt;&amp;gt; Looking through the API it looks as though the HttpMultipart class (and 
&lt;br&gt;&amp;gt; its associated classes) are available to address the various multipart 
&lt;br&gt;&amp;gt; media types, however it appears to be incompatible with HttpPost addPart 
&lt;br&gt;&amp;gt; method as HttpMultipart does not implement the HttpEntity interface. I 
&lt;br&gt;&amp;gt; could not locate an obvious class used for request handling for 
&lt;br&gt;&amp;gt; &amp;quot;HttpMultipart&amp;quot;-based requests. It appears the simplest means to POST a 
&lt;br&gt;&amp;gt; request with multipart/mixed contentType is to create a new entity class 
&lt;br&gt;&amp;gt; implementing HttpEntity (e.g. MultipartMixedEntity) - is that correct or 
&lt;br&gt;&amp;gt; are there other means of doing this with the 4.0 API?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;You will be better off just overriding the #generateContentTypre method
&lt;br&gt;of the MultipartEntity class.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Also, what is the relation between these sets of entity classes - the 
&lt;br&gt;&amp;gt; HttpEntity implentations appear in the &amp;quot;entity&amp;quot; package and the others 
&lt;br&gt;&amp;gt; appear in the &amp;quot;mime&amp;quot; package? Is there some sort of de-lineation or 
&lt;br&gt;&amp;gt; usage rules for these classes I should be aware of?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;HttpMime is somewhat special because it is not fully API stable due to
&lt;br&gt;its dependency on Mime4j, which is still considered API unstable. &amp;nbsp;
&lt;br&gt;&lt;br&gt;Hope this answers your question.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Scott.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317940&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317940&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317940&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317940&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MultipartEntity-and-HttpMultipart-tp26313423p26317940.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26317859</id>
	<title>Re: httpclient and mulitthreaded connection manager</title>
	<published>2009-11-12T04:32:04Z</published>
	<updated>2009-11-12T04:32:04Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Wed, 2009-11-11 at 18:36 -0800, monmohan wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I need to implement a scenario where a http request is sent to the same host
&lt;br&gt;&amp;gt; by multiple threads and requires login but the login credentials are always
&lt;br&gt;&amp;gt; same. In order to avoid logging in all the time I am planning to use a
&lt;br&gt;&amp;gt; single instance of HTTPClient with a multithreaded connection manager.
&lt;br&gt;&amp;gt; However, while testing I ran into scenarios where different threads were
&lt;br&gt;&amp;gt; waiting infinitely for a connection. This seems to happen when the number of
&lt;br&gt;&amp;gt; threads is close to the maximum number of connections set up for the
&lt;br&gt;&amp;gt; connection manager. In general what is the connection pooling strategy for
&lt;br&gt;&amp;gt; this connection manager? Does the pool grow in size as the number of
&lt;br&gt;&amp;gt; simultaneous requests are greater than the configured pool size?
&lt;/div&gt;&lt;br&gt;No, it does not. The connection pool will not grow beyond the max limit.
&lt;br&gt;This is the whole point of having a max limit in the first place.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;Is there an
&lt;br&gt;&amp;gt; alternate way to achieve what I am trying to do?
&lt;br&gt;&amp;gt; regards
&lt;br&gt;&amp;gt; Monmohan
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317859&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26317859&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/httpclient-and-mulitthreaded-connection-manager-tp26312457p26317859.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26315396</id>
	<title>RE: bidirectional communication based on HttpDefaultClient</title>
	<published>2009-11-12T00:55:01Z</published>
	<updated>2009-11-12T00:55:01Z</updated>
	<author>
		<name>coderman</name>
	</author>
	<content type="html">Hi Oleg,
&lt;br&gt;&lt;br&gt;When I use a common socket communication I can get InputStream and
&lt;br&gt;OutputStream from the connection. Then I am able to read and write as many
&lt;br&gt;times I need without closing the connection at all.
&lt;br&gt;&lt;br&gt;The same I need to do over http and have it done many times but without
&lt;br&gt;using httpclient component up to now. 
&lt;br&gt;&lt;br&gt;Let say the scenario is as follows:
&lt;br&gt;&lt;br&gt;1. there are 2 applications (A and B)
&lt;br&gt;2. A posts data (HTTP POST) to B
&lt;br&gt;3. B posts back to A the data received (2) plus providing an authentication
&lt;br&gt;key
&lt;br&gt;4. A compares what has been initially sent (2) against what has been
&lt;br&gt;recently received from B (3)
&lt;br&gt;5. A responses back to B with OK or FALSE
&lt;br&gt;6. A checks whether the status for the last post (5) is HTTP 200 OK (the
&lt;br&gt;request has been properly received from B)
&lt;br&gt;&lt;br&gt;I can do this only using socket connection but then I need to deal with all
&lt;br&gt;HTTP protocol's stuffs. Therefore I want to use org.apache.httpcomponents in
&lt;br&gt;order to facilitate the work. The whole communication described must be done
&lt;br&gt;without session tracing and using the same connection initially established
&lt;br&gt;by application A. Finally, A is responsible to close it.
&lt;br&gt;&lt;br&gt;@Simeon
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26315396&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;Sent: Mittwoch, 11. November 2009 20:55
&lt;br&gt;To: HttpClient User Discussion
&lt;br&gt;Subject: Re: bidirectional communication based on HttpDefaultClient
&lt;br&gt;&lt;br&gt;Simeon Mitev wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am pretty new to the mailing list and I already have a question :-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you are familiar with PayPal instant payment notifications (IPN) you
&lt;br&gt;&amp;gt; probably know the mechanism:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1.	PayPal server sends (http post) a notification to provide by the
&lt;br&gt;&amp;gt; customer URL.
&lt;br&gt;&amp;gt; 2.	The receiver is obligated to send back received data and provide
&lt;br&gt;&amp;gt; a secured key in addition.
&lt;br&gt;&amp;gt; 3.	PayPal server validates and confirms whether the data has been
&lt;br&gt;&amp;gt; really sent by him and whether the data is properly parsed by the
&lt;br&gt;&amp;gt; receiver.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I need to implement the same kind of proof of receive via http and the
&lt;br&gt;&amp;gt; question is how can I do this using 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HttpDefaultClient, HttpPost and ResponseHandler ? 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is it possible once to open communication channels (read and write) and
&lt;br&gt;&amp;gt; then reuse them until the communication between both sides completes?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;/div&gt;&lt;br&gt;I am not entirely sure I understand the question. Of course, HttpClient 
&lt;br&gt;supports bidirectional communication as required by the HTTP spec. 
&lt;br&gt;However, HTTP protocol is based on the concept of request / response 
&lt;br&gt;exchanges. The client must issue a request in order to get a response 
&lt;br&gt;from the server, or, in other words, HTTP client is always an initiator 
&lt;br&gt;of a request / response exchange.
&lt;br&gt;&lt;br&gt;For details on HttpClient programming see:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Hope this helps
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; @Simeon
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26315396&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26315396&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26315396&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26315396&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bidirectional-communication-based-on-HttpDefaultClient-tp26300484p26315396.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26314831</id>
	<title>Re: Get Server Certificates using HttpClient via Proxy connection</title>
	<published>2009-11-12T00:00:19Z</published>
	<updated>2009-11-12T00:00:19Z</updated>
	<author>
		<name>juliusdavies</name>
	</author>
	<content type="html">Thanks for the plug, Oleg!
&lt;br&gt;&lt;br&gt;To get server certs through a proxy:
&lt;br&gt;&lt;br&gt;java -jar not-yet-commons-ssl-0.3.11.jar
&lt;br&gt;&lt;br&gt;&lt;br&gt;That should print out usage note. &amp;nbsp;Look for &amp;quot; &amp;nbsp;-r &amp;nbsp;--proxy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;
&lt;br&gt;command-line switches.
&lt;br&gt;&lt;br&gt;Not-yet-commons-ssl knows nothing about NTLM, but probably the server
&lt;br&gt;will give out its certificate before the NTLM happens.
&lt;br&gt;&lt;br&gt;&lt;br&gt;I feel extremely anal / pedantic for mentioning this, but hey, any
&lt;br&gt;involvement with SSL or security demands it: &amp;nbsp;you are vulnerable to a
&lt;br&gt;man-in-the-middle giving out a fake certificate in this moment. &amp;nbsp;It's
&lt;br&gt;better to get certificates you intend to trust &amp;quot;out-of-band&amp;quot;, or at
&lt;br&gt;least verify their signatures out-of-band (e.g. over a telephone line
&lt;br&gt;talking to server admin from the other side directly).
&lt;br&gt;&lt;br&gt;&lt;br&gt;yours,
&lt;br&gt;&lt;br&gt;Julius
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Nov 10, 2009 at 5:05 AM, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26314831&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, 2009-11-10 at 00:51 -0800, DUset wrote:
&lt;br&gt;&amp;gt;&amp;gt; Anyone could you help me to get server certificates using HttpClient using
&lt;br&gt;&amp;gt;&amp;gt; proxy connection.(I need to use NTLM authentication Scheme for Proxy
&lt;br&gt;&amp;gt;&amp;gt; aunthentication ).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; HttpClient cannot be used to retrieve SSL certificates. I recommend
&lt;br&gt;&amp;gt; using this utility for that:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://juliusdavies.ca/commons-ssl/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://juliusdavies.ca/commons-ssl/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26314831&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26314831&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;yours,
&lt;br&gt;&lt;br&gt;Julius Davies
&lt;br&gt;250-592-2284 (Home)
&lt;br&gt;250-893-4579 (Mobile)
&lt;br&gt;&lt;a href=&quot;http://juliusdavies.ca/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://juliusdavies.ca/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26314831&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26314831&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Get-Server-Certificates-using-HttpClient-via-Proxy-connection-tp26280095p26314831.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26313423</id>
	<title>MultipartEntity and HttpMultipart</title>
	<published>2009-11-11T20:47:58Z</published>
	<updated>2009-11-11T20:47:58Z</updated>
	<author>
		<name>Scott Yeadon</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Using HTTP components 4.0 I wanted to create a POST request using the 
&lt;br&gt;multipart/mixed content type. However the MultipartEntity does not allow 
&lt;br&gt;the contentType to be set and is hardcoded to multipart/form-data. 
&lt;br&gt;Looking through the API it looks as though the HttpMultipart class (and 
&lt;br&gt;its associated classes) are available to address the various multipart 
&lt;br&gt;media types, however it appears to be incompatible with HttpPost addPart 
&lt;br&gt;method as HttpMultipart does not implement the HttpEntity interface. I 
&lt;br&gt;could not locate an obvious class used for request handling for 
&lt;br&gt;&amp;quot;HttpMultipart&amp;quot;-based requests. It appears the simplest means to POST a 
&lt;br&gt;request with multipart/mixed contentType is to create a new entity class 
&lt;br&gt;implementing HttpEntity (e.g. MultipartMixedEntity) - is that correct or 
&lt;br&gt;are there other means of doing this with the 4.0 API?
&lt;br&gt;&lt;br&gt;Also, what is the relation between these sets of entity classes - the 
&lt;br&gt;HttpEntity implentations appear in the &amp;quot;entity&amp;quot; package and the others 
&lt;br&gt;appear in the &amp;quot;mime&amp;quot; package? Is there some sort of de-lineation or 
&lt;br&gt;usage rules for these classes I should be aware of?
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;Scott.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26313423&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26313423&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MultipartEntity-and-HttpMultipart-tp26313423p26313423.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26312457</id>
	<title>httpclient and mulitthreaded connection manager</title>
	<published>2009-11-11T18:36:18Z</published>
	<updated>2009-11-11T18:36:18Z</updated>
	<author>
		<name>monmohan</name>
	</author>
	<content type="html">I need to implement a scenario where a http request is sent to the same host by multiple threads and requires login but the login credentials are always same. In order to avoid logging in all the time I am planning to use a single instance of HTTPClient with a multithreaded connection manager. However, while testing I ran into scenarios where different threads were waiting infinitely for a connection. This seems to happen when the number of threads is close to the maximum number of connections set up for the connection manager. In general what is the connection pooling strategy for this connection manager? Does the pool grow in size as the number of simultaneous requests are greater than the configured pool size? Is there an alternate way to achieve what I am trying to do?
&lt;br&gt;regards
&lt;br&gt;Monmohan</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/httpclient-and-mulitthreaded-connection-manager-tp26312457p26312457.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26307480</id>
	<title>Re: bidirectional communication based on HttpDefaultClient</title>
	<published>2009-11-11T11:54:45Z</published>
	<updated>2009-11-11T11:54:45Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">Simeon Mitev wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am pretty new to the mailing list and I already have a question :-)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you are familiar with PayPal instant payment notifications (IPN) you
&lt;br&gt;&amp;gt; probably know the mechanism:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1.	PayPal server sends (http post) a notification to provide by the
&lt;br&gt;&amp;gt; customer URL.
&lt;br&gt;&amp;gt; 2.	The receiver is obligated to send back received data and provide
&lt;br&gt;&amp;gt; a secured key in addition.
&lt;br&gt;&amp;gt; 3.	PayPal server validates and confirms whether the data has been
&lt;br&gt;&amp;gt; really sent by him and whether the data is properly parsed by the
&lt;br&gt;&amp;gt; receiver.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I need to implement the same kind of proof of receive via http and the
&lt;br&gt;&amp;gt; question is how can I do this using 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HttpDefaultClient, HttpPost and ResponseHandler ? 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is it possible once to open communication channels (read and write) and
&lt;br&gt;&amp;gt; then reuse them until the communication between both sides completes?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;/div&gt;&lt;br&gt;I am not entirely sure I understand the question. Of course, HttpClient 
&lt;br&gt;supports bidirectional communication as required by the HTTP spec. 
&lt;br&gt;However, HTTP protocol is based on the concept of request / response 
&lt;br&gt;exchanges. The client must issue a request in order to get a response 
&lt;br&gt;from the server, or, in other words, HTTP client is always an initiator 
&lt;br&gt;of a request / response exchange.
&lt;br&gt;&lt;br&gt;For details on HttpClient programming see:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Hope this helps
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Thanks 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; @Simeon
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26307480&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26307480&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bidirectional-communication-based-on-HttpDefaultClient-tp26300484p26307480.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26300484</id>
	<title>bidirectional communication based on HttpDefaultClient</title>
	<published>2009-11-11T04:29:47Z</published>
	<updated>2009-11-11T04:29:47Z</updated>
	<author>
		<name>coderman</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;&lt;br&gt;Hi guys,
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;I am pretty new to the mailing list and I already have a question :-)
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;If you are familiar with PayPal instant payment notifications (IPN) you
&lt;br&gt;probably know the mechanism:
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;1.	PayPal server sends (http post) a notification to provide by the
&lt;br&gt;customer URL.
&lt;br&gt;2.	The receiver is obligated to send back received data and provide
&lt;br&gt;a secured key in addition.
&lt;br&gt;3.	PayPal server validates and confirms whether the data has been
&lt;br&gt;really sent by him and whether the data is properly parsed by the
&lt;br&gt;receiver.
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;I need to implement the same kind of proof of receive via http and the
&lt;br&gt;question is how can I do this using 
&lt;br&gt;&lt;br&gt;HttpDefaultClient, HttpPost and ResponseHandler ? 
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Is it possible once to open communication channels (read and write) and
&lt;br&gt;then reuse them until the communication between both sides completes?
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks 
&lt;br&gt;&lt;br&gt;@Simeon
&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/bidirectional-communication-based-on-HttpDefaultClient-tp26300484p26300484.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26298885</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-11T02:07:38Z</published>
	<updated>2009-11-11T02:07:38Z</updated>
	<author>
		<name>Juanjo-9</name>
	</author>
	<content type="html">I don't know what is Web Server 1.0, it is in the response that it isn`t in
&lt;br&gt;my hands.
&lt;br&gt;&lt;br&gt;How can I do to disable 'expect-continue'?
&lt;br&gt;&lt;br&gt;It work properly on Windows but not on Linux.
&lt;br&gt;&lt;br&gt;I think that the server is a websphere. 
&lt;br&gt;&lt;br&gt;-----Mensaje original-----
&lt;br&gt;De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;Enviado el: miércoles, 11 de noviembre de 2009 10:55
&lt;br&gt;Para: HttpClient User Discussion
&lt;br&gt;Asunto: RE: redirection in 4.0
&lt;br&gt;&lt;br&gt;On Tue, 2009-11-10 at 18:36 +0100, Juanjo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Oleg, thanks for your answer.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; These are the diferences
&lt;br&gt;&amp;gt; Number 2 under windows is running fine. 
&lt;br&gt;&amp;gt; The code is the same in boths environment but in the log, there is a 
&lt;br&gt;&amp;gt; diference in the order that postparams are sent.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ¿any ideas?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;For the love of Jesus, what on earth is Web Server 1.0? Whatever that piece
&lt;br&gt;of software is, it appears to have issues with 'expect-continue'
&lt;br&gt;handshaking. Interestingly enough, 'expect-continue' appears to work
&lt;br&gt;properly on Linux and to fail on Windows. So, try disabling
&lt;br&gt;'expect-continue' and see if that makes any difference.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 1- LINUX
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.client.DefaultRequestDirector 
&lt;br&gt;&amp;gt; - Attempt 1 to execute request DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request: 
&lt;br&gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; 
&lt;br&gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; POST /posturl HTTP/1.1 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; 
&lt;br&gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-17 
&lt;br&gt;&amp;gt; org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams....&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt; 16:59:56 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 2 - WINDOWS
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.client.DefaultRequestDirector - 
&lt;br&gt;&amp;gt; Attempt 1 to execute request DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.impl.conn.DefaultClientConnection - Sending request: 
&lt;br&gt;&amp;gt; POST /posturl HTTP/1.1 DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; 
&lt;br&gt;&amp;gt; systemKey=www.web.com; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; POST /postrul HTTP/1.1 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com DEBUG 
&lt;br&gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive DEBUG 
&lt;br&gt;&amp;gt; http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; 
&lt;br&gt;&amp;gt; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams...&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection - 
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue DEBUG http-8080-2 
&lt;br&gt;&amp;gt; org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009 
&lt;br&gt;&amp;gt; 16:51:53 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt; De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] Enviado el: martes, 10 
&lt;br&gt;&amp;gt; de noviembre de 2009 14:08
&lt;br&gt;&amp;gt; Para: HttpClient User Discussion
&lt;br&gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;br&gt;&amp;gt; &amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt; &amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt; &amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt; &amp;gt; The same error.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Use context / wire logging to examine the HTTP session and find out 
&lt;br&gt;&amp;gt; why your application behaves differently in different environments.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. 
&lt;br&gt;&amp;gt; &amp;gt; It connect to a website by post, sending parameters, that return a 
&lt;br&gt;&amp;gt; &amp;gt; 302. Then, It reads the Location head an makes a Get call.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location 
&lt;br&gt;&amp;gt; &amp;gt; head returns the home url, not the right one.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using 
&lt;br&gt;&amp;gt; &amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Please help,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Tanks
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298885&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26298885.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26298732</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-11T01:54:34Z</published>
	<updated>2009-11-11T01:54:34Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Tue, 2009-11-10 at 18:36 +0100, Juanjo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Oleg, thanks for your answer.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; These are the diferences
&lt;br&gt;&amp;gt; Number 2 under windows is running fine. 
&lt;br&gt;&amp;gt; The code is the same in boths environment but in the log, there is a
&lt;br&gt;&amp;gt; diference in the order that postparams are sent.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ¿any ideas?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;For the love of Jesus, what on earth is Web Server 1.0? Whatever that
&lt;br&gt;piece of software is, it appears to have issues with 'expect-continue'
&lt;br&gt;handshaking. Interestingly enough, 'expect-continue' appears to work
&lt;br&gt;properly on Linux and to fail on Windows. So, try disabling
&lt;br&gt;'expect-continue' and see if that makes any difference.
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 1- LINUX
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.client.DefaultRequestDirector -
&lt;br&gt;&amp;gt; Attempt 1 to execute request
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;&amp;gt; Sending request: POST /posturl HTTP/1.1
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; POST /posturl HTTP/1.1
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams....&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;&amp;gt; 16:59:56 GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; STACK NUMBER 2 - WINDOWS
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.client.DefaultRequestDirector -
&lt;br&gt;&amp;gt; Attempt 1 to execute request
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;&amp;gt; Sending request: POST /posturl HTTP/1.1
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; POST /postrul HTTP/1.1
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;&amp;gt; application/x-www-form-urlencoded
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;&amp;gt; Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;&amp;gt; JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; systemKey=www.web.com;
&lt;br&gt;&amp;gt; DC-Cookie=DC2
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams...&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;&amp;gt; Receiving response: HTTP/1.1 100 Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009 16:51:53
&lt;br&gt;&amp;gt; GMT[EOL]&amp;quot;
&lt;br&gt;&amp;gt; DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -----Mensaje original-----
&lt;br&gt;&amp;gt; De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;&amp;gt; Enviado el: martes, 10 de noviembre de 2009 14:08
&lt;br&gt;&amp;gt; Para: HttpClient User Discussion
&lt;br&gt;&amp;gt; Asunto: RE: redirection in 4.0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;br&gt;&amp;gt; &amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt; &amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt; &amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt; &amp;gt; The same error.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Use context / wire logging to examine the HTTP session and find out why your
&lt;br&gt;&amp;gt; application behaves differently in different environments.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. 
&lt;br&gt;&amp;gt; &amp;gt; It connect to a website by post, sending parameters, that return a 
&lt;br&gt;&amp;gt; &amp;gt; 302. Then, It reads the Location head an makes a Get call.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location 
&lt;br&gt;&amp;gt; &amp;gt; head returns the home url, not the right one.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using 
&lt;br&gt;&amp;gt; &amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Please help,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Tanks
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt; Juanjo
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26298732&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26298732.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26287821</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-10T09:36:20Z</published>
	<updated>2009-11-10T09:36:20Z</updated>
	<author>
		<name>Juanjo-9</name>
	</author>
	<content type="html">Hi Oleg, thanks for your answer.
&lt;br&gt;&lt;br&gt;These are the diferences
&lt;br&gt;Number 2 under windows is running fine. 
&lt;br&gt;The code is the same in boths environment but in the log, there is a
&lt;br&gt;diference in the order that postparams are sent.
&lt;br&gt;&lt;br&gt;¿any ideas?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;STACK NUMBER 1- LINUX
&lt;br&gt;&lt;br&gt;DEBUG http-8080-17 org.apache.http.impl.client.DefaultRequestDirector -
&lt;br&gt;Attempt 1 to execute request
&lt;br&gt;DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;Sending request: POST /posturl HTTP/1.1
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; systemKey=www.web.com;
&lt;br&gt;DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; POST /posturl HTTP/1.1
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;application/x-www-form-urlencoded
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;JSESSIONID=0001G-b2dgLkoDiImRI5ktlH-RV:12kcoiifm; systemKey=www.web.com;
&lt;br&gt;DC-Cookie=DC2
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;Receiving response: HTTP/1.1 100 Continue
&lt;br&gt;DEBUG http-8080-17 org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams....&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009
&lt;br&gt;16:59:56 GMT[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-17 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;STACK NUMBER 2 - WINDOWS
&lt;br&gt;&lt;br&gt;DEBUG http-8080-2 org.apache.http.impl.client.DefaultRequestDirector -
&lt;br&gt;Attempt 1 to execute request
&lt;br&gt;DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;Sending request: POST /posturl HTTP/1.1
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;POST /posturl HTTP/1.1[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Length: 474[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Content-Type:
&lt;br&gt;application/x-www-form-urlencoded[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Host: www.web.com[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Connection: Keep-Alive[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;User-Agent:
&lt;br&gt;Apache-HttpClient/4.0 (java 1.5)[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Expect: 100-Continue[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie:
&lt;br&gt;JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; systemKey=www.web.com;
&lt;br&gt;DC-Cookie=DC2[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;Cookie2: $Version=1[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; POST /postrul HTTP/1.1
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Length: 474
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Content-Type:
&lt;br&gt;application/x-www-form-urlencoded
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Host: www.web.com
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Connection: Keep-Alive
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; User-Agent:
&lt;br&gt;Apache-HttpClient/4.0 (java 1.5)
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Expect: 100-Continue
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie:
&lt;br&gt;JSESSIONID=0001509uExGX_9cx6bxRHps1kpj:12vigpo4n; systemKey=www.web.com;
&lt;br&gt;DC-Cookie=DC2
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;gt;&amp;gt; Cookie2: $Version=1
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;gt;&amp;gt; &amp;quot;...postparams...&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 100 Continue[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.impl.conn.DefaultClientConnection -
&lt;br&gt;Receiving response: HTTP/1.1 100 Continue
&lt;br&gt;DEBUG http-8080-2 org.apache.http.headers - &amp;lt;&amp;lt; HTTP/1.1 100 Continue
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;HTTP/1.1 302 Found[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Date: Tue, 10 Nov 2009 16:51:53
&lt;br&gt;GMT[EOL]&amp;quot;
&lt;br&gt;DEBUG http-8080-2 org.apache.http.wire - &amp;lt;&amp;lt; &amp;quot;Server: Web Server 1.0[EOL]&amp;quot; 
&lt;br&gt;&lt;br&gt;-----Mensaje original-----
&lt;br&gt;De: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287821&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;Enviado el: martes, 10 de noviembre de 2009 14:08
&lt;br&gt;Para: HttpClient User Discussion
&lt;br&gt;Asunto: RE: redirection in 4.0
&lt;br&gt;&lt;br&gt;On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt; The same error.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Juanjo
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Use context / wire logging to examine the HTTP session and find out why your
&lt;br&gt;application behaves differently in different environments.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. 
&lt;br&gt;&amp;gt; It connect to a website by post, sending parameters, that return a 
&lt;br&gt;&amp;gt; 302. Then, It reads the Location head an makes a Get call.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location 
&lt;br&gt;&amp;gt; head returns the home url, not the right one.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using 
&lt;br&gt;&amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please help,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Tanks
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Juanjo
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287821&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287821&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287821&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287821&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26287821.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283103</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-10T05:07:46Z</published>
	<updated>2009-11-10T05:07:46Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The environment was updated to:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Linux 2.6.18
&lt;br&gt;&amp;gt; JDK 1.6.0_16-b01
&lt;br&gt;&amp;gt; Tomcat 6.0.20
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; and the programs doesn't run.
&lt;br&gt;&amp;gt; The same error.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Juanjo
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;Use context / wire logging to examine the HTTP session and find out why
&lt;br&gt;your application behaves differently in different environments.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. It
&lt;br&gt;&amp;gt; connect to a website by post, sending parameters, that return a 302. Then,
&lt;br&gt;&amp;gt; It reads the Location head an makes a Get call. 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location head
&lt;br&gt;&amp;gt; returns the home url, not the right one.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using
&lt;br&gt;&amp;gt; BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please help,
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Tanks
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Juanjo
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283103&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26283103.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26283057</id>
	<title>Re: Get Server Certificates using HttpClient via Proxy connection</title>
	<published>2009-11-10T05:05:03Z</published>
	<updated>2009-11-10T05:05:03Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">On Tue, 2009-11-10 at 00:51 -0800, DUset wrote:
&lt;br&gt;&amp;gt; Anyone could you help me to get server certificates using HttpClient using
&lt;br&gt;&amp;gt; proxy connection.(I need to use NTLM authentication Scheme for Proxy
&lt;br&gt;&amp;gt; aunthentication ).
&lt;br&gt;&lt;br&gt;HttpClient cannot be used to retrieve SSL certificates. I recommend
&lt;br&gt;using this utility for that:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://juliusdavies.ca/commons-ssl/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://juliusdavies.ca/commons-ssl/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283057&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26283057&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Get-Server-Certificates-using-HttpClient-via-Proxy-connection-tp26280095p26283057.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26281741</id>
	<title>RE: redirection in 4.0</title>
	<published>2009-11-10T03:13:16Z</published>
	<updated>2009-11-10T03:13:16Z</updated>
	<author>
		<name>Juanjo-9</name>
	</author>
	<content type="html">&amp;nbsp;
&lt;br&gt;The environment was updated to:
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Linux 2.6.18
&lt;br&gt;JDK 1.6.0_16-b01
&lt;br&gt;Tomcat 6.0.20
&lt;br&gt;&amp;nbsp;
&lt;br&gt;and the programs doesn't run.
&lt;br&gt;The same error.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Juanjo
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;
&lt;br&gt;Hi,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. It
&lt;br&gt;connect to a website by post, sending parameters, that return a 302. Then,
&lt;br&gt;It reads the Location head an makes a Get call. 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location head
&lt;br&gt;returns the home url, not the right one.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using
&lt;br&gt;BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Please help,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Tanks
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Juanjo
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26281741.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26280095</id>
	<title>Get Server Certificates using HttpClient via Proxy connection</title>
	<published>2009-11-10T00:51:47Z</published>
	<updated>2009-11-10T00:51:47Z</updated>
	<author>
		<name>DUset</name>
	</author>
	<content type="html">Anyone could you help me to get server certificates using HttpClient using proxy connection.(I need to use NTLM authentication Scheme for Proxy aunthentication ).</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Get-Server-Certificates-using-HttpClient-via-Proxy-connection-tp26280095p26280095.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26279531</id>
	<title>redirection in 4.0</title>
	<published>2009-11-09T23:48:03Z</published>
	<updated>2009-11-09T23:48:03Z</updated>
	<author>
		<name>Juanjo-9</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; In windows using tomcat 6.0 and jdk 1.6, my program runs properly. It
&lt;br&gt;connect to a website by post, sending parameters, that return a 302. Then,
&lt;br&gt;It reads the Location head an makes a Get call. 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; When I deploy this program in linux with tomcat 5, the location head
&lt;br&gt;returns the home url, not the right one.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; This is the code:
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpClient client = new DefaultHttpClient();
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpPost req = new HttpPost(&lt;a href=&quot;http://www.theweb.com);&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.theweb.com);&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; List&amp;lt;NameValuePair&amp;gt; formparams = new ArrayList&amp;lt;NameValuePair&amp;gt;();
&lt;br&gt;&amp;nbsp; &amp;nbsp; formparams.add(new BasicNameValuePair(&amp;quot;aaa&amp;quot;,&amp;quot;sss&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams);
&lt;br&gt;&amp;nbsp; &amp;nbsp; req.setEntity(param)
&lt;br&gt;&amp;nbsp; &amp;nbsp; HttpResponse res = client.execute(req)
&lt;br&gt;&amp;nbsp; &amp;nbsp; entity =res.getEntity();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Header loc = res.getFirstHeader(&amp;quot;Location&amp;quot;);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; Another program that do the same but no redirection and using
&lt;br&gt;BasicResponseHandler runs properly in both systems.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Please help,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Tanks
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Juanjo
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/redirection-in-4.0-tp26279531p26279531.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26278896</id>
	<title>RE: Sending SOAP request using HTTPPost (HttpClient 4.0)</title>
	<published>2009-11-09T22:26:01Z</published>
	<updated>2009-11-09T22:26:01Z</updated>
	<author>
		<name>Brijesh Deo</name>
	</author>
	<content type="html">The best way to do this would be to try and simulate the steps using
&lt;br&gt;HttpClient in the same way as a browser does.
&lt;br&gt;&lt;br&gt;If you have Mozilla Firefox, use the HttpFox plugin and see the sequence
&lt;br&gt;of GET and POST request and responses when you interact with your web
&lt;br&gt;server using the browser. Then try to follow the same/similar sequence
&lt;br&gt;of GET and POSTs using the HttpClient and it should work.
&lt;br&gt;&lt;br&gt;I had a similar problem, where after the authentication (login) to the
&lt;br&gt;server, there was an implicit POST from the browser using a javascript
&lt;br&gt;code which happened without the user having to POST anything explicitly.
&lt;br&gt;When I was trying to login using the HttpClient and then trying to do a
&lt;br&gt;GET on something else, it was failing. Then I did a similar POST (the
&lt;br&gt;implicit POST done by javascript) using HttpClient after the login POST
&lt;br&gt;and then I was able to proceed successfully.
&lt;br&gt;&lt;br&gt;So, the problem is not necessarily with the HttpClient. It could be how
&lt;br&gt;your server likes to be interacted with....find that out and do the same
&lt;br&gt;using HttpClient and I am sure it will work. I have been using
&lt;br&gt;HttpClient to perform quite complicated series of POSTs, GETs and
&lt;br&gt;Redirects in my project....and it's been working fine and as expected.
&lt;br&gt;But I have had to find the proper sequence by observing the browser
&lt;br&gt;behavior first.
&lt;br&gt;&lt;br&gt;Hope this helps...
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Brijesh
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Oleg Kalnichevski [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;] 
&lt;br&gt;Sent: Tuesday, November 10, 2009 3:10 AM
&lt;br&gt;To: HttpClient User Discussion
&lt;br&gt;Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&lt;br&gt;arpita dhundia wrote:
&lt;br&gt;&amp;gt; I tried setting the expect 100 continue param false but the problem
&lt;br&gt;still persists..
&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&amp;gt; I am performimg very simple stpes, using NTLm authentication, creating
&lt;br&gt;an HTTPPost object and attaching a StringEntity object to it, on which I
&lt;br&gt;have written the xml data. 
&lt;br&gt;&amp;gt; Wireshark shows that the post data is not in the right format, hence
&lt;br&gt;the recieving server sends back an HTTP 400 error.
&lt;br&gt;&amp;gt; I am not sure what I am doing wrong, or maybe what can I do to avoid
&lt;br&gt;this error.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Doe not use Wireshark. Use wire log of HttpClient instead
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Please help.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --- On Sat, 7/11/09, Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; From: Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Saturday, 7 November, 2009, 5:03 PM
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; you can find documentation here
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutor&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutor&lt;/a&gt;&lt;br&gt;ial.pdf
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; best regards,
&lt;br&gt;&amp;gt; Thierry Boileau
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks for the reply Oleg, could you guide a little how can I do
&lt;br&gt;that?
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --- On Sat, 31/10/09, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; From: Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Date: Saturday, 31 October, 2009, 4:40 AM
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; arpita dhundia wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello Folks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have run into a very odd problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have to send a SOAP (xml data over HTTP Post) request to another
&lt;/div&gt;server behind NTLM authentication. I am using HttpClient 4.0 for that.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The NTLM authentication works fine but when I try to send the xml
&lt;br&gt;data using StringEntity and set that Entity to the HTTPPpost Object, I
&lt;br&gt;am returned 400 error code, meaning &amp;quot;bad request&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I tried to see the exact request that HTTPClient is sending using
&lt;br&gt;WireShark and indeed the format of the request is not correct. The
&lt;br&gt;headers are repeated twice and the body too is not correctly placed
&lt;br&gt;(unfortunately I cant point out the exact mistake, but comparing it with
&lt;br&gt;a request that a soap client sends its different and seeming incorrect).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is anybody aware of any problems related to StringEntity? Or maybe
&lt;br&gt;any other way I can send xml data using HttpPost method in HttpClient
&lt;br&gt;4.0 API.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Any help would be highly appreciated, I am behind my deadline on
&lt;br&gt;this task :(.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks!!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Turn off 'expect-continue' handshaking.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Add whatever you love to the Yahoo! India homepage. Try now!
&lt;/div&gt;&lt;a href=&quot;http://in.yahoo.com/trynew&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/trynew&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; The INTERNET now has a personality. YOURS! See your Yahoo!
&lt;br&gt;Homepage. &lt;a href=&quot;http://in.yahoo.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26278896&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sending-SOAP-request-using-HTTPPost-%28HttpClient-4.0%29-tp26127809p26278896.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274177</id>
	<title>Re: Sending SOAP request using HTTPPost (HttpClient 4.0)</title>
	<published>2009-11-09T13:39:51Z</published>
	<updated>2009-11-09T13:39:51Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">arpita dhundia wrote:
&lt;br&gt;&amp;gt; I tried setting the expect 100 continue param false but the problem still persists..
&lt;br&gt;&amp;nbsp;&amp;gt;
&lt;br&gt;&amp;gt; I am performimg very simple stpes, using NTLm authentication, creating an HTTPPost object and attaching a StringEntity object to it, on which I have written the xml data. 
&lt;br&gt;&amp;gt; Wireshark shows that the post data is not in the right format, hence the recieving server sends back an HTTP 400 error.
&lt;br&gt;&amp;gt; I am not sure what I am doing wrong, or maybe what can I do to avoid this error.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Doe not use Wireshark. Use wire log of HttpClient instead
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Please help.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --- On Sat, 7/11/09, Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; From: Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Saturday, 7 November, 2009, 5:03 PM
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; you can find documentation here
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; best regards,
&lt;br&gt;&amp;gt; Thierry Boileau
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Thanks for the reply Oleg, could you guide a little how can I do that?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --- On Sat, 31/10/09, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; From: Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Date: Saturday, 31 October, 2009, 4:40 AM
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; arpita dhundia wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello Folks,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have run into a very odd problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have to send a SOAP (xml data over HTTP Post) request to another server behind NTLM authentication. I am using HttpClient 4.0 for that.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The NTLM authentication works fine but when I try to send the xml data using StringEntity and set that Entity to the HTTPPpost Object, I am returned 400 error code, meaning &amp;quot;bad request&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I tried to see the exact request that HTTPClient is sending using WireShark and indeed the format of the request is not correct. The headers are repeated twice and the body too is not correctly placed (unfortunately I cant point out the exact mistake, but comparing it with a request that a soap client sends its different and seeming incorrect).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Is anybody aware of any problems related to StringEntity? Or maybe any other way I can send xml data using HttpPost method in HttpClient 4.0 API.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Any help would be highly appreciated, I am behind my deadline on this task :(.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks!!
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Turn off 'expect-continue' handshaking.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Add whatever you love to the Yahoo! India homepage. Try now! &lt;a href=&quot;http://in.yahoo.com/trynew&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/trynew&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. &lt;a href=&quot;http://in.yahoo.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274177&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sending-SOAP-request-using-HTTPPost-%28HttpClient-4.0%29-tp26127809p26274177.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26274154</id>
	<title>Re: Concurrent connections</title>
	<published>2009-11-09T13:38:24Z</published>
	<updated>2009-11-09T13:38:24Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">Mohit Anchlia wrote:
&lt;br&gt;&amp;gt; Currently we have code that does HttpClient client = new HttpClient();
&lt;br&gt;&amp;gt; for every post request. We have around 30 concurrent requests being
&lt;br&gt;&amp;gt; made. I am trying to understand if we use HttpClient this way then
&lt;br&gt;&amp;gt; does it create new connection for every request 
&lt;br&gt;&lt;br&gt;Yes, it does. You effectively throw away a potentially reusable 
&lt;br&gt;connection after each request execution.
&lt;br&gt;&lt;br&gt;For proper usage of HttpClient connection pooling see:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e596&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e596&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e629&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e629&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; I mean does it have a max concurrent request limit
&lt;br&gt;&amp;gt; when HttpClient is used in this way?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Also, how do I see or debug how many requests are waiting on
&lt;br&gt;&amp;gt; HttpClient to get a connection?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;Use wire / context logging
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/logging.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/logging.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274154&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274154&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274154&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26274154&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Concurrent-connections-tp26269220p26274154.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26273563</id>
	<title>Re: Sending SOAP request using HTTPPost (HttpClient 4.0)</title>
	<published>2009-11-09T12:57:18Z</published>
	<updated>2009-11-09T12:57:18Z</updated>
	<author>
		<name>arpita dhundia</name>
	</author>
	<content type="html">I tried setting the expect 100 continue param false but the problem still persists..
&lt;br&gt;I am performimg very simple stpes, using NTLm authentication, creating an HTTPPost object and attaching a StringEntity object to it, on which I have written the xml data. 
&lt;br&gt;Wireshark shows that the post data is not in the right format, hence the recieving server sends back an HTTP 400 error.
&lt;br&gt;I am not sure what I am doing wrong, or maybe what can I do to avoid this error.
&lt;br&gt;&lt;br&gt;Please help.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Arpita
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--- On Sat, 7/11/09, Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;From: Thierry Boileau &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thboileau@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Date: Saturday, 7 November, 2009, 5:03 PM
&lt;br&gt;&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;you can find documentation here
&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;best regards,
&lt;br&gt;Thierry Boileau
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks for the reply Oleg, could you guide a little how can I do that?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --- On Sat, 31/10/09, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; From: Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Saturday, 31 October, 2009, 4:40 AM
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; arpita dhundia wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello Folks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have run into a very odd problem.
&lt;br&gt;&amp;gt;&amp;gt; I have to send a SOAP (xml data over HTTP Post) request to another server behind NTLM authentication. I am using HttpClient 4.0 for that.
&lt;br&gt;&amp;gt;&amp;gt; The NTLM authentication works fine but when I try to send the xml data using StringEntity and set that Entity to the HTTPPpost Object, I am returned 400 error code, meaning &amp;quot;bad request&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt; I tried to see the exact request that HTTPClient is sending using WireShark and indeed the format of the request is not correct. The headers are repeated twice and the body too is not correctly placed (unfortunately I cant point out the exact mistake, but comparing it with a request that a soap client sends its different and seeming incorrect).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is anybody aware of any problems related to StringEntity? Or maybe any other way I can send xml data using HttpPost method in HttpClient 4.0 API.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any help would be highly appreciated, I am behind my deadline on this task :(.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks!!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Turn off 'expect-continue' handshaking.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;      Add whatever you love to the Yahoo! India homepage. Try now! &lt;a href=&quot;http://in.yahoo.com/trynew&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/trynew&lt;/a&gt;&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26273563&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. &lt;a href=&quot;http://in.yahoo.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/&lt;/a&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sending-SOAP-request-using-HTTPPost-%28HttpClient-4.0%29-tp26127809p26273563.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26269220</id>
	<title>Concurrent connections</title>
	<published>2009-11-09T08:24:02Z</published>
	<updated>2009-11-09T08:24:02Z</updated>
	<author>
		<name>jgroups</name>
	</author>
	<content type="html">Currently we have code that does HttpClient client = new HttpClient();
&lt;br&gt;for every post request. We have around 30 concurrent requests being
&lt;br&gt;made. I am trying to understand if we use HttpClient this way then
&lt;br&gt;does it create new connection for every request or could it have some
&lt;br&gt;kind of throttling? I mean does it have a max concurrent request limit
&lt;br&gt;when HttpClient is used in this way?
&lt;br&gt;&lt;br&gt;Also, how do I see or debug how many requests are waiting on
&lt;br&gt;HttpClient to get a connection?
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26269220&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26269220&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Concurrent-connections-tp26269220p26269220.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26245891</id>
	<title>Re: Sending SOAP request using HTTPPost (HttpClient 4.0)</title>
	<published>2009-11-07T07:37:45Z</published>
	<updated>2009-11-07T07:37:45Z</updated>
	<author>
		<name>olegk</name>
	</author>
	<content type="html">arpita dhundia wrote:
&lt;br&gt;&amp;gt; Thanks for the reply Oleg, could you guide a little how can I do that?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;DefaultHttpClient httpclient = new DefaultHttpClient();
&lt;br&gt;httpclient.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, 
&lt;br&gt;false);
&lt;br&gt;&lt;br&gt;Oleg
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; --- On Sat, 31/10/09, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; From: Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Saturday, 31 October, 2009, 4:40 AM
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; arpita dhundia wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello Folks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have run into a very odd problem.
&lt;br&gt;&amp;gt;&amp;gt; I have to send a SOAP (xml data over HTTP Post) request to another server behind NTLM authentication. I am using HttpClient 4.0 for that.
&lt;br&gt;&amp;gt;&amp;gt; The NTLM authentication works fine but when I try to send the xml data using StringEntity and set that Entity to the HTTPPpost Object, I am returned 400 error code, meaning &amp;quot;bad request&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt; I tried to see the exact request that HTTPClient is sending using WireShark and indeed the format of the request is not correct. The headers are repeated twice and the body too is not correctly placed (unfortunately I cant point out the exact mistake, but comparing it with a request that a soap client sends its different and seeming incorrect).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is anybody aware of any problems related to StringEntity? Or maybe any other way I can send xml data using HttpPost method in HttpClient 4.0 API.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any help would be highly appreciated, I am behind my deadline on this task :(.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks!!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Turn off 'expect-continue' handshaking.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Add whatever you love to the Yahoo! India homepage. Try now! &lt;a href=&quot;http://in.yahoo.com/trynew&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/trynew&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26245891&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sending-SOAP-request-using-HTTPPost-%28HttpClient-4.0%29-tp26127809p26245891.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26243947</id>
	<title>Re: Sending SOAP request using HTTPPost (HttpClient 4.0)</title>
	<published>2009-11-07T03:33:49Z</published>
	<updated>2009-11-07T03:33:49Z</updated>
	<author>
		<name>thboileau</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;you can find documentation here
&lt;br&gt;&lt;a href=&quot;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hc.apache.org/httpcomponents-client/tutorial/pdf/httpclient-tutorial.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;best regards,
&lt;br&gt;Thierry Boileau
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks for the reply Oleg, could you guide a little how can I do that?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Arpita
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --- On Sat, 31/10/09, Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; From: Oleg Kalnichevski &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;olegk@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Sending SOAP request using HTTPPost (HttpClient 4.0)
&lt;br&gt;&amp;gt; To: &amp;quot;HttpClient User Discussion&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Saturday, 31 October, 2009, 4:40 AM
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; arpita dhundia wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hello Folks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have run into a very odd problem.
&lt;br&gt;&amp;gt;&amp;gt; I have to send a SOAP (xml data over HTTP Post) request to another server behind NTLM authentication. I am using HttpClient 4.0 for that.
&lt;br&gt;&amp;gt;&amp;gt; The NTLM authentication works fine but when I try to send the xml data using StringEntity and set that Entity to the HTTPPpost Object, I am returned 400 error code, meaning &amp;quot;bad request&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt; I tried to see the exact request that HTTPClient is sending using WireShark and indeed the format of the request is not correct. The headers are repeated twice and the body too is not correctly placed (unfortunately I cant point out the exact mistake, but comparing it with a request that a soap client sends its different and seeming incorrect).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is anybody aware of any problems related to StringEntity? Or maybe any other way I can send xml data using HttpPost method in HttpClient 4.0 API.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any help would be highly appreciated, I am behind my deadline on this task :(.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks!!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Turn off 'expect-continue' handshaking.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Oleg
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;      Add whatever you love to the Yahoo! India homepage. Try now! &lt;a href=&quot;http://in.yahoo.com/trynew&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://in.yahoo.com/trynew&lt;/a&gt;&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26243947&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;httpclient-users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sending-SOAP-request-using-HTTPPost-%28HttpClient-4.0%29-tp26127809p26243947.html" />
</entry>

</feed>
