X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine.pm;h=18addd4064ddd6dcea52ac2b6f68c439732d286d;hb=b31c0f2e5ec23f3266bf9f947528f30bbc8839eb;hp=c53bc129cb6a7dbcc5e44cfae66fcc17e5b64109;hpb=4d4d6635ada968ed67e4e82a6469f2843231a828;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index c53bc12..18addd4 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -157,6 +157,9 @@ EOF (no) Vennligst prov igjen senere (dk) Venligst prov igen senere (pl) Prosze sprobowac pozniej +(pt) Por favor volte mais tarde +(ru) Попробуйте еще раз позже +(ua) Спробуйте ще раз пізніше $name = ''; @@ -314,7 +317,7 @@ sub prepare_body { unless ( $c->request->{_body} ) { my $type = $c->request->header('Content-Type'); $c->request->{_body} = HTTP::Body->new( $type, $length ); - $c->request->{_body}->{tmpdir} = $c->config->{uploadtmp} + $c->request->{_body}->tmpdir( $c->config->{uploadtmp} ) if exists $c->config->{uploadtmp}; } @@ -452,13 +455,13 @@ sub prepare_query_parameters { # replace semi-colons $query_string =~ s/;/&/g; - my @params = split /&/, $query_string; + my @params = grep { length $_ } split /&/, $query_string; for my $item ( @params ) { my ($param, $value) = map { $self->unescape_uri($_) } - split( /=/, $item ); + split( /=/, $item, 2 ); $param = $self->unescape_uri($item) unless defined $param; @@ -658,10 +661,9 @@ as Apache may implement this using Apache's C-based modules, for example. sub unescape_uri { my ( $self, $str ) = @_; - - $str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; - $str =~ s/\+/ /g; - + + $str =~ s/(?:%([0-9A-Fa-f]{2})|\+)/defined $1 ? chr(hex($1)) : ' '/eg; + return $str; } @@ -671,9 +673,7 @@ sub unescape_uri { =head1 AUTHORS -Sebastian Riedel, - -Andy Grundman, +Catalyst Contributors, see Catalyst.pm =head1 COPYRIGHT