New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Varnish 3 varnishadm #27
Conversation
Hello, The syntax came from.... https://www.varnish-cache.org/docs/3.0/tutorial/purging.html, the example given in the tutorial is:
as it happens, both commands appear to work...
Kind Regards, |
Greetings, I perhaps was incorrect in describing it as a typo (I was unaware of the req.http.url syntax). After a bit more research it does seem that req.url and req.http.url are intended to be synonymous. In practice however it does not appear that req.http.url behaves as expected when provided as a parameter to the 'ban' method via the varnishadm utility. When this patch was submitted it was after the method did not appear to clear the cache despite varnishadm returning a 200. I have verified this again with a fresh install of varnish 3.0.2: Varnish configured on 6081 with localhost 80 as the backend, with the object already in the cache: snowman@snowman-VirtualBox:~$ wget localhost:6081 -O /dev/null -S While the ban is accepted using the req.http.url field name: It does not appear to actually purge: snowman@snowman-VirtualBox:~$ wget localhost:6081 -O /dev/null -S However when cached again: snowman@snowman-VirtualBox:~$ wget localhost:6081 -O /dev/null -S And purged using req.url: varnish> ban req.url ~ "^/$" snowman@snowman-VirtualBox:~$ wget localhost:6081 -O /dev/null -S So while the documentation shows it and varnishadm allows it, req.http.url does not seem to result in a ban or removal from the cache. There could be something I'm missing of course so if there's something I've overlooked please let me know as I'd rather not have a broken patch with name on it :D |
Good Morning, Nice work! I have runs some tests with curl ( to rule out any wget funnies) and I can confirm the same symptoms.
At this stage, I'm guessing you have have found a varnish bug :) |
Looks like there may have been a typo in the section for varnish 3 and using varnish adm. The line was using 'ban req.http.url' instead of 'req.url'.