on master help sign in
proper signature.
34a82a6Kazu Yamamoto
warp/Network/Wai/Handler/Warp/RequestHeader.hs+4−1
@@ -44,7 +44,10 @@ parseHeaderLines (firstLine:otherLines) = do
44-- >>> parseRequestLine "GET /NotHTTP UNKNOWN/1.1"
44-- >>> parseRequestLine "GET /NotHTTP UNKNOWN/1.1"
45-- *** Exception: NonHttp
45-- *** Exception: NonHttp
46parseRequestLine :: ByteString
46parseRequestLine :: ByteString
47+ -> IO (H.Method
48+ ,ByteString -- Path
49+ ,ByteString -- Query
47− -> IO (ByteString, ByteString, ByteString, H.HttpVersion)
50+ ,H.HttpVersion)
48parseRequestLine requestLine = do
51parseRequestLine requestLine = do
49 let (method,rest) = S.breakByte 32 requestLine -- ' '
52 let (method,rest) = S.breakByte 32 requestLine -- ' '
50 (pathQuery,httpVer') = S.breakByte 32 (S.drop 1 rest) -- ' '
53 (pathQuery,httpVer') = S.breakByte 32 (S.drop 1 rest) -- ' '