Decompose headers writing to func.