Change 33810 by [EMAIL PROTECTED] on 2008/05/10 16:07:19

        Integrate:
        [ 33773]
        Upgrade to CGI.pm-3.37

Affected files ...

... //depot/maint-5.10/perl/lib/CGI.pm#4 integrate
... //depot/maint-5.10/perl/lib/CGI/Cookie.pm#2 integrate
... //depot/maint-5.10/perl/lib/CGI/Fast.pm#2 integrate
... //depot/maint-5.10/perl/lib/CGI/t/upload.t#2 integrate

Differences ...

==== //depot/maint-5.10/perl/lib/CGI.pm#4 (text) ====
Index: perl/lib/CGI.pm
--- perl/lib/CGI.pm#3~33582~    2008-03-27 04:35:31.000000000 -0700
+++ perl/lib/CGI.pm     2008-05-10 09:07:19.000000000 -0700
@@ -18,8 +18,8 @@
 # The most recent version and complete docs are available at:
 #   http://stein.cshl.org/WWW/software/CGI/
 
-$CGI::revision = '$Id: CGI.pm,v 1.249 2008/03/25 15:17:55 lstein Exp $';
-$CGI::VERSION='3.35';
+$CGI::revision = '$Id: CGI.pm,v 1.251 2008/04/23 13:08:23 lstein Exp $';
+$CGI::VERSION='3.37';
 
 # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
 # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -37,7 +37,12 @@
   $TAINTED = substr("$0$^X",0,0);
 }
 
-$MOD_PERL = 0; # no mod_perl by default
+$MOD_PERL            = 0; # no mod_perl by default
+
+#global settings
+$POST_MAX            = -1; # no limit to uploaded files
+$DISABLE_UPLOADS     = 0;
+
 @SAVED_SYMBOLS = ();
 
 
@@ -91,13 +96,6 @@
     # it can just be renamed, instead of read and written.
     $CLOSE_UPLOAD_FILES = 0;
 
-    # Set this to a positive value to limit the size of a POSTing
-    # to a certain number of bytes:
-    $POST_MAX = -1;
-
-    # Change this to 1 to disable uploads entirely:
-    $DISABLE_UPLOADS = 0;
-
     # Automatically determined -- don't change
     $EBCDIC = 0;
 
@@ -355,6 +353,7 @@
       $self->r(Apache->request) unless $self->r;
       my $r = $self->r;
       $r->register_cleanup(\&CGI::_reset_globals);
+      $self->_setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
     }
     else {
       # XXX: once we have the new API
@@ -363,6 +362,7 @@
       my $r = $self->r;
       $r->subprocess_env unless exists $ENV{REQUEST_METHOD};
       $r->pool->cleanup_register(\&CGI::_reset_globals);
+      $self->_setup_symbols(@SAVED_SYMBOLS) if @SAVED_SYMBOLS;
     }
     undef $NPH;
   }
@@ -3783,7 +3783,7 @@
     }
 
     my $self = {LENGTH=>$length,
-               CHUNKED=>!defined $length,
+               CHUNKED=>!$length,
                BOUNDARY=>$boundary,
                INTERFACE=>$interface,
                BUFFER=>'',

==== //depot/maint-5.10/perl/lib/CGI/Cookie.pm#2 (text) ====
Index: perl/lib/CGI/Cookie.pm
--- perl/lib/CGI/Cookie.pm#1~32694~     2007-12-22 01:23:09.000000000 -0800
+++ perl/lib/CGI/Cookie.pm      2008-05-10 09:07:19.000000000 -0700
@@ -13,7 +13,7 @@
 # wish, but if you redistribute a modified version, please attach a note
 # listing the modifications you have made.
 
-$CGI::Cookie::VERSION='1.28';
+$CGI::Cookie::VERSION='1.29';
 
 use CGI::Util qw(rearrange unescape escape);
 use CGI;
@@ -51,7 +51,7 @@
    my %results;
    my($key,$value);
    
-   my(@pairs) = split("[;,] ?",$raw_cookie);
+   my @pairs = split("[;,] ?",$raw_cookie);
    foreach (@pairs) {
      s/\s*(.*?)\s*/$1/;
      if (/^([^=]+)=(.*)/) {
@@ -88,7 +88,7 @@
   my ($self,$raw_cookie) = @_;
   my %results;
 
-  my(@pairs) = split("; ?",$raw_cookie);
+  my @pairs = split("[;,] ?",$raw_cookie);
   foreach (@pairs) {
     s/\s*(.*?)\s*/$1/;
     my($key,$value) = split("=",$_,2);

==== //depot/maint-5.10/perl/lib/CGI/Fast.pm#2 (text) ====
Index: perl/lib/CGI/Fast.pm
--- perl/lib/CGI/Fast.pm#1~32694~       2007-12-22 01:23:09.000000000 -0800
+++ perl/lib/CGI/Fast.pm        2008-05-10 09:07:19.000000000 -0700
@@ -55,6 +55,7 @@
      }
      }
      CGI->_reset_globals;
+     $self->_setup_symbols(@SAVED_SYMBOLS) if @CGI::SAVED_SYMBOLS;
      return $CGI::Q = $self->SUPER::new($initializer, @param);
 }
 

==== //depot/maint-5.10/perl/lib/CGI/t/upload.t#2 (text) ====
Index: perl/lib/CGI/t/upload.t
--- perl/lib/CGI/t/upload.t#1~33801~    2008-05-10 06:34:11.000000000 -0700
+++ perl/lib/CGI/t/upload.t     2008-05-10 09:07:19.000000000 -0700
@@ -81,7 +81,8 @@
 { 
     my $test = "multiple file names are handled right with same-named upload 
fields";
     my @hello_names = $q->param('hello_world');
-    is_deeply([EMAIL PROTECTED], [ 'goodbye_world.txt','hello_world.txt' ], 
$test);
+    is ($hello_names[0],'goodbye_world.txt',$test. "...first file");
+    is ($hello_names[1],'hello_world.txt',$test. "...second file");
 }
 
 #-----------------------------------------------------------------------------
End of Patch.

Reply via email to