cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 405 yet not resolved

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 26 Jun 2002 16:17:14 +0200 (MET DST)

On Wed, 26 Jun 2002, Chirag wrote:

> I have given the following options in Curl C API (Linux)
>
> curl_easy_setopt(curl, CURLOPT_URL, url);
> curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
> curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
> curl_easy_setopt(curl, CURLOPT_HTTPGET, TRUE);
> res = curl_easy_perform(curl);
>
> I get the following output......
>
> * Connected to www.xyz.com (202.71.XXX.XXX)
> HEAD / HTTP/1.1

AFAIK, the only way to get libcurl to make a HEAD request (as you get here)
is to set CURLOPT_NOBODY to TRUE.

One might argue that CURLOPT_HTTPGET should "reset" that state when used, but
it isn't currently doing this, so you need to set CURLOPT_NOBODY back to
FALSE when you no longer wants nobody to be valid.

If you didn't use the NOBODY option, then I don't know why this causes a HEAD
request. Then you need to debug.

-- 
    Daniel Stenberg -- I'll be away for a month, starting tomorrow
-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
Received on 2002-06-26