commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpClient] Problem with GET/POST V2.0.2
Date Mon, 21 Feb 2005 20:59:00 GMT
On Mon, 2005-02-21 at 21:44 +0100, Kuno Skach wrote:
> Hi!
> I'm having the following problem:
> I've constructed an HttpClient (V2.0.2 / IBM JDK 1.3)that uses a
> MultiThreadedHttpConnectionManager instance.
> Im sendling a lot of POST/GET requests successfully (always to the same
> server). When i send a certain request (no whether i use GET or POST) the
> server sends me an error similar to the following:
> "&redirectURL=bla.jspGET"-method not supported.
> 

Kuno,

What server are you targeting? Have you considered a possibility of this
being a server side problem?

> So as far as i understand the HttpClient seems so polute the new request
> with part of a previous one or didn't finish the last request correctly. 

This is highly unlikely. HttpClient has been used by so many people in
production for several years (me included) that this is not very likely
you are the very first one to have run into such a fundamental problem

> As
> a work around it helps to create a completely new HttpClient for each call,
> but of cause performance is going down.
> 

Do not. That'll create even more problems

> I've introduced loggin code right at the place where the RequestLine is
> being composed, it shows that the RequestLine itself is correct.
> 
> Is there a way to manually "close" the previous request? 

Yes. (1) Send 'connection: close' with each request. (2) Implement a
custom connection manager

> Is there somthin i
> can have done wrong?

You do you release connections back to the connection manager after each
and every method execute, don't you?

Please take a closer look at the following resources:

Threading guide:
http://jakarta.apache.org/commons/httpclient/3.0/threading.html

Performance optimization guide:
http://jakarta.apache.org/commons/httpclient/3.0/performance.html

Troubleshooting:
http://jakarta.apache.org/commons/httpclient/3.0/troubleshooting.html

These guides are intended for HttpClient 3.0 but similar principles can
be applied to older releases of HttpClient. 

Cheers,

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message