[web-devel] Advice on implementing a web proxy

Michael Snoyman michael at snoyman.com
Thu Dec 8 06:06:32 CET 2011


On Thu, Dec 8, 2011 at 6:48 AM, Erik de Castro Lopo
<mle+hs at mega-nerd.com> wrote:
> Kazu Yamamoto (山本和彦) wrote:
>
>> >> In other
>> >> words, my concern is about uploading. In my company, uploading files
>> >> whose size is some giga bytes is quite common. I don't know how to
>> >> relay a uploading huge file with a fixed-size buffer with Warp.
>> >
>> > I too would very much like to see a solution to this issue.
>>
>> It seems to me that your http-proxy package solves this problem. Is my
>> understanding correct?
>
> Unfortunately, no. This is listed as one of the know problems
> in the readme file:
>
>    https://github.com/erikd/http-proxy/blob/master/README.txt
>
> I my opinion, the way to fix this is to modify and extend Wai.
> I too would like to see this problem solved but its lower
> priority than some of the other things I want to address.

Can you point me to the code that demonstrates this?

>> Your package has some duplicated code from Warp.
>
> Indeed.
>
>> Is it possible to
>> merge the functionality to Warp and to provide the proxy feature which
>> is re-usable from WAI applications?
>
> I'm not sure. Most of the duplicated code is utility functions. If
> they were may available in the Warp API, then I could use them, but
> I think Warp (being a web server) and http-proxy are sufficiently
> different to make it difficult to merge them.
>
>> I would like to implement robust reverse-proxy on Warp.
>
> So you need the standard features of Warp as well as reverse-proxy
> features? Do you need to reverse proxy HTTPS as well as HTTP? I
> found that perforiming proxying of HTTP relatively easy and that
> doing it for HTTPS inside Warp was impossible.
>
> Cheers,
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel



More information about the web-devel mailing list