From 8f48b83df4334d505a9f8881e32702922bb3484d Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sun, 9 May 1999 20:58:26 +0000 Subject: [PATCH] Only read POST info if the request method is POST. --- main/SAPI.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } } -- 2.40.0