curl-library
Re: Just starting to use libcurl, a question relating to DirectoryIndex in http servers...
Date: Mon, 7 Nov 2005 19:54:37 -0200
Thanks for your answer, Daniel. I mainly asked that because I though
that wget was able to get the real file names of the pages, even if it
were being redirected by DirectoryIndex.
Well, just downloaded it again to check it out and found out that I
was wrong, it just saves every "DirectoryIndex" page as index.html.
I'll do the same :)
Thanks
Leo
On 11/3/05, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 3 Nov 2005, Leo Huf Campos Braga wrote:
>
> > I have a problem here in my program relating to DirectoryIndex in http
> > servers. If I send a domain as the url to the curl handle (like
> > http://www.del.ufrj.br), is there any way for me to know the name of the
> > file that the server has redirected me to with DirectoryIndex? In this case
> > it is index.html, but sometimes it's index.asp, and it can actually be any
> > file in the directory.
>
> I assume you're talking about Apache here. Apache doesn't "redirect" you to
> any specific file for "DirectoryIndex", it just checks for and uses a file by
> default when a directory is requested.
>
> The whole point with that action is to hide that information from the client
> and there is simply no way libcurl can figure that out, as nothing besides
> Apache itself can and will know that.
>
> Sorry.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2005-11-07