From: Rasmus Lerdorf Date: Tue, 17 Nov 2009 20:33:51 +0000 (+0000) Subject: Make it possible to disable post_max_size X-Git-Tag: php-5.3.2RC1~224 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e9c3ed919134281f40eed1a7e4b1039ee791819;p=php Make it possible to disable post_max_size --- diff --git a/main/rfc1867.c b/main/rfc1867.c index 06cf6d6d61..291a07dffc 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -797,7 +797,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) int llen = 0; int upload_cnt = INI_INT("max_file_uploads"); - if (SG(request_info).content_length > SG(post_max_size)) { + if (SG(post_max_size) > 0 && SG(request_info).content_length > SG(post_max_size)) { sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; }