Which library should I use to parse HTTP requests from a socket stream? I'd like something that I can give a lazy ByteString which may contain partial or multiple HTTP requests.
I'm also interested in something similar for responding to HTTP requests (pass it a response object and get the lazy ByteString to write to the socket)
Edited to add more info: This interface would be ideal, but of course not required:
ByteString {- the initial buffer -} -> (Maybe Request, ByteString {- remaining buffer -})
In case of a partial request, the Maybe Request is Nothing and the ByteString is the same as the input.
Thanks :-)