So sorry. Didn't notice there were already follow-ups to your question.
My Mistake.
~Paul
On 9/30/2014 2:18 PM, Paul Procacci wrote:
https://www.varnish-cache.org/docs/3.0/reference/vmod_std.html
The std module provides a tolower function which is cleaner to use in
my honest opinion.
Either way would work fine though. There really isn't a wrong way to
do it.
~Paul
On 9/30/2014 12:46 AM, Brice Burgess wrote:
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
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc