       (fn [data]
         (.reset out)
         (transit/write writer data)
-        (.toString out "UTF-8")))))
+        (.toString out (s/upper-case +encoding+))))))
 
 (defn ^:private send-fn [content-type]
   (let [data->response (data->response-fn content-type)]


            [clojure.data.json :as json]
            [cognitect.transit :as transit]
            
            [immutant.web.async :as async-web]
            [clojure.core.async :as async :refer [go go-loop <!]])
  (:import java.io.ByteArrayOutputStream))

(defn ^:private data->response-fn [content-type]
  (case content-type

            :on-error (fn [ch throwable]
                        (log/error web "Caught exception:" throwable)
                        (async-web/close ch))})
          (response/content-type content-type)
          (response/charset +encoding+)))))


(def poll-handler #'poll-handler*)
