Added class HTTP_CONTENT_TYPE to help manipulation of Content-Type value

Now WSF_REQUEST return a HTTP_CONTENT_TYPE if available
Adapted WSF_MIME_HANDLER to use this new class
Added one manual autotest to test MIME handler
This commit is contained in:
Jocelyn Fiat
2012-03-23 16:40:13 +01:00
parent ac9cbb0bd2
commit 40c6aff423
14 changed files with 741 additions and 72 deletions

View File

@@ -14,19 +14,20 @@ inherit
end
create
make
make_with_file,
make_with_body
feature {NONE} -- Initialization
make (a_meta: ARRAY [TUPLE [name: READABLE_STRING_8; value: READABLE_STRING_8]])
make_with_file (a_meta: ITERABLE [TUPLE [name: READABLE_STRING_8; value: READABLE_STRING_8]]; f: FILE)
local
ht: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
i: WGI_NULL_INPUT_STREAM
i: WGI_NULL_FILE_INPUT_STREAM
c: WGI_NULL_CONNECTOR
do
create c.make
create i.make
create ht.make (a_meta.count)
create i.make (f)
create ht.make (10)
across
a_meta as curs
loop
@@ -35,6 +36,22 @@ feature {NONE} -- Initialization
wgi_request_from_table_make (ht, i, c)
end
make_with_body (a_meta: ITERABLE [TUPLE [name: READABLE_STRING_8; value: READABLE_STRING_8]]; s: READABLE_STRING_8)
local
ht: HASH_TABLE [READABLE_STRING_8, READABLE_STRING_8]
i: WGI_NULL_STRING_INPUT_STREAM
c: WGI_NULL_CONNECTOR
do
create c.make
create i.make (s)
create ht.make (10)
across
a_meta as curs
loop
ht.force (curs.item.value, curs.item.name)
end
wgi_request_from_table_make (ht, i, c)
end
note
copyright: "2011-2011, Eiffel Software and others"