on master help sign in
do not indicate a continuation header when the current line is empty or consists entirely of a carriage return
commit424b03e8c4ddfe54a9d5c20d8733e41c84b8bb96 authorjay groven <jgroven@lutsendata.com> dateFri 4 Jan 2013, 17:39 (14 years ago) parent86d78de
1 file changed+5−1
warp/Network/Wai/Handler/Warp/Request.hs+5−1
warp/Network/Wai/Handler/Warp/Request.hs+5−1
@@ -160,7 +160,11 @@ push (THStatus len lines prepend) bs
160160 -- if so, see if the second of those is a horizontal space
161161 if bsLen > nl + 1 then
162162 let c = S.index bs (nl + 1)
163− in Just (nl, c == 32 || c == 9)
163+ b = case nl of
164+ 0 -> True
165+ 1 -> S.index bs 0 == 13
166+ _ -> False
167+ in Just (nl, (not b) && (c == 32 || c == 9))
164168 else
165169 Just (nl, False)
166170