diff --git a/library/server/ewsgi/specification/response/ewsgi_response_buffer.e b/library/server/ewsgi/specification/response/ewsgi_response_buffer.e index 9044414a..e4a1bb5e 100644 --- a/library/server/ewsgi/specification/response/ewsgi_response_buffer.e +++ b/library/server/ewsgi/specification/response/ewsgi_response_buffer.e @@ -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)" diff --git a/library/server/ewsgi/src/extra/response_as_result/ewsgi_response_application.e b/library/server/ewsgi/src/extra/response_as_result/ewsgi_response_application.e index 5c717e37..2be15d32 100644 --- a/library/server/ewsgi/src/extra/response_as_result/ewsgi_response_application.e +++ b/library/server/ewsgi/src/extra/response_as_result/ewsgi_response_application.e @@ -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 diff --git a/library/server/ewsgi/src/response/ewsgi_response_buffer.e b/library/server/ewsgi/src/response/ewsgi_response_buffer.e index 50835e14..1ee7f5a0 100644 --- a/library/server/ewsgi/src/response/ewsgi_response_buffer.e +++ b/library/server/ewsgi/src/response/ewsgi_response_buffer.e @@ -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