Use double quotes only when needed for put_content_type_with_parameters.
This commit is contained in:
@@ -213,6 +213,7 @@ feature -- Content related header
|
|||||||
--| note: see `put_content_type_with_charset' for examples.
|
--| note: see `put_content_type_with_charset' for examples.
|
||||||
local
|
local
|
||||||
s: STRING_8
|
s: STRING_8
|
||||||
|
v: READABLE_STRING_8
|
||||||
do
|
do
|
||||||
if a_params /= Void and then not a_params.is_empty then
|
if a_params /= Void and then not a_params.is_empty then
|
||||||
create s.make_from_string (a_content_type)
|
create s.make_from_string (a_content_type)
|
||||||
@@ -224,9 +225,14 @@ feature -- Content related header
|
|||||||
s.append_character (' ')
|
s.append_character (' ')
|
||||||
s.append (nv.name)
|
s.append (nv.name)
|
||||||
s.append_character ('=')
|
s.append_character ('=')
|
||||||
|
v := nv.value
|
||||||
|
if v.has(' ') or v.has ('%T') or v.has ('=') then
|
||||||
s.append_character ('%"')
|
s.append_character ('%"')
|
||||||
s.append (nv.value)
|
s.append (v)
|
||||||
s.append_character ('%"')
|
s.append_character ('%"')
|
||||||
|
else
|
||||||
|
s.append (v)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
put_header_key_value ({HTTP_HEADER_NAMES}.header_content_type, s)
|
put_header_key_value ({HTTP_HEADER_NAMES}.header_content_type, s)
|
||||||
|
|||||||
Reference in New Issue
Block a user