Sven, You have several options: (1) Provide a custom connection manager. You may choose to sub-class MultiThreadedHttpConnectionManager, override releaseConnection method, and make it close the connection prior to returning it to the connection pool. (2) Simply send 'connection: close' request header with every request. Well-behaving web servers _should_ respond with 'connection: close' header which will cause the HttpClient's default connection manager implementation to drop the connection once the response body has been consumed. The downside of this approach is that some web servers may ignore 'connection: close' directive, leaving HttpClient's default connection manager unaware of your intentions. If you want a bullet-proof solution and can afford no mishaps, do spend an extra effort on writing a custom connection manager (3) Use HTTP/1.0
HTH Oleg -----Original Message----- From: Sven Köhler [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 18:53 To: Commons HttpClient Project Subject: How to diable Keep-Alive? Hi, i want to avoid, that POST-Requests reuse connections from the pool. I'm using the MultiThreadedHttpConnectionManager because i use one HttpClient-Object from different Threads. By avoiding that POST-Request use already open HTTP-connections, i want to avoid problems with stale connections since i use InputStreams for POST-requests. Is this possibility? As far as i understood Ortwin in de.comp.lang.java, stale connections and POST-Requests and InputStreams lead to problems since a InputStream cannot be rewound. How does HttpClient currently try to work around that? --------------------------------------------------------------------- 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]