Re: A proble with the buffer

2008-03-25 Thread hjw
Hi, Oleg Use #getResponseAsStream() is not ok,because once #executeMethod(),the response will receive automaticly 2K data,what I want likes HeadMethod which only receives the header ,but HeadMethod could not get the response. 2008/3/26, Oleg Kalnichevski <[EMAIL PROTECTED]>: > > > On Tue, 2008-03

Re: Apache HttpClient - Using custom socket factory for failover support

2008-03-25 Thread Oleg Kalnichevski
On Tue, 2008-03-25 at 14:44 -0700, Ankur Shah wrote: > Thanks oleg, > > Do you see any issues in the approach that i was thinking about (and have > implemented already) other than the fact that its not very clean? Ankur, The problem is the connection manager can only catch connect timeout excep

Re: Apache HttpClient - Using custom socket factory for failover support

2008-03-25 Thread Ankur Shah
Thanks oleg, Do you see any issues in the approach that i was thinking about (and have implemented already) other than the fact that its not very clean? Could you elaborate a bit more on what you mean by creating service on top of httpclient, (i understand what it'll do but just didn't know what/h

Re: A proble with the buffer

2008-03-25 Thread Oleg Kalnichevski
On Tue, 2008-03-25 at 22:03 +0800, hjw wrote: > Hi ,all > > When I call method executeMethod() in HttpClient ,usually the methed > executed and did not call getResponseAsString() ,the length of the response > is 2K,I think this is the buffer of HttpClient , Is it right? If it is > right,how can I

Re: httpclient3 takes 3 minutes to catch IOException, why so long?

2008-03-25 Thread Oleg Kalnichevski
On Mon, 2008-03-24 at 16:44 -0700, ever friend wrote: > Greeting... > > I use httpclient3 to communicate with a web server application. > > when I test an error handling, it takes 3 minutes to catch the IOException (I > manually unplug the internet connection). I assumed it takes couple

Re: Apache HttpClient - Using custom socket factory for failover support

2008-03-25 Thread Oleg Kalnichevski
On Mon, 2008-03-24 at 15:46 -0700, Ankur Shah wrote: > Hi Oleg, > > Thanks for the response. The server that i am running (acting as a client in > this particular case) is working with multiple servers (hosting different > webservices) with each having a primary and a failover pair. From this > p

Re: Getting the response time for multithreaded client

2008-03-25 Thread Oleg Kalnichevski
On Mon, 2008-03-24 at 22:19 +0100, Uwe Kubosch wrote: > Hi Oleg! > > Thank you for your answer. > > How would I do it in HttpClient 4.0? The simplest way would be to register a request interceptor to log the start time of the request execution and a response interceptor to log the time a respon

httpclient gets 400 bad request

2008-03-25 Thread Yang Sun
Hello, I was using httpclient to write a simple crawler. However, it returns 400 bad request for a particular URL. I tested the URL with HttpURLConnection and there is no problem retrieving the content at all. Here are the DEBUG message: DEBUG [org.apache.commons.httpclient.params.DefaultHttp

A proble with the buffer

2008-03-25 Thread hjw
Hi ,all When I call method executeMethod() in HttpClient ,usually the methed executed and did not call getResponseAsString() ,the length of the response is 2K,I think this is the buffer of HttpClient , Is it right? If it is right,how can I change the size of the buffer? If it is not, Could you poi