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

Request #4505 Should remember cookies between redirects
Submitted: 2005-06-02 03:41 UTC
From: arailean at squiz dot net Assigned:
Status: Wont fix Package: HTTP_Request
PHP Version: 4.3.11 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-02 03:41 UTC] arailean at squiz dot net
Description: ------------ It would be very good if HTTP_Request properly managed the cookies between redirects if they are allowed. Currenly if redirects are allowed, any intermediate cookies are ignored until the destination is reached (i.e. the non-redirecting response). For the systems where the request-response flow depends of those cookies, the result will be undesirable because either the cookie set in the final HTTP_Response will not be complete, or might affect the final redirect location and response. I know HTTP_Client has the ability to handle these situations, but for consistency so should HTTP_Request if it claims to handle redirects. For some applications using HTTP_Client may not be convenient. Introducing a Cookie manager into the HTTP_Request shouldn't introduce much overhead in terms of memory or speed. I see that bug #2254 touches this topic, but decided to give it another try. Supplying a diff with canges. Reproduce code: --------------- 48a49 > require_once 'HTTP/Client/CookieManager.php'; 201a203,208 > * Instance of HTTP_Client_CookieManager > * @var object HTTP_Client_CookieManager > */ > var $_cookieManager; > > /** 228a236 > $this->_cookieManager = &new HTTP_Client_CookieManager();; 616c624,627 < --- > // Remember cookies between redirects > $this->_cookieManager->updateCookies($this); > $this->_cookieManager->passCookies($this); >

Comments

 [2005-06-07 07:16 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-10-20 16:46 UTC] seth at pricepages dot org
You should really mention somewhere that redirects are depreciated. I was just about to submit a patch for some added functionality, now I need to rewrite it for HTTP_Client.