From: John Smith on
I am using HttpQueryInfo(..) to first query the size of a file on my web server.
Then I download the file using InternetReadFile(..).

This works fine for HTM, JPG etc. files. I also have datafile MYFILE.NDX but for
it HttpQueryInfo(..) returns 404. If I change the filename to MYFILE.HTM it can
be downloaded.

Does HttpQueryInfo(..) have some limitation regarding filenames? Is there a
workaround other than renaming the files?
From: Dee Earley on
On 11/06/2010 11:06, John Smith wrote:
> I am using HttpQueryInfo(..) to first query the size of a file on my web server.
> Then I download the file using InternetReadFile(..).
>
> This works fine for HTM, JPG etc. files. I also have datafile MYFILE.NDX but for
> it HttpQueryInfo(..) returns 404. If I change the filename to MYFILE.HTM it can
> be downloaded.
>
> Does HttpQueryInfo(..) have some limitation regarding filenames? Is there a
> workaround other than renaming the files?

Very unlikely.
Either the name is spelt wrong, and remember that a lot of servers are
case sensitive on their filenames.

Try using Wireshark or Fiddler (or the server logs) to see what is
actually being requested and returned.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
From: Matti Vuori on
John Smith <do_not_use(a)invalid.address.com> wrote in
news:9k2416djcaeknavfnqfas43igbo0hipu2h(a)4ax.com:

> I am using HttpQueryInfo(..) to first query the size of a file on my
> web server. Then I download the file using InternetReadFile(..).
>
> This works fine for HTM, JPG etc. files. I also have datafile
> MYFILE.NDX but for it HttpQueryInfo(..) returns 404. If I change the
> filename to MYFILE.HTM it can be downloaded.
>
> Does HttpQueryInfo(..) have some limitation regarding filenames? Is
> there a workaround other than renaming the files?

Can you download it with your browser? Perhaps your server has been
configured so that it serves only the common file types, for security
reasons.
From: Nhat Dung on
I think you provide wrong file name

"John Smith" <do_not_use(a)invalid.address.com> wrote in message
news:9k2416djcaeknavfnqfas43igbo0hipu2h(a)4ax.com...
> I am using HttpQueryInfo(..) to first query the size of a file on my web
> server.
> Then I download the file using InternetReadFile(..).
>
> This works fine for HTM, JPG etc. files. I also have datafile MYFILE.NDX
> but for
> it HttpQueryInfo(..) returns 404. If I change the filename to MYFILE.HTM
> it can
> be downloaded.
>
> Does HttpQueryInfo(..) have some limitation regarding filenames? Is there
> a
> workaround other than renaming the files?