Commit 49ad0be8 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

* mod_proxy_balancer: Allow for treatment of ';' char as a session

    deliminator/separator, ala mod_jk.
       PR: 45158
           Trunk version of patch:
                  http://svn.apache.org/viewvc?rev=686809&view=rev
                         http://svn.apache.org/viewvc?rev=687754&view=rev
                             Backport version for 2.2.x of patch:
                                    http://people.apache.org/~jim/patches/scolon-proxy.patch.txt
                                        +1: jim, rpluem, jerenkrantz




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@696319 13f79535-47bb-0310-9956-ffa450edef68
parent 7258e815
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ Changes with Apache 2.2.10
     mod_proxy_ftp: Prevent XSS attacks when using wildcards in the path of
     the FTP URL. Discovered by Marc Bevand of Rapid7. [Ruediger Pluem]

  *) mod_proxy: Add 'scolonpathdelim' parameter to allow for ';' to also be
     used as a session path separator/delim  PR 45158. [Jim Jagielski]

  *) mod_charset_lite: Avoid dropping error responses by handling meta buckets
     correctly. PR 45687 [Dan Poirier <poirier pobox.com>]

+7 −0
Changes for docs/manual/mod/mod_proxy.xml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -838,6 +838,13 @@ expressions</description>
        and url encoded id (like servlet containers) use | to to separate them.
        The first part is for the cookie the second for the path.
    </td></tr>
    <tr><td>scolonpathdelim</td>
        <td>Off</td>
        <td>If set to <code>On</code> the semi-colon character ';' will be
        used as an additional sticky session path deliminator/separator. This
        is mainly used to emulate mod_jk's behavior when dealing with paths such
        as <code>JSESSIONID=6736bcf34;foo=aabfa</code>
    </td></tr>
    <tr><td>timeout</td>
        <td>0</td>
        <td>Balancer timeout in seconds. If set this will be the maximum time
+2 −1
Changes for include/ap_mmn.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@
 *                     introduce proxy_req_conf.
 * 20051115.16(2.2.9)  Add conn_timeout and conn_timeout_set to
 *                     proxy_worker struct.
 * 20051115.17(2.2.10) Add scolonsep to proxy_balancer
 *
 */

@@ -138,7 +139,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
#define MODULE_MAGIC_NUMBER_MINOR 16                    /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 17                    /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+12 −0
Changes for modules/proxy/mod_proxy.c: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -348,6 +348,18 @@ static const char *set_balancer_param(proxy_server_conf *conf,
        }
        return "unknown lbmethod";
    }
    else if (!strcasecmp(key, "scolonpathdelim")) {
        /* If set to 'on' then ';' will also be
         * used as a session path separator/delim (ala
         * mod_jk)
         */
        if (!strcasecmp(val, "on"))
            balancer->scolonsep = 1;
        else if (!strcasecmp(val, "off"))
            balancer->scolonsep = 0;
        else
            return "scolonpathdelim must be On|Off";
    }
    else {
        return "unknown Balancer parameter";
    }
+1 −0
Changes for modules/proxy/mod_proxy.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -384,6 +384,7 @@ struct proxy_balancer {
    apr_thread_mutex_t  *mutex;  /* Thread lock for updating lb params */
#endif
    void            *context;   /* general purpose storage */
    int             scolonsep;  /* true if ';' seps sticky session paths */
};

struct proxy_balancer_method {
Loading