diff options
Diffstat (limited to 'Master/tlpkg/tlperl0/lib/URI/http.pm')
-rwxr-xr-x | Master/tlpkg/tlperl0/lib/URI/http.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl0/lib/URI/http.pm b/Master/tlpkg/tlperl0/lib/URI/http.pm new file mode 100755 index 00000000000..cb698224060 --- /dev/null +++ b/Master/tlpkg/tlperl0/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; |