Use the same HttpHeaders optimisations in master as in 4.0