gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 213/222: Merge tag 'curl-7_67_0'


From: gnunet
Subject: [gnurl] 213/222: Merge tag 'curl-7_67_0'
Date: Thu, 07 Nov 2019 00:11:49 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 03d326c16b69a3db6b369e8a05fd0fdf23a7cf35
Merge: 3671d2089 2e9b725f6
Author: ng0 <address@hidden>
AuthorDate: Wed Nov 6 19:43:08 2019 +0000

    Merge tag 'curl-7_67_0'
    
    7.67.0

 .cirrus.yml                                        |  25 +-
 .github/workflows/cpp.yml                          |  17 +
 .mailmap                                           |   1 +
 .travis.yml                                        |  70 ++-
 CMake/CurlTests.c                                  |   2 +-
 CMake/Platforms/WindowsCache.cmake                 |   1 -
 CMakeLists.txt                                     |   2 -
 README.md                                          |   3 +-
 RELEASE-NOTES                                      | 432 ++++++++-----
 appveyor.yml                                       | 115 +++-
 aux-gnurl/sed.sh                                   |  18 +-
 buildconf.bat                                      |   2 +-
 configure.ac                                       | 125 ++--
 docs/BINDINGS.md                                   |  11 +-
 docs/ESNI.md                                       | 139 ++++
 docs/HTTP3.md                                      |  38 +-
 docs/INSTALL.md                                    |  16 +-
 docs/KNOWN_BUGS                                    |  22 +-
 docs/Makefile.am                                   |   1 +
 docs/THANKS                                        |  42 ++
 docs/THANKS-filter                                 |   2 +-
 docs/TODO                                          |  18 +
 docs/cmdline-opts/Makefile.inc                     |   3 +-
 docs/cmdline-opts/no-progress-meter.d              |  10 +
 docs/examples/Makefile.inc                         |   2 +-
 docs/examples/externalsocket.c                     |   2 +-
 docs/examples/ftp-wildcard.c                       |   2 +-
 docs/examples/htmltidy.c                           |   2 +-
 docs/examples/htmltitle.cpp                        |   2 +-
 docs/examples/http2-upload.c                       |   2 +-
 docs/examples/imap-append.c                        |   2 +-
 docs/examples/multi-app.c                          |   2 +-
 docs/examples/multi-event.c                        | 240 +++++++
 docs/examples/multithread.c                        |   2 +-
 docs/examples/postit2-formadd.c                    |   3 +-
 docs/examples/postit2.c                            |   3 +-
 docs/examples/resolve.c                            |   2 +-
 docs/examples/sampleconv.c                         |   2 +-
 docs/examples/sendrecv.c                           |   2 +-
 docs/examples/shared-connection-cache.c            |   2 +-
 docs/examples/smooth-gtk-thread.c                  |   2 +-
 docs/examples/smtp-mime.c                          |   2 +-
 docs/examples/sslbackend.c                         |   4 +-
 docs/examples/synctime.c                           |   2 +-
 docs/examples/threaded-shared-conn.c               |   2 +-
 docs/examples/threaded-ssl.c                       |   2 +-
 docs/libcurl/gnurl_multi_perform.3                 |   4 +-
 docs/libcurl/gnurl_multi_setopt.3                  |   4 +-
 docs/libcurl/gnurl_multi_wait.3                    |   2 +-
 docs/libcurl/gnurl_url_get.3                       |   5 +-
 docs/libcurl/gnurl_url_set.3                       |  11 +-
 docs/libcurl/libgnurl-errors.3                     |   2 +-
 docs/libcurl/libgnurl-multi.3                      |   5 +-
 docs/libcurl/libgnurl-tutorial.3                   |   2 +-
 ...EEKDATA.3 => CURLMOPT_MAX_CONCURRENT_STREAMS.3} |  47 +-
 docs/libcurl/opts/GNURLOPT_CURLU.3                 |   2 +-
 docs/libcurl/opts/GNURLOPT_FOLLOWLOCATION.3        |   2 +-
 docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3        |   2 +-
 docs/libcurl/opts/GNURLOPT_HEADEROPT.3             |   2 +-
 docs/libcurl/opts/GNURLOPT_HTTP_VERSION.3          |   2 +-
 docs/libcurl/opts/GNURLOPT_LOCALPORT.3             |   2 +-
 docs/libcurl/opts/GNURLOPT_LOCALPORTRANGE.3        |   2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3      |   2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_TLS13_CIPHERS.3   |   2 +-
 docs/libcurl/opts/GNURLOPT_RANGE.3                 |   2 +-
 docs/libcurl/opts/GNURLOPT_REDIR_PROTOCOLS.3       |   2 +-
 docs/libcurl/opts/GNURLOPT_SEEKDATA.3              |   2 +-
 docs/libcurl/opts/GNURLOPT_SSLVERSION.3            |   2 +-
 docs/libcurl/opts/GNURLOPT_TIMEOUT.3               |  19 +-
 docs/libcurl/opts/GNURLOPT_TLS13_CIPHERS.3         |   2 +-
 docs/libcurl/opts/GNURLOPT_TRAILERDATA.3           |  12 +-
 docs/libcurl/opts/GNURLOPT_TRAILERFUNCTION.3       |  14 +-
 docs/libcurl/opts/Makefile.inc                     | 699 +++++++++++----------
 docs/libcurl/symbols-in-versions                   |   3 +
 include/gnurl/curl.h                               |   2 +
 include/gnurl/curlver.h                            |   6 +-
 include/gnurl/multi.h                              |   6 +
 include/gnurl/urlapi.h                             |   2 +
 lib/Makefile.inc                                   |   4 +-
 lib/Makefile.netware                               |   2 -
 lib/altsvc.c                                       |  20 +-
 lib/asyn-thread.c                                  |  28 +-
 lib/checksrc.pl                                    |   2 +-
 lib/config-amigaos.h                               |   4 +-
 lib/config-os400.h                                 |   6 -
 lib/config-plan9.h                                 |   1 -
 lib/config-riscos.h                                |   8 +-
 lib/config-symbian.h                               |   3 -
 lib/config-tpf.h                                   |   6 +-
 lib/config-vxworks.h                               |   3 -
 lib/conncache.c                                    |   8 +-
 lib/connect.c                                      |  15 +-
 lib/cookie.c                                       |  19 +-
 lib/cookie.h                                       |   2 +-
 lib/curl_config.h.cmake                            |   3 -
 lib/doh.c                                          |  58 +-
 lib/easy.c                                         |   7 +-
 lib/ftp.c                                          | 396 ++++++------
 lib/ftp.h                                          |   6 +-
 lib/ftplistparser.c                                |   2 +-
 lib/hostcheck.c                                    |   2 +-
 lib/hostip.c                                       |   2 +-
 lib/http.c                                         |  17 +-
 lib/http.h                                         |   5 -
 lib/http2.c                                        |  49 +-
 lib/http_chunks.c                                  |  28 +-
 lib/http_chunks.h                                  |  13 +-
 lib/http_proxy.c                                   |   9 +-
 lib/imap.c                                         |   5 +-
 lib/ldap.c                                         |  24 +-
 lib/mime.c                                         |  19 +-
 lib/mime.h                                         |   6 +-
 lib/multi.c                                        |  18 +-
 lib/multihandle.h                                  |   1 +
 lib/multiif.h                                      |   6 +
 lib/netrc.c                                        |   2 +-
 lib/non-ascii.c                                    |   2 +-
 lib/parsedate.c                                    |  14 +-
 lib/security.c                                     |   2 +-
 lib/setopt.c                                       |  21 +-
 lib/setup-os400.h                                  |   6 +-
 lib/smb.c                                          |   3 +-
 lib/socketpair.c                                   | 118 ++++
 lib/socketpair.h                                   |  36 ++
 lib/socks.c                                        |  64 +-
 lib/strcase.c                                      |  86 ++-
 lib/strcase.h                                      |   4 +-
 lib/transfer.c                                     |  14 +-
 lib/url.c                                          |  61 +-
 lib/url.h                                          |   2 +-
 lib/urlapi.c                                       | 156 +++--
 lib/urldata.h                                      | 393 ++++++------
 lib/vauth/vauth.h                                  |   2 +-
 lib/version.c                                      |  15 +-
 lib/vquic/ngtcp2.c                                 | 103 ++-
 lib/vquic/quiche.c                                 |  33 +-
 lib/vssh/libssh.c                                  |   6 +-
 lib/vssh/libssh2.c                                 |   4 +-
 lib/vtls/gskit.c                                   | 102 +--
 lib/vtls/gtls.c                                    |   6 +-
 lib/vtls/mbedtls.c                                 |   7 +-
 lib/vtls/mesalink.c                                |   7 +-
 lib/vtls/nss.c                                     |   2 +-
 lib/vtls/openssl.c                                 |  32 +-
 lib/vtls/polarssl.c                                |   4 +-
 lib/vtls/schannel.c                                |  12 +-
 lib/vtls/schannel_verify.c                         |   2 +-
 lib/vtls/sectransp.c                               |   6 +-
 lib/vtls/vtls.c                                    |   5 +-
 m4/curl-confopts.m4                                |  38 +-
 packages/OS400/curl.inc.in                         |   2 +
 packages/OS400/os400sys.c                          | 156 +++--
 src/tool_cfgable.h                                 |  19 +-
 src/tool_getparam.c                                |  22 +-
 src/tool_help.c                                    |   3 +
 src/tool_metalink.c                                |  14 +-
 src/tool_metalink.h                                |   3 +
 src/tool_operate.c                                 | 503 ++++++++-------
 src/tool_operhlp.c                                 |  24 +-
 src/tool_paramhlp.c                                |  31 +-
 src/tool_setopt.h                                  |   2 +-
 src/tool_urlglob.c                                 |   3 +
 tests/certs/Server-localhost-lastSAN-sv.crl        |  16 +-
 tests/certs/Server-localhost-lastSAN-sv.crt        | 113 ++--
 tests/certs/Server-localhost-lastSAN-sv.csr        |  24 +-
 tests/certs/Server-localhost-lastSAN-sv.der        | Bin 994 -> 994 bytes
 tests/certs/Server-localhost-lastSAN-sv.key        |  50 +-
 tests/certs/Server-localhost-lastSAN-sv.pem        | 163 ++---
 tests/certs/Server-localhost-lastSAN-sv.pub.der    | Bin 294 -> 294 bytes
 tests/certs/Server-localhost-lastSAN-sv.pub.pem    |  14 +-
 tests/data/Makefile.inc                            |  13 +-
 tests/data/test1002                                |   1 +
 tests/data/test1008                                |   1 +
 tests/data/test1010                                |   4 +-
 tests/data/test1016                                |   2 +-
 tests/data/test1017                                |   2 +-
 tests/data/test1018                                |   2 +-
 tests/data/test1019                                |   2 +-
 tests/data/test1020                                |   2 +-
 tests/data/test1021                                |   1 +
 tests/data/test1059                                |   1 +
 tests/data/test1060                                |   1 +
 tests/data/test1061                                |   1 +
 tests/data/test1063                                |   2 +-
 tests/data/test1077                                |   1 +
 tests/data/test1078                                |   3 +
 tests/data/test1087                                |   3 +
 tests/data/test1088                                |   3 +
 tests/data/test1091                                |   3 +-
 tests/data/test1092                                |   1 +
 tests/data/test1098                                |   1 +
 tests/data/test1104                                |   3 +
 tests/data/test1106                                |   1 +
 tests/data/test1136                                |   1 +
 tests/data/test1141                                |   3 +
 tests/data/test1142                                |   3 +
 tests/data/test1149                                |   2 +-
 tests/data/test1150                                |   3 +
 tests/data/test1162                                |   4 +
 tests/data/{test5 => test1166}                     |  31 +-
 tests/data/test1213                                |   3 +
 tests/data/test1214                                |   3 +
 tests/data/test1215                                |   1 +
 tests/data/test1216                                |   3 +
 tests/data/test1218                                |   3 +
 tests/data/test1220                                |   2 +-
 tests/data/test1225                                |   1 -
 tests/data/test1228                                |   3 +
 tests/data/test1230                                |   1 +
 tests/data/test1232                                |   3 +
 tests/data/test1233                                |   1 +
 tests/data/test1241                                |   3 +
 tests/data/test1246                                |   3 +
 tests/data/test1253                                |   3 +
 tests/data/test1254                                |   3 +
 tests/data/test1256                                |   3 +
 tests/data/test1257                                |   3 +
 tests/data/test1287                                |   3 +
 tests/data/test1288                                |   3 +
 tests/data/test1314                                |   3 +
 tests/data/test1319                                |   1 +
 tests/data/test1320                                |   1 +
 tests/data/test1321                                |   1 +
 tests/data/test1329                                |   3 +
 tests/data/test1331                                |   3 +
 tests/data/test1415                                |   3 +
 tests/data/test1421                                |   3 +
 tests/data/test1428                                |   3 +
 tests/data/test143                                 |   3 +-
 tests/data/test1445                                |   2 +-
 tests/data/test1447                                |   1 +
 tests/data/test1455                                |   3 +
 tests/data/test1456                                |   3 +
 tests/data/test1509                                |   4 +-
 tests/data/test1525                                |   3 +
 tests/data/test1526                                |   3 +
 tests/data/test1527                                |   3 +
 tests/data/test1528                                |   3 +
 tests/data/test1529                                |   3 +
 tests/data/test1591                                |   2 +-
 tests/data/test1596                                |   2 +-
 tests/data/test16                                  |   3 +
 tests/data/test162                                 |   1 +
 tests/data/test165                                 |   1 +
 tests/data/test1654                                |   1 +
 tests/data/test1655                                |  26 +
 tests/data/test167                                 |   1 +
 tests/data/test168                                 |   1 +
 tests/data/test169                                 |   1 +
 tests/data/test170                                 |   1 +
 tests/data/test171                                 |   3 +
 tests/data/test179                                 |   3 +
 tests/data/test183                                 |   3 +
 tests/data/test184                                 |   3 +
 tests/data/test185                                 |   3 +
 tests/data/test19                                  |   2 +-
 tests/data/test1904                                |   3 +
 tests/data/{test5 => test1907}                     |  31 +-
 tests/data/test200                                 |   2 +-
 tests/data/test2000                                |   2 +-
 tests/data/test2001                                |   2 +-
 tests/data/test2002                                |   2 +-
 tests/data/test2003                                |   2 +-
 tests/data/test2004                                |   2 +-
 tests/data/test2005                                |   2 +-
 tests/data/test2006                                |   2 +-
 tests/data/test2007                                |   2 +-
 tests/data/test2008                                |   2 +-
 tests/data/test2009                                |   2 +-
 tests/data/test2010                                |   2 +-
 tests/data/test2011                                |   2 +-
 tests/data/test2012                                |   2 +-
 tests/data/test2013                                |   2 +-
 tests/data/test2014                                |   2 +-
 tests/data/test2015                                |   2 +-
 tests/data/test2016                                |   2 +-
 tests/data/test2017                                |   2 +-
 tests/data/test2018                                |   2 +-
 tests/data/test2019                                |   2 +-
 tests/data/test202                                 |   2 +-
 tests/data/test2020                                |   2 +-
 tests/data/test2021                                |   2 +-
 tests/data/test2022                                |   2 +-
 tests/data/test204                                 |   2 +-
 tests/data/test2050                                |   3 +
 tests/data/test2055                                |   4 +-
 tests/data/test2058                                |   1 +
 tests/data/test2059                                |   1 +
 tests/data/test206                                 |   1 +
 tests/data/test2060                                |   1 +
 tests/data/test2071                                |   2 +-
 tests/data/test208                                 |   1 +
 tests/data/test209                                 |   1 +
 tests/data/test213                                 |   1 +
 tests/data/test217                                 |   3 +
 tests/data/test219                                 |   1 +
 tests/data/test231                                 |   2 +-
 tests/data/test233                                 |   3 +
 tests/data/test234                                 |   3 +
 tests/data/test239                                 |   1 +
 tests/data/test243                                 |   1 +
 tests/data/test244                                 |   2 +-
 tests/data/test256                                 |   3 +
 tests/data/test257                                 |   4 +-
 tests/data/test258                                 |   1 +
 tests/data/test259                                 |   1 +
 tests/data/test263                                 |   1 +
 tests/data/test264                                 |   3 +
 tests/data/test265                                 |   1 +
 tests/data/test275                                 |   3 +
 tests/data/test278                                 |   3 +
 tests/data/test279                                 |   3 +
 tests/data/test287                                 |   3 +
 tests/data/test288                                 |   2 +-
 tests/data/test299                                 |   1 +
 tests/data/test317                                 |   3 +
 tests/data/test318                                 |   3 +
 tests/data/test330                                 |   3 +
 tests/data/test331                                 |   3 +
 tests/data/test335                                 |   1 +
 tests/data/{test1225 => test336}                   |  31 +-
 tests/data/{test1225 => test337}                   |  31 +-
 tests/data/{test717 => test338}                    |  32 +-
 tests/data/test356                                 |   2 +-
 tests/data/test43                                  |   3 +
 tests/data/test5                                   |   3 +
 tests/data/test503                                 |   4 +-
 tests/data/test504                                 |   2 +
 tests/data/test506                                 | 118 ++--
 tests/data/test523                                 |   3 +
 tests/data/test539                                 |   2 +-
 tests/data/test540                                 |   1 +
 tests/data/test547                                 |   1 +
 tests/data/test548                                 |   1 +
 tests/data/test549                                 |   1 +
 tests/data/test550                                 |   1 +
 tests/data/test551                                 |   1 +
 tests/data/test555                                 |   1 +
 tests/data/test561                                 |   1 +
 tests/data/test563                                 |   4 +-
 tests/data/test564                                 |   3 +
 tests/data/test590                                 |   1 +
 tests/data/test62                                  |   4 +-
 tests/data/test63                                  |   3 +
 tests/data/test659                                 |   3 +
 tests/data/test661                                 |  73 +++
 tests/data/test662                                 |  78 +++
 tests/data/test663                                 |  82 +++
 tests/data/test702                                 |   1 +
 tests/data/test703                                 |   1 +
 tests/data/test704                                 |   5 +-
 tests/data/test705                                 |   5 +-
 tests/data/test714                                 |   1 +
 tests/data/test715                                 |   1 +
 tests/data/test716                                 |   1 +
 tests/data/test717                                 |   3 +
 tests/data/test79                                  |   1 +
 tests/data/test80                                  |   3 +
 tests/data/test81                                  |   1 +
 tests/data/test82                                  |   1 +
 tests/data/test83                                  |   3 +
 tests/data/test84                                  |   3 +
 tests/data/test85                                  |   3 +
 tests/data/test93                                  |   3 +
 tests/data/test94                                  |   1 +
 tests/data/test95                                  |   3 +
 tests/libtest/Makefile.inc                         |  11 +-
 tests/libtest/lib1156.c                            |   2 +-
 tests/libtest/lib1522.c                            |   2 +-
 tests/libtest/lib1560.c                            |  43 ++
 docs/examples/resolve.c => tests/libtest/lib1907.c |  52 +-
 tests/libtest/lib506.c                             |   3 +-
 tests/libtest/lib509.c                             |   2 +-
 tests/libtest/lib541.c                             |   2 +-
 tests/libtest/lib557.c                             |   2 +-
 tests/libtest/lib569.c                             |   2 +-
 tests/libtest/lib571.c                             |   2 +-
 tests/libtest/lib661.c                             | 150 +++++
 tests/manpage-scan.pl                              |   4 +-
 tests/runtests.pl                                  |   2 +-
 tests/server/.gitignore                            |   1 +
 tests/server/util.c                                |   2 +-
 tests/smbserver.py.in                              |   7 +-
 tests/unit/CMakeLists.txt                          |   1 +
 tests/unit/Makefile.inc                            |   6 +-
 tests/unit/README                                  |   6 +-
 tests/unit/unit1303.c                              |   6 +-
 tests/unit/unit1307.c                              |   2 +-
 tests/unit/unit1399.c                              |   4 +-
 tests/unit/unit1620.c                              |   4 +-
 tests/unit/unit1654.c                              |  13 +-
 tests/unit/unit1655.c                              | 113 ++++
 winbuild/Makefile.vc                               |  10 +
 winbuild/MakefileBuild.vc                          |  26 +-
 394 files changed, 4557 insertions(+), 2484 deletions(-)

