Fixed issue where Content-Type and Content-Length were translated into HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH instead of just
CONTENT_TYPE and CONTENT_LENGTH
This commit is contained in:
@@ -64,8 +64,16 @@ feature -- Request processing
|
|||||||
until
|
until
|
||||||
a_headers_map.after
|
a_headers_map.after
|
||||||
loop
|
loop
|
||||||
vn := "HTTP_" + a_headers_map.key_for_iteration.as_upper
|
create vn.make_from_string (a_headers_map.key_for_iteration.as_upper)
|
||||||
vn.replace_substring_all ("-", "_")
|
vn.replace_substring_all ("-", "_")
|
||||||
|
if
|
||||||
|
vn.starts_with ("CONTENT_") and then
|
||||||
|
(vn.same_string_general ({WGI_META_NAMES}.content_type) or vn.same_string_general ({WGI_META_NAMES}.content_length))
|
||||||
|
then
|
||||||
|
--| Keep this name
|
||||||
|
else
|
||||||
|
vn.prepend ("HTTP_")
|
||||||
|
end
|
||||||
add_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
|
||||||
@@ -90,6 +98,8 @@ feature -- Request processing
|
|||||||
l_server_name := l_host
|
l_server_name := l_host
|
||||||
l_server_port := "80" -- Default
|
l_server_port := "80" -- Default
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
check host_available: False end
|
||||||
end
|
end
|
||||||
|
|
||||||
if attached a_headers_map.item ("Authorization") as l_authorization then
|
if attached a_headers_map.item ("Authorization") as l_authorization then
|
||||||
|
|||||||
Reference in New Issue
Block a user