summary refs log tree commit diff stats
path: root/svc
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-12-18 23:42:15 -0500
committerBen Morrison <ben@gbmor.dev>2019-12-18 23:42:15 -0500
commitefbc14fbc8c619eabd26d3bfe7e02e6490626d78 (patch)
tree7d035920867e9d62632c6753f31422fee3dad5d4 /svc
parente79fa244cf97c7e69e0c0bdd822737a448798340 (diff)
downloadgetwtxt-efbc14fbc8c619eabd26d3bfe7e02e6490626d78.tar.gz
reduced size of hash for etag to 32bits
Diffstat (limited to 'svc')
-rw-r--r--svc/handlers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/svc/handlers.go b/svc/handlers.go
index 4ae0bdd..645b3fc 100644
--- a/svc/handlers.go
+++ b/svc/handlers.go
@@ -34,11 +34,11 @@ import (
 func getEtagFromTime(modtime time.Time) string {
 	shabytes, err := modtime.MarshalText()
 	errLog("", err)
-	return fmt.Sprintf("%x", fnv.New128().Sum(shabytes))
+	return fmt.Sprintf("%x", fnv.New32().Sum(shabytes))
 }
 
 func getEtag(data []byte) string {
-	return fmt.Sprintf("%x", fnv.New128().Sum(data))
+	return fmt.Sprintf("%x", fnv.New32().Sum(data))
 }
 
 func servStatic(w http.ResponseWriter, isCSS bool) error {