]> granicus.if.org Git - apache/commitdiff
Merge r1682482 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 1 Jun 2015 12:39:56 +0000 (12:39 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 1 Jun 2015 12:39:56 +0000 (12:39 +0000)
PR 57968: Don't lowercase the argument to SetHandler if the handler is
proxy:unix.

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1682888 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
server/core.c

diff --git a/CHANGES b/CHANGES
index 84cd295980051138e7e5e0f2c52210d740200697..3e402f8b4198edd0726a43c20bba21f637617e8e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,9 @@ Changes with Apache 2.4.13
      calls r:wsupgrade() can cause a child process crash. 
      [Edward Lu <Chaosed0 gmail.com>]
 
+  *) core: Don't lowercase the argument to SetHandler if it begins with
+     "proxy:unix". PR 57968. [Eric Covener]
+
   *) mod_ssl OCSP Stapling: Don't block initial handshakes while refreshing
      the OCSP response for a different certificate.  mod_ssl has an additional
      global mutex, "ssl-stapling-refresh".  PR 57131 (partial fix).
diff --git a/STATUS b/STATUS
index 17c127ce89595ab8d344df87b203f5de037fa20e..d0bb4a208fd3b932a0621797eb6e1d6b58c8470a 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -105,12 +105,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) core: Don't lowercase the argument to SetHandler if it begins
-     with proxy:unix. PR 57968.
-     trunk patch: http://svn.apache.org/r1682482
-     2.4.x patch: trunk works
-     +1: covener, ylavic, rjung
-
   *) Easy proposals:
         mod_allowmethods: Style (mostly indent)
         mod_allowmethods: More style
index 7945f51f027a1aefde50000f24f43329e44cba95..a3681719d0f3ad0600e3b869146ed9d63bbbd521 100644 (file)
@@ -1863,6 +1863,24 @@ static const char *set_default_type(cmd_parms *cmd, void *d_,
     return NULL;
 }
 
+static const char *set_sethandler(cmd_parms *cmd,
+                                     void *d_,
+                                     const char *arg_)
+{
+    core_dir_config *dirconf = d_;
+
+    if (arg_ == ap_strstr_c(arg_, "proxy:unix")) { 
+        dirconf->handler = arg_;
+    }
+    else { 
+        char *arg = apr_pstrdup(cmd->pool,arg_);
+        ap_str_tolower(arg);
+        dirconf->handler = arg;
+    }
+
+    return NULL;
+}
+
 /*
  * Note what data should be used when forming file ETag values.
  * It would be nicer to do this as an ITERATE, but then we couldn't
@@ -4140,8 +4158,7 @@ AP_INIT_FLAG("CGIPassAuth", set_cgi_pass_auth, NULL, OR_AUTHCFG,
 AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
        (void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
      "a mime type that overrides other configured type"),
-AP_INIT_TAKE1("SetHandler", ap_set_string_slot_lower,
-       (void *)APR_OFFSETOF(core_dir_config, handler), OR_FILEINFO,
+AP_INIT_TAKE1("SetHandler", set_sethandler, NULL, OR_FILEINFO,
    "a handler name that overrides any other configured handler"),
 AP_INIT_TAKE1("SetOutputFilter", ap_set_string_slot,
        (void *)APR_OFFSETOF(core_dir_config, output_filters), OR_FILEINFO,