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

mgrigorov pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new b281768  Do not check for TLS request attribute more than once
b281768 is described below

commit b2817688c6d0e457b18b8b4b02ae3368c9c19e56
Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
AuthorDate: Tue Aug 25 14:31:11 2020 +0300

    Do not check for TLS request attribute more than once
    
    No need to check for special TLS attribute second time if they were parsed 
already.
    If 'name' is a TLS attribute then it will be in the 'attributes' map.
---
 java/org/apache/catalina/connector/Request.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 430ed65..dc6faaa 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -888,7 +888,7 @@ public class Request implements HttpServletRequest {
         if (attr != null) {
             return attr;
         }
-        if (TLSUtil.isTLSRequestAttribute(name)) {
+        if (!sslAttributesParsed && TLSUtil.isTLSRequestAttribute(name)) {
             coyoteRequest.action(ActionCode.REQ_SSL_ATTRIBUTE, coyoteRequest);
             attr = coyoteRequest.getAttribute(Globals.CERTIFICATES_ATTR);
             if (attr != null) {


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

Reply via email to