> Eitherway, I want to ensure that the file I have downloaded IS my
> file!  So
> I don't understand why it did not warn of something.  Is there a function
> call I can do on my URL or some other test I can trap to confirm
> the URL did
> not exist?

When the internet code tries to download a file, it connects to the server
in question and requests the file it is told to. As long as the domain name
resolves correctly, you will pretty much ALWAYS get something back. If you
type an incorrect address in your browser (as long as the domain is valid),
you ALWAYS get a page back, even if it's "Not found on this server" - the
browser doesn't go blank and do nothing. Any page you see in your browser,
unless it shows a local address to your machine (DNS error, for example),
DID come from the server.

Thus, as far as the internet code is concerned, it asked for a page and was
given one back. It can't possibly know it wasn't the page you wanted - only
the server knows that, and it tells you in a browser-friendly manner - by
sending back a page you can see.

One way you can combat this is to make sure your file on your server begins
with a known piece of text, a marker - for example, DOWNLOADPARAMS. If the
returned file does not begin with this, then you know it wasn't the page you
requested - the chances of a "Not found on this server" page beginning with
that are very, very small.

--
Jason Teagle
[EMAIL PROTECTED]



_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to