Re: Re: HTTP_Request / No body?

From: Date: Sun, 02 Dec 2007 06:20:41 +0000
Subject: Re: Re: HTTP_Request / No body?
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48634@lists.php.net to get a copy of this message
I am currently using HEAD requests, but many sites will 405 on them. I was hoping to do a GET, but not download the body. --Joe On Dec 1, 2007, at 5:24 PM, Travis Swicegood <development@domain51.com> wrote:
On Dec 1, 2007, at 3:40 PM, Carsten Wiedmann wrote:
Philippe Jausions schrieb:
Joe Stump wrote:
Is there a way to *force* HTTP_Request to NOT download the body of a page even if the request type is GET? Curl allows this with the NOBODY option.
Just pass "saveBody" => false in the option and you may also have to set up a listener to simply ignore the "gotBody" notification data passed by the HTTP_Response.
That's not the same. Because you must download the data, even you don't display/use it. Last month, during my work on a small shell wrapper to HTTP_Request, I've had the same problem like Joe. Without a solution and I must also use your way. But IMHO a good idea for a feature request? Because HTTP_Response::process() have allready such an option.
Isn't that was a HEAD request method is for? http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4 From the looks of it, setMethod() doesn't prohibit you from doing that. -T


« previous php.pear.dev (#48634) next »