From 146b78e5b04672c89990645a7bb9f4a0fb400282 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 14 Apr 2017 12:49:34 +0200 Subject: [PATCH 1/2] Updated code regarding to string 32 vs string 8. --- .../wsf/policy_driven/wsf_method_helper.e | 24 ++++++++----------- .../server/wsf/router/wsf_router_mapping.e | 10 ++++++-- .../wsf/src/response/wsf_not_found_response.e | 10 ++++---- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/library/server/wsf/policy_driven/wsf_method_helper.e b/library/server/wsf/policy_driven/wsf_method_helper.e index d43ae000..c5269b06 100644 --- a/library/server/wsf/policy_driven/wsf_method_helper.e +++ b/library/server/wsf/policy_driven/wsf_method_helper.e @@ -108,13 +108,11 @@ feature -- Basic operations handle_precondition_failed (req, res) else if attached req.http_if_unmodified_since as l_if_unmodified_since then - if l_if_unmodified_since.is_valid_as_string_8 then - create l_date.make_from_string (l_if_unmodified_since.to_string_8) - if not l_date.has_error then - if a_handler.modified_since (req, l_date.date_time) then - handle_precondition_failed (req, res) - l_failed := True - end + create l_date.make_from_string (l_if_unmodified_since) + if not l_date.has_error then + if a_handler.modified_since (req, l_date.date_time) then + handle_precondition_failed (req, res) + l_failed := True end end end @@ -128,13 +126,11 @@ feature -- Basic operations handle_if_none_match_failed (req, res, a_handler) else if attached req.http_if_modified_since as l_if_modified_since then - if l_if_modified_since.is_valid_as_string_8 then - create l_date.make_from_string (l_if_modified_since.to_string_8) - if not l_date.has_error then - if not a_handler.modified_since (req, l_date.date_time) then - handle_not_modified (req, res, a_handler) - l_failed := True - end + create l_date.make_from_string (l_if_modified_since) + if not l_date.has_error then + if not a_handler.modified_since (req, l_date.date_time) then + handle_not_modified (req, res, a_handler) + l_failed := True end end end diff --git a/library/server/wsf/router/wsf_router_mapping.e b/library/server/wsf/router/wsf_router_mapping.e index 37ee0dbf..e3552a16 100644 --- a/library/server/wsf/router/wsf_router_mapping.e +++ b/library/server/wsf/router/wsf_router_mapping.e @@ -50,8 +50,14 @@ feature -- Status report debug_output: READABLE_STRING_GENERAL -- String that should be displayed in debugger to represent `Current'. + local + s: STRING_32 do - Result := description + {STRING_32} " : " + associated_resource.to_string_32 + create s.make_empty + s.append (description) + s.append_string_general (" : ") + s.append_string_general (associated_resource) + Result := s end feature -- Status @@ -78,7 +84,7 @@ feature -- Status end note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" + copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/src/response/wsf_not_found_response.e b/library/server/wsf/src/response/wsf_not_found_response.e index 3fdd37af..6bcba70c 100644 --- a/library/server/wsf/src/response/wsf_not_found_response.e +++ b/library/server/wsf/src/response/wsf_not_found_response.e @@ -76,7 +76,7 @@ feature {WSF_RESPONSE} -- Output if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then s := "" s.append ("") - s.append (html_encoder.encoded_string (request.request_uri.to_string_32)) + s.append (html_encoder.general_encoded_string (request.request_uri)) s.append ("Error 404 (Not Found)") s.append ("%N") s.append ("[ @@ -101,7 +101,7 @@ feature {WSF_RESPONSE} -- Output s.append ("
") s.append ("") s.append ("Error 404 (Not Found)") - s.append ("
Error 404 (Not Found): " + html_encoder.encoded_string (request.request_uri.to_string_32) + "
") + s.append ("
Error 404 (Not Found): " + html_encoder.general_encoded_string (request.request_uri) + "
") if attached suggested_items as lst and then not lst.is_empty then s.append ("
Perhaps you are looking for: