Bug 54420 - Case sensitive option in "ProxyHTMLFixups"
Summary: Case sensitive option in "ProxyHTMLFixups"
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.3
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2013-01-15 07:36 UTC by Tianyin Xu
Modified: 2013-06-07 11:56 UTC (History)
1 user (show)



Attachments
make the "ProxyHTMLFixups" options case insensitive (631 bytes, patch)
2013-01-15 07:36 UTC, Tianyin Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tianyin Xu 2013-01-15 07:36:18 UTC
Created attachment 29852 [details]
make the "ProxyHTMLFixups" options case insensitive

Hi, 

The "ProxyHTMLFixups" in mod_proxy uses case sensitive string comparison function, i.e., strcmp, which conflicts with the case insensitivity of Apache's configuration design. According to my understanding, httpd champions case insensitivity for both configuration directive and configuration options, e.g., "ProxyHTMLDoctype".

The fix is straightforward as follows:

--- modules/filters/mod_proxy_html.c    2013-01-14 23:32:03.289572774 -0800
+++ modules/filters/mod_proxy_html.c    2013-01-14 23:32:27.477573349 -0800
@@ -1142,11 +1142,11 @@
 {
     proxy_html_conf *cfg = CFG;
     if (arg && *arg) {
-        if (!strcmp(arg, "lowercase"))
+        if (!strcasecmp(arg, "lowercase"))
             cfg->flags |= NORM_LC;
-        else if (!strcmp(arg, "dospath"))
+        else if (!strcasecmp(arg, "dospath"))
             cfg->flags |= NORM_MSSLASH;
-        else if (!strcmp(arg, "reset"))
+        else if (!strcasecmp(arg, "reset"))
             cfg->flags |= NORM_RESET;
     }   
     return NULL;
Comment 1 Christophe JAILLET 2013-04-04 21:03:43 UTC
Fixed in trunk. r1464762

Thanks for the report.
Comment 2 Graham Leggett 2013-06-07 11:56:29 UTC
Backported to v2.4.5.