Interesting. That is the one use case I could think of -- transcoding on the fly. And, I was thinking the same thing -- only allow that if the user explicitly asks for it. But, by default, make them read the request before sending the response, because that is what they want 99% of the time and doing something else is just asking for trouble.

- jeremy


On Wed, Sep 18, 2013 at 4:58 AM, Gregory Collins <greg@gregorycollins.net> wrote:

On Wed, Sep 18, 2013 at 1:54 AM, Jeremy Shaw <jeremy@n-heptane.com> wrote:
I'm still thinking that sending a response body that depends on the request body before the whole request body has been received is asking for trouble.

We allow you to do this in Snap but you have to explicitly ask for it. An example application here would be streaming transcoding. The client has to be written with this in mind in order for this to work (if it's not reading the response while it's streaming the request body, eventually its write()s will block), so this is a feature that only really makes sense for API servers.  

G
--
Gregory Collins <greg@gregorycollins.net>