Merge pull request #4040 from juliohm1978/master
Fix default Content-Type for custom-error-pages example
This commit is contained in:
commit
a2f9193a04
1 changed files with 1 additions and 0 deletions
|
@ -106,6 +106,7 @@ func errorHandler(path string) func(http.ResponseWriter, *http.Request) {
|
|||
cext, err := mime.ExtensionsByType(format)
|
||||
if err != nil {
|
||||
log.Printf("unexpected error reading media type extension: %v. Using %v", err, ext)
|
||||
format = "text/html"
|
||||
} else if len(cext) == 0 {
|
||||
log.Printf("couldn't get media type extension. Using %v", ext)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue