From 84d1f20fd044a65e60395d1c24b781d39eddea85 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Mon, 22 Oct 2012 11:15:52 +0200 Subject: [PATCH] Do not set default status if a status is already set. --- library/server/wsf/src/wsf_response.e | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/library/server/wsf/src/wsf_response.e b/library/server/wsf/src/wsf_response.e index 91022161..51b703dc 100644 --- a/library/server/wsf/src/wsf_response.e +++ b/library/server/wsf/src/wsf_response.e @@ -290,6 +290,7 @@ feature -- Redirect header_not_committed: not header_committed local h: HTTP_HEADER + b: READABLE_STRING_8 do if header_committed then -- This might be a trouble about content-length @@ -302,15 +303,18 @@ feature -- Redirect end h.put_location (a_url) if a_status_code = 0 then - set_status_code ({HTTP_STATUS_CODE}.temp_redirect) + if not status_is_set then + set_status_code ({HTTP_STATUS_CODE}.temp_redirect) + end else set_status_code (a_status_code) end if a_content /= Void then - h.put_content_length (a_content.body.count) + b := a_content.body + h.put_content_length (b.count) h.put_content_type (a_content.type) put_header_text (h.string) - put_string (a_content.body) + put_string (b) else h.put_content_length (0) put_header_text (h.string)