summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-03-19 22:29:23 +0000
committerVincent Sanders <vince@kyllikki.org>2017-03-19 22:29:23 +0000
commit0866314d9675c09b4b3d0db9e777f132b7c0aae7 (patch)
tree5ac6a4bc215129c885286e31ab49fc306cfe95d9 /content/hlcache.c
parent93e2b4855ba5b16a507e75dc533500efcc91e065 (diff)
downloadnetsurf-0866314d9675c09b4b3d0db9e777f132b7c0aae7.tar.gz
netsurf-0866314d9675c09b4b3d0db9e777f132b7c0aae7.tar.bz2
reduce hlcache handle api usage in mimesniff
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index 95edd2120..731c0bbb7 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -421,7 +421,7 @@ static nserror hlcache_llcache_callback(llcache_handle *handle,
switch (event->type) {
case LLCACHE_EVENT_HAD_HEADERS:
- error = mimesniff_compute_effective_type(handle, NULL, 0,
+ error = mimesniff_compute_effective_type(llcache_handle_get_header(handle, "Content-Type"), NULL, 0,
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
ctx->accepted_types == CONTENT_IMAGE,
&effective_type);
@@ -444,7 +444,7 @@ static nserror hlcache_llcache_callback(llcache_handle *handle,
break;
case LLCACHE_EVENT_HAD_DATA:
- error = mimesniff_compute_effective_type(handle,
+ error = mimesniff_compute_effective_type(llcache_handle_get_header(handle, "Content-Type"),
event->data.data.buf, event->data.data.len,
ctx->flags & HLCACHE_RETRIEVE_SNIFF_TYPE,
ctx->accepted_types == CONTENT_IMAGE,
@@ -463,7 +463,7 @@ static nserror hlcache_llcache_callback(llcache_handle *handle,
case LLCACHE_EVENT_DONE:
/* DONE event before we could determine the effective MIME type.
*/
- error = mimesniff_compute_effective_type(handle,
+ error = mimesniff_compute_effective_type(llcache_handle_get_header(handle, "Content-Type"),
NULL, 0, false, false, &effective_type);
if (error == NSERROR_OK || error == NSERROR_NOT_FOUND) {
error = hlcache_migrate_ctx(ctx, effective_type);