Re: HTTP_download -If-Modified-Since (->304) does not work

From: Date: Fri, 19 Dec 2003 17:51:12 +0000
Subject: Re: HTTP_download -If-Modified-Since (->304) does not work
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24546@lists.php.net to get a copy of this message
Hi Andreas Korthaus, you wrote: > The "sendStatusCode()" looks like that: > > function sendStatusCode( $code) > { > if (defined('HTTP_HEADER_STATUS_' .$code)) { > $status_msg = constant('HTTP_HEADER_STATUS_' .$code); > header( 'HTTP/'.$this->_httpVersion. ' ' .$code. ' > ' .$status_msg); > } else { > return false; > } > } > Seems that the signature of this method has changed, prior versions allowed to pass the HTTP_HEADER_STATUS_* constants. > Why is there no "exit;" after sending the header? Because if there is no > exit, the code above will raise an error and my scripts will stop and > sending HTML-Output(error-message). If I use this code as it is in CVS, I > get a PEAR Error if the Client sends IF_MODIFIED_SINCE. Well, others may log this event, so just check what error has happened. I guess it's time to introduce some error constatnts... > > Is this a bug? Or my mistake? > > kind regards, > Andreas Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature]
« previous php.pear.dev (#24546) next »