DRY up handling of 'Content-Type' header