From: Steve Peters Date: Thu, 29 Mar 2007 23:11:29 +0000 (+0000) Subject: Upgrade to CGI.pm-3.28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2c454cbd693e2f6a6c12d8a4c7f82f006f7cc257;p=p5sagit%2Fp5-mst-13.2.git Upgrade to CGI.pm-3.28 p4raw-id: //depot/perl@30778 --- diff --git a/lib/CGI.pm b/lib/CGI.pm index 7582cb1..a65bed2 100644 --- a/lib/CGI.pm +++ b/lib/CGI.pm @@ -18,8 +18,8 @@ use Carp 'croak'; # The most recent version and complete docs are available at: # http://stein.cshl.org/WWW/software/CGI/ -$CGI::revision = '$Id: CGI.pm,v 1.227 2007/02/23 23:03:16 lstein Exp $'; -$CGI::VERSION='3.27'; +$CGI::revision = '$Id: CGI.pm,v 1.229 2007/03/29 15:35:40 lstein Exp $'; +$CGI::VERSION='3.28'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -2707,7 +2707,8 @@ sub url { if ($full) { my $protocol = $self->protocol(); $url = "$protocol://"; - my $vh = http('x_forwarded_host') || http('host'); + my $vh = http('x_forwarded_host') || http('host') || ''; + $vh =~ s/\:\d+$//; # some clients add the port number (incorrectly). Get rid of it. if ($vh) { $url .= $vh; } else { @@ -3052,7 +3053,7 @@ END_OF_FUNC sub script_name { my ($self,@p) = self_or_default(@_); if (@p) { - $self->{'.script_name'} = shift; + $self->{'.script_name'} = shift @p; } elsif (!exists $self->{'.script_name'}) { my ($script_name,$path_info) = $self->_name_and_path_from_env(); $self->{'.script_name'} = $script_name; diff --git a/lib/CGI/Changes b/lib/CGI/Changes index 6e656a5..03a44b1 100644 --- a/lib/CGI/Changes +++ b/lib/CGI/Changes @@ -1,3 +1,9 @@ + Version 3.28 + 1. Applied patch from Allen Day that makes Cookie parsing RFC2109 compliant + (attribute/values can be separated by commas as well as semicolons). + 2. Applied patch from Stephan Struckmann that allows script_name() to be set correctly. + 3. Fixed problem with url(-full) in which port number appears twice. + Version 3.27 1. Applied patch from Steve Taylor that allows checkbox_groups to be disabled with a new -disabled=> option. diff --git a/lib/CGI/Cookie.pm b/lib/CGI/Cookie.pm index 926109c..897e331 100644 --- a/lib/CGI/Cookie.pm +++ b/lib/CGI/Cookie.pm @@ -13,7 +13,7 @@ package CGI::Cookie; # wish, but if you redistribute a modified version, please attach a note # listing the modifications you have made. -$CGI::Cookie::VERSION='1.27'; +$CGI::Cookie::VERSION='1.28'; use CGI::Util qw(rearrange unescape escape); use CGI; @@ -51,7 +51,7 @@ sub fetch { my %results; my($key,$value); - my(@pairs) = split("; ?",$raw_cookie); + my(@pairs) = split("[;,] ?",$raw_cookie); foreach (@pairs) { s/\s*(.*?)\s*/$1/; if (/^([^=]+)=(.*)/) {