From a4df57a7ac77de1007e2b544e4c142d85b54abad Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Mon, 26 Sep 2011 20:54:04 +0200 Subject: [PATCH] fixed compilation of rest example --- library/server/request/rest/tests/src/app/app_test.e | 2 +- library/server/request/rest/tests/src/app_server.e | 6 +++--- .../request/rest/tests/src/handler/app_request_handler.e | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/library/server/request/rest/tests/src/app/app_test.e b/library/server/request/rest/tests/src/app/app_test.e index 031044c5..1b54ae5e 100644 --- a/library/server/request/rest/tests/src/app/app_test.e +++ b/library/server/request/rest/tests/src/app/app_test.e @@ -65,7 +65,7 @@ feature -- Execution (create {DEVELOPER_EXCEPTION}).raise elseif l_op.starts_with ("env") then 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 ("
script_url(%"" + req.path_info + "%")=" + ctx.script_url (req.path_info) + "%N") -- if attached ctx.http_authorization_login_password as t then -- s.append_string ("Check login=" + t.login + "
%N") diff --git a/library/server/request/rest/tests/src/app_server.e b/library/server/request/rest/tests/src/app_server.e index 51c6399e..0da1ce72 100644 --- a/library/server/request/rest/tests/src/app_server.e +++ b/library/server/request/rest/tests/src/app_server.e @@ -83,15 +83,15 @@ feature -- Execution l_redir_url: STRING do 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" - 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 create s.make_empty s := "Request [" + req.path_info + "] is not available.
%N"; s.append ("You are being redirected to /doc in 2 seconds ...%N") 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_string (s) end diff --git a/library/server/request/rest/tests/src/handler/app_request_handler.e b/library/server/request/rest/tests/src/handler/app_request_handler.e index 71214e66..1c5e8116 100644 --- a/library/server/request/rest/tests/src/handler/app_request_handler.e +++ b/library/server/request/rest/tests/src/handler/app_request_handler.e @@ -23,18 +23,16 @@ feature {NONE} -- Initialization 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 create Result.make (100) if using_pre then Result.append ("
")
 			end
-			from
-			until
-				cur.after
+			across
+				 v as cur
 			loop
 				Result.append_string (cur.item.name.as_string_8 + " = " + cur.item.as_string.as_string_8 + "%N")
-				cur.forth
 			end
 			if using_pre then
 				Result.append ("
")