Fix to always force text/plain for all kind for text #1907

This commit is contained in:
iliajie
2023-05-16 00:50:41 +03:00
parent f29d01a7be
commit 5e9f137adf

View File

@@ -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";