[Bug 29193] Numeric bug alias

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Nov 28 23:57:28 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=29193

--- Comment #8 from Dan Kegel <dank at kegel.com> 2011-11-28 23:57:28 CST ---
Right, then, how about a little apache module?  It's wafer-thin :-)


static int bugredir_handler(request_rec* r)
{
    int bug;
    if (!r->handler || strcmp(r->handler, "bugredir"))
        return DECLINED;

    if (r->method_number != M_GET)
        return HTTP_METHOD_NOT_ALLOWED;

    if (strncmp(r->uri, "/bugs/", 6))
        return DECLINED;
    bug = atoi(&r->uri[6]);
    if (bug > 0 && bug < (1<<20)) {
        char newuri[256];
        sprintf(newuri, "/show_bug.cgi?id=%d", bug);
        ap_internal_redirect(newuri, r);
    }
    return DECLINED;
}

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list