Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11Protocol.java

2003-06-06 Thread Bill Barker
I'm very strongly -1 on this.  The o.a.coyote.Request should not have a
set/getSocket method for the simple reason that there is no reason that
Coyote should be assumed to be tied to a socket transport.

CertificatesValve doesn't do anything any more with Coyote.  It is only left
around to support the deprecated Http11Connector.

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 9:42 AM
Subject: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
Http11Processor.java Http11Protocol.java


 luehe   2003/06/05 09:42:48

   Modified:coyote/src/java/org/apache/coyote Request.java
http11/src/java/org/apache/coyote/http11
 Http11Processor.java Http11Protocol.java
   Log:
   Removed setSocket() method from org.apache.catalina.Request, since it
   was never called in any of the classes implementing this interface.

   For example, setSocket() was never called on
   org.apache.coyote.tomcat5.CoyoteRequest, causing its getSocket()
   method to always return null, which broke the CertificatesValve, which
   relies on having access to the (SSL)Socket so that it can reinitiate a
   handshake if necessary.

   Instead, added setSocket() and getSocket() methods on
org.apache.coyote.Request:

   - setSocket() is called as part of
 org.apache.coyote.http11.Http11Processor.setSocket(), as follows:

   public void setSocket(Socket socket)
   throws IOException {
   this.socket = socket;
   this.request.setSocket(socket); // NEW
   }

   - getSocket() is called as part of
 org.apache.coyote.tomcat5.CoyoteRequest.getSocket(), as follows:

   diff -u -r1.5 CoyoteRequest.java
   --- CoyoteRequest.java  31 May 2003 15:00:25 -  1.5
   +++ CoyoteRequest.java  5 Jun 2003 16:41:17 -
   @@ -633,20 +633,7 @@
 * an SSLSocket.
 */
public Socket getSocket() {
   -return (socket);
   -}
   -
   -/**
   - * Set the Socket (if any) through which this Request was received.
   - *
   - * @param socket The socket through which this request was received
   - */
   -public void setSocket(Socket socket) {
   -this.socket = socket;
   -remoteHost = null;
   -remoteAddr = null;
   -remotePort = -1;
   -localAddr = null;
   +return coyoteRequest.getSocket();
}

   Revision  ChangesPath
   1.21  +20 -0
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java

   Index: Request.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Reques
t.java,v
   retrieving revision 1.20
   retrieving revision 1.21
   diff -u -r1.20 -r1.21
   --- Request.java 23 Mar 2003 08:57:48 - 1.20
   +++ Request.java 5 Jun 2003 16:42:48 - 1.21
   @@ -62,6 +62,7 @@

import java.io.IOException;
import java.util.Hashtable;
   +import java.net.Socket;

import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.MessageBytes;
   @@ -137,6 +138,8 @@

private int remotePort;

   +private Socket socket;
   +
private MessageBytes schemeMB = new MessageBytes();

private MessageBytes methodMB = new MessageBytes();
   @@ -304,6 +307,23 @@
this.remotePort = port;
}

   +/**
   + * Sets the socket through which this request was received.
   + *
   + * @param socket The socket through which this request was received
   + */
   +public void setSocket(Socket socket) {
   + this.socket = socket;
   +}
   +
   +/**
   + * Gets the socket through which this request was received.
   + *
   + * @return The socket through which this request was received
   + */
   +public Socket getSocket() {
   + return socket;
   +}

//  encoding/type 




   1.66  +1 -0
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Pro
cessor.java

   Index: Http11Processor.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
/Http11Processor.java,v
   retrieving revision 1.65
   retrieving revision 1.66
   diff -u -r1.65 -r1.66
   --- Http11Processor.java 13 May 2003 22:45:58 - 1.65
   +++ Http11Processor.java 5 Jun 2003 16:42:48 - 1.66
   @@ -517,6 +517,7 @@
public void setSocket(Socket socket)
throws IOException {
this.socket = socket;
   + this.request.setSocket(socket);
}

/**



   1.27  +6 -5
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Pro
tocol.java

   Index: Http11Protocol.java
   ===
   RCS file:

Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11Protocol.java

2003-06-06 Thread Bill Barker

- Original Message -
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:54 AM
Subject: Re: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
Http11Processor.java Http11Protocol.java


 Bill Barker wrote:
  I'm very strongly -1 on this.  The o.a.coyote.Request should not have a
  set/getSocket method for the simple reason that there is no reason that
  Coyote should be assumed to be tied to a socket transport.

 I plan to test the memory only protocol handler someday. The Netbeans
 folks should be happy about that (and the auto reload everything, of
 course).

  CertificatesValve doesn't do anything any more with Coyote.  It is only
left
  around to support the deprecated Http11Connector.

 Well, the connector won't work with TC 5 anyway, so ...

I'm +1 for removing CertificatesValve from TC 5.  Especially since it is
tied to JSSE 1.0.x, so it will almost certainly break Tomcat running on a
non-Sun 1.4 JVM.


 Remy


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java Http11Protocol.java

2002-04-25 Thread Remy Maucherat

 billbarker02/04/25 18:50:32

   Modified:http11/src/java/org/apache/coyote/http11
 Http11Processor.java Http11Protocol.java
   Log:
   Fix problem with soTimeout.

   The makes Coyote act like httpd with respect to soTimeout (which is what
it was trying to do before, but only worked on HTTP/1.0 connectors).

So the SoTimeout was overwritten ... You actually call setSoTimeout *a lot*.
This is more flexible, since you can configure separately the connection
timeout, but unless that call is free or almost free, this is not a good
idea IMO.

Remy


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]