Updated code, get rid of obsolete feature calls in libraries and examples
This commit is contained in:
@@ -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 (i.mapping.associated_resource.to_string_32)
|
||||
if attached i.request_methods as mtds then
|
||||
s.append (" [ ")
|
||||
across
|
||||
mtds as mtds_c
|
||||
loop
|
||||
s.append (mtds_c.item)
|
||||
s.append (mtds_c.item.to_string_32)
|
||||
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 (i.mapping.associated_resource.to_string_32)
|
||||
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 (c.item.to_string_32)
|
||||
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.encoded_string (request.request_uri.to_string_32))
|
||||
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.encoded_string (request.request_uri.to_string_32) + "</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
|
||||
@@ -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.encoded_string (request.request_uri.to_string_32) + "'.%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.encoded_string (request.request_uri.to_string_32))
|
||||
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.encoded_string (request.request_uri.to_string_32) + "</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
|
||||
|
||||
Reference in New Issue
Block a user