heroku/cowboy — pull request #3 by omarkj (2014-05-12 21:44:15+00:00)
Title: Handle invalid header values

We have been seeing errors that look like this:

```
hermes.110374: Error in process <0.25615.993> on node 'hermes@ip-10-190-226-11.ec2.internal' with exit value: {{case_clause,<<73 bytes>>},[{cowboy_protocol,parse_hd_value,9,[{file,"src/cowboy_protocol.erl"},{line,405}]}]}
```

This happens when requests with badly formatted header values arrive. In cowboy at the moment these requests are not handled and cause a case clause crash. The most probable reason for these issues is a badly formatted [multi-line headers](http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

This commit will make sure those requests cause a HTTP 400 (bad request).