Use new upstrem method put_header_key_values

This commit is contained in:
Olivier Ligot
2013-03-15 13:38:40 +01:00
parent 496b831956
commit 45f0971594
2 changed files with 1 additions and 23 deletions

View File

@@ -320,25 +320,6 @@ feature -- Header change: general
end end
end end
put_header_key_methods (k: READABLE_STRING_8; a_methods: ITERABLE [READABLE_STRING_8])
-- Add header `k: a_methods', or replace existing header of same header methods/key
local
s: STRING_8
do
create s.make_empty
across
a_methods as c
loop
if not s.is_empty then
s.append_string (", ")
end
s.append (c.item)
end
if not s.is_empty then
put_header_key_value (k, s)
end
end
feature -- Content related header feature -- Content related header
put_content_type (t: READABLE_STRING_8) put_content_type (t: READABLE_STRING_8)
@@ -540,7 +521,7 @@ feature -- Cross-Origin Resource Sharing
put_access_control_allow_methods (a_methods: ITERABLE [READABLE_STRING_8]) put_access_control_allow_methods (a_methods: ITERABLE [READABLE_STRING_8])
-- If `a_methods' is not empty, put `Access-Control-Allow-Methods' header with list `a_methods' of methods -- If `a_methods' is not empty, put `Access-Control-Allow-Methods' header with list `a_methods' of methods
do do
put_header_key_methods ({HTTP_HEADER_NAMES}.header_access_control_allow_methods, a_methods) put_header_key_values ({HTTP_HEADER_NAMES}.header_access_control_allow_methods, a_methods, Void)
end end
put_access_control_allow_headers (s: READABLE_STRING_8) put_access_control_allow_headers (s: READABLE_STRING_8)

View File

@@ -187,9 +187,6 @@ feature -- Header output operation
header_not_committed: not header_committed header_not_committed: not header_committed
a_text_ends_with_single_crlf: a_text.count > 2 implies not a_text.substring (a_text.count - 2, a_text.count).same_string ("%R%N") a_text_ends_with_single_crlf: a_text.count > 2 implies not a_text.substring (a_text.count - 2, a_text.count).same_string ("%R%N")
a_text_does_not_end_with_double_crlf: a_text.count > 4 implies not a_text.substring (a_text.count - 4, a_text.count).same_string ("%R%N%R%N") a_text_does_not_end_with_double_crlf: a_text.count > 4 implies not a_text.substring (a_text.count - 4, a_text.count).same_string ("%R%N%R%N")
local
l_text: READABLE_STRING_8
l_header: HTTP_HEADER
do do
if header_committed then if header_committed then
report_content_already_sent_and_header_ignored report_content_already_sent_and_header_ignored