tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java CoyoteConnector.java CoyoteRequest.java LocalStrings.properties
Date Thu, 18 Apr 2002 18:12:47 GMT
remm        02/04/18 11:12:47

  Modified:    coyote/src/java/org/apache/coyote/tomcat4 CoyoteAdapter.java
                        CoyoteConnector.java CoyoteRequest.java
                        LocalStrings.properties
  Log:
  - Spring cleaning of the message strings used by the Coyote adapter for
    Tomcat 4.
  
  Revision  Changes    Path
  1.6       +15 -14    jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java
  
  Index: CoyoteAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CoyoteAdapter.java	18 Apr 2002 09:12:52 -0000	1.5
  +++ CoyoteAdapter.java	18 Apr 2002 18:12:46 -0000	1.6
  @@ -1,6 +1,6 @@
  -/* * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
1.5 2002/04/18 09:12:52 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/04/18 09:12:52 $
  +/* * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteAdapter.java,v
1.6 2002/04/18 18:12:46 remm Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/04/18 18:12:46 $
    *
    * ====================================================================
    *
  @@ -119,7 +119,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.5 $ $Date: 2002/04/18 09:12:52 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/18 18:12:46 $
    */
   
   final class CoyoteAdapter
  @@ -225,7 +225,7 @@
           } catch (IOException e) {
               ;
           } catch (Throwable t) {
  -            log(sm.getString("coyoteProcessor.service"), t);
  +            log(sm.getString("coyoteAdapter.service"), t);
           } finally {
               // Recycle the wrapper request and response
               request.recycle();
  @@ -251,25 +251,22 @@
           request.setAuthorization
               (req.getHeader(Constants.AUTHORIZATION_HEADER));
   
  -        // At this point the Host header has been processed.
  -        // Override if the proxyPort/proxyHost are set 
  -
           // Replace the default port if we are in secure mode
           if (req.getServerPort() == 80 
               && connector.getScheme().equals("https")) {
               req.setServerPort(443);
           }
   
  +        // At this point the Host header has been processed.
  +        // Override if the proxyPort/proxyHost are set 
           String proxyName = connector.getProxyName();
           int proxyPort = connector.getProxyPort();
  -        
           if (proxyPort != 0) {
               request.setServerPort(proxyPort);
  -            req.setServerPort( proxyPort );
  +            req.setServerPort(proxyPort);
           } else {
               request.setServerPort(req.getServerPort());
           }
  -
           if (proxyName != null) {
               request.setServerName(proxyName);
               req.serverName().setString(proxyName);
  @@ -308,6 +305,7 @@
               }
           }
   
  +        // Parse cookies
           parseCookies(req, request);
   
       }
  @@ -404,6 +402,7 @@
        * are resolved out.  If the specified path attempts to go outside the
        * boundaries of the current context (i.e. too many ".." path elements
        * are present), return <code>null</code> instead.
  +     * This code is not optimized, and is only needed for Tomcat 4.0.x.
        *
        * @param path Path to be validated
        */
  @@ -485,9 +484,11 @@
       /**
        * Normalize URI.
        * <p>
  -     * This method normalizes '/./' and '/../'.
  +     * This method normalizes "\", "//", "/./" and "/../". This method will
  +     * return false when trying to go above the root, or if the URI contains
  +     * a null byte.
        * 
  -     * @param uri URI to be normalized
  +     * @param uriMB URI to be normalized
        */
       public static boolean normalize(MessageBytes uriMB) {
   
  @@ -518,7 +519,7 @@
   
           // If the URI ends with "/." or "/..", then we append an extra "/"
           // Note: It is possible to extend the URI by 1 without any side effect
  -        // as the next character in a non-significant WS.
  +        // as the next character is a non-significant WS.
           if (((end - start) > 2) && (b[end - 1] == (byte) '.')) {
               if ((b[end - 2] == (byte) '/') 
                   || ((b[end - 2] == (byte) '.') 
  
  
  
  1.10      +7 -7      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java
  
  Index: CoyoteConnector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CoyoteConnector.java	16 Apr 2002 23:45:14 -0000	1.9
  +++ CoyoteConnector.java	18 Apr 2002 18:12:46 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
1.9 2002/04/16 23:45:14 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/04/16 23:45:14 $
  + * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
1.10 2002/04/18 18:12:46 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/04/18 18:12:46 $
    *
    * ====================================================================
    *
  @@ -112,7 +112,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2002/04/16 23:45:14 $
  + * @version $Revision: 1.10 $ $Date: 2002/04/18 18:12:46 $
    */
   
   
  @@ -941,7 +941,7 @@
               e.printStackTrace();
               throw new LifecycleException
                   (sm.getString
  -                 ("coyoteProcessor.processorInstantiationFailed", e));
  +                 ("coyoteConnector.protocolHandlerInstantiationFailed", e));
           }
           protocolHandler.setAdapter(adapter);
   
  @@ -994,7 +994,7 @@
           } catch (Exception e) {
               throw new LifecycleException
                   (sm.getString
  -                 ("coyoteProcessor.processorInstantiationFailed", e));
  +                 ("coyoteConnector.protocolHandlerInitializationFailed", e));
           }
   
       }
  @@ -1036,7 +1036,7 @@
           } catch (Exception e) {
               throw new LifecycleException
                   (sm.getString
  -                 ("coyoteProcessor.processorDestroyFailed", e));
  +                 ("coyoteConnector.protocolHandlerDestroyFailed", e));
           }
   
       }
  
  
  
  1.20      +8 -8      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java
  
  Index: CoyoteRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CoyoteRequest.java	9 Apr 2002 10:22:17 -0000	1.19
  +++ CoyoteRequest.java	18 Apr 2002 18:12:46 -0000	1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
