Added the possibility to set the "Status" header (different from the status line) in GW_HEADER
Renamed EWSGI_RESPONSE as EWSGI_RESPONSE_STREAM to avoid confusion with EWSGI_RESPONSE as stated in Paul's proposal Added default "configuration" (for nino and cgi) to be independant of the connector (at compilation time) Added example implementing Paul's proposal on top of EWSGI
This commit is contained in:
@@ -12,6 +12,14 @@ note
|
||||
class
|
||||
GW_HEADER
|
||||
|
||||
inherit
|
||||
ANY
|
||||
|
||||
HTTP_STATUS_CODE_MESSAGES
|
||||
export
|
||||
{NONE} all
|
||||
end
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
@@ -84,6 +92,18 @@ feature -- Header change: general
|
||||
|
||||
feature -- Content related header
|
||||
|
||||
put_status (c: INTEGER)
|
||||
local
|
||||
s: STRING
|
||||
do
|
||||
create s.make_from_string (c.out)
|
||||
if attached http_status_code_message (c) as msg then
|
||||
s.append_character (' ')
|
||||
s.append (msg)
|
||||
end
|
||||
put_header_key_value ("Status", s)
|
||||
end
|
||||
|
||||
put_content_type (t: STRING)
|
||||
do
|
||||
put_header_key_value (name_content_type, t)
|
||||
|
||||
Reference in New Issue
Block a user