Board index » delphi » Delphi 5 / Indy 9.0.10 / HTTP compression / Content-Encoding

Delphi 5 / Indy 9.0.10 / HTTP compression / Content-Encoding

Hello all,

I am connecting to an HTTP server that supports "deflate" Content-Encoding
using the Indy library (9.0.10) under Delphi 5.

I have tried looking for examples on how to unzip the data that is returned
to
me, but was unable to find any. the following directory was empty too.

ftp://indy90demos:p...@ftp.nevrona.com/Demos/Indy/9.0/Delphi_5/Delphi/Compres
sionIntercept/

so, here is what i am doing:

myIntercept := TIdCompressionIntercept.Create(nil);

myIntercept.CompressionLevel := 1;

try
 myIntercept.Receive(rsp);
except
 on e : exception do
  showmessage('an exception error has occured..');
end;

myIntercept.Free;

where rsp is a memorystream containing the result of the following:

MyIdHttp.Post('http://' + myHostName +  myEndPoint,snd,rsp);

The problem is that after calling myIntercept.Receive(rsp);,
rsp's size is 0.

The same thing happens if a try and call .Send (with the appropriate
variables).

can anyone give me any suggestions?

thanks in advance,

- avi

 

Re:Delphi 5 / Indy 9.0.10 / HTTP compression / Content-Encoding


There is no demo currently for what you are looking for

/A.

Quote
"Avi Lewin" <avi-del...@itsg.net.au> wrote in message

news:3d5765a2_1@dnews...
Quote
> Hello all,

> I am connecting to an HTTP server that supports "deflate" Content-Encoding
> using the Indy library (9.0.10) under Delphi 5.

> I have tried looking for examples on how to unzip the data that is
returned
> to
> me, but was unable to find any. the following directory was empty too.

ftp://indy90demos:p...@ftp.nevrona.com/Demos/Indy/9.0/Delphi_5/Delphi/Compres
Quote
> sionIntercept/

> so, here is what i am doing:

> myIntercept := TIdCompressionIntercept.Create(nil);

> myIntercept.CompressionLevel := 1;

> try
>  myIntercept.Receive(rsp);
> except
>  on e : exception do
>   showmessage('an exception error has occured..');
> end;

> myIntercept.Free;

> where rsp is a memorystream containing the result of the following:

> MyIdHttp.Post('http://' + myHostName +  myEndPoint,snd,rsp);

> The problem is that after calling myIntercept.Receive(rsp);,
> rsp's size is 0.

> The same thing happens if a try and call .Send (with the appropriate
> variables).

> can anyone give me any suggestions?

> thanks in advance,

> - avi

Re:Delphi 5 / Indy 9.0.10 / HTTP compression / Content-Encoding


Quote
> There is no demo currently for what you are looking for

Allen,

I appreciate you taking the time to respond and let me know there
is currently no demo for this area of Indy.

Would someone from Team Indy care to comment on my code though?

If someone helps me I am happy to turn it into a demo..

thanks in advance,

- avi

Other Threads