请问tidhttp提交自定义cookie有关问题

请教tidhttp提交自定义cookie问题
小弟想在get前 提交自定义cookie!我使用Twebbrowser进行登陆站点,获取到了cookie。
然后我使用这些cookie提交给tidhttp。结果发现就是不行,不知道怎么回事!希望大家能帮助!
Delphi(Pascal) code

cookie:= WebBrowser1.OleObject.document.cookie;//webbrowser获取cookie

http.Request.CustomHeaders.Values['Cookie']:=cookie; //将cookie提交给tidhttp

结果还是没有登陆。不知道是不是不能这样提交cookie呢???

弄了好久了 希望大家帮忙 感谢感谢!

------解决方案--------------------
确定cookie里得到了正常的cookie值吗?

IdHTTP1.Request.CustomHeaders.Add('Cookie: '+Cookie);
------解决方案--------------------
看你这样子,是用人工来写验证码吧。呵呵
只要Cookie 正确的话,那边是分不出来你用的什么提交的
注意改两个地方
Http.Request.UserAgent
Http.Request.referer
可能拼得有点不太对,但大约就是这个意思了。
------解决方案--------------------
看你这样子,是用人工来写验证码吧。呵呵
只要Cookie 正确的话,那边是分不出来你用的什么提交的
注意改两个地方
Http.Request.UserAgent
Http.Request.referer
可能拼得有点不太对,但大约就是这个意思了。


注意改两个地方
Http.Request.UserAgent
Http.Request.referer
????这个要修改??还是按照抓包信息赋值就可以了?


------解决方案--------------------
试试我的初始化

Delphi(Pascal) code

  idhtp1.AllowCookies:=true;
  idhtp1.HandleRedirects:=true;
  idhtp1.CookieManager:=idckmngr1;
  idhtp1.Request.Connection:='Keep-Alive';
  idhtp1.Request.UserAgent:='Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2';
  idhtp1.Request.ContentType:='application/x-www-form-urlencoded';
  idhtp1.Request.Accept:='image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*';
  idhtp1.Request.AcceptEncoding:='gzip, deflate';
  idhtp1.Request.CacheControl:='no-cache';
  idhtp1.ReadTimeout:=30000;
  idhtp1.HTTPOptions:=idhtp1.HTTPOptions+[hoKeepOrigProtocol];
  idhtp1.ProtocolVersion:=pv1_1;