[wp-trac] [WordPress Trac] #10624: Upon redirection limit being hit return redirected URL in wp_error data fields

WordPress Trac wp-trac at lists.automattic.com
Sun Aug 16 09:34:00 UTC 2009


#10624: Upon redirection limit being hit return redirected URL in wp_error data
fields
--------------------------+-------------------------------------------------
 Reporter:  dd32          |       Owner:  dd32        
     Type:  defect (bug)  |      Status:  new         
 Priority:  normal        |   Milestone:  2.9         
Component:  HTTP          |     Version:  2.9         
 Severity:  normal        |    Keywords:  dev-feedback
--------------------------+-------------------------------------------------

Comment(by dd32):

 This might actually be impossible..

 Half the classes do not support redirections very well, You cant catch the
 error with some (So cannot tell why the request failed), Not all abide by
 the max-redirections, and end up returning multiple headers(WP_Http_Fopen
 at least).

 Only really the Curl and FSockopen seem to support redirects well.

 I'm going to attach a patch which modifies Curl and FSockopen to return as
 a normal request, but with a 301/2 error if the max-redirects is 0..

 Note, The switching of the Curl error handling order was to allow for the
 custom 30x error message to have priority over Curl's own internal error.
 The $parts.. line was also redundant, not being used at all by anything.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10624#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list