]> granicus.if.org Git - apache/commitdiff
Skip the setting of Last-Modified in the response header on
authorBrian Pane <brianp@apache.org>
Tue, 18 Dec 2001 23:57:36 +0000 (23:57 +0000)
committerBrian Pane <brianp@apache.org>
Tue, 18 Dec 2001 23:57:36 +0000 (23:57 +0000)
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

server/protocol.c

index 56e7e799d43207c1f746a9050b3492fcf3634d4f..50cd1ed96238a119a54a8af36219a737b3e54197 100644 (file)
@@ -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,