Implement size limits on HTTP header length and body length. Patch from Constantine Verutin, simplified a little. svn:r1500