diff options
-rw-r--r-- | api.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -31,6 +31,9 @@ func handleFile(w http.ResponseWriter, r *http.Request) { if !allowHtml && (strings.Index(mtype, "text/html") == 0 || strings.Index(mtype, "application/xhtml+xml") == 0) { mtype = "text/plain" } + if mtype == "" { + mtype = "application/octet-stream" + } w.Header().Set("Content-Type", mtype) _ = size if csp != "" { |