👁 查看:http.pm
路径:/usr/local/share/perl5/5.32/URI/http.pm
大小:454 B · 修改:2026-09-03 22:49:40 · 权限:0444 · 只读
package URI::http;

use strict;
use warnings;

our $VERSION = '5.37';

use parent 'URI::_server';

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;