From 8def8313ecd01879353abffd6aad32ca5ec68b4b Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 15 Jul 2011 00:28:39 +0000 Subject: [PATCH] Invert logic for env var utf-8 fixing. Now we exclude a list of vars which we know for sure they dont hold utf-8 chars; all other vars will be fixed. This has the benefit that now also all vars from 3rd-party modules will be fixed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146932 13f79535-47bb-0310-9956-ffa450edef68 --- modules/arch/win32/mod_win32.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/arch/win32/mod_win32.c b/modules/arch/win32/mod_win32.c index 7020bc03eaa..ec6809bca4c 100644 --- a/modules/arch/win32/mod_win32.c +++ b/modules/arch/win32/mod_win32.c @@ -524,14 +524,13 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, * application (following the OEM or Ansi code page in effect.) */ for (i = 0; i < elts_arr->nelts; ++i) { - if (elts[i].key && *elts[i].key - && (strncmp(elts[i].key, "HTTP_", 5) == 0 - || strncmp(elts[i].key, "SERVER_", 7) == 0 - || strncmp(elts[i].key, "REQUEST_", 8) == 0 - || strncmp(elts[i].key, "PATH_", 5) == 0 - || strncmp(elts[i].key, "SSL_", 4) == 0 - || strncmp(elts[i].key, "GEOIP_", 6) == 0 - || strcmp(elts[i].key, "QUERY_STRING") == 0)) { + if (elts[i].key && *elts[i].key && *elts[i].val + && !(strncmp(elts[i].key, "REMOTE_", 7) == 0 + || strcmp(elts[i].key, "GATEWAY_INTERFACE") == 0 + || strcmp(elts[i].key, "REQUEST_METHOD") == 0 + || strcmp(elts[i].key, "SERVER_ADDR") == 0 + || strcmp(elts[i].key, "SERVER_PORT") == 0 + || strcmp(elts[i].key, "SERVER_PROTOCOL") == 0)) { prep_string((const char**) &elts[i].val, r->pool); } } -- 2.47.2