Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3B2FD044 for ; Thu, 6 Dec 2012 14:00:05 +0000 (UTC) Received: (qmail 24326 invoked by uid 500); 6 Dec 2012 14:00:05 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 24164 invoked by uid 500); 6 Dec 2012 14:00:03 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 24131 invoked by uid 99); 6 Dec 2012 14:00:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 14:00:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 13:59:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 397F52388900; Thu, 6 Dec 2012 13:59:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1417892 - in /httpd/httpd/branches/2.4.x: ./ docs/manual/ docs/manual/mod/ include/ modules/proxy/ Date: Thu, 06 Dec 2012 13:59:35 -0000 To: cvs@httpd.apache.org From: jim@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121206135937.397F52388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jim Date: Thu Dec 6 13:59:32 2012 New Revision: 1417892 URL: http://svn.apache.org/viewvc?rev=1417892&view=rev Log: Merge r1404653 from trunk: Allow for setting of sticky session split char... Bugz 53893 Reviewed/backported by: jim Modified: httpd/httpd/branches/2.4.x/ (props changed) httpd/httpd/branches/2.4.x/CHANGES httpd/httpd/branches/2.4.x/STATUS httpd/httpd/branches/2.4.x/docs/manual/ (props changed) httpd/httpd/branches/2.4.x/docs/manual/mod/ (props changed) httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml httpd/httpd/branches/2.4.x/include/ap_mmn.h httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c Propchange: httpd/httpd/branches/2.4.x/ ------------------------------------------------------------------------------ Merged /httpd/httpd/trunk:r1404653 Modified: httpd/httpd/branches/2.4.x/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original) +++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Thu Dec 6 13:59:32 2012 @@ -2,6 +2,9 @@ Changes with Apache 2.4.4 + *) mod_proxy: Add ability to configure the sticky session separator. + PR 53893. [, Jim Jagielski] + *) mod_dumpio: Correctly log large messages PR 54179 [Marek Wianecki ] Modified: httpd/httpd/branches/2.4.x/STATUS URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/STATUS (original) +++ httpd/httpd/branches/2.4.x/STATUS Thu Dec 6 13:59:32 2012 @@ -91,11 +91,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy: Allow for setting of sticky session split char... - PR 53893. - trunk patch: http://svn.apache.org/viewvc?rev=1404653&view=rev - 2.4.x patch: http://people.apache.org/~jim/patches/sticky-sep-2.4.patch - +1: jim, covener, sf PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] Propchange: httpd/httpd/branches/2.4.x/docs/manual/ ------------------------------------------------------------------------------ Merged /httpd/httpd/trunk/docs/manual:r1404653 Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/ ------------------------------------------------------------------------------ Merged /httpd/httpd/trunk/docs/manual/mod:r1404653 Modified: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml (original) +++ httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml Thu Dec 6 13:59:32 2012 @@ -1060,6 +1060,13 @@ ProxyPass /mirror/foo http://backend.exa and url encoded id (like servlet containers) use | to to separate them. The first part is for the cookie the second for the path. + stickysessionsep + "." + Sets the separation symbol in the session cookie. Some backend application servers + do not use the '.' as the symbol. For example the Oracle Weblogic server uses + '!'. The correct symbol can be set using this option. The setting of 'Off' + signifies that no symbol is used. + scolonpathdelim Off If set to On the semi-colon character ';' will be Modified: httpd/httpd/branches/2.4.x/include/ap_mmn.h URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/ap_mmn.h?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/include/ap_mmn.h (original) +++ httpd/httpd/branches/2.4.x/include/ap_mmn.h Thu Dec 6 13:59:32 2012 @@ -397,6 +397,7 @@ * 20120211.5 (2.4.3-dev) Add missing HTTP status codes registered with IANA. * 20120211.6 (2.4.3-dev) Add ap_proxy_checkproxyblock2. * 20120211.7 (2.4.3-dev) Add ap_get_loadavg() + * 20120211.8 (2.4.3-dev) Add sticky_separator to proxy_balancer_shared struct. */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ @@ -404,7 +405,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20120211 #endif -#define MODULE_MAGIC_NUMBER_MINOR 7 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 8 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original) +++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Thu Dec 6 13:59:32 2012 @@ -287,6 +287,19 @@ static const char *set_balancer_param(pr PROXY_STRNCPY(balancer->s->sticky_path, path); } } + else if (!strcasecmp(key, "stickysessionsep")) { + /* separator/delimiter for sessionid and route, + * normally '.' + */ + if (strlen(val) != 1) { + if (!strcasecmp(val, "off")) + balancer->s->sticky_separator = 0; + else + return "stickysessionsep must be a single character or Off"; + } + else + balancer->s->sticky_separator = *val; + } else if (!strcasecmp(key, "nofailover")) { /* If set to 'on' the session will break * if the worker is in error state or Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h (original) +++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h Thu Dec 6 13:59:32 2012 @@ -425,6 +425,7 @@ typedef struct { unsigned int vhosted:1; unsigned int inactive:1; unsigned int forcerecovery:1; + char sticky_separator; /* separator for sessionid/route */ } proxy_balancer_shared; #define ALIGNED_PROXY_BALANCER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared))) Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c (original) +++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c Thu Dec 6 13:59:32 2012 @@ -293,10 +293,11 @@ static proxy_worker *find_session_route( } } /* - * If we found a value for sticksession, find the first '.' within. - * Everything after '.' (if present) is our route. + * If we found a value for stickysession, find the first '.' (or whatever + * sticky_separator is set to) within. Everything after '.' (if present) + * is our route. */ - if ((*route) && ((*route = strchr(*route, '.')) != NULL )) + if ((*route) && (balancer->s->sticky_separator != 0) && ((*route = strchr(*route, balancer->s->sticky_separator)) != NULL )) (*route)++; if ((*route) && (**route)) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01161) "Found route %s", *route); Modified: httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c?rev=1417892&r1=1417891&r2=1417892&view=diff ============================================================================== --- httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c (original) +++ httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c Thu Dec 6 13:59:32 2012 @@ -1185,6 +1185,7 @@ PROXY_DECLARE(char *) ap_proxy_define_ba (*balancer)->hash = bshared->hash; bshared->forcerecovery = 1; + bshared->sticky_separator = '.'; *bshared->nonce = PROXY_UNSET_NONCE; /* impossible valid input */ (*balancer)->s = bshared;