diff --cc aux-gnurl/sed.sh
index 605a5eebc,000000000..97ad6cf05
mode 100755,000000..100755
--- a/aux-gnurl/sed.sh
+++ b/aux-gnurl/sed.sh
@@@ -1,31 -1,0 +1,35 @@@
 +#!/bin/sh
 +
++# TODO: convert to awk script.
++
 +S=$HOME/src/gnunet/gnurl
 +
- # /
- # find . -not -iwholename '*.git*' -not -iwholename '*sed.sh*' -type f 
-print0 | xargs -0 sed -i 's/<curl\/curl.h>/<gnurl\/curl.h>/g'
 +find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 
's/<curl\/curl.h>/<gnurl\/curl.h>/g'
 +echo "'curl/curl.h' -> 'gnurl/curl.h' ... [DONE]"
 +
- # docs/
 +cd $S/docs
- # find . -not -iwholename '*.git*' -not -iwholename '*sed.sh*' -type f 
-print0 | xargs -0 sed -i 's/TH curl_/TH gnurl_/g'
 +find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 
's/TH curl_/TH gnurl_/g'
 +echo "'TH curl_' -> 'TH gnurl_' ... [DONE]"
 +
 +find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 
's/TH CURL/TH GNURL/g'
 +echo "'TH CURL' -> 'TH GNURL' ... [DONE]"
 +
- 
- # find . -not -iwholename '*.git*' -not -iwholename '*sed.sh*' -type f 
-print0 | xargs -0 sed -i 's/libcurl Manual/libgnurl Manual/g'
 +find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 
's/libcurl Manual/libgnurl Manual/g'
 +echo "'libcurl Manual' -> 'libgnurl Manual' ... [DONE]"
 +
- # find . -not -iwholename '*.git*' -not -iwholename '*sed.sh*' -type f 
-print0 | xargs -0 sed -i 's/man3\/curl/man3\/gnurl/g'
 +find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed -i 
's/man3\/curl/man3\/gnurl/g'
 +echo "'man3/curl' -> 'man3/gnurl' ... [DONE]"
 +
 +# TODO: groff -> mdoc
 +# find . ! -path '*.git/*' ! -path '*sed.sh*' -type f -print0 | xargs -0 sed 
-i 's/.SH/.Sh/g'
 +
++awk '{ gsub("CURLOPT_","GNURLOPT_",$0); print $0}' libcurl/opts/Makefile.inc 
> libcurl/opts/Makefile.inc.tmp
++mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
++awk '{ gsub("CURLMOPT_","GNURLMOPT_",$0); print $0}' 
libcurl/opts/Makefile.inc > libcurl/opts/Makefile.inc.tmp
++mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
++awk '{ gsub("CURLINFO_","GNURLINFO_",$0); print $0}' 
libcurl/opts/Makefile.inc > libcurl/opts/Makefile.inc.tmp
++mv libcurl/opts/Makefile.inc.tmp libcurl/opts/Makefile.inc
++# docs/libcurl/opts/Makefile.inc
++echo "adjusted docs/libcurl/opts/Makefile.inc ..."
++
 +cd $S
diff --cc configure.ac
index a7585da9f,cb8f4943e..8b91b954a
--- a/configure.ac
+++ b/configure.ac
@@@ -4905,9 -4775,9 +4879,10 @@@ AC_MSG_NOTICE([Configured to build gnur
    Alt-svc:          ${curl_altsvc_msg}
    HTTP2:            ${curl_h2_msg}
    HTTP3:            ${curl_h3_msg}
+   ESNI:             ${curl_esni_msg}
    Protocols:        ${SUPPORT_PROTOCOLS}
    Features:         ${SUPPORT_FEATURES}
 +  valgrind tests:   ${valgrind_msg}
  ])
  if test -n "$experimental"; then
   cat >&2 << _EOF
