in reply to LWP::Simple relative URI bad bad bad. ;)

Actually, it's the webserver that sends the 302 to the proper directory path (if it finds that "sky" is truly a directory and not the filename of some other type of file). It's now LWP's fault.

If you type the URL of a directory without the trailing slash, the webserver has to redirect to that directory and then invoke the default handlers (like Apache's DirectoryIndex or MultiViews directives).

And to answer your question, check out LWP.pm docs:

• Supports transparent redirect handling

Oops... Doesn't that suck.


Updated: Added that last part afterwards, because I was motivated enough to look it up for ya. :)
  • Comment on Re: LWP::Simple relative URI bad bad bad. ;)

Replies are listed 'Best First'.
Re: Re: LWP::Simple relative URI bad bad bad. ;)
by jettero (Monsignor) on Nov 03, 2001 at 01:23 UTC

    How can I detect it? As I work around, I could alwayNet::TCP the port and get it, but that seems sloppy if I'm already using LWP...

    ... I guess from what you're saying that's how I'll have to do it...