[FIX] _read_until_end() method to pass tests