diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/URI')
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/Escape.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/Heuristic.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/QueryParam.pm | 33 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/URL.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/WithBase.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/_generic.pm | 3 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/_idna.pm | 9 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/_ldap.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/_punycode.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/_query.pm | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/file.pm | 12 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/ldap.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/sip.pm | 2 |
13 files changed, 40 insertions, 34 deletions
diff --git a/Master/tlpkg/tlperl/lib/URI/Escape.pm b/Master/tlpkg/tlperl/lib/URI/Escape.pm index 32855e37576..e09d76acc48 100644 --- a/Master/tlpkg/tlperl/lib/URI/Escape.pm +++ b/Master/tlpkg/tlperl/lib/URI/Escape.pm @@ -140,7 +140,7 @@ our @ISA = qw(Exporter); our %escapes; our @EXPORT = qw(uri_escape uri_unescape uri_escape_utf8); our @EXPORT_OK = qw(%escapes); -our $VERSION = "3.30"; +our $VERSION = "3.31"; use Carp (); diff --git a/Master/tlpkg/tlperl/lib/URI/Heuristic.pm b/Master/tlpkg/tlperl/lib/URI/Heuristic.pm index f02fe376a44..71ad8dab8ff 100644 --- a/Master/tlpkg/tlperl/lib/URI/Heuristic.pm +++ b/Master/tlpkg/tlperl/lib/URI/Heuristic.pm @@ -93,7 +93,7 @@ use vars qw(@EXPORT_OK $VERSION $MY_COUNTRY %LOCAL_GUESSING $DEBUG); require Exporter; *import = \&Exporter::import; @EXPORT_OK = qw(uf_uri uf_uristr uf_url uf_urlstr); -$VERSION = "4.19"; +$VERSION = "4.20"; sub MY_COUNTRY() { for ($MY_COUNTRY) { diff --git a/Master/tlpkg/tlperl/lib/URI/QueryParam.pm b/Master/tlpkg/tlperl/lib/URI/QueryParam.pm index 3f634b12b77..c202feabfab 100644 --- a/Master/tlpkg/tlperl/lib/URI/QueryParam.pm +++ b/Master/tlpkg/tlperl/lib/URI/QueryParam.pm @@ -8,38 +8,30 @@ sub URI::_query::query_param { if (@_ == 0) { # get keys - my %seen; - my @keys; - for (my $i = 0; $i < @old; $i += 2) { - push(@keys, $old[$i]) unless $seen{$old[$i]}++; - } - return @keys; + my (%seen, $i); + return grep !($i++ % 2 || $seen{$_}++), @old; } my $key = shift; - my @i; - - for (my $i = 0; $i < @old; $i += 2) { - push(@i, $i) if $old[$i] eq $key; - } + my @i = grep $_ % 2 == 0 && $old[$_] eq $key, 0 .. $#old; if (@_) { my @new = @old; my @new_i = @i; my @vals = map { ref($_) eq 'ARRAY' ? @$_ : $_ } @_; - #print "VALS:@vals [@i]\n"; + while (@new_i > @vals) { - #print "REMOVE $new_i[-1]\n"; - splice(@new, pop(@new_i), 2); + splice @new, pop @new_i, 2; } - while (@vals > @new_i) { + if (@vals > @new_i) { my $i = @new_i ? $new_i[-1] + 2 : @new; - #print "SPLICE $i\n"; - splice(@new, $i, 0, $key => pop(@vals)); + my @splice = splice @vals, @new_i, @vals - @new_i; + + splice @new, $i, 0, map { $key => $_ } @splice; } - for (@vals) { + if (@vals) { #print "SET $new_i[0]\n"; - $new[shift(@new_i)+1] = $_; + @new[ map $_ + 1, @new_i ] = @vals; } $self->query_form(\@new); @@ -51,7 +43,8 @@ sub URI::_query::query_param { sub URI::_query::query_param_append { my $self = shift; my $key = shift; - $self->query_form($self->query_form, $key => \@_); # XXX + my @vals = map { ref $_ eq 'ARRAY' ? @$_ : $_ } @_; + $self->query_form($self->query_form, $key => \@vals); # XXX return; } diff --git a/Master/tlpkg/tlperl/lib/URI/URL.pm b/Master/tlpkg/tlperl/lib/URI/URL.pm index 77354488c86..81bf47d3af1 100644 --- a/Master/tlpkg/tlperl/lib/URI/URL.pm +++ b/Master/tlpkg/tlperl/lib/URI/URL.pm @@ -6,7 +6,7 @@ require URI::WithBase; use strict; use vars qw(@EXPORT $VERSION); -$VERSION = "5.03"; +$VERSION = "5.04"; # Provide as much as possible of the old URI::URL interface for backwards # compatibility... diff --git a/Master/tlpkg/tlperl/lib/URI/WithBase.pm b/Master/tlpkg/tlperl/lib/URI/WithBase.pm index 0337c6b6450..4300a2a60ae 100644 --- a/Master/tlpkg/tlperl/lib/URI/WithBase.pm +++ b/Master/tlpkg/tlperl/lib/URI/WithBase.pm @@ -4,7 +4,7 @@ use strict; use vars qw($AUTOLOAD $VERSION); use URI; -$VERSION = "2.19"; +$VERSION = "2.20"; use overload '""' => "as_string", fallback => 1; diff --git a/Master/tlpkg/tlperl/lib/URI/_generic.pm b/Master/tlpkg/tlperl/lib/URI/_generic.pm index 9bf2e5d0781..979087b6301 100644 --- a/Master/tlpkg/tlperl/lib/URI/_generic.pm +++ b/Master/tlpkg/tlperl/lib/URI/_generic.pm @@ -23,6 +23,7 @@ sub authority my $rest = $3; if (defined $auth) { $auth =~ s/([^$ACHAR])/ URI::Escape::escape_char($1)/ego; + utf8::downgrade($auth); $$self .= "//$auth"; } _check_path($rest, $$self); @@ -42,6 +43,7 @@ sub path my $new_path = shift; $new_path = "" unless defined $new_path; $new_path =~ s/([^$PCHAR])/ URI::Escape::escape_char($1)/ego; + utf8::downgrade($new_path); _check_path($new_path, $$self); $$self .= $new_path . $rest; } @@ -59,6 +61,7 @@ sub path_query my $new_path = shift; $new_path = "" unless defined $new_path; $new_path =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego; + utf8::downgrade($new_path); _check_path($new_path, $$self); $$self .= $new_path . $rest; } diff --git a/Master/tlpkg/tlperl/lib/URI/_idna.pm b/Master/tlpkg/tlperl/lib/URI/_idna.pm index 39366e5b831..8b9eab7cb11 100644 --- a/Master/tlpkg/tlperl/lib/URI/_idna.pm +++ b/Master/tlpkg/tlperl/lib/URI/_idna.pm @@ -7,6 +7,13 @@ use strict; use URI::_punycode qw(encode_punycode decode_punycode); use Carp qw(croak); +BEGIN { + *URI::_idna::_ENV_::JOIN_LEAKS_UTF8_FLAGS = $] < 5.008_003 + ? sub () { 1 } + : sub () { 0 } + ; +} + my $ASCII = qr/^[\x00-\x7F]*\z/; sub encode { @@ -17,6 +24,8 @@ sub encode { for (@labels) { $_ = ToASCII($_); } + + return eval 'join(".", @labels, @last_empty)' if URI::_idna::_ENV_::JOIN_LEAKS_UTF8_FLAGS; return join(".", @labels, @last_empty); } diff --git a/Master/tlpkg/tlperl/lib/URI/_ldap.pm b/Master/tlpkg/tlperl/lib/URI/_ldap.pm index c9132e2aff7..d76736471d4 100644 --- a/Master/tlpkg/tlperl/lib/URI/_ldap.pm +++ b/Master/tlpkg/tlperl/lib/URI/_ldap.pm @@ -7,7 +7,7 @@ package URI::_ldap; use strict; use vars qw($VERSION); -$VERSION = "1.11"; +$VERSION = "1.12"; use URI::Escape qw(uri_unescape); diff --git a/Master/tlpkg/tlperl/lib/URI/_punycode.pm b/Master/tlpkg/tlperl/lib/URI/_punycode.pm index 828f176c3a8..db400914268 100644 --- a/Master/tlpkg/tlperl/lib/URI/_punycode.pm +++ b/Master/tlpkg/tlperl/lib/URI/_punycode.pm @@ -1,7 +1,7 @@ package URI::_punycode; use strict; -our $VERSION = "0.03"; +our $VERSION = "0.04"; require Exporter; our @ISA = qw(Exporter); diff --git a/Master/tlpkg/tlperl/lib/URI/_query.pm b/Master/tlpkg/tlperl/lib/URI/_query.pm index 0c6aa285e42..a6038a3717a 100644 --- a/Master/tlpkg/tlperl/lib/URI/_query.pm +++ b/Master/tlpkg/tlperl/lib/URI/_query.pm @@ -14,6 +14,7 @@ sub query $$self = $1; if (defined $q) { $q =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego; + utf8::downgrade($q); $$self .= "?$q"; } $$self .= $3; diff --git a/Master/tlpkg/tlperl/lib/URI/file.pm b/Master/tlpkg/tlperl/lib/URI/file.pm index 59650607ea3..5a1e2b530be 100644 --- a/Master/tlpkg/tlperl/lib/URI/file.pm +++ b/Master/tlpkg/tlperl/lib/URI/file.pm @@ -5,7 +5,7 @@ use vars qw(@ISA $VERSION $DEFAULT_AUTHORITY %OS_CLASS); require URI::_generic; @ISA = qw(URI::_generic); -$VERSION = "4.20"; +$VERSION = "4.21"; use URI::Escape qw(uri_unescape); @@ -227,12 +227,12 @@ usually many URIs that map to any given file name. For instance, an authority of "localhost" maps the same as a URI with a missing or empty authority. -Example 1: The Mac uses ":" as path separator, but not in the same way -as a generic URI. ":foo" is a relative name. "foo:bar" is an absolute -name. Also, path segments can contain the "/" character as well as the -literal "." or "..". So the mapping looks like this: +Example 1: The Mac classic (Mac OS 9 and earlier) used ":" as path separator, +but not in the same way as a generic URI. ":foo" was a relative name. "foo:bar" +was an absolute name. Also, path segments could contain the "/" character as well +as the literal "." or "..". So the mapping looks like this: - Mac URI + Mac classic URI ---------- ------------------- :foo:bar <==> foo/bar : <==> ./ diff --git a/Master/tlpkg/tlperl/lib/URI/ldap.pm b/Master/tlpkg/tlperl/lib/URI/ldap.pm index 50acab4d1f5..378a9421440 100644 --- a/Master/tlpkg/tlperl/lib/URI/ldap.pm +++ b/Master/tlpkg/tlperl/lib/URI/ldap.pm @@ -7,7 +7,7 @@ package URI::ldap; use strict; use vars qw(@ISA $VERSION); -$VERSION = "1.11"; +$VERSION = "1.12"; require URI::_server; require URI::_ldap; diff --git a/Master/tlpkg/tlperl/lib/URI/sip.pm b/Master/tlpkg/tlperl/lib/URI/sip.pm index 1ace52c4f58..97bf8630a3d 100644 --- a/Master/tlpkg/tlperl/lib/URI/sip.pm +++ b/Master/tlpkg/tlperl/lib/URI/sip.pm @@ -15,7 +15,7 @@ use strict; use vars qw(@ISA $VERSION); use URI::Escape qw(uri_unescape); -$VERSION = "0.10"; +$VERSION = "0.11"; sub default_port { 5060 } |