feature: added error case
bugfix: don't assume, that the first chunk contains only headers, see issue #5