Renamed CONNEG to content_negotiation.

Update MIME_PARSER to use HTTP_MEDIA_TYPE.
This commit is contained in:
jvelilla
2013-09-16 23:56:01 -03:00
parent a6260ed5a2
commit f2ee91764d
36 changed files with 550 additions and 570 deletions

View File

@@ -97,9 +97,9 @@ feature {NONE} -- Initialization
-- Extract type and subtype
p := t.index_of ('/', 1)
if p = 0 then
has_error := True
--| Accept *; should be */*
type := t
subtype := ""
subtype := "*"
else
subtype := t.substring (p + 1, t.count)
type := t
@@ -368,6 +368,30 @@ feature -- Status report
end
end
format : STRING
-- Representation of the current object
do
create Result.make_from_string ("(")
if attached type as t then
Result.append_string ("'" + t + "',")
end
if attached subtype as st then
Result.append_string (" '" + st + "',")
end
Result.append_string (" {")
if attached parameters as l_params then
from
l_params.start
until
l_params.after
loop
Result.append ("'" + l_params.key_for_iteration + "':'" + l_params.item_for_iteration + "',");
l_params.forth
end
end
Result.append ("})")
end
invariant
type_and_subtype_not_empty: not has_error implies not type.is_empty and not subtype.is_empty