curl-library
Re: Fetching HEAD 404, Fetching BODY 200
Date: Wed, 21 Jul 2010 06:56:26 -0500
On Wed, Jul 21, 2010 at 6:32 AM, Viktor Molnar <viktor.molnar_at_inbox.com> wrote:
>
> I wrote a script to check, if some websites are OK.
> It's done via fetching HEAD from HTTP.
>
> But I found website, where CURL HEAD is returning 404 status code,
> but if I try to fetch HEAD with BODY, status code is 200.
> Also, wget is working fine, just try these two commands on this website:
>
> curl -I http://www.youtube.com/ESETSK
> wget -S http://www.youtube.com/ESETSK
>
Using the -S option with wget just means it will also print the
headers, but it is still doing a GET request, and it is still
rerieving the file. To make wget only do a HEAD, you need to use
the --spider option. In that case wget will also return a 404,
indicating that the server does not honor HEAD requests.
- Jeff
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-21