httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: cvs commit: httpd-2.0/modules/arch/win32 mod_win32.c
Date Wed, 19 Mar 2003 09:17:01 GMT
* wrowe@apache.org wrote:

> wrowe       2003/02/23 14:37:35
> 
>   Modified:    modules/arch/win32 mod_win32.c
>   Log:
>     Someone (I need to refer back) asked that we do the same skip for the
>     utf-8 win32 prefix when testing for shebang lines.  Here's just such
>     a test with some bad sizeof(buffer) v.s. bytes read assumptions fixed,
>     and the code made generally a little more legible.  Please review and
>     comment to consider this patch for backporting to 2.0.

This is PR 16687.

>   +        if ((bytes >= 3) && memcmp(buffer, "\xEF\xBB\xBF", 3) == 0) {
>   +            memmove(buffer, buffer + 3, bytes -= 3);
>   +        }

Just a nit ;-) I'd guess you can safely assume that bytes must be > 3.

I would leave it in 2.1, because (a) it's a minor enhancement and (b) it's 
an irreversible change in behaviour. It assumes, that (1) the script 
languages supports BOMs (e.g. perl does) and (2) DOS executables never 
start with the BOM sequence (I don't know).

The sizeof(buffer) vs. bytes thing should be backported anyway.

nd
-- 
Flhacs wird im Usenet grundsätzlich alsfhc geschrieben. Schreibt man
lafhsc nicht slfach, so ist das schlichtweg hclafs. Hingegen darf man
rihctig ruhig rhitcgi schreiben, weil eine shcalfe Schreibweise bei
irhictg nicht als shflac angesehen wird.       -- Hajo Pflüger in dnq

Mime
View raw message