Mailing List Archive

Any way for a VMOD to iterate over all the header values?
Does varnish expose any API that would let a VMOD iterate over all of
the header key-value pairs? I know there's the VRT_GetHdr that allows
you to lookup a single header, but I haven't found anything for access
all the headers.

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Any way for a VMOD to iterate over all the header values? [ In reply to ]
Hi Ryan,

For an example have a look at what vmod-header does,
https://github.com/varnish/varnish-modules/blob/master/src/vmod_header.c#L134-L140

hp->hd[u].b will point to a string containing "header: value" for each of
the headers.



On Wed, May 24, 2017 at 1:58 AM, Ryan Burn <rnickb731@gmail.com> wrote:

> Does varnish expose any API that would let a VMOD iterate over all of
> the header key-value pairs? I know there's the VRT_GetHdr that allows
> you to lookup a single header, but I haven't found anything for access
> all the headers.
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



--
Dag Haavi Finstad
Software Developer | Varnish Software
Mobile: +47 476 64 134
We Make Websites Fly!