Re: [PHP-DEV] PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers From: Teodor Cimpoesu (teo <email protected>)
Date: 11/29/00

Hi Jordan!
On Tue, 28 Nov 2000, Jordan Russell wrote:

> Hi,
>
> I understand that I could use an ETAG or manually parse the
> If-Modified-Since header myself, but it seems like PHP should handle
> If-Modified-Since itself. After all, a very simple shell script like the one
> I posted below handles it properly (i.e. returns 304 codes), and "sh" isn't
> even designed for HTTP like PHP is! It is for that reason I filed this issue
> as a bug report.
>
> If I have no other choice but to manually send back a 304 code myself, what
> is the proper way to do it? I tried:
>
> Header ("HTTP/1.0 304 Not Modified");
>
> but that sent back a 304 code which included a Content-Type header -- a
> violation of the HTTP spec. (HTTP says 304 responses "must be returned
> without any message-body".)
and this also happens with 202 and 204, for which I filed a bug report
a while ago...

My first guess when I read your bug report was that the guilty is the
content-type header, as it bit me with the above "no content" responses.

As I took a peek on the sources, I think it wasn't adressed cause it will
imply a small performance penalty to add aditional checks,and given the few
number of cases when a page uses no message body answers...

Still, there should be an answer to this.

-- teodor

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>