From: Yann Ylavic Date: Tue, 23 Jun 2020 10:23:59 +0000 (+0000) Subject: Follow up to r1879110: avoid signed comparison for use_original_uri. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70effdddc463da854f5fbac0b1edfe7063544cde;p=thirdparty%2Fapache%2Fhttpd.git Follow up to r1879110: avoid signed comparison for use_original_uri. And fix comment about default value. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879111 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index a2f859e3033..ca3913e7a50 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -936,7 +936,7 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent, * might consider for instance that an original %3B is a delimiter * for path parameters (which is not). */ - if (dconf->use_original_uri > 0 + if (dconf->use_original_uri == 1 && (ent->flags & PROXYPASS_MAPPING_SERVLET)) { nocanon = 0; /* ignored since servlet's normalization applies */ len = alias_match_servlet(r->pool, r->uri, fake); @@ -1020,9 +1020,9 @@ static int proxy_trans(request_rec *r, int pre_trans) dconf = ap_get_module_config(r->per_dir_config, &proxy_module); /* Do the work from the hook corresponding to the ProxyUseOriginalURI - * configuration (on/default: translate hook, off: pre_translate hook). + * configuration (off/default: translate hook, on: pre_translate hook). */ - if (pre_trans ^ (dconf->use_original_uri > 0)) { + if (pre_trans ^ dconf->use_original_uri == 1) { return DECLINED; }