Changeset 38429
- Timestamp:
- 08/29/2016 02:32:48 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r38411 r38429 363 363 } 364 364 365 // Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231 366 $url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url ); 367 365 368 try { 366 369 $requests_response = Requests::request( $url, $headers, $data, $type, $options ); -
trunk/tests/phpunit/tests/http/base.php
r38416 r38429 377 377 } 378 378 379 /** 380 * @ticket 37733 381 */ 382 function test_url_with_double_slashes_path() { 383 $url = $this->redirection_script . '?rt=' . 0; 384 385 $path = parse_url( $url, PHP_URL_PATH ); 386 $url = str_replace( $path, '/' . $path, $url ); 387 388 $res = wp_remote_request( $url ); 389 $this->assertNotWPError( $res ); 390 } 391 379 392 380 393 }
Note: See TracChangeset
for help on using the changeset viewer.