Use HTTP_HEADER instead of WSF_HEADER

(WSF_HEADER is kept for convenience and existing code)
This commit is contained in:
Jocelyn Fiat
2011-11-25 15:53:15 +01:00
parent 48d4d26cda
commit 42be0b2a4e
12 changed files with 29 additions and 27 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -22,6 +22,8 @@ note
class
WSF_HEADER
obsolete "Use HTTP_HEADER [2011-nov-25]"
inherit
HTTP_HEADER

View File

@@ -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)