Thank you Eric for your reply. On 26 Aug 2003 at 15:28, Eric Johnson wrote:
> Andreas, > > If I had to guess, what you're seeing is either a simple timing > issue, in that some servers simply close a connection after a > certain amount of idle time, or that the server to which you're > connecting closes a connection after processing a PUT request. In > the latter case, ideally the server would be sending back a > "Connection: close" header to let HttpClient know that this is > what it is doing. You might turn on the wire logging to see if > this is the case. Hm, the server doesn't send the Connection: close at this time. But I've seen the server sending this header in another case, ie. when a connection was used with 6 GETs. I set the timeout to 10 seconds and doing the requests in a loop, so I don't think it's a timeout either. But I'll try another server... Thanks. Andreas > > HttpClient's particular behavior here stems from Java's inability > to detect closed connections prior to JRE 1.4. The only way to > determine whether a connection is closed is to actually read or > write to the connection, which is exactly what isStale() does. > > -Eric. > > Andreas Probst wrote: > > >Hi all, > > > >I'd like to reuse open connections in successive calls to the > >same instance of HttpClient with everytime newly created > >instances of HttpMethod (of course to the same server). > > > >>From my tests I could see, that successive GETs use the same > >connection. A following PUT uses the same connection too. > >However, successive PUTs always open a new connection, as the > >old one is supposed to be stale. I debugged through the method > >isStale() but don't really understand the logic and especially > >the behaviour (with InterruptedIOException) behind it. > > > >Should HttpClient be able to reuse connections in successive > >PUTs? What should I do to persuade HttpClient to do so? > > > >Thanks in advance, > >Andreas > > > > > >---------------------------------------------------------------- > >----- To unsubscribe, e-mail: > >[EMAIL PROTECTED] For > >additional commands, e-mail: > >[EMAIL PROTECTED] > > > > > > > > > > > > > > ----------------------------------------------------------------- > ---- To unsubscribe, e-mail: > [EMAIL PROTECTED] For > additional commands, e-mail: > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]