httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r->filename
Date Fri, 10 Sep 2004 13:55:59 GMT

> I'm afraid I don't understand.

yeah, I'm sorry, that's my fault :)  I should have taken the time to analyze
the code in context and follow it all through.

having done that, the only thing that comes to mind is I wonder how much
logic can be skipped if r->filename is NULL and you assign it r->uri.  for

        if (l > 6 && strncmp(r->filename, "proxy:", 6) == 0) {
            /* it should go on as an internal proxy request */

we can skip that part, right?

        else if ((skip = is_absolute_uri(r->filename)) > 0) {
            /* it was finally rewritten to a remote URL */

I think that comparison could be true if the uri is absolute and mod_proxy
isn't installed.  but I wonder how much of the following logic would apply
if r->filename == r->uri.  I don't know.

        else {
            /* it was finally rewritten to a local path */

it looks like this is where the real work happens, where you want to apply
your rules?

so I dunno, maybe I'm overanalyzing things a bit and causing unnecessary
frustration, in which case I'm sorry.  but if we can save a few cycles in
rewrite it might be worth it (providing we can do the right thing :)  or we
can just go forward with your original patch, which is cool too :)


View raw message