diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-08-13 18:41:27 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-08-13 18:41:27 +0000 |
| commit | bcbf441e09fb502cf64924ff2530fa144bdf52c5 (patch) | |
| tree | f377707a2dac078db8cd0c7d7abfe69ac1006d71 /lib/URI/http.pm | |
| download | xxv-bcbf441e09fb502cf64924ff2530fa144bdf52c5.tar.gz xxv-bcbf441e09fb502cf64924ff2530fa144bdf52c5.tar.bz2 | |
* Move files to trunk
Diffstat (limited to 'lib/URI/http.pm')
| -rw-r--r-- | lib/URI/http.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/URI/http.pm b/lib/URI/http.pm new file mode 100644 index 0000000..cb69822 --- /dev/null +++ b/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; |
