Page MenuHomePhabricator

Varnish 2.x doesn't like full urls in PURGE requests
Closed, ResolvedPublic


According to Varnish 2.x expects HTTP purge's to be of the form

PURGE foo HTTP/1.0

instead of what we do which is:


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

Version: 1.20.x
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:54 AM
bzimport set Reference to bz39005.
bzimport added a subscriber: Unknown Object (MLST).

I already wrote the code to fix this and tried to submit it:

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 #5)

Status Merged, bug resolved?

No feedback => assuming it's fixed.