Fix detection of incomplete HTTP requests

Fixes #53.