From: Bill Stoddard Date: Mon, 12 Nov 2001 16:32:33 +0000 (+0000) Subject: Performance: Move the is_included strcmp to after the check to see if the X-Git-Tag: 2.0.29~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e79f55238654cab5e97575bb4796f87728569c60;p=thirdparty%2Fapache%2Fhttpd.git Performance: Move the is_included strcmp to after the check to see if the 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 --- diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 26c387fcc79..df8950b4503 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -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) {