rasmus                                   Tue, 17 Nov 2009 20:33:51 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290885

Log:
Make it possible to disable post_max_size

Changed paths:
    U   php/php-src/branches/PHP_5_2/main/rfc1867.c
    U   php/php-src/branches/PHP_5_3/main/rfc1867.c
    U   php/php-src/trunk/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_2/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-11-17 20:11:54 UTC (rev 
290884)
+++ php/php-src/branches/PHP_5_2/main/rfc1867.c 2009-11-17 20:33:51 UTC (rev 
290885)
@@ -797,7 +797,7 @@
        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;
        }

Modified: php/php-src/branches/PHP_5_3/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-11-17 20:11:54 UTC (rev 
290884)
+++ php/php-src/branches/PHP_5_3/main/rfc1867.c 2009-11-17 20:33:51 UTC (rev 
290885)
@@ -797,7 +797,7 @@
        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;
        }

Modified: php/php-src/trunk/main/rfc1867.c
===================================================================
--- php/php-src/trunk/main/rfc1867.c    2009-11-17 20:11:54 UTC (rev 290884)
+++ php/php-src/trunk/main/rfc1867.c    2009-11-17 20:33:51 UTC (rev 290885)
@@ -596,7 +596,7 @@
        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;
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to