Use HTTP_HEADER instead of WSF_HEADER
(WSF_HEADER is kept for convenience and existing code)
This commit is contained in:
@@ -31,7 +31,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
headers: WSF_HEADER
|
||||
headers: HTTP_HEADER
|
||||
|
||||
feature -- Recycle
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ feature -- Recycle
|
||||
|
||||
feature -- Access
|
||||
|
||||
headers: WSF_HEADER
|
||||
headers: HTTP_HEADER
|
||||
|
||||
api: STRING
|
||||
-- Associated api query string.
|
||||
|
||||
@@ -55,7 +55,7 @@ feature -- Execution
|
||||
execute_application (ctx: APP_REQUEST_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
l_full: BOOLEAN
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
l_login: STRING_8
|
||||
s: STRING
|
||||
content_type_supported: ARRAY [STRING]
|
||||
|
||||
@@ -42,7 +42,7 @@ feature -- Execution
|
||||
-- Execute request handler
|
||||
local
|
||||
s: STRING
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_content_type_text_plain
|
||||
|
||||
@@ -78,7 +78,7 @@ feature -- Execution
|
||||
local
|
||||
rqst_uri: detachable STRING
|
||||
l_path_info: detachable STRING
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
s: STRING
|
||||
l_redir_url: STRING
|
||||
do
|
||||
@@ -108,7 +108,7 @@ feature -- Implementation
|
||||
|
||||
-- execute_exception_trace (ctx: like new_request_context)
|
||||
-- local
|
||||
-- h: WSF_HEADER
|
||||
-- h: HTTP_HEADER
|
||||
-- s: STRING
|
||||
-- do
|
||||
-- create h.make
|
||||
|
||||
@@ -84,7 +84,7 @@ feature -- Execution
|
||||
|
||||
execute_default (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
l_url: STRING
|
||||
e: EXECUTION_ENVIRONMENT
|
||||
n: INTEGER
|
||||
@@ -171,7 +171,7 @@ feature -- Execution
|
||||
execute_hello (req: WSF_REQUEST; res: WSF_RESPONSE; a_name: detachable READABLE_STRING_32; ctx: REQUEST_HANDLER_CONTEXT)
|
||||
local
|
||||
l_response_content_type: detachable STRING
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
content_type_supported: ARRAY [STRING]
|
||||
l_body: STRING_8
|
||||
do
|
||||
|
||||
@@ -76,7 +76,7 @@ feature -- HTTP Methods
|
||||
|
||||
compute_response_get (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE; l_order : ORDER)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
l_msg : STRING
|
||||
etag_utils : ETAG_UTILS
|
||||
do
|
||||
@@ -152,7 +152,7 @@ feature -- HTTP Methods
|
||||
|
||||
compute_response_put (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE; l_order : ORDER)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
joc : JSON_ORDER_CONVERTER
|
||||
etag_utils : ETAG_UTILS
|
||||
do
|
||||
@@ -205,7 +205,7 @@ feature -- HTTP Methods
|
||||
|
||||
compute_response_delete (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.no_content)
|
||||
@@ -241,7 +241,7 @@ feature -- HTTP Methods
|
||||
|
||||
compute_response_post (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE; l_order : ORDER)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
l_msg : STRING
|
||||
l_location : STRING
|
||||
joc : JSON_ORDER_CONVERTER
|
||||
|
||||
@@ -48,7 +48,7 @@ feature -- Execution
|
||||
-- in the case that the given uri does not have a corresponding http method
|
||||
-- to handle it.
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
l_description : STRING
|
||||
l_api_doc : STRING
|
||||
do
|
||||
|
||||
@@ -169,7 +169,7 @@ feature -- Handle responses
|
||||
|
||||
handle_bad_request_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.bad_request)
|
||||
@@ -184,7 +184,7 @@ feature -- Handle responses
|
||||
|
||||
handle_precondition_fail_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.precondition_failed)
|
||||
@@ -198,7 +198,7 @@ feature -- Handle responses
|
||||
|
||||
handle_internal_server_error (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.internal_server_error)
|
||||
@@ -212,7 +212,7 @@ feature -- Handle responses
|
||||
|
||||
handle_not_implemented (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE )
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.not_implemented)
|
||||
@@ -226,7 +226,7 @@ feature -- Handle responses
|
||||
|
||||
handle_method_not_allowed_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.method_not_allowed)
|
||||
@@ -240,7 +240,7 @@ feature -- Handle responses
|
||||
|
||||
handle_resource_not_found_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.not_found)
|
||||
@@ -255,7 +255,7 @@ feature -- Handle responses
|
||||
|
||||
handle_resource_not_modified_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
res.flush
|
||||
create h.make
|
||||
@@ -271,7 +271,7 @@ feature -- Handle responses
|
||||
|
||||
handle_resource_conflict_response (a_description: STRING; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h : WSF_HEADER
|
||||
h : HTTP_HEADER
|
||||
do
|
||||
create h.make
|
||||
h.put_status ({HTTP_STATUS_CODE}.conflict)
|
||||
|
||||
@@ -48,7 +48,7 @@ feature -- Execution
|
||||
execute (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute request handler
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
s: STRING
|
||||
uri: STRING
|
||||
do
|
||||
@@ -92,7 +92,7 @@ feature -- Execution
|
||||
|
||||
respond_index (a_uri: READABLE_STRING_8; dn: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
uri, s: STRING_8
|
||||
d: DIRECTORY
|
||||
l_files: LIST [STRING_8]
|
||||
@@ -148,7 +148,7 @@ feature -- Execution
|
||||
respond_file (f: FILE; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
fn: READABLE_STRING_8
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
ext: READABLE_STRING_8
|
||||
ct: detachable READABLE_STRING_8
|
||||
do
|
||||
@@ -177,7 +177,7 @@ feature -- Execution
|
||||
|
||||
respond_not_found (uri: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
s: STRING_8
|
||||
do
|
||||
create h.make
|
||||
@@ -193,7 +193,7 @@ feature -- Execution
|
||||
|
||||
respond_access_denied (uri: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
s: STRING_8
|
||||
do
|
||||
create h.make
|
||||
|
||||
@@ -22,6 +22,8 @@ note
|
||||
class
|
||||
WSF_HEADER
|
||||
|
||||
obsolete "Use HTTP_HEADER [2011-nov-25]"
|
||||
|
||||
inherit
|
||||
HTTP_HEADER
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ feature -- Header output operation
|
||||
status_not_set: not status_is_set
|
||||
header_not_committed: not header_committed
|
||||
local
|
||||
h: WSF_HEADER
|
||||
h: HTTP_HEADER
|
||||
i,n: INTEGER
|
||||
do
|
||||
set_status_code (a_status_code)
|
||||
|
||||
Reference in New Issue
Block a user