Web form:

- Improvement about web form manipulation (remove a field, set a text value to input fields by name, ...)
 - Improved web form html generation, especially for select and type checkbox
 - Updated the date input field interface with a new set_date_value .

File response:
 - "application/force-download" is not a standard MIME content type, so use "application_octet_stream" instead as default.

Standalone connector:
 - Added expected creation procedure for the service launcher.
 - Added new "secure_port" configuration variable, for SSL standalone service.
   This way, if `is_secure` is True, the server will use `secure_port` (overrides `port` value).

Date:
 - Improved support for RFC 3339 (a profile of ISO 8601)

Removed obsolete and warnings:
 - removed usage of FILE_NAME
 - updated code to avoid implicit conversion from STRING_32 to STRING_8
 - avoid uneed conversion to STRING_8 (when possible)
This commit is contained in:
2020-10-02 15:02:06 +02:00
parent 75380a27fe
commit 30a5e087ae
80 changed files with 444 additions and 260 deletions
+7 -7
View File
@@ -9,7 +9,7 @@ class
BASE64
inherit
ENCODER [STRING_8, STRING_8]
ENCODER [READABLE_STRING_8, READABLE_STRING_8]
redefine
valid_encoded_string
end
@@ -25,7 +25,7 @@ feature -- Status report
has_error: BOOLEAN
valid_encoded_string (v: STRING): BOOLEAN
valid_encoded_string (v: READABLE_STRING_8): BOOLEAN
do
Result := Precursor (v) and then
(v.is_empty or v.count >= 4)
@@ -33,7 +33,7 @@ feature -- Status report
feature -- base64 encoder
encoded_string (s: STRING): STRING_8
encoded_string (s: READABLE_STRING_8): STRING_8
-- base64 encoded value of `s'.
local
i,n: INTEGER
@@ -95,14 +95,14 @@ feature -- base64 encoder
feature -- Decoder
decoded_string (v: STRING): STRING
decoded_string (v: READABLE_STRING_8): STRING
-- base64 decoded value of `s'.
do
create Result.make (v.count)
decode_string_to_buffer (v, Result)
end
decode_string_to_buffer (v: STRING; a_buffer: STRING)
decode_string_to_buffer (v: READABLE_STRING_8; a_buffer: STRING)
-- Write base64 decoded value of `s' into `a_buffer'
local
byte_count: INTEGER
@@ -180,7 +180,7 @@ feature -- Decoder
end
end
decode_string_to_output_medium (v: STRING; a_output: IO_MEDIUM)
decode_string_to_output_medium (v: READABLE_STRING_8; a_output: IO_MEDIUM)
-- Write base64 decoded value of `s' into `a_output' medium
require
a_output_writable: a_output.is_open_write
@@ -259,7 +259,7 @@ feature -- Decoder
end
end
next_encoded_character_position (v: STRING; from_pos: INTEGER): INTEGER
next_encoded_character_position (v: READABLE_STRING_8; from_pos: INTEGER): INTEGER
-- Next encoded character position from `v' starting after `from_pos' index.
-- Result over `v.count' denodes no remaining decodable position
--| Mainly to handle base64 encoded text on multiple line
+2 -2
View File
@@ -91,7 +91,7 @@ feature -- Decoder
local
i, n: INTEGER
c: CHARACTER
hex: STRING
hex: READABLE_STRING_8
do
has_error := False
n := v.count
@@ -183,7 +183,7 @@ feature {NONE} -- Implementation
end
note
copyright: "Copyright (c) 2011-2014, Eiffel Software and others"
copyright: "Copyright (c) 2011-2020, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
+2 -2
View File
@@ -2,8 +2,8 @@ note
description: "[
Component to handle percent encoding
]"
date: "$Date: 2014-04-09 16:37:28 +0200 (mer., 09 avr. 2014) $"
revision: "$Revision: 94801 $"
date: "$Date$"
revision: "$Revision$"
EIS: "name=Percent-encoding", "protocol=URI", "src=http://en.wikipedia.org/wiki/Percent-encoding"
class
+2 -2
View File
@@ -93,7 +93,7 @@ feature -- Decoder
feature {NONE} -- Implementation: decoder
next_entity (v: STRING_8; cl_i: CELL [INTEGER]): STRING_32
next_entity (v: READABLE_STRING_8; cl_i: CELL [INTEGER]): STRING_32
-- Return next entity value
-- move index
local
@@ -259,7 +259,7 @@ feature {NONE} -- Implementation: decoder
end
note
copyright: "2011-2012, Eiffel Software and others"
copyright: "Copyright (c) 2011-2020, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
@@ -2,8 +2,8 @@ note
description: "[
Convert a FEED to XHTML representation.
]"
date: "$Date: 2015-10-08 10:45:13 +0200 (jeu., 08 oct. 2015) $"
revision: "$Revision: 97964 $"
date: "$Date$"
revision: "$Revision$"
class
FEED_TO_XHTML_VISITOR
@@ -178,7 +178,8 @@ feature -- Builder
-- Expanded template using variable from `a_ht'
-- with based url
do
Result := a_base_url + expanded_string (a_ht)
create Result.make_from_string (a_base_url)
Result.append (expanded_string (a_ht))
end
feature -- Match
@@ -192,12 +193,12 @@ feature -- Match
l_offset: INTEGER
p,q,nb: INTEGER
exp: URI_TEMPLATE_EXPRESSION
vn, s,t: STRING
vv, path_vv: STRING
vv, vn, t, s: READABLE_STRING_8
path_vv: STRING
l_vars, l_path_vars, l_query_vars: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
l_uri_count: INTEGER
tpl_count: INTEGER
l_next_literal_separator: detachable STRING
l_next_literal_separator: detachable READABLE_STRING_8
do
--| Extract expansion parts "\\{([^\\}]*)\\}"
analyze
@@ -419,7 +420,7 @@ feature {NONE} -- Implementation
end
end
import_path_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
import_path_style_parameters_into (a_content: READABLE_STRING_8; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
require
a_content_attached: a_content /= Void
res_attached: res /= Void
@@ -427,7 +428,7 @@ feature {NONE} -- Implementation
import_custom_style_parameters_into (a_content, ';', res)
end
import_form_style_parameters_into (a_content: STRING; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
import_form_style_parameters_into (a_content: READABLE_STRING_8; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
require
a_content_attached: a_content /= Void
res_attached: res /= Void
@@ -435,7 +436,7 @@ feature {NONE} -- Implementation
import_custom_style_parameters_into (a_content, '&', res)
end
import_custom_style_parameters_into (a_content: STRING; a_separator: CHARACTER; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
import_custom_style_parameters_into (a_content: READABLE_STRING_8; a_separator: CHARACTER; res: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8])
require
a_content_attached: a_content /= Void
res_attached: res /= Void
@@ -475,7 +476,7 @@ feature {NONE} -- Implementation
end
end
next_path_variable_value (a_uri: STRING; a_index: INTEGER; a_end_token: detachable STRING): STRING
next_path_variable_value (a_uri: READABLE_STRING_8; a_index: INTEGER; a_end_token: detachable READABLE_STRING_8): STRING
require
valid_index: a_index <= a_uri.count
local
@@ -511,7 +512,7 @@ feature {NONE} -- Implementation
end
i := i + 1
end
Result := a_uri.substring (a_index, p)
Result := a_uri.substring (a_index, p).to_string_8
end
note