Skip to content

Commit

Permalink
Fix wrap-versioned-expiry.
Browse files Browse the repository at this point in the history
It was never returning nil, even if it couldn't find the file.
  • Loading branch information
amalloy committed Sep 30, 2011
1 parent bf7e1f9 commit 7ccb3a2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/foreclojure/ring.clj
Expand Up @@ -33,11 +33,10 @@

(defn wrap-versioned-expiry [handler]
(fn [request]
(-> request
(update-in [:uri] strip-version-number)
(handler)
(assoc-in [:headers "Cache-control"]
"public, max-age=31536000"))))
(when-let [resp (handler
(update-in request [:uri] strip-version-number))]
(assoc-in resp [:headers "Cache-control"]
"public, max-age=31536000"))))

(defn wrap-debug [handler]
(fn [request]
Expand Down

0 comments on commit 7ccb3a2

Please sign in to comment.