[web-devel] Sending a Response before the Request has been entirely consumed?

Jeremy Shaw jeremy at n-heptane.com
Wed Sep 18 17:30:04 CEST 2013


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 at gregorycollins.net>wrote:

>
> On Wed, Sep 18, 2013 at 1:54 AM, Jeremy Shaw <jeremy at 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 at gregorycollins.net>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20130918/d1cfc892/attachment.htm>


More information about the web-devel mailing list