summaryrefslogtreecommitdiff
path: root/content/fetchcache.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-02-25 21:00:27 +0000
committerJames Bursa <james@netsurf-browser.org>2003-02-25 21:00:27 +0000
commit8edb43af7dbf0b28892f9d8a8d8ddae523e41b73 (patch)
treef83c7ed22bfac320b468979e181630e7ebc6dfe4 /content/fetchcache.c
parent9209f8e6cbd2423a243dcab05bbff2e41d193d3f (diff)
downloadnetsurf-8edb43af7dbf0b28892f9d8a8d8ddae523e41b73.tar.gz
netsurf-8edb43af7dbf0b28892f9d8a8d8ddae523e41b73.tar.bz2
[project @ 2003-02-25 21:00:27 by bursa]
Bug fixes, experimental JPEG support. svn path=/import/netsurf/; revision=100
Diffstat (limited to 'content/fetchcache.c')
-rw-r--r--content/fetchcache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/content/fetchcache.c b/content/fetchcache.c
index cd41f62ff..96c865b67 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -1,5 +1,5 @@
/**
- * $Id: fetchcache.c,v 1.1 2003/02/09 12:58:14 bursa Exp $
+ * $Id: fetchcache.c,v 1.2 2003/02/25 21:00:27 bursa Exp $
*/
#include <assert.h>
@@ -59,9 +59,15 @@ void fetchcache_free(struct fetchcache *fc)
void fetchcache_callback(fetch_msg msg, struct fetchcache *fc, char *data, unsigned long size)
{
content_type type;
+ char *mime_type;
+ char *semic;
switch (msg) {
case FETCH_TYPE:
- type = content_lookup(data);
+ mime_type = strdup(data);
+ if ((semic = strchr(mime_type, ';')) != 0)
+ *semic = 0; /* remove "; charset=..." */
+ type = content_lookup(mime_type);
+ free(mime_type);
LOG(("FETCH_TYPE, type %u", type));
if (type == CONTENT_OTHER) {
fetch_abort(fc->f);