@@ -243,18 +243,15 @@ takeUntil c bs =
243243
244244parseFirst :: ByteString
245245 -> E.Iteratee S.ByteString IO (ByteString, ByteString, ByteString, HttpVersion)
246−parseFirst s = do
247− let pieces = S.split 32 s -- ' '
248− (method, query, http') <-
249− case pieces of
250− [x, y, z] -> return (x, y, z)
251− _ -> E.throwError $ BadFirstLine $ B.unpack s
252− let (hfirst, hsecond) = B.splitAt 5 http'
253− if (hfirst == "HTTP/")
254− then
255− let (rpath, qstring) = S.breakByte 63 query -- '?'
256− in return (method, rpath, qstring, hsecond)
257− else E.throwError NonHttp
246+parseFirst s =
247+ case S.split 32 s of -- ' '
248+ [method, query, http'] -> do
249+ let (hfirst, hsecond) = B.splitAt 5 http'
250+ if hfirst == "HTTP/"
251+ then let (rpath, qstring) = S.breakByte 63 query -- '?'
252+ in return (method, rpath, qstring, hsecond)
253+ else E.throwError NonHttp
254+ _ -> E.throwError $ BadFirstLine $ B.unpack s
258255{-# INLINE parseFirst #-} -- FIXME is this inline necessary? the function is only called from one place and not exported
259256
260257httpBuilder, spaceBuilder, newlineBuilder, transferEncodingBuilder