summaryrefslogtreecommitdiffstats
path: root/server/protocol.c
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2001-12-19 00:57:36 +0100
committerBrian Pane <brianp@apache.org>2001-12-19 00:57:36 +0100
commitec71dcebd6350e011307ef0848df07d9e98073d4 (patch)
treea93164ccbf90bb414fc5d282a2648696284b495b /server/protocol.c
parentWin32: Fix bug that could cause CGI scripts with QUERY_STRINGS (diff)
downloadapache2-ec71dcebd6350e011307ef0848df07d9e98073d4.tar.xz
apache2-ec71dcebd6350e011307ef0848df07d9e98073d4.zip
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
Diffstat (limited to '')
-rw-r--r--server/protocol.c10
1 files changed, 6 insertions, 4 deletions
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,