Commit 99b4d1bb authored by Guenter Knauf's avatar Guenter Knauf
Browse files

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
parent a5d7c802
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -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);
        }
    }