Update delete method to hanlde method not allowed.

Added method not allowed to request resource handler helper class.
Update gitmodules
This commit is contained in:
jvelilla
2011-10-23 09:05:12 -03:00
parent 9f53287226
commit 6344f964fa
3 changed files with 20 additions and 7 deletions

View File

@@ -239,6 +239,23 @@ feature -- Handle responses
res.write_string (a_description)
end
handle_method_not_allowed_response (a_description:STRING; ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER )
local
h : EWF_HEADER
do
create h.make
h.put_status ({HTTP_STATUS_CODE}.method_not_allowed)
if attached ctx.request_content_type (supported_content_types) as l_content_type then
h.put_content_type (l_content_type)
else
h.put_content_type ("*/*")
end
h.put_content_length (a_description.count)
h.put_current_date
res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed)
res.write_headers_string (h.string)
res.write_string (a_description)
end
handle_resource_not_found_response (a_description:STRING; ctx: C; req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER)
local
h : EWF_HEADER