<div dir="ltr"><br><br><div class="gmail_quote">On Sun, May 23, 2010 at 1:36 AM, Gregory Collins <span dir="ltr">&lt;<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; writes:<br></div><div class="im">
<br>
&gt;     If the POST body has content-type &quot;application/x-www-form-urlencoded&quot; we<br>
&gt;     parse it for you and put the fields in the parameter mapping. If this<br>
&gt;     isn&#39;t your case I&#39;d appreciate a bug report. This is a place where we<br>
&gt;     made a different design decision than you did -- a WAI application which<br>
&gt;     expects to parse the POST body itself won&#39;t work. I&#39;ll think about<br>
&gt;     adding a knob to make this behaviour optional.<br>
&gt;<br>
&gt; I&#39;d appreciate such a knob. Out of curiosity, do you also parse<br>
&gt; multi-part data? <br>
<br>
</div>No, not yet :(, and we&#39;ll never do so automatically; we limit POST<br>
bodies to 1MB or something like that (to prevent malicious requests from<br>
trashing the server) but multipart requests can contain file uploads,<br>
which we would probably want to be able to stream to disk somehow.<br>
<br></blockquote><div>If you&#39;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.</div>
<div><br></div><div>Michael </div></div></div>