cvs: php4 /sapi/cgi cgi_main.c

From: Date: Thu, 09 May 2002 21:03:31 +0000
Subject: cvs: php4 /sapi/cgi cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11783@lists.php.net to get a copy of this message
pbannister Thu May 9 17:03:31 2002 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: Detect when running under IIS and default force_redirect to zero. This This means an explicit php.ini setting is no longer required. (No extraneous whitespace changes this time :). Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.164 php4/sapi/cgi/cgi_main.c:1.165 --- php4/sapi/cgi/cgi_main.c:1.164 Thu May 9 16:03:36 2002 +++ php4/sapi/cgi/cgi_main.c Thu May 9 17:03:30 2002 @@ -577,6 +577,14 @@ /* check force_cgi after startup, so we have proper output */ if (cfg_get_long("cgi.force_redirect", &force_redirect) == FAILURE) { force_redirect = 1; + { + /* We don't need force_cgi on if running under IIS. */ + char* server_software = getenv("SERVER_SOFTWARE"); + char* server_prefix_expected = "Microsoft-IIS"; + if (server_software && (0 == strncmp(server_software,server_prefix_expected,strlen(server_prefix_expected)))) { + force_redirect = 0; + } + } } if (cgi && force_redirect) { if (cfg_get_string("cgi.redirect_status_env", &redirect_status_env) == FAILURE) {

« previous php.cvs (#11783) next »