summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-05-09 20:58:26 +0000
committerZeev Suraski <zeev@php.net>1999-05-09 20:58:26 +0000
commit8f48b83df4334d505a9f8881e32702922bb3484d (patch)
tree045c54b77fab9c619e89efa02709af363e6ed851 /main/SAPI.c
parent4079f914bdad143193e05b2c93ffbbd9e75002ae (diff)
downloadphp-git-8f48b83df4334d505a9f8881e32702922bb3484d.tar.gz
Only read POST info if the request method is POST.
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c6
1 files changed, 5 insertions, 1 deletions
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);
}
}