change etag

This commit is contained in:
YouROK
2022-05-25 20:52:06 +03:00
parent 5800c01cb0
commit 74ff44d5a3
2 changed files with 4 additions and 2 deletions

View File

@@ -73,7 +73,8 @@ func sendM3U(c *gin.Context, name, hash string, m3u string) {
c.Header("Content-Type", "audio/x-mpegurl")
c.Header("Connection", "close")
if hash != "" {
c.Header("ETag", httptoo.EncodeQuotedString(fmt.Sprintf("%s/%s", hash, hex.EncodeToString([]byte(name)))))
etag := hex.EncodeToString([]byte(fmt.Sprintf("%s/%s", hash, name)))
c.Header("ETag", httptoo.EncodeQuotedString(etag))
}
if name == "" {
name = "playlist.m3u"