Discussion:
http binary downloads
(too old to reply)
Larry
2005-09-06 00:39:14 UTC
Permalink
I have the ability to use Wininet to read using the FTP protocol
functions, but my website is periodically under attack and the ISP has
software in place that reboots the ftp server regularly. This denies my
clients service. So, I moved the files to regular web access and the
problem disappeared.

Now, here is the problem. I am working a Wininet program in c++ that
needs to store and retrieve binary files from the web. Originally, had
it working using the FTP functions, but low and behold the lockup
occurred... only to find out my site was being rebooted at the time.
So, I want to use the HTTPOpenRequest sequence and InternetReadFile to
grab the binary file. I have the software working sufficiently with
*.html files, but in specifying other "accept" types, I keep getting
"File not found" errors (when the file clearly exists... and the path
is identical to the one that worked for *.html).

Does anyone have an "accept" type that works with "any" file... please
don't suggest "*/*" becuase it doesn't work. What I need is someone
that has actually pulled this off to give me a test set of code that I
can verify on my end.

Thanks for any help.
Rob Wilson
2005-09-09 22:33:03 UTC
Permalink
I was experiencing the same problem on my end--I needed to download some .d3d
files and InternetReadFileEx wasn't seeing them.

I don't have the answer that you seek, but I solved the problem by appending
a .z on the end of the file name when it was loaded to the remove server,
then removing the .z when I downloaded it to the local machine.
InternetReadFileEx was able to see it without any trouble.

-Rob
Post by Larry
I have the ability to use Wininet to read using the FTP protocol
functions, but my website is periodically under attack and the ISP has
software in place that reboots the ftp server regularly. This denies my
clients service. So, I moved the files to regular web access and the
problem disappeared.
Now, here is the problem. I am working a Wininet program in c++ that
needs to store and retrieve binary files from the web. Originally, had
it working using the FTP functions, but low and behold the lockup
occurred... only to find out my site was being rebooted at the time.
So, I want to use the HTTPOpenRequest sequence and InternetReadFile to
grab the binary file. I have the software working sufficiently with
*.html files, but in specifying other "accept" types, I keep getting
"File not found" errors (when the file clearly exists... and the path
is identical to the one that worked for *.html).
Does anyone have an "accept" type that works with "any" file... please
don't suggest "*/*" becuase it doesn't work. What I need is someone
that has actually pulled this off to give me a test set of code that I
can verify on my end.
Thanks for any help.
Continue reading on narkive:
Loading...