You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@worldgate.com> on 1997/10/25 08:02:45 UTC

PR#1319: RedirectMatch gone /

mod_alias.c:

        if (p->regexp) {  
            if (!regexec(p->regexp, r->uri, p->regexp->re_nsub + 1, regm, 0)) {
                found = pregsub(r->pool, p->real, r->uri,
                                p->regexp->re_nsub + 1, regm);
                if (found && doesc) {
                    found = escape_uri(r->pool, found);
                }
            }
        }

This code is bogus because p->real can be null if
!is_HTTP_REDIRECT(p->redir_status) so it doesn't do to go telling
pregsub to try to do anything.  If it isn't a redirect, we should
simply be checking the regex and doing the right thing (without any
attempt at substitution) if it matches.