curl-library
file vs directory
Date: Mon, 3 Mar 2008 13:42:26 -0800
Hello,
Is there a way to determine if the file I am requesting is a file or a
directory?
I would like to return an error if the user requests a directory instead of
a file in libcurl. Is there any way I could do that?
I am not able to determine much from the header:
If the url is of the format http://url/shelflog/ the header is (where
shelflog is a directory)
HTTP/1.1 200 Document follows
MIME-Version: 1.1
Server: <>
Date: Mon, 03 Mar 2008 15:29:57 GMT
Content-Type: text/plain
If the url is of the format http://url/shelflog (where shelflog again is a
directory)
HTTP/1.1 302 Found
MIME-Version: 1.1
Server: <>
Date: Mon, 03 Mar 2008 15:30:28 GMT
Content-Length: 278
Content-Type: text/html
Location: /url/shelflog/
Thanks,
Ganesh
Received on 2008-03-03