hyperdrive-0.1: a fast, trustworthy HTTP(s) server built

Safe HaskellNone






:: (Proxy p, Monad m) 
=> Bool

is this an HTTPS connection?

-> SockAddr 
-> StateP ByteString p () ByteString a b m Request 

pipeBody :: (Proxy p, Monad m) => Request -> () -> StateP ByteString p () ByteString a ByteString m rSource

currently if you consume the entire request body this will terminate and return the ret value that you supplied. But, that seems wrong, because that will tear down the whole pipeline and return that value instead of what you really wanted to return.

Perhaps this should return a 'Maybe ByteString' instead so you can detect when the body ends? But that interfers with using parseRequest in httpPipe. For now we will just return empty forever when you get to the end.

Perhaps pipes 2.5 will provide a better solution as it is supposed to allow you to catch termination of the upstream pipe.

takeLine :: (Proxy p, Monad m) => StateP ByteString p () ByteString a b m ByteStringSource

find a line terminated by a '\r\n'