From 38423a895be6171edc463d2507e3760e328161b6 Mon Sep 17 00:00:00 2001 From: Andi Gutmans <andi@php.net> Date: Tue, 3 Oct 2000 13:02:30 +0000 Subject: [PATCH] - Fix request_uri to take it's value from SCRIPT_NAME if PATH_INFO is not defined --- sapi/cgi/cgi_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 2715c70593..f5d2e88751 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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); -- 2.40.0