Fix UTF-8 in upper-case, use ansi charset for all non UTF-8 encodings

This commit is contained in:
Vladimir Vissoultchev committed 2015-07-29 17:58:03 +03:00
1 parent 4917d29c12
commit 2cc050e21e
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ func ServeBlob(ctx *middleware.Context, blob *git.Blob) error {
_, isTextFile := base.IsTextFile(buf)
if isTextFile {
charset, _ := base.DetectEncoding(buf)
if charset != "utf-8" {
if charset != "UTF-8" {
ctx.Resp.Header().Set("Content-Type", "text/plain; charset="+charset)
}
} else {