Ortwin Glück <ortwin.glueck 'at' nose.ch> writes: > Guillaume Cottenceau wrote: > > > Hello, > > We use HttpClient for performing several HTTP post in parallel in > > our applications. We have a problem when the server(s) receiving > > our HTTP post either answers very slowly, or goes mad and sends > > garbage data over and over: the connection stays open forever, > > but more important, the Java threads as well. > > Those are all problems you can solve: > > 1. Garabage data > If it violates HTTP, you will get an appropriate exception. If the > content is not meaningful to you, your application should be able to > figure that out and abort the method.
If, for example, the HTTP server sends one "a" byte once per second forever, HttpClient will never exit from executeMethod - if I'm correct. > 2. Open connections > You can set timeouts for idle connections, so you will get a timeout > exception after a while. If the connection is active (i.e. client is Yes, but that's out of the scope of the described problem. > receiving data), your application should be able to figure out if it > is legitimate to stay open for such a long time and otherwise just > abort the method. There's no such thing available in HttpClient, as far as I know? This needs a monitor Thread setting a timeout in our application. It could make sense to implement this timeout in HttpClient, as I've said in previous mail, however I am not sure it is "allowed" by the HTTP protocol. -- Guillaume Cottenceau --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]