Merge remote-tracking branch 'javier/ewf_get_rid_obsolete_messages' into pr177

This commit is contained in:
Jocelyn Fiat
2017-04-13 22:58:12 +02:00
30 changed files with 83 additions and 92 deletions

View File

@@ -41,10 +41,10 @@ Tasks and issues are managed with github issue system
* Forum/group post: https://groups.google.com/forum/#!forum/eiffel-web-framework * Forum/group post: https://groups.google.com/forum/#!forum/eiffel-web-framework
## Requirements ## Requirements
* Compiling from EiffelStudio 13.11 to 15.05 and more recent version of the compiler. * Compiling from EiffelStudio 16.05 to 17.05 and more recent version of the compiler.
* Currently being developped using EiffelStudio 15.01 (on Windows, Linux) * Currently being developped using EiffelStudio 17.01 (on Windows, Linux)
* Tested using EiffelStudio 15.01 with "jenkins" CI server (not anymore compatible with 6.8 due to use of `TABLE_ITERABLE') * Tested using EiffelStudio 17.01 with "jenkins" CI server.
* The code have to allow __void-safe__ compilation and non void-safe system (see [more about void-safety](http://docs.eiffel.com/book/method/void-safe-programming-eiffel) ) * The code have to allow __void-safe__ compilation and non void-safe system (see [more about void-safety](https://www.eiffel.org/doc/eiffel/Void-safe%20programming%20in%20Eiffel)
## How to get the source code? ## How to get the source code?
@@ -65,12 +65,12 @@ Using git
* __router__: URL dispatching/routing based on uri, uri_template, or custom [read more](library/server/wsf/router) * __router__: URL dispatching/routing based on uri, uri_template, or custom [read more](library/server/wsf/router)
### protocol ### protocol
* __http__: HTTP related classes, constants for status code, content types, ... [read more](library/protocol/http) * __http__: HTTP related classes, constants for status code, content types, ... [read more](library/network/protocol/http)
* __uri_template__: URI Template library (parsing and expander) [read more](library/protocol/uri_template) * __uri_template__: URI Template library (parsing and expander) [read more](library/network/protocol/uri_template)
* __CONNEG__: Content negotiation library (Content-type Negociation) [read more](library/protocol/content_negotiation) * __CONNEG__: Content negotiation library (Content-type Negociation) [read more](library/network/protocol/content_negotiation)
### client ### client
* __http_client__: simple HTTP client based on cURL [read more](library/client/http_client) * __http_client__: simple HTTP client based on cURL [read more](library/network/http_client)
### text ### text
* __encoder__: Various simpler encoders: base64, url-encoder, xml entities, html entities [read more](library/text/encoder) * __encoder__: Various simpler encoders: base64, url-encoder, xml entities, html entities [read more](library/text/encoder)
@@ -78,10 +78,6 @@ Using git
### Others ### Others
* error: very simple/basic library to handle error * error: very simple/basic library to handle error
## External libraries under 'contrib'
* [Eiffel Web Nino](contrib/library/server/nino)
* ..
## Draft folder = call for contribution ## ## Draft folder = call for contribution ##
## Examples ## Examples
@@ -106,5 +102,4 @@ Keep track of development and community news.
* Have a question that's not a feature request or bug report? [Ask on the mailing list](http://groups.google.com/group/eiffel-web-framework) * Have a question that's not a feature request or bug report? [Ask on the mailing list](http://groups.google.com/group/eiffel-web-framework)
For more information please have a look at the related wiki: For more information please have a look at the related [workbook documentation](docs/workbook)
* https://github.com/EiffelWebFramework/EWF/wiki

View File

@@ -205,7 +205,7 @@ feature {NONE} -- Implementation
loop loop
s.append (" - ") s.append (" - ")
s.append (c.item.url_encoded_name) s.append (c.item.url_encoded_name)
t := c.item.generating_type t := c.item.generating_type.name
if t.same_string ("WSF_STRING") then if t.same_string ("WSF_STRING") then
else else
s.append_character (' ') s.append_character (' ')

View File

@@ -87,7 +87,7 @@ feature -- Access: order status
end end
Order_states : ARRAY [STRING] Order_states : ARRAY [STRING]
-- List of valid status states -- List of valid status states.
once once
Result := << Result := <<
status_unset, status_unset,

View File

@@ -27,7 +27,7 @@ feature -- Access
end end
Milk_types: ARRAY [STRING] Milk_types: ARRAY [STRING]
-- List of valid Milk types -- List of valid Milk types.
once once
Result := <<"skim", "semi", "whole">> Result := <<"skim", "semi", "whole">>
end end

View File

@@ -334,7 +334,6 @@ feature {NONE} -- Conversion
order_to_json (obj: ORDER): JSON_OBJECT order_to_json (obj: ORDER): JSON_OBJECT
local local
j_order: JSON_OBJECT
j_item: JSON_OBJECT j_item: JSON_OBJECT
ja: JSON_ARRAY ja: JSON_ARRAY
do do

View File

@@ -12,8 +12,6 @@ inherit
feature {NONE} -- Initialization feature {NONE} -- Initialization
make (a_location: PATH) make (a_location: PATH)
local
d: DIRECTORY
do do
location := a_location location := a_location
ensure_directory_exists (a_location) ensure_directory_exists (a_location)
@@ -67,7 +65,6 @@ feature -- Access
save (a_entry_type: TYPE [detachable ANY]; a_entry: detachable ANY; cl_entry_id: CELL [detachable READABLE_STRING_GENERAL]) save (a_entry_type: TYPE [detachable ANY]; a_entry: detachable ANY; cl_entry_id: CELL [detachable READABLE_STRING_GENERAL])
local local
f: RAW_FILE
l_id: detachable READABLE_STRING_GENERAL l_id: detachable READABLE_STRING_GENERAL
p: PATH p: PATH
do do

View File

@@ -54,7 +54,7 @@ feature -- Execution
if attached {WSF_STRING} req.item ("user") as u then if attached {WSF_STRING} req.item ("user") as u then
--| If yes, say hello world #name --| If yes, say hello world #name
l_user_name := (create {HTML_ENCODER}).decoded_string (u.value) l_user_name := (create {HTML_ENCODER}).decoded_string (u.value.to_string_8)
s := "<p>Hello " + mesg.html_encoded_string (l_user_name) + "!</p>" s := "<p>Hello " + mesg.html_encoded_string (l_user_name) + "!</p>"
s.append ("Display a <a href=%"/users/" + u.url_encoded_value + "/message/%">message</a></p>") s.append ("Display a <a href=%"/users/" + u.url_encoded_value + "/message/%">message</a></p>")

View File

@@ -86,7 +86,7 @@ feature -- Access
html_decoded_string (v: READABLE_STRING_32): READABLE_STRING_32 html_decoded_string (v: READABLE_STRING_32): READABLE_STRING_32
do do
if v.is_valid_as_string_8 then if v.is_valid_as_string_8 then
Result := (create {HTML_ENCODER}).decoded_string (v) Result := (create {HTML_ENCODER}).decoded_string (v.to_string_8)
else else
Result := v Result := v
end end

View File

@@ -501,7 +501,7 @@ feature -- Helper
across across
lst as c lst as c
loop loop
Result.append (c.item.content) Result.append (c.item.content.to_string_8)
end end
end end
end end

View File

@@ -92,7 +92,7 @@ feature -- Basic operation
if attached item_by_name ("openid.claimed_id", q_lst) as q_claimed_id 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 l_claimed_id := q_claimed_id.as_string_8
elseif attached item_by_name ("openid.identity", q_lst) as l_id then elseif attached item_by_name ("openid.identity", q_lst) as l_id then
l_claimed_id := l_id l_claimed_id := l_id.to_string_8
end end
identity := l_claimed_id identity := l_claimed_id
tb.force (item_by_name ("openid.assoc_handle", q_lst), "openid.assoc_handle") tb.force (item_by_name ("openid.assoc_handle", q_lst), "openid.assoc_handle")
@@ -117,7 +117,7 @@ feature -- Basic operation
if if
attached item_by_name ("openid.return_to", q_lst) as q_return_to and then 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 (q_return_to.to_string_8)
then then
-- The return_to url must match the url of current request. -- 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. -- I'm assuing that noone will set the returnUrl to something that doesn't make sense.
@@ -235,8 +235,8 @@ feature -- Basic operation
loop loop
s := c.item s := c.item
if if
s.starts_with (k_value) s.starts_with (k_value.to_string_32)
or s.starts_with (k_type) or s.starts_with (k_type.to_string_32)
then then
ax_keys.force ("openid." + s) ax_keys.force ("openid." + s)
end end
@@ -251,7 +251,7 @@ feature -- Basic operation
loop loop
s := c.item s := c.item
if attached item_by_name (s, lst) as v then if attached item_by_name (s, lst) as v then
if s.starts_with (k_value) then if s.starts_with (k_value.to_string_32) then
k := s.substring (k_value.count + 1, s.count) k := s.substring (k_value.count + 1, s.count)
i := k.index_of ('.', 1) i := k.index_of ('.', 1)
if i > 1 then if i > 1 then

View File

@@ -137,7 +137,7 @@ feature -- Status report
-- String that should be displayed in debugger to represent `Current'. -- String that should be displayed in debugger to represent `Current'.
do do
create Result.make_empty create Result.make_empty
Result.append (type) Result.append (type.to_string_32)
Result.append (" ") Result.append (" ")
if attached login as l_login then if attached login as l_login then
Result.append ("login=[") Result.append ("login=[")

View File

@@ -94,7 +94,7 @@ feature {NONE} -- Implementation
require require
a_value_not_is_empty: a_value /= Void a_value_not_is_empty: a_value /= Void
do do
a_output.append (a_name) a_output.append (a_name.to_string_32)
a_output.append_character ('=') a_output.append_character ('=')
a_output.append_string_general (a_value) a_output.append_string_general (a_value)
a_output.append_character ('%N') 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) append_variable_to_debug_output (a_name: READABLE_STRING_8; a_value: detachable READABLE_STRING_GENERAL; a_output: STRING_32)
do do
if a_value /= Void then if a_value /= Void then
a_output.append (a_name) a_output.append (a_name.to_string_32)
a_output.append_character ('=') a_output.append_character ('=')
a_output.append_string_general (a_value) a_output.append_string_general (a_value)
a_output.append_character ('%N') a_output.append_character ('%N')
@@ -354,7 +354,7 @@ invariant
request_method_set: not request_method.is_empty request_method_set: not request_method.is_empty
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -166,7 +166,7 @@ feature -- Basic Operation
if is_verbose then if is_verbose then
log ("%NReceive <====================", debug_level) log ("%NReceive <====================", debug_level)
if attached req.raw_header_data as rhd then if attached req.raw_header_data as rhd then
log (rhd, debug_level) log (rhd.to_string_8, debug_level)
end end
end end
if if
@@ -189,7 +189,7 @@ feature -- Basic Operation
end end
-- Sending the server's opening handshake -- Sending the server's opening handshake
create l_sha1.make create l_sha1.make
l_sha1.update_from_string (l_ws_key + magic_guid) l_sha1.update_from_string (l_ws_key.to_string_8 + magic_guid)
l_key := Base64_encoder.encoded_string (digest (l_sha1)) l_key := Base64_encoder.encoded_string (digest (l_sha1))
res.header.add_header_key_value ("Upgrade", "websocket") res.header.add_header_key_value ("Upgrade", "websocket")
res.header.add_header_key_value ("Connection", "Upgrade") res.header.add_header_key_value ("Connection", "Upgrade")
@@ -795,7 +795,7 @@ feature {NONE} -- Debug
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -69,7 +69,7 @@ feature -- Basic operations
s.append (c.item.url_encoded_name) s.append (c.item.url_encoded_name)
s.append_character (' ') s.append_character (' ')
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_character ('=') s.append_character ('=')
s.append (c.item.debug_output.as_string_8) s.append (c.item.debug_output.as_string_8)
@@ -80,7 +80,7 @@ feature -- Basic operations
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
licensing_options: "http://www.eiffel.com/licensing" licensing_options: "http://www.eiffel.com/licensing"
copying: "[ copying: "[

View File

@@ -245,7 +245,7 @@ feature {NONE} -- Implementation
s.append_character (' ') s.append_character (' ')
if attached c.item as l_item then if attached c.item as l_item then
s.append_character ('{') s.append_character ('{')
s.append (l_item.generating_type) s.append (l_item.generating_type.name)
s.append_character ('}') s.append_character ('}')
s.append_character (' ') s.append_character (' ')
@@ -316,7 +316,7 @@ feature {NONE} -- Implementation
else else
a_output.append (c.item.url_encoded_name) a_output.append (c.item.url_encoded_name)
end end
t := c.item.generating_type t := c.item.generating_type.name
if t.same_string ("WSF_STRING") then if t.same_string ("WSF_STRING") then
else else
a_output.append_character (' ') a_output.append_character (' ')
@@ -420,7 +420,7 @@ feature -- Constants
invariant invariant
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -101,7 +101,7 @@ feature -- Basic operations
-- also if-range when we add support for range requests -- also if-range when we add support for range requests
if not l_if_match.same_string ("*") then if not l_if_match.same_string ("*") then
l_etags := l_if_match.split (',') l_etags := l_if_match.split (',')
l_failed := not across l_etags as i_etags some a_handler.matching_etag (req, i_etags.item, True) end l_failed := not across l_etags as i_etags some a_handler.matching_etag (req, i_etags.item.to_string_32, True) end
end end
end end
if l_failed then if l_failed then
@@ -122,7 +122,7 @@ feature -- Basic operations
if attached req.http_if_none_match as l_if_none_match then if attached req.http_if_none_match as l_if_none_match then
l_etags := l_if_none_match.split (',') l_etags := l_if_none_match.split (',')
l_failed := l_if_none_match.same_string ("*") or l_failed := l_if_none_match.same_string ("*") or
across l_etags as i_etags some a_handler.matching_etag (req, i_etags.item, False) end across l_etags as i_etags some a_handler.matching_etag (req, i_etags.item.to_string_32, False) end
end end
if l_failed then if l_failed then
handle_if_none_match_failed (req, res, a_handler) handle_if_none_match_failed (req, res, a_handler)
@@ -408,7 +408,7 @@ feature -- Error reporting
if req.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then if req.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
s := "<html lang=%"en%"><head>" s := "<html lang=%"en%"><head>"
s.append ("<title>") s.append ("<title>")
s.append (html_encoder.encoded_string (req.request_uri)) s.append (html_encoder.encoded_string (req.request_uri.to_string_32))
s.append ("Error " + a_status_code.out + " (" + l_msg + ")") s.append ("Error " + a_status_code.out + " (" + l_msg + ")")
s.append ("</title>%N") s.append ("</title>%N")
s.append ("[ s.append ("[
@@ -434,7 +434,7 @@ feature -- Error reporting
s.append ("</div>") s.append ("</div>")
s.append ("The current location for this resource is <a href=%"" + a_locations.first.string + "%">here</a>") 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 ("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.encoded_string (req.request_uri.to_string_32) + "</code></div>")
s.append ("<div id=%"footer%"></div>") s.append ("<div id=%"footer%"></div>")
s.append ("</body>%N") s.append ("</body>%N")
s.append ("</html>%N") s.append ("</html>%N")
@@ -587,7 +587,7 @@ feature -- Error reporting
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -148,7 +148,7 @@ feature {WSF_RESPONSE} -- Output
end 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 then
l_api_resource := l_api.value l_api_resource := l_api.value.to_string_8
if l_api_resource.is_empty then if l_api_resource.is_empty then
l_api_resource := Void l_api_resource := Void
end end
@@ -324,7 +324,7 @@ feature {NONE} -- Implementation
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -214,7 +214,7 @@ feature -- Execution
if f.is_readable then if f.is_readable then
if f.is_directory then if f.is_directory then
if index_disabled then if index_disabled then
process_directory_index_disabled (uri, req, res) process_directory_index_disabled (uri.to_string_8, req, res)
else else
process_index (req.request_uri, fn, req, res) process_index (req.request_uri, fn, req, res)
end end
@@ -222,10 +222,10 @@ feature -- Execution
process_file (f, req, res) process_file (f, req, res)
end end
else else
process_access_denied (uri, req, res) process_access_denied (uri.to_string_8, req, res)
end end
else else
process_not_found (uri, req, res) process_not_found (uri.to_string_8, req, res)
end end
end end
@@ -344,7 +344,7 @@ feature -- Execution
do do
if if
attached req.meta_string_variable ("HTTP_IF_MODIFIED_SINCE") as s_if_modified_since and then 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) as l_if_modified_since_date and then attached http_date_format_to_date (s_if_modified_since.to_string_8) as l_if_modified_since_date and then
attached file_date (f) as f_date and then attached file_date (f) as f_date and then
f_date <= l_if_modified_since_date f_date <= l_if_modified_since_date
then then

View File

@@ -45,7 +45,7 @@ feature -- Status report
across across
mtds as c mtds as c
loop loop
s.append_string (c.item) s.append_string (c.item.to_string_32)
s.append_string (" ") s.append_string (" ")
end end
s.append_string ("]") s.append_string ("]")
@@ -65,7 +65,7 @@ invariant
mapping_attached: mapping /= Void mapping_attached: mapping /= Void
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -32,8 +32,8 @@ feature {NONE} -- Initialization
elseif attached {WSF_STRING} req.query_parameter (cookie_name) as q_uuid then elseif attached {WSF_STRING} req.query_parameter (cookie_name) as q_uuid then
l_uuid := q_uuid.value l_uuid := q_uuid.value
end end
if l_uuid /= Void and then session_exists (l_uuid) then if l_uuid /= Void and then session_exists (l_uuid.to_string_8) then
uuid := l_uuid uuid := l_uuid.to_string_8
load load
else else
is_pending := True is_pending := True
@@ -183,7 +183,7 @@ feature {NONE} -- Implementation
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -57,7 +57,7 @@ feature -- Query
-- if possible -- if possible
do do
if attached value as v then if attached value as v then
Result := v.generating_type Result := v.generating_type.name_32
else else
Result := "Void" Result := "Void"
end end
@@ -71,7 +71,7 @@ feature -- Visitor
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -132,10 +132,10 @@ feature -- Helper
v: like value v: like value
do do
v := value v := value
if v = a_other then if v = a_other.to_string_32 then
Result := True Result := True
elseif v.is_valid_as_string_8 then elseif v.is_valid_as_string_8 then
Result := v.is_case_insensitive_equal (a_other) Result := v.is_case_insensitive_equal (a_other.to_string_32)
end end
end end
@@ -154,7 +154,7 @@ feature -- Visitor
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -83,7 +83,7 @@ feature {WSF_RESPONSE} -- Output
else else
--| Other response codes are possible, such as 301 Moved permananently, --| Other response codes are possible, such as 301 Moved permananently,
--| 302 Found and 410 Gone. But these require handlers to implement, --| 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) msg := not_found_message (req)
end end
res.send (msg) res.send (msg)
@@ -98,7 +98,7 @@ feature {NONE} -- Implementation
do do
create Result.make (req) create Result.make (req)
end end
method_not_allowed_message (req: WSF_REQUEST): detachable WSF_METHOD_NOT_ALLOWED_RESPONSE method_not_allowed_message (req: WSF_REQUEST): detachable WSF_METHOD_NOT_ALLOWED_RESPONSE
require require
req_attached: req /= Void req_attached: req /= Void
@@ -125,13 +125,13 @@ feature {NONE} -- Implementation
l_is_hidden := l_doc_mapping.documentation (i.request_methods).is_hidden l_is_hidden := l_doc_mapping.documentation (i.request_methods).is_hidden
end end
if not l_is_hidden then if not l_is_hidden then
create s.make_from_string (i.mapping.associated_resource) create s.make_from_string (i.mapping.associated_resource.to_string_32)
if attached i.request_methods as mtds then if attached i.request_methods as mtds then
s.append (" [ ") s.append (" [ ")
across across
mtds as mtds_c mtds as mtds_c
loop loop
s.append (mtds_c.item) s.append (mtds_c.item.to_string_32)
s.append_character (' ') s.append_character (' ')
end end
s.append ("]") s.append ("]")
@@ -169,7 +169,7 @@ feature {NONE} -- Implementation
end end
if not l_is_hidden then if not l_is_hidden then
ok := True ok := True
create s.make_from_string (i.mapping.associated_resource) create s.make_from_string (i.mapping.associated_resource.to_string_32)
if attached i.request_methods as mtds then if attached i.request_methods as mtds then
ok := False ok := False
s.append (" [ ") s.append (" [ ")
@@ -179,7 +179,7 @@ feature {NONE} -- Implementation
if m = Void or else m.is_case_insensitive_equal (c.item) then if m = Void or else m.is_case_insensitive_equal (c.item) then
ok := True ok := True
end end
s.append (c.item) s.append (c.item.to_string_32)
s.append_character (' ') s.append_character (' ')
end end
s.append ("]") s.append ("]")
@@ -196,7 +196,7 @@ feature {NONE} -- Implementation
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -101,9 +101,9 @@ feature {WSF_RESPONSE} -- Output
do do
create l_messages create l_messages
h := header h := header
if if
not attached recognized_methods as l_recognized_methods not attached recognized_methods as l_recognized_methods
or else l_recognized_methods.has (request.request_method.as_upper) or else l_recognized_methods.has (request.request_method.as_upper)
then then
res.set_status_code (l_messages.method_not_allowed) res.set_status_code (l_messages.method_not_allowed)
else else
@@ -130,7 +130,7 @@ feature {WSF_RESPONSE} -- Output
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
s := "<html lang=%"en%"><head>" s := "<html lang=%"en%"><head>"
s.append ("<title>") 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 (l_html_error_code_text + "!!") s.append (l_html_error_code_text + "!!")
s.append ("</title>%N") s.append ("</title>%N")
s.append ( s.append (
@@ -160,7 +160,7 @@ feature {WSF_RESPONSE} -- Output
s.append (l_html_error_code_text + "</div>") s.append (l_html_error_code_text + "</div>")
s.append ("<div id=%"message%">" + l_html_error_code_text + ": the request method <code>") s.append ("<div id=%"message%">" + l_html_error_code_text + ": the request method <code>")
s.append (request.request_method) 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.encoded_string (request.request_uri.to_string_32) + "</code>.</div>")
if attached suggested_methods as lst and then not lst.is_empty then if attached suggested_methods as lst and then not lst.is_empty then
s.append ("<div id=%"suggestions%"><strong>Allowed methods:</strong>") s.append ("<div id=%"suggestions%"><strong>Allowed methods:</strong>")
across across
@@ -221,7 +221,7 @@ feature {WSF_RESPONSE} -- Output
else else
s := l_html_error_code_text + ": the request method " s := l_html_error_code_text + ": the request method "
s.append (request.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.encoded_string (request.request_uri.to_string_32) + "'.%N")
if attached suggested_methods as lst and then not lst.is_empty then if attached suggested_methods as lst and then not lst.is_empty then
s.append ("Allowed methods:") s.append ("Allowed methods:")
across across
@@ -327,7 +327,7 @@ feature {NONE} -- Implementation
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -76,7 +76,7 @@ feature {WSF_RESPONSE} -- Output
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
s := "<html lang=%"en%"><head>" s := "<html lang=%"en%"><head>"
s.append ("<title>") 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 ("Error 404 (Not Found)")
s.append ("</title>%N") s.append ("</title>%N")
s.append ("[ s.append ("[
@@ -101,7 +101,7 @@ feature {WSF_RESPONSE} -- Output
s.append ("<div class=%"inner2%"></div>") s.append ("<div class=%"inner2%"></div>")
s.append ("</div>") s.append ("</div>")
s.append ("Error 404 (Not Found)</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 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>") s.append ("<div id=%"suggestions%"><strong>Perhaps you are looking for:</strong><ul>")
from from
@@ -198,7 +198,7 @@ feature {WSF_RESPONSE} -- Output
end end
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -61,7 +61,7 @@ feature {WSF_RESPONSE} -- Output
if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then if request.is_content_type_accepted ({HTTP_MIME_TYPES}.text_html) then
s := "<html lang=%"en%"><head>" s := "<html lang=%"en%"><head>"
s.append ("<title>") 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 412 (Precondition Failed)") s.append ("Error 412 (Precondition Failed)")
s.append ("</title>%N") s.append ("</title>%N")
s.append ("[ s.append ("[
@@ -84,7 +84,7 @@ feature {WSF_RESPONSE} -- Output
s.append ("<div class=%"inner2%"></div>") s.append ("<div class=%"inner2%"></div>")
s.append ("</div>") s.append ("</div>")
s.append ("Error 412 (Precondition Failed)</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.encoded_string (request.request_uri.to_string_32) + "</code></div>")
if attached body as b then if attached body as b then
s.append ("<div>") s.append ("<div>")
s.append (b) s.append (b)
@@ -116,7 +116,7 @@ feature {WSF_RESPONSE} -- Output
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -691,7 +691,7 @@ feature -- Access: CGI Meta variables
do do
meta_variables_table.force (new_string_value (a_name, a_value), a_name) meta_variables_table.force (new_string_value (a_name, a_value), a_name)
ensure 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 val.url_encoded_value.same_string (a_value.to_string_8)
end end
unset_meta_variable (a_name: READABLE_STRING_GENERAL) unset_meta_variable (a_name: READABLE_STRING_GENERAL)
@@ -842,7 +842,7 @@ feature -- Access: CGI meta parameters - 1.1
if pi.is_empty then if pi.is_empty then
l_result := "" l_result := ""
elseif pi.count = 1 and then pi[1] = '/' then elseif pi.count = 1 and then pi[1] = '/' then
l_result := "/" l_result := "/"
else else
r := request_uri r := request_uri
i := r.index_of ('?', 1) i := r.index_of ('?', 1)
@@ -2110,7 +2110,7 @@ invariant
wgi_request.content_type /= Void implies content_type /= Void wgi_request.content_type /= Void implies content_type /= Void
note 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)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -42,7 +42,7 @@ feature -- Element change
across across
options as o options as o
loop loop
if o.item.is_same_value (v) then if o.item.is_same_value (v.to_string_32) then
l_found := True l_found := True
o.item.set_is_selected (True) o.item.set_is_selected (True)
else else
@@ -50,7 +50,7 @@ feature -- Element change
end end
end end
if not l_found then if not l_found then
create opt.make (v, Void) create opt.make (v.to_string_32, Void)
opt.set_is_selected (True) opt.set_is_selected (True)
add_option (opt) add_option (opt)
end end

View File

@@ -20,7 +20,7 @@ feature {NONE} -- Initialization
do do
value := a_value value := a_value
if a_text = Void then if a_text = Void then
text := a_value text := a_value.to_string_8
else else
text := a_text text := a_text
end end

View File

@@ -110,26 +110,26 @@ feature {NONE} -- Conversion
--formaction --formaction
if attached formaction as l_formaction then if attached formaction as l_formaction then
a_target.append (" formaction=%"") a_target.append (" formaction=%"")
a_target.append (l_formaction) a_target.append (l_formaction.to_string_8)
a_target.append_character ('%"') a_target.append_character ('%"')
end end
--formenctype --formenctype
if attached formenctype as l_enctype then if attached formenctype as l_enctype then
a_target.append (" formenctype=%"") a_target.append (" formenctype=%"")
a_target.append (l_enctype) a_target.append (l_enctype.to_string_8)
a_target.append_character ('%"') a_target.append_character ('%"')
end end
-- formmethod -- formmethod
if attached formmethod as l_method then if attached formmethod as l_method then
a_target.append (" formmethod=%"") a_target.append (" formmethod=%"")
a_target.append (l_method) a_target.append (l_method.to_string_8)
a_target.append_character ('%"') a_target.append_character ('%"')
end end
-- formmethod -- formmethod
if attached formtarget as l_target then if attached formtarget as l_target then
a_target.append (" formtarget=%"") a_target.append (" formtarget=%"")
a_target.append (l_target) a_target.append (l_target.to_string_8)
a_target.append_character ('%"') a_target.append_character ('%"')
end end
end end