[squid-dev] [PATCH] VIA creation code duplication

Eduard Bagdasaryan eduard.bagdasaryan at measurement-factory.com
Sat Feb 11 19:39:09 UTC 2017

On 09.02.2017 20:19, Amos Jeffries wrote:

 > Since Via is a list header we should be able to just append a new Via
 > header to the header list with putStr. No need to use getList, String,
 > delById to inject on the end of existing Via string.

Doing so will change the Via generation way currently used. Instead of
generating a single Via header with comma-separated value list Squid
would produce several Via header fields. Though this is equivalent from
the RFC point of view, I would prefer to leave these things "as is" for now.

 > Please also take the opportunity to fix a long standing protocol
 > violation bug in Via header produced by Squid:
 > The version part of the header is only supposed to elide the protocol
 > label if the that label would be "HTTP/" (ie. for messages received via
 > HTTP and HTTPS).
 > eg. for ICY replies:
 >   Via: ICY/1.1 squid
 > eg. for FTP gatewayed replies (or relayed requests):
 >   Via: FTP/2 squid


 > After those calls that require String are gone please assemble the value
 > in an SBuf instead of static char* buffer.


 > Also, for messages where Squid itself generated the message (ie
 > Downloader or ESI) there should be no Via header added at all.

Marked as TODO.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-73-de-duplicate-hdr-via-t2.patch
Type: text/x-patch
Size: 14306 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170211/885795dc/attachment.bin>

More information about the squid-dev mailing list