code cleaning, and prepare for internal review
This commit is contained in:
@@ -67,34 +67,6 @@ feature -- Status setting
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Output operation
|
||||
|
||||
flush
|
||||
-- Flush if it makes sense
|
||||
deferred
|
||||
end
|
||||
|
||||
write_string (s: STRING)
|
||||
-- Send the string `s'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
write_substring (s: STRING; a_begin_index, a_end_index: INTEGER)
|
||||
-- Send the substring `s[a_begin_index:a_end_index]'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
write_file_content (fn: STRING)
|
||||
-- Send the content of file `fn'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Header output operation
|
||||
|
||||
write_headers_string (a_headers: STRING)
|
||||
@@ -118,6 +90,34 @@ feature -- Header output operation
|
||||
status_set: status_is_set
|
||||
end
|
||||
|
||||
feature -- Output operation
|
||||
|
||||
write_string (s: STRING)
|
||||
-- Send the string `s'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
write_substring (s: STRING; a_begin_index, a_end_index: INTEGER)
|
||||
-- Send the substring `s[a_begin_index:a_end_index]'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
write_file_content (fn: STRING)
|
||||
-- Send the content of file `fn'
|
||||
require
|
||||
message_writable: message_writable
|
||||
deferred
|
||||
end
|
||||
|
||||
flush
|
||||
-- Flush if it makes sense
|
||||
deferred
|
||||
end
|
||||
|
||||
note
|
||||
copyright: "2011-2011, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user