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

Gregory Collins greg at gregorycollins.net
Sat May 22 18:36:19 EDT 2010


Michael Snoyman <michael at snoyman.com> writes:

>     Would you accept:
>    
>        ciToLower :: CIByteString -> ByteString
>    
>     instead? I prefer opaque datatypes in general. We didn't see a need for
>     that use-case, the idea was that the string representation would be the
>     same but we would do a case-insensitive compare.
>
> Well, that solves half the problem: I also would like to be able to
> hand in a lower-case version when converting from the WAI
> ResponseHeader to a CIByteString.

You can pass a lower-case input, it'll get lowercased again but that
isn't such a big price to pay.


>     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.

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


More information about the Haskell-Cafe mailing list