]> granicus.if.org Git - php/commitdiff
Only read POST info if the request method is POST.
authorZeev Suraski <zeev@php.net>
Sun, 9 May 1999 20:58:26 +0000 (20:58 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 9 May 1999 20:58:26 +0000 (20:58 +0000)
main/SAPI.c

index 1649458b97b1d5c2c4441bc6641c3d6e35432239..91f47afc6bf2c22d7515307e81927e64e6279dae 100644 (file)
@@ -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);
        }
 }