changed parser to parse add headers null terminated