[wp-trac] [WordPress Trac] #16950: Provide a redirected-to URI

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 23 17:22:34 UTC 2011


#16950: Provide a redirected-to URI
-------------------------+-------------------------------------
 Reporter:  cogmios      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  HTTP         |    Version:  3.1
 Severity:  normal       |   Keywords:  2nd-opinion needs-patch
-------------------------+-------------------------------------
 This discussion started (For me) here:
 http://wordpress.stackexchange.com/questions/11951/wp-remote-get-with-
 manual-redirect/11964#11964 (my name is edward de leau)

 I then had contact with Scott Kingsley Clark who opened that thread and
 did not have time to work on it yet. I have the same problem:

 I need to know where a url redirects to, to detect its base url (to
 extract favicons from).

 So I made a redirect=0 and did manual processing:
 http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes
 /class-http.php but discovered that from my testset of 1500 found favicons
 500 were supplied by google because of the line 'Too many redirections'.

 This was because the parameter FOLLOWLOCATION could not be set. See ticket
 : https://core.trac.wordpress.org/ticket/16855#comment:29
 and my question: http://wordpress.stackexchange.com/questions/11951/wp-
 remote-get-with-manual-redirect/11964#11964 where Hakre supplied a fix to
 set FOLLOWLOCATION which works but the ticket is still under discussion.

 So I had another approach: maybe just supply the URI that was redirected
 to. For CURL this can be done easily by adding a one-liner "do_action(
 'http_api_curl_info', $handle);" directly after the exec call. For the
 other I have not researched this.

 Would this be an option? (this IS the reason Curl supplies this
 information array with the forwarded URI). (then catchable via $info =
 curl_getinfo($handle);)

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


More information about the wp-trac mailing list