in reply to Configurable Apache RedirectMap

I'd certainly have less to squawk about if you used URI instead of your hand-rolled URL parser. You fail to split on ";" as well as "&", for example, as recommended by the RFCs.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Configurable Apache RedirectMap
by Tomte (Priest) on Jun 27, 2003 at 18:31 UTC

    merlyn++
    thanks for the URI-Tip (rant :-), I checked it and will incorporate it somtime next week, now I'm finaly of duty for the weekend and won't touch no job-code :-) (And yes, I have the permission to share snippets like these)

    It's just a program I wrote quickly the other day, but I do think it's a cool use for perl ;-)

    Update Though I just realized that the failure for ';' URIs is metioned in the comments, and the parameter split on '&' is done after the path is confirmed to be configured, the first match just splits into path and query-string (and anythong after a semicolon, on a closer look, though also the split should occur here, the handling isn't right)
    I nevertheless will incorporate the change to URI, as I find modules to be nearly always preferrable.

    regards,
    tomte


    Hlade's Law:

    If you have a difficult task, give it to a lazy person --
    they will find an easier way to do it.