I'm trying to handle bad requests sent to the servers, by eliminating
problematic suffixes.
We had a lot of requests lately, ending by a percent sign and a single digit,
that returned 503.
I tried adding this code to remove the 2 last characters of the URL, but the
compilation fails.
# If the URL ends with % and one digit (a broken hex value) -
remove the last 2 characters.
if (req.url ~ "(.*)%[0-9a-fA-F]$") {
set req.url = regsub(req.url,
"(.*)%[0-9a-fA-F]$", "\1");
}
I get this error:
Invalid hex char in %xx escape
(input Line 107 Pos 28)
if (req.url ~ "(.*)%[0-9a-fA-F]$") {
---------------------------###--------------
I tried adding '\' before the '%' sign, with no success.
Thanks for your help,
Naama
Answers.com
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc