diff options
Diffstat (limited to 'docs/libcurl/curl_slist_append.3')
-rw-r--r-- | docs/libcurl/curl_slist_append.3 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3 index 529560e8..fed80292 100644 --- a/docs/libcurl/curl_slist_append.3 +++ b/docs/libcurl/curl_slist_append.3 @@ -5,11 +5,11 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms -.\" * are also available at http://curl.haxx.se/docs/copyright.html. +.\" * are also available at https://curl.haxx.se/docs/copyright.html. .\" * .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell .\" * copies of the Software, and permit persons to whom the Software is @@ -36,7 +36,7 @@ been appended when this function returns. curl_slist_append() copies the string. The list should be freed again (after usage) with -\fBcurl_slist_free_all(3)\fP. +\fIcurl_slist_free_all(3)\fP. .SH RETURN VALUE A null pointer is returned if anything went wrong, otherwise the new list pointer is returned. @@ -46,6 +46,10 @@ pointer is returned. struct curl_slist *slist=NULL; slist = curl_slist_append(slist, "pragma:"); + + if (slist == NULL) + return -1; + curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist); curl_easy_perform(handle); |