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

2004-12-06 Thread remm
remm2004/12/06 05:59:28

  Modified:catalina/src/share/org/apache/catalina/connector
Connector.java
   http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Decouple usage of the scheme and secure attributes from enabling SSL.
  - I think this was the case sometime in the past, and IMO it could be useful 
if the SSL stuff is done outside of Tomcat (where the connector on
Tomcat would be a fake SSL connector).
  - Hopefully I'm not doing anything too stupid ...
  
  Revision  ChangesPath
  1.15  +1 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java
  
  Index: Connector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector/Connector.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Connector.java13 Oct 2004 08:17:47 -  1.14
  +++ Connector.java6 Dec 2004 13:59:28 -   1.15
  @@ -708,7 +708,6 @@
   public void setScheme(String scheme) {
   
   this.scheme = scheme;
  -setProperty(scheme, scheme);
   
   }
   
  @@ -733,7 +732,6 @@
   public void setSecure(boolean secure) {
   
   this.secure = secure;
  -setProperty(secure, String.valueOf(secure));
   
   }
   
  
  
  
  1.61  +2 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- Http11Protocol.java   11 Nov 2004 14:54:20 -  1.60
  +++ Http11Protocol.java   6 Dec 2004 13:59:28 -   1.61
  @@ -351,6 +351,7 @@
   
   public void setSSLImplementation( String valueS) {
   sslImplementationName = valueS;
  +setSecure(true);
   setAttribute(sslImplementation, valueS);
   }
   
  @@ -507,6 +508,7 @@
   }
   
   public void setProtocol( String k ) {
  +setSecure(true);
   setAttribute(protocol, k);
   }
   
  
  
  

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



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

