]> granicus.if.org Git - php/commitdiff
Make it possible to disable post_max_size
authorRasmus Lerdorf <rasmus@php.net>
Tue, 17 Nov 2009 20:33:51 +0000 (20:33 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Tue, 17 Nov 2009 20:33:51 +0000 (20:33 +0000)
main/rfc1867.c

index c9201f232547bceba16a43ffb307e321e3c78ebc..410623fdaa6564d6a3287acca5a26bb9a22dd673 100644 (file)
@@ -596,7 +596,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;
        }