summaryrefslogtreecommitdiff
path: root/content/mimesniff.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/mimesniff.c
parent93e2b4855ba5b16a507e75dc533500efcc91e065 (diff)
downloadnetsurf-0866314d9675c09b4b3d0db9e777f132b7c0aae7.tar.gz
netsurf-0866314d9675c09b4b3d0db9e777f132b7c0aae7.tar.bz2
reduce hlcache handle api usage in mimesniff
Diffstat (limited to 'content/mimesniff.c')
-rw-r--r--content/mimesniff.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/content/mimesniff.c b/content/mimesniff.c
index 832320086..68f3fbd8e 100644
--- a/content/mimesniff.c
+++ b/content/mimesniff.c
@@ -31,7 +31,6 @@
#include "utils/corestrings.h"
#include "content/content_factory.h"
-#include "content/llcache.h"
#include "content/mimesniff.h"
struct map_s {
@@ -547,7 +546,7 @@ static nserror mimesniff__compute_feed_or_html(const uint8_t *data,
}
/* See mimesniff.h for documentation */
-nserror mimesniff_compute_effective_type(llcache_handle *handle,
+nserror mimesniff_compute_effective_type(const char *content_type_header,
const uint8_t *data, size_t len, bool sniff_allowed,
bool image_only, lwc_string **effective_type)
{
@@ -564,18 +563,16 @@ nserror mimesniff_compute_effective_type(llcache_handle *handle,
};
#undef S
- const char *content_type_header;
size_t content_type_header_len;
http_content_type *ct;
const struct tt_s *tt;
bool match;
nserror error;
- content_type_header =
- llcache_handle_get_header(handle, "Content-Type");
if (content_type_header == NULL) {
- if (sniff_allowed == false)
+ if (sniff_allowed == false) {
return NSERROR_NOT_FOUND;
+ }
/* No official type => unknown */
return mimesniff__compute_unknown(data, len, effective_type);