summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/URI/http.pm
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2011-02-27 21:02:16 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2011-02-27 21:02:16 +0000
commitf64d7ab506e73cd9643989e77ffd13654c3d5f55 (patch)
tree871f8105d75c09f2fba9e41a92fcad5d472c1d24 /Master/tlpkg/tlperl/lib/URI/http.pm
parentcdce81b54ed4a0982aa4787b1db3e446aa84b59a (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.pm25
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;