]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
No need to scan the first 5 bytes, they are already correct (i.e. HTTP_)
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 5 Jun 2016 08:40:20 +0000 (08:40 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 5 Jun 2016 08:40:20 +0000 (08:40 +0000)
Fix indentation.

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

server/apreq_module_cgi.c

index 9efc6ac5947af5c9a94c136968cf04518c916e9b..b7aa8b719ebaf26e65618759d14d561983a7b060 100644 (file)
@@ -261,7 +261,8 @@ static const char *cgi_header_in(apreq_handle_t *handle,
     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_handle_t *handle,
     }
 
     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_handle_t *handle,
 }
 
 
-
-
 static void cgi_log_error(const char *file, int line, int level,
                           apr_status_t status, apreq_handle_t *handle,
                           const char *fmt, ...)