on master help sign in
do not indicate a continuation header when the current line is empty or consists entirely of a carriage return
424b03ejay groven
warp/Network/Wai/Handler/Warp/Request.hs+5−1
@@ -160,7 +160,11 @@ push (THStatus len lines prepend) bs
160 -- if so, see if the second of those is a horizontal space
160 -- if so, see if the second of those is a horizontal space
161 if bsLen > nl + 1 then
161 if bsLen > nl + 1 then
162 let c = S.index bs (nl + 1)
162 let c = S.index bs (nl + 1)
163+ b = case nl of
164+ 0 -> True
165+ 1 -> S.index bs 0 == 13
166+ _ -> False
163− in Just (nl, c == 32 || c == 9)
167+ in Just (nl, (not b) && (c == 32 || c == 9))
164 else
168 else
165 Just (nl, False)
169 Just (nl, False)
166
170