php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch fpm_return_404_without_scriptfilename_v3.diff for FPM related Bug #69625

Patch version 2015-05-12 13:12 UTC

Return to Bug #69625 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: cfc4n@cnxct.com

--- fpm_main.c	2015-05-12 19:33:50.848401868 +0800
+++ fpm_main_patch.c	2015-05-12 20:34:20.887572026 +0800
@@ -1836,6 +1836,12 @@
 			/* check if request_method has been sent.
 			 * if not, it's certainly not an HTTP over fcgi request */
 			if (!SG(request_info).request_method) {
+				zend_try {
+                                        zlog(ZLOG_DEBUG, "SCRIPT_FILENAME or PATH_TRANSLATED unknown in cgi env");
+                                        SG(sapi_headers).http_response_code = 404;
+                                        PUTS("method not found.\n");
+                                } zend_catch {
+                                } zend_end_try();
 				goto fastcgi_request_done;
 			}
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC