[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 73/73: Merge tag 'curl-7_56_1' of https://github.co
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 73/73: Merge tag 'curl-7_56_1' of https://github.com/curl/curl |
Date: |
Tue, 24 Oct 2017 18:54:54 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8252aa305004041b46e93e5f8b64dfee86ff78f8
Merge: dc0683b64 c514af5a4
Author: ng0 <address@hidden>
AuthorDate: Tue Oct 24 16:52:22 2017 +0000
Merge tag 'curl-7_56_1' of https://github.com/curl/curl
curl 7.56.1
.travis.yml | 19 +-
CMakeLists.txt | 1 -
Makefile.am | 3 -
RELEASE-NOTES | 276 +++++--------
configure.ac | 7 +-
docs/FAQ | 2 +-
docs/HELP-US.md | 6 +-
docs/RELEASE-PROCEDURE | 9 +-
docs/THANKS | 8 +
docs/THANKS-filter | 1 +
docs/cmdline-opts/form.d | 9 +-
docs/cmdline-opts/tlsv1.3.d | 3 +-
docs/libcurl/gnurl_formadd.3 | 5 +-
docs/libcurl/gnurl_mime_data_cb.3 | 2 +-
docs/libcurl/gnurl_mime_filedata.3 | 6 +-
docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3 | 7 +-
docs/libcurl/opts/GNURLOPT_FTP_RESPONSE_TIMEOUT.3 | 4 +-
docs/libcurl/opts/GNURLOPT_NOPROGRESS.3 | 10 +-
docs/libcurl/opts/GNURLOPT_TIMEOUT.3 | 7 +-
docs/libcurl/opts/GNURLOPT_XFERINFODATA.3 | 4 +-
include/gnurl/curlver.h | 6 +-
lib/Makefile.m32 | 26 +-
lib/config-os400.h | 10 +-
lib/config-win32.h | 2 -
lib/formdata.c | 2 +-
lib/ftp.c | 34 +-
lib/http.c | 6 +-
lib/imap.c | 5 +
lib/ldap.c | 4 +-
lib/memdebug.c | 33 +-
lib/memdebug.h | 10 +-
lib/mime.c | 100 +++--
lib/mime.h | 2 +
lib/mk-ca-bundle.pl | 4 +-
lib/multi.c | 52 +--
lib/openldap.c | 4 +-
lib/pingpong.c | 11 +-
lib/sendf.c | 34 +-
lib/smtp.c | 6 +-
lib/strtoofft.c | 5 +-
lib/url.c | 240 ++++++++++--
lib/urldata.h | 2 +-
lib/vtls/axtls.c | 2 +-
lib/vtls/cyassl.c | 2 +-
lib/vtls/darwinssl.c | 94 ++++-
lib/vtls/gskit.c | 2 +-
lib/vtls/gtls.c | 2 +-
lib/vtls/mbedtls.c | 2 +-
lib/vtls/nss.c | 2 +-
lib/vtls/openssl.c | 15 +-
lib/vtls/polarssl.c | 2 +-
lib/vtls/schannel.c | 2 +-
lib/vtls/vtls.c | 20 +-
lib/vtls/vtls.h | 2 +-
packages/OS400/README.OS400 | 3 +-
packages/OS400/makefile.sh | 5 +-
src/Makefile.m32 | 13 +-
src/tool_cb_hdr.c | 15 +-
src/tool_formparse.c | 128 ++++++-
tests/Makefile.am | 2 +-
tests/data/DISABLED | 2 +
tests/data/Makefile.inc | 11 +-
tests/data/test1422 | 2 +-
tests/data/test1552 | 52 +++
tests/data/test1553 | 52 +++
tests/data/test173 | 7 +-
tests/data/test237 | 8 +-
tests/data/test244 | 54 +++
tests/data/test298 | 2 +-
tests/data/test308 | 1 +
tests/data/test554 | 6 +-
tests/data/test577 | 55 +++
tests/data/test587 | 3 +-
tests/data/test644 | 1 +
tests/data/test648 | 4 +-
tests/data/test650 | 9 +-
tests/data/test651 | 73 ++++
tests/data/test652 | 358 +++++++++++++++++
tests/data/{test554 => test653} | 65 +---
tests/data/{test298 => test950} | 32 +-
tests/ftpserver.pl | 4 +-
tests/fuzz/Makefile.am | 56 ---
tests/fuzz/Makefile.inc | 15 -
tests/fuzz/README | 19 +-
tests/fuzz/corpus.py | 96 -----
tests/fuzz/curl_fuzz_data/oss-fuzz-3327 | Bin 27 -> 0 bytes
tests/fuzz/curl_fuzz_data/test1 | Bin 289 -> 0 bytes
tests/fuzz/curl_fuzz_data/test10 | Bin 226 -> 0 bytes
tests/fuzz/curl_fuzz_data/test100 | Bin 675 -> 0 bytes
tests/fuzz/curl_fuzz_data/test12 | Bin 464 -> 0 bytes
tests/fuzz/curl_fuzz_data/test13 | Bin 179 -> 0 bytes
tests/fuzz/curl_fuzz_data/test1326 | Bin 62 -> 0 bytes
tests/fuzz/curl_fuzz_data/test1450 | Bin 98 -> 0 bytes
tests/fuzz/curl_fuzz_data/test2 | Bin 182 -> 0 bytes
tests/fuzz/curl_fuzz_data/test271 | Bin 74 -> 0 bytes
tests/fuzz/curl_fuzz_data/test3 | Bin 242 -> 0 bytes
tests/fuzz/curl_fuzz_data/test4 | Bin 336 -> 0 bytes
tests/fuzz/curl_fuzz_data/test5 | Bin 185 -> 0 bytes
tests/fuzz/curl_fuzz_data/test6 | Bin 223 -> 0 bytes
tests/fuzz/curl_fuzz_data/test800 | Bin 137 -> 0 bytes
tests/fuzz/curl_fuzz_data/test850 | Bin 130 -> 0 bytes
tests/fuzz/curl_fuzz_data/test900 | Bin 129 -> 0 bytes
tests/fuzz/curl_fuzzer.cc | 447 ----------------------
tests/fuzz/curl_fuzzer.h | 186 ---------
tests/fuzz/download_fuzzer.sh | 8 +
tests/fuzz/generate_corpus.py | 132 -------
tests/fuzz/read_corpus.py | 69 ----
tests/fuzz/standalone_fuzz_target_runner.cc | 89 -----
tests/fuzz/testinput.h | 23 --
tests/libtest/Makefile.inc | 19 +-
tests/libtest/lib1552.c | 93 +++++
tests/libtest/lib1553.c | 109 ++++++
tests/libtest/lib554.c | 9 +-
tests/libtest/lib643.c | 27 ++
tests/libtest/lib650.c | 15 +-
tests/libtest/lib651.c | 94 +++++
tests/libtest/lib652.c | 128 +++++++
tests/libtest/lib653.c | 63 +++
tests/memanalyze.pl | 30 +-
tests/runtests.pl | 71 +++-
winbuild/BUILD.WINDOWS.txt | 1 +
121 files changed, 2199 insertions(+), 1701 deletions(-)
diff --cc configure.ac
index 5424bc296,68b3a071a..5d15aa8a6
--- a/configure.ac
+++ b/configure.ac
@@@ -122,9 -122,8 +122,8 @@@ AC_SUBST([AR]
AC_SUBST(libext)
dnl figure out the libcurl version
-CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p'
${srcdir}/include/curl/curlver.h`
+CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p'
${srcdir}/include/gnurl/curlver.h`
XC_CHECK_PROG_CC
- AC_PROG_CXX
XC_AUTOMAKE
AC_MSG_CHECKING([curl version])
AC_MSG_RESULT($CURLVERSION)
diff --cc docs/libcurl/gnurl_formadd.3
index 12604f1ae,000000000..b1215eae1
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_formadd.3
+++ b/docs/libcurl/gnurl_formadd.3
@@@ -1,263 -1,0 +1,266 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
+.SH NAME
+curl_formadd - add a section to a multipart/formdata HTTP POST
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "CURLFORMcode curl_formadd(struct curl_httppost ** " firstitem,
+.BI "struct curl_httppost ** " lastitem, " ...);"
+.ad
+.SH DESCRIPTION
+This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!
+
+curl_formadd() is used to append sections when building a multipart/formdata
+HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
+at a time until you've added all the sections you want included and then you
+pass the \fIfirstitem\fP pointer as parameter to \fICURLOPT_HTTPPOST(3)\fP.
+\fIlastitem\fP is set after each \fIcurl_formadd(3)\fP call and on repeated
+invokes it should be left as set to allow repeated invokes to find the end of
+the list faster.
+
+After the \fIlastitem\fP pointer follow the real arguments.
+
+The pointers \fIfirstitem\fP and \fIlastitem\fP should both be pointing to
+NULL in the first call to this function. All list-data will be allocated by
+the function itself. You must call \fIcurl_formfree(3)\fP on the
+\fIfirstitem\fP after the form post has been done to free the resources.
+
+Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
+You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
+
+First, there are some basics you need to understand about multipart/formdata
+posts. Each part consists of at least a NAME and a CONTENTS part. If the part
+is made for file upload, there are also a stored CONTENT-TYPE and a FILENAME.
+Below, we'll discuss what options you use to set these properties in the
+parts you want to add to your post.
+
+The options listed first are for making normal parts. The options from
+\fICURLFORM_FILE\fP through \fICURLFORM_BUFFERLENGTH\fP are for file upload
+parts.
+.SH OPTIONS
+.IP CURLFORM_COPYNAME
+followed by a string which provides the \fIname\fP of this part. libcurl
+copies the string so your application doesn't need to keep it around after
+this function call. If the name isn't NUL-terminated, you must set its length
+with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain
+zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP.
+.IP CURLFORM_PTRNAME
+followed by a string which provides the \fIname\fP of this part. libcurl
+will use the pointer and refer to the data in your application, so you
+must make sure it remains until curl no longer needs it. If the name
+isn't NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP.
+The \fIname\fP is not allowed to contain zero-valued bytes.
+.IP CURLFORM_COPYCONTENTS
+followed by a pointer to the contents of this part, the actual data
+to send away. libcurl copies the provided data, so your application doesn't
+need to keep it around after this function call. If the data isn't null
+terminated, or if you'd like it to contain zero bytes, you must
+set the length of the name with \fBCURLFORM_CONTENTSLENGTH\fP. The copied
+data will be freed by \fIcurl_formfree(3)\fP.
+.IP CURLFORM_PTRCONTENTS
+followed by a pointer to the contents of this part, the actual data
+to send away. libcurl will use the pointer and refer to the data in your
+application, so you must make sure it remains until curl no longer needs it.
+If the data isn't NUL-terminated, or if you'd like it to contain zero bytes,
+you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
+.IP CURLFORM_CONTENTLEN
+followed by a curl_off_t value giving the length of the contents. Note that
+for \fICURLFORM_STREAM\fP contents, this option is mandatory.
+
+If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
+the contents to figure out the size. If you really want to send a zero byte
+content then you must make sure strlen() on the data pointer returns zero.
+
+(Option added in 7.46.0)
+.IP CURLFORM_CONTENTSLENGTH
+(This option is deprecated. Use \fICURLFORM_CONTENTLEN\fP instead!)
+
+followed by a long giving the length of the contents. Note that for
+\fICURLFORM_STREAM\fP contents, this option is mandatory.
+
+If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
+the contents to figure out the size. If you really want to send a zero byte
+content then you must make sure strlen() on the data pointer returns zero.
+.IP CURLFORM_FILECONTENT
+followed by a filename, causes that file to be read and its contents used
+as data in this part. This part does \fInot\fP automatically become a file
+upload part simply because its data was read from a file.
+
+The specified file needs to kept around until the associated transfer is done.
+.IP CURLFORM_FILE
+followed by a filename, makes this part a file upload part. It sets the
+\fIfilename\fP field to the basename of the provided filename, it reads the
+contents of the file and passes them as data and sets the content-type if the
+given file match one of the internally known file extensions. For
+\fBCURLFORM_FILE\fP the user may send one or more files in one part by
+providing multiple \fBCURLFORM_FILE\fP arguments each followed by the filename
+(and each \fICURLFORM_FILE\fP is allowed to have a
+\fICURLFORM_CONTENTTYPE\fP).
+
+The given upload file has to exist in its full in the file system already when
+the upload starts, as libcurl needs to read the correct file size beforehand.
+
+The specified file needs to kept around until the associated transfer is done.
+.IP CURLFORM_CONTENTTYPE
+is used in combination with \fICURLFORM_FILE\fP. Followed by a pointer to a
+string which provides the content-type for this part, possibly instead of an
+internally chosen one.
+.IP CURLFORM_FILENAME
+is used in combination with \fICURLFORM_FILE\fP. Followed by a pointer to a
+string, it tells libcurl to use the given string as the \fIfilename\fP in the
+file upload part instead of the actual file name.
+.IP CURLFORM_BUFFER
+is used for custom file upload parts without use of \fICURLFORM_FILE\fP. It
+tells libcurl that the file contents are already present in a buffer. The
+parameter is a string which provides the \fIfilename\fP field in the content
+header.
+.IP CURLFORM_BUFFERPTR
+is used in combination with \fICURLFORM_BUFFER\fP. The parameter is a pointer
+to the buffer to be uploaded. This buffer must not be freed until after
+\fIcurl_easy_cleanup(3)\fP is called. You must also use
+\fICURLFORM_BUFFERLENGTH\fP to set the number of bytes in the buffer.
+.IP CURLFORM_BUFFERLENGTH
+is used in combination with \fICURLFORM_BUFFER\fP. The parameter is a
+long which gives the length of the buffer.
+.IP CURLFORM_STREAM
+Tells libcurl to use the \fICURLOPT_READFUNCTION(3)\fP callback to get
+data. The parameter you pass to \fICURLFORM_STREAM\fP is the pointer passed on
+to the read callback's fourth argument. If you want the part to look like a
+file upload one, set the \fICURLFORM_FILENAME\fP parameter as well. Note that
+when using \fICURLFORM_STREAM\fP, \fICURLFORM_CONTENTSLENGTH\fP must also be
+set with the total expected length of the part unless the formpost is sent
+chunked encoded. (Option added in libcurl 7.18.2)
+.IP CURLFORM_ARRAY
+Another possibility to send options to curl_formadd() is the
+\fBCURLFORM_ARRAY\fP option, that passes a struct curl_forms array pointer as
+its value. Each curl_forms structure element has a CURLformoption and a char
+pointer. The final element in the array must be a CURLFORM_END. All available
+options can be used in an array, except the CURLFORM_ARRAY option itself! The
+last argument in such an array must always be \fBCURLFORM_END\fP.
+.IP CURLFORM_CONTENTHEADER
+specifies extra headers for the form POST section. This takes a curl_slist
+prepared in the usual way using \fBcurl_slist_append\fP and appends the list
+of headers to those libcurl automatically generates. The list must exist while
+the POST occurs, if you free it before the post completes you may experience
+problems.
+
+When you've passed the HttpPost pointer to \fIcurl_easy_setopt(3)\fP (using
+the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after
+you've called \fIcurl_easy_cleanup(3)\fP for the curl handle.
+
+See example below.
+.SH AVAILABILITY
+Deprecated in 7.56.0. Before this release, field names were allowed to
- contain zero-valued bytes.
++contain zero-valued bytes. The pseudo-filename "-" to read stdin is
++discouraged although still supported, but data is not read before being
++actually sent: the effective data size can then not be automatically
++determined, resulting in a chunked encoding transfer.
+.SH RETURN VALUE
+0 means everything was ok, non-zero means an error occurred corresponding
+to a CURL_FORMADD_* constant defined in
+.I <curl/curl.h>
+.SH EXAMPLE
+.nf
+
+ struct curl_httppost* post = NULL;
+ struct curl_httppost* last = NULL;
+ char namebuffer[] = "name buffer";
+ long namelength = strlen(namebuffer);
+ char buffer[] = "test buffer";
+ char htmlbuffer[] = "<HTML>test buffer</HTML>";
+ long htmlbufferlength = strlen(htmlbuffer);
+ struct curl_forms forms[3];
+ char file1[] = "my-face.jpg";
+ char file2[] = "your-face.jpg";
+ /* add null character into htmlbuffer, to demonstrate that
+ transfers of buffers containing null characters actually work
+ */
+ htmlbuffer[8] = '\\0';
+
+ /* Add simple name/content section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
+ CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
+
+ /* Add simple name/content/contenttype section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
+ CURLFORM_COPYCONTENTS, "<HTML></HTML>",
+ CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
+
+ /* Add name/ptrcontent section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
+ CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
+
+ /* Add ptrname/ptrcontent section */
+ curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer,
+ CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH,
+ namelength, CURLFORM_END);
+
+ /* Add name/ptrcontent/contenttype section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "html_code_with_hole",
+ CURLFORM_PTRCONTENTS, htmlbuffer,
+ CURLFORM_CONTENTSLENGTH, htmlbufferlength,
+ CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
+
+ /* Add simple file section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
+ CURLFORM_FILE, "my-face.jpg", CURLFORM_END);
+
+ /* Add file/contenttype section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
+ CURLFORM_FILE, "my-face.jpg",
+ CURLFORM_CONTENTTYPE, "image/jpeg", CURLFORM_END);
+
+ /* Add two file section */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
+ CURLFORM_FILE, "my-face.jpg",
+ CURLFORM_FILE, "your-face.jpg", CURLFORM_END);
+
+ /* Add two file section using CURLFORM_ARRAY */
+ forms[0].option = CURLFORM_FILE;
+ forms[0].value = file1;
+ forms[1].option = CURLFORM_FILE;
+ forms[1].value = file2;
+ forms[2].option = CURLFORM_END;
+
+ /* Add a buffer to upload */
+ curl_formadd(&post, &last,
+ CURLFORM_COPYNAME, "name",
+ CURLFORM_BUFFER, "data",
+ CURLFORM_BUFFERPTR, record,
+ CURLFORM_BUFFERLENGTH, record_length,
+ CURLFORM_END);
+
+ /* no option needed for the end marker */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
+ CURLFORM_ARRAY, forms, CURLFORM_END);
+ /* Add the content of a file as a normal post text value */
+ curl_formadd(&post, &last, CURLFORM_COPYNAME, "filecontent",
+ CURLFORM_FILECONTENT, ".bashrc", CURLFORM_END);
+ /* Set the form info */
+ curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
+
+.SH "SEE ALSO"
+.BR curl_easy_setopt "(3),"
+.BR curl_formfree "(3),"
+.BR curl_mime_init "(3)"
diff --cc docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
index 3e3dca396,000000000..195566fd3
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
@@@ -1,64 -1,0 +1,65 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_CONNECTTIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long. It should contain the maximum time in seconds that you allow the
+connection phase to the server to take. This only limits the connection
+phase, it has no impact once it has connected. Set to zero to switch to the
+default built-in connection timeout - 300 seconds. See also the
+\fICURLOPT_TIMEOUT(3)\fP option.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+
+If both \fICURLOPT_CONNECTTIMEOUT(3)\fP and \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
+are set, the value set last will be used.
+.SH DEFAULT
+300
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete connection within 10 seconds */
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
- Returns CURLE_OK
++Returns CURLE_OK. Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative
++value or a value that when converted to milliseconds is too large.
+.SH "SEE ALSO"
- .BR CURLOPT_CONNECTTIMEOUT_MS "(3), "
++.BR CURLOPT_CONNECTTIMEOUT_MS "(3), "
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_FTP_RESPONSE_TIMEOUT.3
index deee026c5,000000000..1d8b6dff9
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_FTP_RESPONSE_TIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_FTP_RESPONSE_TIMEOUT.3
@@@ -1,60 -1,0 +1,62 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "19 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT, long
timeout);
+.SH DESCRIPTION
+Pass a long. Causes libcurl to set a \fItimeout\fP period (in seconds) on the
+amount of time that the server is allowed to take in order to send a response
+message for a command before the session is considered dead. While libcurl is
+waiting for a response, this value overrides \fICURLOPT_TIMEOUT(3)\fP. It is
+recommended that if used in conjunction with \fICURLOPT_TIMEOUT(3)\fP, you set
+\fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP to a value smaller than
+\fICURLOPT_TIMEOUT(3)\fP.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/slow.txt");
+ /* wait no more than 23 seconds */
+ curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 23L);
+ ret = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.10.8
+.SH RETURN VALUE
- Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
++Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not. Returns
++CURLE_BAD_FUNCTION_ARGUMENT if set to a negative value or a value that when
++converted to milliseconds is too large.
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_CONNECTTIMEOUT "(3), "
+.BR CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_NOPROGRESS.3
index 513ad6c31,000000000..0d1a1c7c7
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_NOPROGRESS.3
+++ b/docs/libcurl/opts/GNURLOPT_NOPROGRESS.3
@@@ -1,59 -1,0 +1,59 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_NOPROGRESS 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_NOPROGRESS \- switch off the progress meter
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff);
+.SH DESCRIPTION
+If \fIonoff\fP is to 1, it tells the library to shut off the progress meter
+completely for requests done with this \fIhandle\fP. It will also prevent the
- \fICURLOPT_PROGRESSFUNCTION(3)\fP from getting called.
-
- Future versions of libcurl are likely to not have any built-in progress meter
- at all.
++\fICURLOPT_XFERINFOFUNCTION(3)\fP or \fICURLOPT_PROGRESSFUNCTION(3)\fP from
++getting called.
+.SH DEFAULT
+1, meaning it normally runs without a progress meter.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable progress meter */
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
++.BR CURLOPT_XFERINFOFUNCTION "(3), "
+.BR CURLOPT_PROGRESSFUNCTION "(3), "
++.BR CURLOPT_VERBOSE "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_TIMEOUT.3
index d9e61309d,000000000..b645cde6d
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_TIMEOUT.3
@@@ -1,70 -1,0 +1,71 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long as parameter containing \fItimeout\fP - the maximum time in
+seconds that you allow the libcurl transfer operation to take. Normally, name
+lookups can take a considerable time and limiting operations to less than a
+few minutes risk aborting perfectly normal operations. This option may cause
+libcurl to use the SIGALRM signal to timeout system calls.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+
+If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the
+value set last will be used.
+
+Since this puts a hard limit for how long time a request is allowed to take,
+it has limited use in dynamic use cases with varying transfer times. You are
+then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP,
+\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
+implement your own timeout logic.
+.SH DEFAULT
+Default timeout is 0 (zero) which means it never times out during transfer.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete within 20 seconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
- Returns CURLE_OK
++Returns CURLE_OK. Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative
++value or a value that when converted to milliseconds is too large.
+.SH "SEE ALSO"
- .BR CURLOPT_TIMEOUT_MS "(3), "
++.BR CURLOPT_TIMEOUT_MS "(3), "
+.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_XFERINFODATA.3
index 887d82062,000000000..c7281c781
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_XFERINFODATA.3
+++ b/docs/libcurl/opts/GNURLOPT_XFERINFODATA.3
@@@ -1,46 -1,0 +1,46 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, 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 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
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_XFERINFODATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFODATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_XFERINFOFUNCTION(3)\fP.
+
+This is an alias for \fICURLOPT_PROGRESSDATA(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+https://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Added in 7.32.0
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
- .BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), "
++.BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_VERBOSE "(3), "
diff --cc lib/url.c
index 1e56b7d87,76c09c72a..c538ca096
--- a/lib/url.c
+++ b/lib/url.c
@@@ -934,9 -951,12 +951,12 @@@ CURLcode Curl_setopt(struct Curl_easy *
case CURLOPT_TIMECONDITION:
/*
* Set HTTP time condition. This must be one of the defines in the
- * curl/curl.h header file.
+ * gnurl/curl.h header file.
*/
- data->set.timecondition = (curl_TimeCond)va_arg(param, long);
+ arg = va_arg(param, long);
+ if((arg < CURL_TIMECOND_NONE) || (arg > CURL_TIMECOND_LASTMOD))
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+ data->set.timecondition = (curl_TimeCond)arg;
break;
case CURLOPT_TIMEVALUE:
/*
@@@ -1363,9 -1395,11 +1395,11 @@@
case CURLOPT_HTTP_VERSION:
/*
* This sets a requested HTTP version to be used. The value is one of
- * the listed enums in curl/curl.h.
+ * the listed enums in gnurl/curl.h.
*/
arg = va_arg(param, long);
+ if(arg < CURL_HTTP_VERSION_NONE)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
#ifndef USE_NGHTTP2
if(arg >= CURL_HTTP_VERSION_2)
return CURLE_UNSUPPORTED_PROTOCOL;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well, (continued)
- [GNUnet-SVN] [gnurl] 53/73: runtests: use valgrind for torture as well, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 49/73: test651: curl_formadd with huge COPYCONTENTS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 63/73: runtests: support MultiSSL client feature, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 58/73: RELEASE-NOTES: synced with f121575c0, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 65/73: mime: do not reuse previously computed multipart size, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 59/73: mime: limit bas64-encoded lines length to 76 characters, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 69/73: mk-ca-bundle: Fix URL for NSS, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 72/73: RELEASE-NOTES: 7.56.1, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 70/73: mk-ca-bundle: Remove URL for aurora, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 04/73: fuzzer: move to using external curl-fuzzer, gnunet, 2017/10/24
- [GNUnet-SVN] [gnurl] 73/73: Merge tag 'curl-7_56_1' of https://github.com/curl/curl,
gnunet <=