mturk       2005/04/27 07:06:17

  Modified:    jk/native/common jk_ajp_common.c jk_ajp_common.h
               jk/xdocs changelog.xml
  Log:
  Backport SC_M_JK_STORED from JK2 for passing arbitrary
  methods instead failing the request
  
  Revision  Changes    Path
  1.106     +15 -8     
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c
  
  Index: jk_ajp_common.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- jk_ajp_common.c   27 Apr 2005 07:17:46 -0000      1.105
  +++ jk_ajp_common.c   27 Apr 2005 14:06:17 -0000      1.106
  @@ -386,13 +386,8 @@
       JK_TRACE_ENTER(l);
   
       if ((method = sc_for_req_method(s->method,
  -                                    strlen(s->method))) == UNKNOWN_METHOD) {
  -        jk_log(l, JK_LOG_ERROR,
  -               "No such method %s",
  -               s->method);
  -        JK_TRACE_EXIT(l);
  -        return JK_FALSE;
  -    }
  +                                    strlen(s->method))) == UNKNOWN_METHOD)
  +        method = SC_M_JK_STORED;
   
       if (jk_b_append_byte(msg, JK_AJP13_FORWARD_REQUEST) ||
           jk_b_append_byte(msg, (unsigned char)method) ||
  @@ -533,6 +528,18 @@
           }
       }
   
  +    /* If the method was unrecognized, encode it as an attribute */
  +    if (method == SC_M_JK_STORED) {
  +        if (JK_IS_DEBUG_LEVEL(l))
  +            jk_log(l, JK_LOG_DEBUG, "unknown method %s", s->method);
  +        if (jk_b_append_string(msg, s->method)) {
  +            jk_log(l, JK_LOG_ERROR,
  +                   "failed appending the request method");
  +            JK_TRACE_EXIT(l);
  +            return JK_FALSE;
  +        }
  +    }
  +
       if (s->num_attributes > 0) {
           for (i = 0; i < s->num_attributes; i++) {
               if (jk_b_append_byte(msg, SC_A_REQ_ATTRIBUTE) ||
  
  
  
  1.33      +2 -2      
jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h
  
  Index: jk_ajp_common.h
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- jk_ajp_common.h   24 Apr 2005 09:54:47 -0000      1.32
  +++ jk_ajp_common.h   27 Apr 2005 14:06:17 -0000      1.33
  @@ -111,7 +111,7 @@
   #define SC_M_MERGE              (unsigned char)25
   #define SC_M_BASELINE_CONTROL   (unsigned char)26
   #define SC_M_MKACTIVITY         (unsigned char)27
  -
  +#define SC_M_JK_STORED          (unsigned char)0xFF
   
   /*
    * Frequent request headers, these headers are coded as numbers
  
  
  
  1.26      +3 -0      jakarta-tomcat-connectors/jk/xdocs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/changelog.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- changelog.xml     27 Apr 2005 07:21:48 -0000      1.25
  +++ changelog.xml     27 Apr 2005 14:06:17 -0000      1.26
  @@ -25,6 +25,9 @@
     <br />
     <subsection name="Native">
       <changelog>
  +      <fix>Backport SC_M_JK_STORED from JK2 for passing arbitrary
  +      methods instead failing the request. (mturk)
  +      </fix>
         <fix>Added missing SEARCH and ACL http methods. (mturk)
         </fix>
         <update>
  
  
  

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

Reply via email to