From: Brian Pane Date: Tue, 18 Dec 2001 23:57:36 +0000 (+0000) Subject: Skip the setting of Last-Modified in the response header on X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1844ca5e02b9bad083ee2ba92d78c3c0851abb91;p=apache Skip the setting of Last-Modified in the response header on requests or subrequests for which no response header will be generated (a performance improvement for mod_include) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92523 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index 56e7e799d4..50cd1ed962 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1267,10 +1267,12 @@ AP_DECLARE(int) ap_rflush(request_rec *r) */ AP_DECLARE(void) ap_set_last_modified(request_rec *r) { - apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime); - char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); - apr_rfc822_date(datestr, mod_time); - apr_table_setn(r->headers_out, "Last-Modified", datestr); + if (!r->assbackwards) { + apr_time_t mod_time = ap_rationalize_mtime(r, r->mtime); + char *datestr = apr_palloc(r->pool, APR_RFC822_DATE_LEN); + apr_rfc822_date(datestr, mod_time); + apr_table_setn(r->headers_out, "Last-Modified", datestr); + } } AP_IMPLEMENT_HOOK_RUN_ALL(int,post_read_request,