fixed compilation of rest example
This commit is contained in:
@@ -65,7 +65,7 @@ feature -- Execution
|
|||||||
(create {DEVELOPER_EXCEPTION}).raise
|
(create {DEVELOPER_EXCEPTION}).raise
|
||||||
elseif l_op.starts_with ("env") then
|
elseif l_op.starts_with ("env") then
|
||||||
s.append_string ("%N%NAll variables:")
|
s.append_string ("%N%NAll variables:")
|
||||||
s.append (wgi_value_iteration_to_string (req.parameters, False))
|
s.append (wgi_value_iteration_to_string (req.items, False))
|
||||||
s.append_string ("<br/>script_url(%"" + req.path_info + "%")=" + ctx.script_url (req.path_info) + "%N")
|
s.append_string ("<br/>script_url(%"" + req.path_info + "%")=" + ctx.script_url (req.path_info) + "%N")
|
||||||
-- if attached ctx.http_authorization_login_password as t then
|
-- if attached ctx.http_authorization_login_password as t then
|
||||||
-- s.append_string ("Check login=" + t.login + "<br/>%N")
|
-- s.append_string ("Check login=" + t.login + "<br/>%N")
|
||||||
|
|||||||
@@ -83,15 +83,15 @@ feature -- Execution
|
|||||||
l_redir_url: STRING
|
l_redir_url: STRING
|
||||||
do
|
do
|
||||||
create h.make
|
create h.make
|
||||||
-- h.put_refresh (ctx.script_url ("/doc"), 2, {HTTP_STATUS_CODE}.temp_redirect)
|
-- h.put_refresh (ctx.script_url ("/doc"), 2)
|
||||||
l_redir_url := "/doc"
|
l_redir_url := "/doc"
|
||||||
h.put_refresh (l_redir_url, 2, {HTTP_STATUS_CODE}.temp_redirect)
|
h.put_refresh (l_redir_url, 2)
|
||||||
h.put_content_type_text_html
|
h.put_content_type_text_html
|
||||||
create s.make_empty
|
create s.make_empty
|
||||||
s := "Request [" + req.path_info + "] is not available. <br/>%N";
|
s := "Request [" + req.path_info + "] is not available. <br/>%N";
|
||||||
s.append ("You are being redirected to <a href=%"" + l_redir_url + "%">/doc</a> in 2 seconds ...%N")
|
s.append ("You are being redirected to <a href=%"" + l_redir_url + "%">/doc</a> in 2 seconds ...%N")
|
||||||
h.put_content_length (s.count)
|
h.put_content_length (s.count)
|
||||||
res.set_status_code (200)
|
res.set_status_code ({HTTP_STATUS_CODE}.temp_redirect)
|
||||||
res.write_headers_string (h.string)
|
res.write_headers_string (h.string)
|
||||||
res.write_string (s)
|
res.write_string (s)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,18 +23,16 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
wgi_value_iteration_to_string (cur: ITERATION_CURSOR [WGI_VALUE]; using_pre: BOOLEAN): STRING_8
|
wgi_value_iteration_to_string (v: ITERABLE [WGI_VALUE]; using_pre: BOOLEAN): STRING_8
|
||||||
do
|
do
|
||||||
create Result.make (100)
|
create Result.make (100)
|
||||||
if using_pre then
|
if using_pre then
|
||||||
Result.append ("<pre>")
|
Result.append ("<pre>")
|
||||||
end
|
end
|
||||||
from
|
across
|
||||||
until
|
v as cur
|
||||||
cur.after
|
|
||||||
loop
|
loop
|
||||||
Result.append_string (cur.item.name.as_string_8 + " = " + cur.item.as_string.as_string_8 + "%N")
|
Result.append_string (cur.item.name.as_string_8 + " = " + cur.item.as_string.as_string_8 + "%N")
|
||||||
cur.forth
|
|
||||||
end
|
end
|
||||||
if using_pre then
|
if using_pre then
|
||||||
Result.append ("</pre>")
|
Result.append ("</pre>")
|
||||||
|
|||||||
Reference in New Issue
Block a user