2004-11-11 Thread pero
pero2004/11/11 06:54:20

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  add getAttributeNames to access all Connector attributes
  
  Revision  ChangesPath
  1.60  +5 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- Http11Protocol.java   4 Oct 2004 13:48:11 -   1.59
  +++ Http11Protocol.java   11 Nov 2004 14:54:20 -  1.60
  @@ -24,6 +24,7 @@
   import java.net.URLEncoder;
   import java.util.Enumeration;
   import java.util.Hashtable;
  +import java.util.Iterator;
   
   import javax.management.MBeanRegistration;
   import javax.management.MBeanServer;
  @@ -84,6 +85,10 @@
   if( log.isTraceEnabled())
   log.trace(sm.getString(http11protocol.getattribute, key));
   return attributes.get(key);
  +}
  +
  +public Iterator getAttributeNames() {
  +return attributes.keySet().iterator();
   }
   
   /**
  
  
  

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



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

2004-10-04 Thread remm
remm2004/10/04 06:48:11

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Attribute translation is now useless (readd it if TC 3 needs it).
  - Remove the * 1000 in setTimeout, which messes with the java bean semantics, and is 
screwing up JMX.
  
  Revision  ChangesPath
  1.59  +2 -24 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- Http11Protocol.java   1 Oct 2004 23:46:57 -   1.58
  +++ Http11Protocol.java   4 Oct 2004 13:48:11 -   1.59
  @@ -128,8 +128,7 @@
   while( attE.hasMoreElements() ) {
   String key=(String)attE.nextElement();
   Object v=attributes.get( key );
  -String trnName = translateAttributeName(key);
  -socketFactory.setAttribute( trnName, v );
  +socketFactory.setAttribute( key, v );
   }
   }
   
  @@ -605,7 +604,7 @@
   }
   
   public void setTimeout( int timeouts ) {
  -timeout = timeouts * 1000;
  +timeout = timeouts;
   setAttribute(timeout,  + timeouts);
   }
   
  @@ -809,27 +808,6 @@
   throw sfex;
   }
   }
  -}
  -
  -private String translateAttributeName(String name) {
  -if (clientAuth.equals(name)) {
  -return clientauth;
  -} else if (keystoreFile.equals(name)) {
  -return keystore;
  -} else if (randomFile.equals(name)) {
  -return randomfile;
  -} else if (rootFile.equals(name)) {
  -return rootfile;
  -} else if (keystorePass.equals(name)) {
  -return keypass;
  -} else if (keystoreType.equals(name)) {
  -return keytype;
  -} else if (sslProtocol.equals(name)) {
  -return protocol;
  -} else if (sslProtocols.equals(name)) {
  -return protocols;
  -}
  -return name;
   }
   
   protected String domain;
  
  
  

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



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

2004-10-01 Thread remm
remm2004/10/01 16:46:57

  Modified:util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
   http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Added:   util/java/org/apache/tomcat/util/net
LeaderFollowerWorkerThread.java
MasterSlaveWorkerThread.java
  Log:
  - Hack in an alternate thread pool strategy (which is basically the TC 4.0 thread 
pool).
  - The problem is that there are some environments where the default thread pool 
doesn't work well, and there's some black magic
involved with it.
  - Another advantage of the thread pool is that its simple design allows server 
socket restart to mostly work (at least in TC 4.0 it worked), so
I think this is a good endpoint for not-that-stable VMs/OS combinations. A 
drawback is that the thread pool won't scale back (OTOH, scaling
back is dangerous as it could cause memory leaks depending on what the application 
is doing).
  - I think in the future we could try to use the Java 5 thread pool (although for 
now, I haven't figured out a way to use it efficiently with
our stuff).
  - Similarly, I haven't found a way to use ThreadPool efficiently with a dedicated 
socket listener thread. So the code is in PTcpEndpoint.
  - From an efficiency standpoint, there's no measureable difference between the two 
thread pools on a 1 CPU machine (no big surprise).
  - The default obviously remains the current thread pool.
  
  Revision  ChangesPath
  1.39  +227 -159  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
  
  Index: PoolTcpEndpoint.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- PoolTcpEndpoint.java  13 Jul 2004 09:43:59 -  1.38
  +++ PoolTcpEndpoint.java  1 Oct 2004 23:46:57 -   1.39
  @@ -24,6 +24,8 @@
   import java.net.Socket;
   import java.net.SocketException;
   import java.security.AccessControlException;
  +import java.util.Stack;
  +import java.util.Vector;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -54,7 +56,9 @@
* @author Gal Shachor [EMAIL PROTECTED]
* @author Yoav Shapira [EMAIL PROTECTED]
*/
  -public class PoolTcpEndpoint { // implements Endpoint {
  +public class PoolTcpEndpoint implements Runnable { // implements Endpoint {
  +
  +static Log log=LogFactory.getLog(PoolTcpEndpoint.class );
   
   private StringManager sm = 
   StringManager.getManager(org.apache.tomcat.util.net.res);
  @@ -64,33 +68,46 @@
   
   private final Object threadSync = new Object();
   
  -private boolean isPool = true;
  -
   private int backlog = BACKLOG;
   private int serverTimeout = TIMEOUT;
   
  -TcpConnectionHandler handler;
  -
   private InetAddress inet;
   private int port;
   
   private ServerSocketFactory factory;
   private ServerSocket serverSocket;
   
  -ThreadPoolRunnable listener;
   private volatile boolean running = false;
   private volatile boolean paused = false;
   private boolean initialized = false;
   private boolean reinitializing = false;
   static final int debug=0;
   
  -ThreadPool tp;
  -
  -static Log log=LogFactory.getLog(PoolTcpEndpoint.class );
  -
   protected boolean tcpNoDelay=false;
   protected int linger=100;
   protected int socketTimeout=-1;
  +private boolean lf = false;
  +
  +
  +// -- Leader follower fields
  +
  +
  +TcpConnectionHandler handler;
  +ThreadPoolRunnable listener;
  +ThreadPool tp;
  +
  +
  +// -- Master slave fields
  +
  +/* The background thread. */
  +private Thread thread = null;
  +/* Available processors. */
  +private Stack workerThreads = new Stack();
  +private int curThreads = 0;
  +private int maxThreads = 20;
  +/* All processors which have been created. */
  +private Vector created = new Vector();
  +
   
   public PoolTcpEndpoint() {
tp = new ThreadPool();
  @@ -102,14 +119,6 @@
   
   //  Configuration 
   
  -public void setPoolOn(boolean isPool) {
  -this.isPool = isPool;
  -}
  -
  -public boolean isPoolOn() {
  -return isPool;
  -}
  -
   public void setMaxThreads(int maxThreads) {
if( maxThreads  0)
tp.setMaxThreads(maxThreads);
  @@ -247,13 +256,37 @@
serverTimeout=i;
   }
   
  +public String getStrategy() {
  +if (lf) {
  +return lf;
  +} else {
  +return ms;
  +}
  +}
  +
  +public void setStrategy(String strategy) {
  +if (ms.equals(strategy)) {
  +   

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

2004-05-27 Thread yoavs
yoavs   2004/05/27 09:12:09

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Added support for threadPriority attribute 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28914).
  
  Revision  ChangesPath
  1.54  +13 -7 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Http11Protocol.java   2 Mar 2004 01:17:39 -   1.53
  +++ Http11Protocol.java   27 May 2004 16:12:09 -  1.54
  @@ -76,14 +76,11 @@
   public void setAttribute( String name, Object value ) {
   if( log.isTraceEnabled())
   log.trace(sm.getString(http11protocol.setattribute, name, value));
  +
  +System.out.println(getClass().getName() +
  + : setAttribute( + name + ,  + value + ): here.);
  +
   attributes.put(name, value);
  -/*
  -if (maxKeepAliveRequests.equals(name)) {
  -maxKeepAliveRequests = Integer.parseInt((String) value.toString());
  -} else if (port.equals(name)) {
  -setPort(Integer.parseInt((String) value.toString()));
  -}
  -*/
   }
   
   public Object getAttribute( String key ) {
  @@ -279,6 +276,15 @@
   public void setMinSpareThreads( int minSpareThreads ) {
   ep.setMinSpareThreads(minSpareThreads);
   setAttribute(minSpareThreads,  + minSpareThreads);
  +}
  +
  +public void setThreadPriority(int threadPriority) {
  +  ep.setThreadPriority(threadPriority);
  +  setAttribute(threadPriority,  + threadPriority);
  +}
  +
  +public int getThreadPriority() {
  +  return ep.getThreadPriority();
   }
   
   //  Tcp setup 
  
  
  

-
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 Http11Protocol.java

2004-05-27 Thread Filip Hanik - Dev
  +System.out.println(getClass().getName() +

:)
what is wrong with the logger?
Filip

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 11:12 AM
Subject: cvs commit: 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Protocol.java


yoavs   2004/05/27 09:12:09

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Added support for threadPriority attribute 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28914).
  
  Revision  ChangesPath
  1.54  +13 -7 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Http11Protocol.java 2 Mar 2004 01:17:39 - 1.53
  +++ Http11Protocol.java 27 May 2004 16:12:09 - 1.54
  @@ -76,14 +76,11 @@
   public void setAttribute( String name, Object value ) {
   if( log.isTraceEnabled())
   log.trace(sm.getString(http11protocol.setattribute, name, value));
  +
  +System.out.println(getClass().getName() +
  + : setAttribute( + name + ,  + value + ): here.);
  +
   attributes.put(name, value);
  -/*
  -if (maxKeepAliveRequests.equals(name)) {
  -maxKeepAliveRequests = Integer.parseInt((String) value.toString());
  -} else if (port.equals(name)) {
  -setPort(Integer.parseInt((String) value.toString()));
  -}
  -*/
   }
   
   public Object getAttribute( String key ) {
  @@ -279,6 +276,15 @@
   public void setMinSpareThreads( int minSpareThreads ) {
   ep.setMinSpareThreads(minSpareThreads);
   setAttribute(minSpareThreads,  + minSpareThreads);
  +}
  +
  +public void setThreadPriority(int threadPriority) {
  +  ep.setThreadPriority(threadPriority);
  +  setAttribute(threadPriority,  + threadPriority);
  +}
  +
  +public int getThreadPriority() {
  +  return ep.getThreadPriority();
   }
   
   //  Tcp setup 
  
  
  

-
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]



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

2004-05-27 Thread Keith Wannamaker
Yoav, you might want to remove this.

Thanks,
Keith


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 11:12 AM
To: [EMAIL PROTECTED]
Subject: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
Http11Protocol.java


yoavs   2004/05/27 09:12:09

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Added support for threadPriority attribute
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28914).

  Revision  ChangesPath
  1.54  +13 -7
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Pro
tocol.java

  Index: Http11Protocol.java
  ===
  RCS file:
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
/Http11Protocol.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- Http11Protocol.java   2 Mar 2004 01:17:39 -   1.53
  +++ Http11Protocol.java   27 May 2004 16:12:09 -  1.54
  @@ -76,14 +76,11 @@
   public void setAttribute( String name, Object value ) {
   if( log.isTraceEnabled())
   log.trace(sm.getString(http11protocol.setattribute, name,
value));
  +
  +System.out.println(getClass().getName() +
  + : setAttribute( + name + ,  + value + ): here.);
  +
   attributes.put(name, value);


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



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

2004-05-27 Thread yoavs
yoavs   2004/05/27 11:29:35

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Removed extraneous debugging statement.
  
  Revision  ChangesPath
  1.55  +0 -3  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Http11Protocol.java   27 May 2004 16:12:09 -  1.54
  +++ Http11Protocol.java   27 May 2004 18:29:35 -  1.55
  @@ -77,9 +77,6 @@
   if( log.isTraceEnabled())
   log.trace(sm.getString(http11protocol.setattribute, name, value));
   
  -System.out.println(getClass().getName() +
  - : setAttribute( + name + ,  + value + ): here.);
  -
   attributes.put(name, value);
   }
   
  
  
  

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



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

2004-03-01 Thread luehe
luehe   2004/03/01 17:17:39

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Fixed indentation
  
  Revision  ChangesPath
  1.53  +19 -23
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- Http11Protocol.java   24 Feb 2004 08:50:56 -  1.52
  +++ Http11Protocol.java   2 Mar 2004 01:17:39 -   1.53
  @@ -759,30 +759,26 @@
*  @exception TomcatException Unable to resolve classes
*/
   private void checkSocketFactory() throws Exception {
  -if(secure) {
  -try {
  -// The SSL setup code has been moved into
  -// SSLImplementation since SocketFactory doesn't
  -// provide a wide enough interface
  -sslImplementation=SSLImplementation.getInstance
  -(sslImplementationName);
  -socketFactory = 
  -sslImplementation.getServerSocketFactory();
  -ep.setServerSocketFactory(socketFactory);
  -} catch (ClassNotFoundException e){
  -throw e;
  +if (secure) {
  +try {
  +// The SSL setup code has been moved into
  +// SSLImplementation since SocketFactory doesn't
  +// provide a wide enough interface
  +sslImplementation =
  +SSLImplementation.getInstance(sslImplementationName);
  +socketFactory = sslImplementation.getServerSocketFactory();
  +ep.setServerSocketFactory(socketFactory);
  +} catch (ClassNotFoundException e){
  +throw e;
  +}
  +} else if (socketFactoryName != null) {
  +try {
  +socketFactory = string2SocketFactory(socketFactoryName);
  +ep.setServerSocketFactory(socketFactory);
  +} catch(Exception sfex) {
  +throw sfex;
  +}
   }
  -}
  -else {
  -if (socketFactoryName != null) {
  -try {
  -socketFactory = string2SocketFactory(socketFactoryName);
  -ep.setServerSocketFactory(socketFactory);
  -} catch(Exception sfex) {
  -throw sfex;
  -}
  -}
  -}
   }
   
   /*
  
  
  

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



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

2004-02-20 Thread remm
remm2004/02/20 03:03:28

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
LocalStrings.properties
  Log:
  - Add some i18n strings.
  - Encode the address in the protocol name, to fix bug 27033.
  
  Revision  ChangesPath
  1.51  +25 -13
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Http11Protocol.java   5 Feb 2004 16:22:40 -   1.50
  +++ Http11Protocol.java   20 Feb 2004 11:03:28 -  1.51
  @@ -63,6 +63,7 @@
   import java.io.OutputStream;
   import java.net.InetAddress;
   import java.net.Socket;
  +import java.net.URLEncoder;
   import java.util.Enumeration;
   import java.util.Hashtable;
   
  @@ -186,7 +187,7 @@
   log.error(sm.getString(http11protocol.endpoint.initerror), ex);
   throw ex;
   }
  -log.info(sm.getString(http11protocol.init,  + ep.getPort()));
  +log.info(sm.getString(http11protocol.init, getName()));
   
   }
   
  @@ -198,18 +199,18 @@
   try {
   // XXX We should be able to configure it separately
   // XXX It should be possible to use a single TP
  -tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
  +tpOname=new ObjectName
  +(domain + : + type=ThreadPool,name= + getName());
   Registry.getRegistry(null, null)
   .registerComponent(tp, tpOname, null );
  -tp.setName(http + ep.getPort());
  +tp.setName(getName());
   tp.setDaemon(false);
   tp.addThreadPoolListener(new MXPoolListener(this, tp));
   } catch (Exception e) {
   log.error(Can't register threadpool );
   }
  -rgOname=new ObjectName( domain + 
  -:type=GlobalRequestProcessor,name=http +
  -ep.getPort());
  +rgOname=new ObjectName
  +(domain + :type=GlobalRequestProcessor,name= + getName());
   Registry.getRegistry(null, null).registerComponent
   ( cHandler.global, rgOname, null );
   }
  @@ -220,7 +221,7 @@
   log.error(sm.getString(http11protocol.endpoint.starterror), ex);
   throw ex;
   }
  -log.info(sm.getString(http11protocol.start,  + ep.getPort()));
  +log.info(sm.getString(http11protocol.start, getName()));
   }
   
   public void pause() throws Exception {
  @@ -230,7 +231,7 @@
   log.error(sm.getString(http11protocol.endpoint.pauseerror), ex);
   throw ex;
   }
  -log.info(sm.getString(http11protocol.pause,  + ep.getPort()));
  +log.info(sm.getString(http11protocol.pause, getName()));
   }
   
   public void resume() throws Exception {
  @@ -240,11 +241,11 @@
   log.error(sm.getString(http11protocol.endpoint.resumeerror), ex);
   throw ex;
   }
  -log.info(sm.getString(http11protocol.resume,  + ep.getPort()));
  +log.info(sm.getString(http11protocol.resume, getName()));
   }
   
   public void destroy() throws Exception {
  -log.info(Stoping http11 protocol on  + ep.getPort() +   + tpOname);
  +log.info(sm.getString(http11protocol.stop, getName()));
   ep.stopEndpoint();
   if( tpOname!=null ) 
   Registry.getRegistry(null, null).unregisterComponent(tpOname);
  @@ -352,6 +353,17 @@
   setAttribute(address,  + ia);
   }
   
  +public String getName() {
  +String encodedAddr = ;
  +if (getAddress() != null) {
  +encodedAddr =  + getAddress();
  +if (encodedAddr.startsWith(/))
  +encodedAddr = encodedAddr.substring(1);
  +encodedAddr = URLEncoder.encode(encodedAddr) + -;
  +}
  +return (http- + encodedAddr + ep.getPort());
  +}
  +
   // commenting out for now since it's not doing anything
   //public void setHostName( String name ) {
   // ??? Doesn't seem to be used in existing or prev code
  @@ -691,9 +703,9 @@
   try {
   RequestInfo rp=processor.getRequest().getRequestProcessor();
   rp.setGlobalProcessor(global);
  -ObjectName rpName=new ObjectName(proto.getDomain() + 
  -:type=RequestProcessor,worker=http +
  -proto.ep.getPort() +,name=HttpRequest + count++ );
  +

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

2004-02-05 Thread remm
remm2004/02/05 08:22:41

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Fix commons-modeler deprecation warnings.
  
  Revision  ChangesPath
  1.50  +8 -7  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Http11Protocol.java   26 Jan 2004 19:48:43 -  1.49
  +++ Http11Protocol.java   5 Feb 2004 16:22:40 -   1.50
  @@ -199,7 +199,8 @@
   // XXX We should be able to configure it separately
   // XXX It should be possible to use a single TP
   tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
  -Registry.getRegistry().registerComponent(tp, tpOname, null );
  +Registry.getRegistry(null, null)
  +.registerComponent(tp, tpOname, null );
   tp.setName(http + ep.getPort());
   tp.setDaemon(false);
   tp.addThreadPoolListener(new MXPoolListener(this, tp));
  @@ -209,8 +210,8 @@
   rgOname=new ObjectName( domain + 
   :type=GlobalRequestProcessor,name=http +
   ep.getPort());
  -Registry.getRegistry().registerComponent( cHandler.global,
  -rgOname, null );
  +Registry.getRegistry(null, null).registerComponent
  +( cHandler.global, rgOname, null );
   }
   
   try {
  @@ -246,9 +247,9 @@
   log.info(Stoping http11 protocol on  + ep.getPort() +   + tpOname);
   ep.stopEndpoint();
   if( tpOname!=null ) 
  -Registry.getRegistry().unregisterComponent(tpOname);
  +Registry.getRegistry(null, null).unregisterComponent(tpOname);
   if( rgOname != null ) 
  -Registry.getRegistry().unregisterComponent(rgOname);
  +Registry.getRegistry(null, null).unregisterComponent(rgOname);
   }
   
   //  Properties
  @@ -643,7 +644,7 @@
   }
   ObjectName 
oname=(ObjectName)tpData[Http11Protocol.THREAD_DATA_OBJECT_NAME];
   if( oname==null ) return;
  -Registry.getRegistry().unregisterComponent(oname);
  +Registry.getRegistry(null, null).unregisterComponent(oname);
   Http11Processor processor = 
   (Http11Processor) tpData[Http11Protocol.THREAD_DATA_PROCESSOR];
   RequestInfo rp=processor.getRequest().getRequestProcessor();
  @@ -693,7 +694,7 @@
   ObjectName rpName=new ObjectName(proto.getDomain() + 
   :type=RequestProcessor,worker=http +
   proto.ep.getPort() +,name=HttpRequest + count++ );
  -Registry.getRegistry().registerComponent( rp, rpName, null);
  +Registry.getRegistry(null, null).registerComponent( rp, rpName, 
null);
   thData[Http11Protocol.THREAD_DATA_OBJECT_NAME]=rpName;
   } catch( Exception ex ) {
   log.warn(Error registering request);
  
  
  

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



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

2004-01-26 Thread remm
remm2004/01/26 10:16:23

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Implement clean shutdown of the connectors (my third proposal).
  - Add pause and resume methods.
  
  Revision  ChangesPath
  1.48  +20 -0 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Http11Protocol.java   22 Jan 2004 18:26:52 -  1.47
  +++ Http11Protocol.java   26 Jan 2004 18:16:23 -  1.48
  @@ -222,6 +222,26 @@
   log.info(sm.getString(http11protocol.start,  + ep.getPort()));
   }
   
  +public void pause() throws Exception {
  +try {
  +ep.pauseEndpoint();
  +} catch (Exception ex) {
  +log.error(sm.getString(http11protocol.endpoint.pauseerror), ex);
  +throw ex;
  +}
  +log.info(sm.getString(http11protocol.pause,  + ep.getPort()));
  +}
  +
  +public void resume() throws Exception {
  +try {
  +ep.resumeEndpoint();
  +} catch (Exception ex) {
  +log.error(sm.getString(http11protocol.endpoint.resumeerror), ex);
  +throw ex;
  +}
  +log.info(sm.getString(http11protocol.resume,  + ep.getPort()));
  +}
  +
   public void destroy() throws Exception {
   log.info(Stoping http11 protocol on  + ep.getPort() +   + tpOname);
   ep.stopEndpoint();
  
  
  

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



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

2004-01-26 Thread remm
remm2004/01/26 11:48:43

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Remove compilation warnings.
  
  Revision  ChangesPath
  1.49  +4 -3  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Http11Protocol.java   26 Jan 2004 18:16:23 -  1.48
  +++ Http11Protocol.java   26 Jan 2004 19:48:43 -  1.49
  @@ -745,12 +745,12 @@
   TcpConnection.shutdownInput( socket );
   } catch(java.net.SocketException e) {
   // SocketExceptions are normal
  -proto.log.debug
  +Http11Protocol.log.debug
   (sm.getString
(http11protocol.proto.socketexception.debug), e);
   } catch (java.io.IOException e) {
   // IOExceptions are normal 
  -proto.log.debug
  +Http11Protocol.log.debug
   (sm.getString
(http11protocol.proto.ioexception.debug), e);
   }
  @@ -761,7 +761,8 @@
   // any other exception or error is odd. Here we log it
   // with ERROR level, so it will show up even on
   // less-than-verbose logs.
  -proto.log.error(sm.getString(http11protocol.proto.error), e);
  +Http11Protocol.log.error
  +(sm.getString(http11protocol.proto.error), e);
   } finally {
   //   if(proto.adapter != null) proto.adapter.recycle();
   //processor.recycle();
  
  
  

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



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

2004-01-15 Thread remm
remm2004/01/15 05:16:41

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Properly remove the RequestInfo from the request group on thread end.
  
  Revision  ChangesPath
  1.46  +4 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Http11Protocol.java   25 Nov 2003 01:26:26 -  1.45
  +++ Http11Protocol.java   15 Jan 2004 13:16:41 -  1.46
  @@ -614,6 +614,10 @@
   ObjectName 
oname=(ObjectName)tpData[Http11Protocol.THREAD_DATA_OBJECT_NAME];
   if( oname==null ) return;
   Registry.getRegistry().unregisterComponent(oname);
  +Http11Processor processor = 
  +(Http11Processor) tpData[Http11Protocol.THREAD_DATA_PROCESSOR];
  +RequestInfo rp=processor.getRequest().getRequestProcessor();
  +rp.setGlobalProcessor(null);
   }
   }
   
  
  
  

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



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

2003-11-24 Thread amyroh
amyroh  2003/11/24 17:26:26

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Put unused methods back in comments -- accidently removed /* earlier.
  
  Revision  ChangesPath
  1.45  +7 -6  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Http11Protocol.java   24 Nov 2003 23:01:21 -  1.44
  +++ Http11Protocol.java   25 Nov 2003 01:26:26 -  1.45
  @@ -321,6 +321,10 @@
   //this.port=port;
   }
   
  +public InetAddress getAddress() {
  +return ep.getAddress();
  +}
  +
   public void setAddress(InetAddress ia) {
   ep.setAddress( ia );
   setAttribute(address,  + ia);
  @@ -774,11 +778,7 @@
   }
   }
   
  -
  -public InetAddress getAddress() {
  -return ep.getAddress();
  -}
  -
  +/*
   public boolean isKeystoreSet() {
   return (attributes.get(keystore) != null);
   }
  @@ -802,7 +802,8 @@
   public PoolTcpEndpoint getEndpoint() {
   return ep;
   }
  -
  +*/
  +
   protected String domain;
   protected ObjectName oname;
   protected MBeanServer mserver;
  
  
  

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



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

2003-10-07 Thread hgomez
hgomez  2003/10/07 01:48:50

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Add regexp support to check for Compression/HTTP 1.1 compatible browsers.
  
  Revision  ChangesPath
  1.42  +7 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Http11Protocol.java   6 Oct 2003 08:46:04 -   1.41
  +++ Http11Protocol.java   7 Oct 2003 08:48:50 -   1.42
  @@ -257,6 +257,7 @@
*/
   private String compression = off;
   private String noCompressionUserAgents = null;
  +private String restrictedUserAgents = null;
   private String compressableMimeTypes = text/html,text/xml,text/plain;
   private int compressionMinSize= 2048;
   
  @@ -333,6 +334,11 @@
   setAttribute(compression, valueS);
   }
   
  +public void setRestrictedUserAgents(String valueS) {
  +restrictedUserAgents = valueS;
  +setAttribute(restrictedUserAgents, valueS);
  +}
  +
   public void setNoCompressionUserAgents(String valueS) {
   noCompressionUserAgents = valueS;
   setAttribute(noCompressionUserAgents, valueS);
  @@ -493,6 +499,7 @@
   processor.setCompressionMinSize( proto.compressionMinSize); 
   processor.setNoCompressionUserAgents( proto.noCompressionUserAgents);
   processor.setCompressableMimeTypes( proto.compressableMimeTypes);
  +processor.setRestrictedUserAgents( proto.restrictedUserAgents);
   processor.setSocketBuffer( proto.socketBuffer );
   
   thData[Http11Protocol.THREAD_DATA_PROCESSOR]=processor;
  
  
  

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



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

2003-10-01 Thread hgomez
hgomez  2003/10/01 00:53:05

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  GZIP configuration in server.xml is forwarded to HTTP11Processor
  
  Revision  ChangesPath
  1.39  +28 -5 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- Http11Protocol.java   25 Sep 2003 11:08:17 -  1.38
  +++ Http11Protocol.java   1 Oct 2003 07:53:05 -   1.39
  @@ -255,7 +255,10 @@
* Compression value.
*/
   private String compression = off;
  -
  + private String noCompressionUserAgents = null;
  + private String compressableMimeTypes = text/html,text/xml,text/plain;
  + private int compressionMinSize= 2048;
  + 
   //  Pool setup 
   
   public void setPools( boolean t ) {
  @@ -324,10 +327,27 @@
   socketBuffer = valueI;
   }
   
  -public void setCompression(String valueS) {
  -compression = valueS;
  -}
  + public void setCompression(String valueS) {
  + compression = valueS;
  + setAttribute(compression, valueS);
  + }
  +
  + public void setNoCompressionUserAgents(String valueS) {
  + noCompressionUserAgents = valueS;
  + setAttribute(noCompressionUserAgents, valueS);
  + }
  +
  + public void setCompressableMimeType(String valueS) {
  + compressableMimeTypes = valueS;
  + setAttribute(compressableMimeTypes, valueS);
  + }
  +
  + public void setCompressionMinSize(int valueI) {
  + compressionMinSize = valueI;
  + setAttribute(compressionMinSize,  + valueI);
  + }
   
  + 
   public void setSoLinger( int i ) {
ep.setSoLinger( i );
   setAttribute(soLinger,  + i);
  @@ -468,7 +488,10 @@
   processor.setMaxKeepAliveRequests( proto.maxKeepAliveRequests );
   processor.setTimeout( proto.timeout );
   processor.setDisableUploadTimeout( proto.disableUploadTimeout );
  -processor.setCompression( proto.compression );
  + processor.setCompression( proto.compression );
  + processor.setCompressionMinSize( proto.compressionMinSize);
 
  + processor.setNoCompressionUserAgents( 
proto.noCompressionUserAgents);
  + processor.setCompressableMimeTypes( 
proto.compressableMimeTypes);
   processor.setSocketBuffer( proto.socketBuffer );
   
   thData[Http11Protocol.THREAD_DATA_PROCESSOR]=processor;
  
  
  

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



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

2003-10-01 Thread hgomez
hgomez  2003/10/01 03:24:47

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Replace Tabs by Space (I forgot about Tab Police :)
  
  Revision  ChangesPath
  1.40  +82 -82
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- Http11Protocol.java   1 Oct 2003 07:53:05 -   1.39
  +++ Http11Protocol.java   1 Oct 2003 10:24:47 -   1.40
  @@ -99,7 +99,7 @@
   public class Http11Protocol implements ProtocolHandler, MBeanRegistration
   {
   public Http11Protocol() {
  - cHandler = new Http11ConnectionHandler( this );
  +cHandler = new Http11ConnectionHandler( this );
   setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
   setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
   setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
  @@ -161,7 +161,7 @@
*/
   public void init() throws Exception {
   ep.setConnectionHandler( cHandler );
  - try {
  +try {
   checkSocketFactory();
   } catch( Exception ex ) {
   log.error(sm.getString(http11protocol.socketfactory.initerror),
  @@ -243,7 +243,7 @@
   protected String sslImplementationName=null;
   
   private int maxKeepAliveRequests=100; // as in Apache HTTPD server
  -private int  timeout = 30;   // 5 minutes as in Apache HTTPD server
  +private int timeout = 30;   // 5 minutes as in Apache HTTPD server
   private String reportedname;
   private int socketCloseDelay=-1;
   private boolean disableUploadTimeout = true;
  @@ -255,67 +255,67 @@
* Compression value.
*/
   private String compression = off;
  - private String noCompressionUserAgents = null;
  - private String compressableMimeTypes = text/html,text/xml,text/plain;
  - private int compressionMinSize= 2048;
  - 
  +private String noCompressionUserAgents = null;
  +private String compressableMimeTypes = text/html,text/xml,text/plain;
  +private int compressionMinSize= 2048;
  +
   //  Pool setup 
   
   public void setPools( boolean t ) {
  - ep.setPoolOn(t);
  +ep.setPoolOn(t);
   setAttribute(pools,  + t);
   }
   
   public void setMaxThreads( int maxThreads ) {
  - ep.setMaxThreads(maxThreads);
  +ep.setMaxThreads(maxThreads);
   setAttribute(maxThreads,  + maxThreads);
   }
   
   public void setMaxSpareThreads( int maxThreads ) {
  - ep.setMaxSpareThreads(maxThreads);
  +ep.setMaxSpareThreads(maxThreads);
   setAttribute(maxSpareThreads,  + maxThreads);
   }
   
   public void setMinSpareThreads( int minSpareThreads ) {
  - ep.setMinSpareThreads(minSpareThreads);
  +ep.setMinSpareThreads(minSpareThreads);
   setAttribute(minSpareThreads,  + minSpareThreads);
   }
   
   //  Tcp setup 
   
   public void setBacklog( int i ) {
  - ep.setBacklog(i);
  +ep.setBacklog(i);
   setAttribute(backlog,  + i);
   }
   
   public void setPort( int port ) {
  - ep.setPort(port);
  +ep.setPort(port);
   setAttribute(port,  + port);
  - //this.port=port;
  +//this.port=port;
   }
   
   public void setAddress(InetAddress ia) {
  - ep.setAddress( ia );
  +ep.setAddress( ia );
   setAttribute(address,  + ia);
   }
   
   public void setHostName( String name ) {
  - // ??? Doesn't seem to be used in existing or prev code
  - // vhost=name;
  +// ??? Doesn't seem to be used in existing or prev code
  +// vhost=name;
   }
   
   public void setSocketFactory( String valueS ) {
  - socketFactoryName = valueS;
  +socketFactoryName = valueS;
   setAttribute(socketFactory, valueS);
   }
   
   public void setSSLImplementation( String valueS) {
  - sslImplementationName=valueS;
  +sslImplementationName = valueS;
   setAttribute(sslImplementation, valueS);
   }
  - 
  +
   public void setTcpNoDelay( boolean b ) {
  - ep.setTcpNoDelay( b );
  +ep.setTcpNoDelay( b );
   setAttribute(tcpNoDelay,  + b);
   }
   
  @@ -327,39 +327,39 @@
   socketBuffer = valueI;
   }
   
  - public void setCompression(String valueS) {
  - compression = valueS;
  - setAttribute(compression, valueS);
  - }
  -
  - public void setNoCompressionUserAgents(String valueS) {
  - 

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

2003-09-25 Thread remm
remm2003/09/25 04:08:17

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Set the monitor thread as non daemon.
  
  Revision  ChangesPath
  1.38  +1 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Http11Protocol.java   13 Sep 2003 17:30:50 -  1.37
  +++ Http11Protocol.java   25 Sep 2003 11:08:17 -  1.38
  @@ -200,6 +200,7 @@
   tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
   Registry.getRegistry().registerComponent(tp, tpOname, null );
   tp.setName(http + ep.getPort());
  +tp.setDaemon(false);
   tp.addThreadPoolListener(new MXPoolListener(this, tp));
   } catch (Exception e) {
   log.error(Can't register threadpool );
  
  
  

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



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

2003-09-13 Thread remm
remm2003/09/13 10:30:50

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Use an apparently more optimal value for the buffer.
  
  Revision  ChangesPath
  1.37  +1 -1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Http11Protocol.java   12 Sep 2003 13:15:36 -  1.36
  +++ Http11Protocol.java   13 Sep 2003 17:30:50 -  1.37
  @@ -246,7 +246,7 @@
   private String reportedname;
   private int socketCloseDelay=-1;
   private boolean disableUploadTimeout = true;
  -private int socketBuffer = 1500;
  +private int socketBuffer = 9000;
   private Adapter adapter;
   private Http11ConnectionHandler cHandler;
   
  
  
  

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



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

2003-08-29 Thread amyroh
amyroh  2003/08/28 19:34:47

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
LocalStrings.properties
  Log:
  Implement getAttribute(key).
  
  Revision  ChangesPath
  1.34  +3 -1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Http11Protocol.java   11 Aug 2003 21:44:49 -  1.33
  +++ Http11Protocol.java   29 Aug 2003 02:34:47 -  1.34
  @@ -115,7 +115,9 @@
   }
   
   public Object getAttribute( String key ) {
  -return null;
  +if( log.isTraceEnabled())
  +log.trace(sm.getString(http11protocol.getattribute, key));
  +return attributes.get(key);
   }
   
   /**
  
  
  
  1.6   +2 -1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LocalStrings.properties   5 Nov 2002 09:37:34 -   1.5
  +++ LocalStrings.properties   29 Aug 2003 02:34:47 -  1.6
  @@ -16,6 +16,7 @@
   http11protocol.proto.ioexception.info=IOException reading request, ignored
   http11protocol.proto.socketexception.debug=SocketException reading request
   http11protocol.proto.socketexception.info=SocketException reading request, ignored
  +http11protocol.getattribute=Attribute {0}
   http11protocol.setattribute=Attribute {0}: {1}
   http11protocol.socketfactory.initerror=Error initializing socket factory
   http11protocol.start=Starting Coyote HTTP/1.1 on port {0}
  
  
  

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



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

2003-08-14 Thread luehe
luehe   2003/08/11 11:07:15

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Added support for specifying alias name for server keypair and cert
  chain, to be used by the server to authenticate itself to SSL clients
  
  Revision  ChangesPath
  1.32  +4 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Http11Protocol.java   28 Jul 2003 11:24:16 -  1.31
  +++ Http11Protocol.java   11 Aug 2003 18:07:15 -  1.32
  @@ -357,6 +357,10 @@
   setAttribute(ciphers, ciphers);
   }
   
  +public void setKeyAlias(String keyAlias) {
  +setAttribute(keyAlias, keyAlias);
  +}
  +
   /** Set the maximum number of Keep-Alive requests that we will honor.
*/
   public void setMaxKeepAliveRequests(int mkar) {
  
  
  

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



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

2003-08-14 Thread luehe
luehe   2003/08/11 14:44:49

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Added support for specifying comma-separated list of SSL protocol
variants to be enabled
  
This may be useful to disable the less secure SSLv2.
  
  Revision  ChangesPath
  1.33  +4 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Http11Protocol.java   11 Aug 2003 18:07:15 -  1.32
  +++ Http11Protocol.java   11 Aug 2003 21:44:49 -  1.33
  @@ -344,6 +344,10 @@
   setAttribute(protocol, k);
   }
   
  +public void setProtocols(String k) {
  +setAttribute(protocols, k);
  +}
  +
   public void setAlgorithm( String k ) {
   setAttribute(algorithm, k);
   }
  
  
  

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



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

2003-07-28 Thread remm
remm2003/07/28 04:24:16

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Beautify the thread names.
  
  Revision  ChangesPath
  1.31  +1 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Http11Protocol.java   11 Jul 2003 01:06:04 -  1.30
  +++ Http11Protocol.java   28 Jul 2003 11:24:16 -  1.31
  @@ -185,6 +185,7 @@
   // XXX It should be possible to use a single TP
   tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
   Registry.getRegistry().registerComponent(tp, tpOname, null );
  +tp.setName(http + ep.getPort());
   tp.addThreadPoolListener(new MXPoolListener(this, tp));
   } catch (Exception e) {
   log.error(Can't register threadpool );
  
  
  

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



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

2003-07-10 Thread luehe
luehe   2003/07/10 18:06:04

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Added support for enabling subset of supported SSL cipher suites (based on earlier 
proposal)
  
  Revision  ChangesPath
  1.30  +4 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Http11Protocol.java   13 Jun 2003 05:14:50 -  1.29
  +++ Http11Protocol.java   11 Jul 2003 01:06:04 -  1.30
  @@ -352,6 +352,10 @@
   setAttribute(secure,  + b);
   }
   
  +public void setCiphers(String ciphers) {
  +setAttribute(ciphers, ciphers);
  +}
  +
   /** Set the maximum number of Keep-Alive requests that we will honor.
*/
   public void setMaxKeepAliveRequests(int mkar) {
  
  
  

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



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

2003-06-12 Thread billbarker
billbarker2003/06/12 22:10:10

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Adding a setProperty method, since that is what IntrospectionUtils calls when it 
can't find a setter.
  
  In line with the proposal to avoid having every connector know about every setting.
  
  Revision  ChangesPath
  1.28  +14 -0 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Http11Protocol.java   5 Jun 2003 16:42:48 -   1.27
  +++ Http11Protocol.java   13 Jun 2003 05:10:10 -  1.28
  @@ -118,6 +118,20 @@
   return null;
   }
   
  +/**
  + * Set a property.
  + */
  +public void setProperty(String name, String value) {
  + setAttribute(name, value);
  +}
  +
  +/**
  + * Get a property
  + */
  +public String getProperty(String name) {
  + return (String)getAttribute(name);
  +}
  +
   /** The adapter, used to call the connector 
*/
   public void setAdapter(Adapter adapter) {
  
  
  

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



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

2003-06-12 Thread billbarker
billbarker2003/06/12 22:14:50

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Watching out for the tab-police.
  
  Revision  ChangesPath
  1.29  +2 -2  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Http11Protocol.java   13 Jun 2003 05:10:10 -  1.28
  +++ Http11Protocol.java   13 Jun 2003 05:14:50 -  1.29
  @@ -122,14 +122,14 @@
* Set a property.
*/
   public void setProperty(String name, String value) {
  - setAttribute(name, value);
  +setAttribute(name, value);
   }
   
   /**
* Get a property
*/
   public String getProperty(String name) {
  - return (String)getAttribute(name);
  +return (String)getAttribute(name);
   }
   
   /** The adapter, used to call the connector 
  
  
  

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



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

2003-04-04 Thread costin
costin  2003/04/04 14:16:22

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Unregister components fixes.
  
  There are still few issues, but it seems to be working better for me.
  
  Revision  ChangesPath
  1.22  +60 -24
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Http11Protocol.java   17 Feb 2003 01:41:19 -  1.21
  +++ Http11Protocol.java   4 Apr 2003 22:16:22 -   1.22
  @@ -68,6 +68,7 @@
   import java.util.*;
   import org.apache.tomcat.util.res.StringManager;
   import org.apache.tomcat.util.threads.ThreadPool;
  +import org.apache.tomcat.util.threads.ThreadWithAttributes;
   import org.apache.tomcat.util.net.*;
   import org.apache.commons.modeler.Registry;
   import javax.management.ObjectName;
  @@ -159,15 +160,26 @@
   log.info(sm.getString(http11protocol.init,  + ep.getPort()));
   
   }
  -
  +
  +ObjectName tpOname;
  +ObjectName rgOname;
  +
   public void start() throws Exception {
   if( this.domain != null ) {
   try {
  -Registry.getRegistry().registerComponent(tp, domain,ThreadPool,
  -type=ThreadPool,name=http + ep.getPort());
  +// XXX We should be able to configure it separately
  +// XXX It should be possible to use a single TP
  +tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
  +Registry.getRegistry().registerComponent(tp, tpOname, null );
  +tp.addThreadPoolListener(new MXPoolListener(this, tp));
   } catch (Exception e) {
   log.error(Can't register threadpool );
   }
  +rgOname=new ObjectName( domain + 
  +:type=GlobalRequestProcessor,name=http +
  +ep.getPort());
  +Registry.getRegistry().registerComponent( cHandler.global,
  +rgOname, null );
   }
   
   try {
  @@ -180,7 +192,12 @@
   }
   
   public void destroy() throws Exception {
  +log.info(Stoping http11 protocol on  + ep.getPort() +   + tpOname);
   ep.stopEndpoint();
  +if( tpOname!=null ) 
  +Registry.getRegistry().unregisterComponent(tpOname);
  +if( rgOname != null ) 
  +Registry.getRegistry().unregisterComponent(rgOname);
   }
   
   //  Properties
  @@ -345,11 +362,42 @@
   }
   
   //   Connection handler 
  +public static final int THREAD_DATA_PROCESSOR=1;
  +public static final int THREAD_DATA_OBJECT_NAME=2;
  +
  +
  +static class MXPoolListener implements ThreadPool.ThreadPoolListener {
  +MXPoolListener( Http11Protocol proto, ThreadPool control ) {
  +
  +}
  +
  +public void threadStart(ThreadPool tp, Thread t) {
  +System.out.println(Thread start );
  +}
  +
  +public void threadEnd(ThreadPool tp, Thread t) {
  +// Register our associated processor
  +// TP uses only TWA
  +System.out.println( thread ending );
  +ThreadWithAttributes ta=(ThreadWithAttributes)t;
  +Object tpData[]=ta.getThreadData(tp);
  +if( tpData==null ) return;
  +// Weird artifact - it should be cleaned up, but that may break 
something
  +// and it won't gain us too much
  +if( tpData[1] instanceof Object[] ) {
  +tpData=(Object [])tpData[1];
  +}
  +ObjectName 
oname=(ObjectName)tpData[Http11Protocol.THREAD_DATA_OBJECT_NAME];
  +System.out.println(X thread end  + oname);
  +if( oname==null ) return;
  +Registry.getRegistry().unregisterComponent(oname);
  +}
  +}
   
   static class Http11ConnectionHandler implements TcpConnectionHandler {
   Http11Protocol proto;
   static int count=0;
  -RequestGroupInfo global=null;
  +RequestGroupInfo global=new RequestGroupInfo();
   
   Http11ConnectionHandler( Http11Protocol proto ) {
   this.proto=proto;
  @@ -363,11 +411,7 @@
   
   public Object[] init() {
   Object thData[]=new Object[3];
  -//CoyoteProcessor adaptor = new CoyoteProcessor(cm);
  -// XXX Should  be on request
  -// if( proto.secure )
  -// 

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

2003-04-04 Thread costin
costin  2003/04/04 14:19:30

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  println removal
  
  I left one for thread stop - I'm still debuging this part.
  
  Revision  ChangesPath
  1.23  +0 -2  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Http11Protocol.java   4 Apr 2003 22:16:22 -   1.22
  +++ Http11Protocol.java   4 Apr 2003 22:19:30 -   1.23
  @@ -372,7 +372,6 @@
   }
   
   public void threadStart(ThreadPool tp, Thread t) {
  -System.out.println(Thread start );
   }
   
   public void threadEnd(ThreadPool tp, Thread t) {
  @@ -388,7 +387,6 @@
   tpData=(Object [])tpData[1];
   }
   ObjectName 
oname=(ObjectName)tpData[Http11Protocol.THREAD_DATA_OBJECT_NAME];
  -System.out.println(X thread end  + oname);
   if( oname==null ) return;
   Registry.getRegistry().unregisterComponent(oname);
   }
  
  
  

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



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

2003-02-16 Thread costin
costin  2003/02/16 17:41:19

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Cosmetic changes in the jmx names ( this isn't used in admin/)
  
  Revision  ChangesPath
  1.21  +5 -3  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Http11Protocol.java   20 Jan 2003 23:47:05 -  1.20
  +++ Http11Protocol.java   17 Feb 2003 01:41:19 -  1.21
  @@ -164,7 +164,7 @@
   if( this.domain != null ) {
   try {
   Registry.getRegistry().registerComponent(tp, domain,ThreadPool,
  -type=ThreadPool,worker=http11,name=http% + ep.getPort());
  +type=ThreadPool,name=http + ep.getPort());
   } catch (Exception e) {
   log.error(Can't register threadpool );
   }
  @@ -386,13 +386,15 @@
   global=new RequestGroupInfo();
   Registry.getRegistry().registerComponent( global,
   proto.getDomain(), GlobalRequestProcessor,
  -type=GlobalRequestProcessor,name=http);
  +type=GlobalRequestProcessor,name=http +
  +proto.ep.getPort());
   }
   RequestInfo rp=processor.getRequest().getRequestProcessor();
   rp.setGlobalProcessor(global);
   Registry.getRegistry().registerComponent( rp,
   proto.getDomain(), RequestProcessor,
  -type=RequestProcessor,name=HttpRequest + count++ );
  +type=RequestProcessor,worker=http +
  +proto.ep.getPort() +,name=HttpRequest + count++ );
   } catch( Exception ex ) {
   log.warn(Error registering request);
   }
  
  
  

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




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

2002-10-22 Thread remm
remm2002/10/22 02:23:32

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Decrease amount of logging (client disconnects are normal, so they should
have DEBUG level IMO).
  
  Revision  ChangesPath
  1.16  +0 -4  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Http11Protocol.java   7 Jun 2002 00:48:21 -   1.15
  +++ Http11Protocol.java   22 Oct 2002 09:23:32 -  1.16
   -394,15 +394,11 
   TcpConnection.shutdownInput( socket );
   } catch(java.net.SocketException e) {
   // SocketExceptions are normal
  -proto.log.info(sm.getString
  -   (http11protocol.proto.socketexception.info));
   proto.log.debug
   (sm.getString
(http11protocol.proto.socketexception.debug), e);
   } catch (java.io.IOException e) {
   // IOExceptions are normal 
  -proto.log.info(sm.getString
  -   (http11protocol.proto.ioexception.info));
   proto.log.debug
   (sm.getString
(http11protocol.proto.ioexception.debug), e);
  
  
  

--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




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

2002-06-06 Thread remm

remm2002/06/06 17:48:21

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Add missing setKeytype method (should fix bug #9676).
  
  Revision  ChangesPath
  1.15  +4 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Http11Protocol.java   5 Jun 2002 22:59:11 -   1.14
  +++ Http11Protocol.java   7 Jun 2002 00:48:21 -   1.15
  @@ -270,6 +270,10 @@
   //setAttribute(keypass, k);
   }
   
  +public void setKeytype( String k ) {
  +setAttribute(keystoreType, k);
  +}
  +
   public void setClientauth( String k ) {
   setAttribute(clientauth, k);
   }
  
  
  

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




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

2002-06-05 Thread costin

costin  2002/06/05 15:59:11

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Reduce the debugging.
  
  Revision  ChangesPath
  1.14  +1 -1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Http11Protocol.java   16 May 2002 19:25:41 -  1.13
  +++ Http11Protocol.java   5 Jun 2002 22:59:11 -   1.14
  @@ -99,7 +99,7 @@
*/
   public void setAttribute( String name, Object value ) {
   
  -log.info(sm.getString(http11protocol.setattribute, name, value));
  +log.debug(sm.getString(http11protocol.setattribute, name, value));
   attributes.put(name, value);
   /*
   if (maxKeepAliveRequests.equals(name)) {
  
  
  

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




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

2002-05-16 Thread remm

remm02/05/16 12:25:41

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
LocalStrings.properties
  Log:
  - Do the i18n for the HTTP/1.1 protocol handler.
  
  Revision  ChangesPath
  1.13  +25 -11
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Http11Protocol.java   16 May 2002 18:57:39 -  1.12
  +++ Http11Protocol.java   16 May 2002 19:25:41 -  1.13
  @@ -85,6 +85,13 @@
*/
   public class Http11Protocol implements ProtocolHandler
   {
  +
  +/**
  + * The string manager for this package.
  + */
  +protected static StringManager sm =
  +StringManager.getManager(Constants.Package);
  +
   Adapter adapter;
   Http11ConnectionHandler cHandler=new Http11ConnectionHandler( this );
   
  @@ -92,7 +99,7 @@
*/
   public void setAttribute( String name, Object value ) {
   
  -log.info(setAttribute  + name +   + value );
  +log.info(sm.getString(http11protocol.setattribute, name, value));
   attributes.put(name, value);
   /*
   if (maxKeepAliveRequests.equals(name)) {
  @@ -125,7 +132,8 @@
try {
   checkSocketFactory();
   } catch( Exception ex ) {
  -log.error( Error initializing socket factory, ex );
  +log.error(sm.getString(http11protocol.socketfactory.initerror), 
  +  ex);
   throw ex;
   }
   
  @@ -141,10 +149,10 @@
   try {
   ep.initEndpoint();
   } catch (Exception ex) {
  -log.error(Error initializing endpoint, ex);
  +log.error(sm.getString(http11protocol.endpoint.initerror), ex);
   throw ex;
   }
  -log.info( Init on  + ep.getPort() );
  +log.info(sm.getString(http11protocol.init,  + ep.getPort()));
   
   }
   
  @@ -152,10 +160,10 @@
   try {
   ep.startEndpoint();
   } catch (Exception ex) {
  -log.error(Error starting endpoint, ex);
  +log.error(sm.getString(http11protocol.endpoint.starterror), ex);
   throw ex;
   }
  -log.info( Starting on  + ep.getPort() );
  +log.info(sm.getString(http11protocol.start,  + ep.getPort()));
   }
   
   public void destroy() throws Exception {
  @@ -382,12 +390,18 @@
   TcpConnection.shutdownInput( socket );
   } catch(java.net.SocketException e) {
   // SocketExceptions are normal
  -proto.log.info( SocketException reading request, ignored);
  -proto.log.debug( SocketException reading request:, e);
  +proto.log.info(sm.getString
  +   (http11protocol.proto.socketexception.info));
  +proto.log.debug
  +(sm.getString
  + (http11protocol.proto.socketexception.debug), e);
   } catch (java.io.IOException e) {
   // IOExceptions are normal 
  -proto.log.info( IOException reading request, ignored);
  -proto.log.debug( IOException reading request:, e);
  +proto.log.info(sm.getString
  +   (http11protocol.proto.ioexception.info));
  +proto.log.debug
  +(sm.getString
  + (http11protocol.proto.ioexception.debug), e);
   }
   // Future developers: if you discover any other
   // rare-but-nonfatal exceptions, catch them here, and log as
  @@ -396,7 +410,7 @@
   // any other exception or error is odd. Here we log it
   // with ERROR level, so it will show up even on
   // less-than-verbose logs.
  -proto.log.error( Error reading request, ignored, e);
  +proto.log.error(sm.getString(http11protocol.proto.error), e);
   } finally {
   //   if(proto.adapter != null) proto.adapter.recycle();
   //processor.recycle();
  
  
  
  1.3   +13 -1 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalStrings.properties   18 Apr 2002 18:16:01 -  1.2
 

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

2002-04-26 Thread remm

remm02/04/26 13:13:43

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Set the timeout attribute.
  
  Revision  ChangesPath
  1.11  +2 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Http11Protocol.java   26 Apr 2002 01:54:54 -  1.10
  +++ Http11Protocol.java   26 Apr 2002 20:13:43 -  1.11
  @@ -291,7 +291,9 @@
   
   public void setTimeout( int timeouts ) {
timeout = timeouts * 1000;
  +setAttribute(timeout,  + timeouts);
   }
  +
   public void setReportedname( String reportedName) {
reportedname = reportedName;
   }
  
  
  

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




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

2002-04-25 Thread billbarker

billbarker02/04/25 18:54:54

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  If you add an attribute, it helps to be able to actually set it.
  
  Revision  ChangesPath
  1.10  +5 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Http11Protocol.java   26 Apr 2002 01:50:32 -  1.9
  +++ Http11Protocol.java   26 Apr 2002 01:54:54 -  1.10
  @@ -164,6 +164,7 @@
   protected String sslImplementationName=null;
   
   private int maxKeepAliveRequests=100; // as in Apache HTTPD server
  +private int  timeout = 30;   // 5 minutes as in Apache HTTPD server
   private String reportedname;
   private int socketCloseDelay=-1;
   
  @@ -288,6 +289,9 @@
return (ServerSocketFactory)chC.newInstance();
   }
   
  +public void setTimeout( int timeouts ) {
  + timeout = timeouts * 1000;
  +}
   public void setReportedname( String reportedName) {
reportedname = reportedName;
   }
  @@ -317,6 +321,7 @@
   Http11Processor  processor = new Http11Processor();
   processor.setAdapter( proto.adapter );
   processor.setMaxKeepAliveRequests( proto.maxKeepAliveRequests );
  +processor.setTimeout( proto.timeout );
   
   //thData[0]=adapter;
   thData[1]=processor;
  
  
  

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




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

2002-04-17 Thread remm

remm02/04/17 10:31:37

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Add protocol and algorithm properties.
  
  Revision  ChangesPath
  1.8   +8 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Http11Protocol.java   16 Apr 2002 23:45:55 -  1.7
  +++ Http11Protocol.java   17 Apr 2002 17:31:37 -  1.8
  @@ -256,6 +256,14 @@
   setAttribute(clientauth, k);
   }
   
  +public void setProtocol( String k ) {
  +setAttribute(protocol, k);
  +}
  +
  +public void setAlgorithm( String k ) {
  +setAttribute(algorithm, k);
  +}
  +
   public void setSecure( boolean b ) {
secure=b;
   setAttribute(secure,  + b);
  
  
  

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




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

2002-04-16 Thread remm

remm02/04/16 12:26:31

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Log the attributes which are set.
  
  Revision  ChangesPath
  1.5   +17 -5 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Http11Protocol.java   8 Apr 2002 23:49:18 -   1.4
  +++ Http11Protocol.java   16 Apr 2002 19:26:31 -  1.5
  @@ -93,6 +93,7 @@
   public void setAttribute( String name, Object value ) {
   
   log.info(setAttribute  + name +   + value );
  +attributes.put(name, value);
   /*
   if (maxKeepAliveRequests.equals(name)) {
   maxKeepAliveRequests = Integer.parseInt((String) value.toString());
  @@ -186,13 +187,14 @@
   }
   
   public void setPort( int port ) {
  -log.info(setPort  + port );
ep.setPort(port);
  +setAttribute(port,  + port);
//this.port=port;
   }
   
   public void setAddress(InetAddress ia) {
ep.setAddress( ia );
  +setAttribute(address,  + ia);
   }
   
   public void setHostName( String name ) {
  @@ -202,52 +204,62 @@
   
   public void setSocketFactory( String valueS ) {
socketFactoryName = valueS;
  +setAttribute(socketFactory, valueS);
   }
   
   public void setSSLImplementation( String valueS) {
sslImplementationName=valueS;
  +setAttribute(sslImplementation, valueS);
   }

   public void setTcpNoDelay( boolean b ) {
ep.setTcpNoDelay( b );
  +setAttribute(tcpNoDelay,  + b);
   }
   
   public void setSoLinger( int i ) {
ep.setSoLinger( i );
  +setAttribute(soLinger,  + i);
   }
   
   public void setSoTimeout( int i ) {
ep.setSoTimeout(i);
  +setAttribute(soTimeout,  + i);
   }
   
   public void setServerSoTimeout( int i ) {
  - ep.setServerSoTimeout( i );
  + ep.setServerSoTimeout(i);
  +setAttribute(serverSoTimeout,  + i);
   }
   
   public void setKeystore( String k ) {
  - attributes.put( keystore, k);
  +setAttribute(keystore, k);
   }
   
   public void setKeypass( String k ) {
  - attributes.put( keypass, k);
  +attributes.put(keypass, k);
  +//setAttribute(keypass, k);
   }
   
   public void setClientauth( String k ) {
  - attributes.put( clientauth, k);
  +setAttribute(clientauth, k);
   }
   
   public void setSecure( boolean b ) {
secure=b;
  +setAttribute(secure,  + b);
   }
   
   /** Set the maximum number of Keep-Alive requests that we will honor.
*/
   public void setMaxKeepAliveRequests(int mkar) {
maxKeepAliveRequests = mkar;
  +setAttribute(maxKeepAliveRequests,  + mkar);
   }
   
   public void setSocketCloseDelay( int d ) {
   socketCloseDelay=d;
  +setAttribute(socketCloseDelay,  + d);
   }
   
   private static ServerSocketFactory string2SocketFactory( String val)
  
  
  

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




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

2002-04-16 Thread remm

remm02/04/16 14:44:34

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Add log for more attributes.
  
  Revision  ChangesPath
  1.6   +5 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Http11Protocol.java   16 Apr 2002 19:26:31 -  1.5
  +++ Http11Protocol.java   16 Apr 2002 21:44:34 -  1.6
  @@ -166,24 +166,29 @@
   
   public void setPools( boolean t ) {
ep.setPoolOn(t);
  +setAttribute(pools,  + t);
   }
   
   public void setMaxThreads( int maxThreads ) {
ep.setMaxThreads(maxThreads);
  +setAttribute(maxThreads,  + maxThreads);
   }
   
   public void setMaxSpareThreads( int maxThreads ) {
ep.setMaxSpareThreads(maxThreads);
  +setAttribute(maxSpareThreads,  + maxThreads);
   }
   
   public void setMinSpareThreads( int minSpareThreads ) {
ep.setMinSpareThreads(minSpareThreads);
  +setAttribute(minSpareThreads,  + minSpareThreads);
   }
   
   //  Tcp setup 
   
   public void setBacklog( int i ) {
ep.setBacklog(i);
  +setAttribute(backlog,  + i);
   }
   
   public void setPort( int port ) {
  
  
  

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




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

2002-04-16 Thread remm

remm02/04/16 16:45:55

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Log errors and rethrow exceptions when initializing the endpoint.
  
  Revision  ChangesPath
  1.7   +7 -1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Http11Protocol.java   16 Apr 2002 21:44:34 -  1.6
  +++ Http11Protocol.java   16 Apr 2002 23:45:55 -  1.7
  @@ -126,6 +126,7 @@
   checkSocketFactory();
   } catch( Exception ex ) {
   log.error( Error initializing socket factory, ex );
  +throw ex;
   }
   
   if( socketFactory!=null ) {
  @@ -136,7 +137,12 @@
   socketFactory.setAttribute( key, v );
   }
   }
  -ep.startEndpoint();
  +try {
  +ep.startEndpoint();
  +} catch (Exception ex) {
  +log.error(Error initializing endpoint, ex);
  +throw ex;
  +}
   log.info( Starting on  + ep.getPort() );
   
   
  
  
  

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




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

2002-04-08 Thread costin

costin  02/04/08 16:49:18

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Set the SSLSupport and socket into the processor, so it can use them in the
  hook
  
  Revision  ChangesPath
  1.4   +12 -30
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Http11Protocol.java   7 Apr 2002 21:11:33 -   1.3
  +++ Http11Protocol.java   8 Apr 2002 23:49:18 -   1.4
  @@ -147,7 +147,7 @@
   
   //  Properties
   protected PoolTcpEndpoint ep=new PoolTcpEndpoint();
  -boolean secure;
  +protected boolean secure;
   
   protected ServerSocketFactory socketFactory;
   protected SSLImplementation sslImplementation;
  @@ -299,9 +299,9 @@
   
   public void processConnection(TcpConnection connection, Object thData[]) {
   Socket socket=null;
  -Processor  processor=null;
  +Http11Processor  processor=null;
   try {
  -processor=(Processor)thData[1];
  +processor=(Http11Processor)thData[1];
   
   if (processor instanceof ActionHook) {
   ((ActionHook) processor).action(ActionCode.ACTION_START, null);
  @@ -312,35 +312,17 @@
   InputStream in = socket.getInputStream();
   OutputStream out = socket.getOutputStream();
   
  -// XXX Should be a request note
  -//reqA.setSocket(socket);
  -//if( secure ) {
  -// Load up the SSLSupport class
  -//   if(sslImplementation != null)
  - //sslSupport = sslImplementation.getSSLSupport(socket);
  -// }
  -
  -// boolean secure=false;
  -// SSLImplementation sslImplementation=null;
  -// SSLSupport sslSupport=null;
  -
  -// if( secure ) {
  -// reqA.scheme().setString( https );
  -
  -// // Load up the SSLSupport class
  -// if(sslImplementation != null)
  -// reqA.setSSLSupport(sslSupport);
  -// }
  -
  +if( proto.secure ) {
  +SSLSupport sslSupport=null;
  +if(proto.sslImplementation != null)
  +sslSupport = proto.sslImplementation.getSSLSupport(socket);
  +processor.setSSLSupport(sslSupport);
  +} else {
  +processor.setSSLSupport( null );
  +}
  +processor.setSocket( socket );
   
   processor.process(in, out);
  -
  -// Recycle reqA notes
  -// secure = false;
  -// sslImplementation=null;
  -// sslSupport=null;
  -
  -
   
   // If unread input arrives after the shutdownInput() call
   // below and before or during the socket.close(), an error
  
  
  

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




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

2002-04-07 Thread remm

remm02/04/07 14:11:33

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Implement remoteAddr and remoteHost for the new connector.
  - Use IntrospectionUtils to pass attributes.
  
  Revision  ChangesPath
  1.3   +2 -2  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Http11Protocol.java   6 Apr 2002 16:51:50 -   1.2
  +++ Http11Protocol.java   7 Apr 2002 21:11:33 -   1.3
  @@ -93,13 +93,13 @@
   public void setAttribute( String name, Object value ) {
   
   log.info(setAttribute  + name +   + value );
  -
  +/*
   if (maxKeepAliveRequests.equals(name)) {
   maxKeepAliveRequests = Integer.parseInt((String) value.toString());
   } else if (port.equals(name)) {
   setPort(Integer.parseInt((String) value.toString()));
   }
  -
  +*/
   }
   
   public Object getAttribute( String key ) {
  
  
  

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




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

2002-04-06 Thread remm

remm02/04/06 08:51:50

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Parse the port attribute.
  
  Revision  ChangesPath
  1.2   +7 -4  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Http11Protocol.java   5 Apr 2002 17:50:39 -   1.1
  +++ Http11Protocol.java   6 Apr 2002 16:51:50 -   1.2
  @@ -91,12 +91,15 @@
   /** Pass config info
*/
   public void setAttribute( String name, Object value ) {
  +
   log.info(setAttribute  + name +   + value );
  -
  -if( maxKeepAliveRequests.equals(name) ) {
  -//maxKeepAliveRequests=String.intValue((String)value);
  +
  +if (maxKeepAliveRequests.equals(name)) {
  +maxKeepAliveRequests = Integer.parseInt((String) value.toString());
  +} else if (port.equals(name)) {
  +setPort(Integer.parseInt((String) value.toString()));
   }
  -
  +
   }
   
   public Object getAttribute( String key ) {
  
  
  

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




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

2002-04-05 Thread costin

costin  02/04/05 09:50:39

  Added:   http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  Initial implementation of http11 'protocolHandler'
  
  The SSL stuff is not completely plugged in, and it will require a recompilation
  of util ( so you have the util.net available ).
  
  It also seem to have some problems with the output ( but more likley the bug
  is in my refactored connector ). The code will be cleaned up after all pieces
  are assembled.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  package org.apache.coyote.http11;
  
  import java.io.InputStream;
  import java.io.IOException;
  import java.io.OutputStream;
  
  import org.apache.coyote.*;
  import java.io.*;
  import java.net.*;
  import java.util.*;
  import java.text.*;
  import org.apache.tomcat.util.res.StringManager;
  import org.apache.tomcat.util.IntrospectionUtils;
  import org.apache.tomcat.util.buf.*;
  import org.apache.tomcat.util.http.*;
  import org.apache.tomcat.util.log.*;
  import org.apache.tomcat.util.net.*;
  
  
  /**
   * Abstract the protocol implementation, including threading, etc.
   * Processor is single threaded and specific to stream-based protocols,
   * will not fit Jk protocols like JNI.
   *
   * @author Remy Maucherat
   * @author Costin Manolache
   */
  public class Http11Protocol implements ProtocolHandler
  {
  Adapter adapter;
  Http11ConnectionHandler cHandler=new Http11ConnectionHandler( this );
  
  /** Pass config info
   */
  public void setAttribute( String name, Object value ) {
  log.info(setAttribute  + name +   + value );
  
  if( maxKeepAliveRequests.equals(name) ) {
  //maxKeepAliveRequests=String.intValue((String)value);
  }
  
  }
  
  public Object getAttribute( String key ) {
  return null;
  }
  
  /** The adapter, used to call the connector 
   */
  public void