1.19 2002/04/09 10:22:17 remm Exp $
  - * $Revision: 1.19 $
  - * $Date: 2002/04/09 10:22:17 $
  + * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
1.20 2002/04/18 18:12:46 remm Exp $
  + * $Revision: 1.20 $
  + * $Date: 2002/04/18 18:12:46 $
    *
    * ====================================================================
    *
  @@ -124,7 +124,7 @@
    *
    * @author Remy Maucherat
    * @author Craig R. McClanahan
  - * @version $Revision: 1.19 $ $Date: 2002/04/09 10:22:17 $
  + * @version $Revision: 1.20 $ $Date: 2002/04/18 18:12:46 $
    */
   
   public class CoyoteRequest
  @@ -827,7 +827,7 @@
   
           if (usingReader)
               throw new IllegalStateException
  -                (sm.getString("requestBase.getInputStream.ise"));
  +                (sm.getString("coyoteRequest.getInputStream.ise"));
   
           usingInputStream = true;
           return inputStream;
  @@ -971,7 +971,7 @@
   
           if (usingInputStream)
               throw new IllegalStateException
  -                (sm.getString("requestBase.getReader.ise"));
  +                (sm.getString("coyoteRequest.getReader.ise"));
   
           usingReader = true;
           if (reader == null) {
  @@ -1139,7 +1139,7 @@
           // Name cannot be null
           if (name == null)
               throw new IllegalArgumentException
  -                (sm.getString("requestBase.setAttribute.namenull"));
  +                (sm.getString("coyoteRequest.setAttribute.namenull"));
   
           // Null value is the same as removeAttribute()
           if (value == null) {
  @@ -1857,7 +1857,7 @@
               context.getCookies() &&
               response.getResponse().isCommitted()) {
               throw new IllegalStateException
  -              (sm.getString("httpRequestBase.createCommitted"));
  +              (sm.getString("coyoteRequest.sessionCreateCommitted"));
           }
   
           session = manager.createSession();
  
  
  
  1.3       +32 -41    jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/LocalStrings.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalStrings.properties	8 Mar 2002 19:23:01 -0000	1.2
  +++ LocalStrings.properties	18 Apr 2002 18:12:46 -0000	1.3
  @@ -1,46 +1,37 @@
  -coyoteConnector.allAddresses=Opening server socket on all host IP addresses
  -coyoteConnector.alreadyInitialized=Coyote connector has already been initialized
  -coyoteConnector.alreadyStarted=Coyote connector has already been started
  -coyoteConnector.anAddress=Opening server socket on host IP address {0}
  -coyoteConnector.certificateProblem=General certificate error
  -coyoteConnector.initException=Problem during connector initialization
  -coyoteConnector.IOProblem=Input/output exception opening server socket
  -coyoteConnector.keyManagementProblem=Problem in the key management layer
  -coyoteConnector.keystoreAlgorithmProblem=Keystore algorithm not supported
  -coyoteConnector.keystoreProblem=Problem accessing keystore file
  -coyoteConnector.newProcessor=Creating new Coyote processor
  -coyoteConnector.noAddress=No host IP address matching {0}, opening on all addresses
  -coyoteConnector.noProcessor=No processor available, rejecting this connection
  +
  +#
  +# CoyoteConnector
  +#
  +
  +coyoteConnector.alreadyInitialized=The connector has already been initialized
  +coyoteConnector.alreadyStarted=The connector has already been started
   coyoteConnector.notStarted=Coyote connector has not been started
  -coyoteConnector.securityException=Encountered security exception
  -coyoteConnector.serverSocketReopenFail=IOException reopening server socket
  -coyoteConnector.starting=Starting background thread
  -coyoteConnector.stopException=Exception while stopping background thread
  -coyoteConnector.stopping=Stopping background thread
  -coyoteConnector.unrecoverableKey=Internal keystore problem with the certificate
  -coyoteProcessor.parseHeaders.portNumber=Cannot parse port number from header
  -coyoteProcessor.process=Exception while processing a request
  -coyoteProcessor.processorInitializationFailed=Exception initializing a processor
  -coyoteProcessor.run=Exception while processing a socket
  -coyoteProcessor.alreadyStarted=Coyote processor has already been started
  -coyoteProcessor.notStarted=Coyote processor has not yet been started
  -coyoteProcessor.starting=Starting background thread
  -coyoteProcessor.stopping=Stopping background thread
  -coyoteRequest.createCommitted=Cannot create a session after the response has been committed
  +coyoteConnector.protocolHandlerDestroyFailed=Protocol handler destroy failed: {0}
  +coyoteConnector.protocolHandlerInitializationFailed=Protocol handler initialization failed:
{0}
  +coyoteConnector.protocolHandlerInstantiationFailed=Protocol handler instantiation failed:
{0}
  +
  +#
  +# CoyoteAdapter
  +#
  +
  +coyoteAdapter.service=An exception or error occurred in the container during the request
processing
  +
  +#
  +# CoyoteResponse
  +#
  +
  +coyoteResponse.getOutputStream.ise=getWriter() has already been called for this response
  +coyoteResponse.getWriter.ise=getOutputStream() has already been called for this response
  +coyoteResponse.resetBuffer.ise=Cannot reset buffer after response has been committed
   coyoteResponse.sendError.ise=Cannot call sendError() after the response has been committed
   coyoteResponse.sendRedirect.ise=Cannot call sendRedirect() after the response has been
committed
  +coyoteResponse.setBufferSize.ise=Cannot change buffer size after data has been written
  +
  +#
  +# CoyoteRequest
  +#
  +
   coyoteRequest.getInputStream.ise=getReader() has already been called for this request
   coyoteRequest.getReader.ise=getInputStream() has already been called for this request
  -requestStream.close.closed=Cannot close the same input stream twice
  -requestStream.close.skip=skip() returned zero bytes skipped
  -requestStream.read.closed=This input stream has been closed
  -coyoteResponse.getOutputStream.ise=getWriter() has already been called for this response
  -coyoteResponse.getWriter.ise=getOutputStream() has already been called for this response
  -coyoteResponse.reset.ise=Cannot reset after response has been committed
  -coyoteResponse.resetBuffer.ise=Cannot reset buffer after response has been committed
  -coyoteRequest.setAttribute.namenull=Name cannot be null
  -coyoteResponse.setBufferSize.ise=Buffer size cannot be changed after data has been written
  -responseStream.close.closed=This output stream has already been closed
  -responseStream.flush.closed=Cannot flush a closed output stream
  -responseStream.write.closed=Cannot write to a closed output stream
  -responseStream.write.count=Cannot write more bytes than content length to this output stream
  +coyoteRequest.sessionCreateCommitted=Cannot create a session after the response has been
committed
  +coyoteRequest.setAttribute.namenull=Cannot call setAttribute with a null name
  
  
  

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


Mime
View raw message