>Number: 4089 >Category: mod_proxy >Synopsis: proxy_cache.c ignores Expires: header if no Last-Modified: >header >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Mar 19 10:10:01 PST 1999 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.4 >Environment: uname -a: SunOS smoke 5.7 Generic sun4u sparc SUNW,Ultra-1 gcc 2.8.1 >Description: I want to be able to cache dynamically generated content using mod_proxy. My code sends an Expires: header, but because it's dynamically generated, there is no Last-Modified header. Consequently, mod_proxy does not cache the asset.
>How-To-Repeat: Write a CGI that sends an Expires: header. mod_proxy won't cache it. >Fix: *** proxy_cache.c~ Fri Jan 1 11:05:02 1999 --- proxy_cache.c Fri Mar 19 09:54:11 1999 *************** *** 831,837 **** if ((r->status != HTTP_OK && r->status != HTTP_MOVED_PERMANENTLY && r->st\ atus != HTTP_NOT_MODIFIED) || (expire != NULL && expc == BAD_DATE) || (r->status == HTTP_NOT_MODIFIED && (c == NULL || c->fp == NULL)) || ! (r->status == HTTP_OK && lmods == NULL && is_HTTP1) || r->header_only || ap_table_get(r->headers_in, "Authorization") != NULL || nocache) { --- 831,838 ---- if ((r->status != HTTP_OK && r->status != HTTP_MOVED_PERMANENTLY && r->st\ atus != HTTP_NOT_MODIFIED) || (expire != NULL && expc == BAD_DATE) || (r->status == HTTP_NOT_MODIFIED && (c == NULL || c->fp == NULL)) || ! (r->status == HTTP_OK && lmods == NULL && is_HTTP1 && ! (expire == NULL || expc == BAD_DATE)) || r->header_only || ap_table_get(r->headers_in, "Authorization") != NULL || nocache) { >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]