diff --git a/library/server/ewsgi/specification/request/wgi_request.e b/library/server/ewsgi/specification/request/wgi_request.e index 75b4d431..2250427c 100644 --- a/library/server/ewsgi/specification/request/wgi_request.e +++ b/library/server/ewsgi/specification/request/wgi_request.e @@ -96,6 +96,16 @@ feature -- Access: CGI meta variables deferred end + meta_string_variable (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32 + -- Environment variable related to `a_name' + require + a_name_valid: a_name /= Void and then not a_name.is_empty + do + if attached meta_variable (a_name) as val then + Result := val.as_string + end + end + meta_variables: ITERATION_CURSOR [WGI_VALUE] -- These variables are specific to requests made with HTTP. -- Interpretation of these variables may depend on the value of @@ -687,10 +697,10 @@ invariant query_string_attached: query_string /= Void remote_addr_attached: remote_addr /= Void - same_orig_path_info: orig_path_info ~ meta_variable ({WGI_META_NAMES}.orig_path_info) - same_path_info: path_info ~ meta_variable ({WGI_META_NAMES}.path_info) + same_orig_path_info: orig_path_info ~ meta_string_variable ({WGI_META_NAMES}.orig_path_info) + same_path_info: path_info ~ meta_string_variable ({WGI_META_NAMES}.path_info) - path_info_identical: path_info ~ meta_variable ({WGI_META_NAMES}.path_info) + path_info_identical: path_info ~ meta_string_variable ({WGI_META_NAMES}.path_info) note copyright: "2011-2011, Eiffel Software and others" diff --git a/library/server/ewsgi/src/request/wgi_request_from_table.e b/library/server/ewsgi/src/request/wgi_request_from_table.e index 7025183b..ec6fdb0d 100644 --- a/library/server/ewsgi/src/request/wgi_request_from_table.e +++ b/library/server/ewsgi/src/request/wgi_request_from_table.e @@ -185,14 +185,6 @@ feature -- Access: CGI meta parameters Result := meta_variables_table.item (a_name) end - meta_string_variable (a_name: READABLE_STRING_GENERAL): detachable READABLE_STRING_32 - -- CGI meta variable related to `a_name' - do - if attached meta_variables_table.item (a_name) as val then - Result := val.as_string - end - end - meta_string_variable_or_default (a_name: READABLE_STRING_GENERAL; a_default: READABLE_STRING_32; use_default_when_empty: BOOLEAN): READABLE_STRING_32 -- Value for meta parameter `a_name' -- If not found, return `a_default' @@ -325,8 +317,6 @@ feature -- Access: HTTP_* CGI meta parameters - 1.1 -- Contents of the Host: header from the current request, if there is one. do Result := meta_string_variable ({WGI_META_NAMES}.http_host) - ensure - Result /= Void end http_referer: detachable READABLE_STRING_32 diff --git a/library/server/request/rest/src/uri/rest_request_uri_routing_handler_i.e b/library/server/request/rest/src/uri/rest_request_uri_routing_handler_i.e index 86c23462..badbe29d 100644 --- a/library/server/request/rest/src/uri/rest_request_uri_routing_handler_i.e +++ b/library/server/request/rest/src/uri/rest_request_uri_routing_handler_i.e @@ -31,7 +31,7 @@ feature -- Execution execute (ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER) do - Precursor {REST_REQUEST_HANDLER} (ctx, req, res) + Precursor {REQUEST_URI_ROUTING_HANDLER_I} (ctx, req, res) end execute_application (ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER) diff --git a/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler_i.e b/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler_i.e index 3cece40b..4dea0a26 100644 --- a/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler_i.e +++ b/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler_i.e @@ -38,7 +38,7 @@ feature -- Execution execute (ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER) do - Precursor {REST_REQUEST_HANDLER} (ctx, req, res) + Precursor {REQUEST_URI_TEMPLATE_ROUTING_HANDLER_I} (ctx, req, res) end execute_application (ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER) diff --git a/library/server/request/router/src/request_handler_context.e b/library/server/request/router/src/request_handler_context.e index 1e4f0f4f..bfb16b39 100644 --- a/library/server/request/router/src/request_handler_context.e +++ b/library/server/request/router/src/request_handler_context.e @@ -98,6 +98,8 @@ feature -- Query end i := i + 1 end + else + Result := s end l_accept_lst.forth end