Hi,
The varnish-4 Hashing documentation states; "It is worth pointing out
that Varnish doesn't lowercase the hostname or the URL before hashing it
so in theory having "Varnish.org/" and "varnish.org/" would result in
different cache entries."
I would like to lowercase both the host and url during my normalization
routines in vcl_recv. Stackoverflow has an example using embedded C;
===
|C{
#include <ctype.h>
static void strtolower(const char *s) {
register char *c;
for (c=s; *c; c++) {
if (isupper(*c)) {
*c= tolower(*c);
}
}
return;
}
}C
sub vcl_recv{
C{
strtolower(VRT_r_req_url(sp));
}C
}
===
Is this the recommended approach -- and will it work with the variable
definition changes in varnish 4? (I'm worried||VRT_r_req_url|(sp) may break).
Also -- what is the variable holding the Host string? Is VRT_r_req_host(sp)
valid in varnish-4?
Many thanks,
~ Brice
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc