EPrivilege exception trying to access Response.ContentStream

Giganews Newsgroups
Subject: EPrivilege exception trying to access Response.ContentStream
Posted by:  Warren Sirota (wsiro…@worldwidewoodshed.com)
Date: Wed, 5 May 2004


Please exceuse me if this question is stupid - I'm quite new to using
both Delphi and these components.

I'm using TIDHTTP to navigate to a web url via its Get(url) method,
which returns the response text as a string. But there's a page I want
to access which actually sends its content over encoded as gzip. I'd
like to use streams to decode and process this info.

After my call to Get, I try to run the following code:

    if frmmain.IdHTTP1.Response.ContentStream <> nil then
      sz:= frmmain.IdHTTP1.Response.ContentStream.Size ;

sz is int64. The program chokes on the last line, with an EPrivilege
exception, "Privleged Instruction".

I guess I don't understand what is happening here. I would think the
zipped content would be contained in the ContentStream property, and
that I could access its size, which I'd need to do in order to copy it

Can I fix this? Or am I barking up the wrong tree entirely?