summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-07-08 08:38:17 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-07-08 08:38:17 +0000
commitb34502af8247606ae3b5693cd3046566b16a3e6d (patch)
treedb0cd37fcd7c7a936fc499928fcd4a0b07614847 /content/hlcache.c
parentc54b6aabaa8bae670b84c7d9841d77be430756e7 (diff)
downloadnetsurf-b34502af8247606ae3b5693cd3046566b16a3e6d.tar.gz
netsurf-b34502af8247606ae3b5693cd3046566b16a3e6d.tar.bz2
Refactor http utilities
svn path=/trunk/netsurf/; revision=12595
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index b684ed01c..40b6486c9 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -541,8 +541,7 @@ bool hlcache_type_is_acceptable(llcache_handle *llcache,
content_type accepted_types, content_type *computed_type)
{
const char *content_type_header;
- char *mime_type;
- http_parameter *params;
+ http_content_type *ct;
content_type type;
nserror error;
@@ -551,15 +550,13 @@ bool hlcache_type_is_acceptable(llcache_handle *llcache,
if (content_type_header == NULL)
content_type_header = "text/plain";
- error = http_parse_content_type(content_type_header, &mime_type,
- &params);
+ error = http_parse_content_type(content_type_header, &ct);
if (error != NSERROR_OK)
return false;
- type = content_factory_type_from_mime_type(mime_type);
+ type = content_factory_type_from_mime_type(ct->media_type);
- free(mime_type);
- http_parameter_list_destroy(params);
+ http_content_type_destroy(ct);
*computed_type = type;