|
/ uri escaped in LWP::Protocol::file: msg#00038lang.perl.modules.lwp
Hi, It appears to me there is a small bug in LWP::Protocol::file. The '/' added to the end of each directory member which is itself a directory, is escaped when turning it into a url, making the url quite useless. I suggest the following patch: --- /usr/lib/perl5/vendor_perl/5.8.4/LWP/Protocol/file.old 2004-09-19 22:56:35.786858776 +0300 +++ /usr/lib/perl5/vendor_perl/5.8.4/LWP/Protocol/file.pm 2004-09-19 22:56:24.000000000 +0300 @@ -96,14 +96,13 @@ closedir(D); # Make directory listing + my $pathe = $path . ( $^O eq 'MacOS' ? ':' : '/'); for (@files) { - if($^O eq "MacOS") { - $_ .= "/" if -d "$path:$_"; - } - else { - $_ .= "/" if -d "$path/$_"; - } my $furl = URI::Escape::uri_escape($_); + if ( -d "$pathe$_" ) { + $furl .= '/'; + $_ .= '/'; + } my $desc = HTML::Entities::encode($_); $_ = qq{<LI><A HREF="$furl">$desc</A>}; } -- I love deadlines. I like the whooshing sound they make as they fly by. -- Douglas Adams Moshe Kaminsky <kaminsky@xxxxxxxxxxxxxxx> Home: 08-9456841
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Download manager - problem solved: 00038, Octavian Rasnita |
|---|---|
| Next by Date: | Removing url encoding from XML POST requests: 00038, Eric |
| Previous by Thread: | Download manageri: 00038, Octavian Rasnita |
| Next by Thread: | Removing url encoding from XML POST requests: 00038, Eric |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |