httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1746878 - /httpd/httpd/trunk/server/apreq_module_cgi.c
Date Sun, 05 Jun 2016 08:40:21 GMT
Author: jailletc36
Date: Sun Jun  5 08:40:20 2016
New Revision: 1746878

URL: http://svn.apache.org/viewvc?rev=1746878&view=rev
Log:
No need to scan the first 5 bytes, they are already correct (i.e. HTTP_)
Fix indentation.

Modified:
    httpd/httpd/trunk/server/apreq_module_cgi.c

Modified: httpd/httpd/trunk/server/apreq_module_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/apreq_module_cgi.c?rev=1746878&r1=1746877&r2=1746878&view=diff
==============================================================================
--- httpd/httpd/trunk/server/apreq_module_cgi.c (original)
+++ httpd/httpd/trunk/server/apreq_module_cgi.c Sun Jun  5 08:40:20 2016
@@ -261,7 +261,8 @@ static const char *cgi_header_in(apreq_h
     apr_pool_t *p = handle->pool;
     char *key = apr_pstrcat(p, "HTTP_", name, NULL);
     char *k, *value = NULL;
-    for (k = key; *k; ++k) {
+
+    for (k = key+5; *k; ++k) {
         if (*k == '-')
             *k = '_';
         else
@@ -269,10 +270,10 @@ static const char *cgi_header_in(apreq_h
     }
 
     if (!strcmp(key, "HTTP_CONTENT_TYPE")
-        || !strcmp(key, "HTTP_CONTENT_LENGTH"))
-        {
-            key += 5; /* strlen("HTTP_") */
-        }
+        || !strcmp(key, "HTTP_CONTENT_LENGTH")) {
+
+        key += 5; /* strlen("HTTP_") */
+    }
 
     apr_env_get(&value, key, p);
 
@@ -280,8 +281,6 @@ static const char *cgi_header_in(apreq_h
 }
 
 
-
-
 static void cgi_log_error(const char *file, int line, int level,
                           apr_status_t status, apreq_handle_t *handle,
                           const char *fmt, ...)



Mime
View raw message