diff --git a/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_router.e b/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_router.e index ede039c3..0929a870 100644 --- a/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_router.e +++ b/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_router.e @@ -14,7 +14,8 @@ inherit end create - make + make, + make_with_base_url feature -- Mapping @@ -28,7 +29,7 @@ feature -- Mapping end note - copyright: "Copyright (c) 1984-2011, Eiffel Software and others" + copyright: "Copyright (c) 1984-2012, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler.e b/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler.e index f89361ab..4888c271 100644 --- a/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler.e +++ b/draft/library/server/request/rest/src/uri_template/rest_request_uri_template_routing_handler.e @@ -14,14 +14,15 @@ inherit end create - make + make, + make_with_base_url feature {NONE} -- Routing router: REST_REQUEST_URI_TEMPLATE_ROUTER ;note - copyright: "Copyright (c) 1984-2011, Eiffel Software and others" + copyright: "Copyright (c) 1984-2012, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/draft/library/server/request/rest/tests/src/app/app_account_verify_credential.e b/draft/library/server/request/rest/tests/src/app/app_account_verify_credential.e index 3314c6e5..59448bee 100644 --- a/draft/library/server/request/rest/tests/src/app/app_account_verify_credential.e +++ b/draft/library/server/request/rest/tests/src/app/app_account_verify_credential.e @@ -62,7 +62,7 @@ feature -- Execution l_format_id: INTEGER do content_type_supported := <<{HTTP_CONSTANTS}.application_json, {HTTP_CONSTANTS}.text_xml, {HTTP_CONSTANTS}.text_plain>> - l_format_id := ctx.request_format_id ("format", content_type_supported) + l_format_id := ctx.request_accepted_format_id ("format", content_type_supported) if authenticated (ctx) then l_full := attached ctx.query_parameter ("details") as v and then v.is_case_insensitive_equal ("true") if attached authenticated_identifier (ctx) as log then diff --git a/draft/library/server/request/rest/tests/src/app/app_test.e b/draft/library/server/request/rest/tests/src/app/app_test.e index 265793f0..75990573 100644 --- a/draft/library/server/request/rest/tests/src/app/app_test.e +++ b/draft/library/server/request/rest/tests/src/app/app_test.e @@ -55,7 +55,7 @@ feature -- Execution -- ctx.request_format_id ("format", Void) - if attached ctx.request_format ("format", Void) as l_format then + if attached ctx.request_accepted_format ("format", Void) as l_format then s.append_string (" format=" + l_format + "%N") end diff --git a/draft/library/server/request/rest/tests/src/handler/app_request_handler_context.e b/draft/library/server/request/rest/tests/src/handler/app_request_handler_context.e index 45ae824f..d8a19d11 100644 --- a/draft/library/server/request/rest/tests/src/handler/app_request_handler_context.e +++ b/draft/library/server/request/rest/tests/src/handler/app_request_handler_context.e @@ -13,48 +13,7 @@ inherit create make - -feature -- Format - - get_format_id (a_format_variable_name: detachable READABLE_STRING_8; a_content_type_supported: detachable ARRAY [STRING_8]) - do - if internal_format_id = 0 then - internal_format_id := request_format_id (a_format_variable_name, a_content_type_supported) - end - end - - get_format_name (a_format_variable_name: detachable READABLE_STRING_8; a_content_type_supported: detachable ARRAY [STRING_8]) - do - if internal_format_name = Void then - internal_format_name := request_format (a_format_variable_name, a_content_type_supported) - end - end - - format_id: INTEGER - do - if internal_format_id = 0 then - get_format_id (Void, Void) - end - Result := internal_format_id - end - - format_name: detachable READABLE_STRING_8 - do - Result := internal_format_name - if Result = Void then - Result := request_format (Void, Void) - internal_format_name := Result - end - end - -feature {NONE} -- Internal - - internal_format_id: like format_id - - internal_format_name: like format_name - - -;note +note copyright: "Copyright (c) 1984-2011, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ diff --git a/draft/library/server/request/rest/tests/src/handler/app_request_helper.e b/draft/library/server/request/rest/tests/src/handler/app_request_helper.e index f4d2ed7f..294fc910 100644 --- a/draft/library/server/request/rest/tests/src/handler/app_request_helper.e +++ b/draft/library/server/request/rest/tests/src/handler/app_request_helper.e @@ -20,7 +20,7 @@ feature -- Helpers rep_data.headers.put_content_type_text_plain create s.make_empty - inspect ctx.format_id + inspect ctx.accepted_format_id when {HTTP_FORMAT_CONSTANTS}.json then rep_data.headers.put_content_type_text_plain s := "{%"application%": %"" + a_path + "%"" diff --git a/draft/library/server/request/rest/tests/src/handler/app_request_router.e b/draft/library/server/request/rest/tests/src/handler/app_request_router.e index 35c9093f..4caaacbe 100644 --- a/draft/library/server/request/rest/tests/src/handler/app_request_router.e +++ b/draft/library/server/request/rest/tests/src/handler/app_request_router.e @@ -11,7 +11,8 @@ inherit REST_REQUEST_URI_TEMPLATE_ROUTER_I [APP_REQUEST_HANDLER, APP_REQUEST_HANDLER_CONTEXT] create - make + make, + make_with_base_url note copyright: "Copyright (c) 1984-2011, Eiffel Software and others"