From 8501e46a652d4b311dbe54dfe8dd380567284bf1 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 5 Jun 2011 10:03:50 +0000 Subject: [PATCH] Removed ssl attribute from NIO and APR to align with BIO git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1132360 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/coyote/http11/Http11AprProcessor.java | 16 ++++------------ java/org/apache/coyote/http11/Http11NioProcessor.java | 12 ++---------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11AprProcessor.java b/java/org/apache/coyote/http11/Http11AprProcessor.java index 5e0c52c86..47580cf63 100644 --- a/java/org/apache/coyote/http11/Http11AprProcessor.java +++ b/java/org/apache/coyote/http11/Http11AprProcessor.java @@ -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 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 { diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index 3a669cff4..836ba22e5 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -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 { -- 2.11.0