[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 152/153: Merge tag 'curl-7_61_1'
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 152/153: Merge tag 'curl-7_61_1' |
Date: |
Tue, 11 Sep 2018 12:53:43 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8046e59880e096c1fe5e6a4b70ad57b7cd2d1354
Merge: 87430bf69 432eb5f5c
Author: Nils Gillmann <address@hidden>
AuthorDate: Tue Sep 11 10:16:59 2018 +0000
Merge tag 'curl-7_61_1'
curl 7.61.1
Signed-off-by: Nils Gillmann <address@hidden>
.mailmap | 1 +
.travis.yml | 21 +-
CMake/CurlSymbolHiding.cmake | 92 ++--
CMake/FindCARES.cmake | 38 +-
CMake/FindGSS.cmake | 410 +++++++++---------
CMake/FindLibSSH2.cmake | 14 +-
CMake/FindNGHTTP2.cmake | 2 +-
CMake/Macros.cmake | 44 +-
CMake/cmake_uninstall.cmake.in | 18 +-
CMake/curl-config.cmake | 59 ---
CMake/curl-config.cmake.in | 64 +++
CMakeLists.txt | 159 +++----
Makefile.am | 2 +-
README.md | 7 +-
RELEASE-NOTES | 401 +++++++++--------
acinclude.m4 | 2 +-
appveyor.yml | 22 +-
configure.ac | 8 +-
docs/DEPRECATE.md | 7 +-
docs/HTTP2.md | 17 +-
docs/INSTALL.md | 4 +-
docs/INTERNALS.md | 2 +-
docs/SECURITY-PROCESS.md | 34 +-
docs/SSLCERTS.md | 4 +-
docs/THANKS | 21 +
docs/THANKS-filter | 1 +
docs/TODO | 20 +
docs/cmdline-opts/Makefile.inc | 3 +-
docs/cmdline-opts/cert.d | 7 +
docs/cmdline-opts/key.d | 7 +
docs/cmdline-opts/page-footer | 5 +-
docs/cmdline-opts/retry.d | 2 +-
docs/examples/Makefile.inc | 2 +-
docs/examples/crawler.c | 6 +-
docs/examples/ephiperfifo.c | 547 ++++++++++++++++++++++++
docs/examples/sslbackend.c | 4 +-
docs/libcurl/gnurl_easy_cleanup.3 | 5 +-
docs/libcurl/gnurl_formfree.3 | 5 +-
docs/libcurl/gnurl_free.3 | 5 +-
docs/libcurl/gnurl_mime_free.3 | 4 +-
docs/libcurl/gnurl_multi_cleanup.3 | 5 +-
docs/libcurl/gnurl_share_cleanup.3 | 4 +-
docs/libcurl/gnurl_slist_free_all.3 | 5 +-
docs/libcurl/libgnurl-thread.3 | 12 +-
docs/libcurl/opts/GNURLOPT_ACCEPT_ENCODING.3 | 14 +-
docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3 | 15 +-
docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3 | 4 +-
docs/libcurl/opts/GNURLOPT_NOPROXY.3 | 4 +-
docs/libcurl/opts/GNURLOPT_PROXY.3 | 8 +-
docs/libcurl/opts/GNURLOPT_READDATA.3 | 5 +-
docs/libcurl/opts/GNURLOPT_READFUNCTION.3 | 10 +-
docs/libcurl/opts/GNURLOPT_SSH_COMPRESSION.3 | 4 +-
docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3 | 10 +-
docs/libcurl/opts/GNURLOPT_URL.3 | 1 +
docs/libcurl/opts/GNURLOPT_WRITEDATA.3 | 2 +-
docs/libcurl/opts/GNURLOPT_WRITEFUNCTION.3 | 2 +-
include/gnurl/curlver.h | 6 +-
lib/CMakeLists.txt | 29 +-
lib/Makefile.am | 3 +
lib/asyn-ares.c | 18 +-
lib/asyn-thread.c | 2 -
lib/conncache.c | 29 +-
lib/content_encoding.c | 26 +-
lib/cookie.c | 76 +++-
lib/cookie.h | 4 +-
lib/curl_ntlm_core.c | 5 +-
lib/curl_setup.h | 5 +
lib/curl_threads.c | 3 +-
lib/dict.c | 4 +-
lib/easy.c | 7 +
lib/file.c | 4 +-
lib/formdata.c | 11 +-
lib/gopher.c | 11 +-
lib/hostasyn.c | 4 +-
lib/hostip.c | 4 +
lib/http.c | 127 ++++--
lib/http2.c | 195 ++++-----
lib/http2.h | 4 +-
lib/http_ntlm.c | 2 +-
lib/http_proxy.c | 1 -
lib/md5.c | 38 +-
lib/mime.c | 9 +-
lib/multi.c | 134 +++---
lib/pipeline.c | 6 +-
lib/setopt.c | 9 +-
lib/sha256.c | 7 +-
lib/smb.c | 105 +++--
lib/smb.h | 1 +
lib/socks.c | 6 +-
lib/ssh-libssh.c | 37 +-
lib/ssh.c | 37 +-
lib/ssh.h | 4 +-
lib/strcase.h | 1 -
lib/system_win32.c | 15 +-
lib/telnet.c | 10 +-
lib/tftp.c | 6 +-
lib/transfer.c | 76 +++-
lib/transfer.h | 4 +-
lib/url.c | 160 +++----
lib/url.h | 3 +-
lib/urldata.h | 33 +-
lib/vtls/cyassl.c | 2 +
lib/vtls/darwinssl.c | 62 +++
lib/vtls/openssl.c | 48 ++-
lib/vtls/schannel.c | 21 +-
lib/vtls/vtls.c | 5 +-
lib/warnless.h | 3 +
lib/x509asn1.c | 126 +++---
m4/curl-compilers.m4 | 18 +-
projects/build-openssl.bat | 33 +-
projects/checksrc.bat | 2 +-
src/CMakeLists.txt | 2 +-
src/tool_cb_hdr.c | 10 +-
src/tool_cb_see.c | 4 +-
src/tool_dirhie.c | 10 +-
src/tool_getparam.c | 60 +--
src/tool_metalink.c | 23 +-
src/tool_operate.c | 56 ++-
src/tool_urlglob.c | 6 +-
tests/FILEFORMAT | 1 +
tests/data/DISABLED | 2 +
tests/data/Makefile.inc | 9 +-
tests/data/test1105 | 2 +-
tests/data/test1133 | 12 +-
tests/data/test1136 | 2 +-
tests/data/test1143 | 5 +
tests/data/test1148 | 5 +-
tests/data/test1151 | 6 +-
tests/data/test1155 | 2 +-
tests/data/{test214 => test1157} | 18 +-
tests/data/{test1133 => test1158} | 35 +-
tests/data/test1161 | 2 +-
tests/data/test1164 | 2 +-
tests/data/test1202 | 2 +-
tests/data/test1216 | 2 +-
tests/data/{test1143 => test1266} | 23 +-
tests/data/{test1143 => test1267} | 23 +-
tests/data/test1268 | 41 ++
tests/data/test1415 | 6 +-
tests/data/test1422 | 1 +
tests/data/test1446 | 2 +-
tests/data/{test214 => test1522} | 41 +-
tests/data/test1554 | 6 -
tests/data/test2004 | 2 +-
tests/data/test2072 | 2 +-
tests/data/test214 | 4 +
tests/data/test31 | 62 +--
tests/data/test320 | 2 +-
tests/data/test46 | 16 +-
tests/data/test506 | 28 +-
tests/data/test582 | 2 +-
tests/data/test583 | 2 +-
tests/data/test600 | 2 +-
tests/data/test601 | 2 +-
tests/data/test602 | 2 +-
tests/data/test603 | 2 +-
tests/data/test604 | 2 +-
tests/data/test605 | 2 +-
tests/data/test606 | 2 +-
tests/data/test607 | 2 +-
tests/data/test608 | 2 +-
tests/data/test609 | 2 +-
tests/data/test61 | 4 +-
tests/data/test610 | 2 +-
tests/data/test611 | 2 +-
tests/data/test612 | 2 +-
tests/data/test613 | 2 +-
tests/data/test614 | 2 +-
tests/data/test615 | 2 +-
tests/data/test616 | 2 +-
tests/data/test617 | 2 +-
tests/data/test618 | 2 +-
tests/data/test619 | 2 +-
tests/data/test620 | 2 +-
tests/data/test621 | 2 +-
tests/data/test622 | 2 +-
tests/data/test623 | 2 +-
tests/data/test624 | 2 +-
tests/data/test625 | 2 +-
tests/data/test626 | 2 +-
tests/data/test628 | 2 +-
tests/data/test629 | 2 +-
tests/data/test630 | 2 +-
tests/data/test631 | 2 +-
tests/data/test632 | 2 +-
tests/data/test633 | 2 +-
tests/data/test634 | 2 +-
tests/data/test635 | 2 +-
tests/data/test636 | 2 +-
tests/data/test637 | 2 +-
tests/data/test638 | 2 +-
tests/data/test639 | 2 +-
tests/data/test640 | 2 +-
tests/data/test641 | 2 +-
tests/data/test642 | 2 +-
tests/data/{test606 => test656} | 10 +-
tests/data/test8 | 2 +-
tests/http_pipe.py | 2 +-
tests/libtest/CMakeLists.txt | 7 +-
tests/libtest/Makefile.inc | 12 +-
tests/libtest/chkdecimalpoint.c | 41 ++
tests/libtest/lib1502.c | 2 +
tests/libtest/lib1522.c | 87 ++++
tests/libtest/lib1531.c | 11 +-
tests/libtest/lib1540.c | 2 -
tests/libtest/lib650.c | 5 +-
tests/libtest/libntlmconnect.c | 15 +-
tests/runtests.pl | 4 +-
tests/server/CMakeLists.txt | 4 +-
tests/server/sockfilt.c | 3 +-
tests/server/sws.c | 40 +-
tests/unit/CMakeLists.txt | 8 +-
tests/unit/unit1394.c | 3 +
213 files changed, 2906 insertions(+), 1763 deletions(-)
diff --cc CMakeLists.txt
index 69a0e18b2,e6dbb73f1..36afadb12
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -49,13 -49,13 +49,13 @@@ project(CURL C
message(WARNING "the curl cmake build system is poorly maintained. Be aware")
- file (READ ${CURL_SOURCE_DIR}/include/gnurl/curlver.h CURL_VERSION_H_CONTENTS)
- string (REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
-file(READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
++file(READ ${CURL_SOURCE_DIR}/include/gnurl/curlver.h CURL_VERSION_H_CONTENTS)
+ string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
CURL_VERSION ${CURL_VERSION_H_CONTENTS})
- string (REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION})
- string (REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+"
+ string(REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION})
+ string(REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+"
CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS})
- string (REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM})
+ string(REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM})
include_regular_expression("^.*$") # Sukender: Is it necessary?
@@@ -70,8 -70,8 +70,8 @@@ message(STATUS "curl version=[${CURL_VE
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
-include_directories(${PROJECT_BINARY_DIR}/include/curl)
+include_directories(${PROJECT_BINARY_DIR}/include/gnurl)
- include_directories( ${CURL_SOURCE_DIR}/include )
+ include_directories(${CURL_SOURCE_DIR}/include)
option(CURL_WERROR "Turn compiler warnings into errors" OFF)
option(PICKY_COMPILER "Enable picky compiler options" ON)
diff --cc configure.ac
index b21dd584f,ff8f5df9b..113db4a43
--- a/configure.ac
+++ b/configure.ac
@@@ -1473,7 -1540,295 +1480,6 @@@ dnl Default to compiler & linker defaul
OPT_SSL=off
dnl Default to no CA bundle
ca="no"
-AC_ARG_WITH(ssl,dnl
-AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to
the SSL installation (default: /usr/local/ssl); when possible, set the
PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
- OPT_SSL=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
- test X"$OPT_SSL" != Xno; then
- ssl_msg=
-
- dnl backup the pre-ssl variables
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- dnl This is for Msys/Mingw
- case $host in
- *-*-msys* | *-*-mingw*)
- AC_MSG_CHECKING([for gdi32])
- my_ac_save_LIBS=$LIBS
- LIBS="-lgdi32 $LIBS"
- AC_TRY_LINK([#include <windef.h>
- #include <wingdi.h>],
- [GdiFlush();],
- [ dnl worked!
- AC_MSG_RESULT([yes])],
- [ dnl failed, restore LIBS
- LIBS=$my_ac_save_LIBS
- AC_MSG_RESULT(no)]
- )
- ;;
- esac
-
- case "$OPT_SSL" in
- yes)
- dnl --with-ssl (without path) used
- if test x$cross_compiling != xyes; then
- dnl only do pkg-config magic when not cross-compiling
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=/usr/local/ssl
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- ;;
- off)
- dnl no --with-ssl option given, just check default places
- if test x$cross_compiling != xyes; then
- dnl only do pkg-config magic when not cross-compiling
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=
- ;;
- *)
- dnl check the given --with-ssl spot
- PKGTEST="no"
- PREFIX_OPENSSL=$OPT_SSL
-
- dnl Try pkg-config even when cross-compiling. Since we
- dnl specify PKG_CONFIG_LIBDIR we're only looking where
- dnl the user told us to look
- OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
- if test -f "$OPENSSL_PCDIR/openssl.pc"; then
- AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
- PKGTEST="yes"
- elif test ! -f "$PREFIX_OPENSSL/include/openssl/ssl.h"; then
- AC_MSG_ERROR([$PREFIX_OPENSSL is a bad --with-ssl prefix!])
- fi
-
- dnl in case pkg-config comes up empty, use what we got
- dnl via --with-ssl
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- if test "$PREFIX_OPENSSL" != "/usr" ; then
- SSL_LDFLAGS="-L$LIB_OPENSSL"
- SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
- fi
- SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
- ;;
- esac
-
- if test "$PKGTEST" = "yes"; then
-
- CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
-
- if test "$PKGCONFIG" != "no" ; then
- SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --libs-only-l openssl 2>/dev/null`
-
- SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
- SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
- AC_SUBST(SSL_LIBS)
- AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
- AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
- AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
-
- LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
-
- dnl use the values pkg-config reported. This is here
- dnl instead of below with CPPFLAGS and LDFLAGS because we only
- dnl learn about this via pkg-config. If we only have
- dnl the argument to --with-ssl we don't know what
- dnl additional libs may be necessary. Hope that we
- dnl don't need any.
- LIBS="$SSL_LIBS $LIBS"
- fi
- fi
-
- dnl finally, set flags to use SSL
- CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
- LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
- AC_CHECK_LIB(crypto, HMAC_Update,[
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"
- ],[
- LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
- if test "$PKGCONFIG" = "no" ; then
- # only set this if pkg-config wasn't used
- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl
-I$PREFIX_OPENSSL/include"
- fi
- AC_CHECK_LIB(crypto, HMAC_Init_ex,[
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"], [
-
- dnl still no, but what about with -ldl?
- AC_MSG_CHECKING([OpenSSL linking with -ldl])
- LIBS="$CLEANLIBS -lcrypto -ldl"
- AC_TRY_LINK(
- [
- #include <openssl/err.h>
- ],
- [
- ERR_clear_error();
- ],
- [
- AC_MSG_RESULT(yes)
- HAVECRYPTO="yes"
- ],
- [
- AC_MSG_RESULT(no)
- dnl ok, so what about both -ldl and -lpthread?
-
- AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
- LIBS="$CLEANLIBS -lcrypto -ldl -lpthread"
- AC_TRY_LINK(
- [
- #include <openssl/err.h>
- ],
- [
- ERR_clear_error();
- ],
- [
- AC_MSG_RESULT(yes)
- HAVECRYPTO="yes"
- ],
- [
- AC_MSG_RESULT(no)
- LDFLAGS="$CLEANLDFLAGS"
- CPPFLAGS="$CLEANCPPFLAGS"
- LIBS="$CLEANLIBS"
-
- ])
-
- ])
-
- ])
- ])
-
- if test X"$HAVECRYPTO" = X"yes"; then
- dnl This is only reasonable to do if crypto actually is there: check for
- dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
-
- AC_CHECK_LIB(ssl, SSL_connect)
-
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
- AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
- OLIBS=$LIBS
- LIBS="-lRSAglue -lrsaref $LIBS"
- AC_CHECK_LIB(ssl, SSL_connect)
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- dnl still no SSL_connect
- AC_MSG_RESULT(no)
- LIBS=$OLIBS
- else
- AC_MSG_RESULT(yes)
- fi
-
- else
-
- dnl Have the libraries--check for OpenSSL headers
- AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
- openssl/pem.h openssl/ssl.h openssl/err.h,
- ssl_msg="OpenSSL"
- test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
- OPENSSL_ENABLED=1
- AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
-
- if test $ac_cv_header_openssl_x509_h = no; then
- dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
- dnl since 'err.h' might in fact find a krb4 header with the same
- dnl name
- AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
-
- if test $ac_cv_header_x509_h = yes &&
- test $ac_cv_header_crypto_h = yes &&
- test $ac_cv_header_ssl_h = yes; then
- dnl three matches
- ssl_msg="OpenSSL"
- OPENSSL_ENABLED=1
- fi
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" != X"1"; then
- LIBS="$CLEANLIBS"
- fi
-
- if test X"$OPT_SSL" != Xoff &&
- test "$OPENSSL_ENABLED" != "1"; then
- AC_MSG_ERROR([OpenSSL libs and/or directories were not found where
specified!])
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" = X"1"; then
- dnl These can only exist if OpenSSL exists
- dnl Older versions of Cyassl (some time before 2.9.4) don't have
- dnl SSL_get_shutdown (but this check won't actually detect it there
- dnl as it's a macro that needs the header files be included)
-
- AC_CHECK_FUNCS( RAND_egd \
- ENGINE_cleanup \
- SSL_get_shutdown \
- SSLv2_client_method )
-
- AC_MSG_CHECKING([for BoringSSL])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- #include <openssl/base.h>
- ]],[[
- #ifndef OPENSSL_IS_BORINGSSL
- #error not boringssl
- #endif
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
- [Define to 1 if using BoringSSL.])
- ssl_msg="BoringSSL"
- ],[
- AC_MSG_RESULT([no])
- ])
-
- AC_MSG_CHECKING([for libressl])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
- ]],[[
- int dummy = LIBRESSL_VERSION_NUMBER;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
- [Define to 1 if using libressl.])
- ssl_msg="libressl"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$OPENSSL_ENABLED" = "1"; then
- if test -n "$LIB_OPENSSL"; then
- dnl when the ssl shared libs were found in a path that the run-time
- dnl linker doesn't search through, we need to add it to
CURL_LIBRARY_PATH
- dnl to prevent further configure tests to fail due to this
- if test "x$cross_compiling" != "xyes"; then
- CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
- export CURL_LIBRARY_PATH
- AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
- fi
- fi
- CURL_CHECK_OPENSSL_API
- check_for_ca_bundle=1
- fi
-
- test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends,
}$ssl_msg"
-fi
--
dnl **********************************************************************
dnl Check for the random seed preferences
dnl **********************************************************************
diff --cc docs/examples/ephiperfifo.c
index 000000000,e27372598..14b8ad9d3
mode 000000,100644..100644
--- a/docs/examples/ephiperfifo.c
+++ b/docs/examples/ephiperfifo.c
@@@ -1,0 -1,547 +1,547 @@@
+ /***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2018, 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.
+ *
+ ***************************************************************************/
+ /* <DESC>
+ * multi socket API usage with epoll and timerfd
+ * </DESC>
+ */
+ /* Example application source code using the multi socket interface to
+ * download many files at once.
+ *
+ * This example features the same basic functionality as hiperfifo.c does,
+ * but this uses epoll and timerfd instead of libevent.
+ *
+ * Written by Jeff Pohlmeyer, converted to use epoll by Josh Bialkowski
+
+ Requires a linux system with epoll
+
+ When running, the program creates the named pipe "hiper.fifo"
+
+ Whenever there is input into the fifo, the program reads the input as a list
+ of URL's and creates some new easy handles to fetch each URL via the
+ curl_multi "hiper" API.
+
+
+ Thus, you can try a single URL:
+ % echo http://www.yahoo.com > hiper.fifo
+
+ Or a whole bunch of them:
+ % cat my-url-list > hiper.fifo
+
+ The fifo buffer is handled almost instantly, so you can even add more URL's
+ while the previous requests are still being downloaded.
+
+ Note:
+ For the sake of simplicity, URL length is limited to 1023 char's !
+
+ This is purely a demo app, all retrieved data is simply discarded by the write
+ callback.
+
+ */
+
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/epoll.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <sys/timerfd.h>
+ #include <sys/types.h>
+ #include <time.h>
+ #include <unistd.h>
+
-#include <curl/curl.h>
++#include <gnurl/curl.h>
+ #include <curl/multi.h>
+
+ #ifdef __GNUC__
+ #define _Unused __attribute__((unused))
+ #else
+ #define _Unused
+ #endif
+
+ #define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+
+ /* Global information, common to all connections */
+ typedef struct _GlobalInfo
+ {
+ int epfd; /* epoll filedescriptor */
+ int tfd; /* timer filedescriptor */
+ int fifofd; /* fifo filedescriptor */
+ CURLM *multi;
+ int still_running;
+ FILE *input;
+ } GlobalInfo;
+
+
+ /* Information associated with a specific easy handle */
+ typedef struct _ConnInfo
+ {
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+ } ConnInfo;
+
+
+ /* Information associated with a specific socket */
+ typedef struct _SockInfo
+ {
+ curl_socket_t sockfd;
+ CURL *easy;
+ int action;
+ long timeout;
+ GlobalInfo *global;
+ } SockInfo;
+
+ #define __case(code) \
+ case code: s = __STRING(code)
+
+ /* Die if we get a bad CURLMcode somewhere */
+ static void mcode_or_die(const char *where, CURLMcode code)
+ {
+ if(CURLM_OK != code) {
+ const char *s;
+ switch(code) {
+ __case(CURLM_BAD_HANDLE); break;
+ __case(CURLM_BAD_EASY_HANDLE); break;
+ __case(CURLM_OUT_OF_MEMORY); break;
+ __case(CURLM_INTERNAL_ERROR); break;
+ __case(CURLM_UNKNOWN_OPTION); break;
+ __case(CURLM_LAST); break;
+ default: s = "CURLM_unknown"; break;
+ __case(CURLM_BAD_SOCKET);
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ /* ignore this error */
+ return;
+ }
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ exit(code);
+ }
+ }
+
+ static void timer_cb(GlobalInfo* g, int revents);
+
+ /* Update the timer after curl_multi library does it's thing. Curl will
+ * inform us through this callback what it wants the new timeout to be,
+ * after it does some work. */
+ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+ {
+ struct itimerspec its;
+ CURLMcode rc;
+
+ fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
+
+ timerfd_settime(g->tfd, /*flags=*/0, &its, NULL);
+ if(timeout_ms > 0) {
+ its.it_interval.tv_sec = 1;
+ its.it_interval.tv_nsec = 0;
+ its.it_value.tv_sec = timeout_ms / 1000;
+ its.it_value.tv_nsec = (timeout_ms % 1000) * 1000;
+ timerfd_settime(g->tfd, /*flags=*/0, &its, NULL);
+ }
+ else if(timeout_ms == 0) {
+ rc = curl_multi_socket_action(g->multi,
+ CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+ mcode_or_die("multi_timer_cb: curl_multi_socket_action", rc);
+ }
+ else {
+ memset(&its, 0, sizeof(struct itimerspec));
+ timerfd_settime(g->tfd, /*flags=*/0, &its, NULL);
+ }
+ return 0;
+ }
+
+
+ /* Check for completed transfers, and remove their easy handles */
+ static void check_multi_info(GlobalInfo *g)
+ {
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
+ while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+ }
+
+ /* Called by libevent when we get action on a multi socket filedescriptor*/
+ static void event_cb(GlobalInfo *g, int fd, int revents)
+ {
+ CURLMcode rc;
+ struct itimerspec its;
+
+ int action = (revents & EPOLLIN ? CURL_POLL_IN : 0) |
+ (revents & EPOLLOUT ? CURL_POLL_OUT : 0);
+
+ rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+
+ check_multi_info(g);
+ if(g->still_running <= 0) {
+ fprintf(MSG_OUT, "last transfer done, kill timeout\n");
+ memset(&its, 0, sizeof(struct itimerspec));
+ timerfd_settime(g->tfd, 0, &its, NULL);
+ }
+ }
+
+ /* Called by main loop when our timeout expires */
+ static void timer_cb(GlobalInfo* g, int revents)
+ {
+ CURLMcode rc;
+ uint64_t count = 0;
+ ssize_t err = 0;
+
+ err = read(g->tfd, &count, sizeof(uint64_t));
+ if(err == -1) {
+ /* Note that we may call the timer callback even if the timerfd isn't
+ * readable. It's possible that there are multiple events stored in the
+ * epoll buffer (i.e. the timer may have fired multiple times). The
+ * event count is cleared after the first call so future events in the
+ * epoll buffer will fail to read from the timer. */
+ if(errno == EAGAIN) {
+ fprintf(MSG_OUT, "EAGAIN on tfd %d\n", g->tfd);
+ return;
+ }
+ }
+ if(err != sizeof(uint64_t)) {
+ fprintf(stderr, "read(tfd) == %ld", err);
+ perror("read(tfd)");
+ }
+
+ rc = curl_multi_socket_action(g->multi,
+ CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+ }
+
+
+
+ /* Clean up the SockInfo structure */
+ static void remsock(SockInfo *f, GlobalInfo* g)
+ {
+ if(f) {
+ if(f->sockfd) {
+ epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL);
+ }
+ free(f);
+ }
+ }
+
+
+
+ /* Assign information to a SockInfo structure */
+ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
+ GlobalInfo *g)
+ {
+ struct epoll_event ev;
+ int kind = (act & CURL_POLL_IN ? EPOLLIN : 0) |
+ (act & CURL_POLL_OUT ? EPOLLOUT : 0);
+
+ if(f->sockfd) {
+ epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL);
+ }
+
+ f->sockfd = s;
+ f->action = act;
+ f->easy = e;
+
+ ev.events = kind;
+ ev.data.fd = s;
+ epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev);
+ }
+
+
+
+ /* Initialize a new SockInfo structure */
+ static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+ {
+ SockInfo *fdp = (SockInfo*)calloc(sizeof(SockInfo), 1);
+
+ fdp->global = g;
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+ }
+
+ /* CURLMOPT_SOCKETFUNCTION */
+ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+ {
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ SockInfo *fdp = (SockInfo*) sockp;
+ const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
+
+ fprintf(MSG_OUT,
+ "socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+ if(what == CURL_POLL_REMOVE) {
+ fprintf(MSG_OUT, "\n");
+ remsock(fdp, g);
+ }
+ else {
+ if(!fdp) {
+ fprintf(MSG_OUT, "Adding data: %s\n", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else {
+ fprintf(MSG_OUT,
+ "Changing action from %s to %s\n",
+ whatstr[fdp->action], whatstr[what]);
+ setsock(fdp, s, e, what, g);
+ }
+ }
+ return 0;
+ }
+
+
+
+ /* CURLOPT_WRITEFUNCTION */
+ static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb,
+ void *data)
+ {
+ size_t realsize = size * nmemb;
+ ConnInfo *conn _Unused = (ConnInfo*) data;
+
+ return realsize;
+ }
+
+
+ /* CURLOPT_PROGRESSFUNCTION */
+ static int prog_cb(void *p, double dltotal, double dlnow, double ult _Unused,
+ double uln _Unused)
+ {
+ ConnInfo *conn = (ConnInfo *)p;
+
+ fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
+ return 0;
+ }
+
+
+ /* Create a new easy handle, and add it to the global curl_multi */
+ static void new_conn(char *url, GlobalInfo *g)
+ {
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = (ConnInfo*)calloc(1, sizeof(ConnInfo));
+ conn->error[0]='\0';
+
+ conn->easy = curl_easy_init();
+ if(!conn->easy) {
+ fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
+ exit(2);
+ }
+ conn->global = g;
+ conn->url = strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+ fprintf(MSG_OUT,
+ "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+ }
+
+ /* This gets called whenever data is received from the fifo */
+ static void fifo_cb(GlobalInfo* g, int revents)
+ {
+ char s[1024];
+ long int rv = 0;
+ int n = 0;
+
+ do {
+ s[0]='\0';
+ rv = fscanf(g->input, "%1023s%n", s, &n);
+ s[n]='\0';
+ if(n && s[0]) {
+ new_conn(s, g); /* if we read a URL, go get it! */
+ }
+ else
+ break;
+ } while(rv != EOF);
+ }
+
+ /* Create a named pipe and tell libevent to monitor it */
+ static const char *fifo = "hiper.fifo";
+ static int init_fifo(GlobalInfo *g)
+ {
+ struct stat st;
+ curl_socket_t sockfd;
+ struct epoll_event epev;
+
+ fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
+ if(lstat (fifo, &st) == 0) {
+ if((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+ unlink(fifo);
+ if(mkfifo (fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+ sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
+ if(sockfd == -1) {
+ perror("open");
+ exit(1);
+ }
+
+ g->fifofd = sockfd;
+ g->input = fdopen(sockfd, "r");
+
+ epev.events = EPOLLIN;
+ epev.data.fd = sockfd;
+ epoll_ctl(g->epfd, EPOLL_CTL_ADD, sockfd, &epev);
+
+ fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
+ return 0;
+ }
+
+ static void clean_fifo(GlobalInfo *g)
+ {
+ epoll_ctl(g->epfd, EPOLL_CTL_DEL, g->fifofd, NULL);
+ fclose(g->input);
+ unlink(fifo);
+ }
+
+
+ int g_should_exit_ = 0;
+
+ void SignalHandler(int signo)
+ {
+ if(signo == SIGINT) {
+ g_should_exit_ = 1;
+ }
+ }
+
+ int main(int argc _Unused, char **argv _Unused)
+ {
+ GlobalInfo g;
+ int err;
+ int idx;
+ struct itimerspec its;
+ struct epoll_event ev;
+ struct epoll_event events[10];
+
+ g_should_exit_ = 0;
+ signal(SIGINT, SignalHandler);
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.epfd = epoll_create1(EPOLL_CLOEXEC);
+ if(g.epfd == -1) {
+ perror("epoll_create1 failed");
+ exit(1);
+ }
+
+ g.tfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK | TFD_CLOEXEC);
+ if(g.tfd == -1) {
+ perror("timerfd_create failed");
+ exit(1);
+ }
+
+ memset(&its, 0, sizeof(struct itimerspec));
+ its.it_interval.tv_sec = 1;
+ its.it_value.tv_sec = 1;
+ timerfd_settime(g.tfd, 0, &its, NULL);
+
+ ev.events = EPOLLIN;
+ ev.data.fd = g.tfd;
+ epoll_ctl(g.epfd, EPOLL_CTL_ADD, g.tfd, &ev);
+
+ init_fifo(&g);
+ g.multi = curl_multi_init();
+
+ /* setup the generic multi interface options we want */
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ /* we don't call any curl_multi_socket*() function yet as we have no handles
+ added! */
+
+ fprintf(MSG_OUT, "Entering wait loop\n");
+ fflush(MSG_OUT);
+ while(!g_should_exit_) {
+ /* TODO(josh): use epoll_pwait to avoid a race on the signal. Mask the
+ * signal before the while loop, and then re-enable the signal during
+ * epoll wait. Mask at the end of the loop. */
+ err = epoll_wait(g.epfd, events, sizeof(events)/sizeof(struct
epoll_event),
+ 10000);
+ if(err == -1) {
+ if(errno == EINTR) {
+ fprintf(MSG_OUT, "note: wait interrupted\n");
+ continue;
+ }
+ else {
+ perror("epoll_wait");
+ exit(1);
+ }
+ }
+
+ for(idx = 0; idx < err; ++idx) {
+ if(events[idx].data.fd == g.fifofd) {
+ fifo_cb(&g, events[idx].events);
+ }
+ else if(events[idx].data.fd == g.tfd) {
+ timer_cb(&g, events[idx].events);
+ }
+ else {
+ event_cb(&g, events[idx].data.fd, events[idx].events);
+ }
+ }
+ }
+
+ fprintf(MSG_OUT, "Exiting normally.\n");
+ fflush(MSG_OUT);
+
+ curl_multi_cleanup(g.multi);
+ return 0;
+ }
diff --cc docs/libcurl/gnurl_easy_cleanup.3
index b399310a1,000000000..f5412376c
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_easy_cleanup.3
+++ b/docs/libcurl/gnurl_easy_cleanup.3
@@@ -1,68 -1,0 +1,71 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_easy_cleanup 3 "22 Aug 2007" "libcurl 7.17.0" "libcurl Manual"
+.SH NAME
+curl_easy_cleanup - End a libcurl easy handle
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+
+.BI "void curl_easy_cleanup(CURL *" handle ");"
+.SH DESCRIPTION
+This function must be the last function to call for an easy session. It is the
+opposite of the \fIcurl_easy_init(3)\fP function and must be called with the
+same \fIhandle\fP as input that a \fIcurl_easy_init(3)\fP call returned.
+
+This might close all connections this handle has used and possibly has kept
+open until now - unless it was attached to a multi handle while doing the
+transfers. Don't call this function if you intend to transfer more files,
+re-using handles is a key to good performance with libcurl.
+
+Occasionally you may get your progress callback or header callback called from
+within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using
+\fIcurl_easy_setopt(3)\fP). Like if libcurl decides to shut down the
+connection and the protocol is of a kind that requires a command/response
+sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP.
+
+Any use of the \fBhandle\fP after this function has been called and have
+returned, is illegal. \fIcurl_easy_cleanup(3)\fP kills the handle and all
+memory associated with it!
+
++Passing in a NULL pointer in \fIhandle\fP will make this function return
++immediately with no action.
++.SH "OLD TIMES"
+For libcurl versions before 7.17,: after you've called this function, you can
+safely remove all the strings you've previously told libcurl to use, as it
+won't use them anymore now.
+.SH RETURN VALUE
+None
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ CURLcode res;
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+}
+.fi
+.SH "SEE ALSO"
+.BR curl_easy_init "(3), " curl_easy_duphandle "(3), "
+.BR curl_easy_reset "(3), "
+.BR curl_multi_cleanup "(3), " curl_multi_remove_handle "(3) "
diff --cc docs/libcurl/gnurl_formfree.3
index 80eabd3fd,000000000..d24d06e02
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_formfree.3
+++ b/docs/libcurl/gnurl_formfree.3
@@@ -1,48 -1,0 +1,51 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
+.SH NAME
+curl_formfree - free a previously build multipart/formdata HTTP POST chain
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "void curl_formfree(struct curl_httppost *" form);
+.ad
+.SH DESCRIPTION
+This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!
+
+curl_formfree() is used to clean up data previously built/appended with
+\fIcurl_formadd(3)\fP. This must be called when the data has been used, which
+typically means after \fIcurl_easy_perform(3)\fP has been called.
+
+The pointer to free is the same pointer you passed to the
+\fICURLOPT_HTTPPOST(3)\fP option, which is the \fIfirstitem\fP pointer from
+the \fIcurl_formadd(3)\fP invoke(s).
+
+\fBform\fP is the pointer as returned from a previous call to
+\fIcurl_formadd(3)\fP and may be NULL.
++
++Passing in a NULL pointer in \fIform\fP will make this function return
++immediately with no action.
+.SH AVAILABILITY
+Deprecated in 7.56.0.
+.SH RETURN VALUE
+None
+.SH "SEE ALSO"
+.BR curl_formadd "(3), " curl_mime_init "(3), " curl_mime_free "(3)"
diff --cc docs/libcurl/gnurl_free.3
index 10ec9e160,000000000..ee7c622b6
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_free.3
+++ b/docs/libcurl/gnurl_free.3
@@@ -1,35 -1,0 +1,38 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
+.SH NAME
+curl_free - reclaim memory that has been obtained through a libcurl call
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "void curl_free( char *" ptr " );"
+.ad
+.SH DESCRIPTION
+curl_free reclaims memory that has been obtained through a libcurl call. Use
+\fIcurl_free(3)\fP instead of free() to avoid anomalies that can result from
+differences in memory management between your application and libcurl.
++
++Passing in a NULL pointer in \fIptr\fP will make this function return
++immediately with no action.
+.SH "SEE ALSO"
+.BR curl_easy_unescape "(3), " curl_easy_escape "(3) "
diff --cc docs/libcurl/gnurl_mime_free.3
index 48de206f6,000000000..666592cff
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_mime_free.3
+++ b/docs/libcurl/gnurl_mime_free.3
@@@ -1,48 -1,0 +1,50 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_mime_free 3 "22 August 2017" "libcurl 7.56.0" "libcurl Manual"
+.SH NAME
+curl_mime_free - free a previously built mime structure
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "void curl_mime_free(curl_mime *" mime);
+.ad
+.SH DESCRIPTION
+\fIcurl_mime_free(3)\fP is used to clean up data previously built/appended
+with \fIcurl_mime_addpart(3)\fP and other mime-handling functions. This must
+be called when the data has been used, which typically means after
+\fIcurl_easy_perform(3)\fP has been called.
+
+The handle to free is the one you passed to
+the \fICURLOPT_MIMEPOST(3)\fP option: attached subparts mime structures must
+not be explicitly freed as they are by the top structure freeing.
+
+\fBmime\fP is the handle as returned from a previous call to
+\fIcurl_mime_init(3)\fP and may be NULL.
+
++Passing in a NULL pointer in \fImime\fP will make this function return
++immediately with no action.
+.SH AVAILABILITY
+As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0.
+.SH RETURN VALUE
+None
+.SH "SEE ALSO"
+.BR curl_mime_init "(3)"
diff --cc docs/libcurl/gnurl_multi_cleanup.3
index e8090a99b,000000000..3994c1acc
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_multi_cleanup.3
+++ b/docs/libcurl/gnurl_multi_cleanup.3
@@@ -1,47 -1,0 +1,50 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
+.SH NAME
+curl_multi_cleanup - close down a multi session
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "CURLMcode curl_multi_cleanup( CURLM *multi_handle );"
+.ad
+.SH DESCRIPTION
+Cleans up and removes a whole multi stack. It does not free or touch any
+individual easy handles in any way - they still need to be closed
+individually, using the usual \fIcurl_easy_cleanup(3)\fP way. The order of
+cleaning up should be:
+
+1 - \fIcurl_multi_remove_handle(3)\fP before any easy handles are cleaned up
+
+2 - \fIcurl_easy_cleanup(3)\fP can now be called independently since the easy
+handle is no longer connected to the multi handle
+
+3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
+removed
++
++Passing in a NULL pointer in \fImulti_handle\fP will make this function return
++CURLM_BAD_HANDLE immediately with no other action.
+.SH RETURN VALUE
+CURLMcode type, general libcurl multi interface error code. On success,
+CURLM_OK is returned.
+.SH "SEE ALSO"
+.BR curl_multi_init "(3)," curl_easy_cleanup "(3)," curl_easy_init "(3)"
diff --cc docs/libcurl/gnurl_share_cleanup.3
index 32e1f38d4,000000000..d63d2e6b6
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_share_cleanup.3
+++ b/docs/libcurl/gnurl_share_cleanup.3
@@@ -1,40 -1,0 +1,42 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
+.SH NAME
+curl_share_cleanup - Clean up a shared object
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "CURLSHcode curl_share_cleanup(CURLSH *" share_handle ");"
+.ad
+.SH DESCRIPTION
+This function deletes a shared object. The share handle cannot be used anymore
+when this function has been called.
+
++Passing in a NULL pointer in \fIshare_handle\fP will make this function return
++immediately with no action.
+.SH RETURN VALUE
+CURLSHE_OK (zero) means that the option was set properly, non-zero means an
+error occurred as \fI<gnurl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
+man page for the full list with descriptions. If an error occurs, then the
+share object will not be deleted.
+.SH "SEE ALSO"
+.BR curl_share_init "(3), " curl_share_setopt "(3)"
diff --cc docs/libcurl/gnurl_slist_free_all.3
index 955984753,000000000..adbbd5611
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_slist_free_all.3
+++ b/docs/libcurl/gnurl_slist_free_all.3
@@@ -1,53 -1,0 +1,56 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
+.SH NAME
+curl_slist_free_all - free an entire curl_slist list
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+.BI "void curl_slist_free_all(struct curl_slist *" list);
+.ad
+.SH DESCRIPTION
+curl_slist_free_all() removes all traces of a previously built curl_slist
+linked list.
++
++Passing in a NULL pointer in \fIlist\fP will make this function return
++immediately with no action.
+.SH RETURN VALUE
+Nothing.
+.SH EXAMPLE
+.nf
+CURL *handle;
+struct curl_slist *slist=NULL;
+
+slist = curl_slist_append(slist, "X-libcurl: coolness");
+
+if (slist == NULL)
+ return -1;
+
+curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
+
+curl_easy_perform(handle);
+
+curl_slist_free_all(slist); /* free the list again */
+.fi
+.SH "SEE ALSO"
+.BR curl_slist_append "(3), "
+
diff --cc docs/libcurl/opts/GNURLOPT_ACCEPT_ENCODING.3
index f5a0025cf,000000000..1ef8e17e0
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_ACCEPT_ENCODING.3
+++ b/docs/libcurl/opts/GNURLOPT_ACCEPT_ENCODING.3
@@@ -1,96 -1,0 +1,104 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2018, 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_ACCEPT_ENCODING 3 "17 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
+.SH DESCRIPTION
+Pass a char * argument specifying what encoding you'd like.
+
+Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
+enables decoding of a response when a Content-Encoding: header is received.
+
+libcurl potentially supports several different compressed encodings depending
+on what support that has been built-in.
+
+To aid applications not having to bother about what specific algorithms this
+particular libcurl build supports, libcurl allows a zero-length string to be
+set ("") to ask for an Accept-Encoding: header to be used that contains all
+built-in supported encodings.
+
+Alternatively, you can specify exactly the encoding or list of encodings you
+want in the response. Four encodings are supported: \fIidentity\fP, meaning
+non-compressed, \fIdeflate\fP which requests the server to compress its
+response using the zlib algorithm, \fIgzip\fP which requests the gzip
- algorithm and (since curl 7.57.0) \fIbr\fP which is brotli.
++algorithm and (since curl 7.57.0) \fIbr\fP which is brotli. Provide them in
++the string as a comma-separated list of accepted encodings, like:
+
- Set this option to NULL to explicitly disable it, which makes libcurl not send
- an Accept-Encoding: header and not decompress contents automatically.
++ "br, gzip, deflate".
++
++Set \fICURLOPT_ACCEPT_ENCODING(3)\fP to NULL to explicitly disable it, which
++makes libcurl not send an Accept-Encoding: header and not decompress received
++contents automatically.
+
+You can also opt to just include the Accept-Encoding: header in your request
+with \fICURLOPT_HTTPHEADER(3)\fP but then there will be no automatic
+decompressing when receiving data.
+
+This is a request, not an order; the server may or may not do it. This option
+must be set (to any non-NULL value) or else any unsolicited encoding done by
+the server is ignored.
+
+Servers might respond with Content-Encoding even without getting a
+Accept-Encoding: in the request. Servers might respond with a different
+Content-Encoding than what was asked for in the request.
+
+The Content-Length: servers send for a compressed response is supposed to
+indicate the length of the compressed content so when auto decoding is enabled
+it may not match the sum of bytes reported by the write callbacks (although,
+sending the length of the non-compressed content is a common server mistake).
+
+The application does not have to keep the string around after setting this
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable all supported built-in compressions */
+ curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+This option was called CURLOPT_ENCODING before 7.21.6
++
++The specific libcurl you're using must have been built with zlib to be able to
++decompress gzip and deflate responses and with the brotli library to
++decompress brotli responses.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_TRANSFER_ENCODING "(3), " CURLOPT_HTTPHEADER "(3), "
+.BR CURLOPT_HTTP_CONTENT_DECODING "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
index 6410fc736,000000000..ea0902ebd
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
@@@ -1,111 -1,0 +1,114 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2018, 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_HEADERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_HEADERFUNCTION \- callback that receives header data
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+size_t header_callback(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERFUNCTION,
header_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+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 \fInmemb\fP. 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. This callback function must return the
- number of bytes actually taken care of. If that amount differs from the amount
- passed in to your function, it'll signal an error to the library. This will
- cause the transfer to get aborted and the libcurl function in progress will
- return \fICURLE_WRITE_ERROR\fP.
++terminated!
++
++The pointer named \fIuserdata\fP is the one you set with the
++\fICURLOPT_HEADERDATA(3)\fP option.
++
++This callback function must return the number of bytes actually taken care of.
++If that amount differs from the amount passed in to your function, it'll
signal
++an error to the library. This will cause the transfer to get aborted and the
++libcurl function in progress will return \fICURLE_WRITE_ERROR\fP.
+
+A complete HTTP header that is passed to this function can be up to
+\fICURL_MAX_HTTP_HEADER\fP (100K) bytes.
+
+If this option is not set, or if it is set to NULL, but
+\fICURLOPT_HEADERDATA(3)\fP is set to anything but NULL, the function used to
+accept response data will be used instead. That is, it will be the function
+specified with \fICURLOPT_WRITEFUNCTION(3)\fP, or if it is not specified or
+NULL - the default, stream-writing function.
+
+It's important to note that the callback will be invoked for the headers of
+all responses received after initiating a request and not just the final
+response. This includes all responses which occur during authentication
+negotiation. If you need to operate on only the headers from the final
+response, you will need to collect headers in the callback yourself and use
+HTTP status lines, for example, to delimit response boundaries.
+
+When a server sends a chunked encoded transfer, it may contain a trailer. That
+trailer is identical to an HTTP header and if such a trailer is received it is
+passed to the application using this callback as well. There are several ways
+to detect it being a trailer and not an ordinary header: 1) it comes after the
+response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
+header among the regular response-headers mention what header(s) to expect in
+the trailer.
+
+For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get
+called with the server responses to the commands that libcurl sends.
+.SH LIMITATIONS
+libcurl does not unfold HTTP "folded headers" (deprecated since RFC 7230). A
+folded header is a header that continues on a subsequent line and starts with
+a whitespace. Such folds will be passed to the header callback as a separate
+one, although strictly it is just a continuation of the previous line.
+.SH DEFAULT
+Nothing.
+.SH PROTOCOLS
+Used for all protocols with headers or meta-data concept: HTTP, FTP, POP3,
+IMAP, SMTP and more.
+.SH EXAMPLE
+.nf
+static size_t header_callback(char *buffer, size_t size,
+ size_t nitems, void *userdata)
+{
+ /* received header is nitems * size long in 'buffer' NOT ZERO TERMINATED */
+ /* 'userdata' is set with CURLOPT_HEADERDATA */
+ return nitems * size;
+}
+
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
index 326a29c46,000000000..08eb49ad9
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
@@@ -1,84 -1,0 +1,84 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, 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_INTERLEAVEFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
+.SH SYNOPSIS
+.nf
+#include <gnurl/curl.h>
+
+size_t interleave_callback(void *ptr, size_t size, size_t nmemb,
+ void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEFUNCTION,
+ interleave_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl as soon as it has received
+interleaved RTP data. This function gets called for each $ block and therefore
+contains exactly one upper-layer protocol unit (e.g. one RTP packet). Curl
+writes the interleaved header as well as the included data for each call. The
+first byte is always an ASCII dollar sign. The dollar sign is followed by a
+one byte channel identifier and then a 2 byte integer length in network byte
+order. See \fIRFC2326 Section 10.12\fP for more information on how RTP
+interleaving behaves. If unset or set to NULL, curl will use the default write
+function.
+
+Interleaved RTP poses some challenges for the client application. Since the
+stream data is sharing the RTSP control connection, it is critical to service
+the RTP in a timely fashion. If the RTP data is not handled quickly,
+subsequent response processing may become unreasonably delayed and the
+connection may close. The application may use \fICURL_RTSPREQ_RECEIVE\fP to
+service RTP data when no requests are desired. If the application makes a
+request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
+process any pending RTP data before marking the request as finished.
+
- The \fICURLOPT_WRITEDATA(3)\fP is passed in the \fIuserdata\fP argument in the
- callback.
++The \fICURLOPT_INTERLEAVEDATA(3)\fP is passed in the \fIuserdata\fP argument
in
++the callback.
+.SH DEFAULT
+NULL, the interleave data is then passed to the regular write function:
+\fICURLOPT_WRITEFUNCTION(3)\fP.
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+.nf
+static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user)
+{
+ struct local *l = (struct local *)user;
+ /* take care of the packet in 'ptr', then return... */
+ return size * nmemb;
+}
+{
+ struct local rtp_data;
+ curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
+ curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INTERLEAVEDATA "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_NOPROXY.3
index b6b2a3d66,000000000..6000d40ca
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_NOPROXY.3
+++ b/docs/libcurl/opts/GNURLOPT_NOPROXY.3
@@@ -1,79 -1,0 +1,81 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2018, 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_NOPROXY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_NOPROXY \- disable proxy use for specific hosts
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string. The string consists of a comma
+separated list of host names that do not require a proxy to get reached, even
+if one is specified. The only wildcard available is a single * character,
+which matches all hosts, and effectively disables the proxy. Each name in this
+list is matched as either a domain which contains the hostname, or the
+hostname itself. For example, example.com would match example.com,
+example.com:80, and www.example.com, but not www.notanexample.com or
+example.com.othertld.
+
+If the name in the noproxy list has a leading period, it is a domain match
+against the provided host name. This way ".example.com" will switch off proxy
+use for both "www.example.com" as well as for "foo.example.com".
+
+Setting the noproxy string to "" (an empty string) will explicitly enable the
+proxy for all host names, even if there is an environment variable set for it.
+
+Enter IPv6 numerical addresses in the list of host names without enclosing
+brackets:
+
+ "example.com,::1,localhost"
+
+The application does not have to keep the string around after setting this
+option.
+.SH "Environment variables"
- See \fIGNURLOPT_PROXY(3)\fP
++If there's an environment variable called \fBno_proxy\fP (or \fBNO_PROXY\fP),
++it will be used if the \fIGNURLOPT_NOPROXY(3)\fP option is not set. It works
++exactly the same way.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ /* accept various URLs */
+ curl_easy_setopt(curl, CURLOPT_URL, input);
+ /* use this proxy */
+ curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80");
+ /* ... but make sure this host name is not proxied */
+ curl_easy_setopt(curl, CURLOPT_NOPROXY, "www.example.com");
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.19.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR GNURLOPT_PROXY "(3), " GNURLOPT_PROXYAUTH "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_PROXY.3
index f6504d0f2,000000000..4dbede760
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_PROXY.3
+++ b/docs/libcurl/opts/GNURLOPT_PROXY.3
@@@ -1,118 -1,0 +1,116 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_PROXY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY \- set proxy to use
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY, char *proxy);
+.SH DESCRIPTION
+Set the \fIproxy\fP to use for the upcoming request. The parameter should be a
+char * to a zero terminated string holding the host name or dotted numerical
+IP address. A numerical IPv6 address must be written within [brackets].
+
+To specify port number in this string, append :[port] to the end of the host
+name. The proxy's port number may optionally be specified with the separate
+option \fICURLOPT_PROXYPORT(3)\fP. If not specified, libcurl will default to
+using port 1080 for proxies.
+
+The proxy string may be prefixed with [scheme]:// to specify which kind of
+proxy is used.
+
+.RS
+.IP http://
+HTTP Proxy. Default when no scheme or proxy type is specified.
+.IP https://
+HTTPS Proxy. (Added in 7.52.0 for OpenSSL, GnuTLS and NSS)
+.IP socks4://
+SOCKS4 Proxy.
+.IP socks4a://
+SOCKS4a Proxy. Proxy resolves URL hostname.
+.IP socks5://
+SOCKS5 Proxy.
+.IP socks5h://
+SOCKS5 Proxy. Proxy resolves URL hostname.
+.RE
+
+Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify
+which kind of proxy the string identifies.
+
+When you tell the library to use an HTTP proxy, libcurl will transparently
+convert operations to HTTP even if you specify an FTP URL etc. This may have
+an impact on what other features of the library you can use, such as
+\fICURLOPT_QUOTE(3)\fP and similar FTP specifics that don't work unless you
+tunnel through the HTTP proxy. Such tunneling is activated with
+\fICURLOPT_HTTPPROXYTUNNEL(3)\fP.
+
+Setting the proxy string to "" (an empty string) will explicitly disable the
+use of a proxy, even if there is an environment variable set for it.
+
+A proxy host string can also include protocol scheme (http://) and embedded
+user + password.
+
+The application does not have to keep the string around after setting this
+option.
+.SH "Environment variables"
+libcurl respects the proxy environment variables named \fBhttp_proxy\fP,
+\fBftp_proxy\fP, \fBsftp_proxy\fP etc. If set, libcurl will use the specified
+proxy for that URL scheme. So for a "FTP://" URL, the \fBftp_proxy\fP is
+considered. \fBall_proxy\fP is used if no protocol specific proxy was set.
+
- If \fBno_proxy\fP (or \fBNO_PROXY\fP) is set, it can specify a list of host
- names to not use a proxy for (even if one of the previous mention variables
- are set). That is the exact equivalent of setting the \fICURLOPT_NOPROXY(3)\fP
- option.
++If \fBno_proxy\fP (or \fBNO_PROXY\fP) is set, it is the exact equivalent of
++setting the \fICURLOPT_NOPROXY(3)\fP option.
+
+The \fICURLOPT_PROXY(3)\fP and \fICURLOPT_NOPROXY(3)\fP options override
+environment variables.
+.SH DEFAULT
+Default is NULL, meaning no proxy is used.
+
+When you set a host name to use, do not assume that there's any particular
+single port number used widely for proxies. Specify it!
+.SH PROTOCOLS
+All except file://. Note that some protocols don't do very well over proxy.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/file.txt");
+ curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80");
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Since 7.14.1 the proxy environment variable names can include the protocol
+scheme.
+
+Since 7.21.7 the proxy string supports the socks protocols as "schemes".
+
+Since 7.50.2, unsupported schemes in proxy strings cause libcurl to return
+error.
+.SH RETURN VALUE
+Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXYPORT "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
+.BR CURLOPT_PROXYTYPE "(3)"
diff --cc docs/libcurl/opts/GNURLOPT_READDATA.3
index 2b01b4bf5,000000000..e2844da3b
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_READDATA.3
+++ b/docs/libcurl/opts/GNURLOPT_READDATA.3
@@@ -1,64 -1,0 +1,65 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2016, 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_READDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_READDATA \- custom pointer passed to the read callback
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READDATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the file read function. If you use the
+\fICURLOPT_READFUNCTION(3)\fP option, this is the pointer you'll get as
+input in the 4th argument to the callback.
+
+If you don't specify a read callback but instead rely on the default internal
+read function, this data must be a valid readable FILE * (cast to 'void *').
+
- If you're using libcurl as a win32 DLL, you MUST use a
- \fICURLOPT_READFUNCTION(3)\fP if you set this option.
++If you're using libcurl as a win32 DLL, you \fBMUST\fP use a
++\fICURLOPT_READFUNCTION(3)\fP if you set this option or you will experience
++crashes.
+.SH DEFAULT
+By default, this is a FILE * to stdin.
+.SH PROTOCOLS
+This is used for all protocols when sending data.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct MyData this;
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* pass pointer that gets passed in to the
+ CURLOPT_READFUNCTION callback */
+ curl_easy_setopt(curl, CURLOPT_READDATA, &this);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+This option was once known by the older name CURLOPT_INFILE, the name
+\fICURLOPT_READDATA(3)\fP was introduced in 7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READFUNCTION "(3), " CURLOPT_WRITEDATA "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_READFUNCTION.3
index 08fbf3bc9,000000000..8faf1465c
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
@@@ -1,79 -1,0 +1,81 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * 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_READFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_READFUNCTION \- read callback for data uploads
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
- size_t read_callback(char *buffer, size_t size, size_t nitems, void
*instream);
++size_t read_callback(char *buffer, size_t size, size_t nitems, void
*userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READFUNCTION, read_callback);
+
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl as soon as it needs to read data
+in order to send it to the peer - like if you ask it to upload or post data to
+the server. The data area pointed at by the pointer \fIbuffer\fP should be
+filled up with at most \fIsize\fP multiplied with \fInitems\fP number of bytes
+by your function.
+
- Your function must then return the actual number of bytes that it stored in
- that memory area. Returning 0 will signal end-of-file to the library and cause
- it to stop the current transfer.
++Set the \fIuserdata\fP argument with the \fICURLOPT_READDATA(3)\fP option.
++
++Your function must return the actual number of bytes that it stored in the
data
++area pointed at by the pointer \fIbuffer\fP. Returning 0 will signal
++end-of-file to the library and cause it to stop the current transfer.
+
+If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
+server expected it, like when you've said you will upload N bytes and you
+upload less than N bytes), you may experience that the server "hangs" waiting
+for the rest of the data that won't come.
+
+The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
+operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
+code from the transfer.
+
+The callback can return \fICURL_READFUNC_PAUSE\fP to cause reading from this
+connection to pause. See \fIcurl_easy_pause(3)\fP for further details.
+
+\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
+that the callback wants, or it will be considered the final packet by the
+server end and the transfer will end there.
+
+If you set this callback pointer to NULL, or don't set it at all, the default
+internal read function will be used. It is doing an fread() on the FILE *
+userdata set with \fICURLOPT_READDATA(3)\fP.
+.SH DEFAULT
+The default internal read callback is fread().
+.SH PROTOCOLS
+This is used for all protocols when doing uploads.
+.SH EXAMPLE
+Here's an example setting a read callback for reading that to upload to an FTP
+site: https://curl.haxx.se/libcurl/c/ftpupload.html
+.SH AVAILABILITY
+CURL_READFUNC_PAUSE return code was added in 7.18.0 and CURL_READFUNC_ABORT
+was added in 7.12.1.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
+.BR CURLOPT_SEEKFUNCTION "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_SSH_COMPRESSION.3
index 9715162b4,000000000..e6c22e4a9
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SSH_COMPRESSION.3
+++ b/docs/libcurl/opts/GNURLOPT_SSH_COMPRESSION.3
@@@ -1,58 -1,0 +1,58 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_SSH_COMPRESSION 3 "05 Aug 2017" "libcurl 7.56.0"
"curl_easy_setopt options"
+.SH NAME
- CURLOPT_SSH_COMPRESSION \- enables automatic decompression of HTTP downloads
++CURLOPT_SSH_COMPRESSION \- enables compression / decompression of SSH traffic
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);
+.SH DESCRIPTION
+Pass a long as parameter set to 1L to enable or 0L to disable.
+
+Enables built-in SSH compression. This is a request, not an order; the server
+may or may not do it.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All SSH based protocols: SCP, SFTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com");
+
+ /* enable built-in compression */
+ curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.56.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_ACCEPT_ENCODING "(3), " CURLOPT_TRANSFER_ENCODING "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
index b0b8d6fda,000000000..427375657
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
@@@ -1,78 -1,0 +1,84 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2018, 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_SSL_CTX_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL
or mbedTLS
+.SH SYNOPSIS
+.nf
+#include <gnurl/curl.h>
+
+CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION,
+ ssl_ctx_callback);
+.SH DESCRIPTION
+This option only works for libcurl powered by OpenSSL, wolfSSL/CyaSSL or
+mbedTLS. If libcurl was built against another SSL library this functionality
is
+absent.
+
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl just before the initialization
+of an SSL connection after having processed all other SSL related options to
- give a last chance to an application to modify the behaviour of the SSL
++give a last chance to an application to modify the behavior of the SSL
+initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL
+library's \fISSL_CTX\fP for OpenSSL or wolfSSL/CyaSSL, and a pointer to
+\fImbedtls_ssl_config\fP for mbedTLS. If an error is returned from the
callback
+no attempt to establish a connection is made and the perform operation will
+return the callback's error code. Set the \fIuserptr\fP argument with the
+\fICURLOPT_SSL_CTX_DATA(3)\fP option.
+
+This function will get called on all new connections made to a server, during
+the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized
object
+each time, but note the pointer may be the same as from a prior call.
+
+To use this properly, a non-trivial amount of knowledge of your SSL library is
+necessary. For example, you can use this function to call library-specific
+callbacks to add additional validation code for certificates, and even to
+change the actual URI of an HTTPS request.
++
++WARNING: The \fICURLOPT_SSL_CTX_FUNCTION(3)\fP callback allows the application
++to reach in and modify SSL details in the connection without libcurl itself
++knowing anything about it, which then subsequently can lead to libcurl
++unknowingly reusing SSL connections with different properties. To remedy this
++you may set \fICURLOPT_FORBID_REUSE(3)\fP from the callback function.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
+.SH EXAMPLE
+See cacertinmem.c in docs/examples directory for usage example.
+
+https://curl.haxx.se/libcurl/c/cacertinmem.html
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Added in
+7.54.0 for mbedTLS. Other SSL backends not supported.
+.SH RETURN VALUE
+CURLE_OK if supported; or an error such as:
+
+CURLE_NOT_BUILT_IN - Not supported by the SSL backend
+
+CURLE_UNKNOWN_OPTION
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_DATA "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_URL.3
index c477649c6,000000000..c1d4c1b0d
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_URL.3
+++ b/docs/libcurl/opts/GNURLOPT_URL.3
@@@ -1,349 -1,0 +1,350 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2018, 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_URL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_URL \- provide the URL to use in the request
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_URL, char *URL);
+.SH DESCRIPTION
+Pass in a pointer to the \fIURL\fP to work with. The parameter should be a
+char * to a zero terminated string which must be URL-encoded in the following
+format:
+
+scheme://host:port/path
+
+For a greater explanation of the format please see RFC3986.
+
+libcurl doesn't validate the syntax or use this variable until the transfer is
+issued. Even if you set a crazy value here, \fIcurl_easy_setopt(3)\fP will
+still return \fICURLE_OK\fP.
+
+If the given URL is missing a scheme name (such as "http://" or "ftp://" etc)
+then libcurl will make a guess based on the host. If the outermost sub-domain
+name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol will be
+used, otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by
+setting a default protocol, see \fICURLOPT_DEFAULT_PROTOCOL(3)\fP for details.
+
+Should the protocol, either that specified by the scheme or deduced by libcurl
+from the host name, not be supported by libcurl then
+\fICURLE_UNSUPPORTED_PROTOCOL\fP will be returned from either the
+\fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP functions when you
+call them. Use \fIcurl_version_info(3)\fP for detailed information of which
+protocols are supported by the build of libcurl you are using.
+
+\fICURLOPT_PROTOCOLS(3)\fP can be used to limit what protocols libcurl will
+use for this transfer, independent of what libcurl has been compiled to
+support. That may be useful if you accept the URL from an external source and
+want to limit the accessibility.
+
+\fICURLOPT_URL(3)\fP is the only option that \fBmust\fP be set before a
+transfer is started.
+
+The host part of the URL contains the address of the server that you want to
+connect to. This can be the fully qualified domain name of the server, the
+local network name of the machine on your network or the IP address of the
+server or machine represented by either an IPv4 or IPv6 address. For example:
+
+http://www.example.com/
+
+http://hostname/
+
+http://192.168.0.1/
+
+http://[2001:1890:1112:1::20]/
+
+It is also possible to specify the user name, password and any supported login
+options as part of the host, for the following protocols, when connecting to
+servers that require authentication:
+
+http://user:address@hidden
+
+ftp://user:address@hidden
+
+smb://domain%2fuser:address@hidden
+
+imap://user:password;address@hidden
+
+pop3://user:password;address@hidden
+
+smtp://user:password;address@hidden
+
+At present only IMAP, POP3 and SMTP support login options as part of the host.
+For more information about the login options in URL syntax please see RFC2384,
+RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
+
+The port is optional and when not specified libcurl will use the default port
+based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25
+for SMTP, etc. The following examples show how to specify the port:
+
+http://www.example.com:8080/ - This will connect to a web server using port
+8080 rather than 80.
+
+smtp://mail.example.com:587/ - This will connect to a SMTP server on the
+alternative mail port.
+
+The path part of the URL is protocol specific and whilst some examples are
+given below this list is not conclusive:
+
+.IP HTTP
+The path part of an HTTP request specifies the file to retrieve and from what
+directory. If the directory is not specified then the web server's root
+directory is used. If the file is omitted then the default document will be
+retrieved for either the directory specified or the root directory. The exact
+resource returned for each URL is entirely dependent on the server's
+configuration.
+
+http://www.example.com - This gets the main page from the web server.
+
+http://www.example.com/index.html - This returns the main page by explicitly
+requesting it.
+
+http://www.example.com/contactus/ - This returns the default document from
+the contactus directory.
+
+.IP FTP
+The path part of an FTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the directory is omitted then
+the directory listing for the root / home directory will be returned.
+
+ftp://ftp.example.com - This retrieves the directory listing for the root
+directory.
+
+ftp://ftp.example.com/readme.txt - This downloads the file readme.txt from the
+root directory.
+
+ftp://ftp.example.com/libcurl/readme.txt - This downloads readme.txt from the
+libcurl directory.
+
+ftp://user:address@hidden/readme.txt - This retrieves the readme.txt
+file from the user's home directory. When a username and password is
+specified, everything that is specified in the path part is relative to the
+user's home directory. To retrieve files from the root directory or a
+directory underneath the root directory then the absolute path must be
+specified by prepending an additional forward slash to the beginning of the
+path.
+
+ftp://user:address@hidden//readme.txt - This retrieves the readme.txt
+from the root directory when logging in as a specified user.
+
+.IP SMTP
+The path part of a SMTP request specifies the host name to present during
+communication with the mail server. If the path is omitted then libcurl will
+attempt to resolve the local computer's host name. However, this may not
+return the fully qualified domain name that is required by some mail servers
+and specifying this path allows you to set an alternative name, such as
+your machine's fully qualified domain name, which you might have obtained
+from an external function such as gethostname or getaddrinfo.
+
+smtp://mail.example.com - This connects to the mail server at example.com and
+sends your local computer's host name in the HELO / EHLO command.
+
+smtp://mail.example.com/client.example.com - This will send
client.example.com in
+the HELO / EHLO command to the mail server at example.com.
+
+.IP POP3
+The path part of a POP3 request specifies the message ID to retrieve. If the
+ID is not specified then a list of waiting messages is returned instead.
+
+pop3://user:address@hidden - This lists the available messages for
+the user
+
+pop3://user:address@hidden/1 - This retrieves the first message for
+the user
+
+.IP IMAP
+The path part of an IMAP request not only specifies the mailbox to list (Added
+in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the
+mailbox, to specify the UID, SECTION (Added in 7.30.0) and PARTIAL octets
+(Added in 7.37.0) of the message to fetch and to specify what messages to
+search for (Added in 7.37.0).
+
+imap://user:address@hidden - Performs a top level folder list
+
+imap://user:address@hidden/INBOX - Performs a folder list on the
+user's inbox
+
+imap://user:address@hidden/INBOX/;UID=1 - Selects the user's inbox
+and fetches message 1
+
+imap://user:address@hidden/INBOX;UIDVALIDITY=50/;UID=2 - Selects
+the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches
+message 2 if it is
+
+imap://user:address@hidden/INBOX/;UID=3/;SECTION=TEXT - Selects the
+user's inbox and fetches the text portion of message 3
+
+imap://user:address@hidden/INBOX/;UID=4/;PARTIAL=0.1024 - Selects
+the user's inbox and fetches the first 1024 octets of message 4
+
+imap://user:address@hidden/INBOX?NEW - Selects the user's inbox and
+checks for NEW messages
+
+imap://user:address@hidden/INBOX?SUBJECT%20shadows - Selects the
+user's inbox and searches for messages containing "shadows" in the subject
+line
+
+For more information about the individual components of an IMAP URL please
+see RFC5092.
+
+.IP SCP
+The path part of a SCP request specifies the file to retrieve and from what
+directory. The file part may not be omitted. The file is taken as an absolute
+path from the root directory on the server. To specify a path relative to the
+user's home directory on the server, prepend ~/ to the path portion. If the
+user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
+
+scp://address@hidden/etc/issue - This specifies the file /etc/issue
+
+scp://example.com/~/my-file - This specifies the file my-file in the
+user's home directory on the server
+
+.IP SFTP
+The path part of a SFTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the path ends in a / then a directory
+listing is returned instead of a file. If the path is omitted entirely then
+the directory listing for the root / home directory will be returned. If the
+user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
+
+sftp://user:address@hidden/etc/issue - This specifies the file
+/etc/issue
+
+sftp://address@hidden/~/my-file - This specifies the file my-file in the
+user's home directory
+
+sftp://ssh.example.com/~/Documents/ - This requests a directory listing
+of the Documents directory under the user's home directory
+
+.IP SMB
+The path part of a SMB request specifies the file to retrieve and from what
+share and directory or the share to upload to and as such, may not be omitted.
+If the user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option. If the user name
+is embedded in the URL then it must contain the domain name and as such, the
+backslash must be URL encoded as %2f.
+
+smb://server.example.com/files/issue - This specifies the file "issue" located
+in the root of the "files" share
+
+smb://server.example.com/files/ -T issue - This specifies the file "issue"
will
+be uploaded to the root of the "files" share.
+
+.IP LDAP
+The path part of a LDAP request can be used to specify the: Distinguished
+Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field
+is separated by a question mark and when that field is not required an empty
+string with the question mark separator should be included.
+
+ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search
+with the DN as My Organisation.
+
+ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform
+the same search but will only return postalAddress attributes.
+
+ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN
+and requests information about the rootDomainNamingContext attribute for an
+Active Directory server.
+
+For more information about the individual components of a LDAP URL please
+see RFC4516.
+.IP RTMP
+There's no official URL spec for RTMP so libcurl uses the URL syntax supported
+by the underlying librtmp library. It has a syntax where it wants a
+traditional URL, followed by a space and a series of space-separated
+name=value pairs.
+
+While space is not typically a "legal" letter, libcurl accepts them. When a
+user wants to pass in a '#' (hash) character it will be treated as a fragment
+and get cut off by libcurl if provided literally. You will instead have to
+escape it by providing it as backslash and its ASCII value in hexadecimal:
+"\\23".
+
++.RS 0
+The application does not have to keep the string around after setting this
+option.
+.SH ENCODING
+The string pointed to in the \fICURLOPT_URL(3)\fP argument is generally
+expected to be a sequence of characters using an ASCII compatible encoding.
+
+If libcurl is built with IDN support, the server name part of the URL can use
+an "international name" by using the current encoding (according to locale) or
+UTF-8 (when winidn is used).
+
+If libcurl is built without IDN support, the server name is used exactly as
+specified when passed to the name resolver functions.
+.SH DEFAULT
+There is no default URL. If this option isn't set, no transfer can be
+performed.
+.SH SECURITY CONCERNS
+Applications may at times find it convenient to allow users to specify URLs
+for various purposes and that string would then end up fed to this option.
+
+Getting a URL from an external untrusted party will bring reasons for several
+security concerns:
+
+If you have an application that runs as or in a server application, getting an
+unfiltered URL can easily trick your application to access a local resource
+instead of a remote. Protecting yourself against localhost accesses is very
+hard when accepting user provided URLs.
+
+Such custom URLs can also access other ports than you planned as port numbers
+are part of the regular URL format. The combination of a local host and a
+custom port number can allow external users to play tricks with your local
+services.
+
+Accepting external URLs may also use other protocols than http:// or other
+common ones. Restrict what accept with \fICURLOPT_PROTOCOLS(3)\fP.
+
+User provided URLs can also be made to point to sites that redirect further on
+(possibly to other protocols too). Consider your
+\fICURLOPT_FOLLOWLOCATION(3)\fP and \fICURLOPT_REDIR_PROTOCOLS(3)\fP settings.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+POP3 and SMTP were added in 7.31.0
+.SH RETURN VALUE
+Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient
+heap space.
+
+Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so
+given a bad URL, it will not be detected until \fIcurl_easy_perform(3)\fP or
+similar is called.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_PROTOCOLS "(3), "
+.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
+.BR curl_easy_perform "(3), "
+.BR CURLINFO_REDIRECT_URL "(3), " CURLOPT_PATH_AS_IS "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_WRITEDATA.3
index 30e2799eb,000000000..d8b63b220
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_WRITEDATA.3
+++ b/docs/libcurl/opts/GNURLOPT_WRITEDATA.3
@@@ -1,60 -1,0 +1,60 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, 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_WRITEDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_WRITEDATA \- custom pointer passed to the write callback
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEDATA, void *pointer);
+.SH DESCRIPTION
+A data \fIpointer\fP to pass to the write callback. If you use the
+\fICURLOPT_WRITEFUNCTION(3)\fP option, this is the pointer you'll get in that
+callback's 4th argument. If you don't use a write callback, you must make
+\fIpointer\fP a 'FILE *' (cast to 'void *') as libcurl will pass this to
+\fIfwrite(3)\fP when writing data.
+
+The internal \fICURLOPT_WRITEFUNCTION(3)\fP will write the data to the FILE *
+given with this option, or to stdout if this option hasn't been set.
+
- If you're using libcurl as a win32 DLL, you \fBMUST\fP use the
++If you're using libcurl as a win32 DLL, you \fBMUST\fP use a
+\fICURLOPT_WRITEFUNCTION(3)\fP if you set this option or you will experience
+crashes.
+.SH DEFAULT
+By default, this is a FILE * to stdout.
+.SH PROTOCOLS
+Used for all protocols.
+.SH EXAMPLE
+A common technique is to use the write callback to store the incoming data
+into a dynamically growing allocated buffer, and then this
+\fICURLOPT_WRITEDATA(3)\fP is used to point to a struct or the buffer to store
+data in. Like in the getinmemory example:
+https://curl.haxx.se/libcurl/c/getinmemory.html
+.SH AVAILABILITY
+Available in all libcurl versions. This option was formerly known as
+\fICURLOPT_FILE\fP, the name \fICURLOPT_WRITEDATA(3)\fP was introduced in
+7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEFUNCTION "(3), " CURLOPT_READDATA "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_WRITEFUNCTION.3
index d85b25274,000000000..00b179100
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_WRITEFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_WRITEFUNCTION.3
@@@ -1,81 -1,0 +1,81 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, 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_WRITEFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_WRITEFUNCTION \- set callback for writing received data
+.SH SYNOPSIS
+.nf
+#include <gnurl/curl.h>
+
+size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEFUNCTION,
write_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl as soon as there is data
+received that needs to be saved. \fIptr\fP points to the delivered data, and
- the size of that data is \fIsize\fP multiplied with \fInmemb\fP.
++the size of that data is \fInmemb\fP; \fIsize\fP is always 1.
+
+The callback function will be passed as much data as possible in all invokes,
+but you must not make any assumptions. It may be one byte, it may be
+thousands. The maximum amount of body data that will be passed to the write
+callback is defined in the curl.h header file: \fICURL_MAX_WRITE_SIZE\fP (the
+usual default is 16K). If \fICURLOPT_HEADER(3)\fP is enabled, which makes
+header data get passed to the write callback, you can get up to
+\fICURL_MAX_HTTP_HEADER\fP bytes of header data passed into it. This usually
+means 100K.
+
+This function may be called with zero bytes data if the transferred file is
+empty.
+
+The data passed to this function will not be zero terminated!
+
+Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA(3)\fP option.
+
+Your callback should return the number of bytes actually taken care of. If
+that amount differs from the amount passed to your callback function, it'll
+signal an error condition to the library. This will cause the transfer to get
+aborted and the libcurl function used will return \fICURLE_WRITE_ERROR\fP.
+
+If your callback function returns CURL_WRITEFUNC_PAUSE it will cause this
+transfer to become paused. See \fIcurl_easy_pause(3)\fP for further details.
+
+Set this option to NULL to get the internal default function used instead of
+your callback. The internal default function will write the data to the FILE *
+given with \fICURLOPT_WRITEDATA(3)\fP.
+.SH DEFAULT
+libcurl will use 'fwrite' as a callback by default.
+.SH PROTOCOLS
+For all protocols
+.SH AVAILABILITY
+Support for the CURL_WRITEFUNC_PAUSE return code was added in version 7.18.0.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH EXAMPLE
+A common technique is to use this callback to store the incoming data into a
+dynamically growing allocated buffer. Like in the getinmemory example:
+https://curl.haxx.se/libcurl/c/getinmemory.html
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEDATA "(3), " CURLOPT_READFUNCTION "(3), "
diff --cc lib/Makefile.am
index f43dc2964,7e82d467e..b54ff573b
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@@ -105,13 -105,16 +105,16 @@@ libgnurl_la_LDFLAGS_EXTRA += -mimpure-t
endif
if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
-libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+libgnurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
else
+ # if symbol-hiding is enabled, hide them!
+ if DOING_CURL_SYMBOL_HIDING
-libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
+libgnurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
endif
+ endif
if USE_CPPFLAG_CURL_STATICLIB
-libcurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
+libgnurl_la_CPPFLAGS_EXTRA += -DCURL_STATICLIB
endif
if DOING_CURL_SYMBOL_HIDING
diff --cc lib/formdata.c
index ba683e976,202d930c7..5a6cdd644
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@@ -44,10 -45,7 +45,6 @@@
#include "curl_memory.h"
#include "memdebug.h"
- /* What kind of Content-Type to use on un-specified files with unrecognized
- extensions. */
- #define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream"
--
#define HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME
#define HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME
#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
diff --cc lib/system_win32.c
index d292bd6e1,6b8004e5b..f30e9c000
--- a/lib/system_win32.c
+++ b/lib/system_win32.c
@@@ -24,8 -24,9 +24,9 @@@
#if defined(WIN32)
-#include <curl/curl.h>
+#include <gnurl/curl.h>
#include "system_win32.h"
+ #include "warnless.h"
/* The last #include files should be: */
#include "curl_memory.h"
diff --cc lib/warnless.h
index e31323971,284ea1e75..6d515962e
--- a/lib/warnless.h
+++ b/lib/warnless.h
@@@ -23,9 -23,12 +23,12 @@@
***************************************************************************/
#ifdef USE_WINSOCK
-#include <curl/curl.h> /* for curl_socket_t */
+#include <gnurl/curl.h> /* for curl_socket_t */
#endif
+ #define CURLX_FUNCTION_CAST(target_type, func) \
+ (target_type)(void (*) (void))(func)
+
unsigned short curlx_ultous(unsigned long ulnum);
unsigned char curlx_ultouc(unsigned long ulnum);
diff --cc tests/data/Makefile.inc
index 0f204ecbb,e0457486b..85f66db60
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@@ -125,9 -125,9 +125,9 @@@ test1104 test1105 test1106 test1107 tes
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
-test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
+test1136 test1137 test1138 test1141 test1142 test1143 \
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
- test1152 test1153 test1154 test1155 test1156 \
+ test1152 test1153 test1154 test1155 test1156 test1157 test1158 \
\
test1160 test1161 test1162 test1163 test1164 \
test1170 test1171 \
diff --cc tests/libtest/CMakeLists.txt
index afcd372d3,ac8d33328..1d56ebe7b
--- a/tests/libtest/CMakeLists.txt
+++ b/tests/libtest/CMakeLists.txt
@@@ -50,12 -50,15 +50,15 @@@ endif(
add_custom_command(
OUTPUT lib1521.c
- COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl <
${CMAKE_SOURCE_DIR}/include/curl/curl.h > lib1521.c
+ COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl <
${CMAKE_SOURCE_DIR}/include/gnurl/curl.h > lib1521.c
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
- "${CMAKE_SOURCE_DIR}/include/curl/curl.h"
+ "${CMAKE_SOURCE_DIR}/include/gnurl/curl.h"
VERBATIM)
+ set_property(TARGET chkdecimalpoint
+ APPEND PROPERTY COMPILE_DEFINITIONS
"CURLX_NO_MEMORY_CALLBACKS;CURL_STATICLIB")
+
# # files used only in some libcurl test programs
# SET(TESTUTIL testutil.c testutil.h)
diff --cc tests/runtests.pl
index 65a62ebae,e12c1429a..2aa352cd4
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@@ -151,8 -151,8 +151,8 @@@ my $SMBSPORT; # SMBS server
my $NEGTELNETPORT; # TELNET server port with negotiation
my $srcdir = $ENV{'srcdir'} || '.';
-my $CURL="../src/curl".exe_ext(); # what curl executable to run on the tests
-my $VCURL="curl"; # what curl binary to use to verify the servers with
+my $CURL="../src/gnurl".exe_ext(); # what curl executable to run on the tests
- my $VCURL=$CURL; # what curl binary to use to verify the servers with
++my $VCURL="gnurl"; # what curl binary to use to verify the servers with
# VCURL is handy to set to the system one when the one you
# just built hangs or crashes and thus prevent verification
my $DBGCURL=$CURL; #"../src/.libs/curl"; # alternative for debugging
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 150/153: RELEASE-NOTES: 7.61.1, (continued)
- [GNUnet-SVN] [gnurl] 150/153: RELEASE-NOTES: 7.61.1, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 151/153: THANKS: 7.61.1 status, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 148/153: sftp: fix indentation, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 145/153: tool_operate: Add http code 408 to transient list for --retry, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 146/153: url, vtls: make CURLOPT{, _PROXY}_TLS13_CIPHERS work, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 143/153: Curl_ntlm_core_mk_nt_hash: return error on too long password, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 138/153: tool_operate: Fix setting proxy TLS 1.3 ciphers, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 133/153: RELEASE-NOTES: synced, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 137/153: cookies: support creation-time attribute for cookies, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 134/153: THANKS-filter: dedup Daniel Jeliński, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 152/153: Merge tag 'curl-7_61_1',
gnunet <=
- [GNUnet-SVN] [gnurl] 141/153: test1148: fix precheck output, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 127/153: lib1522: fix curl_easy_setopt argument type, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 135/153: CURLOPT_SSL_CTX_FUNCTION.3: clarify connection reuse warning, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 129/153: cmdline-opts/page-footer: fix edit mistake, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 140/153: all: s/int/size_t cleanup, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 139/153: ssh-libssh: use FALLTHROUGH to silence gcc8, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 131/153: CURLOPT_SSL_CTX_FUNCTION.3: might cause unintended connection reuse [ci skip], gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 126/153: curl_threads: silence bad-function-cast warning, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 130/153: curl: fix time-of-check, time-of-use race in dir creation, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 142/153: http2: Use correct format identifier for stream_id, gnunet, 2018/09/11