--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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
[at] [at] -96,14 +96,13 [at] [at]
closedir(D);
# Make directory listing
+ my $pathe =3D $path . ( $^O eq 'MacOS' ? ':' : '/');
for ( [at] files) {
- if($^O eq "MacOS") {
- $_ .=3D "/" if -d "$path:$_";
- }
- else {
- $_ .=3D "/" if -d "$path/$_";
- }
my $furl =3D URI::Escape::uri_escape($_);
+ if ( -d "$pathe$_" ) {
+ $furl .=3D '/';
+ $_ .=3D '/';
+ }
my $desc =3D HTML::Entities::encode($_);
$_ =3D qq{<LI><A HREF=3D"$furl">$desc</A>};
}
--
I love deadlines. I like the whooshing sound they make as they fly by.
-- Douglas Adams
Moshe Kaminsky <kaminsky [at] math.huji.ac.il>
Home: 08-9456841
--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFBTeZgkBjmVsKMBeMRArETAJ9fLqTxk8OX/KMBGzio9cvCyELcKQCg lhbq
I9D7esNHdoqN1fC9z7+2Bto=
=+Fs9
-----END PGP SIGNATURE-----
--2oS5YaxWCcQjTEyO--
