From: Brian Pane Date: Thu, 6 Dec 2001 02:57:19 +0000 (+0000) Subject: Small performance fix: delay variable initialization in X-Git-Tag: 2.0.30~273 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c98d16f3293eaf48117be4bedc468c22c5044243;p=thirdparty%2Fapache%2Fhttpd.git Small performance fix: delay variable initialization in ap_meets_conditions() until after the point where we short-circuit out of the function on subrequests git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92354 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index f30acbd3cc6..a5cf8f37b85 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -198,7 +198,7 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r) AP_DECLARE(int) ap_meets_conditions(request_rec *r) { - const char *etag = apr_table_get(r->headers_out, "ETag"); + const char *etag; const char *if_match, *if_modified_since, *if_unmodified, *if_nonematch; apr_time_t mtime; @@ -217,6 +217,8 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r) return OK; } + etag = apr_table_get(r->headers_out, "ETag"); + /* XXX: we should define a "time unset" constant */ mtime = (r->mtime != 0) ? r->mtime : apr_time_now();