[squid-dev] [PATCH] SBuf conversion of vary_headers
Amos Jeffries
squid3 at treenet.co.nz
Fri Apr 1 17:56:03 UTC 2016
On 21/03/2016 8:47 p.m., Amos Jeffries wrote:
> This is the major part of the planned long-term fix for the Vary header
> issues with String that have been bugging us recently.
>
> It converts the makeVaryMark() function to generate its output in an
> SBuf instead of String, and removes one use of strListAdd.
>
> It also converts the MemObject and HttpRequest vary_headers members from
> char* to SBuf to reduce the amount of data copying and simplify memory
> management done on the resulting variant key.
>
>
> Future Work:
>
> * The remaining part of this patch is to SBuf convert the
> HttpHeaders::getList API to avoid the remaining String. That is still
> waiting on conversion of the ICAP and mime header parse logics.
>
> * An additional optimisation that could be made to strengthen against
> the known attacks is to ensure Vary header list entries are unique in
> the generated key. Ignoring repeated header names.
>
Applied to trunk as rev.14607. Squid-3.5 as rev.14016
Amos
More information about the squid-dev
mailing list