tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/server Http10.java
Date Thu, 28 Feb 2002 03:21:27 GMT
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:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message