title: How can I repair a malformed value of a header on an HTTP response?
body: <p><strong>I'm trying to get the value of the <em>Content-Type</em> content header on an HTTP response.</strong></p>
  
  <pre><code>private async void StartButton_Click(object sender, EventArgs e)
  {
      var client = new HttpClient();
  
      // When I send a GET request to this website and print the response
      var response = await client.GetAsync("https://www.npr.org/sections/13.7/2017/12/01/567727098/a-tax-that-would-hurt-sciences-most-valuable-and-vulnerable");
      Console.WriteLine(response);
      // [BELOW] You can clearly see: Content-Type: text/html;;charset=UTF-8
  
      // However, the value is malformed (note the double semicolon) and becomes null
      Console.WriteLine(response.Content.Headers.ContentType == null);
      // True
  }
  </code></pre>
  
  <hr>
  
  <pre><code>StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
  {
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Credentials: true
    X-Content-Type-Options: nosniff
    X-XSS-Protection: 1; mode=block
    Referrer-Policy: no-referrer-when-downgrade
    Strict-Transport-Security: max-age=604800; includeSubDomains
    X-Frame-Options: SAMEORIGIN
    Transfer-Encoding: chunked
    Connection: keep-alive
    Connection: Transfer-Encoding
    Cache-Control: max-age=0
    Date: Tue, 19 Jun 2018 10:38:01 GMT
    Server: Apache
    X-Powered-By: PHP/5.6.33
    Content-Type: text/html;;charset=UTF-8
    Expires: Tue, 19 Jun 2018 10:38:01 GMT
    Last-Modified: Fri, 01 Dec 2017 15:41:00 GMT
  }
  </code></pre>
  
  <h1>How can I repair the malformed value of the <em>Content-Type</em> so it becomes <em>text/html; charset=UTF-8</em> instead of null?</h1>
  
  <p><em>I tried to explain my question as simply as possible. If you have any questions or think I left something out, please let me know! :)</em></p>