title: Delphi HTTP POST Method - Cookies issue
body: <p>i'm trying to logging into a website but this site always response with </p>
  
  <p>"You don't seem to accept cookies. Cookies are required in order to log in."</p>
  
  <p>why my program doesn't allow cookies?</p>
  
  <pre><code>function HF_Login(): boolean;
  var
   HTTP : TIDHTTP;
   Cookie : TidCookieManager;
   Data, Page : TStringList;
  begin
   HTTP := TIDHTTP.Create(NIL);
   Cookie := TidCookieManager.Create(NIL);
  
   HTTP.Request.UserAgent := 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1';
   HTTP.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
   HTTP.Request.AcceptLanguage := 'en-us;q=0.7,en;q=0.3';
   HTTP.Request.AcceptCharSet := 'windows-1251,utf-8;q=0.7,*;q=0.7';
   HTTP.Request.Pragma := 'no-cache';
   HTTP.Request.CacheControl := 'no-cache';
   HTTP.Request.RawHeaders.Add('X-Requested-With: XMLHttpRequest');
   HTTP.AllowCookies := True;
   HTTP.HandleRedirects := True;
   HTTP.ProtocolVersion := pv1_1;
   HTTP.Request.Connection := 'Keep-Alive';
   HTTP.CookieManager  := Cookie;
  
   Data := TStringList.Create;
   Page := TStringList.Create;
  
          //  returnto=%2F&amp;user=[user]&amp;pass=[pass]
   Data.Add('returnto=%2F&amp;user=csz0021&amp;pass=Yese0071');
  
   page.Text := HTTP.Post('http://hotfile.com/login.php', Data);
   //form1.RichEdit1.Text := HTTP.Post('http://hotfile.com/login.php', Data);
  
   If Pos('Bad username/password combination.', Page.Text) &lt;&gt; 0 Then Result := False
   else Result := True;
  
   Page.Free;
   Data.Free;
  end;
  </code></pre>
  
  <p>this is a free account to test the website.</p>
  
  <p>csz0021 </p>
  
  <p>Yese0071 </p>
  
  <hr>
  
  <p>Thanks</p>