remm        01/10/04 12:26:36

  Modified:    catalina/src/share/org/apache/catalina/connector/http Tag:
                        tomcat_40_branch HttpProcessor.java
  Log:
  - Merge a variety of fixes and small feature additions which have been made
    and debugged in the HEAD branch, including:
    - Removal of Jasper loader (merged with the shared loader).
    - Fixes a lot of spec complaince issue regarding the commit state of the
      response when using forwards, sendError or sendRedirect.
    - Fixes cache consistency issues for static resource serving.
    - Adds content caching for static resources (that's linked to the bugfix
      mentioned just above).
    - Merge enhanced error reporting and error page dispatching (which will be
      able to display error pages for most errors returned from the pipeline -
      like the 401 and 403 returned by the authenticator).
    - Merge the fixes for all the other more recent bugfixes that have been
      fixed in the HEAD branch.
    - Passes all tester and Watchdog tests.
    - Merge a variety of small enhancements to the build scripts which have been
      made in the HEAD branch.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.36.2.1  +16 -8     
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.36
  retrieving revision 1.36.2.1
  diff -u -r1.36 -r1.36.2.1
  --- HttpProcessor.java        2001/09/05 00:31:50     1.36
  +++ HttpProcessor.java        2001/10/04 19:26:36     1.36.2.1
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36 2001/09/05 00:31:50 craigmcc Exp $
  - * $Revision: 1.36 $
  - * $Date: 2001/09/05 00:31:50 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36.2.1 2001/10/04 19:26:36 remm Exp $
  + * $Revision: 1.36.2.1 $
  + * $Date: 2001/10/04 19:26:36 $
    *
    * ====================================================================
    *
  @@ -106,7 +106,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.36 $ $Date: 2001/09/05 00:31:50 $
  + * @version $Revision: 1.36.2.1 $ $Date: 2001/10/04 19:26:36 $
    */
   
   final class HttpProcessor
  @@ -919,6 +919,7 @@
       private void process(Socket socket) {
   
           boolean ok = true;
  +        boolean finishResponse = true;
           SocketInputStream input = null;
           OutputStream output = null;
   
  @@ -935,6 +936,8 @@
   
           while (!stopped && ok && keepAlive) {
   
  +            finishResponse = true;
  +
               try {
                   request.setStream(input);
                   request.setResponse(response);
  @@ -966,7 +969,10 @@
                       }
                   }
               } catch (EOFException e) {
  +                // It's very likely to be a socket disconnect on either the 
  +                // client or the server
                   ok = false;
  +                finishResponse = false;
               } catch (ServletException e) {
                   ok = false;
                   try {
  @@ -1028,10 +1034,12 @@
   
               // Finish up the handling of the request
               try {
  -                response.finishResponse();
  -                request.finishRequest();
  -                if (output != null)
  -                    output.flush();
  +                if (finishResponse) {
  +                    response.finishResponse();
  +                    request.finishRequest();
  +                    if (output != null)
  +                        output.flush();
  +                }
               } catch (IOException e) {
                   ok = false;
               }
  
  
  


Reply via email to