Created
March 10, 2014 09:43
-
-
Save pyrtsa/9462128 to your computer and use it in GitHub Desktop.
HTTP Kit still fails to handle empty Reason-Phrase in HTTP responses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import 'org.httpkit.client.Decoder) | |
(import 'java.nio.ByteBuffer) | |
(.decode (Decoder. nil nil) (ByteBuffer/wrap (.getBytes "HTTP/1.1 200 \r\n" "UTF-8"))) | |
;;=> ProtocolException not http protocol? HTTP/1.1 200 org.httpkit.client.Decoder.parseInitialLine (Decoder.java:77) | |
(pst) | |
;;; ProtocolException not http protocol? HTTP/1.1 200 | |
;;; org.httpkit.client.Decoder.parseInitialLine (Decoder.java:77) | |
;;; org.httpkit.client.Decoder.decode (Decoder.java:88) | |
;;; user/eval29176 (form-init711766227894360807.clj:1) | |
;;; clojure.lang.Compiler.eval (Compiler.java:6619) | |
;;; clojure.lang.Compiler.eval (Compiler.java:6582) | |
;;; clojure.core/eval (core.clj:2852) | |
;;; clojure.main/repl/read-eval-print--6588/fn--6591 (main.clj:259) | |
;;; clojure.main/repl/read-eval-print--6588 (main.clj:259) | |
;;; clojure.main/repl/fn--6597 (main.clj:277) | |
;;; clojure.main/repl (main.clj:277) | |
;;; clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn--7746 (interruptible_eval.clj:56) | |
;;; clojure.core/apply (core.clj:617) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment