iliaa Fri Mar 12 09:06:01 2004 EDT
Modified files:
/php-src/sapi/cgi cgi_main.c
Log:
Invalid response code when force-cgi-redirect safety mechanism is triggered
http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.250&r2=1.251&ty=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.250 php-src/sapi/cgi/cgi_main.c:1.251
--- php-src/sapi/cgi/cgi_main.c:1.250 Fri Feb 27 18:31:28 2004
+++ php-src/sapi/cgi/cgi_main.c Fri Mar 12 09:05:59 2004
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cgi_main.c,v 1.250 2004/02/27 23:31:28 rasmus Exp $ */
+/* $Id: cgi_main.c,v 1.251 2004/03/12 14:05:59 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1079,6 +1079,7 @@
in case some server does something different than above */
&& (!redirect_status_env || !getenv(redirect_status_env))
) {
+ SG(sapi_headers).http_response_code = 400;
PUTS("<b>Security Alert!</b> The PHP CGI cannot be accessed
directly.\n\n\
<p>This PHP CGI binary was compiled with force-cgi-redirect enabled. This\n\
means that a page will only be served up if the REDIRECT_STATUS CGI variable is\n\
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php