[wp-trac] [WordPress Trac] #16855: HTTP API No Follow Redirection

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 14 16:11:13 UTC 2011


#16855: HTTP API No Follow Redirection
--------------------------+-----------------------------
 Reporter:  TheDeadMedic  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 As highlighted in the following discussions, there's an issue when we
 '''don't''' want to follow redirects. On closer inspection, I believe only
 the cURL component is affected.

 http://wordpress.stackexchange.com/questions/11951/wp-remote-get-with-
 manual-redirect/11964#11964

 http://groups.google.com/group/wp-
 hackers/browse_thread/thread/19dc7c7197f66754/9a60ad0b37ccaf1b?show_docid=9a60ad0b37ccaf1b&pli=1

 Currently, {{{WP_Http_Curl}}} will throw a {{{WP_Error}}} if a redirection
 header was recieved, and the {{{redirection}}} argument is zero.

   ''Maximum redirects followed (0)''

 The FOLLOWLOCATION option ''must'' be false, otherwise cURL treats the
 result as an error.


 {{{
 if ( !$r['redirection'] )
     curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, false );
 }}}

 As I say, as far as I know only cURL component is affected.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16855>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list