Board index » delphi » Returning binary files using HTTP and Indy

Returning binary files using HTTP and Indy

I have built a web server using the Indy HTTP component.  At times, the
user will click on an item to download it.  This typically works but in
some cases, users report errors that the file size is incorrect after
the download completes.  Any ideas as to why this may be happening?

--
Doug Reece

 

Re:Returning binary files using HTTP and Indy


I've build a fully fledged web server using the TidHTTPServer as the comms
layer.  Using Indy 9 taken just before XMas (I still haven't updated to get
the lasted bug fixes) I've noticed that it's actually very good.  Sometimes,
connections get locked into a wait state, but that bug should be fixed now.

I can't say that I'd noticed anything of the nature of your message though.
Have you tried connection to the server in the same way as the users, in
order to re-produce the problem? If so, how often does it happen?

--
Regards

Colin Dawson
n...@cdawson.tele2.co.uk

Quote
"Doug Reece" <dre...@rtechnics.com> wrote in message

news:3C68C7BE.9BFC127D@rtechnics.com...
Quote
> I have built a web server using the Indy HTTP component.  At times, the
> user will click on an item to download it.  This typically works but in
> some cases, users report errors that the file size is incorrect after
> the download completes.  Any ideas as to why this may be happening?

> --
> Doug Reece

Re:Returning binary files using HTTP and Indy


It could be releated to the Content-Type returned by your server to the
browser.

Doychin

Quote
"Doug Reece" <dre...@rtechnics.com> wrote in message

news:3C68C7BE.9BFC127D@rtechnics.com...
Quote
> I have built a web server using the Indy HTTP component.  At times, the
> user will click on an item to download it.  This typically works but in
> some cases, users report errors that the file size is incorrect after
> the download completes.  Any ideas as to why this may be happening?

> --
> Doug Reece

Re:Returning binary files using HTTP and Indy


I using Indy 8, It is right!
Quote
"Colin Dawson" <n...@cdawson.tele2.co.uk> wrote in message <news:3c68eda2$1_1@dnews>...
> I've build a fully fledged web server using the TidHTTPServer as the comms
> layer.  Using Indy 9 taken just before XMas (I still haven't updated to get
> the lasted bug fixes) I've noticed that it's actually very good.  Sometimes,
> connections get locked into a wait state, but that bug should be fixed now.

> I can't say that I'd noticed anything of the nature of your message though.
> Have you tried connection to the server in the same way as the users, in
> order to re-produce the problem? If so, how often does it happen?

> --
> Regards

> Colin Dawson
> n...@cdawson.tele2.co.uk
> "Doug Reece" <dre...@rtechnics.com> wrote in message
> news:3C68C7BE.9BFC127D@rtechnics.com...
> > I have built a web server using the Indy HTTP component.  At times, the
> > user will click on an item to download it.  This typically works but in
> > some cases, users report errors that the file size is incorrect after
> > the download completes.  Any ideas as to why this may be happening?

> > --
> > Doug Reece

Re:Returning binary files using HTTP and Indy


I am returning EXE files using ContentType of 'application/x-msdownload'.  Is
this what I should be using?

Doychin Bondzhev - Team Indy wrote:

Quote
> It could be releated to the Content-Type returned by your server to the
> browser.

> Doychin

> "Doug Reece" <dre...@rtechnics.com> wrote in message
> news:3C68C7BE.9BFC127D@rtechnics.com...
> > I have built a web server using the Indy HTTP component.  At times, the
> > user will click on an item to download it.  This typically works but in
> > some cases, users report errors that the file size is incorrect after
> > the download completes.  Any ideas as to why this may be happening?

> > --
> > Doug Reece

--
Doug Reece
R-Technics

Re:Returning binary files using HTTP and Indy


I have never duplicated the problem myself.  I also don't know how wide spread
the problem is.  We has started collecting information on ISP, browser, etc.,
but haven't found a consistent pattern yet.

To return EXE files as a download, do I use a ContentType of
application/x-msdownload?

Quote
Colin Dawson wrote:
> I've build a fully fledged web server using the TidHTTPServer as the comms
> layer.  Using Indy 9 taken just before XMas (I still haven't updated to get
> the lasted bug fixes) I've noticed that it's actually very good.  Sometimes,
> connections get locked into a wait state, but that bug should be fixed now.

> I can't say that I'd noticed anything of the nature of your message though.
> Have you tried connection to the server in the same way as the users, in
> order to re-produce the problem? If so, how often does it happen?

> --
> Regards

> Colin Dawson
> n...@cdawson.tele2.co.uk
> "Doug Reece" <dre...@rtechnics.com> wrote in message
> news:3C68C7BE.9BFC127D@rtechnics.com...
> > I have built a web server using the Indy HTTP component.  At times, the
> > user will click on an item to download it.  This typically works but in
> > some cases, users report errors that the file size is incorrect after
> > the download completes.  Any ideas as to why this may be happening?

> > --
> > Doug Reece

--
Doug Reece
R-Technics

Re:Returning binary files using HTTP and Indy


I Think it should be application/octet-stream.

Doychin Bondzhev - Team Indy

Other Threads