Merge branch 'v1' into es17.01
# Conflicts: # library/text/parser/uri_template/uri_template-safe.ecf # library/text/parser/uri_template/uri_template.ecf
This commit is contained in:
@@ -54,7 +54,7 @@ feature {NONE} -- Initialization
|
||||
create date_time.make_from_epoch (n.as_integer_32)
|
||||
end
|
||||
|
||||
make_from_string (s: READABLE_STRING_8)
|
||||
make_from_string (s: READABLE_STRING_GENERAL)
|
||||
-- Create from string representation `s'
|
||||
-- Supports: RFC 1123 and RFC 850
|
||||
-- Tolerant with: GMT+offset and GMT-offset
|
||||
@@ -350,7 +350,7 @@ feature -- Helper routines.
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
string_to_date_time (s: READABLE_STRING_8): detachable DATE_TIME
|
||||
string_to_date_time (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"
|
||||
@@ -377,8 +377,8 @@ feature {NONE} -- Implementation
|
||||
note
|
||||
EIS: "name=RFC2616", "protocol=URI", "src=http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html"
|
||||
local
|
||||
t: STRING_8
|
||||
l_ddd, l_mmm: detachable STRING_8
|
||||
t: STRING_32
|
||||
l_ddd, l_mmm: detachable STRING_32
|
||||
l_dd, l_yyyy, l_hh, l_mi, l_ss, l_ff2: INTEGER
|
||||
l_mo: INTEGER
|
||||
l_gmt_offset: INTEGER -- minutes
|
||||
@@ -565,7 +565,7 @@ feature {NONE} -- Implementation
|
||||
t.extend (s[i].as_upper)
|
||||
i := i + 1
|
||||
end
|
||||
if
|
||||
if
|
||||
t.same_string ("GMT") -- for instance: GMT+0002
|
||||
or t.same_string ("UTC") -- for instance: UTC+0002
|
||||
or t.is_empty -- for instance: +0002
|
||||
@@ -622,7 +622,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
end
|
||||
|
||||
ansi_c_string_to_date_time (s: READABLE_STRING_8): detachable DATE_TIME
|
||||
ansi_c_string_to_date_time (s: READABLE_STRING_GENERAL): detachable DATE_TIME
|
||||
-- String representation of `dt' using the RFC 1123
|
||||
-- asctime-date = wkday SP date3 SP time SP 4DIGIT
|
||||
-- date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
|
||||
@@ -638,8 +638,8 @@ feature {NONE} -- Implementation
|
||||
note
|
||||
EIS: "name=RFC2616", "protocol=URI", "src=http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html"
|
||||
local
|
||||
t: STRING_8
|
||||
l_ddd, l_mmm: detachable STRING_8
|
||||
t: STRING_32
|
||||
l_ddd, l_mmm: detachable STRING_32
|
||||
l_dd, l_yyyy, l_hh, l_mi, l_ss, l_ff2: INTEGER
|
||||
l_mo: INTEGER
|
||||
l_gmt_offset: INTEGER -- minutes
|
||||
@@ -681,18 +681,18 @@ feature {NONE} -- Implementation
|
||||
-- Tolerant to full month name ..
|
||||
l_mmm.keep_head (3)
|
||||
end
|
||||
if l_mmm.same_string ("JAN") then l_mo := 01
|
||||
elseif l_mmm.same_string ("FEB") then l_mo := 02
|
||||
elseif l_mmm.same_string ("MAR") then l_mo := 03
|
||||
elseif l_mmm.same_string ("APR") then l_mo := 04
|
||||
elseif l_mmm.same_string ("MAY") then l_mo := 05
|
||||
elseif l_mmm.same_string ("JUN") then l_mo := 06
|
||||
elseif l_mmm.same_string ("JUL") then l_mo := 07
|
||||
elseif l_mmm.same_string ("AUG") then l_mo := 08
|
||||
elseif l_mmm.same_string ("SEP") then l_mo := 09
|
||||
elseif l_mmm.same_string ("OCT") then l_mo := 10
|
||||
elseif l_mmm.same_string ("NOV") then l_mo := 11
|
||||
elseif l_mmm.same_string ("DEC") then l_mo := 12
|
||||
if l_mmm.same_string_general ("JAN") then l_mo := 01
|
||||
elseif l_mmm.same_string_general ("FEB") then l_mo := 02
|
||||
elseif l_mmm.same_string_general ("MAR") then l_mo := 03
|
||||
elseif l_mmm.same_string_general ("APR") then l_mo := 04
|
||||
elseif l_mmm.same_string_general ("MAY") then l_mo := 05
|
||||
elseif l_mmm.same_string_general ("JUN") then l_mo := 06
|
||||
elseif l_mmm.same_string_general ("JUL") then l_mo := 07
|
||||
elseif l_mmm.same_string_general ("AUG") then l_mo := 08
|
||||
elseif l_mmm.same_string_general ("SEP") then l_mo := 09
|
||||
elseif l_mmm.same_string_general ("OCT") then l_mo := 10
|
||||
elseif l_mmm.same_string_general ("NOV") then l_mo := 11
|
||||
elseif l_mmm.same_string_general ("DEC") then l_mo := 12
|
||||
else err := True
|
||||
end
|
||||
else
|
||||
@@ -875,7 +875,7 @@ feature {NONE} -- Implementation
|
||||
invariant
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Eiffel Software and others"
|
||||
copyright: "2011-2017, Jocelyn Fiat, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -47,7 +47,7 @@ feature -- Change
|
||||
across
|
||||
ax_to_sreg_map as c
|
||||
loop
|
||||
ask_info (c.key.to_string_32, is_required)
|
||||
ask_info (c.key, is_required)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -204,18 +204,18 @@ feature {OPENID_CONSUMER_VALIDATION} -- Implementation
|
||||
l_types as t
|
||||
loop
|
||||
s := xml_content (t.item)
|
||||
if s.same_string ("http://openid.net/sreg/1.0") then
|
||||
if s.same_string_general ("http://openid.net/sreg/1.0") then
|
||||
r_sreg_supported := True
|
||||
elseif s.same_string ("http://openid.net/extensions/sreg/1.1") then
|
||||
elseif s.same_string_general ("http://openid.net/extensions/sreg/1.1") then
|
||||
r_sreg_supported := True
|
||||
elseif s.same_string ("http://openid.net/srv/ax/1.0") then
|
||||
elseif s.same_string_general ("http://openid.net/srv/ax/1.0") then
|
||||
r_ax_supported := True
|
||||
elseif s.same_string ("http://specs.openid.net/auth/2.0/signon") then
|
||||
elseif s.same_string_general ("http://specs.openid.net/auth/2.0/signon") then
|
||||
r_version := 2
|
||||
elseif s.same_string ("http://specs.openid.net/auth/2.0/server") then
|
||||
elseif s.same_string_general ("http://specs.openid.net/auth/2.0/server") then
|
||||
r_version := 2
|
||||
r_identifier_select := True
|
||||
elseif s.same_string ("http://openid.net/signon/1.1") then
|
||||
elseif s.same_string_general ("http://openid.net/signon/1.1") then
|
||||
r_version := 1
|
||||
end
|
||||
end
|
||||
@@ -494,7 +494,7 @@ feature {NONE} -- Implementation
|
||||
|
||||
feature -- Helper
|
||||
|
||||
xml_content (e: XML_ELEMENT): STRING_8
|
||||
xml_content (e: XML_ELEMENT): STRING_32
|
||||
do
|
||||
create Result.make_empty
|
||||
if attached e.contents as lst then
|
||||
|
||||
@@ -89,10 +89,10 @@ feature -- Basic operation
|
||||
create ret.make_from_string (return_url)
|
||||
create tb.make (5)
|
||||
if attached values as q_lst then
|
||||
if attached item_by_name ("openid.claimed_id", q_lst) as q_claimed_id then
|
||||
l_claimed_id := q_claimed_id.as_string_8
|
||||
elseif attached item_by_name ("openid.identity", q_lst) as l_id then
|
||||
l_claimed_id := l_id
|
||||
if attached item_by_name ("openid.claimed_id", q_lst) as q_claimed_id and then q_claimed_id.is_valid_as_string_8 then
|
||||
l_claimed_id := q_claimed_id.to_string_8
|
||||
elseif attached item_by_name ("openid.identity", q_lst) as l_id and then l_id.is_valid_as_string_8 then
|
||||
l_claimed_id := l_id.to_string_8
|
||||
end
|
||||
identity := l_claimed_id
|
||||
tb.force (item_by_name ("openid.assoc_handle", q_lst), "openid.assoc_handle")
|
||||
@@ -117,7 +117,7 @@ feature -- Basic operation
|
||||
|
||||
if
|
||||
attached item_by_name ("openid.return_to", q_lst) as q_return_to and then
|
||||
not return_url.same_string (q_return_to)
|
||||
not return_url.same_string_general (q_return_to)
|
||||
then
|
||||
-- The return_to url must match the url of current request.
|
||||
-- I'm assuing that noone will set the returnUrl to something that doesn't make sense.
|
||||
@@ -217,7 +217,7 @@ feature -- Basic operation
|
||||
if s.same_string ({STRING_32} "ns.ax") and v.same_string ({STRING_32} "http://openid.net/srv/ax/1.0") then
|
||||
l_alias := "ax."
|
||||
else
|
||||
if v.same_string ("http://openid.net/srv/ax/1.0") then
|
||||
if v.same_string_general ("http://openid.net/srv/ax/1.0") then
|
||||
l_alias := s.substring (("ns.").count + 1, s.count).to_string_8 + "."
|
||||
end
|
||||
end
|
||||
@@ -235,8 +235,8 @@ feature -- Basic operation
|
||||
loop
|
||||
s := c.item
|
||||
if
|
||||
s.starts_with (k_value)
|
||||
or s.starts_with (k_type)
|
||||
s.starts_with_general (k_value)
|
||||
or s.starts_with_general (k_type)
|
||||
then
|
||||
ax_keys.force ("openid." + s)
|
||||
end
|
||||
@@ -251,17 +251,17 @@ feature -- Basic operation
|
||||
loop
|
||||
s := c.item
|
||||
if attached item_by_name (s, lst) as v then
|
||||
if s.starts_with (k_value) then
|
||||
if s.starts_with_general (k_value) then
|
||||
k := s.substring (k_value.count + 1, s.count)
|
||||
i := k.index_of ('.', 1)
|
||||
if i > 1 then
|
||||
k.keep_head (i - 1)
|
||||
end
|
||||
if attached item_by_name (k_type + k, lst) as l_type then
|
||||
if l_type.starts_with ("http://axschema.org/") then
|
||||
if l_type.starts_with_general ("http://axschema.org/") then
|
||||
check ("http://axschema.org/").count = 20 end
|
||||
attributes.force (v, l_type.substring (21, l_type.count))
|
||||
elseif l_type.starts_with ("http://schema.openid.net/") then
|
||||
elseif l_type.starts_with_general ("http://schema.openid.net/") then
|
||||
check ("http://schema.openid.net/").count = 25 end
|
||||
attributes.force (v, l_type.substring (26, l_type.count))
|
||||
else
|
||||
|
||||
@@ -137,7 +137,7 @@ feature -- Status report
|
||||
-- String that should be displayed in debugger to represent `Current'.
|
||||
do
|
||||
create Result.make_empty
|
||||
Result.append (type)
|
||||
Result.append_string_general (type)
|
||||
Result.append (" ")
|
||||
if attached login as l_login then
|
||||
Result.append ("login=[")
|
||||
|
||||
@@ -94,7 +94,7 @@ feature {NONE} -- Implementation
|
||||
require
|
||||
a_value_not_is_empty: a_value /= Void
|
||||
do
|
||||
a_output.append (a_name)
|
||||
a_output.append_string_general (a_name)
|
||||
a_output.append_character ('=')
|
||||
a_output.append_string_general (a_value)
|
||||
a_output.append_character ('%N')
|
||||
@@ -103,7 +103,7 @@ feature {NONE} -- Implementation
|
||||
append_variable_to_debug_output (a_name: READABLE_STRING_8; a_value: detachable READABLE_STRING_GENERAL; a_output: STRING_32)
|
||||
do
|
||||
if a_value /= Void then
|
||||
a_output.append (a_name)
|
||||
a_output.append_string_general (a_name)
|
||||
a_output.append_character ('=')
|
||||
a_output.append_string_general (a_value)
|
||||
a_output.append_character ('%N')
|
||||
@@ -354,7 +354,7 @@ invariant
|
||||
request_method_set: not request_method.is_empty
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -166,7 +166,8 @@ feature -- Basic Operation
|
||||
if is_verbose then
|
||||
log ("%NReceive <====================", debug_level)
|
||||
if attached req.raw_header_data as rhd then
|
||||
log (rhd, debug_level)
|
||||
check raw_header_is_valid_as_string_8: rhd.is_valid_as_string_8 end
|
||||
log (rhd.to_string_8, debug_level)
|
||||
end
|
||||
end
|
||||
if
|
||||
@@ -189,7 +190,8 @@ feature -- Basic Operation
|
||||
end
|
||||
-- Sending the server's opening handshake
|
||||
create l_sha1.make
|
||||
l_sha1.update_from_string (l_ws_key + magic_guid)
|
||||
check l_ws_key_is_valid_as_string_8: l_ws_key.is_valid_as_string_8 end
|
||||
l_sha1.update_from_string (l_ws_key.to_string_8 + magic_guid)
|
||||
l_key := Base64_encoder.encoded_string (digest (l_sha1))
|
||||
res.header.add_header_key_value ("Upgrade", "websocket")
|
||||
res.header.add_header_key_value ("Connection", "Upgrade")
|
||||
@@ -795,7 +797,7 @@ feature {NONE} -- Debug
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -69,7 +69,7 @@ feature -- Basic operations
|
||||
s.append (c.item.url_encoded_name)
|
||||
s.append_character (' ')
|
||||
s.append_character ('{')
|
||||
s.append (c.item.generating_type)
|
||||
s.append (c.item.generating_type.name)
|
||||
s.append_character ('}')
|
||||
s.append_character ('=')
|
||||
s.append (c.item.debug_output.as_string_8)
|
||||
@@ -80,7 +80,7 @@ feature -- Basic operations
|
||||
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)"
|
||||
licensing_options: "http://www.eiffel.com/licensing"
|
||||
copying: "[
|
||||
|
||||
@@ -245,7 +245,7 @@ feature {NONE} -- Implementation
|
||||
s.append_character (' ')
|
||||
if attached c.item as l_item then
|
||||
s.append_character ('{')
|
||||
s.append (l_item.generating_type)
|
||||
s.append (l_item.generating_type.name)
|
||||
s.append_character ('}')
|
||||
|
||||
s.append_character (' ')
|
||||
@@ -316,7 +316,7 @@ feature {NONE} -- Implementation
|
||||
else
|
||||
a_output.append (c.item.url_encoded_name)
|
||||
end
|
||||
t := c.item.generating_type
|
||||
t := c.item.generating_type.name
|
||||
if t.same_string ("WSF_STRING") then
|
||||
else
|
||||
a_output.append_character (' ')
|
||||
@@ -420,7 +420,7 @@ feature -- Constants
|
||||
invariant
|
||||
|
||||
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
|
||||
|
||||
@@ -108,8 +108,8 @@ 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_string_8 then
|
||||
create l_date.make_from_string (l_if_unmodified_since.as_string_8)
|
||||
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)
|
||||
@@ -128,8 +128,8 @@ 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_string_8 then
|
||||
create l_date.make_from_string (l_if_modified_since.as_string_8)
|
||||
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)
|
||||
@@ -408,7 +408,7 @@ feature -- Error reporting
|
||||
if req.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
|
||||
s := "<html lang=%"en%"><head>"
|
||||
s.append ("<title>")
|
||||
s.append (html_encoder.encoded_string (req.request_uri))
|
||||
s.append (html_encoder.general_encoded_string (req.request_uri))
|
||||
s.append ("Error " + a_status_code.out + " (" + l_msg + ")")
|
||||
s.append ("</title>%N")
|
||||
s.append ("[
|
||||
@@ -434,7 +434,7 @@ feature -- Error reporting
|
||||
s.append ("</div>")
|
||||
s.append ("The current location for this resource is <a href=%"" + a_locations.first.string + "%">here</a>")
|
||||
s.append ("Error " + a_status_code.out + " (" + l_msg + ")</div>")
|
||||
s.append ("<div id=%"message%">Error " + a_status_code.out + " (" + l_msg + "): <code>" + html_encoder.encoded_string (req.request_uri) + "</code></div>")
|
||||
s.append ("<div id=%"message%">Error " + a_status_code.out + " (" + l_msg + "): <code>" + html_encoder.general_encoded_string (req.request_uri) + "</code></div>")
|
||||
s.append ("<div id=%"footer%"></div>")
|
||||
s.append ("</body>%N")
|
||||
s.append ("</html>%N")
|
||||
@@ -587,7 +587,7 @@ feature -- Error reporting
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2014, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
copyright: "2011-2017, Colin Adams, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -147,8 +147,11 @@ feature {WSF_RESPONSE} -- Output
|
||||
l_description.append ("</ul>")
|
||||
end
|
||||
|
||||
if doc_url_supported and then attached {WSF_STRING} request.query_parameter ("api") as l_api then
|
||||
l_api_resource := l_api.value
|
||||
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
|
||||
end
|
||||
@@ -324,7 +327,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
|
||||
|
||||
@@ -29,6 +29,8 @@ feature -- Element change
|
||||
|
||||
set_next (a_next: like next)
|
||||
-- Set `next' to `a_next'
|
||||
require
|
||||
a_next_is_not_current: a_next /= Current
|
||||
do
|
||||
next := a_next
|
||||
ensure
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
@@ -45,7 +45,7 @@ feature -- Status report
|
||||
across
|
||||
mtds as c
|
||||
loop
|
||||
s.append_string (c.item)
|
||||
s.append_string_general (c.item)
|
||||
s.append_string (" ")
|
||||
end
|
||||
s.append_string ("]")
|
||||
@@ -65,7 +65,7 @@ invariant
|
||||
mapping_attached: mapping /= Void
|
||||
|
||||
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
|
||||
|
||||
@@ -32,8 +32,12 @@ 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) then
|
||||
uuid := l_uuid
|
||||
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
|
||||
is_pending := True
|
||||
@@ -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
|
||||
@@ -183,7 +187,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Result := generating_type.name_32
|
||||
else
|
||||
Result := "Void"
|
||||
Result := {STRING_32} "Void"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,7 +71,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
|
||||
|
||||
@@ -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 then
|
||||
Result := True
|
||||
elseif v.is_valid_as_string_8 then
|
||||
Result := v.is_case_insensitive_equal (a_other)
|
||||
end
|
||||
Result := value.is_case_insensitive_equal_general (a_other)
|
||||
end
|
||||
|
||||
feature -- Conversion
|
||||
@@ -154,7 +147,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -83,7 +83,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
else
|
||||
--| Other response codes are possible, such as 301 Moved permananently,
|
||||
--| 302 Found and 410 Gone. But these require handlers to implement,
|
||||
--| so no other code can be given at this point.
|
||||
--| so no other code can be given at this point.
|
||||
msg := not_found_message (req)
|
||||
end
|
||||
res.send (msg)
|
||||
@@ -98,7 +98,7 @@ feature {NONE} -- Implementation
|
||||
do
|
||||
create Result.make (req)
|
||||
end
|
||||
|
||||
|
||||
method_not_allowed_message (req: WSF_REQUEST): detachable WSF_METHOD_NOT_ALLOWED_RESPONSE
|
||||
require
|
||||
req_attached: req /= Void
|
||||
@@ -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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
s.append_string_general (c.item)
|
||||
s.append_character (' ')
|
||||
end
|
||||
s.append ("]")
|
||||
@@ -196,7 +196,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, 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
|
||||
|
||||
@@ -101,9 +101,9 @@ feature {WSF_RESPONSE} -- Output
|
||||
do
|
||||
create l_messages
|
||||
h := header
|
||||
if
|
||||
not attached recognized_methods as l_recognized_methods
|
||||
or else l_recognized_methods.has (request.request_method.as_upper)
|
||||
if
|
||||
not attached recognized_methods as l_recognized_methods
|
||||
or else l_recognized_methods.has (request.request_method.as_upper)
|
||||
then
|
||||
res.set_status_code (l_messages.method_not_allowed)
|
||||
else
|
||||
@@ -130,7 +130,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
|
||||
s := "<html lang=%"en%"><head>"
|
||||
s.append ("<title>")
|
||||
s.append (html_encoder.encoded_string (request.request_uri))
|
||||
s.append (html_encoder.general_encoded_string (request.request_uri))
|
||||
s.append (l_html_error_code_text + "!!")
|
||||
s.append ("</title>%N")
|
||||
s.append (
|
||||
@@ -160,7 +160,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
s.append (l_html_error_code_text + "</div>")
|
||||
s.append ("<div id=%"message%">" + l_html_error_code_text + ": the request method <code>")
|
||||
s.append (request.request_method)
|
||||
s.append ("</code> is inappropriate for the URL for <code>" + html_encoder.encoded_string (request.request_uri) + "</code>.</div>")
|
||||
s.append ("</code> is inappropriate for the URL for <code>" + html_encoder.general_encoded_string (request.request_uri) + "</code>.</div>")
|
||||
if attached suggested_methods as lst and then not lst.is_empty then
|
||||
s.append ("<div id=%"suggestions%"><strong>Allowed methods:</strong>")
|
||||
across
|
||||
@@ -186,17 +186,17 @@ feature {WSF_RESPONSE} -- Output
|
||||
l_text := l_loc
|
||||
end
|
||||
s.append ("<li>")
|
||||
s.append ("<a href=%"" + l_loc + "%">" + html_encoder.encoded_string (l_text.to_string_32) + "</a>")
|
||||
s.append ("<a href=%"" + l_loc + "%">" + html_encoder.general_encoded_string (l_text) + "</a>")
|
||||
elseif l_text /= Void then
|
||||
|
||||
s.append ("<li>")
|
||||
s.append (html_encoder.encoded_string (l_text.to_string_32))
|
||||
s.append (html_encoder.general_encoded_string (l_text))
|
||||
s.append ("</li>%N")
|
||||
end
|
||||
if (l_loc /= Void or l_text /= Void) then
|
||||
if attached lst.item.description as l_desc then
|
||||
s.append ("<br/> - ")
|
||||
s.append (html_encoder.encoded_string (l_desc.to_string_32))
|
||||
s.append (html_encoder.general_encoded_string (l_desc))
|
||||
s.append ("%N")
|
||||
end
|
||||
s.append ("</li>%N")
|
||||
@@ -221,7 +221,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
else
|
||||
s := 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) + "'.%N")
|
||||
s.append (" is inappropriate for the URL for '" + html_encoder.general_encoded_string (request.request_uri) + "'.%N")
|
||||
if attached suggested_methods as lst and then not lst.is_empty then
|
||||
s.append ("Allowed methods:")
|
||||
across
|
||||
@@ -327,7 +327,7 @@ feature {NONE} -- Implementation
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, 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
|
||||
|
||||
@@ -76,7 +76,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
|
||||
s := "<html lang=%"en%"><head>"
|
||||
s.append ("<title>")
|
||||
s.append (html_encoder.encoded_string (request.request_uri))
|
||||
s.append (html_encoder.encoded_string (request.request_uri.to_string_32))
|
||||
s.append ("Error 404 (Not Found)")
|
||||
s.append ("</title>%N")
|
||||
s.append ("[
|
||||
@@ -101,7 +101,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
s.append ("<div class=%"inner2%"></div>")
|
||||
s.append ("</div>")
|
||||
s.append ("Error 404 (Not Found)</div>")
|
||||
s.append ("<div id=%"message%">Error 404 (Not Found): <code>" + html_encoder.encoded_string (request.request_uri) + "</code></div>")
|
||||
s.append ("<div id=%"message%">Error 404 (Not Found): <code>" + html_encoder.encoded_string (request.request_uri.to_string_32) + "</code></div>")
|
||||
if attached suggested_items as lst and then not lst.is_empty then
|
||||
s.append ("<div id=%"suggestions%"><strong>Perhaps you are looking for:</strong><ul>")
|
||||
from
|
||||
@@ -198,7 +198,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, 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
|
||||
|
||||
@@ -61,7 +61,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
|
||||
s := "<html lang=%"en%"><head>"
|
||||
s.append ("<title>")
|
||||
s.append (html_encoder.encoded_string (request.request_uri))
|
||||
s.append (html_encoder.general_encoded_string (request.request_uri))
|
||||
s.append ("Error 412 (Precondition Failed)")
|
||||
s.append ("</title>%N")
|
||||
s.append ("[
|
||||
@@ -84,7 +84,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
s.append ("<div class=%"inner2%"></div>")
|
||||
s.append ("</div>")
|
||||
s.append ("Error 412 (Precondition Failed)</div>")
|
||||
s.append ("<div id=%"message%">Error 412 (Precondition Failed): <code>" + html_encoder.encoded_string (request.request_uri) + "</code></div>")
|
||||
s.append ("<div id=%"message%">Error 412 (Precondition Failed): <code>" + html_encoder.general_encoded_string (request.request_uri) + "</code></div>")
|
||||
if attached body as b then
|
||||
s.append ("<div>")
|
||||
s.append (b)
|
||||
@@ -116,7 +116,7 @@ feature {WSF_RESPONSE} -- Output
|
||||
|
||||
note
|
||||
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, 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
|
||||
|
||||
@@ -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)
|
||||
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)
|
||||
@@ -842,7 +842,7 @@ feature -- Access: CGI meta parameters - 1.1
|
||||
if pi.is_empty then
|
||||
l_result := ""
|
||||
elseif pi.count = 1 and then pi[1] = '/' then
|
||||
l_result := "/"
|
||||
l_result := "/"
|
||||
else
|
||||
r := request_uri
|
||||
i := r.index_of ('?', 1)
|
||||
@@ -2110,7 +2110,7 @@ invariant
|
||||
wgi_request.content_type /= Void implies content_type /= Void
|
||||
|
||||
note
|
||||
copyright: "2011-2016, 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
|
||||
|
||||
@@ -38,7 +38,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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:<input type="submit" value="Submit" formaction="/users">
|
||||
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: <input type="submit" value="Submit" formenctype="application/x-www-form-urlencoded">
|
||||
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: <input type="submit" value="Submit" formmethod="POST">
|
||||
--! 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: <input type="submit" value="Submit" formtarget="_self">
|
||||
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
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<target name="uri_template">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true">
|
||||
|
||||
Reference in New Issue
Block a user