#2282 fix utf-8 recognized as windows-1252

This commit is contained in:
Unknwon committed 2015-12-25 05:25:47 -05:00
1 parent 13fe733037
commit 85af36332b
6 files changed
+13 -10

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ package user
import (
"fmt"
"path"
"strings"
"github.com/gogits/gogs/models"
@@ -38,7 +39,7 @@ func Profile(ctx *middleware.Context) {
uname := ctx.Params(":username")
// Special handle for FireFox requests favicon.ico.
if uname == "favicon.ico" {
ctx.Redirect(setting.AppSubUrl + "/img/favicon.png")
ctx.ServeFile(path.Join(setting.StaticRootPath, "public/img/favicon.png"))
return
} else if strings.HasSuffix(uname, ".png") {
ctx.Error(404)