Re: Problem sending request using HttpClient when the server receiving request goes down and is started again.

2008-04-02 Thread gagneet
Hi Oleg, Thanks for your inputs. Now I am making a new HttpState object for each request made. But have found a new problem. This problem occurs when the requests are concurrent. What is evident is that after redirection happens the JSESSIONID of both the requests become same. Could not

[no subject]

2008-04-02 Thread vijay shanker
Hello friends. I am very new to this API and I got to make some decisions. - what should I use in production in my team.(HttpClient4, HttpClient3 or HttpCore). How they are different with each other. - I need some document regarding connection

Read Throttling for GET (Limit Bandwidth)

2008-04-02 Thread Philipp Walther
Hi all, I think the subject should make it pretty clear what I want to achieve.. I'm looking for a way to limit the speed with which httpclient reads (downloads) from a server. Does anybody know of a way to do that? TIA, Regards, Phil

Re: Read Throttling for GET (Limit Bandwidth)

2008-04-02 Thread sebb
I wrote some add-ons for JMeter which do this, see: http://svn.apache.org/repos/asf/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java and the Slow* files in:

HttpClient Sockettimeout does not work

2008-04-02 Thread lavanya . x . sambasivan
Hello, I am using httpclient 3.1. I am trying to make a http request that should timeout when a response is not revceived within 2 minutes. The requirement is also to retry 3 times before throwing back an application exception. When I set the socket timeout to 90,000 milliseconds, the timeout

Re: Problem sending request using HttpClient when the server receiving request goes down and is started again.

2008-04-02 Thread Oleg Kalnichevski
gagneet wrote: Hi Oleg, Thanks for your inputs. Now I am making a new HttpState object for each request made. But have found a new problem. This problem occurs when the requests are concurrent. What is evident is that after redirection happens the JSESSIONID of both the requests become

Re:

2008-04-02 Thread Oleg Kalnichevski
vijay shanker wrote: Hello friends. I am very new to this API and I got to make some decisions. - what should I use in production in my team.(HttpClient4, HttpClient3 or HttpCore). How they are different with each other. * HttpClient 3.x is very stable and

Re: httptunnel client 4.0 alpha 3 and preemtive authentication

2008-04-02 Thread Oleg Kalnichevski
Sebastiaan van Erk wrote: Hi, I'm trying to use preemptive authentication because I have a non-repeatable (dyanimc) request entity. Currently when posting, this goes wrong because I get a 401 Unauthorized but it has already sent some of the data, and when it tries again with the basic

Re: httptunnel client 4.0 alpha 3 and preemtive authentication

2008-04-02 Thread Sebastiaan van Erk
Hi Oleg, Thanks for the reply, I figured as much. I prefer to use expect/continue, which I actually do when the proxy supports it, but in some cases unfortunately it doesn't and I must fall back to preemptive. What does seem strange to me is that HttpClient *does* retry the request with

Re: Duplicate requests

2008-04-02 Thread Oleg Kalnichevski
Aaron Shettleroe wrote: It appears that HttpClient is sending the same request more than once. Unlikely, unless the RetryHandler is configured to do so. I tried to code against this. Here is some code snippets: private static HttpClient httpClient; ... final HttpConnectionManagerParams

Re: HttpClient Sockettimeout does not work

2008-04-02 Thread Oleg Kalnichevski
[EMAIL PROTECTED] wrote: Hello, I am using httpclient 3.1. I am trying to make a http request that should timeout when a response is not revceived within 2 minutes. See definition of the socket timeout Oleg The requirement is also to retry 3 times before throwing back an application

Re: httptunnel client 4.0 alpha 3 and preemtive authentication

2008-04-02 Thread Oleg Kalnichevski
Sebastiaan van Erk wrote: Hi Oleg, Thanks for the reply, I figured as much. I prefer to use expect/continue, which I actually do when the proxy supports it, but in some cases unfortunately it doesn't and I must fall back to preemptive. What does seem strange to me is that HttpClient *does*

Re: httptunnel client 4.0 alpha 3 and preemtive authentication

2008-04-02 Thread Sebastiaan van Erk
Hi, I looked into it some more, and it turns out it's not the case that it's repeating the request with the non-repeatable entity. I was looking at a wireshark dump and I confused the retry with another very similar post. To be entirely sure I added the following code to the writeTo method of

ChunkedOutputStream and flushing

2008-04-02 Thread Sebastiaan van Erk
Hi, I have a question on the chunked output stream: one of the nice things about chunked encoding is that you can send your data in little parts. However, flush() on ChunkedOutputStream does not flush the buffer: /** * Flushes the underlying stream, but leaves the internal buffer

Re: Problem sending request using HttpClient when the server receiving request goes down and is started again.

2008-04-02 Thread Oleg Kalnichevski
On Thu, 2008-04-03 at 00:57 +0530, Gagneet Chadha wrote: Hi Oleg, No I was setting HttpState object into HttpClient object. Now I see where I went wrong. But the only API method which will allow me to do that is executeMethod(HostConfiguration hostconfig, HttpMethod method, HttpState

Re: ChunkedOutputStream and flushing

2008-04-02 Thread Oleg Kalnichevski
On Wed, 2008-04-02 at 21:55 +0200, Sebastiaan van Erk wrote: Hi, I have a question on the chunked output stream: one of the nice things about chunked encoding is that you can send your data in little parts. However, flush() on ChunkedOutputStream does not flush the buffer: /**

Re: ChunkedOutputStream and flushing

2008-04-02 Thread Sebastiaan van Erk
Ok, thanks for the reply. https://issues.apache.org/jira/browse/HTTPCORE-157 I have a workaround (simply subclass ChunkedOutputStream and overwrite flush to call flushCache() followed by super.flush()), and subclassing the EntitySerializer to use it for chunked encoding. Then I create