Skip to content

Commit

Permalink
mention 10MB limit in warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 16, 2014
1 parent 248676a commit ffed10e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions lib/Mojo/Message.pm
Expand Up @@ -428,7 +428,7 @@ C<multipart/form-data> message body, usually a L<Mojo::Parameters> object.
Note that this method caches all data, so it should not be called before the
entire message body has been received. Parts of the message body need to be
loaded into memory to parse C<POST> parameters, so you have to make sure it is
not excessively large.
not excessively large, there's a 10MB limit by default.
# Get POST parameter value
say $msg->body_params->param('foo');
Expand Down Expand Up @@ -485,7 +485,7 @@ to call the method L<Mojo::DOM/"find"> on it right away, which returns a
L<Mojo::Collection> object. Note that this method caches all data, so it
should not be called before the entire message body has been received. The
whole message body needs to be loaded into memory to parse it, so you have to
make sure it is not excessively large.
make sure it is not excessively large, there's a 10MB limit by default.
# Perform "find" right away
say $msg->dom('h1, h2, h3')->text;
Expand Down Expand Up @@ -575,7 +575,7 @@ JSON Pointer can be used to extract a specific value with
L<Mojo::JSON::Pointer>. Note that this method caches all data, so it should
not be called before the entire message body has been received. The whole
message body needs to be loaded into memory to parse it, so you have to make
sure it is not excessively large.
sure it is not excessively large, there's a 10MB limit by default.
# Extract JSON values
say $msg->json->{foo}{bar}[23];
Expand All @@ -590,7 +590,8 @@ sure it is not excessively large.
Access C<POST> parameters. Note that this method caches all data, so it should
not be called before the entire message body has been received. Parts of the
message body need to be loaded into memory to parse C<POST> parameters, so you
have to make sure it is not excessively large.
have to make sure it is not excessively large, there's a 10MB limit by
default.
=head2 parse
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -390,7 +390,8 @@ Check C<X-Requested-With> header for C<XMLHttpRequest> value.
Access C<GET> and C<POST> parameters. Note that this method caches all data,
so it should not be called before the entire request body has been received.
Parts of the request body need to be loaded into memory to parse C<POST>
parameters, so you have to make sure it is not excessively large.
parameters, so you have to make sure it is not excessively large, there's a
10MB limit by default.
=head2 params
Expand All @@ -400,7 +401,7 @@ All C<GET> and C<POST> parameters, usually a L<Mojo::Parameters> object. Note
that this method caches all data, so it should not be called before the entire
request body has been received. Parts of the request body need to be loaded
into memory to parse C<POST> parameters, so you have to make sure it is not
excessively large.
excessively large, there's a 10MB limit by default.
# Get parameter value
say $req->params->param('foo');
Expand Down
5 changes: 3 additions & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -592,7 +592,8 @@ uploads and C<GET>/C<POST> parameters, in that order. Note that this method is
context sensitive in some cases and therefore needs to be used with care,
there can always be multiple values, which might have unexpected consequences.
Parts of the request body need to be loaded into memory to parse C<POST>
parameters, so you have to make sure it is not excessively large.
parameters, so you have to make sure it is not excessively large, there's a
10MB limit by default.
# List context is ambiguous and should be avoided, you can get multiple
# values returned for a query string like "?foo=bar&foo=baz&foo=yada"
Expand Down Expand Up @@ -927,7 +928,7 @@ to inherit query parameters from the current request.
Get L<Mojolicious::Validator::Validation> object for current request to
validate C<GET>/C<POST> parameters. Parts of the request body need to be
loaded into memory to parse C<POST> parameters, so you have to make sure it is
not excessively large.
not excessively large, there's a 10MB limit by default.
my $validation = $c->validation;
$validation->required('title')->size(3, 50);
Expand Down

0 comments on commit ffed10e

Please sign in to comment.