Request for library recommendations

Hi all, I'm currently scoping out a project for work that I'd like to do in Haskell. Basically its a HTTP proxy (ie like the Squid proxy) but with a few wrinkles: - Since the connecting clients are untrusted, the incoming connection is HTTP, the header is modified by the proxy to add BasicAuth (credentials known only to the proxy, not the client) and then forwared upstream with responses pass back to the client. - Needs to work via upstream Squid proxy (so this proxy needs to be able to requirest a CONNECT from the upstream Squid proxy). - In some cases, the client will POST via the proxy and immediately exit and the proxy will be required to re-try the POST if it fails. - Other manipulation of headers and data. I am aware that Squid can satisfy the first two requirements above but not all the others (without actually hacking the Squid code base). I have done stuff like this before in C++ and Ocaml, so the mechanics are not a mystery. However I would like as much as possible to make use of existing Haskell libraries to cut down the development time. Performance is also not critical, so as long as the Haskell version can beat a hypothetical Python implementation I'd be happy. Thanks in advance. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/

Erik,
I have done stuff like this before in C++ and Ocaml, so the mechanics are not a mystery. However I would like as much as possible to make use of existing Haskell libraries to cut down the development time.
I recommend wai and warp which are available on Hackage. I asked Michael, the author of the libraries, to handle absolute URLs in warp. So, you can use it as a platform for HTTP proxies even for HTTP/1.0. --Kazu

On Wed, Apr 13, 2011 at 7:02 AM, Kazu Yamamoto
Erik,
I have done stuff like this before in C++ and Ocaml, so the mechanics are not a mystery. However I would like as much as possible to make use of existing Haskell libraries to cut down the development time.
I recommend wai and warp which are available on Hackage. I asked Michael, the author of the libraries, to handle absolute URLs in warp. So, you can use it as a platform for HTTP proxies even for HTTP/1.0.
And I would throw http-enumerator into that mix: its interface was actually designed to work together with WAI, so it should be fairly easy to pair them up together.
Michael
participants (3)
-
Erik de Castro Lopo
-
Kazu Yamamoto
-
Michael Snoyman