diff options
author | Jérôme Loyet <fat@php.net> | 2010-04-20 23:28:20 (GMT) |
---|---|---|
committer | Jérôme Loyet <fat@php.net> | 2010-04-20 23:28:20 (GMT) |
commit | 5556956899a14bc0877eb99595f7412cb653552b (patch) | |
tree | 18d78a5a4d92ae9b0ea121f3ce14f6148320f4ad /sapi | |
parent | ca8756478a949f14cdf4e48118f2842e16bc9b12 (diff) | |
download | php-5556956899a14bc0877eb99595f7412cb653552b.tar.gz |
Add a check request_method. If fcgi protocol is not followed, a segfault can occur.
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/fpm/fpm/fpm_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 7cc1ccd..31a9047 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1773,6 +1773,12 @@ consult the installation file that came with this distribution, or visit \n\ return FAILURE; } + /* check request_method has been sent. + * if not, the certainly not an HTTP over fcgi request */ + if (!SG(request_info).request_method) { + goto fastcgi_request_done; + } + if (!strcasecmp(SG(request_info).request_method, "GET") && fpm_status_handle_status(SG(request_info).request_uri, SG(request_info).query_string, &status_buffer, &status_content_type)) { if (status_buffer) { if (status_content_type) { |