Use correct hash length when reading the push cookie

This commit is contained in:
Ken-Håvard Lieng 2018-04-30 22:53:29 +02:00
parent d4d03eac12
commit fb8fec38ff
1 changed files with 2 additions and 2 deletions

View File

@ -214,11 +214,11 @@ func serveIndex(w http.ResponseWriter, r *http.Request) {
} else {
pushed := false
if files[1].Hash != cookie.Value[22:] {
if files[1].Hash != cookie.Value[8:] {
pusher.Push("/"+files[1].Path, options)
pushed = true
}
if files[0].Hash != cookie.Value[:22] {
if files[0].Hash != cookie.Value[:8] {
pusher.Push("/"+files[0].Path, options)
pushed = true
}