Add a check request_method. If fcgi protocol is not followed, a segfault can occur.

This commit is contained in:
Jérôme Loyet 2010-04-20 23:28:20 +00:00
parent ca8756478a
commit 5556956899

View File

@ -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) {