[tomcat] branch 9.0.x updated (172977f -> b1ef294)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[tomcat] branch 9.0.x updated (172977f -> b1ef294)

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

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


    from 172977f  Ensure HTTP/1.1 processor is recycled after a direct h2c connection
     new 59a0371  SocketWrapper.upgraded is no longer used
     new b1ef294  socketWrapper.secure is no longer used

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/AbstractProtocol.java       |  2 --
 java/org/apache/tomcat/util/net/AprEndpoint.java   |  1 -
 java/org/apache/tomcat/util/net/Nio2Endpoint.java  |  1 -
 java/org/apache/tomcat/util/net/NioEndpoint.java   |  1 -
 .../apache/tomcat/util/net/SocketWrapperBase.java  | 24 ++++++++++++++++++++++
 5 files changed, 24 insertions(+), 5 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[tomcat] 01/02: SocketWrapper.upgraded is no longer used

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

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

commit 59a037152a3e41a81ddcb89e9e51e3624aeb9b66
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Jun 26 15:31:00 2020 +0100

    SocketWrapper.upgraded is no longer used
   
    It used to be used to determine if the processor should be recycled. It
    has been replaced by a flag on the processor.
---
 java/org/apache/coyote/AbstractProtocol.java           |  2 --
 java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 ++++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProtocol.java b/java/org/apache/coyote/AbstractProtocol.java
index 5bc2212..a47c732 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -903,8 +903,6 @@ public abstract class AbstractProtocol<S> implements ProtocolHandler,
                                         processor, wrapper));
                             }
                             wrapper.unRead(leftOverInput);
-                            // Mark the connection as upgraded
-                            wrapper.setUpgraded(true);
                             // Associate with the processor with the connection
                             wrapper.setCurrentProcessor(processor);
                             // Initialise the upgrade handler (which may trigger
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index 1e3ffb1..88bb7ba 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -171,7 +171,19 @@ public abstract class SocketWrapperBase<E> {
         }
     }
 
+    /**
+     * @return {@code true} if the connection has been upgraded.
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10.
+     */
+    @Deprecated
     public boolean isUpgraded() { return upgraded; }
+    /**
+     * @param upgraded {@code true} if the connection has been upgraded.
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10.
+     */
+    @Deprecated
     public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; }
     public boolean isSecure() { return secure; }
     public void setSecure(boolean secure) { this.secure = secure; }


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[tomcat] 02/02: socketWrapper.secure is no longer used

markt
In reply to this post by markt
This is an automated email from the ASF dual-hosted git repository.

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

commit b1ef294ccb62b8fd108ed117b654bf2f6c51f9a1
Author: Mark Thomas <[hidden email]>
AuthorDate: Fri Jun 26 16:12:34 2020 +0100

    socketWrapper.secure is no longer used
   
    It is used in 7.0.x to trigger additional debug logging.
---
 java/org/apache/tomcat/util/net/AprEndpoint.java       |  1 -
 java/org/apache/tomcat/util/net/Nio2Endpoint.java      |  1 -
 java/org/apache/tomcat/util/net/NioEndpoint.java       |  1 -
 java/org/apache/tomcat/util/net/SocketWrapperBase.java | 12 ++++++++++++
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java
index ec9deee..3996087 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -680,7 +680,6 @@ public class AprEndpoint extends AbstractEndpoint<Long,Long> implements SNICallB
             AprSocketWrapper wrapper = new AprSocketWrapper(socket, this);
             connections.put(socket, wrapper);
             wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
-            wrapper.setSecure(isSSLEnabled());
             wrapper.setReadTimeout(getConnectionTimeout());
             wrapper.setWriteTimeout(getConnectionTimeout());
             getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
index e22d52e..76e6b5c 100644
--- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java
+++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java
@@ -331,7 +331,6 @@ public class Nio2Endpoint extends AbstractJsseEndpoint<Nio2Channel,AsynchronousS
             socketWrapper.setReadTimeout(getConnectionTimeout());
             socketWrapper.setWriteTimeout(getConnectionTimeout());
             socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests());
-            socketWrapper.setSecure(isSSLEnabled());
             // Continue processing on the same thread as the acceptor is async
             return processSocket(socketWrapper, SocketEvent.OPEN_READ, false);
         } catch (Throwable t) {
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index 9f6654f..ca6034d 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -426,7 +426,6 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
             socketWrapper.setReadTimeout(getConnectionTimeout());
             socketWrapper.setWriteTimeout(getConnectionTimeout());
             socketWrapper.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests());
-            socketWrapper.setSecure(isSSLEnabled());
             poller.register(channel, socketWrapper);
             return true;
         } catch (Throwable t) {
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index 88bb7ba..6490521 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -185,7 +185,19 @@ public abstract class SocketWrapperBase<E> {
      */
     @Deprecated
     public void setUpgraded(boolean upgraded) { this.upgraded = upgraded; }
+    /**
+     * @return {@code true} if the connection uses TLS
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10.
+     */
+    @Deprecated
     public boolean isSecure() { return secure; }
+    /**
+     * @param secure {@code true} if the connection uses TLS
+     *
+     * @deprecated Unused. Will be removed in Tomcat 10.
+     */
+    @Deprecated
     public void setSecure(boolean secure) { this.secure = secure; }
     public String getNegotiatedProtocol() { return negotiatedProtocol; }
     public void setNegotiatedProtocol(String negotiatedProtocol) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]