diff --cc docs/libcurl/gnurl_multi_perform.3
index 836e9b580,000000000..f144babb4
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_multi_perform.3
+++ b/docs/libcurl/gnurl_multi_perform.3
@@@ -1,128 -1,0 +1,130 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 gnurl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libgnurl Manual"
 +.SH NAME
 +curl_multi_perform - reads/writes available data from each easy handle
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
 +.ad
 +.SH DESCRIPTION
 +This function handles transfers on all the added handles that need attention
 +in an non-blocking fashion.
 +
 +When an application has found out there's data available for the multi_handle
 +or a timeout has elapsed, the application should call this function to
 +read/write whatever there is to read or write right now etc.
 +\fIcurl_multi_perform(3)\fP returns as soon as the reads/writes are done. This
 +function does not require that there actually is any data available for
 +reading or that data can be written, it can be called just in case. It will
 +write the number of handles that still transfer data in the second argument's
 +integer-pointer.
 +
 +If the amount of \fIrunning_handles\fP is changed from the previous call (or
 +is less than the amount of easy handles you've added to the multi handle), you
 +know that there is one or more transfers less "running". You can then call
 +\fIcurl_multi_info_read(3)\fP to get information about each individual
 +completed transfer, and that returned info includes CURLcode and more. If an
 +added handle fails very quickly, it may never be counted as a running_handle.
++You could use \fIcurl_multi_info_read(3)\fP to track actual status of the
++added handles in that case.
 +
 +When \fIrunning_handles\fP is set to zero (0) on the return of this function,
 +there is no longer any transfers in progress.
 +.SH EXAMPLE
 +.nf
 +#ifdef _WIN32
 +#define SHORT_SLEEP Sleep(100)
 +#else
 +#define SHORT_SLEEP usleep(100000)
 +#endif
 +
 +fd_set fdread;
 +fd_set fdwrite;
 +fd_set fdexcep;
 +int maxfd = -1;
 +
 +long curl_timeo;
 +
 +curl_multi_timeout(multi_handle, &curl_timeo);
 +if(curl_timeo < 0)
 +  curl_timeo = 1000;
 +
 +timeout.tv_sec = curl_timeo / 1000;
 +timeout.tv_usec = (curl_timeo % 1000) * 1000;
 +
 +FD_ZERO(&fdread);
 +FD_ZERO(&fdwrite);
 +FD_ZERO(&fdexcep);
 +
 +/* get file descriptors from the transfers */
 +mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
 +
 +if(maxfd == -1) {
 +  SHORT_SLEEP;
 +  rc = 0;
 +}
 +else
 +  rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
 +
 +switch(rc) {
 +case -1:
 +  /* select error */
 +  break;
 +case 0:
 +default:
 +  /* timeout or readable/writable sockets */
 +  curl_multi_perform(multi_handle, &still_running);
 +  break;
 +}
 +
 +/* if there are still transfers, loop! */
 +.fi
 +.SH "RETURN VALUE"
 +CURLMcode type, general libcurl multi interface error code.
 +
 +Before version 7.20.0: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this
 +basically means that you should call \fIcurl_multi_perform(3)\fP again, before
 +you select() on more actions. You don't have to do it immediately, but the
 +return code means that libcurl may have more data available to return or that
 +there may be more data to send off before it is "satisfied". Do note that
 +\fIcurl_multi_perform(3)\fP will return \fICURLM_CALL_MULTI_PERFORM\fP only
 +when it wants to be called again \fBimmediately\fP. When things are fine and
 +there is nothing immediate it wants done, it'll return \fICURLM_OK\fP and you
 +need to wait for \&"action" and then call this function again.
 +
 +This function only returns errors etc regarding the whole multi stack.
 +Problems still might have occurred on individual transfers even when this
 +function returns \fICURLM_OK\fP. Use \fIcurl_multi_info_read(3)\fP to figure
 +out how individual transfers did.
 +.SH "TYPICAL USAGE"
 +Most applications will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
 +file descriptors, and \fIcurl_multi_timeout(3)\fP to get a suitable timeout
 +period, then it'll wait for action on the file descriptors using
 +\fBselect(3)\fP. As soon as one or more file descriptor is ready,
 +\fIcurl_multi_perform(3)\fP gets called.
 +.SH "SEE ALSO"
 +.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
 +.BR curl_multi_wait "(3), "
 +.BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
 +.BR libcurl-errors "(3)"
diff --cc docs/libcurl/gnurl_multi_setopt.3
index 71b976236,000000000..dd141be0c
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_multi_setopt.3
+++ b/docs/libcurl/gnurl_multi_setopt.3
@@@ -1,78 -1,0 +1,80 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 gnurl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libgnurl Manual"
 +.SH NAME
 +curl_multi_setopt \- set options for a curl multi handle
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
 +.SH DESCRIPTION
 +\fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
 +behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
 +can change libcurl's behaviour when using that multi handle.  All options are
 +set with the \fIoption\fP followed by the parameter \fIparam\fP. That
 +parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
 +pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
 +expects. Read this manual carefully as bad input values may cause libcurl to
 +behave badly!  You can only set one option in each function call.
 +
 +.SH OPTIONS
 +.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
 +See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
 +.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
 +See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
 +.IP CURLMOPT_MAX_HOST_CONNECTIONS
 +See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
 +.IP CURLMOPT_MAX_PIPELINE_LENGTH
 +See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
 +.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
 +See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
 +.IP CURLMOPT_MAXCONNECTS
 +See \fICURLMOPT_MAXCONNECTS(3)\fP
 +.IP CURLMOPT_PIPELINING
 +See \fICURLMOPT_PIPELINING(3)\fP
 +.IP CURLMOPT_PIPELINING_SITE_BL
 +See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
 +.IP CURLMOPT_PIPELINING_SERVER_BL
 +See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
 +.IP CURLMOPT_PUSHFUNCTION
 +See \fICURLMOPT_PUSHFUNCTION(3)\fP
 +.IP CURLMOPT_PUSHDATA
 +See \fICURLMOPT_PUSHDATA(3)\fP
 +.IP CURLMOPT_SOCKETFUNCTION
 +See \fICURLMOPT_SOCKETFUNCTION(3)\fP
 +.IP CURLMOPT_SOCKETDATA
 +See \fICURLMOPT_SOCKETDATA(3)\fP
 +.IP CURLMOPT_TIMERFUNCTION
 +See \fICURLMOPT_TIMERFUNCTION(3)\fP
 +.IP CURLMOPT_TIMERDATA
 +See \fICURLMOPT_TIMERDATA(3)\fP
++.IP CURLMOPT_MAX_CONCURRENT_STREAMS
++See \fICURLMOPT_MAX_CONCURRENT_STREAMS(3)\fP
 +.SH RETURNS
 +The standard CURLMcode for multi interface error codes. Note that it returns a
 +CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
 +doesn't know of.
 +.SH AVAILABILITY
 +This function was added in libcurl 7.15.4.
 +.SH "SEE ALSO"
 +.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
 +.BR curl_multi_socket "(3), " curl_multi_info_read "(3)"
diff --cc docs/libcurl/gnurl_multi_wait.3
index d91481ab7,000000000..34d7c0411
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_multi_wait.3
+++ b/docs/libcurl/gnurl_multi_wait.3
@@@ -1,122 -1,0 +1,122 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 gnurl_multi_wait 3 "12 Jul 2012" "libcurl 7.28.0" "libgnurl Manual"
 +.SH NAME
 +curl_multi_wait - polls on all easy handles in a multi handle
 +.SH SYNOPSIS
 +.nf
 +#include <gnurl/curl.h>
 +
 +CURLMcode curl_multi_wait(CURLM *multi_handle,
 +                          struct curl_waitfd extra_fds[],
 +                          unsigned int extra_nfds,
 +                          int timeout_ms,
 +                          int *numfds);
 +.ad
 +.SH DESCRIPTION
 +\fIcurl_multi_wait(3)\fP polls all file descriptors used by the curl easy
 +handles contained in the given multi handle set.  It will block until activity
 +is detected on at least one of the handles or \fItimeout_ms\fP has passed.
 +Alternatively, if the multi handle has a pending internal timeout that has a
 +shorter expiry time than \fItimeout_ms\fP, that shorter time will be used
 +instead to make sure timeout accuracy is reasonably kept.
 +
 +The calling application may pass additional curl_waitfd structures which are
 +similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call.
 +
 +On completion, if \fInumfds\fP is non-NULL, it will be populated with the
 +total number of file descriptors on which interesting events occurred. This
 +number can include both libcurl internal descriptors as well as descriptors
 +provided in \fIextra_fds\fP.
 +
 +If no extra file descriptors are provided and libcurl has no file descriptor
 +to offer to wait for, this function will return immediately.
 +
 +This function is encouraged to be used instead of select(3) when using the
 +multi interface to allow applications to easier circumvent the common problem
 +with 1024 maximum file descriptors.
 +.SH curl_waitfd
 +.nf
 +struct curl_waitfd {
 +  curl_socket_t fd;
 +  short events;
 +  short revents;
 +};
 +.fi
 +.IP CURL_WAIT_POLLIN
 +Bit flag to curl_waitfd.events indicating the socket should poll on read
 +events such as new data received.
 +.IP CURL_WAIT_POLLPRI
 +Bit flag to curl_waitfd.events indicating the socket should poll on high
 +priority read events such as out of band data.
 +.IP CURL_WAIT_POLLOUT
 +Bit flag to curl_waitfd.events indicating the socket should poll on write
 +events such as the socket being clear to write without blocking.
 +.SH EXAMPLE
 +.nf
 +CURL *easy_handle;
 +CURLM *multi_handle;
 +
 +/* add the individual easy handle */
 +curl_multi_add_handle(multi_handle, easy_handle);
 +
 +do {
 +  CURLMcode mc;
 +  int numfds;
 +
 +  mc = curl_multi_perform(multi_handle, &still_running);
 +
 +  if(mc == CURLM_OK ) {
 +    /* wait for activity, timeout or "nothing" */
 +    mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
 +  }
 +
 +  if(mc != CURLM_OK) {
 +    fprintf(stderr, "curl_multi failed, code %d.\\n", mc);
 +    break;
 +  }
 +
 +  /* 'numfds' being zero means either a timeout or no file descriptors to
 +     wait for. Try timeout on first occurrence, then assume no file
 +     descriptors and no file descriptors to wait for means wait for 100
 +     milliseconds. */
 +
 +  if(!numfds) {
 +    repeats++; /* count number of repeated zero numfds */
 +    if(repeats > 1) {
 +      WAITMS(100); /* sleep 100 milliseconds */
 +    }
 +  }
 +  else
 +    repeats = 0;
 +
 +} while(still_running);
 +
 +curl_multi_remove_handle(multi_handle, easy_handle);
 +.fi
 +.SH RETURN VALUE
 +CURLMcode type, general libcurl multi interface error code. See
 +\fIlibcurl-errors(3)\fP
 +.SH AVAILABILITY
 +This function was added in libcurl 7.28.0.
 +.SH "SEE ALSO"
 +.BR curl_multi_fdset "(3), " curl_multi_perform "(3)"
diff --cc docs/libcurl/gnurl_url_get.3
index 7bbc0a09b,000000000..20edd1427
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_url_get.3
+++ b/docs/libcurl/gnurl_url_get.3
@@@ -1,114 -1,0 +1,115 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2019, 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 gnurl_url_get 3 "6 Aug 2018" "libcurl" "libgnurl Manual"
 +.SH NAME
 +curl_url_get - extract a part from a URL
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +
 +.nf
 +CURLUcode curl_url_get(CURLU *url,
 +                       CURLUPart what,
 +                       char **part,
 +                       unsigned int flags)
 +.fi
 +.SH DESCRIPTION
 +Given the \fIurl\fP handle of an already parsed URL, this function lets the
 +user extract individual pieces from it.
 +
 +The \fIwhat\fP argument should be the particular part to extract (see list
 +below) and \fIpart\fP points to a 'char *' to get updated to point to a newly
 +allocated string with the contents.
 +
 +The \fIflags\fP argument is a bitmask with individual features.
 +
 +The returned part pointer must be freed with \fIcurl_free(3)\fP after use.
 +.SH FLAGS
 +The flags argument is zero, one or more bits set in a bitmask.
 +.IP CURLU_DEFAULT_PORT
 +If the handle has no port stored, this option will make \fIcurl_url_get(3)\fP
 +return the default port for the used scheme.
 +.IP CURLU_DEFAULT_SCHEME
 +If the handle has no scheme stored, this option will make
 +\fIcurl_url_get(3)\fP return the default scheme instead of error.
 +.IP CURLU_NO_DEFAULT_PORT
 +Instructs \fIcurl_url_get(3)\fP to not return a port number if it matches the
 +default port for the scheme.
 +.IP CURLU_URLDECODE
 +Asks \fIcurl_url_get(3)\fP to URL decode the contents before returning it. It
 +will not attempt to decode the scheme, the port number or the full URL.
 +
 +The query component will also get plus-to-space conversion as a bonus when
 +this bit is set.
 +
 +Note that this URL decoding is charset unaware and you will get a zero
 +terminated string back with data that could be intended for a particular
 +encoding.
 +
 +If there's any byte values lower than 32 in the decoded string, the get
 +operation will return an error instead.
 +.SH PARTS
 +.IP CURLUPART_URL
 +When asked to return the full URL, \fIcurl_url_get(3)\fP will return a
 +normalized and possibly cleaned up version of what was previously parsed.
 +.IP CURLUPART_SCHEME
 +Scheme cannot be URL decoded on get.
 +.IP CURLUPART_USER
 +.IP CURLUPART_PASSWORD
 +.IP CURLUPART_OPTIONS
 +.IP CURLUPART_HOST
- If the host part is an IPv6 numeric address, the zoneid will not be part of
- the extracted host but is provided separately in \fICURLUPART_ZONEID\fP.
++The host name. If it is an IPv6 numeric address, the zoneid will not be part
++of it but is provided separately in \fICURLUPART_ZONEID\fP. IPv6 numerical
++addresses are returned within brackets ([]).
 +.IP CURLUPART_ZONEID
 +If the host name is a numeric IPv6 address, this field might also be set.
 +.IP CURLUPART_PORT
 +Port cannot be URL decoded on get.
 +.IP CURLUPART_PATH
 +.IP CURLUPART_QUERY
 +The query part will also get pluses converted to space when asked to URL
 +decode on get with the CURLU_URLDECODE bit.
 +.IP CURLUPART_FRAGMENT
 +.SH RETURN VALUE
 +Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went
 +fine.
 +
 +If this function returns an error, no URL part is returned.
 +.SH EXAMPLE
 +.nf
 +  CURLUcode rc;
 +  CURLU *url = curl_url();
 +  rc = curl_url_set(url, CURLUPART_URL, "https://example.com";, 0);
 +  if(!rc) {
 +    char *scheme;
 +    rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0);
 +    if(!rc) {
 +      printf("the scheme is %s\\n", scheme);
 +      curl_free(scheme);
 +    }
 +    curl_url_cleanup(url);
 +  }
 +.fi
 +.SH AVAILABILITY
 +Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0.
 +.SH "SEE ALSO"
 +.BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_set "(3), "
 +.BR curl_url_dup "(3), "
diff --cc docs/libcurl/gnurl_url_set.3
index cbeff1b2c,000000000..5ef5cf34c
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_url_set.3
+++ b/docs/libcurl/gnurl_url_set.3
@@@ -1,135 -1,0 +1,142 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2019, 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 gnurl_url_set 3 "6 Aug 2018" "libcurl" "libgnurl Manual"
 +.SH NAME
 +curl_url_set - set a URL part
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +
 +CURLUcode curl_url_set(CURLU *url,
 +                       CURLUPart part,
 +                       const char *content,
 +                       unsigned int flags)
 +.fi
 +.SH DESCRIPTION
 +Given the \fIurl\fP handle of an already parsed URL, this function lets the
 +user set/update individual pieces of it.
 +
 +The \fIpart\fP argument should identify the particular URL part (see list
 +below) to set or change, with \fIcontent\fP pointing to a zero terminated
 +string with the new contents for that URL part. The contents should be in the
 +form and encoding they'd use in a URL: URL encoded.
 +
 +Setting a part to a NULL pointer will effectively remove that part's contents
 +from the CURLU handle.
 +
 +The \fIflags\fP argument is a bitmask with independent features.
 +.SH PARTS
 +.IP CURLUPART_URL
 +Allows the full URL of the handle to be replaced. If the handle already is
 +populated with a URL, the new URL can be relative to the previous.
 +
 +When successfully setting a new URL, relative or absolute, the handle contents
 +will be replaced with the information of the newly set URL.
 +
 +Pass a pointer to a zero terminated string to the \fIurl\fP parameter. The
 +string must point to a correctly formatted "RFC 3986+" URL or be a NULL
 +pointer.
 +.IP CURLUPART_SCHEME
 +Scheme cannot be URL decoded on set.
 +.IP CURLUPART_USER
 +.IP CURLUPART_PASSWORD
 +.IP CURLUPART_OPTIONS
 +.IP CURLUPART_HOST
