     "Content-Length: 27"
     "Content-Type: application/x-www-form-urlencoded"])
 )
-
-(defn parse-headers [header-lines]
-  (apply hash-map
-   (mapcat
-    (fn [line]
-      (let [[k v] (str/split line #":" 2)]
-        [(keyword (str/lower-case k)) (str/triml v)]))
-    header-lines)))
 
 ;;; assumes first line already consumed
 (defn read-headers [rdr]

  []
  (.close (:socket @server-state)))

;;; (in-ns 'cljs.browser-repl)
;;; (start-server 9000)
;;; curl -v -d "ready" http://127.0.0.1:9000
;;; (send-forms ["test"])
;;; curl -v -d "test-result" http://127.0.0.1:9000

(defn- handle-connection
  [conn]
  (let [rdr (BufferedReader. (InputStreamReader. (.getInputStream conn)))]
    (if-let [message (read-request rdr)]
      (do (when (not= message "ready")
            (return-value message))
          (set-connection conn)))))

(defn- server-loop
  [server-socket]
