tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/src/java/org/apache/ajp Ajp13Packet.java
Date Thu, 07 Jun 2001 13:42:43 GMT
hgomez      01/06/07 06:42:42

  Modified:    jk/src/java/org/apache/ajp Ajp13Packet.java
  Log:
  Protocol headers ('AB' and 0x1234) no more hidden
  in code :)
  
  Revision  Changes    Path
  1.5       +5 -3      jakarta-tomcat-connectors/jk/src/java/org/apache/ajp/Ajp13Packet.java
  
  Index: Ajp13Packet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/src/java/org/apache/ajp/Ajp13Packet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Ajp13Packet.java	2001/05/29 23:02:59	1.4
  +++ Ajp13Packet.java	2001/06/07 13:42:36	1.5
  @@ -73,6 +73,8 @@
   public class Ajp13Packet {
   
       public static final String DEFAULT_CHAR_ENCODING = "8859_1";
  +    public static final int    AJP13_WS_HEADER       = 0x1234;
  +    public static final int    AJP13_SW_HEADER       = 0x4142;  // 'AB'
   
       /**
        * encoding to use when converting byte[] <-> string
  @@ -179,7 +181,7 @@
           int mark = getInt();
           len      = getInt();
   	    
  -        if( mark != 0x1234 ) {
  +        if( mark != AJP13_WS_HEADER ) {
               // XXX Logging
               System.out.println("BAD packet " + mark);
               dump( "In: " );
  @@ -196,8 +198,8 @@
       public void reset() {
           len = 4;
           pos = 4;
  -        buff[0] = (byte)'A';
  -        buff[1] = (byte)'B';
  +        buff[0] = (byte)(AJP13_WS_HEADER >> 8);
  +        buff[1] = (byte)(AJP13_WS_HEADER & 0xFF);
       }
   	
       /**
  
  
  

Mime
View raw message