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:
2014-06-30 15:13:47 +02:00
parent 942896aa0c
commit 425c976032
11 changed files with 860 additions and 144 deletions

View File

@@ -208,8 +208,15 @@ feature {NONE} -- Implementation: character encoding
feature -- Percent decoding
percent_decoded_string (v: READABLE_STRING_GENERAL): STRING_32
-- Return the percent decoded string equivalent to the percent-encoded string `v'
--| Note that is `a_result' is a STRING_8, any Unicode character will be kept as UTF-8
-- Return the percent decoded unicode string equivalent to the percent-encoded string `v'
do
create Result.make (v.count)
append_percent_decoded_string_to (v, Result)
end
percent_decoded_utf_8_string (v: READABLE_STRING_GENERAL): STRING_8
-- Return the percent decoded UTF-8 string equivalent to the percent-encoded string `v'
--| Note that any Unicode character will be kept as UTF-8
do
create Result.make (v.count)
append_percent_decoded_string_to (v, Result)

View File

@@ -23,7 +23,8 @@ inherit
PERCENT_ENCODER
rename
percent_encoded_string as general_encoded_string,
percent_decoded_string as general_decoded_string
percent_decoded_string as general_decoded_string,
percent_decoded_utf_8_string as general_decoded_utf_8_string
end
feature -- Access
@@ -49,6 +50,12 @@ feature -- Decoder
Result := general_decoded_string (v)
end
decoded_utf_8_string (v: READABLE_STRING_8): STRING_8
-- The URL-encoded equivalent of the given string
do
Result := general_decoded_utf_8_string (v)
end
note
copyright: "Copyright (c) 2011-2014, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"