in reply to CGI.pm bug? Or Apache issue?

Well, by requesting without the trailing "/" you're asking for a file named "script_dir", which apache is then doing an internal redirect to the directory "/script_dir/." Apache is then picking up your rule that sets the default to index.cgi after the internal redirect.

It isn't that suprising, at least to me, that you'd lose the environment variables, including the posted data because of the redirect.

When you request "script_dir/" with the trailing slash, you're avoiding the needed internal apache redirect, and keeping the environment variables.

That's a long way to say "always end requests for directories with a trailing slash for performance's sake, and CGI.pm is still the bomb."

Replies are listed 'Best First'.
Re: Re: CGI.pm bug? Or Apache issue?
by blakem (Monsignor) on Aug 30, 2001 at 00:28 UTC
    Apache actually issues an external redirect in the 'dir lacking backslash' instance. This helps keep relative links from breaking. (i.e. where is ./me.jpg relative to http://whatever.com/onedir/anotherdir? Could be at onedir/me.jpg, or anotherdir/me.jpg.) Issuing the external redirect helps clear this up.

    -Blake

      Oops. My bad on the "internal vs. external" thing.