summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-03-12 14:05:59 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-03-12 14:05:59 +0000
commited2b1770ab500fc5c10c693fb4849e57c7f75be1 (patch)
treea659011ddbb0aed1071d97a02418e05f4bddb3da
parent3787740cbc45ebec24a40d673a0c71cc0f503ea2 (diff)
downloadphp-git-ed2b1770ab500fc5c10c693fb4849e57c7f75be1.tar.gz
Invalid response code when force-cgi-redirect safety mechanism is triggered
-rw-r--r--sapi/cgi/cgi_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 5d4bf0793e..3fb2250381 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -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\