Fixed wrong assertion, status_committed instead of status_set

This commit is contained in:
Jocelyn Fiat
2012-01-24 16:47:12 +01:00
parent 754d3f670c
commit e6687c7791
2 changed files with 10 additions and 10 deletions

View File

@@ -19,6 +19,14 @@ feature {WGI_CONNECTOR, WGI_SERVICE} -- Commit
feature -- Status report feature -- Status report
status_committed: BOOLEAN
-- Is status code set and committed?
-- i.e: sent to the client and could not be changed anymore
deferred
ensure
committed_implies_set: Result implies status_is_set
end
header_committed: BOOLEAN header_committed: BOOLEAN
-- Header committed? -- Header committed?
deferred deferred
@@ -49,19 +57,11 @@ feature -- Status setting
deferred deferred
end end
status_committed: BOOLEAN
-- Is status code set and committed?
-- i.e: sent to the client and could not be changed anymore
deferred
ensure
committed_implies_set: Result implies status_is_set
end
set_status_code (a_code: INTEGER) set_status_code (a_code: INTEGER)
-- Set response status code -- Set response status code
-- Should be done before sending any data back to the client -- Should be done before sending any data back to the client
require require
status_not_set: not status_is_set status_not_set: not status_committed
header_not_committed: not header_committed header_not_committed: not header_committed
deferred deferred
ensure ensure

View File

@@ -94,7 +94,7 @@ feature -- Header output operation
put_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: READABLE_STRING_8; value: READABLE_STRING_8]]) put_header (a_status_code: INTEGER; a_headers: detachable ARRAY [TUPLE [key: READABLE_STRING_8; value: READABLE_STRING_8]])
-- Send headers with status `a_status', and headers from `a_headers' -- Send headers with status `a_status', and headers from `a_headers'
require require
status_not_set: not status_is_set status_not_committed: not status_committed
header_not_committed: not header_committed header_not_committed: not header_committed
local local
h: HTTP_HEADER h: HTTP_HEADER