From 0ab6bd4dfa56e4977944355e02a68c80d7c38fb8 Mon Sep 17 00:00:00 2001 From: Stuart Sierra Date: Thu, 20 Aug 2009 16:11:42 -0400 Subject: http/agent.clj: handle null InputStream from HTTP response --- src/clojure/contrib/http/agent.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/clojure/contrib') diff --git a/src/clojure/contrib/http/agent.clj b/src/clojure/contrib/http/agent.clj index 4ade2b91..c5a6b51c 100644 --- a/src/clojure/contrib/http/agent.clj +++ b/src/clojure/contrib/http/agent.clj @@ -146,7 +146,7 @@ retrieved with the 'stream', 'string', and 'bytes' functions." [http-agnt] (let [output (ByteArrayOutputStream.)] - (duck/copy (stream http-agnt) output) + (duck/copy (or (stream http-agnt) "") output) output)) -- cgit v1.2.3-18-g5258