[wp-trac] [WordPress Trac] #20434: cURL fails to follow redirects sometimes
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 13 13:39:12 UTC 2012
#20434: cURL fails to follow redirects sometimes
--------------------------+------------------
Reporter: evansolomon | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------
Comment (by dd32):
> attachment 20434[1].diff added
That's a quick attempt from me that covers the skype.com redirections, and
should handle the most common relative responses.. not 100% it's correct
though in it's logic that browsers have perfected in handling the non-spec
responses
Only testing is skype.com and the following: ( Result should be a bunch of
arrays of the same values.. )
{{{
var_dump( array( 'http://example.com/test/url',
WP_HTTP::make_absolute_url( '/test/url', 'http://example.com/here/' ) ) );
var_dump( array( 'http://example.com/bro', WP_HTTP::make_absolute_url(
'bro', 'http://example.com/here' ) ) );
var_dump( array( 'http://example.com/here/sub',
WP_HTTP::make_absolute_url( 'sub', 'http://example.com/here/' ) ) );
var_dump( array( 'http://example.com/test/url',
WP_HTTP::make_absolute_url( 'test/url', 'http://example.com' ) ) );
var_dump( array( '/test/url', WP_HTTP::make_absolute_url( '/test/url',
'http://' ) ) );
var_dump( array( 'http://example.com/test', WP_HTTP::make_absolute_url(
'../test', 'http://example.com/product' ) ) );
var_dump( array( 'http://example.com/test', WP_HTTP::make_absolute_url(
'../test', 'http://example.com/product/' ) ) );
var_dump( array( 'http://example.com/product/test',
WP_HTTP::make_absolute_url( '../test', 'http://example.com/product/one/' )
) );
var_dump( array( 'http://example.com/test', WP_HTTP::make_absolute_url(
'../test', 'http://example.com/product/two' ) ) );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20434#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list