From 5e9f137adfc28226121a351b2f78cc8db73630a1 Mon Sep 17 00:00:00 2001 From: iliajie Date: Tue, 16 May 2023 00:50:41 +0300 Subject: [PATCH] Fix to always force text/plain for all kind for text #1907 --- updown/fetch.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/updown/fetch.cgi b/updown/fetch.cgi index af9f73cc9..4d0587479 100755 --- a/updown/fetch.cgi +++ b/updown/fetch.cgi @@ -68,8 +68,10 @@ if ($ENV{'PATH_INFO'}) { # See if it is really text $out = &backquote_command("file ". quotemeta(&resolve_links($file))); - $type = "text/plain" if ($out =~ /text|script/); } + $type = "text/plain" + if ($type =~ /text|java|script/ || + $out =~ /text|java|script/); } else { print "Content-Disposition: Attachment\n";