Re: Re: HTTP_Request / No body?

From: Date: Sun, 02 Dec 2007 15:17:50 +0000
Subject: Re: Re: HTTP_Request / No body?
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48638@lists.php.net to get a copy of this message
Joe, Joe Stump wrote: > 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. So you're basically looking to close the connection once you received the headers back, although a GET should return data isn't the point of GETting something ;-)? Anyway, you might want to add that to the list of request for HTTP_Request2 or PEAR2::HTTP::Request or whatever the next major version would be. -Philippe > --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.49í%«I½ >> ‘8<€ƒ °± >> >> From the looks of it, setMethod() doesn't prohibit you from doing that. >> >> -T

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