Board index » delphi » TIdHttp1.Post() Read Timeout

TIdHttp1.Post() Read Timeout


2006-06-08 07:31:11 AM
delphi134
Hi all...
After doing many searchs on the web i did the code below that returns a
Read Timeout error. Any hint?
var
Values : TStringList;
begin
// ShowMessage(IdHTTP1.Get('https://www.paypal.com')); //Works Perfectly
//Values from Y page
try
Values := TStringList.Create();
Values.Add('.tries=1');
Values.Add('.src=ym');
Values.Add('.md5=');
Values.Add('.hash=');
Values.Add('.js=');
Values.Add('.last=');
Values.Add('promo=');
Values.Add('.intl=us');
Values.Add('.bypass=');
Values.Add('.partner=');
Values.Add('.u=64erhq528elbg');
Values.Add('.v=0');
Values.Add('.challenge=tdNl0iXVyQQnBLulU3aFAA4Cps3E');
Values.Add('.yplus=');
Values.Add('.emailCode=');
Values.Add('pkg=');
Values.Add('stepid=');
Values.Add('.ev=');
Values.Add('hasMsgr=0');
Values.Add('.chkP=Y');
Values.Add('.done=mail.yahoo.com');
Values.Add('login=LOGINNAME');
Values.Add('passwd=PASSWORD');
ShowMessage(IdHTTP1.Post('https://login.yahoo.com/config/login?',Values));
//Read timeout here
finally
Values.Free;
end;
 
 

Re:TIdHttp1.Post() Read Timeout

"Joe Aley" <XXXX@XXXXX.COM>writes
Quote
Values.Add('login=LOGINNAME');
The URL you are posting to expects the value name to be "username" instead
of "login".
Gambit
 

Re:TIdHttp1.Post() Read Timeout

Remy Lebeau (TeamB) writes:
Quote
"Joe Aley" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...


>Values.Add('login=LOGINNAME');


The URL you are posting to expects the value name to be "username" instead
of "login".


Gambit


Works perfectly now!
Thanks.
 

Re:TIdHttp1.Post() Read Timeout

Joe Aley writes:
Quote
Remy Lebeau (TeamB) writes:

>"Joe Aley" <XXXX@XXXXX.COM>writes
>news:XXXX@XXXXX.COM...
>
>
>>Values.Add('login=LOGINNAME');
>
>
>
>The URL you are posting to expects the value name to be "username"
>instead
>of "login".
>
>
>Gambit
>
>
Works perfectly now!

Thanks.


Sorry for that mistake but when a saw a result i thought that it was the
right, and it wasn't.
Yahoo returned the login page, not the loged in page.
From the Y page "https://mail.yahoo.com/":
...
<input name="login" id="username" value="" size="17" class="yreg_ipt"
type="text">
...
So, the var is "login" what still result on read timeout.
Another hint?
 

Re:TIdHttp1.Post() Read Timeout

"Joe Aley" <XXXX@XXXXX.COM>writes
Quote
Yahoo returned the login page, not the loged in page.
That usually means that you did not provide everything that the login script
was looking for. Maybe you need to provide a valid Referer so the login
script knows where the values are supposed to be coming from. Or maybe you
don't have TIdHTTP setup to handle cookies properly. I don't know.
Gambit