curl-library
post/callback.c example
From: Rene Bernhardt <rbeere_at_nouvex.de>
Date: Wed, 14 Dec 2005 14:03:04 +0100
Date: Wed, 14 Dec 2005 14:03:04 +0100
Hello,
I just took a look at the post-callback.c example because I wanted to avoid the
expect: 100-continue header.
I think that the code line where you actually want to set the options are
missing the third argument.
line 78:
curl_slist *chunk = NULL;
chunk = curl_slist_append(chunk, "Transfer-Encoding: chunked");
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER);
The curl_slist with the name chunk is not passed to curl_easy_setopt ... am I
right?
It should be:
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
The same applies for line 104:
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER);
Rene
Received on 2005-12-14