Changeset 29851
- Timestamp:
- 10/08/2014 05:57:15 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r29850 r29851 687 687 } 688 688 689 $absolute_path = $url_parts['scheme'] . '://' . $url_parts['host']; 690 if ( isset( $url_parts['port'] ) ) 691 $absolute_path .= ':' . $url_parts['port']; 689 $absolute_path = $url_parts['scheme'] . '://'; 690 691 // Schemeless URL's will make it this far, so we check for a host in the relative url and convert it to a protocol-url 692 if ( isset( $relative_url_parts['host'] ) ) { 693 $absolute_path .= $relative_url_parts['host']; 694 if ( isset( $relative_url_parts['port'] ) ) 695 $absolute_path .= ':' . $relative_url_parts['port']; 696 } else { 697 $absolute_path .= $url_parts['host']; 698 if ( isset( $url_parts['port'] ) ) 699 $absolute_path .= ':' . $url_parts['port']; 700 } 692 701 693 702 // Start off with the Absolute URL path. -
trunk/tests/phpunit/tests/http/http.php
r29850 r29851 62 62 array( '/expected', 'http://example.com/sub/http://site.com/sub/', 'http://example.com/expected' ), 63 63 array( '/expected/http://site.com/sub/', 'http://example.com/', 'http://example.com/expected/http://site.com/sub/' ), 64 65 // Schemeless URL's (Not valid in HTTP Headers, but may be used elsewhere) 66 array( '//example.com/sub/', 'https://example.net', 'https://example.com/sub/' ), 64 67 ); 65 68 }
Note: See TracChangeset
for help on using the changeset viewer.