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-4.0/catalina/src/share/org/apache/catalina/connector/http HttpProcessor.java HttpResponseStream.java
Date Thu, 01 Nov 2001 17:59:45 GMT
remm        01/11/01 09:59:45

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        HttpProcessor.java HttpResponseStream.java
  Log:
  - If the client announced it was closing the connection, repeat the
    connection: close in the response.
  - Don't remove the transfer encoding header if chunking is disabled.
  
  Revision  Changes    Path
  1.38      +5 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- HttpProcessor.java	2001/10/04 05:44:43	1.37
  +++ HttpProcessor.java	2001/11/01 17:59:45	1.38
  @@ -1,6 +1,6 @@
  -/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.37 2001/10/04 05:44:43 remm Exp $
  - * $Revision: 1.37 $
  - * $Date: 2001/10/04 05:44:43 $
  +/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.38 2001/11/01 17:59:45 remm Exp $
  + * $Revision: 1.38 $
  + * $Date: 2001/11/01 17:59:45 $
    *
    * ====================================================================
    *
  @@ -106,7 +106,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.37 $ $Date: 2001/10/04 05:44:43 $
  + * @version $Revision: 1.38 $ $Date: 2001/11/01 17:59:45 $
    */
   
   final class HttpProcessor
  @@ -652,6 +652,7 @@
                   if (header.valueEquals
                       (DefaultHeaders.CONNECTION_CLOSE_VALUE)) {
                       keepAlive = false;
  +                    response.setHeader("Connection", "close");
                   }
                   //request.setConnection(header);
                   /*
  
  
  
  1.10      +6 -7      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java
  
  Index: HttpResponseStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HttpResponseStream.java	2001/10/04 05:43:20	1.9
  +++ HttpResponseStream.java	2001/11/01 17:59:45	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
1.9 2001/10/04 05:43:20 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/10/04 05:43:20 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v
1.10 2001/11/01 17:59:45 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/11/01 17:59:45 $
    *
    * ====================================================================
    *
  @@ -219,15 +219,14 @@
               // If we should chunk, but chunking is forbidden by the connector,
               // we close the connection
               response.setHeader("Connection", "close");
  -        } else {
  -            response.removeHeader("Connection", "close");
           }
           // Don't chunk is the connection will be closed
           useChunking = (useChunking && !response.isCloseConnection());
  -        if (useChunking)
  +        if (useChunking) {
               response.setHeader("Transfer-Encoding", "chunked");
  -        else
  +        } else if (response.isChunkingAllowed()) {
               response.removeHeader("Transfer-Encoding", "chunked");
  +        }
       }
   
   
  
  
  

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