On 16/03/2017 11:03 p.m., Eduard Bagdasaryan wrote:
> If throwing when String exceeds its 64K limit is
> acceptable then why not just use my previous t2 patch?
> HttpHeader::addVia() calls strListAdd() similarly as the old
> did: it throws if str->canGrowBy(itemSize) returns false.
> 

I was hoping not to need a Must() at all. We still have the option of
passing buf instead of strVia to putStr().


Also, compare the information content of the exception messages:

Exception: str->canGrowBy(2)

Exception: str->canGrowBy(itemSize)

Exception: strVia.length() > 64*1024


If one was presented with only one of them. How would one go about
replicating the traffic to debug and fix it?

Only the latter offers the chance of a few minutes turnaround on a fix
if the Must() is acually hit in production traffic.

(I kind of hate those low-level operations with Must() and assert() like
the former - far too little context to be useful debugging with such big
impact when they are triggered.)

Amos

_______________________________________________
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to