Permalink
Browse files

Fixed wrap-lint middleware to accept ISeq as valid response body

  • Loading branch information...
1 parent b5909c9 commit 9a3cc92f60df9dbb08568f03f65e5fc7cc425522 @weavejester weavejester committed Feb 27, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 ring-devel/src/ring/middleware/lint.clj
  2. +1 −1 ring-devel/test/ring/middleware/lint_test.clj
View
4 ring-devel/src/ring/middleware/lint.clj
@@ -77,9 +77,9 @@
(lint hval #(or (string? %) (every? string? %))
"header values must be Strings or colls of Strings")))
- (lint (:body resp) #(or (nil? %) (string? %) (instance? File %)
+ (lint (:body resp) #(or (nil? %) (string? %) (seq? %) (instance? File %)
(instance? InputStream %))
- ":body must a String, File, or InputStream"))
+ ":body must a String, ISeq, File, or InputStream"))
(defn wrap-lint
"Wrap an app to validate incoming requests and outgoing responses
View
2 ring-devel/test/ring/middleware/lint_test.clj
@@ -123,5 +123,5 @@
[nil {:foo "bar"} {"foo" :bar} {"dir" 123}])
(lints-resp :body
- [nil "thebody" (tu/string-input-stream "thebody") (File. "test/ring/assets/foo.html")]
+ [nil "thebody" (list "foo" "bar") (tu/string-input-stream "thebody") (File. "test/ring/assets/foo.html")]
[123 :thebody])

0 comments on commit 9a3cc92

Please sign in to comment.