Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2011, 07:34 PM
BaraoZemo BaraoZemo is offline
Senior Member
 
Join Date: Nov 2001
Posts: 3,598
Exclamation problem with HTTPCLI download

Hi,

I use DELPHI 7 with this code for a long time with ICS7 without any problems... My code download a page using httpcli and save in my local disk.

but now ,after a fews months, the main site was updated and uses gzip-deflate and I think that this is the problem, I don't know how to
handle this, and my code stop working. please, need help urgent.....

download ICS7 package:
ICS7 package => http://www.overbyte.be/arch/OverbyteIcsV7.zip

download my full code (with sources and compiled exe).

http://www.fileden.com/files/2010/4/...using-ICS7.zip

Last edited by BaraoZemo; 06-30-2011 at 12:47 AM.
Reply With Quote
  #2  
Old 06-30-2011, 07:52 PM
nester261 nester261 is offline
Moderator
 
Join Date: Jan 2004
Location: UK
Posts: 618
Default

I downloaded your code but didn't get anything other than a blank html document and no text in the Memo...

Now, what I have tried is using the Snapse library and it seems that the page wants to redirect. I also got the same results with Indy.

Here is the code I used and the response back from the website...

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  HTTP: THTTPSend;
begin
  HTTP := THTTPSend.Create;
  try
    HTTP.HTTPMethod('GET', Edit1.text);
    Memo1.Lines.Assign(HTTP.Headers);
    Memo2.Lines.LoadFromStream(HTTP.Document);
  finally
    HTTP.Free;
  end;
end;
Response...

Code:
HTTP/1.1 302 Found
Location: http://www.caixa.gov.br/
Set-Cookie: security=true; path=/
Connection: close
Content-Length: 0
Content-Type: text/html; charset=UTF-8
__________________
"Where there's a will, there's always a way."

-- The Hon Robert Nester Marley O.M. - aka Bob Marley!
Reply With Quote
  #3  
Old 06-30-2011, 09:31 PM
BaraoZemo BaraoZemo is offline
Senior Member
 
Join Date: Nov 2001
Posts: 3,598
Default

with the indy 10 (tiburon) , if you enable "cookies" (attach the cookies component to the idhttp, you will see the download working fine.. )
but I don't like use idhttp, because It freezes the application while downloading... and I got some memory leaks with indy so I don't use it.

Last edited by BaraoZemo; 06-30-2011 at 09:45 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:51 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.