hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35728] - getResponseBody always logs messages
Date Thu, 14 Jul 2005 17:00:28 GMT
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=35728>.
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=35728





------- Additional Comments From incoming@jillesvangurp.com  2005-07-14 19:00 -------
(In reply to comment #2)
> Hi Jiles,
> 
> This warning message is there for a good reason.  It's there to let you know why
> you're getting out of memory exceptions :)  Below is the code where this message
> comes from:
> 
>   int limit =
> getParams().getIntParameter(HttpMethodParams.BUFFER_WARN_TRIGGER_LIMIT,
1024*1024);
>   if ((contentLength == -1) || (contentLength > limit)) {
>       LOG.warn("Going to buffer response body of large or unknown size. "
>                             +"Using getResponseAsStream instead is recommended.");
>   }
> 
> This message is only printed when the response contains no content length (i.e.
> could be of any size) or when it is larger than a configurable maximum size. 
> Please give the BUFFER_WARN_TRIGGER_LIMIT param a try.
> 
> Also, as Roland mentions perhaps INFO would be better, but this may also end up
> in your logs.
> 
> Mike
> 

I fully understand why you in general buffering should be carefully considered
but I hope you understand that doing something with the response is an extremely
common (if not the most common) thing to do when using httpclient.

I'd still prefer no log message at all. Once again, components like this should
IMHO be totally silent unless you debug them and throw exceptions when bad stuff
happens. An exception if the trigger limit is exceeded would be a nice solution.
That way you get no outofmemory exception, a clean log and you can increment the
limit if you know what you are doing. An optional setting of no limit would be
nice too. I suppose that's not feasible for 3.0 given this stage of development
but it would be nice for 3.x.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message