summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm
index fec55a4fe0..baaf8457bb 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/URI/_server.pm
@@ -7,7 +7,7 @@ use parent 'URI::_generic';
use URI::Escape qw(uri_unescape);
-our $VERSION = '5.10';
+our $VERSION = '5.27';
sub _uric_escape {
my($class, $str) = @_;
@@ -23,7 +23,8 @@ sub _uric_escape {
}
sub _host_escape {
- return unless $_[0] =~ /[^$URI::uric]/;
+ return if URI::HAS_RESERVED_SQUARE_BRACKETS and $_[0] !~ /[^$URI::uric]/;
+ return if !URI::HAS_RESERVED_SQUARE_BRACKETS and $_[0] !~ /[^$URI::uric4host]/;
eval {
require URI::_idna;
$_[0] = URI::_idna::encode($_[0]);
@@ -59,8 +60,8 @@ sub userinfo
$new =~ s/.*@//; # remove old stuff
my $ui = shift;
if (defined $ui) {
- $ui =~ s/@/%40/g; # protect @
- $new = "$ui\@$new";
+ $ui =~ s/([^$URI::uric4user])/ URI::Escape::escape_char($1)/ego;
+ $new = "$ui\@$new";
}
$self->authority($new);
}