Fix UTF-8 in upper-case, use ansi charset for all non UTF-8 encodings
This commit is contained in:
parent
4917d29c12
commit
2cc050e21e
3 changed files with 4 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue