Improved comment in WSF_RESPONSE.put_response (..)

Added WSF_REDIRECTION_RESPONSE class
This commit is contained in:
Jocelyn Fiat
2012-03-19 12:32:12 +01:00
parent 487487ad44
commit 4906345a62
2 changed files with 121 additions and 5 deletions

View File

@@ -185,15 +185,20 @@ feature -- Output operation
wgi_response.flush
end
feature -- Helper
feature -- Response object
put_response (obj: WSF_RESPONSE_MESSAGE)
-- Set `obj' as the whole response to the client
--| `obj' is responsible to sent the status code, the header and the content
require
not header_committed
not status_is_set
not message_committed
header_not_committed: not header_committed
status_not_committed: not status_committed
no_message_committed: not message_committed
do
obj.send_to (Current)
ensure
status_committed: status_committed
header_committed: header_committed
end
feature -- Redirect
@@ -201,7 +206,7 @@ feature -- Redirect
redirect_now_custom (a_url: READABLE_STRING_8; a_status_code: INTEGER; a_header: detachable HTTP_HEADER; a_content: detachable TUPLE [body: READABLE_STRING_8; type: READABLE_STRING_8])
-- Redirect to the given url `a_url' and precise custom `a_status_code', custom header and content
-- Please see http://www.faqs.org/rfcs/rfc2616 to use proper status code.
-- if `a_status_code' is 0, use the default {HTTP_STATUS_CODE}.moved_permanently
-- if `a_status_code' is 0, use the default {HTTP_STATUS_CODE}.temp_redirect
require
header_not_committed: not header_committed
local