")
s.append ("")
s.append ("%N")
s.append ("%N")
diff --git a/library/server/wsf/policy_driven/wsf_skeleton_handler.e b/library/server/wsf/policy_driven/wsf_skeleton_handler.e
index 07993264..d596116f 100644
--- a/library/server/wsf/policy_driven/wsf_skeleton_handler.e
+++ b/library/server/wsf/policy_driven/wsf_skeleton_handler.e
@@ -158,7 +158,7 @@ feature -- Access
deferred
end
- matching_etag (req: WSF_REQUEST; a_etag: READABLE_STRING_32; a_strong: BOOLEAN): BOOLEAN
+ matching_etag (req: WSF_REQUEST; a_etag: READABLE_STRING_GENERAL; a_strong: BOOLEAN): BOOLEAN
-- Is `a_etag' a match for resource requested in `req'?
-- If `a_strong' then the strong comparison function must be used.
require
diff --git a/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e b/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e
index 6f888d61..8ee3882e 100644
--- a/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e
+++ b/library/server/wsf/router/documentation/wsf_router_self_documentation_message.e
@@ -147,7 +147,10 @@ feature {WSF_RESPONSE} -- Output
l_description.append ("")
end
- if doc_url_supported and then attached {WSF_STRING} request.query_parameter ("api") as l_api then
+ if
+ doc_url_supported and then attached {WSF_STRING} request.query_parameter ("api") as l_api and then
+ l_api.value.is_valid_as_string_8
+ then
l_api_resource := l_api.value.to_string_8
if l_api_resource.is_empty then
l_api_resource := Void
diff --git a/library/server/wsf/router/wsf_file_system_handler.e b/library/server/wsf/router/wsf_file_system_handler.e
index 970a73c2..e8d1acb8 100644
--- a/library/server/wsf/router/wsf_file_system_handler.e
+++ b/library/server/wsf/router/wsf_file_system_handler.e
@@ -187,9 +187,9 @@ feature -- Execution
execute (a_start_path: READABLE_STRING_8; req: WSF_REQUEST; res: WSF_RESPONSE)
local
- p: STRING_32
+ p: STRING_8
do
- create p.make_from_string (req.path_info)
+ create p.make_from_string (req.percent_encoded_path_info)
if p.starts_with_general (a_start_path) then
p.remove_head (a_start_path.count)
else
@@ -203,7 +203,7 @@ feature -- Execution
execute (a_start_path, req, res)
end
- process_uri (uri: READABLE_STRING_32; req: WSF_REQUEST; res: WSF_RESPONSE)
+ process_uri (uri: READABLE_STRING_8; req: WSF_REQUEST; res: WSF_RESPONSE)
local
f: RAW_FILE
fn: like resource_filename
@@ -214,7 +214,7 @@ feature -- Execution
if f.is_readable then
if f.is_directory then
if index_disabled then
- process_directory_index_disabled (uri.to_string_8, req, res)
+ process_directory_index_disabled (uri, req, res)
else
process_index (req.request_uri, fn, req, res)
end
@@ -222,10 +222,10 @@ feature -- Execution
process_file (f, req, res)
end
else
- process_access_denied (uri.to_string_8, req, res)
+ process_access_denied (uri, req, res)
end
else
- process_not_found (uri.to_string_8, req, res)
+ process_not_found (uri, req, res)
end
end
@@ -344,7 +344,7 @@ feature -- Execution
do
if
attached req.meta_string_variable ("HTTP_IF_MODIFIED_SINCE") as s_if_modified_since and then
- attached http_date_format_to_date (s_if_modified_since.to_string_8) as l_if_modified_since_date and then
+ attached http_date_format_to_date (s_if_modified_since) as l_if_modified_since_date and then
attached file_date (f) as f_date and then
f_date <= l_if_modified_since_date
then
@@ -497,7 +497,7 @@ feature {NONE} -- Implementation
end
end
- resource_filename (uri: READABLE_STRING_32): PATH
+ resource_filename (uri: READABLE_STRING_GENERAL): PATH
local
s: like uri_path_to_filename
do
@@ -544,7 +544,7 @@ feature {NONE} -- Implementation
end
end
- uri_path_to_filename (fn: READABLE_STRING_32): STRING_32
+ uri_path_to_filename (fn: READABLE_STRING_GENERAL): STRING_32
-- Real filename from url-path `fn'
--| Find a better design for this piece of code
--| Eventually in a spec/$ISE_PLATFORM/ specific cluster
@@ -552,7 +552,7 @@ feature {NONE} -- Implementation
n: INTEGER
do
n := fn.count
- create Result.make_from_string (fn)
+ create Result.make_from_string_general (fn)
if n > 0 and then Result.item (Result.count) = {CHARACTER_32} '/' then
Result.remove_tail (1)
n := n - 1
@@ -595,7 +595,7 @@ feature {NONE} -- implementation: date time
Result := timestamp_to_date (f.date)
end
- http_date_format_to_date (s: READABLE_STRING_8): detachable DATE_TIME
+ http_date_format_to_date (s: READABLE_STRING_GENERAL): detachable DATE_TIME
-- String representation of `dt' using the RFC 1123
-- HTTP-date = rfc1123-date | rfc850-date | asctime-date
-- rfc1123-date = wkday "," SP date1 SP time SP "GMT"
diff --git a/library/server/wsf/router/wsf_router_item.e b/library/server/wsf/router/wsf_router_item.e
index 7d436f76..81f95f10 100644
--- a/library/server/wsf/router/wsf_router_item.e
+++ b/library/server/wsf/router/wsf_router_item.e
@@ -45,7 +45,7 @@ feature -- Status report
across
mtds as c
loop
- s.append_string (c.item.to_string_32)
+ s.append_string_general (c.item)
s.append_string (" ")
end
s.append_string ("]")
diff --git a/library/server/wsf/session/wsf_cookie_session.e b/library/server/wsf/session/wsf_cookie_session.e
index 53340312..0bc31645 100644
--- a/library/server/wsf/session/wsf_cookie_session.e
+++ b/library/server/wsf/session/wsf_cookie_session.e
@@ -32,7 +32,11 @@ feature {NONE} -- Initialization
elseif attached {WSF_STRING} req.query_parameter (cookie_name) as q_uuid then
l_uuid := q_uuid.value
end
- if l_uuid /= Void and then session_exists (l_uuid.to_string_8) then
+ if
+ l_uuid /= Void and then
+ l_uuid.is_valid_as_string_8 and then
+ session_exists (l_uuid)
+ then
uuid := l_uuid.to_string_8
load
else
@@ -128,7 +132,7 @@ feature {NONE} -- Storage
manager: WSF_SESSION_MANAGER
- session_exists (a_uuid: like uuid): BOOLEAN
+ session_exists (a_uuid: READABLE_STRING_GENERAL): BOOLEAN
do
Result := manager.session_exists (a_uuid)
end
diff --git a/library/server/wsf/session/wsf_fs_session_manager.e b/library/server/wsf/session/wsf_fs_session_manager.e
index 88eb66e3..ff39b1b3 100644
--- a/library/server/wsf/session/wsf_fs_session_manager.e
+++ b/library/server/wsf/session/wsf_fs_session_manager.e
@@ -30,7 +30,7 @@ feature {NONE} -- Initialization
feature -- Access
- session_exists (a_session_uuid: READABLE_STRING_8): BOOLEAN
+ session_exists (a_session_uuid: READABLE_STRING_GENERAL): BOOLEAN
local
f: RAW_FILE
do
@@ -38,7 +38,7 @@ feature -- Access
Result := f.exists and then f.is_readable
end
- session_data (a_session_uuid: READABLE_STRING_8): detachable WSF_SESSION_DATA
+ session_data (a_session_uuid: READABLE_STRING_GENERAL): detachable WSF_SESSION_DATA
local
f: RAW_FILE
do
@@ -153,7 +153,7 @@ feature {NONE} -- Implementation
end
note
- copyright: "2011-2014, 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/session/wsf_session_manager.e b/library/server/wsf/session/wsf_session_manager.e
index de23ba7e..86b02936 100644
--- a/library/server/wsf/session/wsf_session_manager.e
+++ b/library/server/wsf/session/wsf_session_manager.e
@@ -9,11 +9,11 @@ deferred class
feature -- Access
- session_exists (a_uuid: READABLE_STRING_8): BOOLEAN
+ session_exists (a_uuid: READABLE_STRING_GENERAL): BOOLEAN
deferred
end
- session_data (a_uuid: READABLE_STRING_8): detachable WSF_SESSION_DATA
+ session_data (a_uuid: READABLE_STRING_GENERAL): detachable WSF_SESSION_DATA
deferred
end
@@ -28,7 +28,7 @@ feature -- Persistence
end
note
- copyright: "2011-2014, 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/request/value/wsf_any.e b/library/server/wsf/src/request/value/wsf_any.e
index c96bce39..3064dbfc 100644
--- a/library/server/wsf/src/request/value/wsf_any.e
+++ b/library/server/wsf/src/request/value/wsf_any.e
@@ -52,14 +52,14 @@ feature -- Status report
feature -- Query
- string_representation: STRING_32
+ string_representation: READABLE_STRING_32
-- String representation of Current
-- if possible
do
if attached value as v then
- Result := v.generating_type.name_32
+ Result := generating_type.name_32
else
- Result := "Void"
+ Result := {STRING_32} "Void"
end
end
diff --git a/library/server/wsf/src/request/value/wsf_string.e b/library/server/wsf/src/request/value/wsf_string.e
index 898fcc56..a8b75a5a 100644
--- a/library/server/wsf/src/request/value/wsf_string.e
+++ b/library/server/wsf/src/request/value/wsf_string.e
@@ -126,17 +126,10 @@ feature -- Helper
Result := value.same_string_general (a_other)
end
- is_case_insensitive_equal (a_other: READABLE_STRING_8): BOOLEAN
+ is_case_insensitive_equal (a_other: READABLE_STRING_GENERAL): BOOLEAN
-- Does `a_other' represent the same case insensitive string as `Current'?
- local
- v: like value
do
- v := value
- if v = a_other.to_string_32 then
- Result := True
- elseif v.is_valid_as_string_8 then
- Result := v.is_case_insensitive_equal (a_other.to_string_32)
- end
+ Result := value.is_case_insensitive_equal_general (a_other)
end
feature -- Conversion
diff --git a/library/server/wsf/src/request/value/wsf_table.e b/library/server/wsf/src/request/value/wsf_table.e
index 6941a135..cacb3aa5 100644
--- a/library/server/wsf/src/request/value/wsf_table.e
+++ b/library/server/wsf/src/request/value/wsf_table.e
@@ -130,7 +130,7 @@ feature -- Conversion
end
as_array_of_string: detachable ARRAY [READABLE_STRING_32]
- -- Return an array of STRING if possible., otherwise Void
+ -- Return an array of STRING if possible, otherwise Void.
local
i,n: INTEGER
nb: INTEGER
@@ -145,6 +145,10 @@ feature -- Conversion
if attached {WSF_STRING} value (i.out) as s then
Result.put (s.value, i)
nb := nb + 1
+ elseif attached {WSF_STRING} value (name + "[" + i.out + "]") as s then
+ -- FIXME !!
+ Result.put (s.value, i)
+ nb := nb + 1
else
Result := Void
end
diff --git a/library/server/wsf/src/request/value/wsf_uploaded_file.e b/library/server/wsf/src/request/value/wsf_uploaded_file.e
index d58f53c4..6fefb676 100644
--- a/library/server/wsf/src/request/value/wsf_uploaded_file.e
+++ b/library/server/wsf/src/request/value/wsf_uploaded_file.e
@@ -94,7 +94,7 @@ feature -- Status report
feature -- Conversion
- string_representation: STRING_32
+ string_representation: READABLE_STRING_32
do
Result := filename
end
@@ -250,7 +250,7 @@ feature -- Element change
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/request/wsf_value.e b/library/server/wsf/src/request/wsf_value.e
index 4e05c5ac..1d73be91 100644
--- a/library/server/wsf/src/request/wsf_value.e
+++ b/library/server/wsf/src/request/wsf_value.e
@@ -70,7 +70,7 @@ feature -- Query
end
end
- string_representation: STRING_32
+ string_representation: READABLE_STRING_32
-- String representation of Current
-- if possible
-- note: unicode value.
@@ -89,7 +89,7 @@ feature -- Helper
result_true_only_for_string: Result implies is_string
end
- is_case_insensitive_equal (a_other: READABLE_STRING_8): BOOLEAN
+ is_case_insensitive_equal (a_other: READABLE_STRING_GENERAL): BOOLEAN
-- Does `a_other' represent the same case insensitive string as `Current'?
do
if is_string then
@@ -130,7 +130,7 @@ feature -- Visitor
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_default_router_response.e b/library/server/wsf/src/response/wsf_default_router_response.e
index 78f47386..408c7dc7 100644
--- a/library/server/wsf/src/response/wsf_default_router_response.e
+++ b/library/server/wsf/src/response/wsf_default_router_response.e
@@ -125,13 +125,13 @@ feature {NONE} -- Implementation
l_is_hidden := l_doc_mapping.documentation (i.request_methods).is_hidden
end
if not l_is_hidden then
- create s.make_from_string (i.mapping.associated_resource.to_string_32)
+ create s.make_from_string_general (i.mapping.associated_resource)
if attached i.request_methods as mtds then
s.append (" [ ")
across
mtds as mtds_c
loop
- s.append (mtds_c.item.to_string_32)
+ s.append_string_general (mtds_c.item)
s.append_character (' ')
end
s.append ("]")
@@ -169,7 +169,7 @@ feature {NONE} -- Implementation
end
if not l_is_hidden then
ok := True
- create s.make_from_string (i.mapping.associated_resource.to_string_32)
+ create s.make_from_string_general (i.mapping.associated_resource)
if attached i.request_methods as mtds then
ok := False
s.append (" [ ")
@@ -179,7 +179,7 @@ feature {NONE} -- Implementation
if m = Void or else m.is_case_insensitive_equal (c.item) then
ok := True
end
- s.append (c.item.to_string_32)
+ s.append_string_general (c.item)
s.append_character (' ')
end
s.append ("]")
diff --git a/library/server/wsf/src/response/wsf_method_not_allowed_response.e b/library/server/wsf/src/response/wsf_method_not_allowed_response.e
index d4880dde..fae89da2 100644
--- a/library/server/wsf/src/response/wsf_method_not_allowed_response.e
+++ b/library/server/wsf/src/response/wsf_method_not_allowed_response.e
@@ -130,7 +130,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 (l_html_error_code_text + "!!")
s.append ("%N")
s.append (
@@ -160,7 +160,7 @@ feature {WSF_RESPONSE} -- Output
s.append (l_html_error_code_text + "")
s.append ("
" + l_html_error_code_text + ": the request method ")
s.append (request.request_method)
- s.append (" is inappropriate for the URL for " + html_encoder.encoded_string (request.request_uri.to_string_32) + ".
")
+ s.append (" is inappropriate for the URL for " + html_encoder.general_encoded_string (request.request_uri) + ".")
if attached suggested_methods as lst and then not lst.is_empty then
s.append ("
Allowed methods:")
across
@@ -186,17 +186,17 @@ feature {WSF_RESPONSE} -- Output
l_text := l_loc
end
s.append ("
")
s.append (b)
diff --git a/library/server/wsf/src/wsf_request.e b/library/server/wsf/src/wsf_request.e
index 23acac43..375b9974 100644
--- a/library/server/wsf/src/wsf_request.e
+++ b/library/server/wsf/src/wsf_request.e
@@ -346,7 +346,7 @@ feature -- Helper
is_request_method (m: READABLE_STRING_GENERAL): BOOLEAN
-- Is `m' the Current request_method?
do
- Result := request_method.is_case_insensitive_equal (m.as_string_8)
+ Result := m.is_case_insensitive_equal (request_method)
end
is_put_request_method: BOOLEAN
@@ -691,7 +691,7 @@ feature -- Access: CGI Meta variables
do
meta_variables_table.force (new_string_value (a_name, a_value), a_name)
ensure
- param_set: attached {WSF_STRING} meta_variable (a_name) as val and then val.url_encoded_value.same_string (a_value.to_string_8)
+ param_set: attached {WSF_STRING} meta_variable (a_name) as val and then a_value.same_string_general (val.url_encoded_value)
end
unset_meta_variable (a_name: READABLE_STRING_GENERAL)
diff --git a/library/server/wsf_html/form/select/wsf_form_select.e b/library/server/wsf_html/form/select/wsf_form_select.e
index 335cb8a0..1367b60d 100644
--- a/library/server/wsf_html/form/select/wsf_form_select.e
+++ b/library/server/wsf_html/form/select/wsf_form_select.e
@@ -38,11 +38,11 @@ feature -- Element change
v: READABLE_STRING_8
do
if a_text /= Void then
- v := html_encoded_string (a_text.to_string_32)
+ v := html_encoded_string (a_text)
across
options as o
loop
- if o.item.is_same_value (v.to_string_32) then
+ if o.item.is_same_value (v) then
l_found := True
o.item.set_is_selected (True)
else
@@ -50,7 +50,7 @@ feature -- Element change
end
end
if not l_found then
- create opt.make (v.to_string_32, Void)
+ create opt.make (v, Void)
opt.set_is_selected (True)
add_option (opt)
end
@@ -69,7 +69,7 @@ feature -- Element change
v: READABLE_STRING_8
do
if a_text /= Void then
- v := html_encoded_string (a_text.to_string_32)
+ v := html_encoded_string (a_text)
across
options as o
loop
diff --git a/library/server/wsf_html/form/select/wsf_form_select_option.e b/library/server/wsf_html/form/select/wsf_form_select_option.e
index 215659e2..80935661 100644
--- a/library/server/wsf_html/form/select/wsf_form_select_option.e
+++ b/library/server/wsf_html/form/select/wsf_form_select_option.e
@@ -10,17 +10,19 @@ class
inherit
WSF_FORM_SELECTABLE_ITEM
+ SHARED_HTML_ENCODER
+
create
make
feature {NONE} -- Initialization
- make (a_value: like value; a_text: detachable like text)
+ make (a_value: READABLE_STRING_GENERAL; a_text: detachable like text)
-- Initialize `Current'.
do
- value := a_value
+ value := a_value.as_string_32
if a_text = Void then
- text := a_value.to_string_8
+ text := html_encoder.general_encoded_string (a_value)
else
text := a_text
end
@@ -30,9 +32,9 @@ feature -- Status
is_selected: BOOLEAN
- is_same_value (v: READABLE_STRING_32): BOOLEAN
+ is_same_value (v: READABLE_STRING_GENERAL): BOOLEAN
do
- Result := value.same_string (v)
+ Result := value.same_string_general (v)
end
is_same_text (v: like text): BOOLEAN
diff --git a/library/server/wsf_html/form/select/wsf_form_selectable_item.e b/library/server/wsf_html/form/select/wsf_form_selectable_item.e
index 6788125a..8bc1f906 100644
--- a/library/server/wsf_html/form/select/wsf_form_selectable_item.e
+++ b/library/server/wsf_html/form/select/wsf_form_selectable_item.e
@@ -12,7 +12,7 @@ feature -- Status report
deferred
end
- is_same_value (v: READABLE_STRING_32): BOOLEAN
+ is_same_value (v: READABLE_STRING_GENERAL): BOOLEAN
deferred
end
diff --git a/library/server/wsf_html/form/wsf_form_utility.e b/library/server/wsf_html/form/wsf_form_utility.e
index 58d0531e..2fc7d8a7 100644
--- a/library/server/wsf_html/form/wsf_form_utility.e
+++ b/library/server/wsf_html/form/wsf_form_utility.e
@@ -9,9 +9,9 @@ class
feature -- Converter
- html_encoded_string (s: READABLE_STRING_32): READABLE_STRING_8
+ html_encoded_string (s: READABLE_STRING_GENERAL): READABLE_STRING_8
do
- Result := html_encoder.encoded_string (s)
+ Result := html_encoder.general_encoded_string (s)
end
html_encoder: HTML_ENCODER
diff --git a/library/server/wsf_html/form/wsf_form_with_alternative_actions.e b/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
index 1f1a3172..e43f9d7d 100644
--- a/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
+++ b/library/server/wsf_html/form/wsf_form_with_alternative_actions.e
@@ -16,27 +16,27 @@ feature -- Access
-- indicate that the form shouldn’t be validated when submitted.
-- it's only applicable to input type=submit or image.
- formaction: detachable READABLE_STRING_32
+ formaction: detachable READABLE_STRING_8
-- formaction specifies the file or application that will submit the form.
-- It has the same effect as the action attribute on the form element and
-- can only be used with a submit or image button (type="submit" or type="image").
-- When the form is submitted, the browser first checks for a formaction attribute;
-- if that isn’t present, it proceeds to look for an action attribute on the form.
- formenctype: detachable READABLE_STRING_32
+ formenctype: detachable READABLE_STRING_8
-- formenctype details how the form data is encoded with the POST method type.
-- It has the same effect as the enctype attribute on the form element and
-- can only be used with a submit or image button (type="submit" or type="image").
-- The default value if not included is application/x-www-formurlencoded.
--! At the moment the value is not validated.
- formmethod: detachable READABLE_STRING_32
+ formmethod: detachable READABLE_STRING_8
-- formmethod specifies which HTTP method (GET, POST, PUT, DELETE) will be used to submit the form data.
-- It has the same effect as the method attribute on the form element and can only be used with a
-- submit or image button (type="submit" or type="image").
--!At the moment the value is not validated.
- formtarget: detachable READABLE_STRING_32
+ formtarget: detachable READABLE_STRING_8
-- formtarget specifies the target window for the form results.
-- It has the same effect as the target attribute on the form element and can only be used with a submit or image button (type="submit" or type="image").
@@ -60,39 +60,47 @@ feature -- Element Change
formnovalidate_false: not formnovalidate
end
- set_formaction (a_action: READABLE_STRING_32)
+ set_formaction (a_action: READABLE_STRING_GENERAL)
-- Set `formaction' with `a_action'.
-- Example:
+ require
+ is_valid_as_string_8: a_action.is_valid_as_string_8
do
- formaction := a_action
+ formaction := a_action.to_string_8
ensure
formaction_set: attached formaction as l_action implies l_action = a_action
end
- set_formenctype (a_enctype: READABLE_STRING_32)
+ set_formenctype (a_enctype: READABLE_STRING_GENERAL)
-- Set `formenctype' with `a_enctype'.
-- Example:
+ require
+ is_valid_as_string_8: a_enctype.is_valid_as_string_8
do
- formenctype := a_enctype
+ formenctype := a_enctype.to_string_8
ensure
formenctype_set: attached formenctype as l_enctype implies l_enctype = a_enctype
end
- set_formmethod (a_method: READABLE_STRING_32)
+ set_formmethod (a_method: READABLE_STRING_GENERAL)
-- Set `formmethod' with `a_method'.
-- Example:
--! require is_valid_method: [PUT, POST, DELETE, GET, ...]
+ require
+ is_valid_as_string_8: a_method.is_valid_as_string_8
do
- formmethod := a_method
+ formmethod := a_method.to_string_8
ensure
formmethod_set: attached formmethod as l_method implies l_method = a_method
end
- set_formtarget (a_target: READABLE_STRING_32)
+ set_formtarget (a_target: READABLE_STRING_GENERAL)
-- Set `formtarget' with `a_target'.
-- Example:
+ require
+ is_valid_as_string_8: a_target.is_valid_as_string_8
do
- formtarget := a_target
+ formtarget := a_target.to_string_8
ensure
formtarget_set: attached formtarget as l_target implies l_target = a_target
end
@@ -110,26 +118,26 @@ feature {NONE} -- Conversion
--formaction
if attached formaction as l_formaction then
a_target.append (" formaction=%"")
- a_target.append (l_formaction.to_string_8)
+ a_target.append (l_formaction)
a_target.append_character ('%"')
end
--formenctype
if attached formenctype as l_enctype then
a_target.append (" formenctype=%"")
- a_target.append (l_enctype.to_string_8)
+ a_target.append (l_enctype)
a_target.append_character ('%"')
end
-- formmethod
if attached formmethod as l_method then
a_target.append (" formmethod=%"")
- a_target.append (l_method.to_string_8)
+ a_target.append (l_method)
a_target.append_character ('%"')
end
-- formmethod
if attached formtarget as l_target then
a_target.append (" formtarget=%"")
- a_target.append (l_target.to_string_8)
+ a_target.append (l_target)
a_target.append_character ('%"')
end
end
diff --git a/tests/run_CI_tests.py b/tests/run_CI_tests.py
index 363b6dd1..d1608fe1 100644
--- a/tests/run_CI_tests.py
+++ b/tests/run_CI_tests.py
@@ -34,21 +34,21 @@ def set_last_run_CI_tests_failed(m):
f.close()
def report_failure(msg, a_code=2):
- print msg
+ print (msg)
set_last_run_CI_tests_failed(msg)
sys.exit(a_code)
# Override system command.
# run command. if not successful, complain and exit with error
def eval_cmd(cmd):
- # print cmd
+ # print (cmd)
res = subprocess.call (cmd, shell=True)
if res != 0:
report_failure ("Failed running: %s (returncode=%s)" % (cmd, res), 2)
return res
def eval_cmd_output(cmd, ignore_error=False):
- # print cmd
+ # print (cmd)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if p:
o = p.communicate()[0]
@@ -80,17 +80,17 @@ def runTestForProject(where):
# clobber = (len(sys.argv) >= 2 and sys.argv[1] == "-clobber") or (last_build_had_failure())
if clobber:
reset_last_run_CI_tests_failed()
- print "## Cleaning previous tests"
+ print ("## Cleaning previous tests")
rm_dir("EIFGENs")
# compile the restbucks
- print "# Compiling restbucks example"
- cmd = "ecb -config %s -target restbucks -batch -c_compile -project_path . " % (os.path.join ("examples", "restbucksCRUD", "restbucks-safe.ecf"))
+ print ("# Compiling restbucks example")
+ cmd = "ecb -config %s -target restbucks -batch -c_compile -project_path . " % (os.path.join ("examples", "rest", "restbucks_CRUD", "restbucks.ecf"))
res = eval_cmd(cmd)
sleep(1)
- print "# check compile_all tests"
+ print ("# check compile_all tests")
if not os.path.exists(os.path.join ("tests", "temp")):
os.makedirs (os.path.join ("tests", "temp"))
@@ -102,12 +102,12 @@ def runTestForProject(where):
cmd = "%s -keep passed" % (cmd) # forget about failed one .. we'll try again next time
if clobber:
cmd = "%s -clean" % (cmd)
- print "command: %s" % (cmd)
+ print ("command: %s" % (cmd))
(res, res_output) = eval_cmd_output(cmd)
if res != 0:
report_failure("compile_all failed", 2)
- print "# Analyze check_compilations results"
+ print ("# Analyze check_compilations results")
lines = re.split ("\n", res_output)
regexp = "^(\S+)\s+(\S+)\s+from\s+(\S+)\s+\(([^\)]+)\)\.\.\.(\S+)$"
p = re.compile (regexp);
@@ -122,14 +122,14 @@ def runTestForProject(where):
else:
non_failures.append ({"name": p_res.group(2), "target": p_res.group(3), "ecf": p_res.group(4), "result": p_res.group(5)})
for non_fails in non_failures:
- print "[%s] %s : %s @ %s" % (non_fails["result"], non_fails["name"], non_fails["ecf"], non_fails["target"])
+ print ("[%s] %s : %s @ %s" % (non_fails["result"], non_fails["name"], non_fails["ecf"], non_fails["target"]))
for fails in failures:
- print "[FAILURE] %s : %s @ %s" % (fails["name"], fails["ecf"], fails["target"])
+ print ("[FAILURE] %s : %s @ %s" % (fails["name"], fails["ecf"], fails["target"]))
sleep(1)
if len(failures) > 0:
report_failure ("Failure(s) occurred", 2)
- print "# End..."
+ print ("# End...")
if __name__ == '__main__':
runTestForProject(os.path.join (os.getcwd(), '..'))