]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow up to r1879110: avoid signed comparison for use_original_uri.
authorYann Ylavic <ylavic@apache.org>
Tue, 23 Jun 2020 10:23:59 +0000 (10:23 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 23 Jun 2020 10:23:59 +0000 (10:23 +0000)
And fix comment about default value.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879111 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index a2f859e3033afe56ae2ed0a9e266600f1bdf8033..ca3913e7a50601be8005b25f4f3ae8d4cafe9ff0 100644 (file)
@@ -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;
     }