tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Constants.java
Date Fri, 03 Oct 2003 10:05:57 GMT
jfclere     2003/10/03 03:05:57

  Modified:    http11/src/java/org/apache/coyote/http11 Constants.java
  Log:
  getBytes() uses platform's default charset... Bad on my EBCDIC machine!
  
  Revision  Changes    Path
  1.18      +43 -6     jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Constants.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Constants.java	12 Sep 2003 13:15:36 -0000	1.17
  +++ Constants.java	3 Oct 2003 10:05:57 -0000	1.18
  @@ -161,25 +161,42 @@
       /**
        * CRLF bytes.
        */
  -    public static final byte[] CRLF_BYTES = "\r\n".getBytes();
  +    public static final byte[] CRLF_BYTES = {(byte) '\r', (byte) '\n'};
   
   
       /**
        * Colon bytes.
        */
  -    public static final byte[] COLON_BYTES = ": ".getBytes();
  +    public static final byte[] COLON_BYTES = {(byte) ':', (byte) ' '};
   
   
       /**
        * Close bytes.
        */
  -    public static final byte[] CLOSE_BYTES = "close".getBytes();
  +    public static final byte[] CLOSE_BYTES = {
  +        (byte) 'c',
  +        (byte) 'l',
  +        (byte) 'o',
  +        (byte) 's',
  +        (byte) 'e'
  +    };
   
   
       /**
        * Keep-alive bytes.
        */
  -    public static final byte[] KEEPALIVE_BYTES = "keep-alive".getBytes();
  +    public static final byte[] KEEPALIVE_BYTES = {
  +        (byte) 'k',
  +        (byte) 'e',
  +        (byte) 'e',
  +        (byte) 'p',
  +        (byte) '-',
  +        (byte) 'a',
  +        (byte) 'l',
  +        (byte) 'i',
  +        (byte) 'v',
  +        (byte) 'e'
  +    };
   
   
       /**
  @@ -239,8 +256,28 @@
       /**
        * Ack string when pipelining HTTP requests.
        */
  -    public static final byte[] ACK_BYTES =
  -        "HTTP/1.1 100 Continue\r\n\r\n".getBytes();
  +    public static final byte[] ACK_BYTES = {
  +        (byte) '1',
  +        (byte) '.',
  +        (byte) '1',
  +        (byte) ' ',
  +        (byte) '1',
  +        (byte) '0',
  +        (byte) '0',
  +        (byte) ' ',
  +        (byte) 'C',
  +        (byte) 'o',
  +        (byte) 'n',
  +        (byte) 't',
  +        (byte) 'i',
  +        (byte) 'n',
  +        (byte) 'u',
  +        (byte) 'e',
  +        (byte) '\r',
  +        (byte) '\n',
  +        (byte) '\r',
  +        (byte) '\n'
  +    };
   
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message