R
ross-mcm
I have an app that gets a file from a web server. An ASP page is
passed
authenitication data (username, password) and a filename. The file is
read
and then output by the ASP page so the only response is the file I am
requesting. The file I want to receive is XML with the major portion
of it
being a Base64-encoded block.
I use the Indy component TidHTTP to get the file:
HTTPClient.Request.ContentType := 'text/html';
HTTPClient.Request.CacheControl := 'no-cache' ;
Response.Text := HTTPClient.Get (TIdURI.URLEncode (URL)) ;
Problem is that more often than not, the returned file contains
errors. In
a 200k file, 2 or 3 characters are often munged. Occasionally I
manage to
receive the file without errors. Small files are OK.
How reliable is the HTTP protocol? Would it be more reliable to
redirect to
the target file from the ASP page. I say this because HTTP seems to
have no
problems getting .ZIP files or huge setup exe files.
TIA,
Ross
passed
authenitication data (username, password) and a filename. The file is
read
and then output by the ASP page so the only response is the file I am
requesting. The file I want to receive is XML with the major portion
of it
being a Base64-encoded block.
I use the Indy component TidHTTP to get the file:
HTTPClient.Request.ContentType := 'text/html';
HTTPClient.Request.CacheControl := 'no-cache' ;
Response.Text := HTTPClient.Get (TIdURI.URLEncode (URL)) ;
Problem is that more often than not, the returned file contains
errors. In
a 200k file, 2 or 3 characters are often munged. Occasionally I
manage to
receive the file without errors. Small files are OK.
How reliable is the HTTP protocol? Would it be more reliable to
redirect to
the target file from the ASP page. I say this because HTTP seems to
have no
problems getting .ZIP files or huge setup exe files.
TIA,
Ross