Removed ssl attribute from NIO and APR to align with BIO
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Jun 2011 10:03:50 +0000 (10:03 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Jun 2011 10:03:50 +0000 (10:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1132360 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11NioProcessor.java

index 5e0c52c..47580cf 100644 (file)
@@ -79,8 +79,6 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
         outputBuffer = new InternalAprOutputBuffer(response, headerBufferSize);
         response.setOutputBuffer(outputBuffer);
         request.setResponse(response);
-        
-        ssl = endpoint.isSSLEnabled();
 
         initializeFilters(maxTrailerSize);
 
@@ -117,12 +115,6 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
 
 
     /**
-     * SSL enabled ?
-     */
-    protected boolean ssl = false;
-    
-
-    /**
      * Socket associated with the current connection.
      */
     protected SocketWrapper<Long> socket = null;
@@ -524,7 +516,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
 
         } else if (actionCode == ActionCode.REQ_SSL_ATTRIBUTE ) {
 
-            if (ssl && (socketRef != 0)) {
+            if (endpoint.isSSLEnabled() && (socketRef != 0)) {
                 try {
                     // Cipher suite
                     Object sslO = SSLSocket.getInfoS(socketRef, SSL.SSL_INFO_CIPHER);
@@ -573,7 +565,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
 
         } else if (actionCode == ActionCode.REQ_SSL_CERTIFICATE) {
 
-            if (ssl && (socketRef != 0)) {
+            if (endpoint.isSSLEnabled() && (socketRef != 0)) {
                 // Consume and buffer the request body, so that it does not
                 // interfere with the client's handshake messages
                 InputFilter[] inputFilters = inputBuffer.getFilters();
@@ -653,7 +645,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
         contentDelimitation = false;
         expectation = false;
         sendfileData = null;
-        if (ssl) {
+        if (endpoint.isSSLEnabled()) {
             request.scheme().setString("https");
         }
         MessageBytes protocolMB = request.protocol();
@@ -865,7 +857,7 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
         }
 
         if (colonPos < 0) {
-            if (!ssl) {
+            if (!endpoint.isSSLEnabled()) {
                 // 80 - Default HTTP port
                 request.setServerPort(80);
             } else {
index 3a669cf..836ba22 100644 (file)
@@ -84,8 +84,6 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
         response.setOutputBuffer(outputBuffer);
         request.setResponse(response);
 
-        ssl = endpoint.isSSLEnabled();
-
         initializeFilters(maxTrailerSize);
 
         // Cause loading of HexUtils
@@ -125,12 +123,6 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
     protected boolean cometClose = false;
     
     /**
-     * SSL enabled ?
-     */
-    protected boolean ssl = false;
-
-
-    /**
      * Socket associated with the current connection.
      */
     protected NioChannel socket = null;
@@ -695,7 +687,7 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
         contentDelimitation = false;
         expectation = false;
         sendfileData = null;
-        if (ssl) {
+        if (endpoint.isSSLEnabled()) {
             request.scheme().setString("https");
         }
         MessageBytes protocolMB = request.protocol();
@@ -908,7 +900,7 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
         }
 
         if (colonPos < 0) {
-            if (!ssl) {
+            if (!endpoint.isSSLEnabled()) {
                 // 80 - Default HTTP port
                 request.setServerPort(80);
             } else {