hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kohlschuetter ...@rrzn.uni-hannover.de>
Subject Re: Proposal: Configurable HTTP Response length limit
Date Sat, 11 Oct 2003 17:21:11 GMT
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 

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 


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

View raw message