Skip to content

Commit cfdb0d4

Browse files
committed
check that we actually read something in cjls.repl.server/read-request
1 parent 2a413d4 commit cfdb0d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/clojure/cljs/repl/server.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,12 @@
9090
:headers headers}))
9191

9292
(defn read-request [rdr]
93-
(let [line (.readLine rdr)]
93+
(if-let [line (.readLine rdr)]
9494
(cond
9595
(.startsWith line "POST") (read-post line rdr)
9696
(.startsWith line "GET") (read-get line rdr)
97-
:else {:method :unknown :content line})))
97+
:else {:method :unknown :content line})
98+
{:method :unknown :content nil}))
9899

99100
(defn- status-line [status]
100101
(case status

0 commit comments

Comments
 (0)