Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers
| From: | Stanislav Malyshev | Date: | Wed, 29 Nov 2000 16:32:56 +0000 |
| Subject: | Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-39598@lists.php.net to get a copy of this message | ||
JR>> The way it would work is very simple -- PHP, from how I
JR>> understand it, has two phases, first where it collects the
JR>> headers, and then where it outputs the body. At the moment where
JR>> it starts to output the body, it should compare the
JR>> Last-Modified header outputted by the script (if any) against
JR>> If-Modified-Since. If (Last-Modified > If-Modified-Since), it
JR>> proceeds normally and sends back a 200 code. If (Last-Modified
JR>> <= If-Modified-Since), it would not output any body -- ignoring
JR>> all "echo"s in the script and further HTML in the document. The
JR>> script, however, continues to execute normally, completely
JR>> oblivious that no body is being sent out.
Hmm. That is not exactly what was meant by If-Modified-Since, I guess.
Also, I'm not sure it worth this - we'd have to check for two headers on
_each_ script.
On the other hand, now I see what you mean - it probably could be
implemented, though it is not so easy. There's a lot of code in Apache
that deals with all kinds of "special cases", and I'm not sure which of
them should be handled in PHP.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.106