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-Tag: 2.0.30~171 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec71dcebd6350e011307ef0848df07d9e98073d4;p=thirdparty%2Fapache%2Fhttpd.git 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 56e7e799d43..50cd1ed9623 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,