Skip to content

Commit

Permalink
there is no need to mention the limit everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 28, 2017
1 parent d064ea2 commit d224a0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions lib/Mojo/Message.pm
Expand Up @@ -423,7 +423,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, there's a 16MB limit by default.
excessively large.
# Get POST parameter names and values
my $hash = $msg->body_params->to_hash;
Expand Down Expand Up @@ -481,8 +481,7 @@ an optional selector can be used to call the method L<Mojo::DOM/"find"> on it
right away, which then 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, there's a
16MB limit by default.
to parse it, so you have to make sure it is not excessively large.
# Perform "find" right away
say $msg->dom('h1, h2, h3')->map('text')->join("\n");
Expand Down Expand Up @@ -604,7 +603,7 @@ 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, there's a 16MB limit by default.
large.
# Extract JSON values
say $msg->json->{foo}{bar}[23];
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/FAQ.pod
Expand Up @@ -190,7 +190,7 @@ Hypnotoad.
To protect your applications from excessively large requests and responses, our
HTTP parser has a cap after which it will automatically stop accepting new
data, and in most cases force the connection to be closed. The limit is 16MB on
the server-side and 2GB on the client-side by default, you can use the
the server-side, and 2GB on the client-side by default. You can use the
attributes L<Mojo::Message/"max_message_size"> and
L<Mojo::UserAgent/"max_response_size"> or C<MOJO_MAX_MESSAGE_SIZE> and
C<MOJO_MAX_RESPONSE_SIZE> environment variables to change these values.
Expand Down

0 comments on commit d224a0b

Please sign in to comment.