diff --git a/perl-5.10.0-CGI-3.37.patch b/perl-5.10.0-CGI-3.38.patch similarity index 53% rename from perl-5.10.0-CGI-3.37.patch rename to perl-5.10.0-CGI-3.38.patch index 8c2f209..f37286d 100644 --- a/perl-5.10.0-CGI-3.37.patch +++ b/perl-5.10.0-CGI-3.38.patch @@ -1,6 +1,6 @@ -diff -up perl-5.10.0/lib/CGI/Apache.pm.eee perl-5.10.0/lib/CGI/Apache.pm -diff -up perl-5.10.0/lib/CGI/Carp.pm.eee perl-5.10.0/lib/CGI/Carp.pm ---- perl-5.10.0/lib/CGI/Carp.pm.eee 2007-12-18 11:47:07.000000000 +0100 +diff -up perl-5.10.0/lib/CGI/Apache.pm.olde perl-5.10.0/lib/CGI/Apache.pm +diff -up perl-5.10.0/lib/CGI/Carp.pm.olde perl-5.10.0/lib/CGI/Carp.pm +--- perl-5.10.0/lib/CGI/Carp.pm.olde 2007-12-18 11:47:07.000000000 +0100 +++ perl-5.10.0/lib/CGI/Carp.pm 2008-03-27 15:23:36.000000000 +0100 @@ -323,7 +323,7 @@ use File::Spec; @@ -19,10 +19,21 @@ diff -up perl-5.10.0/lib/CGI/Carp.pm.eee perl-5.10.0/lib/CGI/Carp.pm print STDOUT "Content-type: text/html\n\n"; print STDOUT $mess; } -diff -up perl-5.10.0/lib/CGI/Changes.eee perl-5.10.0/lib/CGI/Changes ---- perl-5.10.0/lib/CGI/Changes.eee 2007-12-18 11:47:07.000000000 +0100 -+++ perl-5.10.0/lib/CGI/Changes 2008-04-23 15:08:05.000000000 +0200 -@@ -1,3 +1,35 @@ +diff -up perl-5.10.0/lib/CGI/Changes.olde perl-5.10.0/lib/CGI/Changes +--- perl-5.10.0/lib/CGI/Changes.olde 2007-12-18 11:47:07.000000000 +0100 ++++ perl-5.10.0/lib/CGI/Changes 2008-06-25 16:51:35.000000000 +0200 +@@ -1,3 +1,46 @@ ++ Version 3.38 ++ 1. Fix annoying warning in http://rt.cpan.org/Ticket/Display.html?id=34551 ++ 2. Added nobr() function http://rt.cpan.org/Ticket/Display.html?id=35377 ++ 3. popup_menu() allows multiple items to be selected by default, satisfying ++ http://rt.cpan.org/Ticket/Display.html?id=35376 ++ 4. Patch from Renee Backer to avoid doubled headers. ++ 5. Fixed documentation bug that describes what happens when a ++ parameter is empty (e.g. "?test1="). ++ 6. Fixed minor warning described at http://rt.cpan.org/Public/Bug/Display.html?id=36435 ++ 7. Fixed overlap of attribute and parameter space described in http://rt.perl.org/rt3//Ticket/Display.html?id=24294 ++ + Version 3.37 + 1. Fix pragmas so that they persist over modperl invocations (e.g. RT 34761) + 2. Fixed handling of chunked multipart uploads; thanks to Michael Bernhardt @@ -58,8 +69,8 @@ diff -up perl-5.10.0/lib/CGI/Changes.eee perl-5.10.0/lib/CGI/Changes Version 3.29 1. The position of file handles is now reset to zero when CGI->new is called. (Mark Stosberg) -diff -up perl-5.10.0/lib/CGI/Cookie.pm.eee perl-5.10.0/lib/CGI/Cookie.pm ---- perl-5.10.0/lib/CGI/Cookie.pm.eee 2007-12-18 11:47:07.000000000 +0100 +diff -up perl-5.10.0/lib/CGI/Cookie.pm.olde perl-5.10.0/lib/CGI/Cookie.pm +--- perl-5.10.0/lib/CGI/Cookie.pm.olde 2007-12-18 11:47:07.000000000 +0100 +++ perl-5.10.0/lib/CGI/Cookie.pm 2008-03-28 18:15:51.000000000 +0100 @@ -13,7 +13,7 @@ package CGI::Cookie; # wish, but if you redistribute a modified version, please attach a note @@ -88,8 +99,30 @@ diff -up perl-5.10.0/lib/CGI/Cookie.pm.eee perl-5.10.0/lib/CGI/Cookie.pm foreach (@pairs) { s/\s*(.*?)\s*/$1/; my($key,$value) = split("=",$_,2); -diff -up perl-5.10.0/lib/CGI/Fast.pm.eee perl-5.10.0/lib/CGI/Fast.pm ---- perl-5.10.0/lib/CGI/Fast.pm.eee 2007-12-18 11:47:07.000000000 +0100 +diff -up perl-5.10.0/lib/CGI/eg/caution.xbm.olde perl-5.10.0/lib/CGI/eg/caution.xbm +diff -up perl-5.10.0/lib/CGI/eg/clickable_image.cgi.olde perl-5.10.0/lib/CGI/eg/clickable_image.cgi +diff -up perl-5.10.0/lib/CGI/eg/cookie.cgi.olde perl-5.10.0/lib/CGI/eg/cookie.cgi +diff -up perl-5.10.0/lib/CGI/eg/crash.cgi.olde perl-5.10.0/lib/CGI/eg/crash.cgi +diff -up perl-5.10.0/lib/CGI/eg/customize.cgi.olde perl-5.10.0/lib/CGI/eg/customize.cgi +diff -up perl-5.10.0/lib/CGI/eg/diff_upload.cgi.olde perl-5.10.0/lib/CGI/eg/diff_upload.cgi +diff -up perl-5.10.0/lib/CGI/eg/dna_small_gif.uu.olde perl-5.10.0/lib/CGI/eg/dna_small_gif.uu +diff -up perl-5.10.0/lib/CGI/eg/file_upload.cgi.olde perl-5.10.0/lib/CGI/eg/file_upload.cgi +diff -up perl-5.10.0/lib/CGI/eg/frameset.cgi.olde perl-5.10.0/lib/CGI/eg/frameset.cgi +diff -up perl-5.10.0/lib/CGI/eg/index.html.olde perl-5.10.0/lib/CGI/eg/index.html +diff -up perl-5.10.0/lib/CGI/eg/internal_links.cgi.olde perl-5.10.0/lib/CGI/eg/internal_links.cgi +diff -up perl-5.10.0/lib/CGI/eg/javascript.cgi.olde perl-5.10.0/lib/CGI/eg/javascript.cgi +diff -up perl-5.10.0/lib/CGI/eg/make_links.pl.olde perl-5.10.0/lib/CGI/eg/make_links.pl +diff -up perl-5.10.0/lib/CGI/eg/monty.cgi.olde perl-5.10.0/lib/CGI/eg/monty.cgi +diff -up perl-5.10.0/lib/CGI/eg/multiple_forms.cgi.olde perl-5.10.0/lib/CGI/eg/multiple_forms.cgi +diff -up perl-5.10.0/lib/CGI/eg/nph-clock.cgi.olde perl-5.10.0/lib/CGI/eg/nph-clock.cgi +diff -up perl-5.10.0/lib/CGI/eg/nph-multipart.cgi.olde perl-5.10.0/lib/CGI/eg/nph-multipart.cgi +diff -up perl-5.10.0/lib/CGI/eg/popup.cgi.olde perl-5.10.0/lib/CGI/eg/popup.cgi +diff -up perl-5.10.0/lib/CGI/eg/RunMeFirst.olde perl-5.10.0/lib/CGI/eg/RunMeFirst +diff -up perl-5.10.0/lib/CGI/eg/save_state.cgi.olde perl-5.10.0/lib/CGI/eg/save_state.cgi +diff -up perl-5.10.0/lib/CGI/eg/tryit.cgi.olde perl-5.10.0/lib/CGI/eg/tryit.cgi +diff -up perl-5.10.0/lib/CGI/eg/wilogo_gif.uu.olde perl-5.10.0/lib/CGI/eg/wilogo_gif.uu +diff -up perl-5.10.0/lib/CGI/Fast.pm.olde perl-5.10.0/lib/CGI/Fast.pm +--- perl-5.10.0/lib/CGI/Fast.pm.olde 2007-12-18 11:47:07.000000000 +0100 +++ perl-5.10.0/lib/CGI/Fast.pm 2008-04-14 19:53:12.000000000 +0200 @@ -55,6 +55,7 @@ sub new { } @@ -99,17 +132,17 @@ diff -up perl-5.10.0/lib/CGI/Fast.pm.eee perl-5.10.0/lib/CGI/Fast.pm return $CGI::Q = $self->SUPER::new($initializer, @param); } -diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm ---- perl-5.10.0/lib/CGI.pm.eee 2007-12-18 11:47:07.000000000 +0100 -+++ perl-5.10.0/lib/CGI.pm 2008-04-23 15:08:23.000000000 +0200 +diff -up perl-5.10.0/lib/CGI.pm.olde perl-5.10.0/lib/CGI.pm +--- perl-5.10.0/lib/CGI.pm.olde 2007-12-18 11:47:07.000000000 +0100 ++++ perl-5.10.0/lib/CGI.pm 2008-06-25 16:52:19.000000000 +0200 @@ -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.234 2007/04/16 16:58:46 lstein Exp $'; -$CGI::VERSION='3.29'; -+$CGI::revision = '$Id: CGI.pm,v 1.251 2008/04/23 13:08:23 lstein Exp $'; -+$CGI::VERSION='3.37'; ++$CGI::revision = '$Id: CGI.pm,v 1.254 2008/06/25 14:52:19 lstein Exp $'; ++$CGI::VERSION='3.38'; # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES. # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING. @@ -151,6 +184,15 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm # Other globals that you shouldn't worry about. undef $Q; $BEEN_THERE = 0; +@@ -226,7 +227,7 @@ if ($needs_binmode) { + tt u i b blockquote pre img a address cite samp dfn html head + base body Link nextid title meta kbd start_html end_html + input Select option comment charset escapeHTML/], +- ':html3'=>[qw/div table caption th td TR Tr sup Sub strike applet Param ++ ':html3'=>[qw/div table caption th td TR Tr sup Sub strike applet Param nobr + embed basefont style span layer ilayer font frameset frame script small big Area Map/], + ':html4'=>[qw/abbr acronym bdo col colgroup del fieldset iframe + ins label legend noframes noscript object optgroup Q @@ -352,6 +353,7 @@ sub new { $self->r(Apache->request) unless $self->r; my $r = $self->r; @@ -167,9 +209,19 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm } undef $NPH; } -@@ -445,15 +448,14 @@ sub param { +@@ -437,23 +440,22 @@ sub param { + # If values is provided, then we set it. + if (@values or defined $value) { + $self->add_parameter($name); +- $self->{$name}=[@values]; ++ $self->{param}{$name}=[@values]; + } + } else { + $name = $p[0]; + } - return unless defined($name) && $self->{$name}; +- return unless defined($name) && $self->{$name}; ++ return unless defined($name) && $self->{param}{$name}; - my $charset = $self->charset || ''; - my $utf8 = $charset eq 'utf-8'; @@ -179,7 +231,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm - : Encode::decode(utf8=>$self->{$name}->[0]); - } else { - return wantarray ? @{$self->{$name}} : $self->{$name}->[0]; -+ my @result = @{$self->{$name}}; ++ my @result = @{$self->{param}{$name}}; + + if ($PARAM_UTF8) { + eval "require Encode; 1;" unless Encode->can('decode'); # bring in these functions @@ -190,6 +242,23 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm } sub self_or_default { +@@ -574,14 +576,14 @@ sub init { + $self->add_parameter($param); + $self->read_from_client(\$value,$content_length,0) + if $content_length > 0; +- push (@{$self->{$param}},$value); ++ push (@{$self->{param}{$param}},$value); + $is_xforms = 1; + } elsif ($ENV{'CONTENT_TYPE'} =~ /multipart\/related.+boundary=\"?([^\";,]+)\"?.+start=\"?\]+)\>?\"?/) { + my($boundary,$start) = ($1,$2); + my($param) = 'XForms:Model'; + $self->add_parameter($param); + my($value) = $self->read_multipart_related($start,$boundary,$content_length,0); +- push (@{$self->{$param}},$value); ++ push (@{$self->{param}{$param}},$value); + if ($MOD_PERL) { + $query_string = $self->r->args; + } else { @@ -641,7 +643,7 @@ sub init { last METHOD; } @@ -199,7 +268,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $self->read_from_client(\$query_string,$content_length,0) if $content_length > 0; # Some people want to have their cake and eat it too! -@@ -667,11 +669,11 @@ sub init { +@@ -667,13 +669,13 @@ sub init { } # YL: Begin Change for XML handler 10/19/2001 @@ -211,8 +280,47 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm - my($param) = 'POSTDATA' ; + my($param) = $meth . 'DATA' ; $self->add_parameter($param) ; - push (@{$self->{$param}},$query_string); +- push (@{$self->{$param}},$query_string); ++ push (@{$self->{param}{$param}},$query_string); undef $query_string ; + } + # YL: End Change for XML handler 10/19/2001 +@@ -685,7 +687,7 @@ sub init { + $self->parse_params($query_string); + } else { + $self->add_parameter('keywords'); +- $self->{'keywords'} = [$self->parse_keywordlist($query_string)]; ++ $self->{param}{'keywords'} = [$self->parse_keywordlist($query_string)]; + } + } + +@@ -752,7 +754,7 @@ sub save_request { + @QUERY_PARAM = $self->param; # save list of parameters + foreach (@QUERY_PARAM) { + next unless defined $_; +- $QUERY_PARAM{$_}=$self->{$_}; ++ $QUERY_PARAM{$_}=$self->{param}{$_}; + } + $QUERY_CHARSET = $self->charset; + %QUERY_FIELDNAMES = %{$self->{'.fieldnames'}}; +@@ -771,7 +773,7 @@ sub parse_params { + $param = unescape($param); + $value = unescape($value); + $self->add_parameter($param); +- push (@{$self->{$param}},$value); ++ push (@{$self->{param}{$param}},$value); + } + } + +@@ -779,7 +781,7 @@ sub add_parameter { + my($self,$param)=@_; + return unless defined $param; + push (@{$self->{'.parameters'}},$param) +- unless defined($self->{$param}); ++ unless defined($self->{param}{$param}); + } + + sub all_parameters { @@ -904,6 +906,7 @@ sub _setup_symbols { $DEBUG=0, next if /^[:-]no_?[Dd]ebug$/; $DEBUG=2, next if /^[:-][Dd]ebug$/; @@ -221,6 +329,35 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $XHTML++, next if /^[:-]xhtml$/; $XHTML=0, next if /^[:-]no_?xhtml$/; $USE_PARAM_SEMICOLONS=0, next if /^[:-]oldstyle_urls$/; +@@ -1005,7 +1008,7 @@ sub delete { + my %to_delete; + foreach my $name (@to_delete) + { +- CORE::delete $self->{$name}; ++ CORE::delete $self->{param}{$name}; + CORE::delete $self->{'.fieldnames'}->{$name}; + $to_delete{$name}++; + } +@@ -1054,8 +1057,8 @@ END_OF_FUNC + sub keywords { + my($self,@values) = self_or_default(@_); + # If values is provided, then we set it. +- $self->{'keywords'}=[@values] if @values; +- my(@result) = defined($self->{'keywords'}) ? @{$self->{'keywords'}} : (); ++ $self->{param}{'keywords'}=[@values] if @values; ++ my(@result) = defined($self->{param}{'keywords'}) ? @{$self->{param}{'keywords'}} : (); + @result; + } + END_OF_FUNC +@@ -1200,7 +1203,7 @@ sub append { + my(@values) = defined($value) ? (ref($value) ? @{$value} : $value) : (); + if (@values) { + $self->add_parameter($name); +- push(@{$self->{$name}},@values); ++ push(@{$self->{param}{$name}},@values); + } + return $self->param($name); + } @@ -1519,7 +1522,7 @@ sub header { push(@header,map {ucfirst $_} @other); push(@header,"Content-Type: $type") if $type ne ''; @@ -230,7 +367,32 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $self->r->send_cgi_header($header); return ''; } -@@ -1699,6 +1702,7 @@ sub _style { +@@ -1663,12 +1666,22 @@ sub start_html { + : qq()); } + } + +- push(@result,ref($head) ? @$head : $head) if $head; ++ my $meta_bits_set = 0; ++ if( $head ) { ++ if( ref $head ) { ++ push @result, @$head; ++ $meta_bits_set = 1 if grep { /http-equiv=["']Content-Type/i }@$head; ++ } ++ else { ++ push @result, $head; ++ $meta_bits_set = 1 if $head =~ /http-equiv=["']Content-Type/i; ++ } ++ } + + # handle the infrequently-used -style and -script parameters + push(@result,$self->_style($style)) if defined $style; + push(@result,$self->_script($script)) if defined $script; +- push(@result,$meta_bits) if defined $meta_bits; ++ push(@result,$meta_bits) if defined $meta_bits and !$meta_bits_set; + + # handle -noscript parameter + push(@result,< */-->\n" : " -->\n"; my @s = ref($style) eq 'ARRAY' ? @$style : $style; @@ -238,7 +400,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm for my $s (@s) { if (ref($s)) { -@@ -1708,7 +1712,7 @@ sub _style { +@@ -1708,7 +1722,7 @@ sub _style { ref($s) eq 'ARRAY' ? @$s : %$s)); my $type = defined $stype ? $stype : 'text/css'; my $rel = $alternate ? 'alternate stylesheet' : 'stylesheet'; @@ -247,7 +409,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm if (ref($src) eq "ARRAY") # Check to see if the $src variable is an array reference { # If it is, push a LINK tag for each one -@@ -1831,7 +1835,7 @@ sub startform { +@@ -1831,7 +1845,7 @@ sub startform { my($method,$action,$enctype,@other) = rearrange([METHOD,ACTION,ENCTYPE],@p); @@ -256,7 +418,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $enctype = $self->escapeHTML($enctype || &URL_ENCODED); if (defined $action) { $action = $self->escapeHTML($action); -@@ -2147,8 +2151,9 @@ END_OF_FUNC +@@ -2147,8 +2161,9 @@ END_OF_FUNC sub checkbox { my($self,@p) = self_or_default(@_); @@ -268,7 +430,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $value = defined $value ? $value : 'on'; -@@ -2165,7 +2170,8 @@ sub checkbox { +@@ -2165,7 +2180,8 @@ sub checkbox { my($other) = @other ? "@other " : ''; $tabindex = $self->element_tab($tabindex); $self->register_parameter($name); @@ -278,7 +440,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm : qq{$the_label}; } END_OF_FUNC -@@ -2192,9 +2198,11 @@ sub escapeHTML { +@@ -2192,9 +2208,11 @@ sub escapeHTML { else { $toencode =~ s{"}{"}gso; } @@ -293,7 +455,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm $toencode =~ s{'}{'}gso; $toencode =~ s{\x8b}{‹}gso; $toencode =~ s{\x9b}{›}gso; -@@ -2327,13 +2335,14 @@ sub _box_group { +@@ -2327,13 +2345,14 @@ sub _box_group { my $self = shift; my $box_type = shift; @@ -314,7 +476,7 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm my($result,$checked,@elements,@values); -@@ -2393,7 +2402,7 @@ sub _box_group { +@@ -2393,7 +2412,7 @@ sub _box_group { if ($XHTML) { push @elements, @@ -323,7 +485,59 @@ diff -up perl-5.10.0/lib/CGI.pm.eee perl-5.10.0/lib/CGI.pm qq($label)).${break}; } else { push(@elements,qq/${label}${break}/); -@@ -2560,6 +2569,7 @@ sub scrolling_list { +@@ -2428,12 +2447,14 @@ sub popup_menu { + my($name,$values,$default,$labels,$attributes,$override,$tabindex,@other) = + rearrange([NAME,[VALUES,VALUE],[DEFAULT,DEFAULTS],LABELS, + ATTRIBUTES,[OVERRIDE,FORCE],TABINDEX],@p); +- my($result,$selected); ++ my($result,%selected); + + if (!$override && defined($self->param($name))) { +- $selected = $self->param($name); +- } else { +- $selected = $default; ++ $selected{$self->param($name)}++; ++ } elsif ($default) { ++ %selected = map {$_=>1} ref($default) eq 'ARRAY' ++ ? @$default ++ : $default; + } + $name=$self->escapeHTML($name); + my($other) = @other ? " @other" : ''; +@@ -2444,20 +2465,22 @@ sub popup_menu { + $result = qq/