Re: 304 status + cache-control: no-store
| From: | Andreas Korthaus | Date: | Fri, 19 Dec 2003 22:53:00 +0000 |
| Subject: | Re: 304 status + cache-control: no-store | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24566@lists.php.net to get a copy of this message | ||
Hi!
Thank you very much for this update!
I have another problem/idea:
If HTTP_download is sending 304 headers, and if you are using sessions at
the same time, PHP generates aggressive anti-caching headers, such as:
Cache-Control: no-store,...
I know that I can change this settings by ini-set, but this is not possible
for me because of my framework.
That happends because you don't send any other headers in case of 304, so
the
/**
* HTTP headers
*
* @access private
* @var array
*/
var $_headers = array(
'Content-Type' => 'application/x-octetstream',
'Cache-Control' => 'public',
'Accept-Ranges' => 'bytes',
'Connection' => 'close'
);
in HTTP_download has no effect here.
Now I get the following communication:
client: GET /
server: 200 OK
last-modified....
client: GET /
if-modified-since....
server: 304 not modified
cache-control: no-store
client: GET /
server: 200 OK
last-modified....
...
You see? That's what happends with the latest CVS-Version of HTTP_download
and HTTP_header
I think you should send cache-control header as for other responses.
Regards,
Andreas