You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2001/10/04 07:43:20 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http HttpResponseStream.java

remm        01/10/03 22:43:20

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        HttpResponseStream.java
  Log:
  - Use setHeader to avoid setting duplicate headers.
  
  Revision  Changes    Path
  1.9       +5 -5      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpResponseStream.java	2001/09/28 23:34:02	1.8
  +++ HttpResponseStream.java	2001/10/04 05:43:20	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpResponseStream.java,v 1.8 2001/09/28 23:34:02 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/09/28 23:34:02 $
  + * $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 $
    *
    * ====================================================================
    *
  @@ -218,14 +218,14 @@
           if (!response.isChunkingAllowed() && useChunking) {
               // If we should chunk, but chunking is forbidden by the connector,
               // we close the connection
  -            response.addHeader("Connection", "close");
  +            response.setHeader("Connection", "close");
           } else {
               response.removeHeader("Connection", "close");
           }
           // Don't chunk is the connection will be closed
           useChunking = (useChunking && !response.isCloseConnection());
           if (useChunking)
  -            response.addHeader("Transfer-Encoding", "chunked");
  +            response.setHeader("Transfer-Encoding", "chunked");
           else
               response.removeHeader("Transfer-Encoding", "chunked");
       }