Recent Changes - Search:

PmWiki

pmwiki.org

00802

Summary: Bad headers sent when using cache with If-Modified-Since enabled
Created: 2006-09-14 17:37
Status: Awaiting Feedback
Category: Bug
From: psvo?
Assigned:
Priority: 54
Version: 2.1.26
OS: Linux / Apache 1.3 / PHP 5

Description: $EnableIMSCaching doesn't work with my version of Apache and PHP. When I issue second request to the same page, I get this replay:

HTTP/1.x 304 Not Modified
Date: Thu, 14 Sep 2006 22:18:27 GMT
Server: Apache/1.3.34 (Unix)  (Gentoo) PHP/5.0.5-pl5-gentoo
Connection: Keep-Alive
Keep-Alive: timeout=15, max=99
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

And then the next request isn't cached. I was able to fix it by sending all $HTTPHeaders before header("HTTP/1.0 304 Not Modified"); in scripts/caches.php. The bad Cache-Control header is probably sent by PHP or Apache (e.g. pmwiki.org doesn't have this problem).


This Bug may prevent Internet Explorer from downloading attachments when the user is logged in to the wiki.

Tested by attaching a pdf file to the sandbox page. Attempting to download the attachment in IE as an anonymous user and an authenticated user. Anonymous users could download it. Authenticated users could not. Both anonymous and authenticated users in Firefox could.

Try editing your php.ini for your apache server, look for this:

; Set to {nocache,private,public,} to determine HTTP caching aspects
; or leave this empty to avoid sending anti-caching headers.
; session.cache_limiter = nocache
session.cache_limiter =

removing "nocache" fixed it for me

Edit - History - Print - Recent Changes - Search
Page last modified on January 15, 2008, at 06:23 AM