Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-31 Thread Martin Kraemer
On Thu, Aug 30, 2007 at 06:24:55PM +0200, Rainer Jung wrote: The patch replaces the memcmp by a strcmp to check for the trailing NIL character, too. For mod_jk the problem you found here is the same. Thanks for finding it! We finally applied a slightly different patch, by keeping the

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-31 Thread Jim Jagielski
On Aug 31, 2007, at 5:11 AM, Martin Kraemer wrote: Please go for obvious algorithms, or simply automate them (as in the example macro above) rather than coding in assembler code for efficiency, dropping even the slightest trace of explanation what the code is intended to do, and leaving

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread Jim Jagielski
Yeah, all this is being fixed in the mod_jk code as well... On Aug 30, 2007, at 6:55 AM, Martin Kraemer wrote: Hi. While looking at ajp_header.c, I realized that its method of parsing the header line tokens is flakey: it uses memcmp() to check, e.g., whether the header token is

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread Rainer Jung
I committed Martins patch to mod_jk a couple of minutes ago. Thanks Martin! The Content-Type part of the patch didn't apply to mod_jk though. Regards, Rainer Jim Jagielski wrote: Yeah, all this is being fixed in the mod_jk code as well... On Aug 30, 2007, at 6:55 AM, Martin Kraemer wrote:

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread Rainer Jung
Hi Martin, Martin Kraemer wrote: Hi. While looking at ajp_header.c, I realized that its method of parsing the header line tokens is flakey: it uses memcmp() to check, e.g., whether the header token is Accept-Charset:, by uppercasing the token name (- ACCEPT-CHARSET), then compares the initial

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread Martin Kraemer
On Thu, Aug 30, 2007 at 04:45:38PM +0200, Rainer Jung wrote: I committed Martins patch to mod_jk a couple of minutes ago. Thanks Martin! The Content-Type part of the patch didn't apply to mod_jk though. ... -if (memcmp(stringname, Content-Type, 12) == 0) { +if

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread Jess Holle
Martin Kraemer wrote: On Thu, Aug 30, 2007 at 04:45:38PM +0200, Rainer Jung wrote: I committed Martins patch to mod_jk a couple of minutes ago. Thanks Martin! The Content-Type part of the patch didn't apply to mod_jk though. ... -if (memcmp(stringname, Content-Type, 12) ==

Re: [PATCH] proxy/ajp_header.c: Fix header detection

2007-08-30 Thread jean-frederic clere
Martin Kraemer wrote: Hi. While looking at ajp_header.c, I realized that its method of parsing the header line tokens is flakey: it uses memcmp() to check, e.g., whether the header token is Accept-Charset:, by uppercasing the token name (- ACCEPT-CHARSET), then compares the initial ACCEPT-