summaryrefslogtreecommitdiff
path: root/beos/beos_fetch_rsrc.cpp
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2011-03-21 21:15:58 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2011-03-21 21:15:58 +0000
commitd2174fa8cc06c1e94d07bcab98efd00046a9ce8c (patch)
treea8f56de41ba41b3dcf2f5cf5b3c7e17a53cc83eb /beos/beos_fetch_rsrc.cpp
parent0d534e8c4716a04f1b433a5bbec60a4224af7006 (diff)
downloadnetsurf-d2174fa8cc06c1e94d07bcab98efd00046a9ce8c.tar.gz
netsurf-d2174fa8cc06c1e94d07bcab98efd00046a9ce8c.tar.bz2
Change rsrc: fetcher to check the mime type of resources from the extension. Add needed resource to get about: working.
svn path=/trunk/netsurf/; revision=12119
Diffstat (limited to 'beos/beos_fetch_rsrc.cpp')
-rw-r--r--beos/beos_fetch_rsrc.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/beos/beos_fetch_rsrc.cpp b/beos/beos_fetch_rsrc.cpp
index 24126a271..a0addd9ab 100644
--- a/beos/beos_fetch_rsrc.cpp
+++ b/beos/beos_fetch_rsrc.cpp
@@ -171,18 +171,11 @@ static bool fetch_rsrc_process(struct fetch_rsrc_context *c)
"Malformed rsrc: URL", 0, FETCH_ERROR_URL);
return false;
}
- comma = strchr(slash, ',');
+
+ // doesn't exist in the filesystem but we should hit the internal types.
+ c->mimetype = strdup(fetch_filetype(slash));
c->name = strdup(slash + 1);
- if (!comma) {
- /* there is no mimetype here, assume text/plain */
- c->mimetype = strdup("text/plain;charset=US-ASCII");
- } else {
- /* make a copy of everything after the comma */
- c->mimetype = strdup(comma + 1);
- c->name[strlen(c->name) - strlen(comma)] = '\0';
- }
-
if (c->mimetype == NULL) {
fetch_rsrc_send_callback(FETCH_ERROR, c,
"Unable to allocate memory for mimetype in rsrc: URL",