
29 Nov
2011
29 Nov
'11
8:51 a.m.
On Mon, Nov 28, 2011 at 2:36 PM, Kazu Yamamoto
But I'm talking about relaying for body of HTTP request. 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.
Hi Kazu,
The most straightforward way I know of to do it is through a bounded
channel (http://hackage.haskell.org/package/bounded-tchan or
http://hackage.haskell.org/package/BoundedChan). You'd fork a thread
to enumerate the output end of the socket and feed it request body
chunks through the channel, then do the reverse to proxy the response.
G
--
Gregory Collins