]> granicus.if.org Git - php/commitdiff
Invalid response code when force-cgi-redirect safety mechanism is triggered
authorIlia Alshanetsky <iliaa@php.net>
Fri, 12 Mar 2004 14:05:59 +0000 (14:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 12 Mar 2004 14:05:59 +0000 (14:05 +0000)
sapi/cgi/cgi_main.c

index 5d4bf0793ef2988402a009c7a6fecdc9d1d2ef9e..3fb225038122586bd522edadc6225b17b84859ed 100644 (file)
@@ -1079,6 +1079,7 @@ int main(int argc, char *argv[])
                            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\