Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -43,9 +43,6 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | $req = MWHttpRequest::factory( $url, $options ); |
47 | | - if( isset( $options['userAgent'] ) ) { |
48 | | - $req->setUserAgent( $options['userAgent'] ); |
49 | | - } |
50 | 47 | $status = $req->execute(); |
51 | 48 | |
52 | 49 | if ( $status->isOK() ) { |
— | — | @@ -210,6 +207,9 @@ |
211 | 208 | } else { |
212 | 209 | $this->timeout = $wgHTTPTimeout; |
213 | 210 | } |
| 211 | + if( isset( $options['userAgent'] ) ) { |
| 212 | + $this->setUserAgent( $options['userAgent'] ); |
| 213 | + } |
214 | 214 | |
215 | 215 | $members = array( "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo", |
216 | 216 | "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" ); |