* (bug 29374) $wgVectorUseSimpleSearch is now enabled by default.
* Deprecated $wgAllowRealName is removed. Use $wgHiddenPrefs[] = 'realname'
instead.
-* Added a $wgPurgeHttp11 setting to allow SquidPurgeClient to send PURGE requests
- using HTTP/1.1 and a Host header instead of sending HTTP/1.0 requests with the
- whole url inside the PURGE <...> HTTP/1.0 line.
=== New features in 1.21 ===
* (bug 34876) jquery.makeCollapsible has been improved in performance.
recentchanges table.
* (bug 32951) Do not register internal externals with absolute protocol,
when server has relative protocol.
+* (bug 39005) When purging proxies listed in $wgSquidServers using HTTP PURGE
+ method requests, we now send a Host header by default, for Varnish
+ compatibility. This also works with Squid in reverse-proxy mode. If you wish
+ to support Squid configured in forward-proxy mode, set
+ $wgSquidPurgeUseHostHeader to false.
=== API changes in 1.21 ===
* prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt
$wgMaxSquidPurgeTitles = 400;
/**
- * Whether to use HTTP/1.1 for squid purge requests
- * false - Use HTTP/1.0 with a full url in the PURGE request.
- * true - Use HTTP/1.1 with a Host header and PURGE path.
- * @since 1.20
+ * Whether to use a Host header in purge requests sent to the proxy servers
+ * configured in $wgSquidServers. Set this to false to support Squid
+ * configured in forward-proxy mode.
+ *
+ * If this is set to true, a Host header will be sent, and only the path
+ * component of the URL will appear on the request line, as if the request
+ * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
+ * request. Squid supports this style of request only if reverse-proxy mode
+ * (http_port ... accel) is enabled.
+ *
+ * If this is set to false, no Host header will be sent, and the absolute URL
+ * will be sent in the request line, as is the standard for an HTTP proxy
+ * request in both HTTP 1.0 and 1.1. This style of request is not supported
+ * by Varnish, but is supported by Squid in either configuration (forward or
+ * reverse).
+ *
+ * @since 1.21
*/
-$wgPurgeHttp11 = false;
+$wgSquidPurgeUseHostHeader = true;
/**
* Routing configuration for HTCP multicast purging. Add elements here to
* @param $url string
*/
public function queuePurge( $url ) {
- global $wgPurgeHttp11;
+ global $wgSquidPurgeUseHostHeader;
$url = SquidUpdate::expand( str_replace( "\n", '', $url ) );
$request = array();
- if ( $wgPurgeHttp11 ) {
+ if ( $wgSquidPurgeUseHostHeader ) {
$url = wfParseUrl( $url );
$host = $url['host'];
if ( isset( $url['port'] ) && strlen( $url['port'] ) > 0 ) {