From d9ba97d33bf601721ac03d47e5770907c38b324c Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 21 Sep 2011 15:33:40 +0200 Subject: [PATCH] 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 --- .../ewsgi/connectors/nino/src/ewf_nino_handler.e | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library/server/ewsgi/connectors/nino/src/ewf_nino_handler.e b/library/server/ewsgi/connectors/nino/src/ewf_nino_handler.e index 909611ac..d6ac6d0d 100644 --- a/library/server/ewsgi/connectors/nino/src/ewf_nino_handler.e +++ b/library/server/ewsgi/connectors/nino/src/ewf_nino_handler.e @@ -64,8 +64,16 @@ feature -- Request processing until a_headers_map.after 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 ("-", "_") + 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) a_headers_map.forth end @@ -90,6 +98,8 @@ feature -- Request processing l_server_name := l_host l_server_port := "80" -- Default end + else + check host_available: False end end if attached a_headers_map.item ("Authorization") as l_authorization then