remm        2003/09/12 03:28:38

  Modified:    http11/src/java/org/apache/coyote/http11 Tag: coyote_10
                        InternalOutputBuffer.java
  Log:
  - Port patch: add filering for control chars in the HTTP header.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.16.2.1  +9 -1      
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java
  
  Index: InternalOutputBuffer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalOutputBuffer.java,v
  retrieving revision 1.16
  retrieving revision 1.16.2.1
  diff -u -r1.16 -r1.16.2.1
  --- InternalOutputBuffer.java 22 Nov 2002 15:55:32 -0000      1.16
  +++ InternalOutputBuffer.java 12 Sep 2003 10:28:38 -0000      1.16.2.1
  @@ -490,7 +490,7 @@
        */
       public void endHeaders() {
   
  -        write(Constants.CRLF);
  +        write(Constants.CRLF_BYTES);
   
       }
   
  @@ -627,6 +627,14 @@
                   // High order byte must be zero
                   //log("Header character is not iso8859_1, " +
                   //"not supported yet: " + c, Log.ERROR ) ;
  +            }
  +            if (c != 9) {
  +                if ((c >= 0) && (c <= 31)) {
  +                    c = ' ';
  +                }
  +                if (c == 127) {
  +                    c = ' ';
  +                }
               }
               buf[pos++] = (byte) c;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to