summaryrefslogtreecommitdiff
path: root/beos/beos_fetch_rsrc.cpp
diff options
context:
space:
mode:
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",