Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB6 url Download
I have a problem for download a file from a URL, via VB6. The link is like this. All of the server, are similar:
I can download it using simple Inet Download function, but can´t get de filename. The server gives me only this Headers of the file:
HTTP/1.1 200 OK
Date: Tue, 15 Jan 2013 19:14:23 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Wed, 09 Jan 2013 22:59:15 GMT
Etag: "400ae-1bd39a-4d2e302e7d6c0"
Accept-Ranges: bytes
Content-Length: 1823642
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: application/pgp-signature
But no the name, or the Location
Can anyone help me, please?
Posted 15-Jan-13 9:57am
Sergey Alexandrovich Kryukov at 15-Jan-13 15:31pm
Why do you think you need such a name?
Master.Man1980 at 15-Jan-13 16:00pm
Sir.I can't find you from Where you @?
Master.Man1980 at 15-Jan-13 17:03pm
It's a codeproject who's who page(Codeproject>Community>Who's who). You are not shown there. Something must be wrong

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The URL and related content you receive via HTTP response is not associated with any particular file name. The resources obtained on the client side via the HTTP protocol do not have to be mapped on any file system. You can use any valid file name you like.
As to the HTTP header "Location", please read:[^],[^].
It may or may not be there. Please see also my comments below.
Sergey Alexandrovich Kryukov at 15-Jan-13 15:48pm
It may have a name, so what?
The resource may or may not have the name and correspond to a point of the file system of the host executing HTTP server. Such mapping or even one-to-one correspondence may exist, but it does not have to, for a very, very good reason. That's why you cannot see a file name in your headers. HTTP is fully free from mapping between URLs and server-side file names. The client side application should not rely on any assumptions on such mapping. Again, this is done for good, not for evil.
Just reconcile yourself with that fact, that's all you can do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,535
1 OriginalGriff 8,295
2 Peter Leow 4,839
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,301

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100