refactored to allow etags to work properly when multiple representations are available
This commit is contained in:
@@ -22,7 +22,10 @@ feature -- Basic operations
|
||||
-- Policy routines are available in `a_handler'.
|
||||
do
|
||||
if a_handler.allow_post_to_missing_resource (req) then
|
||||
handle_content_negotiation (req, res, a_handler, True)
|
||||
check attached {HTTP_HEADER} req.execution_variable ("NEGOTIATED_HTTP_HEADER") as h then
|
||||
-- postcondition header_attached of `handle_content_negotiation'
|
||||
send_response (req, res, a_handler, h, True)
|
||||
end
|
||||
else
|
||||
res.send (create {WSF_NOT_FOUND_RESPONSE}.make(req))
|
||||
end
|
||||
@@ -31,9 +34,13 @@ feature -- Basic operations
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
send_response (req: WSF_REQUEST; res: WSF_RESPONSE; a_handler: WSF_SKELETON_HANDLER; a_header: HTTP_HEADER;
|
||||
a_media_type, a_language_type, a_character_type, a_compression_type: detachable READABLE_STRING_8; a_new_resource: BOOLEAN)
|
||||
send_response (req: WSF_REQUEST; res: WSF_RESPONSE; a_handler: WSF_SKELETON_HANDLER; a_header: HTTP_HEADER; a_new_resource: BOOLEAN)
|
||||
-- Write response to `req' into `res' in accordance with `a_media_type' etc. as a new URI.
|
||||
-- Upto four execution variables may be set on `req':
|
||||
-- "NEGOTIATED_MEDIA_TYPE"
|
||||
-- "NEGOTIATED_LANGUAGE"
|
||||
-- "NEGOTIATED_CHARSET"
|
||||
-- "NEGOTIATED_ENCODING"
|
||||
local
|
||||
l_code: NATURAL
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user