- The host name can use IDNA. The string must then be encoded as your locale
- says or UTF-8 (when winidn is used).
++The host name. If it is IDNA the string must then be encoded as your locale
++says or UTF-8 (when WinIDN is used). If it is a bracketed IPv6 numeric address
++it may contain a zone id (or you can use CURLUPART_ZONEID).
 +.IP CURLUPART_ZONEID
 +If the host name is a numeric IPv6 address, this field can also be set.
 +.IP CURLUPART_PORT
 +Port cannot be URL encoded on set. The given port number is provided as a
 +string and the decimal number must be between 1 and 65535. Anything else will
 +return an error.
 +.IP CURLUPART_PATH
 +If a path is set in the URL without a leading slash, a slash will be inserted
 +automatically when this URL is read from the handle.
 +.IP CURLUPART_QUERY
 +The query part will also get spaces converted to pluses when asked to URL
 +encode on set with the CURLU_URLENCODE bit.
 +
 +If used together with the \fICURLU_APPENDQUERY\fP bit, the provided part will
 +be appended on the end of the existing query - and if the previous part didn't
 +end with an ampersand (&), an ampersand will be inserted before the new
 +appended part.
 +
 +When \fICURLU_APPENDQUERY\fP is used together with \fICURLU_URLENCODE\fP, the
 +first '=' symbol will not be URL encoded.
 +
 +The question mark in the URL is not part of the actual query contents.
 +.IP CURLUPART_FRAGMENT
 +The hash sign in the URL is not part of the actual fragment contents.
 +.SH FLAGS
 +The flags argument is zero, one or more bits set in a bitmask.
 +.IP CURLU_NON_SUPPORT_SCHEME
 +If set, allows \fIcurl_url_set(3)\fP to set a non-supported scheme.
 +.IP CURLU_URLENCODE
 +When set, \fIcurl_url_set(3)\fP URL encodes the part on entry, except for
 +scheme, port and URL.
 +
 +When setting the path component with URL encoding enabled, the slash character
 +will be skipped.
 +
 +The query part gets space-to-plus conversion before the URL conversion.
 +
 +This URL encoding is charset unaware and will convert the input on a
 +byte-by-byte manner.
 +.IP CURLU_DEFAULT_SCHEME
 +If set, will make libcurl allow the URL to be set without a scheme and then
 +sets that to the default scheme: HTTPS. Overrides the \fICURLU_GUESS_SCHEME\fP
 +option if both are set.
 +.IP CURLU_GUESS_SCHEME
 +If set, will make libcurl allow the URL to be set without a scheme and it
 +instead "guesses" which scheme that was intended based on the host name.  If
 +the outermost sub-domain name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then
 +that scheme will be used, otherwise it picks HTTP. Conflicts with the
 +\fICURLU_DEFAULT_SCHEME\fP option which takes precedence if both are set.
++.IP CURLU_NO_AUTHORITY
++If set, skips authority checks. The RFC allows individual schemes to omit the
++host part (normally the only mandatory part of the authority), but libcurl
++cannot know whether this is permitted for custom schemes. Specifying the flag
++permits empty authority sections, similar to how file scheme is handled.
++
 +.SH RETURN VALUE
 +Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went
 +fine.
 +
 +If this function returns an error, no URL part is returned.
 +.SH EXAMPLE
 +.nf
 +  CURLUcode rc;
 +  CURLU *url = curl_url();
 +  rc = curl_url_set(url, CURLUPART_URL, "https://example.com";, 0);
 +  if(!rc) {
 +    char *scheme;
 +    /* change it to an FTP URL */
 +    rc = curl_url_set(url, CURLUPART_SCHEME, "ftp", 0);
 +  }
 +  curl_url_cleanup(url);
 +.fi
 +.SH AVAILABILITY
 +Added in curl 7.62.0. CURLUPART_ZONEID was added in 7.65.0.
 +.SH "SEE ALSO"
 +.BR curl_url_cleanup "(3), " curl_url "(3), " curl_url_get "(3), "
 +.BR curl_url_dup "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_CURLU.3
index bdcb05544,000000000..4721ed6ac
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_CURLU.3
+++ b/docs/libcurl/opts/GNURLOPT_CURLU.3
@@@ -1,69 -1,0 +1,69 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_CURLU 3 "28 Oct 2018" "libcurl 7.63.0" "curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_CURLU \- set URL with CURLU *
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CURLU, void *pointer);
 +.SH DESCRIPTION
 +Pass in a pointer to the \fIURL\fP to work with. The parameter should be a
 +CURLU *. Setting \fICURLOPT_CURLU(3)\fP will explicitly override
 +\fICURLOPT_URL(3)\fP.
 +
 +\fICURLOPT_URL(3)\fP or \fICURLOPT_CURLU(3)\fP \fBmust\fP be set before a
 +transfer is started.
 +
 +libcurl will use this handle and its contents read-only and will not change
 +its contents. An application can very well update the contents of the URL
 +handle after a transfer is done and if the same handle is then used in a
 +subsequent request the updated contents will then be used.
 +.SH DEFAULT
 +The default value of this parameter is NULL.
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *handle = curl_easy_init();
 +CURLU *urlp = curl_url();
 +int res = 0;
 +if(curl) {
 +
 +  res = curl_url_set(urlp, CURLUPART_URL, "http://example.com";, 0);
 +
 +  curl_easy_setopt(handle, CURLOPT_CURLU, urlp);
 +
 +  ret = curl_easy_perform(handle);
 +
 +  curl_url_cleanup(urlp);
 +  curl_easy_cleanup(handle);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.63.0.
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_URL "(3), "
 +.BR curl_url "(3), " curl_url_get "(3), " curl_url_set "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_FOLLOWLOCATION.3
index 2b6372bd3,000000000..bb64da48c
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_FOLLOWLOCATION.3
+++ b/docs/libcurl/opts/GNURLOPT_FOLLOWLOCATION.3
@@@ -1,81 -1,0 +1,81 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_FOLLOWLOCATION 3 "17 Jun 2014" "libcurl 7.37.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
 +.SH DESCRIPTION
 +A long parameter set to 1 tells the library to follow any Location: header
 +that the server sends as part of an HTTP header in a 3xx response. The
 +Location: header can specify a relative or an absolute URL to follow.
 +
 +libcurl will issue another request for the new URL and follow new Location:
 +headers all the way until no more such headers are returned.
 +\fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of redirects
 +libcurl will follow.
 +
 +libcurl limits what protocols it automatically follows to. The accepted
 +protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP. By default libcurl
 +will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2). Older versions of
 +libcurl allowed all protocols on redirect except those disabled for security
 +reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0 SMB and SMBS
 +are also disabled.
 +
 +When following a Location:, the 3xx response code that redirected it also
 +dictates which request method it will use in the subsequent request: For 301,
 +302 and 303 responses libcurl will switch method to GET unless
 +\fICURLOPT_POSTREDIR(3)\fP instructs libcurl otherwise. All other 3xx codes
 +will make libcurl send the same method again.
 +
 +For users who think the existing location following is too naive, too simple
 +or just lacks features, it is very easy to instead implement your own redirect
 +follow logic with the use of \fIcurl_easy_getinfo(3)\fP's
 +\fICURLINFO_REDIRECT_URL(3)\fP option instead of using
 +\fICURLOPT_FOLLOWLOCATION(3)\fP.
 +.SH DEFAULT
 +0, disabled
 +.SH PROTOCOLS
 +HTTP(S)
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +
 +  /* example.com is redirected, so we tell libcurl to follow redirection */
 +  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 +
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Along with HTTP
 +.SH RETURN VALUE
 +Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), "
 +.BR CURLOPT_POSTREDIR "(3), "
 +.BR CURLINFO_REDIRECT_URL "(3), " CURLINFO_REDIRECT_COUNT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
index 5a569fef9,000000000..be9cb99b6
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_HEADERFUNCTION.3
@@@ -1,117 -1,0 +1,117 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_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 \fInitems\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.
 +
 +A complete HTTP header that is passed to this function can be up to
 +\fICURL_MAX_HTTP_HEADER\fP (100K) bytes and includes the final line 
terminator.
 +
 +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.
 +
 +For an HTTP transfer, the status line and the blank line preceding the 
response
 +body are both included as headers and passed to this function.
 +
 +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_HEADEROPT.3
index eaea05dff,000000000..1171657fd
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_HEADEROPT.3
+++ b/docs/libcurl/opts/GNURLOPT_HEADEROPT.3
@@@ -1,76 -1,0 +1,76 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_HEADEROPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_HEADEROPT \- set how to send HTTP headers
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask);
 +.SH DESCRIPTION
 +Pass a long that is a bitmask of options of how to deal with headers. The two
 +mutually exclusive options are:
 +
 +\fBCURLHEADER_UNIFIED\fP - the headers specified in
 +\fICURLOPT_HTTPHEADER(3)\fP will be used in requests both to servers and
 +proxies. With this option enabled, \fICURLOPT_PROXYHEADER(3)\fP will not have
 +any effect.
 +
 +\fBCURLHEADER_SEPARATE\fP - makes \fICURLOPT_HTTPHEADER(3)\fP headers only get
 +sent to a server and not to a proxy. Proxy headers must be set with
 +\fICURLOPT_PROXYHEADER(3)\fP to get used. Note that if a non-CONNECT request
 +is sent to a proxy, libcurl will send both server headers and proxy
 +headers. When doing CONNECT, libcurl will send \fICURLOPT_PROXYHEADER(3)\fP
 +headers only to the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to
 +the server.
 +.SH DEFAULT
 +CURLHEADER_SEPARATE (changed in 7.42.1, used CURLHEADER_UNIFIED before then)
 +.SH PROTOCOLS
 +HTTP
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  CURLcode ret;
 +  struct curl_slist *list;
 +  list = curl_slist_append(NULL, "Shoesize: 10");
 +  list = curl_slist_append(list, "Accept:");
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/";);
 +  curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080";);
 +  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
 +
 +  /* HTTPS over a proxy makes a separate CONNECT to the proxy, so tell
 +     libcurl to not send the custom headers to the proxy. Keep them
 +     separate! */
 +  curl_easy_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE);
 +  ret = curl_easy_perform(curl);
 +  curl_slist_free_all(list);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.37.0
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_PROXYHEADER "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_HTTP_VERSION.3
index 260363e16,000000000..2782e69a2
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_HTTP_VERSION.3
+++ b/docs/libcurl/opts/GNURLOPT_HTTP_VERSION.3
@@@ -1,93 -1,0 +1,93 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_HTTP_VERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
 +.SH DESCRIPTION
 +Pass \fIversion\fP a long, set to one of the values described below. They ask
 +libcurl to use the specific HTTP versions.
 +
 +Note that the HTTP version is just a request. libcurl will still prioritize to
 +re-use an existing connection so it might then re-use a connection using a
 +HTTP version you haven't asked for.
 +
 +.IP CURL_HTTP_VERSION_NONE
 +We don't care about what version the library uses. libcurl will use whatever
 +it thinks fit.
 +.IP CURL_HTTP_VERSION_1_0
 +Enforce HTTP 1.0 requests.
 +.IP CURL_HTTP_VERSION_1_1
 +Enforce HTTP 1.1 requests.
 +.IP CURL_HTTP_VERSION_2_0
 +Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.1 if HTTP 2 can't be
 +negotiated with the server. (Added in 7.33.0)
 +
 +The alias \fICURL_HTTP_VERSION_2\fP was added in 7.43.0 to better reflect the
 +actual protocol name.
 +.IP CURL_HTTP_VERSION_2TLS
 +Attempt HTTP 2 over TLS (HTTPS) only. libcurl will fall back to HTTP 1.1 if
 +HTTP 2 can't be negotiated with the HTTPS server. For clear text HTTP servers,
 +libcurl will use 1.1. (Added in 7.47.0)
 +.IP CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
 +Issue non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires
 +prior knowledge that the server supports HTTP/2 straight away. HTTPS requests
 +will still do HTTP/2 the standard way with negotiated protocol version in the
 +TLS handshake. (Added in 7.49.0)
 +.IP CURL_HTTP_VERSION_3
 +(Added in 7.66.0) Setting this value will make libcurl attempt to use HTTP/3
 +directly to server given in the URL. Note that this cannot gracefully
 +downgrade to earlier HTTP version if the server doesn't support HTTP/3.
 +
- For more reliably upgrading to HTTP/3, set the prefered version to something
++For more reliably upgrading to HTTP/3, set the preferred version to something
 +lower and let the server announce its HTTP/3 support via Alt-Svc:. See
 +\fICURLOPT_ALTSVC(3)\fP.
 +.SH DEFAULT
 +Since curl 7.62.0: CURL_HTTP_VERSION_2TLS
 +
 +Before that: CURL_HTTP_VERSION_1_1
 +.SH PROTOCOLS
 +HTTP
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  CURLcode ret;
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/";);
 +  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
 +  ret = curl_easy_perform(curl);
 +  if(ret == CURLE_HTTP_RETURNED_ERROR) {
 +    /* an HTTP response error problem */
 +  }
 +}
 +.fi
 +.SH AVAILABILITY
 +Along with HTTP
 +.SH RETURN VALUE
 +Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "
 +.BR CURLOPT_HTTP09_ALLOWED "(3), " CURLOPT_ALTSVC "(3) "
