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

> Michael Snoyman <mich...@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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to