Ensure that PATH_INFO and REQUEST_URI are following the CGI specifications:
- PATH_INFO is percent decoded but still utf-8 encoded, this is available via WGI.path_info and WSF_REQUEST.utf_8_path_info. - Added WSF_REQUEST.percent_encoded_path_info - and WSF_REQUEST.path_info remains the unicode value for PATH_INFO Added cgi_variables: WGI_REQUEST_CGI_VARIABLES to have a simple and quick view on CGI variables Added execution_variables to be able to iterate on execution variables. Added PERCENT_ENCODER.percent_decoded_utf_8_string Improved the WSF_DEBUG_HANDLER to provide more information thanks to WSF_DEBUG_INFORMATION object.
This commit is contained in:
@@ -74,8 +74,8 @@ feature -- Request processing
|
||||
l_request_uri := a_handler.uri
|
||||
l_headers_map := a_handler.request_header_map
|
||||
create e
|
||||
create enc
|
||||
if attached e.starting_environment as vars then
|
||||
create enc
|
||||
create env.make_equal (vars.count)
|
||||
across
|
||||
vars as c
|
||||
@@ -168,8 +168,22 @@ feature -- Request processing
|
||||
if p > 0 then
|
||||
l_path_info.keep_head (p - 1)
|
||||
end
|
||||
env.force (l_path_info, "PATH_INFO")
|
||||
env.force (enc.decoded_utf_8_string (l_path_info), "PATH_INFO")
|
||||
env.force (l_base, "SCRIPT_NAME")
|
||||
else
|
||||
-- This should not happen, this means the `base' is not correctly set.
|
||||
-- It is better to consider base as empty, rather than having empty PATH_INFO
|
||||
check valid_base_value: False end
|
||||
|
||||
l_path_info := l_request_uri
|
||||
p := l_request_uri.index_of ('?', 1)
|
||||
if p > 0 then
|
||||
l_path_info := l_request_uri.substring (1, p - 1)
|
||||
else
|
||||
l_path_info := l_request_uri.string
|
||||
end
|
||||
env.force (enc.decoded_utf_8_string (l_path_info), "PATH_INFO")
|
||||
env.force ("", "SCRIPT_NAME")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user