]> granicus.if.org Git - apache/commitdiff
Performance: Move the is_included strcmp to after the check to see if the
authorBill Stoddard <stoddard@apache.org>
Mon, 12 Nov 2001 16:32:33 +0000 (16:32 +0000)
committerBill Stoddard <stoddard@apache.org>
Mon, 12 Nov 2001 16:32:33 +0000 (16:32 +0000)
request is to be served by the cgi handler.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91876 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgi.c

index 26c387fcc796a7cf82831f34d5a89bde677b598f..df8950b4503b4f36540ff467e5425f33439be898 100644 (file)
@@ -542,7 +542,7 @@ static int cgi_handler(request_rec *r)
     apr_bucket_brigade *bb;
     apr_bucket *b;
     char argsbuffer[HUGE_STRING_LEN];
-    int is_included = !strcmp(r->protocol, "INCLUDED");
+    int is_included;
     apr_pool_t *p;
     cgi_server_conf *conf;
     apr_status_t rv;
@@ -551,6 +551,8 @@ static int cgi_handler(request_rec *r)
     if(strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script"))
        return DECLINED;
 
+    is_included = !strcmp(r->protocol, "INCLUDED");
+
     p = r->main ? r->main->pool : r->pool;
 
     if (r->method_number == M_OPTIONS) {