[squid-dev] Proposal: Helper response: concatenated values with custom delimiter
Andrey K
ankor2023 at gmail.com
Wed Apr 22 11:24:13 UTC 2026
Hello, Amos and Alex,
Thank you for the discussion and the proposed formats.
Since we already support the
key=v1 key=v2
format, and the
key=v1,v2
format is currently undocumented, I think we should answer two questions
first:
1. Do we really need to support list-values? It seems Alex thinks we might
not need them at all.
2. If we do, is a comma enough as the default separator?
I believe we should settle these points before designing a new format for
value lists.
What are your thoughts?
Kind regards,
Ankor.
ср, 22 апр. 2026 г. в 00:17, Alex Rousskov <rousskov at measurement-factory.com
>:
> On 2026-04-21 15:57, Amos Jeffries wrote:
>
> > The helper protocol documents ',' as list delimiter
>
> Where do we document ',' as a delimiter for annotation values in helper
> responses? I cannot find any such text on AddonHelpers page or inside
> cf.data.pre.
>
> > On 22/04/2026 03:11, Alex Rousskov wrote:
> >> [ If there is a real, serious need to optimize that existing support,
> >> then ] can we invent another syntax that will not result in
> >> mishandling any existing helper annotation (that is not treated as a
> >> list today)? For example, perhaps we can use isKeyNameChar()
> >> restrictions to place the delimiter first, before the annotation name?
> >>
> >> (m=,)name=value1,value2
> >>
> >
> > Hmm. When I combine that idea with older proposals floated about
> > kv-pair append/replace syntax there are some nice implications.
> >
> > How about this:
> >
> > 1) change of kv-pair grammar to:
> >
> > kv-pair = [ '_' ] key [ flag ] '=' ( value / list )
>
> Yes, AFAICT, placing handling instructions _after_ the key should also
> work (for the same isKeyNameChar) reason) and is more aesthetically
> pleasing than my sketch above.
>
> If we really have to add this new feature, then I would probably use
> curly braces for these optional instructions, to make it similar to our
> logformat %codes:
>
> name{...}=value...
>
> For example:
>
> name{m}=value1,value2
>
> or
>
> name{m=:}=value1:value2
>
>
> > * flag does not need to be limited to a single character. It could be
> > several.
>
> Any syntax should allow adding safe, backward-compatible support for
> additional/complex instructions in the future, of course, including
> multiple instructions.
>
>
> HTH,
>
> Alex.
>
> _______________________________________________
> squid-dev mailing list
> squid-dev at lists.squid-cache.org
> https://lists.squid-cache.org/listinfo/squid-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20260422/1d8664a6/attachment.htm>
More information about the squid-dev
mailing list