Last modified: 2013-01-23 13:35:36 UTC
According to http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Varnish_purging_not_working_since_Varnish_2.x Varnish 2.x expects HTTP purge's to be of the form PURGE foo HTTP/1.0 host: http://somewhere.com instead of what we do which is: PURGE http://somewhere.com/foo HTTP/1.0 We should investigate if this is true, and if so either change our SquidPurgeClient to do what varnish likes, or put in a config variable
I already wrote the code to fix this and tried to submit it: https://gerrit.wikimedia.org/r/#/c/4065/ But then it was rejected.
cc'ing hashar since he commented on that change in gerrit. ----- So just to clarify, we rejected the patch because we don't like the way another product interpreted the HTTP standard?
PURGE is not part of the HTTP standard. I am pretty sure Squid does not support virtual host for purge command and expect a full URL. So we want a new class such as VarnishPurgeClient or something similar.
Squid supports the Host header in PURGE requests as long as reverse-proxy mode (i.e. http_port ... accel) is enabled, which it always should be if it is in $wgSquidServers. I've confirmed this back to Squid 2.6 in both vhost and defaultsite mode. So the Host header can be sent unconditionally, there's no need for a secret "make this work in Varnish" configuration variable.
(In reply to comment #1) > https://gerrit.wikimedia.org/r/#/c/4065/ Status Merged, bug resolved?
(In reply to comment #5) > > https://gerrit.wikimedia.org/r/#/c/4065/ > > Status Merged, bug resolved? No feedback => assuming it's fixed.