You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2002/02/28 04:21:27 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Http10.java

billbarker    02/02/27 19:21:27

  Modified:    src/share/org/apache/tomcat/modules/server Http10.java
  Log:
  Don't check for the end-of-line if we didn't read anything.
  
  Fix for bug #6717 (I Hope).
  Reported by: ofer@feathersys.com
  
  Revision  Changes    Path
  1.14      +10 -10    jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java
  
  Index: Http10.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Http10.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Http10.java	31 Aug 2001 09:45:50 -0000	1.13
  +++ Http10.java	28 Feb 2002 03:21:27 -0000	1.14
  @@ -142,20 +142,20 @@
   		if (len == -1) {
   		    return 400;
   		}
  -	    }
   	    
  -	    line.end += len;
  +		line.end += len;
   	    
  -	    if (len == 0 || buf[line.end-1] == '\n') {
  -		// strip \n
  -		if( line.end> line.off && buf[line.end-1]=='\n' )
  -		    --line.end;
  +		if (len == 0 || buf[line.end-1] == '\n') {
  +		    // strip \n
  +		    if( line.end> line.off && buf[line.end-1]=='\n' )
  +			--line.end;
   		
  -		// strip off trailing "\r\n"
  -		if (line.end > line.off && buf[line.end-1] == '\r') {
  -		    --line.end;
  +		    // strip off trailing "\r\n"
  +		    if (line.end > line.off && buf[line.end-1] == '\r') {
  +			--line.end;
  +		    }
  +		    return 0; // Empty line || end of line
   		}
  -		return 0; // Empty line || end of line
   	    }
   	    
   	    // overflowed buffer, so temporarily expand and continue
  
  
  

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