protected $maxConnsPerHost = 50;
/** @var string|null proxy */
protected $proxy;
- /** @var string */
- protected $userAgent = 'MW-MultiHttpClient';
/**
* @param array $options
}
if ( !isset( $req['headers']['user-agent'] ) ) {
- $req['headers']['user-agent'] = $this->userAgent;
+ $req['headers']['user-agent'] = self::userAgent();
}
$headers = array();
curl_multi_close( $this->multiHandle );
}
}
+
+ /**
+ * The default User-Agent for requests.
+ * @return string
+ */
+ public static function userAgent() {
+ return 'wikimedia/multi-http-client v1.0';
+ }
}