Am Samstag, 11. Oktober 2003 17:56 schrieb Michael Becke: > I agree with Oleg here. The real problem is the inability to terminate > a request and force close a connection. Having this functionality would > help in this case as well as many others. > > Mike
I also agree that we need such functionality. Basically, this was the reason for changing the code. Any ideas how this can be done in other ways? I think we have to collect ideas for a better solution. HTTPClient _will_ possibly loop endlessly in HttpMethodBase.readStatusLine or readResponseHeaders when fed with the wrong URI (chargen...). It loops because HttpParser.readRawLine will keep reading until EOF/forever when there's no linefeed character in the stream (isn't there a maximum length defined for HTTP Header lines in some RFC?). And this is not controllable by the user - you will definitely have to set a maximum length there. Moreover, could you agree to mark the methods getResponseBody() and getResponseBodyAsString() as deprecated? They both rely on getResponseBodyAsStream() (thus duplicating its functionality) and probably result in an OutOfMemoryError because you cannot specifiy a read limit (a 128M response body as String or byte[] will definitely not fit into a 64M JVM). Christian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]