summaryrefslogtreecommitdiff
path: root/docs/libcurl
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2020-01-10 21:41:55 +0000
committerng0 <ng0@n0.is>2020-01-10 21:41:55 +0000
commit69758416170305e04324a85bfe74cd62673e298b (patch)
tree919c48ebc22eb1f92de19db98c0ac34537c51de0 /docs/libcurl
parent71b588320daebd4e50603602c311bbed97755e27 (diff)
parent2cfac302fbeec68f1727cba3d1705e16f02220ad (diff)
downloadgnurl-69758416170305e04324a85bfe74cd62673e298b.tar.gz
gnurl-69758416170305e04324a85bfe74cd62673e298b.tar.bz2
gnurl-69758416170305e04324a85bfe74cd62673e298b.zip
Merge tag 'curl-7_68_0'
7.68.0
Diffstat (limited to 'docs/libcurl')
-rw-r--r--docs/libcurl/gnurl_easy_setopt.36
-rw-r--r--docs/libcurl/gnurl_url_set.36
-rw-r--r--docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.36
-rw-r--r--docs/libcurl/opts/GNURLOPT_READFUNCTION.34
4 files changed, 15 insertions, 7 deletions
diff --git a/docs/libcurl/gnurl_easy_setopt.3 b/docs/libcurl/gnurl_easy_setopt.3
index 8e622fc17..a936efadb 100644
--- a/docs/libcurl/gnurl_easy_setopt.3
+++ b/docs/libcurl/gnurl_easy_setopt.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, 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
@@ -623,6 +623,10 @@ TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP
error occurred as \fI<gnurl/curl.h>\fP defines. See the \fIlibcurl-errors(3)\fP
man page for the full list with descriptions.
+Strings passed on to libcurl must be shorter than 8000000 bytes, otherwise
+\fIcurl_easy_setopt(3)\fP returns \fBCURLE_BAD_FUNCTION_ARGUMENT\fP (added in
+7.65.0).
+
If you try to set an option that libcurl doesn't know about, perhaps because
the library is too old to support it or the option was removed in a recent
version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for
diff --git a/docs/libcurl/gnurl_url_set.3 b/docs/libcurl/gnurl_url_set.3
index 5ef5cf34c..efee8cc5a 100644
--- a/docs/libcurl/gnurl_url_set.3
+++ b/docs/libcurl/gnurl_url_set.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2020, 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
@@ -122,6 +122,10 @@ permits empty authority sections, similar to how file scheme is handled.
Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went
fine.
+A URL string passed on to \fIcurl_url_set(3)\fP for the \fBCURLUPART_URL\fP
+part, must be shorter than 8000000 bytes otherwise it returns
+\fBCURLUE_MALFORMED_INPUT\fP (added in 7.65.0).
+
If this function returns an error, no URL part is returned.
.SH EXAMPLE
.nf
diff --git a/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
index be9cb99b6..9eb7a9873 100644
--- a/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
@@ -39,9 +39,9 @@ shown above.
This function gets called by libcurl as soon as it has received header
data. The header callback will be called once for each header and only
complete header lines are passed on to the callback. Parsing headers is very
-easy using this. The size of the data pointed to by \fIbuffer\fP is \fIsize\fP
-multiplied with \fInitems\fP. Do not assume that the header line is zero
-terminated!
+easy using this. \fIbuffer\fP points to the delivered data, and the size of
+that data is \fInitems\fP; \fIsize\fP is always 1. Do not assume that the
+header line is zero terminated!
The pointer named \fIuserdata\fP is the one you set with the
\fICURLOPT_HEADERDATA(3)\fP option.
diff --git a/docs/libcurl/opts/GNURLOPT_READFUNCTION.3 b/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
index 3bd7fc2ce..e269b438c 100644
--- a/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
@@ -88,14 +88,14 @@ size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userdata)
void setup(char *uploadthis)
{
- FILE *file = fopen("rb", uploadthis);
+ FILE *file = fopen(uploadthis, "rb");
CURLcode result;
/* set callback to use */
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pass in suitable argument to callback */
- curl_easy_setopt(curl, CURLOPT_READDATA, uploadthis);
+ curl_easy_setopt(curl, CURLOPT_READDATA, (void *)file);
result = curl_easy_perform(curl);
}