You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2004/09/15 17:41:35 UTC

DO NOT REPLY [Bug 31246] - JVM bug 4949631 causes BufferOverflowException in HttpMethodBase.getResponseBodyAsString

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31246>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31246

JVM bug 4949631 causes BufferOverflowException in HttpMethodBase.getResponseBodyAsString





------- Additional Comments From ortwin.glueck@nose.ch  2004-09-15 15:41 -------
We strongly discourage users to use getResponseBodyAsString if the content is
large. getResponseBodyAsString imposes buffering and copying the data in the VM
which can easily exhaust the memory available to the VM. HttpClients should
avoid buffering the response by using getResponseBodyAsStream().

Maybe we can log a warning message, if the content length is unknown or larger
than some megs and the user calls getResponseBodyAsString or getResponseBody.
The drawbacks of calling those methods and why to alternatives should be
documented in the API.

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