[web-devel] Proposal: http-types

Gregory Collins greg at gregorycollins.net
Thu Feb 3 18:00:59 CET 2011


On Thu, Feb 3, 2011 at 5:33 PM, Aristid Breitkreuz
<aristidb at googlemail.com> wrote:
> I found your tone disappointing and to some degree upsetting, but I will try
> to stay objective. (I had a few hours to calm down.)

Oh, please. If a debate this mild is enough to make you angry for
hours, I don't understand how you can even leave your house in the
morning.


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

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.

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



More information about the web-devel mailing list