diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2011-02-27 21:02:16 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2011-02-27 21:02:16 +0000 |
commit | f64d7ab506e73cd9643989e77ffd13654c3d5f55 (patch) | |
tree | 871f8105d75c09f2fba9e41a92fcad5d472c1d24 /Master/tlpkg/tlperl/lib/URI/http.pm | |
parent | cdce81b54ed4a0982aa4787b1db3e446aa84b59a (diff) |
LWP module plus dependencies
git-svn-id: svn://tug.org/texlive/trunk@21533 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/URI/http.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/http.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/URI/http.pm b/Master/tlpkg/tlperl/lib/URI/http.pm new file mode 100644 index 00000000000..cb698224060 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/URI/http.pm @@ -0,0 +1,25 @@ +package URI::http; + +require URI::_server; +@ISA=qw(URI::_server); + +use strict; + +sub default_port { 80 } + +sub canonical +{ + my $self = shift; + my $other = $self->SUPER::canonical; + + my $slash_path = defined($other->authority) && + !length($other->path) && !defined($other->query); + + if ($slash_path) { + $other = $other->clone if $other == $self; + $other->path("/"); + } + $other; +} + +1; |