Fixed compilation of draft/library/server/request/rest/tests/..
Note the "rest" library will not be maintained since this is not REST.
This commit is contained in:
@@ -48,8 +48,8 @@ feature -- Execution
|
|||||||
lst: LIST [STRING]
|
lst: LIST [STRING]
|
||||||
do
|
do
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.unauthorized)
|
res.set_status_code ({HTTP_STATUS_CODE}.unauthorized)
|
||||||
res.write_header ({HTTP_STATUS_CODE}.unauthorized, <<["WWW-Authenticate", "Basic realm=%"My Silly demo auth, password must be the same as login such as foo:foo%""]>>)
|
res.put_header ({HTTP_STATUS_CODE}.unauthorized, <<["WWW-Authenticate", "Basic realm=%"My Silly demo auth, password must be the same as login such as foo:foo%""]>>)
|
||||||
res.write_string ("Unauthorized")
|
res.put_string ("Unauthorized")
|
||||||
end
|
end
|
||||||
|
|
||||||
execute_application (ctx: APP_REQUEST_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
|
execute_application (ctx: APP_REQUEST_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
@@ -88,8 +88,8 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
if not s.is_empty then
|
if not s.is_empty then
|
||||||
res.set_status_code ({HTTP_STATUS_CODE}.ok)
|
res.set_status_code ({HTTP_STATUS_CODE}.ok)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (s)
|
res.put_string (s)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
send_error (ctx.path, 0, "User/password unknown", Void, ctx, req, res)
|
send_error (ctx.path, 0, "User/password unknown", Void, ctx, req, res)
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
|
|
||||||
res.set_status_code (200)
|
res.set_status_code (200)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (s)
|
res.put_string (s)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ feature -- Execution
|
|||||||
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 ({HTTP_STATUS_CODE}.temp_redirect)
|
res.set_status_code ({HTTP_STATUS_CODE}.temp_redirect)
|
||||||
res.write_header_text (h.string)
|
res.put_header_text (h.string)
|
||||||
res.write_string (s)
|
res.put_string (s)
|
||||||
end
|
end
|
||||||
|
|
||||||
request_count: INTEGER
|
request_count: INTEGER
|
||||||
@@ -128,12 +128,12 @@ feature -- Implementation
|
|||||||
s: STRING
|
s: STRING
|
||||||
do
|
do
|
||||||
res.set_status_code (200)
|
res.set_status_code (200)
|
||||||
res.write_header (200, <<["Content-Type", "text/html"]>>)
|
res.put_header (200, <<["Content-Type", "text/html"]>>)
|
||||||
|
|
||||||
create s.make_empty
|
create s.make_empty
|
||||||
s.append_string ("Exited")
|
s.append_string ("Exited")
|
||||||
s.append_string (" <a href=%"" + ctx.script_url ("/") + "%">start again</a>%N")
|
s.append_string (" <a href=%"" + ctx.script_url ("/") + "%">start again</a>%N")
|
||||||
res.write_string (s)
|
res.put_string (s)
|
||||||
exit_with_code (0)
|
exit_with_code (0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user