dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
139fb5e
)
Make userAgent also work as an option to MWHttpRequest::factory() and MWHttpRequest...
author
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 27 Feb 2012 01:37:06 +0000
(
01:37
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 27 Feb 2012 01:37:06 +0000
(
01:37
+0000)
includes/HttpFunctions.php
patch
|
blob
|
history
diff --git
a/includes/HttpFunctions.php
b/includes/HttpFunctions.php
index
1018658
..
23ea8df
100644
(file)
--- a/
includes/HttpFunctions.php
+++ b/
includes/HttpFunctions.php
@@
-43,9
+43,6
@@
class Http {
}
$req = MWHttpRequest::factory( $url, $options );
- if( isset( $options['userAgent'] ) ) {
- $req->setUserAgent( $options['userAgent'] );
- }
$status = $req->execute();
if ( $status->isOK() ) {
@@
-210,6
+207,9
@@
class MWHttpRequest {
} else {
$this->timeout = $wgHTTPTimeout;
}
+ if( isset( $options['userAgent'] ) ) {
+ $this->setUserAgent( $options['userAgent'] );
+ }
$members = array( "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
"method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" );