From dev-return-202114-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Wed Oct 2 14:56:51 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A77A718064F for ; Wed, 2 Oct 2019 16:56:51 +0200 (CEST) Received: (qmail 75737 invoked by uid 500); 2 Oct 2019 14:56:50 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 75727 invoked by uid 99); 2 Oct 2019 14:56:50 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2019 14:56:50 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 737523A0051 for ; Wed, 2 Oct 2019 14:56:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1867890 - in /tomcat/jk/trunk: native/apache-2.0/mod_jk.c xdocs/miscellaneous/changelog.xml Date: Wed, 02 Oct 2019 14:56:48 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20191002145649.737523A0051@svn01-us-west.apache.org> Author: markt Date: Wed Oct 2 14:56:48 2019 New Revision: 1867890 URL: http://svn.apache.org/viewvc?rev=1867890&view=rev Log: Extend trace level logging of method entry/exit to aid debugging of request mapping issues. Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1867890&r1=1867889&r2=1867890&view=diff ============================================================================== --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Wed Oct 2 14:56:48 2019 @@ -2793,6 +2793,7 @@ static int jk_handler(request_rec * r) clean_uri = apr_pstrdup(r->pool, r->uri); rc = jk_servlet_normalize(clean_uri, xconf->log); if (rc != 0) { + JK_TRACE_EXIT(xconf->log); return HTTP_BAD_REQUEST; } @@ -3788,6 +3789,8 @@ static int jk_translate(request_rec * r) int rc; const char *worker; + JK_TRACE_ENTER(conf->log); + if ((r->handler != NULL) && (!strcmp(r->handler, JK_HANDLER))) { /* Somebody already set the handler, probably manual config * or "native" configuration, no need for extra overhead @@ -3795,6 +3798,7 @@ static int jk_translate(request_rec * r) if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, "Manually mapped, no need to call uri_to_worker"); + JK_TRACE_EXIT(conf->log); return DECLINED; } @@ -3804,12 +3808,14 @@ static int jk_translate(request_rec * r) "Into translate no-jk env var detected for uri=%s, declined", r->uri); + JK_TRACE_EXIT(conf->log); return DECLINED; } clean_uri = apr_pstrdup(r->pool, r->uri); rc = jk_servlet_normalize(clean_uri, conf->log); if (rc != 0) { + JK_TRACE_EXIT(conf->log); return HTTP_BAD_REQUEST; } @@ -3842,6 +3848,7 @@ static int jk_translate(request_rec * r) jk_log(conf->log, JK_LOG_DEBUG, "JkAutoAlias, no DirectoryIndex file for URI %s", r->uri); + JK_TRACE_EXIT(conf->log); return DECLINED; } } @@ -3851,6 +3858,7 @@ static int jk_translate(request_rec * r) "missing uri map for %s:%s", conf->s->server_hostname ? conf->s->server_hostname : "_default_", r->uri); + JK_TRACE_EXIT(conf->log); return DECLINED; } else { @@ -3875,6 +3883,7 @@ static int jk_translate(request_rec * r) apr_table_setn(r->main->notes, JK_NOTE_WORKER_NAME, worker); } + JK_TRACE_EXIT(conf->log); return OK; } else if (conf->alias_dir != NULL) { @@ -3915,6 +3924,7 @@ static int jk_translate(request_rec * r) jk_log(conf->log, JK_LOG_DEBUG, "AutoAlias HTTP_NOT_FOUND for URI: %s", r->uri); + JK_TRACE_EXIT(conf->log); return HTTP_NOT_FOUND; } } @@ -3945,6 +3955,7 @@ static int jk_translate(request_rec * r) "AutoAlias OK for file: %s", ret); r->filename = ret; + JK_TRACE_EXIT(conf->log); return OK; } } @@ -3958,6 +3969,7 @@ static int jk_translate(request_rec * r) jk_log(conf->log, JK_LOG_DEBUG, "AutoAlias HTTP_FORBIDDEN for URI: %s", r->uri); + JK_TRACE_EXIT(conf->log); return HTTP_FORBIDDEN; } } @@ -4000,6 +4012,8 @@ static int jk_map_to_storage(request_rec int rc; const char *worker; + JK_TRACE_ENTER(conf->log); + if ((r->handler != NULL) && (!strcmp(r->handler, JK_HANDLER))) { /* Somebody already set the handler, probably manual config * or "native" configuration, no need for extra overhead @@ -4007,6 +4021,7 @@ static int jk_map_to_storage(request_rec if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, "Manually mapped, no need to call uri_to_worker"); + JK_TRACE_EXIT(conf->log); return DECLINED; } @@ -4016,12 +4031,14 @@ static int jk_map_to_storage(request_rec "Into map_to_storage no-jk env var detected for uri=%s, declined", r->uri); + JK_TRACE_EXIT(conf->log); return DECLINED; } clean_uri = apr_pstrdup(r->pool, r->uri); rc = jk_servlet_normalize(clean_uri, conf->log); if (rc != 0) { + JK_TRACE_EXIT(conf->log); return HTTP_BAD_REQUEST; } @@ -4031,6 +4048,7 @@ static int jk_map_to_storage(request_rec "missing uri map for %s:%s", conf->s->server_hostname ? conf->s->server_hostname : "_default_", r->uri); + JK_TRACE_EXIT(conf->log); return DECLINED; } else { @@ -4065,9 +4083,11 @@ static int jk_map_to_storage(request_rec if (r->filename) { jk_strip_session_id(r->filename, conf->strip_session_name, conf->log); } + JK_TRACE_EXIT(conf->log); return DECLINED; } } + JK_TRACE_EXIT(conf->log); } } Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1867890&r1=1867889&r2=1867890&view=diff ============================================================================== --- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Wed Oct 2 14:56:48 2019 @@ -43,6 +43,10 @@
+ + Extend trace level logging of method entry/exit to aid debugging of + request mapping issues. (markt) +
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org