From 0866314d9675c09b4b3d0db9e777f132b7c0aae7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 19 Mar 2017 22:29:23 +0000 Subject: reduce hlcache handle api usage in mimesniff --- content/hlcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content/hlcache.c') 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); -- cgit v1.2.3