[Haskell-cafe] [ANNOUNCE] First Public Release of the Snap Framework

Michael Snoyman michael at snoyman.com
Sun May 23 00:00:40 EDT 2010


On Sun, May 23, 2010 at 1:36 AM, Gregory Collins <greg at gregorycollins.net>wrote:

> Michael Snoyman <michael at snoyman.com> writes:
>
> >     If the POST body has content-type "application/x-www-form-urlencoded"
> we
> >     parse it for you and put the fields in the parameter mapping. If this
> >     isn't your case I'd appreciate a bug report. This is a place where we
> >     made a different design decision than you did -- a WAI application
> which
> >     expects to parse the POST body itself won't work. I'll think about
> >     adding a knob to make this behaviour optional.
> >
> > I'd appreciate such a knob. Out of curiosity, do you also parse
> > multi-part data?
>
> No, not yet :(, and we'll never do so automatically; we limit POST
> bodies to 1MB or something like that (to prevent malicious requests from
> trashing the server) but multipart requests can contain file uploads,
> which we would probably want to be able to stream to disk somehow.
>
> If you're interested, you can look at the Network.Wai.Parse module in
wai-extra. The parseRequestBody function takes an argument of type Sink that
specifies how data should be stored. By default, I provide an lbsSink and
tempFileSink.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100522/54a23777/attachment.html


More information about the Haskell-Cafe mailing list