Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 071D17B16 for ; Fri, 15 Jul 2011 00:29:02 +0000 (UTC) Received: (qmail 54653 invoked by uid 500); 15 Jul 2011 00:29:01 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 54472 invoked by uid 500); 15 Jul 2011 00:29:01 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 54465 invoked by uid 99); 15 Jul 2011 00:29:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 00:29:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2011 00:28:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9F3DD23888CB; Fri, 15 Jul 2011 00:28:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1146932 - /httpd/httpd/trunk/modules/arch/win32/mod_win32.c Date: Fri, 15 Jul 2011 00:28:39 -0000 To: cvs@httpd.apache.org From: fuankg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110715002839.9F3DD23888CB@eris.apache.org> Author: fuankg Date: Fri Jul 15 00:28:39 2011 New Revision: 1146932 URL: http://svn.apache.org/viewvc?rev=1146932&view=rev Log: 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. Modified: httpd/httpd/trunk/modules/arch/win32/mod_win32.c Modified: httpd/httpd/trunk/modules/arch/win32/mod_win32.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/win32/mod_win32.c?rev=1146932&r1=1146931&r2=1146932&view=diff ============================================================================== --- httpd/httpd/trunk/modules/arch/win32/mod_win32.c (original) +++ httpd/httpd/trunk/modules/arch/win32/mod_win32.c Fri Jul 15 00:28:39 2011 @@ -524,14 +524,13 @@ static apr_status_t ap_cgi_build_command * 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); } }