Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/1.4.2'

  • Loading branch information...
commit 6fca15d1aabca79f1cc21750f379a0c6fe163cde 2 parents e6342a6 + 2580db5
@amalloy amalloy authored
View
2  project.clj
@@ -1,4 +1,4 @@
-(defproject foreclojure "1.4.1"
+(defproject foreclojure "1.4.2"
:description "4clojure - a website for lisp beginners"
:dependencies [[clojure "1.2.1"]
[clojure-contrib "1.2.0"]
View
2  src/foreclojure/core.clj
@@ -48,6 +48,7 @@
identity))
session/wrap-stateful-session
wrap-uri-binding
+ handler/site
wrap-strip-trailing-slash))
(let [canonical-host (or config/dynamic-host "www.4clojure.com")]
@@ -74,7 +75,6 @@
(def app (-> (split-hosts host-handlers)
wrap-404
- handler/site
wrap-gzip))
(defn register-heartbeat []
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.