diff --cc docs/libcurl/opts/GNURLOPT_LOCALPORT.3
index 1a8be59fc,000000000..3376873e8
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_LOCALPORT.3
+++ b/docs/libcurl/opts/GNURLOPT_LOCALPORT.3
@@@ -1,56 -1,0 +1,56 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_LOCALPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_LOCALPORT \- set local port number to use for socket
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORT, long port);
 +.SH DESCRIPTION
 +Pass a long. This sets the local port number of the socket used for the
 +connection. This can be used in combination with \fICURLOPT_INTERFACE(3)\fP
 +and you are recommended to use \fICURLOPT_LOCALPORTRANGE(3)\fP as well when
 +this option is set. Valid port numbers are 1 - 65535.
 +.SH DEFAULT
 +0, disabled - use whatever the system thinks is fine
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin";);
 +  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
 +  /* and try 20 more ports following that */
 +  curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
 +  ret = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.15.2
 +.SH RETURN VALUE
 +Returns CURLE_OK
 +.SH "SEE ALSO"
 +.BR CURLOPT_LOCALPORTRANGE "(3), " CURLOPT_INTERFACE "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_LOCALPORTRANGE.3
index 4d3b98ff0,000000000..20aa156ad
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_LOCALPORTRANGE.3
+++ b/docs/libcurl/opts/GNURLOPT_LOCALPORTRANGE.3
@@@ -1,60 -1,0 +1,60 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_LOCALPORTRANGE 3 "19 Jun 2014" "libcurl 7.37.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORTRANGE,
 +                          long range);
 +.SH DESCRIPTION
 +Pass a long. The \fIrange\fP argument is the number of attempts libcurl will
 +make to find a working local port number. It starts with the given
 +\fICURLOPT_LOCALPORT(3)\fP and adds one to the number for each retry. Setting
 +this option to 1 or below will make libcurl do only one try for the exact port
 +number. Port numbers by nature are scarce resources that will be busy at times
 +so setting this value to something too low might cause unnecessary connection
 +setup failures.
 +.SH DEFAULT
 +1
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin";);
 +  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
 +  /* and try 20 more ports following that */
 +  curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
 +  ret = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.15.2
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_LOCALPORT "(3), " CURLOPT_INTERFACE "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3
index e09364277,000000000..7d3b0f5aa
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3
+++ b/docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3
@@@ -1,100 -1,0 +1,100 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, 2018, Daniel Stenberg, <address@hidden>, et 
al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_PROXY_SSLVERSION 3 "16 Nov 2016" "libcurl 7.52.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long 
version);
 +.SH DESCRIPTION
 +Pass a long as parameter to control which version of SSL/TLS to attempt to use
 +when connecting to an HTTPS proxy.
 +
 +Use one of the available defines for this purpose. The available options are:
 +.RS
 +.IP CURL_SSLVERSION_DEFAULT
 +The default action. This will attempt to figure out the remote SSL protocol
 +version.
 +.IP CURL_SSLVERSION_TLSv1
 +TLSv1.x
 +.IP CURL_SSLVERSION_TLSv1_0
 +TLSv1.0
 +.IP CURL_SSLVERSION_TLSv1_1
 +TLSv1.1
 +.IP CURL_SSLVERSION_TLSv1_2
 +TLSv1.2
 +.IP CURL_SSLVERSION_TLSv1_3
 +TLSv1.3
 +.RE
 +The maximum TLS version can be set by using \fIone\fP of the
 +CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
 +CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
 +The MAX macros are not supported for WolfSSL.
 +.RS
 +.IP CURL_SSLVERSION_MAX_DEFAULT
 +The flag defines the maximum supported TLS version as TLSv1.2, or the default
 +value from the SSL library.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_0
 +The flag defines maximum supported TLS version as TLSv1.0.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_1
 +The flag defines maximum supported TLS version as TLSv1.1.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_2
 +The flag defines maximum supported TLS version as TLSv1.2.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_3
 +The flag defines maximum supported TLS version as TLSv1.3.
 +(Added in 7.54.0)
 +.RE
 +
 +In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were
 +documented to allow \fIonly\fP the specified TLS version, but behavior was
 +inconsistent depending on the TLS library.
 +
 +.SH DEFAULT
 +CURL_SSLVERSION_DEFAULT
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com";);
 +
 +  /* ask libcurl to use TLS version 1.0 or later */
 +  curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
 +
 +  /* Perform the request */
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.52.0
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
 +.BR CURLOPT_IPRESOLVE "(3) " CURLOPT_SSLVERSION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_PROXY_TLS13_CIPHERS.3
index 6e9918c8e,000000000..38b363ab7
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_PROXY_TLS13_CIPHERS.3
+++ b/docs/libcurl/opts/GNURLOPT_PROXY_TLS13_CIPHERS.3
@@@ -1,69 -1,0 +1,69 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_PROXY_TLS13_CIPHERS 3 "25 May 2018" "libcurl 7.61.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_PROXY_TLS13_CIPHERS \- ciphers suites for proxy TLS 1.3
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLS13_CIPHERS, char 
*list);
 +.SH DESCRIPTION
 +Pass a char *, pointing to a zero terminated string holding the list of cipher
 +suites to use for the TLS 1.3 connection to a proxy. The list must be
 +syntactically correct, it consists of one or more cipher suite strings
 +separated by colons.
 +
 +You'll find more details about cipher lists on this URL:
 +
 + https://curl.haxx.se/docs/ssl-ciphers.html
 +
 +This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 +later. If you are using a different SSL backend you can try setting TLS 1.3
 +cipher suites by using the CURLOPT_PROXY_SSL_CIPHER_LIST option.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH DEFAULT
 +NULL, use internal default
 +.SH PROTOCOLS
 +All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/";);
 +  curl_easy_setopt(curl, CURLOPT_PROXY_TLS13_CIPHERS,
 +                   "TLS13-CHACHA20-POLY1305-SHA256");
 +  ret = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.61.0.
 +Available when built with OpenSSL >= 1.1.1.
 +.SH RETURN VALUE
 +Returns CURLE_OK if supported, CURLE_NOT_BUILT_IN otherwise.
 +.SH "SEE ALSO"
 +.BR CURLOPT_PROXY_SSL_CIPHER_LIST "(3), " CURLOPT_PROXY_SSLVERSION "(3), "
 +.BR CURLOPT_SSL_CIPHER_LIST "(3), " CURLOPT_TLS13_CIPHERS "(3), "
 +.BR CURLOPT_SSLVERSION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_RANGE.3
index dcfbd58a8,000000000..4311ad1e9
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_RANGE.3
+++ b/docs/libcurl/opts/GNURLOPT_RANGE.3
@@@ -1,81 -1,0 +1,81 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_RANGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_RANGE \- set byte range to request
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);
 +.SH DESCRIPTION
 +Pass a char * as parameter, which should contain the specified range you want
 +to retrieve. It should be in the format "X-Y", where either X or Y may be left
 +out and X and Y are byte indexes.
 +
 +HTTP transfers also support several intervals, separated with commas as in
 +\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
 +server to send the response document in pieces (using standard MIME separation
 +techniques). Unfortunately, the HTTP standard (RFC 7233 section 3.1) allows
 +servers to ignore range requests so even when you set \fICURLOPT_RANGE(3)\fP
 +for a request, you may end up getting the full response sent back.
 +
 +For RTSP, the formatting of a range should follow RFC2326 Section 12.29. For
 +RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should be given in
 +npt, utc, or smpte formats.
 +
 +For HTTP PUT uploads this option should not be used, since it may conflict 
with
 +other options. If you need to upload arbitrary parts of a file (like for
 +Amazon's web services) support is limited. We suggest set resume position 
using
 +\fICURLOPT_RESUME_FROM(3)\fP, set end (resume+size) position using
 +\fICURLOPT_INFILESIZE(3)\fP and seek to the resume position before initiating
 +the transfer for each part. For more information refer to
 +https://curl.haxx.se/mail/lib-2019-05/0012.html
 +
 +Pass a NULL to this option to disable the use of ranges.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH DEFAULT
 +NULL
 +.SH PROTOCOLS
 +HTTP, FTP, FILE, RTSP and SFTP.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +
 +  /* get the first 200 bytes */
 +  curl_easy_setopt(curl, CURLOPT_RANGE, "0-199");
 +
 +  /* Perform the request */
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +FILE since 7.18.0, RTSP since 7.20.0
 +.SH RETURN VALUE
 +Returns CURLE_OK on success or
 +CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 +.SH "SEE ALSO"
 +.BR CURLOPT_RESUME_FROM "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_REDIR_PROTOCOLS.3
index 3606b9379,000000000..b1b4fdda0
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_REDIR_PROTOCOLS.3
+++ b/docs/libcurl/opts/GNURLOPT_REDIR_PROTOCOLS.3
@@@ -1,101 -1,0 +1,101 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_REDIR_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long 
bitmask);
 +.SH DESCRIPTION
 +Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
 +limits what protocols libcurl may use in a transfer that it follows to in a
 +redirect when \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. This allows you to
 +limit specific transfers to only be allowed to use a subset of protocols in
 +redirections.
 +
 +Protocols denied by \fICURLOPT_PROTOCOLS(3)\fP are not overridden by this
 +option.
 +
 +By default libcurl will allow HTTP, HTTPS, FTP and FTPS on redirect (7.65.2).
 +Older versions of libcurl allowed all protocols on redirect except several
 +disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and
 +since 7.40.0 SMB and SMBS are also disabled. \fICURLPROTO_ALL\fP enables all
 +protocols on redirect, including those disabled for security.
 +
 +These are the available protocol defines:
 +.nf
 +CURLPROTO_DICT
 +CURLPROTO_FILE
 +CURLPROTO_FTP
 +CURLPROTO_FTPS
 +CURLPROTO_GOPHER
 +CURLPROTO_HTTP
 +CURLPROTO_HTTPS
 +CURLPROTO_IMAP
 +CURLPROTO_IMAPS
 +CURLPROTO_LDAP
 +CURLPROTO_LDAPS
 +CURLPROTO_POP3
 +CURLPROTO_POP3S
 +CURLPROTO_RTMP
 +CURLPROTO_RTMPE
 +CURLPROTO_RTMPS
 +CURLPROTO_RTMPT
 +CURLPROTO_RTMPTE
 +CURLPROTO_RTMPTS
 +CURLPROTO_RTSP
 +CURLPROTO_SCP
 +CURLPROTO_SFTP
 +CURLPROTO_SMB
 +CURLPROTO_SMBS
 +CURLPROTO_SMTP
 +CURLPROTO_SMTPS
 +CURLPROTO_TELNET
 +CURLPROTO_TFTP
 +.fi
 +.SH DEFAULT
 +All protocols except for FILE, SCP and since 7.40.0 SMB and SMBS.
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +curl = curl_easy_init();
 +if(curl) {
 +  /* pass in the URL from an external source */
 +  curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
 +
 +  /* only allow redirects to HTTP and HTTPS URLs */
 +  curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS,
 +                   CURLPROTO_HTTP | CURLPROTO_HTTPS);
 +
 +  /* Perform the request */
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.19.4, before then it would follow all protocols.
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_PROTOCOLS "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_SEEKDATA.3
index b864b78ad,000000000..eb73a1a01
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SEEKDATA.3
+++ b/docs/libcurl/opts/GNURLOPT_SEEKDATA.3
@@@ -1,57 -1,0 +1,57 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_SEEKDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
 +.SH DESCRIPTION
 +Data \fIpointer\fP to pass to the seek callback function. If you use the
 +\fICURLOPT_SEEKFUNCTION(3)\fP option, this is the pointer you'll get as
 +input.
 +.SH DEFAULT
 +If you don't set this, NULL is passed to the callback.
 +.SH PROTOCOLS
 +HTTP, FTP, SFTP
 +.SH EXAMPLE
 +.nf
 +static int seek_cb(void *userp, curl_off_t offset, int origin)
 +{
 +  struct data *d = (struct data *)userp;
 +  lseek(d->our_fd, offset, origin);
 +  return CURL_SEEKFUNC_OK;
 +}
 +
 +{
 +  struct data seek_data;
 +  curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_cb);
 +  curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, &seek_data);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.18.0
 +.SH RETURN VALUE
 +.SH "SEE ALSO"
 +.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_SSLVERSION.3
