diff --git a/web/fup/fuphttp/fuphttp.go b/web/fup/fuphttp/fuphttp.go index 41a82b741c..f478bb9a32 100644 --- a/web/fup/fuphttp/fuphttp.go +++ b/web/fup/fuphttp/fuphttp.go @@ -83,7 +83,10 @@ type Application struct { } func DefaultUseDirectDownload(fileExtension, mimeType string) bool { - // Only use the pretty page for text/*. + switch mimeType { + case "application/json", "application/xml", "application/xhtml+xml", "application/x-csh", "application/x-sh": + return false + } return !strings.HasPrefix(mimeType, "text/") } diff --git a/web/fup/fuphttp/httpview.go b/web/fup/fuphttp/httpview.go index daeff64bc5..7755e5fc83 100644 --- a/web/fup/fuphttp/httpview.go +++ b/web/fup/fuphttp/httpview.go @@ -33,7 +33,7 @@ func renderAsCode(mimeType string) bool { return true } switch mimeType { - case "application/json", "application/xml": + case "application/json", "application/xml", "application/xhtml+xml", "application/x-csh", "application/x-sh": return true } return false