Consolidate HTTP header generation.