From 67e6b460b3322b564a0fc88be0702f92952ed5b9 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 1 Feb 2012 16:05:30 +0100 Subject: [PATCH] removed unwanted set_status_code, since we already use put_header to set the status code. --- draft/library/server/request/rest/src/rest_request_handler.e | 1 - library/server/wsf/router/misc/routed_service_helper.e | 3 --- 2 files changed, 4 deletions(-) diff --git a/draft/library/server/request/rest/src/rest_request_handler.e b/draft/library/server/request/rest/src/rest_request_handler.e index 8f0ed70e..9d39cefa 100644 --- a/draft/library/server/request/rest/src/rest_request_handler.e +++ b/draft/library/server/request/rest/src/rest_request_handler.e @@ -71,7 +71,6 @@ feature -- Execution execute_unauthorized (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE) do - res.set_status_code ({HTTP_STATUS_CODE}.unauthorized) res.put_header ({HTTP_STATUS_CODE}.unauthorized, Void) res.put_string ("Unauthorized") end diff --git a/library/server/wsf/router/misc/routed_service_helper.e b/library/server/wsf/router/misc/routed_service_helper.e index 585e7603..c946f1a4 100644 --- a/library/server/wsf/router/misc/routed_service_helper.e +++ b/library/server/wsf/router/misc/routed_service_helper.e @@ -52,7 +52,6 @@ feature -- Helper i := i + 1 end end - res.set_status_code ({HTTP_STATUS_CODE}.unsupported_media_type) res.put_header ({HTTP_STATUS_CODE}.unsupported_media_type, << ["Content-Type", "text/plain"], ["Accept", accept_s]>>) if accept_s /= Void then res.put_string ("Unsupported request content-type, Accept: " + accept_s + "%N") @@ -66,7 +65,6 @@ feature -- Helper local s: STRING do - res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed) create s.make (25) across a_methods as c @@ -77,7 +75,6 @@ feature -- Helper end s.append_string (c.item) end - res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed) res.put_header ({HTTP_STATUS_CODE}.method_not_allowed, << ["Content-Type", {HTTP_MIME_TYPES}.text_plain], ["Allow", s]