Skip to content

Commit

Permalink
Fixed bug that caused intermittent failures when rendering maps
Browse files Browse the repository at this point in the history
  • Loading branch information
weavejester committed Sep 28, 2010
1 parent 1e2bbcd commit cd0c056
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/compojure/response.clj
@@ -1,9 +1,8 @@
(ns compojure.response
"Methods for generating Ring response maps"
(:use [ring.util.response :only (response header)])
(:import java.util.Map
[java.io File InputStream]
[clojure.lang IDeref IFn ISeq]))
(:import [java.io File InputStream]
[clojure.lang APersistentMap IDeref IFn ISeq]))

(defprotocol Renderable
(render [this request]
Expand All @@ -19,7 +18,7 @@
(-> (response this)
(header "Content-Type" "text/html"))))

(extend-type Map
(extend-type APersistentMap
Renderable
(render [this _]
(merge (response "") this)))
Expand Down

0 comments on commit cd0c056

Please sign in to comment.