httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Morgan <rmor...@covalent.net>
Subject Re: cvs commit: httpd-2.0/server config.c core.c protocol.c
Date Wed, 08 Aug 2001 18:05:34 GMT
On Thu, Aug 02, 2001 at 04:25:20AM -0000, rbb@apache.org wrote:
> rbb         01/08/01 21:25:20
> 
>   Modified:    .        CHANGES
>                include  http_config.h http_core.h http_protocol.h httpd.h
>                modules/aaa mod_access.c
>                modules/http http_protocol.c
>                server   config.c core.c protocol.c
>   Log:
>   Add the ability to extend the methods that Apache understands
>   and have those methods <limit>able in the httpd.conf. It uses
>   the same bit mask/shifted offset as the original HTTP methods
>   such as M_GET or M_POST, but expands the total bits from an int to
>   an ap_int64_t to handle more bits for new request methods than
>   an int provides.
>   Submitted by:	Cody Sherr <csherr@covalent.net>
>   

<snip>

>    
>    static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method)
>    {
>   +
>        allowdeny *ap = (allowdeny *) a->elts;
>   -    int mmask = (1 << method);
>   +    apr_int64_t mmask = (1 << method);
>        int i;
>        int gothost = 0;
>        const char *remotehost = NULL;
> 

There are a lot of places that do bit shifts like this, but they will not
work for method numbers > 32 since most compilers will treat the 1 as an
integer.  Casting the 1 to apr_int64_t fixes the problem.  I can put 
together a patch, or someone with commit access can just go in and fix it.

-Ryan

Mime
View raw message