fixed remaining issue or useless code to set http environment variable

This commit is contained in:
Jocelyn Fiat
2011-12-01 18:41:51 +01:00
parent 8c79a64f0c
commit de38f46d1d

View File

@@ -92,7 +92,7 @@ feature -- Request processing
else else
vn.prepend ("HTTP_") vn.prepend ("HTTP_")
end end
set_environment_variable (a_headers_map.item_for_iteration, vn, env) add_environment_variable (a_headers_map.item_for_iteration, vn, env)
a_headers_map.forth a_headers_map.forth
end end
@@ -107,7 +107,8 @@ feature -- Request processing
l_query_string := "" l_query_string := ""
end end
if attached a_headers_map.item ("Host") as l_host then if attached a_headers_map.item ("Host") as l_host then
set_environment_variable (l_host, "HTTP_HOST", env) check has_host: env.has ("HTTP_HOST") end
-- set_environment_variable (l_host, "HTTP_HOST", env)
p := l_host.index_of (':', 1) p := l_host.index_of (':', 1)
if p > 0 then if p > 0 then
l_server_name := l_host.substring (1, p - 1) l_server_name := l_host.substring (1, p - 1)
@@ -121,7 +122,8 @@ feature -- Request processing
end end
if attached a_headers_map.item ("Authorization") as l_authorization then if attached a_headers_map.item ("Authorization") as l_authorization then
set_environment_variable (l_authorization, "HTTP_AUTHORIZATION", env) check has_authorization: env.has ("HTTP_AUTHORIZATION") end
-- set_environment_variable (l_authorization, "HTTP_AUTHORIZATION", env)
p := l_authorization.index_of (' ', 1) p := l_authorization.index_of (' ', 1)
if p > 0 then if p > 0 then
set_environment_variable (l_authorization.substring (1, p - 1), "AUTH_TYPE", env) set_environment_variable (l_authorization.substring (1, p - 1), "AUTH_TYPE", env)