Simplified EWSGI interfaces
Renamed WGI_RESPONSE_BUFFER as WGI_RESPONSE to avoid confusion
Removed EWF_HEADER and removed related caller from WGI implementation,
now this is only part of WSF library
Added wgi_version, wgi_implementation and wgi_connector to the WGI_REQUEST interface
to give more information to the user
Added back WGI_CONNECTOR to WGI specification, mainly because of `{WGI_REQUEST}.wgi_connector'
simplified WGI_CONNECTOR to contain for now only `name' and `version'
if the implementation of connector inherit from WGI_CONNECTOR (recommended)
this might gives more access to the user using a reverse assignment for specific needs
(but this usage is not recommended due to portability issue on other connector)
Removed useless connector.ecf since now EWF/WGI library provides the helper classes
This commit is contained in:
@@ -12,16 +12,17 @@ create {WSF_SERVICE}
|
||||
make_from_wgi
|
||||
|
||||
convert
|
||||
make_from_wgi ({WGI_RESPONSE_BUFFER})
|
||||
make_from_wgi ({WGI_RESPONSE})
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make_from_wgi (r: WGI_RESPONSE_BUFFER)
|
||||
make_from_wgi (r: WGI_RESPONSE)
|
||||
do
|
||||
wgi_response := r
|
||||
end
|
||||
|
||||
wgi_response: WGI_RESPONSE_BUFFER
|
||||
wgi_response: WGI_RESPONSE
|
||||
-- Associated WGI_RESPONSE
|
||||
|
||||
feature -- Status report
|
||||
|
||||
@@ -77,7 +78,7 @@ feature -- Header output operation
|
||||
status_set: status_is_set
|
||||
header_not_committed: not header_committed
|
||||
do
|
||||
wgi_response.write_headers_string (a_headers)
|
||||
wgi_response.write_headers (a_headers)
|
||||
ensure
|
||||
status_set: status_is_set
|
||||
header_committed: header_committed
|
||||
@@ -89,8 +90,24 @@ feature -- Header output operation
|
||||
require
|
||||
status_not_set: not status_is_set
|
||||
header_not_committed: not header_committed
|
||||
local
|
||||
h: WSF_HEADER
|
||||
i,n: INTEGER
|
||||
do
|
||||
wgi_response.write_header (a_status_code, a_headers)
|
||||
set_status_code (a_status_code)
|
||||
create h.make
|
||||
if a_headers /= Void then
|
||||
from
|
||||
i := a_headers.lower
|
||||
n := a_headers.upper
|
||||
until
|
||||
i > n
|
||||
loop
|
||||
h.put_header_key_value (a_headers[i].key, a_headers[i].value)
|
||||
i := i + 1
|
||||
end
|
||||
end
|
||||
wgi_response.write_headers (h.string)
|
||||
ensure
|
||||
header_committed: header_committed
|
||||
status_set: status_is_set
|
||||
|
||||
Reference in New Issue
Block a user