cosmetic
tune buffer sizes in order to improve performance for non-tiny messages
cosmetic
always read everything from socket
...rather than a specific number of bytes when the content-length is
submitted.

This simplifies the code and, in the presence of appropriately sized
buffers, is no less efficient.
refactor: simplify closures and do work earlier
merge default into bug24968
refactor: eliminate code duplication
This isn't shorter, but imo clearer
Merge bug24872.
Unbreak the tests. Ahem.
Merge heads
Merge bug24968
cosmetic
consistency
simplifying refactor
Stop ignoring carriage returns in the middle of command strings
Refactor parsing to make it more obvious
Stop ignoring carriage returns in headers
Merge in default
Repair refactor breakage.
Added tests for interframe heartbeat, null bytes and carriage returns (sic) with test for intra-command carriage return.