Fixed wrong assertion, status_committed instead of status_set
This commit is contained in:
@@ -19,6 +19,14 @@ feature {WGI_CONNECTOR, WGI_SERVICE} -- Commit
|
||||
|
||||
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?
|
||||
deferred
|
||||
@@ -49,19 +57,11 @@ feature -- Status setting
|
||||
deferred
|
||||
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 response status code
|
||||
-- Should be done before sending any data back to the client
|
||||
require
|
||||
status_not_set: not status_is_set
|
||||
status_not_set: not status_committed
|
||||
header_not_committed: not header_committed
|
||||
deferred
|
||||
ensure
|
||||
|
||||
@@ -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]])
|
||||
-- Send headers with status `a_status', and headers from `a_headers'
|
||||
require
|
||||
status_not_set: not status_is_set
|
||||
status_not_committed: not status_committed
|
||||
header_not_committed: not header_committed
|
||||
local
|
||||
h: HTTP_HEADER
|
||||
|
||||
Reference in New Issue
Block a user