Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -32,7 +32,6 @@ |
33 | 33 | * @return Mixed: (bool)false on failure or a string on success |
34 | 34 | */ |
35 | 35 | public static function request( $method, $url, $options = array() ) { |
36 | | - $url = wfExpandUrl( $url, PROTO_HTTP ); |
37 | 36 | wfDebug( "HTTP: $method: $url\n" ); |
38 | 37 | $options['method'] = strtoupper( $method ); |
39 | 38 | |
— | — | @@ -178,14 +177,14 @@ |
179 | 178 | public $status; |
180 | 179 | |
181 | 180 | /** |
182 | | - * @param $url String: url to use |
| 181 | + * @param $url String: url to use. If protocol-relative, will be expanded to an http:// URL |
183 | 182 | * @param $options Array: (optional) extra params to pass (see Http::request()) |
184 | 183 | */ |
185 | 184 | function __construct( $url, $options = array() ) { |
186 | 185 | global $wgHTTPTimeout; |
187 | 186 | |
188 | | - $this->url = $url; |
189 | | - $this->parsedUrl = parse_url( $url ); |
| 187 | + $this->url = wfExpandUrl( $url, PROTO_HTTP ); |
| 188 | + $this->parsedUrl = parse_url( $this->url ); |
190 | 189 | |
191 | 190 | if ( !Http::isValidURI( $this->url ) ) { |
192 | 191 | $this->status = Status::newFatal( 'http-invalid-url' ); |