extend/cowboy — pull request #529 by bgentry (2013-05-30 18:39:06+00:00)
Title: zero-length header names MUST issue a stream error

(ported from essen/cowboy#1)

Hi Loïc,

Here's a small first contribution.

Section [2.6.10](http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3#TOC-2.6.10-Name-Value-Header-Block) states:

> Each header name must have at least one value. Header names are encoded using the US-ASCII character set [ASCII] and must be all lower case. The length of each name must be greater than zero. A recipient of a zero-length name MUST issue a stream error (Section 2.4.2) with the status code PROTOCOL_ERROR for the stream-id.

So I've made the case of a zero-length header name do just that.

I'm still not sure if/how you'd prefer to unit test things like this, so I'd appreciate some feedback on that :v: