Extract the CreateHostHeaderValue method.