You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hugh Stewart <hu...@ugs.com> on 2002/08/12 21:58:53 UTC

bug in mod_action?

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