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.2.12RC2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=456c790c63601adb0a62b307eab2418aece126ab;p=php Make it possible to disable post_max_size --- diff --git a/main/rfc1867.c b/main/rfc1867.c index 91bd234181..3de809a749 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; }