Completed first pass for HTTP 1.1 conformace contracts

This commit is contained in:
Colin Adams
2012-11-24 15:45:42 +00:00
parent 68cd78d87d
commit a9d83f97a8
5 changed files with 39 additions and 7 deletions

View File

@@ -49,7 +49,30 @@ inherit
feature -- Method
do_head (a_req: WSF_REQUEST; a_res: WSF_RESPONSE)
-- Respond to `a_req' using `a_res'.
deferred
ensure then
empty_body: is_empty_content (a_res)
end
do_post (a_req: WSF_REQUEST; a_res: WSF_RESPONSE)
-- Respond to `a_req' using `a_res'.
deferred
ensure then
non_empty_body: a_res.status_code = {HTTP_STATUS_CODE}.created implies
not is_empty_content (a_res)
location_header: a_res.status_code = {HTTP_STATUS_CODE}.created implies True -- WSF_RESPONSE needs enhancing
end
do_trace (a_req: WSF_REQUEST; a_res: WSF_RESPONSE)
-- Respond to `a_req' using `a_res'.
deferred
ensure then
non_empty_body: a_res.status_code = {HTTP_STATUS_CODE}.ok implies
not is_empty_content (a_res)
end
end