tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http SocketInputStream.java
Date Wed, 08 Aug 2001 20:02:17 GMT
remm        01/08/08 13:02:17

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        SocketInputStream.java
  Log:
  - A HT (tab) is also considered a leading white space. It was a bit hidden in the
    HTTP spec, so I had missed it.
  
  Revision  Changes    Path
  1.9       +15 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java
  
  Index: SocketInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SocketInputStream.java	2001/07/22 20:25:07	1.8
  +++ SocketInputStream.java	2001/08/08 20:02:17	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
1.8 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/SocketInputStream.java,v
1.9 2001/08/08 20:02:17 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/08/08 20:02:17 $
    *
    * ====================================================================
    *
  @@ -100,6 +100,12 @@
   
   
       /**
  +     * HT.
  +     */
  +    private static final byte HT = (byte) '\t';
  +
  +
  +    /**
        * COLON.
        */
       private static final byte COLON = (byte) ':';
  @@ -440,7 +446,7 @@
                       pos = 0;
                       readStart = 0;
                   }
  -                if (buf[pos] == SP) {
  +                if ((buf[pos] == SP) || (buf[pos] == HT)) {
                       pos++;
                   } else {
                       space = false;
  @@ -483,8 +489,10 @@
                   }
                   pos++;
               }
  +
  +            int nextChr = read();
   
  -            if (read() != SP) {
  +            if ((nextChr != SP) && (nextChr != HT)) {
                   pos--;
                   validLine = false;
               } else {
  @@ -583,8 +591,9 @@
           pos = 0;
           count = 0;
           int nRead = is.read(buf, 0, buf.length);
  -        if (nRead > 0)
  +        if (nRead > 0) {
               count = nRead;
  +        }
       }
   
   
  
  
  

Mime
View raw message