]> granicus.if.org Git - php/commitdiff
- Fix request_uri to take it's value from SCRIPT_NAME if PATH_INFO is not
authorAndi Gutmans <andi@php.net>
Tue, 3 Oct 2000 13:02:30 +0000 (13:02 +0000)
committerAndi Gutmans <andi@php.net>
Tue, 3 Oct 2000 13:02:30 +0000 (13:02 +0000)
  defined

sapi/cgi/cgi_main.c

index 2715c705936b9bf2a0d9df0542e229235638e36a..f5d2e88751819ab7de4b809fdbe1e148f1f2b27a 100644 (file)
@@ -312,6 +312,9 @@ static void init_request_info(SLS_D)
        SG(request_info).request_method = getenv("REQUEST_METHOD");
        SG(request_info).query_string = getenv("QUERY_STRING");
        SG(request_info).request_uri = getenv("PATH_INFO");
+       if (!SG(request_info).request_uri) {
+               SG(request_info).request_uri = getenv("SCRIPT_NAME");
+       }
        SG(request_info).path_translated = NULL; /* we have to update it later, when we have that information */
        SG(request_info).content_type = getenv("CONTENT_TYPE");
        SG(request_info).content_length = (content_length?atoi(content_length):0);