Prepare upcoming support for unicode environment variables
This commit is contained in:
@@ -61,7 +61,7 @@ feature -- Request processing
|
|||||||
process_request (a_handler: HTTP_CONNECTION_HANDLER; a_socket: TCP_STREAM_SOCKET)
|
process_request (a_handler: HTTP_CONNECTION_HANDLER; a_socket: TCP_STREAM_SOCKET)
|
||||||
-- Process request ...
|
-- Process request ...
|
||||||
local
|
local
|
||||||
env, vars: HASH_TABLE [STRING, STRING]
|
env: HASH_TABLE [STRING, STRING]
|
||||||
p: INTEGER
|
p: INTEGER
|
||||||
l_request_uri, l_script_name, l_query_string, l_path_info: STRING
|
l_request_uri, l_script_name, l_query_string, l_path_info: STRING
|
||||||
l_server_name, l_server_port: detachable STRING
|
l_server_name, l_server_port: detachable STRING
|
||||||
@@ -73,8 +73,16 @@ feature -- Request processing
|
|||||||
l_request_uri := a_handler.uri
|
l_request_uri := a_handler.uri
|
||||||
a_headers_map := a_handler.request_header_map
|
a_headers_map := a_handler.request_header_map
|
||||||
create e
|
create e
|
||||||
vars := e.starting_environment_variables
|
if attached e.starting_environment as vars then
|
||||||
env := vars.twin
|
create env.make (vars.count)
|
||||||
|
across
|
||||||
|
vars as c
|
||||||
|
loop
|
||||||
|
env.force (c.item.to_string_8, c.key.to_string_8)
|
||||||
|
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
|
from
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ create
|
|||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make (a_vars: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]; a_input: like input; a_wgi_connector: like wgi_connector)
|
make (a_vars: HASH_TABLE [READABLE_STRING_GENERAL, READABLE_STRING_GENERAL]; a_input: like input; a_wgi_connector: like wgi_connector)
|
||||||
require
|
require
|
||||||
vars_attached: a_vars /= Void
|
vars_attached: a_vars /= Void
|
||||||
do
|
do
|
||||||
@@ -244,7 +244,7 @@ feature -- Access: Extension to CGI meta parameters - 1.1
|
|||||||
|
|
||||||
feature {NONE} -- Element change: CGI meta parameter related to PATH_INFO
|
feature {NONE} -- Element change: CGI meta parameter related to PATH_INFO
|
||||||
|
|
||||||
set_meta_variables (a_vars: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
|
set_meta_variables (a_vars: HASH_TABLE [READABLE_STRING_GENERAL, READABLE_STRING_GENERAL])
|
||||||
-- Fill with variable from `a_vars'
|
-- Fill with variable from `a_vars'
|
||||||
local
|
local
|
||||||
s: like meta_string_variable
|
s: like meta_string_variable
|
||||||
@@ -264,7 +264,7 @@ feature {NONE} -- Element change: CGI meta parameter related to PATH_INFO
|
|||||||
until
|
until
|
||||||
a_vars.after
|
a_vars.after
|
||||||
loop
|
loop
|
||||||
table.force (a_vars.item_for_iteration, a_vars.key_for_iteration)
|
table.force (a_vars.item_for_iteration.to_string_8, a_vars.key_for_iteration.to_string_8)
|
||||||
a_vars.forth
|
a_vars.forth
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user