Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers

From: Date: Wed, 29 Nov 2000 10:50:38 +0000
Subject: Re: PHP 4.0 Bug #8017: PHP ignores "If-Modified-Since" headers
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-39488@lists.php.net to get a copy of this message
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

« previous php.dev (#39488) next »