(no) Vennligst prov igjen senere
(dk) Venligst prov igen senere
(pl) Prosze sprobowac pozniej
+(pt) Por favor volte mais tarde
</pre>
$name = '';
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};
}
# 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;
my $len = length($buffer);
my $wrote = syswrite STDOUT, $buffer;
+ if ( !defined $wrote && $! == EWOULDBLOCK ) {
+ # Unable to write on the first try, will retry in the loop below
+ $wrote = 0;
+ }
+
if ( defined $wrote && $wrote < $len ) {
# We didn't write the whole buffer
while (1) {
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;
}
=head1 AUTHORS
-Sebastian Riedel, <sri@cpan.org>
-
-Andy Grundman, <andy@hybridized.org>
+Catalyst Contributors, see Catalyst.pm
=head1 COPYRIGHT