Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix wrap-versioned-expiry.

It was never returning nil, even if it couldn't find the file.
  • Loading branch information...
commit 7ccb3a2ddfcf13a39bdc9ac46dbb2f62175740fd 1 parent bf7e1f9
@amalloy amalloy authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/foreclojure/ring.clj
View
9 src/foreclojure/ring.clj
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.