<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package URI::http;

use strict;
use warnings;

our $VERSION = '5.27';

use parent 'URI::_server';

sub default_port { 80 }

sub canonical
{
    my $self = shift;
    my $other = $self-&gt;SUPER::canonical;

    my $slash_path = defined($other-&gt;authority) &amp;&amp;
        !length($other-&gt;path) &amp;&amp; !defined($other-&gt;query);

    if ($slash_path) {
	$other = $other-&gt;clone if $other == $self;
	$other-&gt;path("/");
    }
    $other;
}

1;
</pre></body></html>