title: HttpClient not getting same CookieContainer as HttpWebRequest
body: <p>I have an application in WPF that I use HttpWebRequest to Post a login in a 3rd party website, the HttpWebRequest.GetResponse works pretty well and
  I get the correct cookies that I need.</p>
  
  <p>The code working fine is:</p>
  
  <pre><code>var cookies = new CookieContainer();
  string postData = "login-passaporte=email@yahoo.com.br&amp;senha-passaporte=PASS&amp;urlRetorno=http://sportv.globo.com/site/cartola-fc/&amp;usar-sso=true&amp;botaoacessar=acessar";
  byte[] data = new UTF8Encoding().GetBytes(postData);
  
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://loginfree.globo.com/login/438");
  
  request.Timeout = 100000;
  request.CookieContainer = cookies;
  request.Method = WebRequestMethods.Http.Post;
  request.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)";
  request.AllowWriteStreamBuffering = true;
  request.ProtocolVersion = HttpVersion.Version11;
  request.AllowAutoRedirect = true;
  request.ContentType = "application/x-www-form-urlencoded";
  
  request.ContentLength = data.Length;
  Stream newStream = request.GetRequestStream();
  newStream.Write(data, 0, data.Length);
  newStream.Close();
  
  HttpWebResponse getResponse = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>Then, when I try to port this code for an Windows 8 Store App, using HttpClient, my code do not return the correct logged cookie (9 cookies on code above, only 1 cookie below, same cookie that I get when use invalid username or password)</p>
  
  <pre><code>var cookies = new CookieContainer();
  
  string postData = "login-passaporte=email@yahoo.com.br&amp;senha-passaporte=PASS&amp;urlRetorno=http://sportv.globo.com/site/cartola-fc/&amp;usar-sso=true&amp;botaoacessar=acessar";
  HttpContent content = new StringContent(postData, UTF8Encoding.UTF8);
  
  HttpClientHandler handler = new HttpClientHandler();
  handler.CookieContainer = cookies;
  handler.UseCookies = true;
  handler.AllowAutoRedirect = true;
  
  var client = new HttpClient(handler);
  client.MaxResponseContentBufferSize = 1024 * 1024;
  client.Timeout = new TimeSpan(1000000000);
  client.DefaultRequestHeaders.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)");
  
  var response = await client.PostAsync("https://loginfree.globo.com/login/438", content);
  </code></pre>
  
  <p>Looks to me that the HttpClient.PostAsync is not sending the correct information to the page but I try almost everything that I know and can't figure out what is it.</p>
  
  <p>PS.: This username and password is just an working account for tests.</p>