fixed bug where parsing would hang sometimes at the end of a chunked transfer