remm 02/04/09 01:59:48
Modified: http11/src/java/org/apache/coyote/http11
Http11Processor.java
Log:
- Remove tabs.
- Add some comments.
- Passing the request as an argument is useless (at least for the HTTP/1.1
processor), since there's a 1 <-> 1 association between processor, request,
response, filters, etc. This makes everything more efficient, and saves a lot
in syncing, efficiency and complexity (esp in the filters).
Revision Changes Path
1.18 +35 -25
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Index: Http11Processor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Http11Processor.java 9 Apr 2002 07:00:10 -0000 1.17
+++ Http11Processor.java 9 Apr 2002 08:59:48 -0000 1.18
@@ -284,6 +284,7 @@
maxKeepAliveRequests = mkar;
}
+
/**
* Return the number of Keep-Alive requests that we will honor.
*/
@@ -291,16 +292,24 @@
return maxKeepAliveRequests;
}
- public void setSSLSupport( SSLSupport sslSupport ) {
- this.sslSupport=sslSupport;
+
+ /**
+ * Set the SSL information for this HTTP connection.
+ */
+ public void setSSLSupport(SSLSupport sslSupport) {
+ this.sslSupport = sslSupport;
}
-
- public void setSocket( Socket socket )
- throws IOException
- {
+
+
+ /**
+ * Set the socket associated with this HTTP connection.
+ */
+ public void setSocket(Socket socket)
+ throws IOException {
this.socket=socket;
}
+
/**
* Process pipelined HTTP requests using the specified input and output
* streams.
@@ -476,29 +485,30 @@
started = false;
} else if (actionCode == ActionCode.ACTION_REQ_SSL_ATTRIBUTE ) {
- Request req=(Request)param;
+
try {
- if( sslSupport != null ) {
- Object sslO = sslSupport.getCipherSuite();
- if(sslO != null)
- req.setAttribute("javax.servlet.request.cipher_suite",
- sslO);
- sslO = sslSupport.getPeerCertificateChain();
- if(sslO != null)
- req.setAttribute("javax.servlet.request.X509Certificate",
- sslO);
- //XXX We still need KeySize for 4.x
+ if (sslSupport != null) {
+ Object sslO = sslSupport.getCipherSuite();
+ if (sslO != null)
+ request.setAttribute
+ ("javax.servlet.request.cipher_suite", sslO);
+ sslO = sslSupport.getPeerCertificateChain();
+ if (sslO != null)
+ request.setAttribute
+ ("javax.servlet.request.X509Certificate", sslO);
+ //XXX We still need KeySize for 4.x
}
- } catch (Exception e){
+ } catch (Exception e) {
//log("Exception getting SSL attribute " + key,e,Log.WARNING);
}
- } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE ) {
- Request req=(Request)param;
- String remoteAddr = socket.getInetAddress().getHostAddress();
- String remoteHost = socket.getInetAddress().getHostName();
- req.remoteAddr().setString(remoteAddr);
- req.remoteHost().setString(remoteHost);
-
+
+ } else if (actionCode == ActionCode.ACTION_REQ_HOST_ATTRIBUTE) {
+
+ String remoteAddr = socket.getInetAddress().getHostAddress();
+ String remoteHost = socket.getInetAddress().getHostName();
+ request.remoteAddr().setString(remoteAddr);
+ request.remoteHost().setString(remoteHost);
+
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>