[squid-dev] [PATCH] VIA creation code duplication
squid3 at treenet.co.nz
Thu Mar 16 11:15:45 UTC 2017
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: 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.)
More information about the squid-dev