Removed HTTP_HEADER.put_status (...)
It is not recommended to send the status code as part of the HTTP Header, so let's remove this ambiguity and do not encourage EWF user to use it
This commit is contained in:
@@ -12,7 +12,6 @@ note
|
|||||||
(or HTTP_CONSTANTS which groups them for convenience)
|
(or HTTP_CONSTANTS which groups them for convenience)
|
||||||
|
|
||||||
Note the return status code is not part of the HTTP header
|
Note the return status code is not part of the HTTP header
|
||||||
However you can set the "Status: " header line if you want
|
|
||||||
]"
|
]"
|
||||||
legal: "See notice at end of class."
|
legal: "See notice at end of class."
|
||||||
status: "See notice at end of class."
|
status: "See notice at end of class."
|
||||||
@@ -25,11 +24,6 @@ class
|
|||||||
inherit
|
inherit
|
||||||
ANY
|
ANY
|
||||||
|
|
||||||
HTTP_STATUS_CODE_MESSAGES --| useful for `put_status'
|
|
||||||
export
|
|
||||||
{NONE} all
|
|
||||||
end
|
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make,
|
||||||
make_with_count,
|
make_with_count,
|
||||||
@@ -128,7 +122,7 @@ feature -- Header: filling
|
|||||||
loop
|
loop
|
||||||
add_header (c.item.string)
|
add_header (c.item.string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Header change: general
|
feature -- Header change: general
|
||||||
|
|
||||||
@@ -162,22 +156,6 @@ feature -- Header change: general
|
|||||||
put_header (k + colon_space + v)
|
put_header (k + colon_space + v)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Status related
|
|
||||||
|
|
||||||
put_status (c: INTEGER)
|
|
||||||
-- Put "Status: " header
|
|
||||||
-- Rarely used
|
|
||||||
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
|
|
||||||
|
|
||||||
feature -- Content related header
|
feature -- Content related header
|
||||||
|
|
||||||
put_content_type (t: READABLE_STRING_8)
|
put_content_type (t: READABLE_STRING_8)
|
||||||
@@ -581,7 +559,7 @@ feature {NONE} -- Constants
|
|||||||
semi_colon_space: STRING = "; "
|
semi_colon_space: STRING = "; "
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2012, Eiffel Software and others"
|
copyright: "2011-2012, Jocelyn Fiat, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
Reference in New Issue
Block a user