Skip to content
Snippets Groups Projects
Verified Commit 783fd2e1 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes content type header

parent 0170b398
No related branches found
Tags v3-alpha-1
No related merge requests found
......@@ -108,8 +108,10 @@ func errorHandler(errorFilesPath string) func(http.ResponseWriter, *http.Request
cext, err := mime.ExtensionsByType(format)
if err != nil {
format = "text/html"
log.Printf("unexpected error reading media type extension: %v. Using %v", err, strings.Join(exts, ", "))
} else if len(cext) == 0 {
format = "text/html"
log.Printf("couldn't get media type extension. Using %v", strings.Join(exts, ", "))
} else {
exts = cext
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment