on master help sign in
Using proper type.
commit4883f84f7b9331d48fb5f34d7257623a5744a92d authorKazu Yamamoto <kazu@iij.ad.jp> dateMon 28 Oct 2013, 16:11 (13 years ago) parent4189d02
1 file changed+6−6
warp/Network/Wai/Handler/Warp/Request.hs+6−6
warp/Network/Wai/Handler/Warp/Request.hs+6−6
@@ -70,7 +70,7 @@ headerLines =
7070
7171----------------------------------------------------------------
7272
73−parseHeaderLines :: [ByteString] -> IO (ByteString, ByteString, ByteString, H.HttpVersion, [H.Header])
73+parseHeaderLines :: [ByteString] -> IO (ByteString, ByteString, ByteString, H.HttpVersion, H.RequestHeaders)
7474parseHeaderLines [] = throwIO $ NotEnoughLines []
7575parseHeaderLines (firstLine:otherLines) = do
7676 (method, rpath', gets, httpversion) <- parseFirst firstLine
@@ -117,9 +117,9 @@ parseRpath rpath'
117117
118118handleExpect :: Connection
119119 -> H.HttpVersion
120− -> ([H.Header] -> [H.Header])
121− -> [H.Header]
122− -> IO [H.Header]
120+ -> (H.RequestHeaders -> H.RequestHeaders)
121+ -> H.RequestHeaders
122+ -> IO H.RequestHeaders
123123handleExpect _ _ front [] = return $ front []
124124handleExpect conn hv front (("expect", "100-continue"):rest) = do
125125 connSendAll conn $
@@ -132,7 +132,7 @@ handleExpect conn hv front (x:xs) = handleExpect conn hv (front . (x:)) xs
132132----------------------------------------------------------------
133133
134134bodyAndSource :: ResumableSource IO ByteString
135− -> [H.Header]
135+ -> H.RequestHeaders
136136 -> IO (Source IO ByteString
137137 ,RequestBodyLength
138138 ,IO (ResumableSource IO ByteString))
@@ -150,7 +150,7 @@ bodyAndSource src hdr
150150 bodyLen = KnownLength $ fromIntegral len0
151151 chunked = isChunked hdr
152152
153−isChunked :: [H.Header] -> Bool
153+isChunked :: H.RequestHeaders -> Bool
154154isChunked hdr = maybe False ((== "chunked") . CI.foldCase) $ lookup hTransferEncoding hdr
155155
156156----------------------------------------------------------------