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 "Rank aliases in search in order they appear in the messages file."
[lhc/web/wiklou.git]
/
includes
/
http
/
CurlHttpRequest.php
diff --git
a/includes/http/CurlHttpRequest.php
b/includes/http/CurlHttpRequest.php
index
f58c3a9
..
7fd3e83
100644
(file)
--- a/
includes/http/CurlHttpRequest.php
+++ b/
includes/http/CurlHttpRequest.php
@@
-38,11
+38,10
@@
class CurlHttpRequest extends MWHttpRequest {
}
public function execute() {
}
public function execute() {
-
- parent::execute();
+ $this->prepare();
if ( !$this->status->isOK() ) {
if ( !$this->status->isOK() ) {
- return
$this->status;
+ return
Status::wrap( $this->status ); // TODO B/C; move this to callers
}
$this->curlOptions[CURLOPT_PROXY] = $this->proxy;
}
$this->curlOptions[CURLOPT_PROXY] = $this->proxy;
@@
-102,7
+101,7
@@
class CurlHttpRequest extends MWHttpRequest {
$curlHandle = curl_init( $this->url );
if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
$curlHandle = curl_init( $this->url );
if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
- throw new
MW
Exception( "Error setting curl options." );
+ throw new
InvalidArgument
Exception( "Error setting curl options." );
}
if ( $this->followRedirects && $this->canFollowRedirects() ) {
}
if ( $this->followRedirects && $this->canFollowRedirects() ) {
@@
-140,7
+139,7
@@
class CurlHttpRequest extends MWHttpRequest {
$this->parseHeader();
$this->setStatus();
$this->parseHeader();
$this->setStatus();
- return
$this->status;
+ return
Status::wrap( $this->status ); // TODO B/C; move this to callers
}
/**
}
/**