Manually set headers after writing content