Discussion:
TldHTTP caching
(too old to reply)
bar
2007-08-28 16:53:21 UTC
Permalink
Hello
I am using BCB6 and built in Indy 8.0.25
For downloading the files i took the snip from the previous posts.

TIdHTTP *HTTP;
AnsiString FileName;

FileName = "c:\\add.xml";
std::auto_ptr<TFileStream> strm(new TFileStream(FileName,fmCreate));
std::auto_ptr<TIdHTTP> h(new TIdHTTP(NULL));

HTTP = h.get();
HTTP->HandleRedirects = true;
HTTP->Get("http://www.jazirasoft.com/~webtest/ctests/ads/01ad.xml",
strm.get());

But i am getting a older copy of files, not the updated one. How to prevent
caching of files in the TldHTTP

Thanks
SA
Remy Lebeau (TeamB)
2007-08-28 17:28:11 UTC
Permalink
Post by bar
I am using BCB6 and built in Indy 8.0.25
That is a very outdated version of Indy that is no longer supported. You
should seriously consider upgrading.
Post by bar
i am getting a older copy of files, not the updated one.
How to prevent caching of files in the TldHTTP
TIdHTTP is not the one doing the caching. The server itself is. I don't
know about Indy 8, but in Indy 9+, you can set the TIdHTTP's Request->Pragma
property to "no-cache" before calling Get().


Gambit
bar
2007-08-29 08:58:15 UTC
Permalink
Post by Remy Lebeau (TeamB)
know about Indy 8, but in Indy 9+, you can set the TIdHTTP's
Request->Pragma
property to "no-cache" before calling Get().
Hi Remy
I find that ISP is cahcing.

I saw this solution in your previous posts
http://groups.google.com/group/borland.public.cppbuilder.internet.socket/browse_thread/thread/e7d8ed3b45068807/405afb576139ce7a?lnk=gst&q=http+caching&rnum=1#405afb576139ce7a

But it is unsolvable if ISP is caching.
My task is to read the continuous updated xml files from the webserver. I
find first to download in memory stream and then read by the xml component,
but here downloading is causing problem.

I appreciate for the furthur suggestion

Regards
SA
bar
2007-09-02 15:08:41 UTC
Permalink
hi Remy

i am still waiting for answer.

Are you sure that the Indy 9.0 can solve this issue.
If yes, can i get the updated guidelines, for installing the Indy 9.0 in BCB
6.0.

If no, can you suggest for downloading the updated xml files into memory
stream from the web.

Thanks
SA
chenzero
2007-09-02 16:11:22 UTC
Permalink
Post by bar
hi Remy
i am still waiting for answer.
Are you sure that the Indy 9.0 can solve this issue.
If yes, can i get the updated guidelines, for installing the Indy 9.0 in
BCB 6.0.
I am sure following the help file of indy 9.0, it can be
installed on bcb 6.0
please try.
Post by bar
If no, can you suggest for downloading the updated xml files into memory
stream from the web.
pls try use other browser(eg, IE) to download the file. if the
file is still the old version, then the problem is on the server
side. if the file is new one, then it seems probme in TIdHttp
component.
you can use some http protocol analyser or network sniffer
(eg. ethereal) to capture the http header to find out
where is wrong.
bar
2007-09-03 09:39:25 UTC
Permalink
Hi chenzero

The IE working perfectly when i press CTRL+F5, i am getting a new version of
file.

Regards
SA
chenzero
2007-09-03 13:01:08 UTC
Permalink
interesting, then seems problem in TIdHttp component,

you can use a sniffer tool like
http://www.ethereal.com/
to capture the http headers sent by TIdHttp and IE
and compare their differences.

but I believe that TIdHttp doesn't use cache.
also, chech your code for correctness.
Post by bar
Hi chenzero
The IE working perfectly when i press CTRL+F5, i am getting a new version
of file.
Regards
SA
Remy Lebeau (TeamB)
2007-09-03 23:51:55 UTC
Permalink
Post by chenzero
interesting, then seems problem in TIdHttp component,
It is not a problem with TIdHTTP. As I already explained in my earlier
reply, TIdHTTP does not peform any caching AT ALL. That is strictly a
server-side feature. If you don't want the server to return a cached file,
then you have to specify as much in the request. I already explained how to
do that. If the server is not respecting that, then either the server is
faulty, or the server is looking at a different request header to decide how
the cache should be handled.
Post by chenzero
you can use a sniffer tool like
http://www.ethereal.com/
to capture the http headers sent by TIdHttp and IE
and compare their differences.
Yes, please do so.


Gambit
bar
2007-09-04 15:57:01 UTC
Permalink
Post by Remy Lebeau (TeamB)
Post by bar
I am using BCB6 and built in Indy 8.0.25
That is a very outdated version of Indy that is no longer supported. You
should seriously consider upgrading.
Hi Remy

I am trying to install the Indy_9_00_17_src.zip in BCB 6.0

With reference to the Knowledge Base present present at
http://indyproject.org/kb/index.html?howdoiinstallindybcb.htm

I placed files in C:\Program
Files\Borland\CBuilder6\Source\Indy\Indy_9_00_17_src\source\C6

When i am adding the Design-Time .BPL(dclIndy60.bpl) present in C6 sub
folder, it is giving error message

New Form Entry Point Not Found
---------------------------
The procedure entry point @***@_RSBindingAny could not be
located in the dynamica link library Indy60.bpl.

Regards
SA
Remy Lebeau (TeamB)
2007-09-04 16:35:26 UTC
Permalink
Post by bar
I am trying to install the Indy_9_00_17_src.zip in BCB 6.0
That is also a very old version. If you are going to stay with Indy 9, then
9.0.50 is the latest version that is available.
Post by bar
could not be located in the dynamica link library Indy60.bpl.
You did not remove all of the old Indy 8 files before installing Indy 9.


Gambit
bar
2007-09-04 16:57:34 UTC
Permalink
Post by Remy Lebeau (TeamB)
That is also a very old version. If you are going to stay with Indy 9, then
9.0.50 is the latest version that is available.
i didn't find the version link Indy 9.0.50 here
http://indyproject.org/Sockets/Download/Files/Indy9.EN.aspx
Post by Remy Lebeau (TeamB)
You did not remove all of the old Indy 8 files before installing Indy 9.
How to trace the files old files.
Pls direct the updated files and installation instruction if you have.

Regards
SA
Remy Lebeau (TeamB)
2007-09-04 18:57:39 UTC
Permalink
Post by bar
i didn't find the version link Indy 9.0.50 here
http://indyproject.org/Sockets/Download/Files/Indy9.EN.aspx
9.0.50 is the development snapshot. There is a link on that same page.
Post by bar
Post by Remy Lebeau (TeamB)
You did not remove all of the old Indy 8 files before installing Indy 9.
How to trace the files old files.
If you read the Knowledge Base more carefully, it tells you what to look
for.


Gambit
bar
2007-09-05 14:12:27 UTC
Permalink
Hi Remy,

I could see the components in the palette.
i added the C6 folder path in
Project->Options->Directories/Conditionals->Include Path and Library Path
Tools->Environment Options->Library->Library Path

Dropped the IldHTTP component on form and clicked the Run button.
It gave me error
Linker Fatal Error:Unable to open Indy60.lib

I checked my machine i couldn't find the file either indy.lib and indy60.lib

Thanks
SA
Remy Lebeau (TeamB)
2007-09-05 17:31:11 UTC
Permalink
Post by bar
I checked my machine i couldn't find the file either indy.lib and indy60.lib
Then you do not have Indy compiled correctly.


Gambit

Loading...