use processed_headers instead of headers
rewind the payload stream after read the payload.