No problem, better safe than sorry.

In fact there are a couple of memcmp in the same file (decoding http method), that are OK, because we already know that the string length is OK. For the headers the parsing strategy is slightly different and there is now prevention for matching longer custom headers with a standard header name as a string prefix.

I'll write to Henri about AS400 compatibility (replacing memcmp by strcmp interference with EBCDIC).

Regards,

Rainer

Mladen Turk wrote:
Mladen Turk wrote:
[EMAIL PROTECTED] wrote:
Match header names exactly against pre defined constants.
                     p += 6;
-                    if (memcmp(p, "CHARSET", 7) == 0)
+                    if (strcmp(p, "CHARSET") == 0)

Someone would say that this is over engineering :)
memcmp *is always* faster then strcmp

I don't get it, what's the point?

Oops. It makes sense for things like HTTP_CHARSET_FOO
I should think twice before sending reply :)

Regards,
Mladen.

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

Reply via email to