[web-devel] Proposal: http-types

Aristid Breitkreuz aristidb at googlemail.com
Thu Feb 3 18:21:49 CET 2011

2011/2/3 Gregory Collins <greg at gregorycollins.net>

> On Thu, Feb 3, 2011 at 5:33 PM, Aristid Breitkreuz
> <aristidb at googlemail.com> wrote:
> > I did not even claim that I want to ditch CIByteString, just that I am
> > unsure how to proceed with it.
> > Note that you yourself do not even use CIByteString consistently: You use
> it
> > for the header names in WAI, but not for Method, and not at all in
> > http-enumerator.
> According to the spec, methods are not case-insensitive, the defined
> ones are explicitly uppercase and "extension-method" has type "token",
> see RFC 2616 section 5.1.1. Headers *are* case-insensitive (see
> section 4.2) so it's convenient to treat them as such in datatypes,
> especially where lookup is concerned -- hence CIByteString.

Oh, sorry, my mistake. I thought both were case-insensitive and failed to
look it up.

> Re: method, Snap uses a datatype because 5.1.1 gives an explicit
> enumeration, but you could do it either way and have a reasonable
> rationale.

True. I am not really attached to either approach, even if it may have
seemed differently, I just need explanations.

So, I think for now I may just implement both variants, and provide
conversion functions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110203/aadb85d4/attachment.htm>

More information about the web-devel mailing list