From: Steve Peters Date: Wed, 1 Mar 2006 16:08:17 +0000 (+0000) Subject: Upgrade to CGI.pm-3.17, but continuing the version bump for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c29edf6c1436006b2170a2279b529d57b78f0536;p=p5sagit%2Fp5-mst-13.2.git Upgrade to CGI.pm-3.17, but continuing the version bump for unintegrated changes. p4raw-id: //depot/perl@27354 --- diff --git a/lib/CGI.pm b/lib/CGI.pm index 025c83f..4c98bda 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.200 2006/02/08 18:28:54 lstein Exp $'; -$CGI::VERSION='3.16_01'; +$CGI::revision = '$Id: CGI.pm,v 1.202 2006/02/24 19:03:29 lstein Exp $'; +$CGI::VERSION='3.17_01'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -3314,11 +3314,11 @@ sub read_multipart { return; } - my($param)= $header{'Content-Disposition'}=~/ name="([^;]*)"/; + my($param)= $header{'Content-Disposition'}=~/ name="([^"]*)"/; $param .= $TAINTED; # Bug: Netscape doesn't escape quotation marks in file names!!! - my($filename) = $header{'Content-Disposition'}=~/ filename="([^;]*)"/; + my($filename) = $header{'Content-Disposition'}=~/ filename="([^"]*)"/; # Test for Opera's multiple upload feature my($multipart) = ( defined( $header{'Content-Type'} ) && $header{'Content-Type'} =~ /multipart\/mixed/ ) ? diff --git a/lib/CGI/Carp.pm b/lib/CGI/Carp.pm index 2c5cce0..6f396ca 100644 --- a/lib/CGI/Carp.pm +++ b/lib/CGI/Carp.pm @@ -207,6 +207,9 @@ non-overridden program name =head1 CHANGE LOG +1.29 Patch from Peter Whaite to fix the unfixable problem of CGI::Carp + not behaving correctly in an eval() context. + 1.05 carpout() added and minor corrections by Marc Hedlund on 11/26/95. @@ -384,7 +387,18 @@ sub ineval { sub die { my ($arg,@rest) = @_; - realdie ($arg,@rest) if ineval(); + + if ( ineval() ) { + if (!ref($arg)) { + $arg = join("",($arg,@rest)) || "Died"; + my($file,$line,$id) = id(1); + $arg .= " at $file line $line.\n" unless $arg=~/\n$/; + realdie($arg); + } + else { + realdie($arg,@rest); + } + } if (!ref($arg)) { $arg = join("", ($arg,@rest)); diff --git a/lib/CGI/Cookie.pm b/lib/CGI/Cookie.pm index dfd99e6..bdc34bb 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.26'; +$CGI::Cookie::VERSION='1.27'; use CGI::Util qw(rearrange unescape escape); use CGI; @@ -163,7 +163,7 @@ sub as_string { push(@constant_values,"secure") if $secure = $self->secure; my($key) = escape($self->name); - my($cookie) = join("=",($key||''),join("&",map escape($_||''),$self->value)); + my($cookie) = join("=",(defined $key ? $key : ''),join("&",map escape(defined $_ ? $_ : ''),$self->value)); return join("; ",$cookie,@constant_values); } diff --git a/lib/CGI/Fast.pm b/lib/CGI/Fast.pm index 39e7cbb..85fc158 100644 --- a/lib/CGI/Fast.pm +++ b/lib/CGI/Fast.pm @@ -13,7 +13,7 @@ package CGI::Fast; # wish, but if you redistribute a modified version, please attach a note # listing the modifications you have made. -$CGI::Fast::VERSION='1.06'; +$CGI::Fast::VERSION='1.07'; use CGI; use FCGI; @@ -54,6 +54,7 @@ sub new { return undef unless FCGI::accept() >= 0; } } + CGI->_reset_globals; return $CGI::Q = $self->SUPER::new($initializer, @param); }