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:23:44 +0530

Thanks Jochen.
That exactly is my requirement.
Thanks once again.

On Tue, May 18, 2010 at 2:10 PM, Jochen Roderburg <Roderburg_at_uni-koeln.de>wrote:

> Zitat von Avinash <pavinash_at_gmail.com>:
>
>
> 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 ?
>>
>>
> Aaaah, that's now something "completely different" and can be made with
> HTTP, namely with a so-called HEAD Request. ;-)
> Size and modification time of a file are mostly part of the HEAD resposne.
>
> With curl: curl --head URL
> With wget: wget --server-response --spider URL
>
> Regards,
> J.Roderburg
>
>
>

-- 
-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