title: System.FormatException when adding User-Agent with colon
body: <p>I am trying to make a http request like this one <a href="https://tools.keycdn.com/geo.json?host=google.com" rel="nofollow noreferrer">https://tools.keycdn.com/geo.json?host=google.com</a> in C#. For this, according to the <a href="https://tools.keycdn.com/geo?host=google.com" rel="nofollow noreferrer">https://tools.keycdn.com/geo?host=google.com</a>, I have to add user agent like this</p>
  <pre><code>User-Agent: keycdn-tools:https://myownsite.com
  </code></pre>
  <p>I am doing the request with this code:</p>
  <pre><code>HttpClient? client = new HttpClient();
  
  // Add correct user agent.
  var request = new HttpRequestMessage(HttpMethod.Get, &quot;https://tools.keycdn.com/geo.json?host=&quot; + textBoxDomain.Text);
  var useragentValue = new ProductInfoHeaderValue(&quot;keycdn-tools:https://myownsite.com&quot;);
  request.Headers.UserAgent.Add(useragentValue);
  
  var result = await client.SendAsync(request);
  </code></pre>
  <p>But I get the System.FormatException when adding the user agent.</p>
  <p><a href="https://i.stack.imgur.com/U8tSO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U8tSO.png" alt="enter image description here" /></a></p>
  <p>How can I resolve this problem?</p>
  <p><strong>Edit</strong></p>
  <p>I tried to solve the problem by adding DefaultRequestHeaders directly to client object, but I got the same error message</p>
  <p><a href="https://i.stack.imgur.com/BPojE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BPojE.png" alt="enter image description here" /></a></p>
  <p>Then I tried to add the header to the request, but there I got also the same error message</p>
  <p><a href="https://i.stack.imgur.com/19Lso.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/19Lso.png" alt="enter image description here" /></a></p>