This is an automated email from the ASF dual-hosted git repository.

rjung pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git


The following commit(s) were added to refs/heads/main by this push:
     new e249d0f4c Fall back to mod_unique_id if a configured request_id 
indicator does not provide a value
e249d0f4c is described below

commit e249d0f4c0b50d738732488992b07827f1a69d5d
Author: Rainer Jung <rainer.j...@kippdata.de>
AuthorDate: Fri Jun 24 12:05:20 2022 +0200

    Fall back to mod_unique_id if a configured request_id indicator does not 
provide a value
---
 native/apache-2.0/mod_jk.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/native/apache-2.0/mod_jk.c b/native/apache-2.0/mod_jk.c
index f98c6f8ca..228229edf 100644
--- a/native/apache-2.0/mod_jk.c
+++ b/native/apache-2.0/mod_jk.c
@@ -2786,6 +2786,9 @@ static int jk_handler(request_rec * r)
         rconf->orig_uri = NULL;
         rconf->request_id = get_env_string(r, NULL,
                                            xconf->request_id_indicator, 1);
+        if (rconf->request_id == NULL) {
+            rconf->request_id = get_env_string(r, NULL, JK_ENV_REQUEST_ID, 1);
+        }
         ap_set_module_config(r->request_config, &jk_module, rconf);
     }
     l->id = rconf->request_id;
@@ -3868,6 +3871,9 @@ static int jk_translate(request_rec * r)
 
             rconf->request_id = get_env_string(r, NULL,
                                                conf->request_id_indicator, 1);
+            if (rconf->request_id == NULL) {
+                rconf->request_id = get_env_string(r, NULL, JK_ENV_REQUEST_ID, 
1);
+            }
             l->id = rconf->request_id;
             if ((r->handler != NULL) && (!strcmp(r->handler, JK_HANDLER))) {
                 /* Somebody already set the handler, probably manual config
@@ -4078,6 +4084,9 @@ static int jk_map_to_storage(request_rec * r)
         if (conf) {
             rconf->request_id = get_env_string(r, NULL,
                                                conf->request_id_indicator, 1);
+            if (rconf->request_id == NULL) {
+                rconf->request_id = get_env_string(r, NULL, JK_ENV_REQUEST_ID, 
1);
+            }
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to