Begin forwarded message:

From: "Ivo Conde" <[EMAIL PROTECTED]>
Date: 15 February 2005 01:43:39 GMT
To: <[EMAIL PROTECTED]>
Subject: Bug and Possible Fix in JK 1.2.8 (I am not sure where/how to post this)

Hi,

  

I have found a bug and possible fix in the latest version (1.2.8) of the JK Connector for Apache+Tomcat.

  

The bug:

JK “converts” user http HEAD requests made to Apache into http GET calls to Tomcat

 

The fix:

There seems to be in a error in jk_ajp_common.c , inside the method static int sc_for_req_method(const char *method, size_t len).

The switch statement is incorrectly returning the GET method for the HEAD case.

 

Here is the buggy part of the method:

 case 4:
         switch (method[0])
         {
         case 'H':
             return (method[1] == 'E'
                     && method[2] == 'A'
                     && method[3] == 'D'
                     ? SC_M_GET : UNKNOWN_METHOD);

………

The fix:

 

 case 4:
        switch (method[0])
        {
        case 'H':
            return (method[1] == 'E'
                    && method[2] == 'A'
                    && method[3] == 'D'
                    ? SC_M_HEAD : UNKNOWN_METHOD);  // REPLACE GET BY HEAD

 

 

The fix worked, at least for me.

 

The bug occurred in a Linux Red Hat Entreprise, Kernel 2.4.21-27.EL , EMT64 Processor (x86_64 GNU/Linux)

 

Can you please forward this email to the right place? Sorry if I’m not following the proper rules to report this, but I don’t have much time to learn about bug/patch submission methods on jakarta. I did search your bug database but did not find this bug anywhere. I hope this can be of some help anyway. This is my first contribution to the open source community since years, and  I wouldn’t sleep at night if I missed this opportunity to give something back, after having received so much from it.

 

Thanks and best regards,

 Ivo

 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to