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/12/03 20:55:04 UTC

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

remm        01/12/03 11:55:04

  Modified:    catalina/src/share/org/apache/catalina/connector
                        HttpResponseBase.java
  Log:
  - Remove dead code.
  - Suspend response after sendError and sendRedirect (simulates that the
    response has been sent from the application perspective).
  
  Revision  Changes    Path
  1.41      +9 -21     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java
  
  Index: HttpResponseBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- HttpResponseBase.java	2001/11/13 19:39:27	1.40
  +++ HttpResponseBase.java	2001/12/03 19:55:04	1.41
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v 1.40 2001/11/13 19:39:27 patrickl Exp $
  - * $Revision: 1.40 $
  - * $Date: 2001/11/13 19:39:27 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/HttpResponseBase.java,v 1.41 2001/12/03 19:55:04 remm Exp $
  + * $Revision: 1.41 $
  + * $Date: 2001/12/03 19:55:04 $
    *
    * ====================================================================
    *
  @@ -101,7 +101,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.40 $ $Date: 2001/11/13 19:39:27 $
  + * @version $Revision: 1.41 $ $Date: 2001/12/03 19:55:04 $
    */
   
   public class HttpResponseBase
  @@ -1044,23 +1044,8 @@
           // Clear any data content that has been buffered
           resetBuffer();
   
  -        // Cause the response to be committed
  -        /* Per spec clarification, no default content type is set
  -        String contentType = getContentType();
  -        if ((contentType == null) || "text/plain".equals(contentType))
  -            setContentType("text/html");
  -        */
  -
  -        // Temporarily comment out the following flush so that
  -        // default error reports can still set the content type
  -        // FIXME - this stuff needs to be refactored
  -        /*
  -        try {
  -            flushBuffer();
  -        } catch (IOException e) {
  -            ;
  -        }
  -        */
  +        // Cause the response to be finished (from the application perspective)
  +        setSuspended(true);
   
       }
   
  @@ -1094,6 +1079,9 @@
           } catch (IllegalArgumentException e) {
               setStatus(SC_NOT_FOUND);
           }
  +
  +        // Cause the response to be finished (from the application perspective)
  +        setSuspended(true);
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>