I have read Fast Track Clojure's serials tutorial. lession 5 is about a web server.
Below is part of demo code: (use 'clojure.contrib.server-socket) (create-server 8080 (fn [in out] (binding [*out* (java.io.PrintWriter. out)] (println "HTTP/1.0 200 OK") (println "Content-Type: text/html") (println "") (println "<h1>Wooo hooo hooo, my first web server!</h1>") (flush)))) I found these codes could do well without any issue, while the browser have displayed nothing for error of 101 (net::ERR_CONNECTION_RESET). But another codes below all is okey. Was there someting wrong? (use 'clojure.contrib.server-socket) (import '(java.io BufferedReader InputStreamReader PrintWriter)) (create-server 8080 (fn [in out] (binding [ *in* (BufferedReader. (InputStreamReader. in)) *out* (PrintWriter. out)] (println "HTTP/1.0 200 OK") (println "Content-Type: text/html") (println "") (loop [line (read-line)] (println (str line "<br/>")) (if-not (empty? line) (recur (read-line)))) (flush)))) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en