No need to scan the first 5 bytes, they are already correct (i.e. HTTP_)

Fix indentation.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1746878 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christophe Jaillet
2016-06-05 08:40:20 +00:00
parent fe3066e54c
commit dbe61c6eab

View 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, ...)