httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1024460 - /httpd/httpd/trunk/modules/generators/mod_cgi.c
Date Tue, 19 Oct 2010 23:07:25 GMT
Author: minfrin
Date: Tue Oct 19 23:07:25 2010
New Revision: 1024460

URL: http://svn.apache.org/viewvc?rev=1024460&view=rev
Log:
Avoid unnecessariy initialisation before we test mod_cgi's handler name.

Modified:
    httpd/httpd/trunk/modules/generators/mod_cgi.c

Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=1024460&r1=1024459&r2=1024460&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Tue Oct 19 23:07:25 2010
@@ -755,10 +755,13 @@ static int cgi_handler(request_rec *r)
     cgi_server_conf *conf;
     apr_status_t rv;
     cgi_exec_info_t e_info;
-    conn_rec *c = r->connection;
+    conn_rec *c;
 
-    if(strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script"))
+    if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script"))
{
         return DECLINED;
+    }
+
+    c = r->connection;
 
     is_included = !strcmp(r->protocol, "INCLUDED");
 



Mime
View raw message