curl-users
Re: How can I get Directory listing with HTTP
Date: Tue, 18 May 2010 13:31:10 +0530
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 ?
Regards,
Pravin
On Tue, May 18, 2010 at 1:16 PM, Kamil Dudka <kdudka_at_redhat.com> wrote:
> On Tuesday 18 of May 2010 09:24:42 Jochen Roderburg wrote:
> > As people already pointed out here the HTTP protocol does not know the
> > concept of a "directory" or "file" and has therefore no feature to
> > request a "list of files" from a HTTP server.
> > You, your program (curl/wget/browser whatever) requests a URL, which
> > contains an arbitrary request string and the server sends back some
> > arbitrary data. If this reply happens to be "a list of files" it might
> > help you. If not there is nothing that the requesting program can do.
>
> Exactly. It depends completely on the application running the server
> what it returns for what URLs, i.e. whether it treats '/' somehow
> specially. You can e.g. rely on running Apache on the remote site
> with 'Options Indexes' turned on, but it has nothing to do with the
> HTTP protocol itself, or curl's implementation of the protocol.
>
> Kamil
>
-------------------------------------------------------------------
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