]> Sergey Matveev's repositories - sgblog.git/commitdiff
charset is case-insensitive v0.25.0
authorSergey Matveev <stargrave@stargrave.org>
Sat, 13 Nov 2021 16:40:10 +0000 (19:40 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 13 Nov 2021 16:40:10 +0000 (19:40 +0300)
cmd/sgblog/http-entry.tmpl
cmd/sgblog/http-index.tmpl
cmd/sgblog/http.go

index 1774afed874fc87b513e67704029943dc18ef716..55cfd9f1cef48845b9ff771764a2822ea60c202a 100644 (file)
@@ -1,7 +1,7 @@
 {{$Cfg := .Cfg}}<!DOCTYPE html>
 <html>
 <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="generator" content="SGBlog {{.Version}}">
        <title>{{.Title}} ({{.When}})</title>
        {{with .Cfg.CSS}}<link rel="stylesheet" type="text/css" href="{{.}}">{{end}}
index 3755e472925c6160d57308310cd4408f68459cf2..523096d312a9f774bab16c167a7b0b5362d53c1a 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <meta name="generator" content="SGBlog {{.Version}}">
     <title>{{.Cfg.Title}} {{if .Topic}}(topic: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}})</title>
     {{with .Cfg.CSS}}<link rel="stylesheet" type="text/css" href="{{.}}">{{end}}
index 1bc1824aa9c9fac134d4cd1517b7bea4241223b9..7d7303cb580a35fe7d49d1e19be9a10ad93181e5 100644 (file)
@@ -128,7 +128,7 @@ func lineURLizeInTemplate(urlPrefix, line interface{}) string {
 
 func startHeader(etag hash.Hash, gziped bool) string {
        lines := []string{
-               "Content-Type: text/html; charset=UTF-8",
+               "Content-Type: text/html; charset=utf-8",
                "ETag: " + etagString(etag),
        }
        if gziped {
@@ -141,7 +141,7 @@ func startHeader(etag hash.Hash, gziped bool) string {
 
 func makeErr(err error, status int) {
        fmt.Println("Status:", status)
-       fmt.Print("Content-Type: text/plain; charset=UTF-8\n\n")
+       fmt.Print("Content-Type: text/plain; charset=utf-8\n\n")
        fmt.Println(err)
        log.Fatalln(err)
 }
@@ -477,7 +477,9 @@ func serveHTTP() {
                        }
                        lines := msgSplit(commit.Message)
                        var categories []atom.Category
-                       for _, topic := range sgblog.ParseTopics(sgblog.GetNote(repo, topicsTree, commit.Hash)) {
+                       for _, topic := range sgblog.ParseTopics(sgblog.GetNote(
+                               repo, topicsTree, commit.Hash,
+                       )) {
                                categories = append(categories, atom.Category{Term: topic})
                        }
                        htmlized := make([]string, 0, len(lines))
@@ -774,7 +776,7 @@ func serveHTTP() {
        return
 
 AtomFinish:
-       os.Stdout.WriteString("Content-Type: application/atom+xml; charset=UTF-8\n")
+       os.Stdout.WriteString("Content-Type: application/atom+xml; charset=utf-8\n")
        os.Stdout.WriteString("ETag: " + etagString(etagHash) + "\n")
        if gzipWriter != nil {
                os.Stdout.WriteString("Content-Encoding: gzip\n")