index 8e1cc7f54,000000000..60629ddf6
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SSLVERSION.3
+++ b/docs/libcurl/opts/GNURLOPT_SSLVERSION.3
@@@ -1,113 -1,0 +1,113 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, 2018, Daniel Stenberg, <address@hidden>, et 
al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_SSLVERSION \- set preferred TLS/SSL version
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
 +.SH DESCRIPTION
 +Pass a long as parameter to control which version range of SSL/TLS versions to
 +use.
 +
 +The SSL and TLS versions have typically developed from the most insecure
 +version to be more and more secure in this order through history: SSL v2,
 +SSLv3, TLS v1.0, TLS v1.1, TLS v1.2 and the most recent TLS v1.3.
 +
 +Use one of the available defines for this purpose. The available options are:
 +.RS
 +.IP CURL_SSLVERSION_DEFAULT
 +The default acceptable version range. The minimum acceptable version is by
 +default TLS v1.0 since 7.39.0 (unless the TLS library has a stricter rule).
 +.IP CURL_SSLVERSION_TLSv1
 +TLS v1.0 or later
 +.IP CURL_SSLVERSION_SSLv2
 +SSL v2 (but not SSLv3)
 +.IP CURL_SSLVERSION_SSLv3
 +SSL v3 (but not SSLv2)
 +.IP CURL_SSLVERSION_TLSv1_0
 +TLS v1.0 or later (Added in 7.34.0)
 +.IP CURL_SSLVERSION_TLSv1_1
 +TLS v1.1 or later (Added in 7.34.0)
 +.IP CURL_SSLVERSION_TLSv1_2
 +TLS v1.2 or later (Added in 7.34.0)
 +.IP CURL_SSLVERSION_TLSv1_3
 +TLS v1.3 or later (Added in 7.52.0)
 +.RE
 +
 +The maximum TLS version can be set by using \fIone\fP of the
 +CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
 +CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
 +The MAX macros are not supported for WolfSSL.
 +.RS
 +.IP CURL_SSLVERSION_MAX_DEFAULT
 +The flag defines the maximum supported TLS version by libcurl, or the default
 +value from the SSL library is used. libcurl will use a sensible default
 +maximum, which was TLS v1.2 up to before 7.61.0 and is TLS v1.3 since then -
 +assuming the TLS library support it. (Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_0
 +The flag defines maximum supported TLS version as TLS v1.0.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_1
 +The flag defines maximum supported TLS version as TLS v1.1.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_2
 +The flag defines maximum supported TLS version as TLS v1.2.
 +(Added in 7.54.0)
 +.IP CURL_SSLVERSION_MAX_TLSv1_3
 +The flag defines maximum supported TLS version as TLS v1.3.
 +(Added in 7.54.0)
 +.RE
 +
 +In versions of curl prior to 7.54 the CURL_SSLVERSION_TLS options were
 +documented to allow \fIonly\fP the specified TLS version, but behavior was
 +inconsistent depending on the TLS library.
 +
 +.SH DEFAULT
 +CURL_SSLVERSION_DEFAULT
 +.SH PROTOCOLS
 +All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com";);
 +
 +  /* ask libcurl to use TLS version 1.0 or later */
 +  curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
 +
 +  /* Perform the request */
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may
 +vary depending on which backend libcurl has been built to use.
 +
 +SSLv3 is disabled by default since 7.39.0.
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
 +.BR CURLOPT_PROXY_SSLVERSION "(3), " CURLOPT_IPRESOLVE "(3) "
diff --cc docs/libcurl/opts/GNURLOPT_TIMEOUT.3
index 307021fae,000000000..c6c3bc95e
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_TIMEOUT.3
@@@ -1,71 -1,0 +1,72 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
 +.SH DESCRIPTION
 +Pass a long as parameter containing \fItimeout\fP - the maximum time in
 +seconds that you allow the libcurl transfer operation to take. Normally, name
- lookups can take a considerable time and limiting operations to less than a
- few minutes risk aborting perfectly normal operations. This option may cause
- libcurl to use the SIGALRM signal to timeout system calls.
++lookups can take a considerable time and limiting operations risk aborting
++perfectly normal operations. This option may cause libcurl to use the SIGALRM
++signal to timeout system calls.
 +
 +In unix-like systems, this might cause signals to be used unless
 +\fICURLOPT_NOSIGNAL(3)\fP is set.
 +
 +If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the
 +value set last will be used.
 +
- Since this puts a hard limit for how long time a request is allowed to take,
- it has limited use in dynamic use cases with varying transfer times. You are
- then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP,
- \fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
- implement your own timeout logic.
++Since this option puts a hard limit on how long time a request is allowed to
++take, it has limited use in dynamic use cases with varying transfer times. 
That
++is especially apparent when using the multi interface, which may queue the
++transfer, and that time is included. You are advised to explore
++\fICURLOPT_LOW_SPEED_LIMIT(3)\fP, \fICURLOPT_LOW_SPEED_TIME(3)\fP or using
++\fICURLOPT_PROGRESSFUNCTION(3)\fP to implement your own timeout logic.
 +.SH DEFAULT
 +Default timeout is 0 (zero) which means it never times out during transfer.
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +
 +  /* complete within 20 seconds */
 +  curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);
 +
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Always
 +.SH RETURN VALUE
 +Returns CURLE_OK. Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative
 +value or a value that when converted to milliseconds is too large.
 +.SH "SEE ALSO"
 +.BR CURLOPT_TIMEOUT_MS "(3), "
 +.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_TLS13_CIPHERS.3
index f2666f6a8,000000000..7913f2a06
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TLS13_CIPHERS.3
+++ b/docs/libcurl/opts/GNURLOPT_TLS13_CIPHERS.3
@@@ -1,68 -1,0 +1,68 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_TLS13_CIPHERS 3 "25 May 2018" "libcurl 7.61.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_TLS13_CIPHERS \- specify ciphers suites to use for TLS 1.3
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLS13_CIPHERS, char *list);
 +.SH DESCRIPTION
 +Pass a char *, pointing to a zero terminated string holding the list of cipher
 +suites to use for the TLS 1.3 connection. The list must be syntactically
 +correct, it consists of one or more cipher suite strings separated by colons.
 +
 +You'll find more details about cipher lists on this URL:
 +
 + https://curl.haxx.se/docs/ssl-ciphers.html
 +
 +This option is currently used only when curl is built to use OpenSSL 1.1.1 or
 +later. If you are using a different SSL backend you can try setting TLS 1.3
 +cipher suites by using the CURLOPT_SSL_CIPHER_LIST option.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH DEFAULT
 +NULL, use internal default
 +.SH PROTOCOLS
 +All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/";);
 +  curl_easy_setopt(curl, CURLOPT_TLS13_CIPHERS,
 +                   "TLS13-CHACHA20-POLY1305-SHA256");
 +  ret = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.61.0.
 +Available when built with OpenSSL >= 1.1.1.
 +.SH RETURN VALUE
 +Returns CURLE_OK if supported, CURLE_NOT_BUILT_IN otherwise.
 +.SH "SEE ALSO"
 +.BR CURLOPT_SSL_CIPHER_LIST "(3), " CURLOPT_SSLVERSION "(3), "
 +.BR CURLOPT_PROXY_SSL_CIPHER_LIST "(3), " CURLOPT_PROXY_TLS13_CIPHERS "(3), "
 +.BR CURLOPT_PROXY_SSLVERSION "(3), " CURLOPT_USE_SSL "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_TRAILERDATA.3
index e6e95cc61,000000000..909f051f4
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TRAILERDATA.3
+++ b/docs/libcurl/opts/GNURLOPT_TRAILERDATA.3
@@@ -1,49 -1,0 +1,49 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_TRAILERDATA 3 "14 Aug 2018" "libcurl 7.64.0" "curl_easy_setopt 
options"
 +.SH NAME:
 +CURLOPT_TRAILERDATA \- Custom pointer passed to the trailing headers callback
- .SH SYNOPSIS:
++.SH SYNOPSIS
 +#include <curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRAILERDATA, void *userdata);
 +.SH DESCRIPTION:
 +Data pointer to be passed to the HTTP trailer callback function.
- .SH DEFAULT:
++.SH DEFAULT
 +NULL
- .SH PROTOCOLS:
++.SH PROTOCOLS
 +HTTP
- .SH EXAMPLE:
++.SH EXAMPLE
 +.nf
 +/* Assuming we have a CURL handle in the hndl variable. */
 +
 +struct MyData data;
 +
 +curl_easy_setopt(hndl, CURLOPT_TRAILERDATA, &data);
 +.fi
 +
 +A more complete example can be found in examples/http_trailers.html
- .SH AVAILABILITY:
++.SH AVAILABILITY
 +This option was added in curl 7.64.0 and is present if HTTP support is enabled
 +.SH "SEE ALSO"
 +.BR CURLOPT_TRAILERFUNCTION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_TRAILERFUNCTION.3
index 14caf177c,000000000..a6c3cdd49
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TRAILERFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_TRAILERFUNCTION.3
@@@ -1,101 -1,0 +1,101 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2019, 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 GNURLOPT_TRAILERFUNCTION 3 "14 Aug 2018" "libcurl 7.64.0" 
"curl_easy_setopt options"
 +.SH NAME:
 +CURLOPT_TRAILERFUNCTION \- Set callback for sending trailing headers
- .SH SYNOPSIS:
++.SH SYNOPSIS
 +#include <curl.h>
 +
 +int curl_trailer_callback(struct curl_slist ** list, void *userdata);
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRAILERFUNCTION, 
curl_trailer_callback *func);
- .SH DESCRIPTION:
++.SH DESCRIPTION
 +Pass a pointer to a callback function.
 +
 +This callback function will be called once right before sending the final
 +CR LF in an HTTP chunked transfer to fill a list of trailing headers to be
 +sent before finishing the HTTP transfer.
 +
 +You can set the userdata argument with the CURLOPT_TRAILERDATA option.
 +
 +The trailing headers included in the linked list must not be CRLF-terminated,
 +because libcurl will add the appropriate line termination characters after
 +each header item.
 +
 +If you use curl_slist_append to add trailing headers to the curl_slist then
 +libcurl will duplicate the strings, and will free the curl_slist and the
 +duplicates once the trailers have been sent.
 +
 +If one of the trailing headers is not formatted correctly
 +(i.e. HeaderName: headerdata) it will be ignored and an info message
 +will be emitted.
 +
 +The return value can either be CURL_TRAILERFUNC_OK or CURL_TRAILERFUNC_ABORT
 +which would respectively instruct libcurl to either continue with sending the
 +trailers or to abort the request.
 +
 +If you set this option to NULL, then the transfer proceeds as usual
 +without any interruptions.
- .SH DEFAULT:
++.SH DEFAULT
 +NULL
- .SH PROTOCOLS:
++.SH PROTOCOLS
 +HTTP
- .SH EXAMPLE:
++.SH EXAMPLE
 +#include <gnurl/curl.h>
 +
 +static int trailer_cb(struct curl_slist **tr, void *data)
 +{
 +  /* libcurl will free the list */
 +  tr = curl_slist_append(*tr, "My-super-awesome-trailer: trailer-stuff");
 +  return CURL_TRAILERFUNC_OK;
 +}
 +
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  /* Set the URL of the request */
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/";);
 +  /* Now set it as a put */
 +  curl_easy_setopt(curl, CURLOPT_PUT, 1L);
 +
 +  /* Assuming we have a function that will return the data to be pushed
 +     Let that function be read_cb */
 +  curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_cb);
 +
 +  struct curl_slist *headers = NULL;
 +  headers = curl_slist_append(headers, "Trailer: My-super-awsome-trailer");
 +  res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
 +
 +  /* Set the trailers filling callback */
 +  curl_easy_setopt(curl, CURLOPT_TRAILERFUNCTION, trailer_cb);
 +
 +  /* Perform the request, res will get the return code */
 +  res = curl_easy_perform(curl);
 +
 +  curl_easy_cleanup(curl);
 +
 +  curl_slist_free_all(headers);
 +}
- .SH AVAILABILITY:
++.SH AVAILABILITY
 +This option was added in curl 7.64.0 and is present if HTTP support is enabled
 +.SH "SEE ALSO"
 +.BR CURLOPT_TRAILERDATA "(3), "
