cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How can I get Directory listing with HTTP

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 18 May 2010 09:46:20 +0200

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