Refactor chunked encoding body parsing.