title: HttpClient with ResponseHeadersRead fails(timeouts) at 2nd GetAsync try without Fiddler(Http/Https debugger)
body: <p>I'm trying to get some page's status code.</p>
  
  <p>Problem is default GetAsync method returns the whole page with content, while I only needed the header to check page's status(404,403, etc..), which will end up as hogging up the memory since I have to check tons of URIs.</p>
  
  <p>I added ResponseHeadersRead option to solve that memory hogging issue, but then that code started to throw "A Task was cancelled" Exception, which means timeout.</p>
  
  <p>Things that i know :</p>
  
  <ol>
  <li><p>ResponseHeadersRead code ONLY works, when i runs fiddler(Http/Https Debugger) on my local PC.</p></li>
  <li><p>ResponseHeadersRead code works at online-coding environment, like dotnetfiddle. but doesnt work on Windows OS Environment.</p></li>
  </ol>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net.Http;
  using System.Text;
  using System.Threading.Tasks;
  using System.IO;
  using System.Net;
  using System.Security.Cryptography;
  
  
  public class Program
  {
      public static string[] Tags = { "first", "second" };
      public static string prefix = null;
      static HttpClient Client = new HttpClient();
      public static void Main()
      {
          System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
          Client.DefaultRequestHeaders.ConnectionClose = true;
  
          // limit parallel thread
          Parallel.ForEach(Tags,
          new ParallelOptions { MaxDegreeOfParallelism = Convert.ToInt32(Math.Ceiling((Environment.ProcessorCount * 0.75) * 1.0)) },
          tag =&gt;
          {
              for (int i = 1; i &lt; 4; i++)
              {
                  switch (i)
                  {
                      case 1:
                          prefix = "1";
                          break;
                      case 2:
                          prefix = "2";
                          break;
                      case 3:
                          prefix = "3";
                          break;
                  }
                  Console.WriteLine(tag.ToString() + " and " + i);
                  HttpResponseMessage response = Client.GetAsync("https://example.com/" + prefix).Result; // this works
  //                HttpResponseMessage response = Client.GetAsync("https://example.com/" + prefix,HttpCompletionOption.ResponseHeadersRead).Result; // this fails from 2nd try with one url.
                  Console.WriteLine(i + " and " + (int)response.StatusCode);
                  if (response.StatusCode != HttpStatusCode.NotFound)
                  {
  
                  }
  
              }
          });
  
      }
  }
  </code></pre>
  
  <p>It gets thread timeout with ResponseHeadersRead, while it isn't without it.</p>
  
  <p><a href="https://i.stack.imgur.com/AkHwr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AkHwr.png" alt="enter image description here"></a></p>