summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-07 09:27:41 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-07 09:27:41 -0800
commitfee285453459ac33f53dc66052bffa7a83aca778 (patch)
tree816ea91f4538dbe1282e9de470855740d62aafab /system
parentc99dcd123e886e7c62c913074c5c04ae3acc3272 (diff)
adding debug prints -- cache control not effecting json responses
Diffstat (limited to 'system')
-rw-r--r--system/db/cache.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/system/db/cache.go b/system/db/cache.go
index 6ba00ad..4076848 100644
--- a/system/db/cache.go
+++ b/system/db/cache.go
@@ -20,9 +20,12 @@ func CacheControl(next http.Handler) http.HandlerFunc {
if match := res.Header().Get("If-None-Match"); match != "" {
if strings.Contains(match, etag) {
+ fmt.Println("matched etag")
res.WriteHeader(http.StatusNotModified)
return
}
+
+ fmt.Println("checked, no match")
}
next.ServeHTTP(res, req)