Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.6.0

Request #18412 Impossible to determine effective URL when follow_redirects is true
Submitted: 2011-03-31 08:47 UTC
From: snover Assigned: avb
Status: Closed Package: HTTP_Request2 (version 2.0.0beta2)
PHP Version: 5.3.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 6 + 11 = ?

 
 [2011-03-31 08:47 UTC] snover (Colin Snover)
Description: ------------ It is currently impossible to determine whether or not a redirect has actually gone to an expected URL. cURL normally exposes this in the CURLINFO_EFFECTIVE_URL info. HTTP_Request2 should expose this too.

Comments

 [2011-03-31 13:05 UTC] avb (Alexey Borzov)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: avb
In fact, Curl Adapter exposes the result of curl_getinfo() via its getInfo() method, it is also possible to get the effective URL of the request in Socket adapter when using Observers. An identical method to get this info for both Adapters should be added, though.
 [2011-03-31 21:23 UTC] snover (Colin Snover)
Unfortunately, in the case of the cURL adapter, the only way to access the getInfo method without extending HTTP_Request2 would be to instantiate the adapter manually and pass it in as an object. If you pass a string as the adapter type, there is no way to retrieve the current adapter object from outside the class.
 [2011-04-03 21:48 UTC] avb (Alexey Borzov)
-Status: Assigned +Status: Closed
Added getEffectiveUrl() method to HTTP_Request2_Response. This is in release 2.0.0beta3