[PATCH] Normalizing the Host: header

Nils Goroll nils.goroll at uplex.de
Thu Feb 17 19:03:52 CET 2011

Hi phk,

> But this is exactly the kind of needless text-processing we should avoid

In general: Absolutely, yes.

In this case, normalizing once should pay off wherever the host header needs to
be checked at least once.

> a regexp or a strncasecmp()

We don't have stncasecmp() in VCL at this point, so we need to compare
performance of pcre_exec() and strcmp().

Besides this, my main motivation for this suggestion was to avoid wrong host
header comparisons for all of those who have not spotted the right place in the

If this suggestion is not found useful, I think we should at least fix all the
wrong examples for host header comparison in the docs.

Thanks, Nils


** * * UPLEX - Nils Goroll Systemoptimierung

Schwanenwik 24
22087 Hamburg

tel +49 40 28805731
mob +49 170 2723133
fax +49 40 42949753


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20110217/68137be7/attachment-0002.pgp>

More information about the varnish-dev mailing list