mochi/mochiweb — pull request #86 by kmwang (2012-10-09 10:27:56+00:00)
Title: add ability to handle combined content-length header.

Spotted some crashes in logs recently:
```
crasher:
initial call: mochiweb_acceptor:init/3
pid: <0.13365.59>
registered_name: []
exception error: bad argument
in function list_to_integer/1
called as list_to_integer("377, 377")
in call from mochiweb_request:should_close/1
in call from mochiweb_http:after_response/2
```

It looks like mochiweb can't handle a request with a combined content-length header, e.g. "content-length: 377, 377" but HTTP spec (RFC 2616, 4.2 Message Headers) seems to allow a proxy to do so.

The patch makes mochiweb be able to accept such requests, but only when the values in the content-length header are all the same.