if ( IP::isIPv4( $this->host ) ) {
$this->ip = $this->host;
} elseif ( IP::isIPv6( $this->host ) ) {
- throw new MWException( '$wgSquidServers does not support IPv6' );
+ throw new MWException( '$wgCdnServers does not support IPv6' );
} else {
Wikimedia\suppressWarnings();
$this->ip = gethostbyname( $this->host );
/**
* Queue a purge operation
*
- * @param string $url
+ * @param string $url Fully expanded URL (with host and protocol)
*/
public function queuePurge( $url ) {
global $wgSquidPurgeUseHostHeader;
- $url = CdnCacheUpdate::expand( str_replace( "\n", '', $url ) );
+ $url = str_replace( "\n", '', $url ); // sanity
$request = [];
if ( $wgSquidPurgeUseHostHeader ) {
$url = wfParseUrl( $url );