From 2cc050e21ed35d95d824cc22d129fc22ee1318a4 Mon Sep 17 00:00:00 2001 From: Vladimir Vissoultchev Date: Wed, 29 Jul 2015 17:58:03 +0300 Subject: Fix UTF-8 in upper-case, use ansi charset for all non UTF-8 encodings --- routers/repo/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') diff --git a/routers/repo/download.go b/routers/repo/download.go index 8e9efba3..c71f8d29 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -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 { -- cgit v1.2.3