Upgrade to CGI.pm-3.28
authorSteve Peters <steve@fisharerojo.org>
Thu, 29 Mar 2007 23:11:29 +0000 (23:11 +0000)
committerSteve Peters <steve@fisharerojo.org>
Thu, 29 Mar 2007 23:11:29 +0000 (23:11 +0000)
p4raw-id: //depot/perl@30778

lib/CGI.pm
lib/CGI/Changes
lib/CGI/Cookie.pm

index 7582cb1..a65bed2 100644 (file)
@@ -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;
index 6e656a5..03a44b1 100644 (file)
@@ -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.
index 926109c..897e331 100644 (file)
@@ -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 (/^([^=]+)=(.*)/) {