diff --cc include/gnurl/multi.h
index f10932244,000000000..fce68f4ff
mode 100644,000000..100644
--- a/include/gnurl/multi.h
+++ b/include/gnurl/multi.h
@@@ -1,455 -1,0 +1,461 @@@
 +#ifndef CURLINC_MULTI_H
 +#define CURLINC_MULTI_H
 +/***************************************************************************
 + *                                  _   _ ____  _
 + *  Project                     ___| | | |  _ \| |
 + *                             / __| | | | |_) | |
 + *                            | (__| |_| |  _ <| |___
 + *                             \___|\___/|_| \_\_____|
 + *
 + * Copyright (C) 1998 - 2019, 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.
 + *
 + ***************************************************************************/
 +/*
 +  This is an "external" header file. Don't give away any internals here!
 +
 +  GOALS
 +
 +  o Enable a "pull" interface. The application that uses libcurl decides where
 +    and when to ask libcurl to get/send data.
 +
 +  o Enable multiple simultaneous transfers in the same thread without making 
it
 +    complicated for the application.
 +
 +  o Enable the application to select() on its own file descriptors and curl's
 +    file descriptors simultaneous easily.
 +
 +*/
 +
 +/*
 + * This header file should not really need to include "curl.h" since curl.h
 + * itself includes this file and we expect user applications to do #include
 + * <gnurl/curl.h> without the need for especially including multi.h.
 + *
 + * For some reason we added this include here at one point, and rather than to
 + * break existing (wrongly written) libcurl applications, we leave it as-is
 + * but with this warning attached.
 + */
 +#include "curl.h"
 +
 +#ifdef  __cplusplus
 +extern "C" {
 +#endif
 +
 +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
 +typedef struct Curl_multi CURLM;
 +#else
 +typedef void CURLM;
 +#endif
 +
 +typedef enum {
 +  CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
 +                                    curl_multi_socket*() soon */
 +  CURLM_OK,
 +  CURLM_BAD_HANDLE,      /* the passed-in handle is not a valid CURLM handle 
*/
 +  CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
 +  CURLM_OUT_OF_MEMORY,   /* if you ever get this, you're in deep sh*t */
 +  CURLM_INTERNAL_ERROR,  /* this is a libcurl bug */
 +  CURLM_BAD_SOCKET,      /* the passed in socket argument did not match */
 +  CURLM_UNKNOWN_OPTION,  /* curl_multi_setopt() with unsupported option */
 +  CURLM_ADDED_ALREADY,   /* an easy handle already added to a multi handle was
 +                            attempted to get added - again */
 +  CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a
 +                               callback */
 +  CURLM_LAST
 +} CURLMcode;
 +
 +/* just to make code nicer when using curl_multi_socket() you can now check
 +   for CURLM_CALL_MULTI_SOCKET too in the same style it works for
 +   curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
 +#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
 +
 +/* bitmask bits for CURLMOPT_PIPELINING */
 +#define CURLPIPE_NOTHING   0L
 +#define CURLPIPE_HTTP1     1L
 +#define CURLPIPE_MULTIPLEX 2L
 +
 +typedef enum {
 +  CURLMSG_NONE, /* first, not used */
 +  CURLMSG_DONE, /* This easy handle has completed. 'result' contains
 +                   the CURLcode of the transfer */
 +  CURLMSG_LAST /* last, not used */
 +} CURLMSG;
 +
 +struct CURLMsg {
 +  CURLMSG msg;       /* what this message means */
 +  CURL *easy_handle; /* the handle it concerns */
 +  union {
 +    void *whatever;    /* message-specific data */
 +    CURLcode result;   /* return code for transfer */
 +  } data;
 +};
 +typedef struct CURLMsg CURLMsg;
 +
 +/* Based on poll(2) structure and values.
 + * We don't use pollfd and POLL* constants explicitly
 + * to cover platforms without poll(). */
 +#define CURL_WAIT_POLLIN    0x0001
 +#define CURL_WAIT_POLLPRI   0x0002
 +#define CURL_WAIT_POLLOUT   0x0004
 +
 +struct curl_waitfd {
 +  curl_socket_t fd;
 +  short events;
 +  short revents; /* not supported yet */
 +};
 +
 +/*
 + * Name:    curl_multi_init()
 + *
 + * Desc:    inititalize multi-style curl usage
 + *
 + * Returns: a new CURLM handle to use in all 'curl_multi' functions.
 + */
 +CURL_EXTERN CURLM *curl_multi_init(void);
 +
 +/*
 + * Name:    curl_multi_add_handle()
 + *
 + * Desc:    add a standard curl handle to the multi stack
 + *
 + * Returns: CURLMcode type, general multi error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
 +                                            CURL *curl_handle);
 +
 + /*
 +  * Name:    curl_multi_remove_handle()
 +  *
 +  * Desc:    removes a curl handle from the multi stack again
 +  *
 +  * Returns: CURLMcode type, general multi error code.
 +  */
 +CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
 +                                               CURL *curl_handle);
 +
 + /*
 +  * Name:    curl_multi_fdset()
 +  *
 +  * Desc:    Ask curl for its fd_set sets. The app can use these to select() 
or
 +  *          poll() on. We want curl_multi_perform() called as soon as one of
 +  *          them are ready.
 +  *
 +  * Returns: CURLMcode type, general multi error code.
 +  */
 +CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
 +                                       fd_set *read_fd_set,
 +                                       fd_set *write_fd_set,
 +                                       fd_set *exc_fd_set,
 +                                       int *max_fd);
 +
 +/*
 + * Name:     curl_multi_wait()
 + *
 + * Desc:     Poll on all fds within a CURLM set as well as any
 + *           additional fds passed to the function.
 + *
 + * Returns:  CURLMcode type, general multi error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
 +                                      struct curl_waitfd extra_fds[],
 +                                      unsigned int extra_nfds,
 +                                      int timeout_ms,
 +                                      int *ret);
 +
 +/*
 + * Name:     curl_multi_poll()
 + *
 + * Desc:     Poll on all fds within a CURLM set as well as any
 + *           additional fds passed to the function.
 + *
 + * Returns:  CURLMcode type, general multi error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
 +                                      struct curl_waitfd extra_fds[],
 +                                      unsigned int extra_nfds,
 +                                      int timeout_ms,
 +                                      int *ret);
 +
 + /*
 +  * Name:    curl_multi_perform()
 +  *
 +  * Desc:    When the app thinks there's data available for curl it calls this
 +  *          function to read/write whatever there is right now. This returns
 +  *          as soon as the reads and writes are done. This function does not
 +  *          require that there actually is data available for reading or that
 +  *          data can be written, it can be called just in case. It returns
 +  *          the number of handles that still transfer data in the second
 +  *          argument's integer-pointer.
 +  *
 +  * Returns: CURLMcode type, general multi error code. *NOTE* that this only
 +  *          returns errors etc regarding the whole multi stack. There might
 +  *          still have occurred problems on individual transfers even when
 +  *          this returns OK.
 +  */
 +CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
 +                                         int *running_handles);
 +
 + /*
 +  * Name:    curl_multi_cleanup()
 +  *
 +  * Desc:    Cleans up and removes a whole multi stack. It does not free or
 +  *          touch any individual easy handles in any way. We need to define
 +  *          in what state those handles will be if this function is called
 +  *          in the middle of a transfer.
 +  *
 +  * Returns: CURLMcode type, general multi error code.
 +  */
 +CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
 +
 +/*
 + * Name:    curl_multi_info_read()
 + *
 + * Desc:    Ask the multi handle if there's any messages/informationals from
 + *          the individual transfers. Messages include informationals such as
 + *          error code from the transfer or just the fact that a transfer is
 + *          completed. More details on these should be written down as well.
 + *
 + *          Repeated calls to this function will return a new struct each
 + *          time, until a special "end of msgs" struct is returned as a signal
 + *          that there is no more to get at this point.
 + *
 + *          The data the returned pointer points to will not survive calling
 + *          curl_multi_cleanup().
 + *
 + *          The 'CURLMsg' struct is meant to be very simple and only contain
 + *          very basic information. If more involved information is wanted,
 + *          we will provide the particular "transfer handle" in that struct
 + *          and that should/could/would be used in subsequent
 + *          curl_easy_getinfo() calls (or similar). The point being that we
 + *          must never expose complex structs to applications, as then we'll
 + *          undoubtably get backwards compatibility problems in the future.
 + *
 + * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
 + *          of structs. It also writes the number of messages left in the
 + *          queue (after this read) in the integer the second argument points
 + *          to.
 + */
 +CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
 +                                          int *msgs_in_queue);
 +
 +/*
 + * Name:    curl_multi_strerror()
 + *
 + * Desc:    The curl_multi_strerror function may be used to turn a CURLMcode
 + *          value into the equivalent human readable error string.  This is
 + *          useful for printing meaningful error messages.
 + *
 + * Returns: A pointer to a zero-terminated error message.
 + */
 +CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
 +
 +/*
 + * Name:    curl_multi_socket() and
 + *          curl_multi_socket_all()
 + *
 + * Desc:    An alternative version of curl_multi_perform() that allows the
 + *          application to pass in one of the file descriptors that have been
 + *          detected to have "action" on them and let libcurl perform.
 + *          See man page for details.
 + */
 +#define CURL_POLL_NONE   0
 +#define CURL_POLL_IN     1
 +#define CURL_POLL_OUT    2
 +#define CURL_POLL_INOUT  3
 +#define CURL_POLL_REMOVE 4
 +
 +#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
 +
 +#define CURL_CSELECT_IN   0x01
 +#define CURL_CSELECT_OUT  0x02
 +#define CURL_CSELECT_ERR  0x04
 +
 +typedef int (*curl_socket_callback)(CURL *easy,      /* easy handle */
 +                                    curl_socket_t s, /* socket */
 +                                    int what,        /* see above */
 +                                    void *userp,     /* private callback
 +                                                        pointer */
 +                                    void *socketp);  /* private socket
 +                                                        pointer */
 +/*
 + * Name:    curl_multi_timer_callback
 + *
 + * Desc:    Called by libcurl whenever the library detects a change in the
 + *          maximum number of milliseconds the app is allowed to wait before
 + *          curl_multi_socket() or curl_multi_perform() must be called
 + *          (to allow libcurl's timed events to take place).
 + *
 + * Returns: The callback should return zero.
 + */
 +typedef int (*curl_multi_timer_callback)(CURLM *multi,    /* multi handle */
 +                                         long timeout_ms, /* see above */
 +                                         void *userp);    /* private callback
 +                                                             pointer */
 +
 +CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
 +                                        int *running_handles);
 +
 +CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
 +                                               curl_socket_t s,
 +                                               int ev_bitmask,
 +                                               int *running_handles);
 +
 +CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
 +                                            int *running_handles);
 +
 +#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
 +/* This macro below was added in 7.16.3 to push users who recompile to use
 +   the new curl_multi_socket_action() instead of the old curl_multi_socket()
 +*/
 +#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
 +#endif
 +
 +/*
 + * Name:    curl_multi_timeout()
 + *
 + * Desc:    Returns the maximum number of milliseconds the app is allowed to
 + *          wait before curl_multi_socket() or curl_multi_perform() must be
 + *          called (to allow libcurl's timed events to take place).
 + *
 + * Returns: CURLM error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
 +                                         long *milliseconds);
 +
 +#undef CINIT /* re-using the same name as in curl.h */
 +
 +#ifdef CURL_ISOCPP
 +#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num
 +#else
 +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
 +#define LONG          CURLOPTTYPE_LONG
 +#define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT
 +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
 +#define OFF_T         CURLOPTTYPE_OFF_T
 +#define CINIT(name,type,number) CURLMOPT_/**/name = type + number
 +#endif
 +
 +typedef enum {
 +  /* This is the socket callback function pointer */
 +  CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),
 +
 +  /* This is the argument passed to the socket callback */
 +  CINIT(SOCKETDATA, OBJECTPOINT, 2),
 +
 +    /* set to 1 to enable pipelining for this multi handle */
 +  CINIT(PIPELINING, LONG, 3),
 +
 +   /* This is the timer callback function pointer */
 +  CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),
 +
 +  /* This is the argument passed to the timer callback */
 +  CINIT(TIMERDATA, OBJECTPOINT, 5),
 +
 +  /* maximum number of entries in the connection cache */
 +  CINIT(MAXCONNECTS, LONG, 6),
 +
 +  /* maximum number of (pipelining) connections to one host */
 +  CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
 +
 +  /* maximum number of requests in a pipeline */
 +  CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
 +
 +  /* a connection with a content-length longer than this
 +     will not be considered for pipelining */
 +  CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
 +
 +  /* a connection with a chunk length longer than this
 +     will not be considered for pipelining */
 +  CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
 +
 +  /* a list of site names(+port) that are blacklisted from
 +     pipelining */
 +  CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
 +
 +  /* a list of server types that are blacklisted from
 +     pipelining */
 +  CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
 +
 +  /* maximum number of open connections in total */
 +  CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
 +
 +   /* This is the server push callback function pointer */
 +  CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
 +
 +  /* This is the argument passed to the server push callback */
 +  CINIT(PUSHDATA, OBJECTPOINT, 15),
 +
++  /* maximum number of concurrent streams to support on a connection */
++  CINIT(MAX_CONCURRENT_STREAMS, LONG, 16),
++
 +  CURLMOPT_LASTENTRY /* the last unused */
 +} CURLMoption;
 +
 +
 +/*
 + * Name:    curl_multi_setopt()
 + *
 + * Desc:    Sets options for the multi handle.
 + *
 + * Returns: CURLM error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
 +                                        CURLMoption option, ...);
 +
 +
 +/*
 + * Name:    curl_multi_assign()
 + *
 + * Desc:    This function sets an association in the multi handle between the
 + *          given socket and a private pointer of the application. This is
 + *          (only) useful for curl_multi_socket uses.
 + *
 + * Returns: CURLM error code.
 + */
 +CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
 +                                        curl_socket_t sockfd, void *sockp);
 +
 +
 +/*
 + * Name: curl_push_callback
 + *
 + * Desc: This callback gets called when a new stream is being pushed by the
 + *       server. It approves or denies the new stream.
 + *
 + * Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
 + */
 +#define CURL_PUSH_OK   0
 +#define CURL_PUSH_DENY 1
 +
 +struct curl_pushheaders;  /* forward declaration only */
 +
 +CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
 +                                        size_t num);
 +CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
 +                                         const char *name);
 +
 +typedef int (*curl_push_callback)(CURL *parent,
 +                                  CURL *easy,
 +                                  size_t num_headers,
 +                                  struct curl_pushheaders *headers,
 +                                  void *userp);
 +
++/* value for MAXIMUM CONCURRENT STREAMS upper limit */
++#define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1)
++
 +#ifdef __cplusplus
 +} /* end of extern "C" */
 +#endif
 +
 +#endif
diff --cc tests/data/Makefile.inc
index e2a04e181,557f92891..846eb4046
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@@ -126,11 -127,11 +127,11 @@@ 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 test1157 test1158 test1159 \
- test1160 test1161 test1162 test1163 test1164 test1165 \
+ test1160 test1161 test1162 test1163 test1164 test1165 test1166 \
 -test1170 test1171 test1172 test1173 test1174 \
 +test1170 test1171 test1172 test1174 \
  \
  test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
  test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
diff --cc tests/smbserver.py.in
index 8a4fba8a0,000000000..2677f0c46
mode 100755,000000..100755
--- a/tests/smbserver.py.in
+++ b/tests/smbserver.py.in
@@@ -1,379 -1,0 +1,382 @@@
 +#!AWKPYTHON
 +# -*- coding: utf-8 -*-
 +#
 +#  Project                     ___| | | |  _ \| |
 +#                             / __| | | | |_) | |
 +#                            | (__| |_| |  _ <| |___
 +#                             \___|\___/|_| \_\_____|
 +#
 +# Copyright (C) 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.
 +#
 +"""Server for testing SMB"""
 +
 +from __future__ import (absolute_import, division, print_function)
 +# unicode_literals)
 +import argparse
- import ConfigParser
 +import os
 +import sys
 +import logging
 +import tempfile
