]> granicus.if.org Git - apache/commitdiff
Add session route to request rec notes if present.
authorMladen Turk <mturk@apache.org>
Tue, 24 Aug 2004 11:27:31 +0000 (11:27 +0000)
committerMladen Turk <mturk@apache.org>
Tue, 24 Aug 2004 11:27:31 +0000 (11:27 +0000)
The session route is used only in proxy_ajp for now and
passed inside AJP header message.

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

modules/proxy/proxy_balancer.c

index 0cad4dba730547687ee3a92eef6a512b63d6aa5b..abc36a01197b48c62a5f16de81e50c8306bc8ac0 100644 (file)
@@ -329,6 +329,11 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
     PROXY_BALANCER_UNLOCK(*balancer);
     
     access_status = rewrite_url(r, *worker, url);
+    /* Add the session route to request notes if present */
+    if (route) {
+        apr_table_setn(r->notes, "session-sticky", (*balancer)->sticky);
+        apr_table_setn(r->notes, "session-route", route);
+    }
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                  "proxy_balancer_pre_request rewriting to %s", *url);
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
@@ -378,10 +383,10 @@ static void ap_proxy_balancer_register_hook(apr_pool_t *p)
 
 module AP_MODULE_DECLARE_DATA proxy_balancer_module = {
     STANDARD20_MODULE_STUFF,
-    NULL,              /* create per-directory config structure */
-    NULL,              /* merge per-directory config structures */
-    NULL,              /* create per-server config structure */
-    NULL,              /* merge per-server config structures */
-    NULL,              /* command apr_table_t */
-    ap_proxy_balancer_register_hook    /* register hooks */
+    NULL,       /* create per-directory config structure */
+    NULL,       /* merge per-directory config structures */
+    NULL,       /* create per-server config structure */
+    NULL,       /* merge per-server config structures */
+    NULL,       /* command apr_table_t */
+    ap_proxy_balancer_register_hook /* register hooks */
 };