Fixed various issues related to unicode and CGI variables (assuming that CGI variables are utf-8 encoded, and sometime percent encoded).

Delayed computation of `value' and `name' from WSF_STRING.
Fixed computation of REQUEST_URI when the server does not provide it (this is rare, but possible).
   compute it as SERVER_NAME + encoded-PATH_INFO + {? + QUERY_STRING}
This commit is contained in:
2014-07-01 19:57:14 +02:00
parent 0b1697f20d
commit 7dfc6ea67a
3 changed files with 140 additions and 19 deletions

View File

@@ -70,6 +70,7 @@ feature -- Request processing
e: EXECUTION_ENVIRONMENT
enc: URL_ENCODER
utf: UTF_CONVERTER
do
l_request_uri := a_handler.uri
l_headers_map := a_handler.request_header_map
@@ -80,13 +81,13 @@ feature -- Request processing
across
vars as c
loop
env.force (enc.encoded_string (c.item), enc.encoded_string (c.key))
env.force (utf.utf_32_string_to_utf_8_string_8 (c.item), utf.utf_32_string_to_utf_8_string_8 (c.key))
end
else
create env.make (0)
end
--| for Any Abc-Def-Ghi add (or replace) the HTTP_ABC_DEF_GHI variable to `env'
--| for Any Abc-Def-Ghi add (or replace) the HTTP_ABC_DEF_GHI variable to `env'
from
l_headers_map.start
until