]> granicus.if.org Git - php/commitdiff
MFH: Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non...
authorDavid Soria Parra <dsp@php.net>
Tue, 9 Jun 2009 13:31:39 +0000 (13:31 +0000)
committerDavid Soria Parra <dsp@php.net>
Tue, 9 Jun 2009 13:31:39 +0000 (13:31 +0000)
The fix was provided by Sriram Natarajan.

sapi/cgi/cgi_main.c

index 61a4e4b4aeb44879d2b43ef127143209fff38376..a7365609516e29fb868b2eb6d0dc47049c7fe187 100644 (file)
@@ -1085,8 +1085,8 @@ static void init_request_info(TSRMLS_D)
                        }
 
                        if (env_path_translated != NULL && env_redirect_url != NULL &&
-                               orig_script_filename != NULL && script_path_translated != NULL
-                       ) {
+                           env_path_translated != script_path_translated &&
+                           strcmp(env_path_translated, script_path_translated) != 0) {
                                /*
                                 * pretty much apache specific.  If we have a redirect_url
                                 * then our script_filename and script_name point to the