[PATCH] Normalizing the Host: header

Nils Goroll slink at schokola.de
Mon Feb 21 17:09:57 CET 2011


On 02/18/11 01:32 PM, Tollef Fog Heen wrote:
> | >Shouldn't we normalize the host header anyway to maximize cache hit rates ?
> | Relevant question in this context:  Do we know how to ?
> 
> Normalise usually means rewriting from a list of various legal names to
> the canonical name, so in the general case: no.

The normalization you are referring to is site-specific, yes.

The generic normalization according to rfc3986 implies case folding for
percent-encodings (toupper()) and all other characters (tolower()).

This would help maximize cache efficiency whenever Host headers are not
normalized to some (set of) site-specific const value(s).

Nils




More information about the varnish-dev mailing list