If PATH_INFO is empty, the percent encoded path info is also empty. No need for complex computation.

Note this fixes an issue with libfcgi app not hosted as root url such as "/sub/app.fcgi".
This commit is contained in:
2017-01-10 00:16:50 +01:00
parent 9f04c52265
commit ee9746449c

View File

@@ -838,6 +838,10 @@ feature -- Access: CGI meta parameters - 1.1
do
l_result := internal_percent_encoded_path_info
if l_result = Void then
pi := path_info
if pi.is_empty then
l_result := ""
else
r := request_uri
i := r.index_of ('?', 1)
if i > 0 then
@@ -845,7 +849,6 @@ feature -- Access: CGI meta parameters - 1.1
else
l_result := r.string
end
pi := path_info
i := 0
if pi.is_valid_as_string_8 then
i := l_result.substring_index (pi.to_string_8, 1)
@@ -884,6 +887,7 @@ feature -- Access: CGI meta parameters - 1.1
end
end
end
end
internal_percent_encoded_path_info := l_result
end
Result := l_result