From b34502af8247606ae3b5693cd3046566b16a3e6d Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Fri, 8 Jul 2011 08:38:17 +0000 Subject: Refactor http utilities svn path=/trunk/netsurf/; revision=12595 --- content/hlcache.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'content/hlcache.c') 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, - ¶ms); + 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; -- cgit v1.2.3