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 Constants.java Response.java
Date Thu, 01 May 2003 12:15:50 GMT
remm        2003/05/01 05:15:50

  Modified:    coyote/src/java/org/apache/coyote Constants.java
                        Response.java
  Log:
  - Fix bug 18202: no default for content type.
  
  Revision  Changes    Path
  1.5       +0 -3      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Constants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Constants.java	23 Mar 2003 16:07:33 -0000	1.4
  +++ Constants.java	1 May 2003 12:15:50 -0000	1.5
  @@ -71,9 +71,6 @@
       // -------------------------------------------------------------- Constants
   
   
  -    public static final String DEFAULT_CONTENT_TYPE = "text/plain";
  -
  -
       public static final String DEFAULT_CHARACTER_ENCODING="ISO-8859-1";
   
   
  
  
  
  1.21      +5 -3      jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java
  
  Index: Response.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Response.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Response.java	16 Jan 2003 21:56:02 -0000	1.20
  +++ Response.java	1 May 2003 12:15:50 -0000	1.21
  @@ -144,7 +144,7 @@
       /**
        * HTTP specific fields.
        */
  -    protected String contentType = Constants.DEFAULT_CONTENT_TYPE;
  +    protected String contentType = null;
       protected String contentLanguage = null;
       protected String characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING;
       protected int contentLength = -1;
  @@ -319,7 +319,7 @@
           
           // Reset the headers only if this is the main request,
           // not for included
  -        contentType = Constants.DEFAULT_CONTENT_TYPE;
  +        contentType = null;;
           locale = DEFAULT_LOCALE;
           contentLanguage = null;
           characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING;
  @@ -470,6 +470,8 @@
   
           if (isCommitted())
               return;
  +        if (contentType == null)
  +            return;
   
           String type = this.contentType;
           int start = type.indexOf("charset=");
  @@ -533,7 +535,7 @@
       
       public void recycle() {
           
  -        contentType = Constants.DEFAULT_CONTENT_TYPE;
  +        contentType = null;
           contentLanguage = null;
           locale = DEFAULT_LOCALE;
           characterEncoding = Constants.DEFAULT_CHARACTER_ENCODING;
  
  
  

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


Mime
View raw message