cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How can I get Directory listing with HTTP

From: Avinash <pavinash_at_gmail.com>
Date: Tue, 18 May 2010 14:27:01 +0530

Thanks Kamil.

On Tue, May 18, 2010 at 2:17 PM, Kamil Dudka <kdudka_at_redhat.com> wrote:

> On Tue May 18 2010 10:01:10 Avinash wrote:
> > Basically my requirement is to get the metadata of file pointed by HTTP
> URL
> > and not the actual file.
> >
> > e.g if my URL is
> >
> > http://172.20.241.206/HTTP_Share/performance_data/mixed/pdf/6.pdf
> >
> > Then I do not want to download the file 6.pdf, but the metadata of 6.pdf
> > like its size, access time, modification time etc.
> >
> > Is there any way to get all this meta-information without actually
> > downloading it ?
>
> I don't think you understand. The HTTP protocol doesn't know anything
> about
> 'file', 'atime' and 'mtime'. Under some circumstance you may know the size
> of file from the HTTP header, but it is not guaranteed either. You should
> realize that the thing you call file, doesn't even need to exist on the
> server's file system. It can be e.g. generated on-the-fly by a script on
> the remote site.
>
> Kamil
>

-- 
-Avinash

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-18