From 839760156cc8c20d7df494fdcdac5ad28e26f32e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 28 Feb 2007 22:54:52 +0000 Subject: [PATCH] Force downloads to use a MIME type of application/octet-stream in order to prevent downloading browsers from trying to render contents inline. --- webcit/downloads.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2