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...@locus.apache.org on 2000/05/31 23:14:23 UTC

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

remm        00/05/31 14:14:23

  Modified:    proposals/catalina/src/share/org/apache/tomcat/connector/http
                        HttpProcessor.java
  Log:
  - Fixes a bug with persistent connections under HTTP/1.0.
  Basically, persistent connections are no longer supported
  with the HTTP/1.0 protocol.
  
  - Uses the new finish functions.
  
  Revision  Changes    Path
  1.12      +14 -14    jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/connector/http/HttpProcessor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- HttpProcessor.java	2000/05/23 06:05:52	1.11
  +++ HttpProcessor.java	2000/05/31 21:14:23	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/connector/http/HttpProcessor.java,v 1.11 2000/05/23 06:05:52 remm Exp $
  - * $Revision: 1.11 $
  - * $Date: 2000/05/23 06:05:52 $
  + * $Header: /home/cvs/jakarta-tomcat/proposals/catalina/src/share/org/apache/tomcat/connector/http/HttpProcessor.java,v 1.12 2000/05/31 21:14:23 remm Exp $
  + * $Revision: 1.12 $
  + * $Date: 2000/05/31 21:14:23 $
    *
    * ====================================================================
    *
  @@ -103,7 +103,7 @@
    * the request.  When the processor is completed, it will recycle itself.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.11 $ $Date: 2000/05/23 06:05:52 $
  + * @version $Revision: 1.12 $ $Date: 2000/05/31 21:14:23 $
    */
   
   final class HttpProcessor
  @@ -505,9 +505,11 @@
                   if ("close".equalsIgnoreCase(value)) {
                       keepAlive = false;
                   }
  -                if ("keep-alive".equalsIgnoreCase(value)) {
  -                    keepAlive = true;
  -                }
  +                /*
  +                  if ("keep-alive".equalsIgnoreCase(value)) {
  +                  keepAlive = true;
  +                  }
  +                */
               } else {
   		request.addHeader(name, value);
   	    }
  @@ -637,12 +639,6 @@
       private void ackRequest(OutputStream output)
           throws IOException {
           output.write(ack);
  -        /*
  -        if (! keepAlive)
  -            output.write(conCloseAck);
  -        output.write(CRLF);
  -        output.flush();
  -        */
       }
   
   
  @@ -736,10 +732,14 @@
               
               // Finish up the handling of the request
               try {
  +                if (ok) {
  +                    ((HttpResponseImpl) response).finishResponse();
  +                    ((HttpRequestImpl) request).finishRequest();
  +                }
                   if (output != null)
                       output.flush();
               } catch (IOException e) {
  -                ;
  +                ok = false;
               }
               
               // We have to check if the connection closure has been requested