Removed WGI_RESPONSE.write (..)
Replaced any internal call to WGI_RESPONSE.write () by the associated implementation (i.e output.put_string (...) ) Added WGI_OUTPUT_STREAM.put_crlf Renamed WSF_RESPONSE.put_response (a_message) as `send (a_message)' WSF_RESPONSE_MESSAGE.send_to (res) is now exported only to WSF_RESPONSE
This commit is contained in:
@@ -185,7 +185,7 @@ feature -- Execution
|
||||
fres.set_status_code ({HTTP_STATUS_CODE}.ok)
|
||||
fres.set_answer_head_request_method (req.request_method.same_string ({HTTP_REQUEST_METHODS}.method_head))
|
||||
|
||||
res.put_response (fres)
|
||||
res.send (fres)
|
||||
end
|
||||
|
||||
respond_not_found (uri: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
|
||||
@@ -32,7 +32,7 @@ feature -- Implementation
|
||||
execute (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute request handler
|
||||
do
|
||||
response (ctx, req).send_to (res)
|
||||
res.send (response (ctx, req))
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
@@ -150,7 +150,7 @@ feature -- Element change
|
||||
update_content_length
|
||||
end
|
||||
|
||||
feature -- Basic operations
|
||||
feature {WSF_RESPONSE} -- Output
|
||||
|
||||
send_to (res: WSF_RESPONSE)
|
||||
local
|
||||
|
||||
@@ -110,7 +110,7 @@ feature -- Element change
|
||||
body := b
|
||||
end
|
||||
|
||||
feature -- Output
|
||||
feature {WSF_RESPONSE} -- Output
|
||||
|
||||
send_to (res: WSF_RESPONSE)
|
||||
local
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WSF_PAGE_RESPONSE}."
|
||||
description: "[
|
||||
|
||||
]"
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -77,7 +79,7 @@ feature -- Element change
|
||||
l_body.append (a_string)
|
||||
end
|
||||
|
||||
feature -- Output
|
||||
feature {WSF_RESPONSE} -- Output
|
||||
|
||||
send_to (res: WSF_RESPONSE)
|
||||
local
|
||||
|
||||
@@ -69,7 +69,7 @@ feature -- Element change
|
||||
content_type := Void
|
||||
end
|
||||
|
||||
feature -- Output
|
||||
feature {WSF_RESPONSE} -- Output
|
||||
|
||||
send_to (res: WSF_RESPONSE)
|
||||
local
|
||||
|
||||
@@ -187,15 +187,31 @@ feature -- Output operation
|
||||
|
||||
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
|
||||
put_response (a_message: WSF_RESPONSE_MESSAGE)
|
||||
-- Set `a_message' as the whole response to the client
|
||||
--| `a_message' is responsible to sent the status code, the header and the content
|
||||
obsolete
|
||||
"[2012-Mars-19] Use `send (a_message)' "
|
||||
require
|
||||
header_not_committed: not header_committed
|
||||
status_not_committed: not status_committed
|
||||
no_message_committed: not message_committed
|
||||
do
|
||||
obj.send_to (Current)
|
||||
a_message.send_to (Current)
|
||||
ensure
|
||||
status_committed: status_committed
|
||||
header_committed: header_committed
|
||||
end
|
||||
|
||||
send (a_message: WSF_RESPONSE_MESSAGE)
|
||||
-- Set `a_message' as the whole response to the client
|
||||
--| `a_message' is responsible to sent the status code, the header and the content
|
||||
require
|
||||
header_not_committed: not header_committed
|
||||
status_not_committed: not status_committed
|
||||
no_message_committed: not message_committed
|
||||
do
|
||||
a_message.send_to (Current)
|
||||
ensure
|
||||
status_committed: status_committed
|
||||
header_committed: header_committed
|
||||
|
||||
@@ -7,10 +7,17 @@ note
|
||||
deferred class
|
||||
WSF_RESPONSE_MESSAGE
|
||||
|
||||
feature -- Output
|
||||
feature {WSF_RESPONSE} -- Output
|
||||
|
||||
send_to (res: WSF_RESPONSE)
|
||||
require
|
||||
header_not_committed: not res.header_committed
|
||||
status_not_committed: not res.status_committed
|
||||
no_message_committed: not res.message_committed
|
||||
deferred
|
||||
ensure
|
||||
res_status_set: res.status_is_set
|
||||
res_header_committed: res.header_committed
|
||||
end
|
||||
|
||||
note
|
||||
|
||||
Reference in New Issue
Block a user