From: Art Cancro Date: Wed, 28 Feb 2007 22:54:52 +0000 (+0000) Subject: Force downloads to use a MIME type of application/octet-stream X-Git-Tag: v7.86~3549 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=839760156cc8c20d7df494fdcdac5ad28e26f32e Force downloads to use a MIME type of application/octet-stream in order to prevent downloading browsers from trying to render contents inline. --- diff --git a/webcit/downloads.c b/webcit/downloads.c index a1d2984c4..4a2352d70 100644 --- a/webcit/downloads.c +++ b/webcit/downloads.c @@ -61,7 +61,9 @@ void download_file(char *filename) off_t bytes; char content_type[256]; char *content = NULL; - int force_download = 0; + + /* Setting to nonzero forces a MIME type of application/octet-stream */ + int force_download = 1; serv_printf("OPEN %s", filename); serv_getln(buf, sizeof buf);