dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove dead code from RCCacheEntryFactory"
[lhc/web/wiklou.git]
/
includes
/
clientpool
/
SquidPurgeClient.php
diff --git
a/includes/clientpool/SquidPurgeClient.php
b/includes/clientpool/SquidPurgeClient.php
index
49d9d1c
..
dffe6e1
100644
(file)
--- a/
includes/clientpool/SquidPurgeClient.php
+++ b/
includes/clientpool/SquidPurgeClient.php
@@
-68,9
+68,8
@@
class SquidPurgeClient {
/**
* @param string $server
/**
* @param string $server
- * @param array $options
*/
*/
- public function __construct( $server
, $options = []
) {
+ public function __construct( $server ) {
$parts = explode( ':', $server, 2 );
$this->host = $parts[0];
$this->port = $parts[1] ?? 80;
$parts = explode( ':', $server, 2 );
$this->host = $parts[0];
$this->port = $parts[1] ?? 80;
@@
-151,7
+150,7
@@
class SquidPurgeClient {
if ( IP::isIPv4( $this->host ) ) {
$this->ip = $this->host;
} elseif ( IP::isIPv6( $this->host ) ) {
if ( IP::isIPv4( $this->host ) ) {
$this->ip = $this->host;
} elseif ( IP::isIPv6( $this->host ) ) {
- throw new MWException( '$wg
Squid
Servers does not support IPv6' );
+ throw new MWException( '$wg
Cdn
Servers does not support IPv6' );
} else {
Wikimedia\suppressWarnings();
$this->ip = gethostbyname( $this->host );
} else {
Wikimedia\suppressWarnings();
$this->ip = gethostbyname( $this->host );
@@
-192,11
+191,11
@@
class SquidPurgeClient {
/**
* Queue a purge operation
*
/**
* Queue a purge operation
*
- * @param string $url
+ * @param string $url
Fully expanded URL (with host and protocol)
*/
public function queuePurge( $url ) {
global $wgSquidPurgeUseHostHeader;
*/
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 );
$request = [];
if ( $wgSquidPurgeUseHostHeader ) {
$url = wfParseUrl( $url );