You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sh...@locus.apache.org on 2000/04/13 13:44:13 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/service/connector JNIConnectionHandler.java

shachor     00/04/13 04:44:13

  Modified:    src/share/org/apache/tomcat/service/connector Tag: TOMCAT_31
                        JNIConnectionHandler.java
  Log:
  Native response is finished more then once
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +11 -7     jakarta-tomcat/src/share/org/apache/tomcat/service/connector/JNIConnectionHandler.java
  
  Index: JNIConnectionHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/connector/JNIConnectionHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- JNIConnectionHandler.java	2000/02/17 07:52:22	1.2
  +++ JNIConnectionHandler.java	2000/04/13 11:44:13	1.2.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/connector/JNIConnectionHandler.java,v 1.2 2000/02/17 07:52:22 costin Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/02/17 07:52:22 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/connector/JNIConnectionHandler.java,v 1.2.2.1 2000/04/13 11:44:13 shachor Exp $
  + * $Revision: 1.2.2.1 $
  + * $Date: 2000/04/13 11:44:13 $
    *
    * ====================================================================
    *
  @@ -125,7 +125,9 @@
   
       	    contextM.service( reqA, resA );
   
  -    	    resA.finish();
  +    	    if(resA.getStatus() > 0) {
  +    	        resA.finish();
  +    	    }
       	} catch(Exception ex) {
       	    ex.printStackTrace();
       	}
  @@ -285,15 +287,17 @@
   
       public void endHeaders() throws IOException {
   
  -    	if(request.getProtocol()==null) // HTTP/0.9 
  +    	if(request.getProtocol()==null) // HTTP/0.9
   	        return;
   
           super.endHeaders();
  -        
  +
           int    hcnt = 0;
           String []headerNames = null;
           String []headerValues = null;
  +
           headers.removeHeader("Status");
  +
           hcnt = headers.size();
           headerNames = new String[hcnt];
           headerValues = new String[hcnt];
  @@ -304,7 +308,7 @@
               headerValues[i] = h.getValue();
           }
   
  -        if(h.startReasponse(s, l, status, getMessage(status), headerNames, headerValues, hcnt) <= 0) {
  +        if(h.startReasponse(s, l, getStatus(), getMessage(getStatus()), headerNames, headerValues, hcnt) <= 0) {
               throw new IOException("Error: JNI startReasponse implementation error");
           }
       }