X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=cmd%2Fsgblog%2Fhttp.go;h=000037ab210e666decf8880593d58aaab31be7af;hb=HEAD;hp=2e0c2d8dea5080bcd1ecc726807106245412e8e6;hpb=3e7374904765c5d4fb82b0c2b7028b3b731f0fc3;p=sgblog.git diff --git a/cmd/sgblog/http.go b/cmd/sgblog/http.go index 2e0c2d8..000037a 100644 --- a/cmd/sgblog/http.go +++ b/cmd/sgblog/http.go @@ -19,7 +19,7 @@ import ( "bytes" "crypto/sha1" _ "embed" - "encoding/hex" + "encoding/base64" "encoding/xml" "errors" "fmt" @@ -98,7 +98,7 @@ func makeA(href, text string) string { } func etagString(etag hash.Hash) string { - return `"` + hex.EncodeToString(etag.Sum(nil)) + `"` + return `"` + base64.RawURLEncoding.EncodeToString(etag.Sum(nil)) + `"` } func urlParse(what string) *url.URL {