[web-devel] Proposal: http-types

Michael Snoyman michael at snoyman.com
Fri Feb 4 07:12:18 CET 2011


2011/2/3 kyra <kyrab at mail.ru>:
> On 2/2/2011 1:32 PM, Michael Snoyman wrote:
>>
>> * Request/response header key. In WAI, I use data CIByteString =
>> CIByteString !ByteString !ByteString, one version being the lowercase,
>> the other the original.
>
> I'm using Microsoft kernel-mode http server (http.sys). They have "known
> headers" enumeration and "unknown headers" string. Now, while http.sys
> parses requests and gives me enum keys for "known headers" I have to unparse
> them back strings to adapt them to WAI. It's not too much critical, but I
> would prefer the header key to be an ADT.
>
> Cheers, Kyra.
>

Do you mean you're implementing a WAI handler on top of http.sys?
That's cool, would you consider releasing it on Hackage?

I think the header key especially would be a bad fit for an ADT: there
are *far* too many standard ones to really include all of them, and
much more than request methods, new ones are made up. Just look at all
the special handling in http-types for the request methods, and
imagine writing those extra lines for *every* supported header.

Michael



More information about the web-devel mailing list