This bug was first reported by James Cooper in 1999 (http://archive.apache.org/gnats/4089), but was somehow never included. Searching the web it is obvious that many people have found this bug through the years, but none (except James) have reported it. Instead, it's become "common knowledge" that for mod_proxy in Apache to cache content, it has to have a Last-Modified header. Just having an Expires header is not enough; it will always result in a X-Cache: MISS Last-Modified headers do not really make sense for dynamic content, so many HTTP Accelerator plugins for dynamic websites only generate Expires headers, assuming that it'll work fine, when it doesn't. This patch fixes this deficiency for 1.3.28: *** proxy_cache.c-org Fri Sep 12 15:36:59 2003 --- proxy_cache.c Fri Sep 12 16:43:12 2003 *************** *** 1395,1403 **** (r->status == HTTP_NOT_MODIFIED && (c == NULL || c->fp == NULL)) || /* ! * 200 OK response from HTTP/1.0 and up without a Last-Modified header */ ! (r->status == HTTP_OK && lmods == NULL && is_HTTP1) || /* HEAD requests */ r->header_only || --- 1397,1408 ---- (r->status == HTTP_NOT_MODIFIED && (c == NULL || c->fp == NULL)) || /* ! * 200 OK response from HTTP/1.0 and up ! * without a Last-Modified or a valid Expires header */ ! (r->status == HTTP_OK && is_HTTP1 ! && lmods == NULL ! && (expire == NULL || expc == BAD_DATE)) || /* HEAD requests */ r->header_only ||
I'm going through the bug db to make sure patches are findable. Please see http://httpd.apache.org/dev/patches.html