code cleaning, and prepare for internal review

This commit is contained in:
Jocelyn Fiat
2011-08-18 12:25:40 +02:00
parent 40018d36eb
commit ec6cc5f2b8
3 changed files with 60 additions and 61 deletions

View File

@@ -17,7 +17,6 @@ feature -- Execution
-- and `res.output' for output stream
local
rs: EWSGI_RESPONSE
s: STRING
do
rs := response (req)
if rs.ready_to_transmit then

View File

@@ -81,38 +81,6 @@ feature -- Status setting
status_code: INTEGER
-- Response status
feature -- Output operation
flush
do
output.flush
end
write_string (s: STRING)
-- Send the string `s'
require
message_writable: message_writable
do
write (s)
end
write_substring (s: STRING; start_index, end_index: INTEGER)
-- Send the substring `start_index:end_index]'
--| Could be optimized according to the target output
require
message_writable: message_writable
do
output.put_substring (s, start_index, end_index)
end
write_file_content (fn: STRING)
-- Send the content of file `fn'
require
message_writable: message_writable
do
output.put_file_content (fn)
end
feature -- Header output operation
write_headers_string (a_headers: STRING)
@@ -156,6 +124,38 @@ feature -- Header output operation
header_committed: header_committed
end
feature -- Output operation
write_string (s: STRING)
-- Send the string `s'
require
message_writable: message_writable
do
write (s)
end
write_substring (s: STRING; start_index, end_index: INTEGER)
-- Send the substring `start_index:end_index]'
--| Could be optimized according to the target output
require
message_writable: message_writable
do
output.put_substring (s, start_index, end_index)
end
write_file_content (fn: STRING)
-- Send the content of file `fn'
require
message_writable: message_writable
do
output.put_file_content (fn)
end
flush
do
output.flush
end
feature {NONE} -- Implementation: Access
output: EWSGI_OUTPUT_STREAM