Та же проблемма!!!
перерыл весь интернет, решения не нашел.
Мои заголовки (это я смотрю в браузере, с помощью ieHTTPHeaders):
GET /pda/ HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Accept-Language: ru
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; InfoPath.1)
Host: mail.yandex.ru
Connection: Keep-Alive
Заголовки ответа сервера (тоже посмотрел в браузере):
HTTP/1.1 200 OK
Cache-Control: max-age=0, must-revalidate, proxy-revalidate, no-cache, no-store, private
Connection: Keep-Alive
Content-Encoding: gzip
Content-Type: text/html; charset=windows-1251
Date: Thu, 02 Oct 2008 23:08:19 GMT
Expires: Thu, 02 Oct 2008 23:13:19 GMT
Last-Modified: Thu, 02 Oct 2008 23:08:19 GMT
Pragma: no-cache
Server: BAIDA/2.0.1
Transfer-Encoding: Chunked
Мой код:
procedure TForm1.Button1Click(Sender: TObject);
var
InStream, OutStream: TmemoryStream;
begin
IdHTTP1.IOHandler:=IdIOHandlerStack1;
IdHTTP1.CookieManager:=IdCookieManager1;
IdHTTP1.Compressor:=IdCompressorZLibEx1;
IdHTTP1.AllowCookies:=true;
IdHTTP1.HandleRedirects:=true;
IdHTTP1.Request.Accept:='image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*';
IdHTTP1.Request.AcceptLanguage:='ru';
IdHTTP1.Request.AcceptEncoding:='gzip, deflate';
IdHTTP1.Request.UserAgent:='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; InfoPath.1)';
IdHTTP1.Request.Host:='mail.yandex.ru';
IdHTTP1.Request.Connection:='Keep-Alive';
InStream:=TMemoryStream.Create;
OutStream:=TMemoryStream.Create;
IdHTTP1.Get('http://mail.yandex.ru/pda/',InStream);
IdCompressorZLibEx1.DecompressGZipStream(InStream,OutStream);
Memo1.Lines.LoadFromStream(OutStream);
InStream.Free;
OutStream.Free;
end;
Delphi 2006, Indy 10
код наглухо виснет на строчке IdHTTP1.Get...
Помогите, люди добрые!!!