]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/server/room_functions.c
Attachments now download with the appropriate filename.
[citadel.git] / webcit-ng / server / room_functions.c
index 92ed577e874ef54516b8943a632306bb121b71a4..1b5d9335b2665f4d9e0dc806b9ac1ba04a5fad8d 100644 (file)
@@ -262,7 +262,7 @@ void object_in_room(struct http_transaction *h, struct ctdlsession *c) {
        // A sixth component in the URL can be one of two things:
        // (1) a MIME part specifier, in which case the client wants to download that component within the message
        // (2) a content-type, in which ase the client wants us to try to render it a certain way
-       if (num_tokens(h->url, '/') == 6) {
+       if (num_tokens(h->url, '/') >= 6) {
                extract_token(buf, h->url, 5, '/', sizeof buf);
                if (!IsEmptyStr(buf)) {
                        if (!strcasecmp(buf, "json")) {
@@ -679,7 +679,7 @@ void ctdl_r(struct http_transaction *h, struct ctdlsession *c) {
                }
                return;
        }
-       if (num_tokens(h->url, '/') == 6) {
+       if (num_tokens(h->url, '/') >= 6) {
                object_in_room(h, c);   //      /ctdl/r/roomname/object/ or possibly /ctdl/r/roomname/object/component
                return;
        }