Use double quotes only when needed for put_content_type_with_parameters.

This commit is contained in:
2018-10-29 13:11:19 +01:00
parent 627ec7aefc
commit c8e2009638

View File

@@ -213,6 +213,7 @@ feature -- Content related header
--| note: see `put_content_type_with_charset' for examples.
local
s: STRING_8
v: READABLE_STRING_8
do
if a_params /= Void and then not a_params.is_empty then
create s.make_from_string (a_content_type)
@@ -224,9 +225,14 @@ feature -- Content related header
s.append_character (' ')
s.append (nv.name)
s.append_character ('=')
v := nv.value
if v.has(' ') or v.has ('%T') or v.has ('=') then
s.append_character ('%"')
s.append (nv.value)
s.append (v)
s.append_character ('%"')
else
s.append (v)
end
end
end
put_header_key_value ({HTTP_HEADER_NAMES}.header_content_type, s)