I'm seeing behavior for which I don't have an explanation. When I set the content-type on a response to "application/json" the connection isn't closed, but for any other content-type it is. Further confusing the issue, when setting Content-Type (note the capitalization) to application/json, the connection does close.
Here's a little snippet:
(ns jsontest.core
(:use [aleph.http :only [start-http-server]]
[lamina.core :only [enqueue]]))
(defn app [channel request]
(enqueue channel {:status 200
:headers {"content-type" "application/json"}
:body "{}"}))
;; replace :headers with {"content-type" "text/plain"}
;; and {"Content-Type" "application/json"}
;; (start-http-server #'app {:port 6000})
Dan
Zach
Is the JSON already encoded? I put in the auto-encoding feature
because it seemed useful, but thinking about it now I'm leaning
towards it being an option that's off by default.
Zach
Yeah I'd lean towards less magic as well.
I look forward to the release of 0.15 :)
Dan
Do you have any objections to this?
Zach
Shouldn't you just add the :auto-transform?, defaulting to false, to 0.1.5-SNAPSHOT?
Dan
Zach
--
Omnem crede diem tibi diluxisse supremum.
Zach
Zach