add done flag in http parser