++try: # Python 3
++    import configparser
++except ImportError: # Python 2
++    import ConfigParser as configparser
 +
 +# Import our curl test data helper
 +import curl_test_data
 +
 +# This saves us having to set up the PYTHONPATH explicitly
 +deps_dir = os.path.join(os.path.dirname(__file__), "python_dependencies")
 +sys.path.append(deps_dir)
 +from impacket import smbserver as imp_smbserver
 +from impacket import smb as imp_smb
 +from impacket.nt_errors import (STATUS_ACCESS_DENIED, STATUS_SUCCESS,
 +                                STATUS_NO_SUCH_FILE)
 +
 +log = logging.getLogger(__name__)
 +SERVER_MAGIC = "SERVER_MAGIC"
 +TESTS_MAGIC = "TESTS_MAGIC"
 +VERIFIED_REQ = "verifiedserver"
 +VERIFIED_RSP = b"WE ROOLZ: {pid}\n"
 +
 +
 +def smbserver(options):
 +    """Start up a TCP SMB server that serves forever
 +
 +    """
 +    if options.pidfile:
 +        pid = os.getpid()
 +        with open(options.pidfile, "w") as f:
 +            f.write("{0}".format(pid))
 +
 +    # Here we write a mini config for the server
-     smb_config = ConfigParser.ConfigParser()
++    smb_config = configparser.ConfigParser()
 +    smb_config.add_section("global")
 +    smb_config.set("global", "server_name", "SERVICE")
 +    smb_config.set("global", "server_os", "UNIX")
 +    smb_config.set("global", "server_domain", "WORKGROUP")
 +    smb_config.set("global", "log_file", "")
 +    smb_config.set("global", "credentials_file", "")
 +
 +    # We need a share which allows us to test that the server is running
 +    smb_config.add_section("SERVER")
 +    smb_config.set("SERVER", "comment", "server function")
 +    smb_config.set("SERVER", "read only", "yes")
 +    smb_config.set("SERVER", "share type", "0")
 +    smb_config.set("SERVER", "path", SERVER_MAGIC)
 +
 +    # Have a share for tests.  These files will be autogenerated from the
 +    # test input.
 +    smb_config.add_section("TESTS")
 +    smb_config.set("TESTS", "comment", "tests")
 +    smb_config.set("TESTS", "read only", "yes")
 +    smb_config.set("TESTS", "share type", "0")
 +    smb_config.set("TESTS", "path", TESTS_MAGIC)
 +
 +    if not options.srcdir or not os.path.isdir(options.srcdir):
 +        raise ScriptException("--srcdir is mandatory")
 +
 +    test_data_dir = os.path.join(options.srcdir, "data")
 +
 +    smb_server = TestSmbServer((options.host, options.port),
 +                               config_parser=smb_config,
 +                               test_data_directory=test_data_dir)
 +    log.info("[SMB] setting up SMB server on port %s", options.port)
 +    smb_server.processConfigFile()
 +    smb_server.serve_forever()
 +    return 0
 +
 +
 +class TestSmbServer(imp_smbserver.SMBSERVER):
 +    """
 +    Test server for SMB which subclasses the impacket SMBSERVER and provides
 +    test functionality.
 +    """
 +
 +    def __init__(self,
 +                 address,
 +                 config_parser=None,
 +                 test_data_directory=None):
 +        imp_smbserver.SMBSERVER.__init__(self,
 +                                         address,
 +                                         config_parser=config_parser)
 +
 +        # Set up a test data object so we can get test data later.
 +        self.ctd = curl_test_data.TestData(test_data_directory)
 +
 +        # Override smbComNtCreateAndX so we can pretend to have files which
 +        # don't exist.
 +        self.hookSmbCommand(imp_smb.SMB.SMB_COM_NT_CREATE_ANDX,
 +                            self.create_and_x)
 +
 +    def create_and_x(self, conn_id, smb_server, smb_command, recv_packet):
 +        """
 +        Our version of smbComNtCreateAndX looks for special test files and
 +        fools the rest of the framework into opening them as if they were
 +        normal files.
 +        """
 +        conn_data = smb_server.getConnectionData(conn_id)
 +
 +        # Wrap processing in a try block which allows us to throw SmbException
 +        # to control the flow.
 +        try:
 +            ncax_parms = imp_smb.SMBNtCreateAndX_Parameters(
 +                smb_command["Parameters"])
 +
 +            path = self.get_share_path(conn_data,
 +                                       ncax_parms["RootFid"],
 +                                       recv_packet["Tid"])
 +            log.info("[SMB] Requested share path: %s", path)
 +
 +            disposition = ncax_parms["Disposition"]
 +            log.debug("[SMB] Requested disposition: %s", disposition)
 +
 +            # Currently we only support reading files.
 +            if disposition != imp_smb.FILE_OPEN:
 +                raise SmbException(STATUS_ACCESS_DENIED,
 +                                   "Only support reading files")
 +
 +            # Check to see if the path we were given is actually a
 +            # magic path which needs generating on the fly.
 +            if path not in [SERVER_MAGIC, TESTS_MAGIC]:
 +                # Pass the command onto the original handler.
 +                return imp_smbserver.SMBCommands.smbComNtCreateAndX(conn_id,
 +                                                                    
smb_server,
 +                                                                    
smb_command,
 +                                                                    
recv_packet)
 +
 +            flags2 = recv_packet["Flags2"]
 +            ncax_data = imp_smb.SMBNtCreateAndX_Data(flags=flags2,
 +                                                     data=smb_command[
 +                                                         "Data"])
 +            requested_file = imp_smbserver.decodeSMBString(
 +                flags2,
 +                ncax_data["FileName"])
 +            log.debug("[SMB] User requested file '%s'", requested_file)
 +
 +            if path == SERVER_MAGIC:
 +                fid, full_path = self.get_server_path(requested_file)
 +            else:
 +                assert (path == TESTS_MAGIC)
 +                fid, full_path = self.get_test_path(requested_file)
 +
 +            resp_parms = imp_smb.SMBNtCreateAndXResponse_Parameters()
 +            resp_data = ""
 +
 +            # Simple way to generate a fid
 +            if len(conn_data["OpenedFiles"]) == 0:
 +                fakefid = 1
 +            else:
 +                fakefid = conn_data["OpenedFiles"].keys()[-1] + 1
 +            resp_parms["Fid"] = fakefid
 +            resp_parms["CreateAction"] = disposition
 +
 +            if os.path.isdir(path):
 +                resp_parms[
 +                    "FileAttributes"] = imp_smb.SMB_FILE_ATTRIBUTE_DIRECTORY
 +                resp_parms["IsDirectory"] = 1
 +            else:
 +                resp_parms["IsDirectory"] = 0
 +                resp_parms["FileAttributes"] = ncax_parms["FileAttributes"]
 +
 +            # Get this file's information
 +            resp_info, error_code = imp_smbserver.queryPathInformation(
 +                "", full_path, level=imp_smb.SMB_QUERY_FILE_ALL_INFO)
 +
 +            if error_code != STATUS_SUCCESS:
 +                raise SmbException(error_code, "Failed to query path info")
 +
 +            resp_parms["CreateTime"] = resp_info["CreationTime"]
 +            resp_parms["LastAccessTime"] = resp_info[
 +                "LastAccessTime"]
 +            resp_parms["LastWriteTime"] = resp_info["LastWriteTime"]
 +            resp_parms["LastChangeTime"] = resp_info[
 +                "LastChangeTime"]
 +            resp_parms["FileAttributes"] = resp_info[
 +                "ExtFileAttributes"]
 +            resp_parms["AllocationSize"] = resp_info[
 +                "AllocationSize"]
 +            resp_parms["EndOfFile"] = resp_info["EndOfFile"]
 +
 +            # Let's store the fid for the connection
 +            # smbServer.log("Create file %s, mode:0x%x" % (pathName, mode))
 +            conn_data["OpenedFiles"][fakefid] = {}
 +            conn_data["OpenedFiles"][fakefid]["FileHandle"] = fid
 +            conn_data["OpenedFiles"][fakefid]["FileName"] = path
 +            conn_data["OpenedFiles"][fakefid]["DeleteOnClose"] = False
 +
 +        except SmbException as s:
 +            log.debug("[SMB] SmbException hit: %s", s)
 +            error_code = s.error_code
 +            resp_parms = ""
 +            resp_data = ""
 +
 +        resp_cmd = imp_smb.SMBCommand(imp_smb.SMB.SMB_COM_NT_CREATE_ANDX)
 +        resp_cmd["Parameters"] = resp_parms
 +        resp_cmd["Data"] = resp_data
 +        smb_server.setConnectionData(conn_id, conn_data)
 +
 +        return [resp_cmd], None, error_code
 +
 +    def get_share_path(self, conn_data, root_fid, tid):
 +        conn_shares = conn_data["ConnectedShares"]
 +
 +        if tid in conn_shares:
 +            if root_fid > 0:
 +                # If we have a rootFid, the path is relative to that fid
 +                path = conn_data["OpenedFiles"][root_fid]["FileName"]
 +                log.debug("RootFid present %s!" % path)
 +            else:
 +                if "path" in conn_shares[tid]:
 +                    path = conn_shares[tid]["path"]
 +                else:
 +                    raise SmbException(STATUS_ACCESS_DENIED,
 +                                       "Connection share had no path")
 +        else:
 +            raise SmbException(imp_smbserver.STATUS_SMB_BAD_TID,
 +                               "TID was invalid")
 +
 +        return path
 +
 +    def get_server_path(self, requested_filename):
 +        log.debug("[SMB] Get server path '%s'", requested_filename)
 +
 +        if requested_filename not in [VERIFIED_REQ]:
 +            raise SmbException(STATUS_NO_SUCH_FILE, "Couldn't find the file")
 +
 +        fid, filename = tempfile.mkstemp()
 +        log.debug("[SMB] Created %s (%d) for storing '%s'",
 +                  filename, fid, requested_filename)
 +
 +        contents = ""
 +
 +        if requested_filename == VERIFIED_REQ:
 +            log.debug("[SMB] Verifying server is alive")
 +            contents = VERIFIED_RSP.format(pid=os.getpid())
 +
 +        self.write_to_fid(fid, contents)
 +        return fid, filename
 +
 +    def write_to_fid(self, fid, contents):
 +        # Write the contents to file descriptor
 +        os.write(fid, contents)
 +        os.fsync(fid)
 +
 +        # Rewind the file to the beginning so a read gets us the contents
 +        os.lseek(fid, 0, os.SEEK_SET)
 +
 +    def get_test_path(self, requested_filename):
 +        log.info("[SMB] Get reply data from 'test%s'", requested_filename)
 +
 +        fid, filename = tempfile.mkstemp()
 +        log.debug("[SMB] Created %s (%d) for storing test '%s'",
 +                  filename, fid, requested_filename)
 +
 +        try:
 +            contents = self.ctd.get_test_data(requested_filename)
 +            self.write_to_fid(fid, contents)
 +            return fid, filename
 +
 +        except Exception:
 +            log.exception("Failed to make test file")
 +            raise SmbException(STATUS_NO_SUCH_FILE, "Failed to make test 
file")
 +
 +
 +class SmbException(Exception):
 +    def __init__(self, error_code, error_message):
 +        super(SmbException, self).__init__(error_message)
 +        self.error_code = error_code
 +
 +
 +class ScriptRC(object):
 +    """Enum for script return codes"""
 +    SUCCESS = 0
 +    FAILURE = 1
 +    EXCEPTION = 2
 +
 +
 +class ScriptException(Exception):
 +    pass
 +
 +
 +def get_options():
 +    parser = argparse.ArgumentParser()
 +
 +    parser.add_argument("--port", action="store", default=9017,
 +                      type=int, help="port to listen on")
 +    parser.add_argument("--host", action="store", default="127.0.0.1",
 +                      help="host to listen on")
 +    parser.add_argument("--verbose", action="store", type=int, default=0,
 +                        help="verbose output")
 +    parser.add_argument("--pidfile", action="store",
 +                        help="file name for the PID")
 +    parser.add_argument("--logfile", action="store",
 +                        help="file name for the log")
 +    parser.add_argument("--srcdir", action="store", help="test directory")
 +    parser.add_argument("--id", action="store", help="server ID")
 +    parser.add_argument("--ipv4", action="store_true", default=0,
 +                        help="IPv4 flag")
 +
 +    return parser.parse_args()
 +
 +
 +def setup_logging(options):
 +    """
 +    Set up logging from the command line options
 +    """
 +    root_logger = logging.getLogger()
 +    add_stdout = False
 +
 +    formatter = logging.Formatter("%(asctime)s %(levelname)-5.5s %(message)s")
 +
 +    # Write out to a logfile
 +    if options.logfile:
 +        handler = logging.FileHandler(options.logfile, mode="w")
 +        handler.setFormatter(formatter)
 +        handler.setLevel(logging.DEBUG)
 +        root_logger.addHandler(handler)
 +    else:
 +        # The logfile wasn't specified. Add a stdout logger.
 +        add_stdout = True
 +
 +    if options.verbose:
 +        # Add a stdout logger as well in verbose mode
 +        root_logger.setLevel(logging.DEBUG)
 +        add_stdout = True
 +    else:
 +        root_logger.setLevel(logging.INFO)
 +
 +    if add_stdout:
 +        stdout_handler = logging.StreamHandler(sys.stdout)
 +        stdout_handler.setFormatter(formatter)
 +        stdout_handler.setLevel(logging.DEBUG)
 +        root_logger.addHandler(stdout_handler)
 +
 +
 +if __name__ == '__main__':
 +    # Get the options from the user.
 +    options = get_options()
 +
 +    # Setup logging using the user options
 +    setup_logging(options)
 +
 +    # Run main script.
 +    try:
 +        rc = smbserver(options)
 +    except Exception as e:
 +        log.exception(e)
 +        rc = ScriptRC.EXCEPTION
 +
 +    log.info("[SMB] Returning %d", rc)
 +    sys.exit(rc)

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]