merging from upstream - stage 1

This commit is contained in:
Colin Adams
2013-03-26 17:04:49 +00:00
90 changed files with 1257 additions and 936 deletions

View File

@@ -14,7 +14,8 @@ inherit
put_string,
put_substring,
flush,
message_writable
message_writable,
message_committed
end
WSF_RESPONSE_EXPORTER
@@ -36,10 +37,10 @@ feature {NONE} -- Implementation
commit
do
Precursor
if not header_committed then
process_header
end
Precursor
end
process_header
@@ -65,6 +66,12 @@ feature -- Status report
message_writable: BOOLEAN = True
-- Can message be written?
message_committed: BOOLEAN
-- <Precursor>
do
Result := header_committed
end
feature -- Output operation
put_character (c: CHARACTER_8)

View File

@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
url_location := a_url_location
delay := a_delay_in_seconds
make_html
set_status_code ({HTTP_STATUS_CODE}.found)
status_code := {HTTP_STATUS_CODE}.found
end
feature -- Header
@@ -65,7 +65,7 @@ feature {NONE} -- Output
end
note
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -197,7 +197,7 @@ feature {NONE} -- HTML Generation
end
note
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -18,7 +18,7 @@ feature {NONE} -- Initialization
make (a_url_location: like url_location)
do
status_code := {HTTP_STATUS_CODE}.ok
status_code := {HTTP_STATUS_CODE}.found
url_location := a_url_location
create header.make
end
@@ -100,7 +100,7 @@ feature {WSF_RESPONSE} -- Output
end
note
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -252,23 +252,23 @@ feature -- Header output operation: helpers
message_writable: message_writable
end
put_header_lines (a_lines: ITERABLE [TUPLE [name: READABLE_STRING_8; value: READABLE_STRING_8]])
put_header_lines (a_lines: ITERABLE [READABLE_STRING_8])
-- Put headers from `a_lines'
require
header_not_committed: not header_committed
do
across a_lines as c loop
put_header_line (c.item.name + ": " + c.item.value)
put_header_line (c.item)
end
end
add_header_lines (a_lines: ITERABLE [TUPLE [name: READABLE_STRING_8; value: READABLE_STRING_8]])
add_header_lines (a_lines: ITERABLE [READABLE_STRING_8])
-- Add headers from `a_lines'
require
header_not_committed: not header_committed
do
across a_lines as c loop
add_header_line (c.item.name + ": " + c.item.value)
add_header_line (c.item)
end
end
@@ -409,8 +409,7 @@ feature -- Response object
do
a_message.send_to (Current)
ensure
status_committed: status_committed
header_committed: header_committed
status_committed: status_is_set
end
feature -- Redirect

View File

@@ -26,11 +26,10 @@ feature {WSF_RESPONSE} -- Output
deferred
ensure
res_status_set: res.status_is_set
res_header_committed: res.header_committed
end
note
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software