From: Zeev Suraski Date: Sun, 9 May 1999 20:58:26 +0000 (+0000) Subject: Only read POST info if the request method is POST. X-Git-Tag: BEFORE_PHP4_APACHE_MODULE_CHANGE~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f48b83df4334d505a9f8881e32702922bb3484d;p=php Only read POST info if the request method is POST. --- diff --git a/main/SAPI.c b/main/SAPI.c index 1649458b97..91f47afc6b 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -94,7 +94,11 @@ SAPI_API void sapi_activate(SLS_D) SG(headers_sent) = 0; SG(read_post_bytes) = 0; if (SG(server_context)) { - sapi_read_post_data(SLS_C); + if (!strcmp(SG(request_info).request_method, "POST")) { + sapi_read_post_data(SLS_C); + } else { + SG(request_info).post_data = NULL; + } SG(request_info).cookie_data = sapi_module.read_cookies(SLS_C); } }