diff options
author | James Bursa <james@netsurf-browser.org> | 2003-02-25 21:00:27 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-02-25 21:00:27 +0000 |
commit | 8edb43af7dbf0b28892f9d8a8d8ddae523e41b73 (patch) | |
tree | f83c7ed22bfac320b468979e181630e7ebc6dfe4 /content/fetchcache.c | |
parent | 9209f8e6cbd2423a243dcab05bbff2e41d193d3f (diff) | |
download | netsurf-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.c | 10 |
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); |