Re: 304 status + cache-control: no-store

From: Date: Fri, 19 Dec 2003 23:47:54 +0000
Subject: Re: 304 status + cache-control: no-store
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24569@lists.php.net to get a copy of this message
Hi! "Andreas Korthaus" <akorthaus@web.de> wrote: news:20031219225332.23328.qmail@pb1.pair.com... > [...] > 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. I have added the following lines to my Download.php: // overwrite anti-caching headers generated by PHP if (function_exists(session_id)) { if (session_id()) { $this->sendHeaders(); } } This way I think it will work also if there is no session-support compiled in. Now everything works fine for me. That's where I inserted the lines above: /** * Don't send data if cached - "HTTP/1.x 304 Not Modified" */ if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { if ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $this->_last_modified ) { // overwrite anti-caching headers generated by PHP if (function_exists(session_id)) { if (session_id()) { $this->sendHeaders(); } } // Not Modified $this->sendStatusCode(304); return false; } } Regards, Andreas

« previous php.pear.dev (#24569) next »