httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugh Stewart <h...@ugs.com>
Subject bug in mod_action?
Date Mon, 12 Aug 2002 19:58:53 GMT
I believe I have found a bug in httpd-2.0.39 mod_actions.c

This sets the allowed actions to include methods it knows about,
but I think the definition has moved (been duplicated?) in Apache 2.
There used to be a rec->allowed field, but there is now a
rec->allowed_methods one too.

The code at about line 180 said:-

    /* Set allowed stuff */
    for (i = 0; i < METHODS; ++i) {
        if (conf->scripted[i])
            r->allowed |= (AP_METHOD_BIT << i);

I changed it to say

    /* Set allowed stuff */
    for (i = 0; i < METHODS; ++i) {
        if (conf->scripted[i])
{ /* Hugh -- set r->allowed_methods->method_mask too cos I think that's the
newfangled equivalent */
            r->allowed |= (AP_METHOD_BIT << i);
            if (r->allowed_methods)
            {
                r->allowed_methods->method_mask  |= (AP_METHOD_BIT << i);
            }
}


and an OPTIONS command now gives the commands mod_actions supports
whereas previously it gave Allow: GET,HEAD,POST,OPTIONS,TRACE
regardless of any Script configuration commands to mod_actions.

(The actual methods were correctly implemented by mod_actions, if
your browser knew to ask for them)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message