Re: HTTP_Request question

From: Date: Wed, 09 Oct 2002 11:21:15 +0000
Subject: Re: HTTP_Request question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2462@lists.php.net to get a copy of this message
Pauli, 13:15:39 09. oktober 2002 (streda) Greetings. > > [Location] => > > http://www.amazon.fr/exec/obidos/external-search/402-7425534-1824936?mode=bl > ended&keyword=photo&tag=regardnumeriq-21 > The class won't follow Location: headers currently (you're being > redirected). Fix for this is quite simple. Use getResponseCode() method to get HTTP response code. Check for 301 (or also for 302?) and re-request using Location header if that code was present. Another issue is, that I was unable to find way how to change URL for current HTTP_Request object and make request again. Thus I must created new one(s), but the old one probably persist. But they do not have descructor, since AFAIK HTTP_Request does not inherit PEAR base class, so they took memory till the end of script execution. I want aalso ask if support for redirect following is planed in the future for HTTP_Request class. Anyway I like this class as far as I like also HTTP::redirect() to make HTTP/1.1 absolute redirects (since relative are strictly forbidden in HTTP/1.1 protocol). Thanks, =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, http://www.nepto.sk/ nepto@atomicpile.sk

« previous php.pear.general (#2462) next »