Header names case sensitivity

Jérémy Lecour jeremy.lecour at gmail.com
Tue Dec 13 18:57:24 UTC 2022


Hi there,

I've originally posted an issue in the GitHub repository, but was kindly
reminded that it's not the place to have this kind of discussion. I'm sorry
about that.

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

To summarize briefly, I'm wondering if we can use header names in lowercase
or mixed-case in VCL (or both).

I can see some VCL code (for example the output of `varnishd -x builtin`)
with header names in lowercase and some in mixed-case, but I suspect that
it doesn't really matter and that both cases are supported in the same way.
I wish I could get a confirmation before putting all my header names in
lowercases without fear of breaking something.

In the GitHub issue Dridi said

> VCL was historically designed when HTTP/1 was the only player in town and
case sensitivity of the header names is enforced at the h2 protocol level.

I'm not sure if this means that regardless of the protocol used (1.0, 1.1,
or 2) at the request level the headers are already normalized in lowercase
internally and mixed-case keywords are still there for backward
compatibility.

Thanks for your help here.

-- 
Jérémy Lecour :
https://jeremy.lecour.fr - http://twitter.com/jlecour
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20221213/c65b4e7e/attachment-0001.html>


More information about the varnish-misc mailing list