Mailing List Archive

Varnish version 6.3 vcl test fails with custom http header starting with a number
Message from VCC-compiler:
Symbol 'req.http' has wrong type (none):
At: ('/etc/varnish/default.vcl' Line 182 Pos 9) -- (Pos 16)
set req.http.7hello = "world";
--------########-------------------

Symbol was builtin
Running VCC-compiler failed, exited with 2
VCL compilation failed


same code works when using a letter before the number :

set req.http.x7hello = "world";

before submitting a bug a report in github wanted to check is someone is
familiar with this issue ?


Thanks,

--yaouadi
Re: Varnish version 6.3 vcl test fails with custom http header starting with a number [ In reply to ]
> before submitting a bug a report in github wanted to check is someone is familiar with this issue ?

Can you tell us from which version you are upgrading to 6.3?

I know that at some point header names parsing changed so that they'd
have to be proper VCL symbols, leaving no room for otherwise valid
HTTP headers that don't happen to match VCL expectations. We have no
alternate syntax for "exotic" header names, I suggested req.http[7hello],
someone else suggested req.http."7hello" but nothing happened in this
direction. So your only solution today is to use vmod_header.

https://github.com/varnishcache/varnish-cache/issues/2573

Dridi
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Varnish version 6.3 vcl test fails with custom http header starting with a number [ In reply to ]
>Can you tell us from which version you are upgrading to 6.3?
I am upgrading from 5.2.1 but same code tested and worked with
varnish 6.0.5 lts and 6.2.1 (all downloaded from package cloud) on
ubuntu bionic.

Testing 6 series version to choose to which one I should upgrade .
Sadly ,Some backends only accept requests with an "exotic" header name .

Should I expect this restriction included in a new 6.0 .* lts package
as well ?

If I have no choice and have to import the header vmod would you advise
how can i set brand new key-value http header in vcl using this
vmod?

I only saw operations on existing headers in doc :
https://github.com/varnish/varnish-modules/blob/master/docs/vmod_header.rst

Thanks,
--Yassine

On Mon, Oct 21, 2019 at 11:14 AM Dridi Boukelmoune <dridi@varni.sh> wrote:

> > before submitting a bug a report in github wanted to check is someone is
> familiar with this issue ?
>
> Can you tell us from which version you are upgrading to 6.3?
>
> I know that at some point header names parsing changed so that they'd
> have to be proper VCL symbols, leaving no room for otherwise valid
> HTTP headers that don't happen to match VCL expectations. We have no
> alternate syntax for "exotic" header names, I suggested req.http[7hello],
> someone else suggested req.http."7hello" but nothing happened in this
> direction. So your only solution today is to use vmod_header.
>
> https://github.com/varnishcache/varnish-cache/issues/2573
>
> Dridi
>