gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 256/256: Merge tag 'curl-7_56_0'


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 256/256: Merge tag 'curl-7_56_0'
Date: Fri, 06 Oct 2017 19:45:47 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 64d20516fc61405cf0de4db0b0b8c52b3cafe917
Merge: dc3acc160 3ea767905
Author: ng0 <address@hidden>
AuthorDate: Fri Oct 6 14:15:34 2017 +0000

    Merge tag 'curl-7_56_0'
    
    curl 7.56.0

 .gitignore                                         |    5 +-
 .mailmap                                           |   26 +
 .travis.yml                                        |   48 +-
 CMake/Macros.cmake                                 |   29 +
 CMakeLists.txt                                     |  114 +-
 Makefile.am                                        |    3 +
 RELEASE-NOTES                                      |  245 ++-
 acinclude.m4                                       |  325 +---
 configure.ac                                       |  218 ++-
 docs/CODE_OF_CONDUCT.md                            |    4 +-
 docs/HELP-US.md                                    |   70 +
 docs/HISTORY.md                                    |   18 +
 docs/INSTALL.md                                    |    3 +
 docs/KNOWN_BUGS                                    |   16 +-
 docs/MAIL-ETIQUETTE                                |   31 +-
 docs/Makefile.am                                   |    2 +-
 docs/THANKS                                        |   30 +-
 docs/TODO                                          |   49 +-
 docs/cmdline-opts/Makefile.inc                     |    3 +-
 docs/cmdline-opts/cacert.d                         |    2 +-
 docs/cmdline-opts/compressed-ssh.d                 |    7 +
 docs/cmdline-opts/form-string.d                    |    4 +-
 docs/cmdline-opts/form.d                           |   80 +-
 docs/cmdline-opts/gen.pl                           |    2 +-
 docs/cmdline-opts/request-target.d                 |    1 +
 docs/examples/.gitignore                           |    1 +
 docs/examples/10-at-a-time.c                       |    8 +-
 docs/examples/Makefile.inc                         |    9 +-
 docs/examples/anyauthput.c                         |    4 +-
 docs/examples/cacertinmem.c                        |   44 +-
 docs/examples/chkspeed.c                           |    4 +-
 docs/examples/curlx.c                              |   71 +-
 docs/examples/debug.c                              |   24 +-
 docs/examples/evhiperfifo.c                        |   24 +-
 docs/examples/fopen.c                              |   81 +-
 docs/examples/ftpget.c                             |    8 +-
 docs/examples/ftpsget.c                            |    8 +-
 docs/examples/ftpupload.c                          |    4 +-
 docs/examples/ftpuploadresume.c                    |   36 +-
 docs/examples/ghiper.c                             |   44 +-
 docs/examples/hiperfifo.c                          |   22 +-
 docs/examples/htmltidy.c                           |    6 +-
 docs/examples/http2-download.c                     |   30 +-
 docs/examples/http2-serverpush.c                   |   28 +-
 docs/examples/http2-upload.c                       |   30 +-
 docs/examples/httpput.c                            |    4 +-
 docs/examples/imap-multi.c                         |    4 +-
 docs/examples/multi-app.c                          |   12 +-
 docs/examples/multi-debugcallback.c                |   26 +-
 docs/examples/multi-double.c                       |    4 +-
 docs/examples/{multi-post.c => multi-formadd.c}    |   12 +-
 docs/examples/multi-post.c                         |   62 +-
 docs/examples/multithread.c                        |    4 +-
 docs/examples/opensslthreadlock.c                  |    4 +-
 docs/examples/pop3-multi.c                         |    4 +-
 docs/examples/post-callback.c                      |   55 +-
 docs/examples/postinmemory.c                       |    4 +-
 docs/examples/{postit2.c => postit2-formadd.c}     |   10 +-
 docs/examples/postit2.c                            |   56 +-
 docs/examples/sendrecv.c                           |    4 +-
 docs/examples/sftpget.c                            |    8 +-
 docs/examples/simplepost.c                         |    4 +-
 docs/examples/simplessl.c                          |    4 +-
 docs/examples/smooth-gtk-thread.c                  |    6 +-
 docs/examples/smtp-mail.c                          |    4 +-
 docs/examples/{smtp-mail.c => smtp-mime.c}         |  117 +-
 docs/examples/smtp-multi.c                         |    8 +-
 docs/examples/smtp-ssl.c                           |    4 +-
 docs/examples/smtp-tls.c                           |    4 +-
 docs/examples/sslbackend.c                         |   77 +
 docs/examples/synctime.c                           |   10 +-
 docs/examples/threaded-ssl.c                       |   18 +-
 docs/examples/usercertinmem.c                      |    4 +-
 docs/libcurl/Makefile.inc                          |    6 +-
 docs/libcurl/gnurl_easy_setopt.3                   |    4 +
 docs/libcurl/gnurl_formadd.3                       |   23 +-
 docs/libcurl/gnurl_formfree.3                      |    8 +-
 docs/libcurl/gnurl_formget.3                       |    7 +-
 docs/libcurl/gnurl_global_init.3                   |    3 +-
 docs/libcurl/gnurl_global_sslset.3                 |   97 +
 docs/libcurl/gnurl_mime_addpart.3                  |   66 +
 docs/libcurl/gnurl_mime_data.3                     |   69 +
 docs/libcurl/gnurl_mime_data_cb.3                  |  160 ++
 docs/libcurl/gnurl_mime_encoder.3                  |   97 +
 docs/libcurl/gnurl_mime_filedata.3                 |   77 +
 docs/libcurl/gnurl_mime_filename.3                 |   72 +
 ...GNURLOPT_REQUEST_TARGET.3 => gnurl_mime_free.3} |   46 +-
 docs/libcurl/gnurl_mime_headers.3                  |   65 +
 docs/libcurl/gnurl_mime_init.3                     |   69 +
 ...NURLINFO_SPEED_UPLOAD_T.3 => gnurl_mime_name.3} |   61 +-
 ...FO_SPEED_DOWNLOAD_T.3 => gnurl_mime_subparts.3} |   54 +-
 docs/libcurl/gnurl_mime_type.3                     |   83 +
 docs/libcurl/gnurl_version_info.3                  |    6 +-
 docs/libcurl/libgnurl-tutorial.3                   |  266 ++-
 docs/libcurl/libgnurl.3                            |    4 +
 .../opts/GNURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3     |    2 +-
 .../opts/GNURLINFO_CONTENT_LENGTH_UPLOAD_T.3       |    2 +-
 docs/libcurl/opts/GNURLINFO_PROTOCOL.3             |    2 +-
 .../opts/GNURLINFO_PROXY_SSL_VERIFYRESULT.3        |    2 +-
 docs/libcurl/opts/GNURLINFO_SCHEME.3               |    2 +-
 docs/libcurl/opts/GNURLINFO_SIZE_DOWNLOAD_T.3      |    2 +-
 docs/libcurl/opts/GNURLINFO_SIZE_UPLOAD_T.3        |    2 +-
 docs/libcurl/opts/GNURLINFO_SPEED_DOWNLOAD_T.3     |    2 +-
 docs/libcurl/opts/GNURLINFO_SPEED_UPLOAD_T.3       |    2 +-
 docs/libcurl/opts/GNURLOPT_ABSTRACT_UNIX_SOCKET.3  |    2 +-
 docs/libcurl/opts/GNURLOPT_CAPATH.3                |    5 +-
 docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3        |    4 +
 docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT_MS.3     |    4 +
 docs/libcurl/opts/GNURLOPT_HTTPPOST.3              |   11 +-
 docs/libcurl/opts/GNURLOPT_INTERLEAVEDATA.3        |    7 +-
 docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3    |    8 +-
 docs/libcurl/opts/GNURLOPT_KEEP_SENDING_ON_ERROR.3 |    2 +-
 ...URLOPT_REQUEST_TARGET.3 => GNURLOPT_MIMEPOST.3} |   46 +-
 docs/libcurl/opts/GNURLOPT_NOPROXY.3               |    7 +-
 docs/libcurl/opts/GNURLOPT_PRE_PROXY.3             |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY.3                 |    3 +-
 docs/libcurl/opts/GNURLOPT_PROXY_CAINFO.3          |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_CAPATH.3          |    7 +-
 docs/libcurl/opts/GNURLOPT_PROXY_CRLFILE.3         |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_KEYPASSWD.3       |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_PINNEDPUBLICKEY.3 |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLCERT.3         |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLCERTTYPE.3     |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLKEY.3          |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLKEYTYPE.3      |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3      |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSL_CIPHER_LIST.3 |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSL_OPTIONS.3     |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSL_VERIFYHOST.3  |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_SSL_VERIFYPEER.3  |    2 +-
 .../libcurl/opts/GNURLOPT_PROXY_TLSAUTH_PASSWORD.3 |    2 +-
 docs/libcurl/opts/GNURLOPT_PROXY_TLSAUTH_TYPE.3    |    2 +-
 .../libcurl/opts/GNURLOPT_PROXY_TLSAUTH_USERNAME.3 |    2 +-
 docs/libcurl/opts/GNURLOPT_REQUEST_TARGET.3        |    2 +-
 docs/libcurl/opts/GNURLOPT_SOCKS5_AUTH.3           |    2 +-
 ...REQUEST_TARGET.3 => GNURLOPT_SSH_COMPRESSION.3} |   34 +-
 docs/libcurl/opts/GNURLOPT_SSL_CTX_DATA.3          |    4 +-
 .../opts/GNURLOPT_SUPPRESS_CONNECT_HEADERS.3       |    2 +-
 docs/libcurl/opts/GNURLOPT_USERPWD.3               |    1 +
 docs/libcurl/opts/Makefile.inc                     |   32 +-
 docs/libcurl/symbols-in-versions                   |   64 +-
 include/README                                     |    2 +-
 include/gnurl/curl.h                               |  230 ++-
 include/gnurl/curlver.h                            |    8 +-
 include/gnurl/multi.h                              |    2 +-
 include/gnurl/system.h                             |  112 +-
 include/gnurl/typecheck-gcc.h                      |    6 +
 lib/Makefile.am                                    |   20 +-
 lib/Makefile.inc                                   |    5 +-
 lib/Makefile.m32                                   |   32 +-
 lib/asyn-ares.c                                    |    4 +-
 lib/asyn-thread.c                                  |   21 +-
 lib/checksrc.pl                                    |   55 +-
 lib/config-dos.h                                   |    6 +-
 lib/config-tpf.h                                   |    3 +
 lib/config-win32.h                                 |    6 +
 lib/config-win32ce.h                               |    3 +
 lib/connect.c                                      |   41 +-
 lib/content_encoding.c                             |    6 +-
 lib/cookie.c                                       |  142 +-
 lib/cookie.h                                       |   11 +-
 lib/curl_addrinfo.c                                |    6 +-
 lib/curl_config.h.cmake                            |    9 +-
 lib/curl_fnmatch.c                                 |   12 +-
 lib/curl_ntlm_core.c                               |   92 +-
 lib/curl_ntlm_core.h                               |   14 +-
 lib/curl_ntlm_wb.c                                 |    7 +-
 lib/curl_sasl.c                                    |    6 +-
 lib/curl_setup.h                                   |   17 +-
 lib/dict.c                                         |   14 +-
 lib/dotdot.c                                       |   30 +-
 lib/easy.c                                         |   16 +-
 lib/escape.c                                       |   26 +-
 lib/file.c                                         |   39 +-
 lib/formdata.c                                     |  888 ++--------
 lib/formdata.h                                     |   54 +-
 lib/ftp.c                                          |  167 +-
 lib/ftp.h                                          |    1 +
 lib/ftplistparser.c                                |   38 +-
 lib/getinfo.c                                      |   65 +-
 lib/gopher.c                                       |   10 +-
 lib/hash.c                                         |    4 +-
 lib/hostcheck.c                                    |   14 +-
 lib/hostip.c                                       |   12 +-
 lib/hostip4.c                                      |    4 +-
 lib/hostip6.c                                      |    4 +-
 lib/http.c                                         |  425 ++---
 lib/http.h                                         |    6 +-
 lib/http2.c                                        |   11 +-
 lib/http_chunks.c                                  |   26 +-
 lib/http_ntlm.c                                    |   13 +-
 lib/http_proxy.c                                   |   30 +-
 lib/if2ip.c                                        |    6 +-
 lib/imap.c                                         |  118 +-
 lib/imap.h                                         |    3 +-
 lib/inet_ntop.c                                    |    2 +-
 lib/ldap.c                                         |    4 +-
 lib/memdebug.c                                     |   18 +-
 lib/mime.c                                         | 1860 ++++++++++++++++++++
 lib/mime.h                                         |  135 ++
 lib/mprintf.c                                      |   38 +-
 lib/multi.c                                        |   62 +-
 lib/netrc.c                                        |   39 +-
 lib/non-ascii.c                                    |   83 +-
 lib/non-ascii.h                                    |    4 +-
 lib/openldap.c                                     |   12 +-
 lib/parsedate.c                                    |   64 +-
 lib/pingpong.c                                     |   28 +-
 lib/progress.c                                     |   56 +-
 lib/progress.h                                     |    2 +-
 lib/rtsp.c                                         |   20 +-
 lib/security.c                                     |    4 +-
 lib/sendf.c                                        |   20 +-
 lib/smtp.c                                         |   40 +-
 lib/socks.c                                        |   22 +-
 lib/socks_gssapi.c                                 |   59 +-
 lib/socks_sspi.c                                   |   24 +-
 lib/splay.c                                        |    2 +-
 lib/splay.h                                        |    4 +-
 lib/ssh.c                                          |   54 +-
 lib/strcase.c                                      |   11 +-
 lib/strdup.c                                       |    6 +-
 lib/strtoofft.c                                    |   63 +-
 lib/strtoofft.h                                    |   37 +-
 lib/telnet.c                                       |   30 +-
 lib/tftp.c                                         |   59 +-
 lib/transfer.c                                     |  140 +-
 lib/transfer.h                                     |    5 +-
 lib/url.c                                          |  254 +--
 lib/urldata.h                                      |  196 +--
 lib/vauth/digest_sspi.c                            |    4 +-
 lib/vauth/ntlm.c                                   |   16 +-
 lib/vauth/ntlm_sspi.c                              |    9 +-
 lib/vauth/vauth.h                                  |    5 +-
 lib/version.c                                      |    8 +-
 lib/vtls/axtls.c                                   |  190 +-
 lib/vtls/axtls.h                                   |   39 +-
 lib/vtls/cyassl.c                                  |  223 ++-
 lib/vtls/cyassl.h                                  |   63 +-
 lib/vtls/darwinssl.c                               |  450 +++--
 lib/vtls/darwinssl.h                               |   71 +-
 lib/vtls/gskit.c                                   |  191 +-
 lib/vtls/gskit.h                                   |   38 +-
 lib/vtls/gtls.c                                    |  210 ++-
 lib/vtls/gtls.h                                    |   64 +-
 lib/vtls/mbedtls.c                                 |  237 ++-
 lib/vtls/mbedtls.h                                 |   52 +-
 lib/vtls/nss.c                                     |  217 ++-
 lib/vtls/nssg.h                                    |   71 +-
 lib/vtls/openssl.c                                 |  574 ++++--
 lib/vtls/openssl.h                                 |   91 +-
 lib/vtls/polarssl.c                                |  198 ++-
 lib/vtls/polarssl.h                                |   52 +-
 lib/vtls/polarssl_threadlock.c                     |    4 +-
 lib/vtls/schannel.c                                |  532 +++---
 lib/vtls/schannel.h                                |   89 +-
 lib/vtls/vtls.c                                    |  499 +++++-
 lib/vtls/vtls.h                                    |   82 +-
 lib/warnless.c                                     |   32 +-
 lib/wildcard.h                                     |    2 +
 m4/curl-compilers.m4                               |    9 +-
 m4/curl-confopts.m4                                |    8 +-
 packages/OS400/curl.inc.in                         |    4 +
 projects/build-openssl.bat                         |   11 +
 scripts/contributors.sh                            |    2 +-
 scripts/contrithanks.sh                            |    2 +-
 scripts/updatemanpages.pl                          |    2 +-
 scripts/zsh.pl                                     |    5 +-
 src/Makefile.am                                    |    3 +-
 src/Makefile.inc                                   |    2 -
 src/Makefile.m32                                   |   32 +-
 src/tool_cb_dbg.c                                  |   29 +-
 src/tool_cb_hdr.c                                  |    2 +-
 src/tool_cb_prg.c                                  |    4 +-
 src/tool_cfgable.c                                 |    8 +-
 src/tool_cfgable.h                                 |    5 +-
 src/tool_easysrc.c                                 |   20 +-
 src/tool_easysrc.h                                 |    4 +-
 src/tool_formparse.c                               |  713 ++++++--
 src/tool_formparse.h                               |    6 +-
 src/tool_getparam.c                                |   39 +-
 src/tool_help.c                                    |   11 +-
 src/tool_main.c                                    |    9 +
 src/tool_metalink.c                                |   19 +-
 src/tool_mfiles.c                                  |  127 --
 src/tool_mfiles.h                                  |   46 -
 src/tool_msgs.c                                    |    4 +-
 src/tool_operate.c                                 |  110 +-
 src/tool_paramhlp.c                                |   36 +-
 src/tool_parsecfg.c                                |    4 +-
 src/tool_sdecls.h                                  |    4 +-
 src/tool_setopt.c                                  |  303 +++-
 src/tool_setopt.h                                  |   12 +-
 src/tool_strdup.c                                  |    6 +-
 src/tool_urlglob.c                                 |   24 +-
 tests/FILEFORMAT                                   |    3 +
 tests/curl_test_data.py                            |   21 +-
 tests/data/Makefile.inc                            |   23 +-
 tests/data/test1053                                |    2 -
 tests/data/test1133                                |    4 +-
 tests/data/test1135                                |   17 +-
 tests/data/test1139                                |   27 +
 tests/data/test1149                                |   64 +
 tests/data/test1150                                |   55 +
 tests/data/test1151                                |   66 +
 tests/data/test1152                                |   61 +
 tests/data/test1153                                |   61 +
 tests/data/test1160                                |   49 +
 tests/data/test1161                                |   54 +
 tests/data/test1315                                |    4 +-
 tests/data/test1401                                |    4 +-
 tests/data/test1404                                |   67 +-
 tests/data/test1449                                |   38 +
 tests/data/test1453                                |   38 +
 tests/data/test158                                 |    1 -
 tests/data/test163                                 |    1 -
 tests/data/test166                                 |    1 -
 tests/data/test173                                 |    6 +-
 tests/data/test186                                 |    5 +-
 tests/data/test1904                                |   79 +
 tests/data/test2056                                |   87 +
 tests/data/test2057                                |  108 ++
 tests/data/test259                                 |    6 +-
 tests/data/test277                                 |    5 +-
 tests/data/test4                                   |   10 +-
 tests/data/test46                                  |    4 +-
 tests/data/test506                                 |   16 +-
 tests/data/test554                                 |    2 -
 tests/data/test564                                 |    2 +
 tests/data/test587                                 |    1 -
 tests/data/test589                                 |   55 +
 tests/data/test642                                 |   42 +
 tests/data/{test554 => test643}                    |   13 +-
 tests/data/{test587 => test644}                    |    8 +-
 tests/data/{test554 => test645}                    |   27 +-
 tests/data/test646                                 |   98 ++
 tests/data/test647                                 |   79 +
 tests/data/test648                                 |   75 +
 tests/data/test649                                 |   72 +
 tests/data/test650                                 |  122 ++
 tests/data/test71                                  |    1 -
 tests/data/test800                                 |    4 +-
 tests/data/test846                                 |   50 +
 tests/data/test856                                 |    3 +
 tests/data/test9                                   |    1 -
 tests/ftpserver.pl                                 |   15 +-
 tests/fuzz/Makefile.am                             |   19 +-
 tests/fuzz/Makefile.inc                            |   26 +-
 tests/fuzz/README                                  |   13 +-
 tests/fuzz/corpus.py                               |   96 +
 tests/fuzz/curl_fuzz_data/oss-fuzz-3327            |  Bin 0 -> 27 bytes
 tests/fuzz/curl_fuzz_data/test1                    |  Bin 0 -> 289 bytes
 tests/fuzz/curl_fuzz_data/test10                   |  Bin 0 -> 226 bytes
 tests/fuzz/curl_fuzz_data/test100                  |  Bin 0 -> 675 bytes
 tests/fuzz/curl_fuzz_data/test12                   |  Bin 0 -> 464 bytes
 tests/fuzz/curl_fuzz_data/test13                   |  Bin 0 -> 179 bytes
 tests/fuzz/curl_fuzz_data/test1326                 |  Bin 0 -> 62 bytes
 tests/fuzz/curl_fuzz_data/test1450                 |  Bin 0 -> 98 bytes
 tests/fuzz/curl_fuzz_data/test2                    |  Bin 0 -> 182 bytes
 tests/fuzz/curl_fuzz_data/test271                  |  Bin 0 -> 74 bytes
 tests/fuzz/curl_fuzz_data/test3                    |  Bin 0 -> 242 bytes
 tests/fuzz/curl_fuzz_data/test4                    |  Bin 0 -> 336 bytes
 tests/fuzz/curl_fuzz_data/test5                    |  Bin 0 -> 185 bytes
 tests/fuzz/curl_fuzz_data/test6                    |  Bin 0 -> 223 bytes
 tests/fuzz/curl_fuzz_data/test800                  |  Bin 0 -> 137 bytes
 tests/fuzz/curl_fuzz_data/test850                  |  Bin 0 -> 130 bytes
 tests/fuzz/curl_fuzz_data/test900                  |  Bin 0 -> 129 bytes
 tests/fuzz/curl_fuzzer.cc                          |  447 +++++
 tests/fuzz/curl_fuzzer.h                           |  186 ++
 tests/fuzz/generate_corpus.py                      |  132 ++
 tests/fuzz/read_corpus.py                          |   69 +
 tests/fuzz/standalone_fuzz_target_runner.cc        |   89 +
 src/tool_formparse.h => tests/fuzz/testinput.h     |   14 +-
 tests/libtest/.gitignore                           |    3 +
 tests/libtest/Makefile.am                          |   15 +
 tests/libtest/Makefile.inc                         |   18 +-
 tests/libtest/first.c                              |   14 +-
 tests/libtest/lib1501.c                            |    4 +-
 tests/libtest/lib1502.c                            |    4 +-
 tests/libtest/lib1506.c                            |   12 +-
 tests/libtest/lib1507.c                            |    4 +-
 tests/libtest/lib1510.c                            |    6 +-
 tests/libtest/lib1512.c                            |    6 +-
 tests/libtest/lib1513.c                            |    4 +-
 tests/libtest/lib1515.c                            |    5 +-
 tests/libtest/lib1517.c                            |    4 +-
 tests/libtest/lib1531.c                            |    8 +-
 tests/libtest/lib1538.c                            |    7 +-
 tests/libtest/lib1550.c                            |   13 +-
 tests/libtest/lib1551.c                            |    2 +
 tests/libtest/lib1900.c                            |   14 +-
 tests/libtest/lib500.c                             |    4 +-
 tests/libtest/lib502.c                             |    4 +-
 tests/libtest/lib503.c                             |    4 +-
 tests/libtest/lib504.c                             |    4 +-
 tests/libtest/lib505.c                             |    4 +-
 tests/libtest/lib506.c                             |    8 +-
 tests/libtest/lib507.c                             |    4 +-
 tests/libtest/lib508.c                             |    4 +-
 tests/libtest/lib510.c                             |    4 +-
 tests/libtest/lib513.c                             |    4 +-
 tests/libtest/lib514.c                             |    4 +-
 tests/libtest/lib515.c                             |    4 +-
 tests/libtest/lib516.c                             |    4 +-
 tests/libtest/lib517.c                             |    4 +-
 tests/libtest/lib525.c                             |    4 +-
 tests/libtest/lib526.c                             |   12 +-
 tests/libtest/lib530.c                             |   10 +-
 tests/libtest/lib533.c                             |    6 +-
 tests/libtest/lib536.c                             |    4 +-
 tests/libtest/lib540.c                             |   10 +-
 tests/libtest/lib543.c                             |   12 +-
 tests/libtest/lib544.c                             |    4 +-
 tests/libtest/lib547.c                             |    4 +-
 tests/libtest/lib552.c                             |   36 +-
 tests/libtest/lib553.c                             |    8 +-
 tests/libtest/lib554.c                             |    8 +-
 tests/libtest/lib555.c                             |    8 +-
 tests/libtest/lib557.c                             |   93 +-
 tests/libtest/lib560.c                             |    4 +-
 tests/libtest/lib564.c                             |    4 +-
 tests/libtest/lib567.c                             |    4 +-
 tests/libtest/lib568.c                             |    6 +-
 tests/libtest/lib569.c                             |    4 +-
 tests/libtest/lib570.c                             |    4 +-
 tests/libtest/lib571.c                             |    6 +-
 tests/libtest/lib572.c                             |    6 +-
 tests/libtest/lib573.c                             |    4 +-
 tests/libtest/lib575.c                             |    4 +-
 tests/libtest/lib578.c                             |    4 +-
 tests/libtest/lib579.c                             |    4 +-
 tests/libtest/lib586.c                             |   10 +-
 tests/libtest/{lib516.c => lib589.c}               |    6 +-
 tests/libtest/lib591.c                             |    4 +-
 tests/libtest/lib597.c                             |   11 +-
 tests/libtest/lib599.c                             |    4 +-
 tests/libtest/lib643.c                             |  270 +++
 tests/libtest/lib650.c                             |  189 ++
 tests/libtest/libntlmconnect.c                     |    4 +-
 tests/libtest/mk-lib1521.pl                        |   12 +-
 tests/libtest/stub_gssapi.c                        |  397 +++++
 tests/libtest/stub_gssapi.h                        |  183 ++
 tests/libtest/testtrace.c                          |   22 +-
 tests/runtests.pl                                  |   69 +-
 tests/server/fake_ntlm.c                           |   13 +-
 tests/server/getpart.c                             |   42 +-
 tests/server/resolve.c                             |    6 +-
 tests/server/rtspd.c                               |   42 +-
 tests/server/sockfilt.c                            |   16 +-
 tests/server/sws.c                                 |   67 +-
 tests/server/tftpd.c                               |   14 +-
 tests/server/util.c                                |    8 +-
 tests/unit/unit1300.c                              |    2 +-
 tests/unit/unit1301.c                              |    4 +-
 tests/unit/unit1302.c                              |    6 +-
 tests/unit/unit1303.c                              |    8 +-
 tests/unit/unit1305.c                              |    4 +-
 tests/unit/unit1308.c                              |    6 +-
 tests/unit/unit1309.c                              |   18 +-
 tests/unit/unit1323.c                              |    2 +-
 tests/unit/unit1395.c                              |    4 +-
 tests/unit/unit1396.c                              |   12 +-
 tests/unit/unit1398.c                              |    4 +-
 tests/unit/unit1399.c                              |   95 +-
 tests/unit/unit1600.c                              |    8 +-
 tests/unit/unit1605.c                              |   15 +-
 tests/unit/unit1606.c                              |   36 +-
 winbuild/MakefileBuild.vc                          |    2 +-
 468 files changed, 14486 insertions(+), 6646 deletions(-)

diff --cc .gitignore
index 13d10a67f,e567b38c4..8d6042fd0
--- a/.gitignore
+++ b/.gitignore
@@@ -52,5 -52,7 +52,8 @@@ missin
  mkinstalldirs
  tags
  test-driver
 -scripts/_curl
 +scripts/_gnurl
- \#*\#
++\#*\#
+ curl_fuzzer
+ curl_fuzzer_seed_corpus.zip
+ libstandaloneengine.a
diff --cc CMakeLists.txt
index be3fb4b3c,261baba5c..c816467b6
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -190,38 -203,20 +203,22 @@@ if(ENABLE_IPV6 AND NOT WIN32
    endif()
  endif()
  
- option(ENABLE_MANUAL "to provide the built-in manual" ON)
- unset(USE_MANUAL CACHE) # TODO: cache NROFF/NROFF_MANOPT/USE_MANUAL vars?
+ CURL_NROFF_CHECK()
+ find_package(Perl)
+ 
+ CMAKE_DEPENDENT_OPTION(ENABLE_MANUAL "to provide the built-in manual"
+     ON "NROFF_USEFUL;PERL_FOUND"
+     OFF)
+ 
+ if(NOT PERL_FOUND)
+   message(STATUS "Perl not found, testing disabled.")
+   set(BUILD_TESTING OFF)
+ endif()
  if(ENABLE_MANUAL)
-   find_program(NROFF NAMES gnroff nroff)
-   if(NROFF)
-     # Need a way to write to stdin, this will do
-     file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test")
-     # Tests for a valid nroff option to generate a manpage
-     foreach(_MANOPT "-man" "-mandoc")
-       execute_process(COMMAND "${NROFF}" ${_MANOPT}
-         OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT
-         INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt"
-         ERROR_QUIET)
-       # Save the option if it was valid
-       if(NROFF_MANOPT_OUTPUT)
-         message("Found *nroff option: -- ${_MANOPT}")
-         set(NROFF_MANOPT ${_MANOPT})
-         set(USE_MANUAL 1)
-         break()
-       endif()
-     endforeach()
-     # No need for the temporary file
-     file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt")
-     if(NOT USE_MANUAL)
-       message(WARNING "Found no *nroff option to get plaintext from man 
pages")
-     endif()
-   else()
-     message(WARNING "Found no *nroff program")
-   endif()
+   set(USE_MANUAL ON)
  endif()
 +# Required for building manual, docs, tests
 +find_package(Perl REQUIRED)
  
  # We need ansi c-flags, especially on HP
  set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
diff --cc configure.ac
index c27c516e4,4d5018d91..0bd697327
mode 100644,100755..100755
--- a/configure.ac
+++ b/configure.ac
@@@ -122,8 -122,9 +122,9 @@@ AC_SUBST([AR]
  AC_SUBST(libext)
  
  dnl figure out the libcurl version
 -CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' 
${srcdir}/include/curl/curlver.h`
 +CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' 
${srcdir}/include/gnurl/curlver.h`
  XC_CHECK_PROG_CC
+ AC_PROG_CXX
  XC_AUTOMAKE
  AC_MSG_CHECKING([curl version])
  AC_MSG_RESULT($CURLVERSION)
diff --cc docs/TODO
index dde2994b6,264d559ad..18896b070
--- a/docs/TODO
+++ b/docs/TODO
@@@ -560,16 -537,7 +537,6 @@@ This is not detailed in any FTP specifi
  
   https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01
  
- 5.11 Chunked transfer multipart formpost
- 
-  For a case where the file is being made during the upload is progressing
-  (like passed on stdin to the curl tool), we cannot know the size before-hand
-  and we rather not read the entire thing into memory before it can start the
-  upload.
- 
-  https://github.com/curl/curl/issues/1139
- 
--
  6. TELNET
  
  6.1 ditch stdin
diff --cc docs/cmdline-opts/gen.pl
index 6f67be6c1,73ea6d47b..642170988
--- a/docs/cmdline-opts/gen.pl
+++ b/docs/cmdline-opts/gen.pl
@@@ -179,9 -179,9 +179,9 @@@ sub single 
      }
  
      if($standalone) {
-         print ".TH gnurl 1 \"30 Nov 2016\" \"gnurl 7.52.0\" \"curl 
manual\"\n";
 -        print ".TH curl 1 \"30 Nov 2016\" \"curl 7.52.0\" \"curl manual\"\n";
++        print ".TH gnurl 1 \"30 Nov 2016\" \"gnurl 7.52.0\" \"gnurl 
manual\"\n";
          print ".SH OPTION\n";
 -        print "curl $opt\n";
 +        print "gnurl $opt\n";
      }
      else {
          print ".IP \"$opt\"\n";
diff --cc docs/examples/fopen.c
index d559658a7,eb27c6ae9..590f41a85
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@@ -55,12 -55,12 +55,12 @@@
  #include <stdlib.h>
  #include <errno.h>
  
 -#include <curl/curl.h>
 +#include <gnurl/curl.h>
  
  enum fcurl_type_e {
-   CFTYPE_NONE=0,
-   CFTYPE_FILE=1,
-   CFTYPE_CURL=2
+   CFTYPE_NONE = 0,
+   CFTYPE_FILE = 1,
+   CFTYPE_CURL = 2
  };
  
  struct fcurl_data
diff --cc docs/examples/ftpuploadresume.c
index 4b6d6677e,fc7f803d1..c966c76e9
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@@ -26,23 -26,11 +26,11 @@@
  
  #include <stdlib.h>
  #include <stdio.h>
- 
 -#include <curl/curl.h>
 +#include <gnurl/curl.h>
  
- #if defined(_MSC_VER) && (_MSC_VER < 1300)
- #  error _snscanf requires MSVC 7.0 or later.
- #endif
- 
- /* The MinGW headers are missing a few Win32 function definitions,
-    you shouldn't need this if you use VC++ */
- #if defined(__MINGW32__) && !defined(__MINGW64__)
- int __cdecl _snscanf(const char *input, size_t length,
-                      const char *format, ...);
- #endif
- 
- 
  /* parse headers for Content-Length */
- size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void 
*stream)
+ static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb,
+                                    void *stream)
  {
    int r;
    long len = 0;
diff --cc docs/examples/post-callback.c
index ad4d62b6b,ebb4e2a25..324767bc1
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@@ -26,9 -25,16 +25,16 @@@
   */
  #include <stdio.h>
  #include <string.h>
 -#include <curl/curl.h>
 +#include <gnurl/curl.h>
  
- static const char data[]="this is what we post to the silly web server";
+ /* silly test data to POST */
+ static const char data[]="Lorem ipsum dolor sit amet, consectetur adipiscing "
+   "elit. Sed vel urna neque. Ut quis leo metus. Quisque eleifend, ex at "
+   "laoreet rhoncus, odio ipsum semper metus, at tempus ante urna in mauris. "
+   "Suspendisse ornare tempor venenatis. Ut dui neque, pellentesque a varius "
+   "eget, mattis vitae ligula. Fusce ut pharetra est. Ut ullamcorper mi ac "
+   "sollicitudin semper. Praesent sit amet tellus varius, posuere nulla non, "
+   "rhoncus ipsum.";
  
  struct WriteThis {
    const char *readptr;
diff --cc docs/libcurl/Makefile.inc
index b4e49af9a,86a002680..fc7a7472b
--- a/docs/libcurl/Makefile.inc
+++ b/docs/libcurl/Makefile.inc
@@@ -1,20 -1,24 +1,24 @@@
  # Shared between Makefile.am and CMakeLists.txt
  
 -man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3      \
 -  curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3           \
 -  curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3            \
 -  curl_slist_append.3 curl_slist_free_all.3 curl_version.3               \
 -  curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3          \
 -  curl_strequal.3 curl_strnequal.3  curl_mprintf.3 curl_global_init.3    \
 -  curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3     \
 -  curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3            \
 -  curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3   \
 -  curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3         \
 -  libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3  \
 -  curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3     \
 -  libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3                \
 -  curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3           \
 -  curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3                \
 -  curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3                    \
 -  curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3         \
 -  libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3          \
 -  curl_mime_init.3 curl_mime_free.3 curl_mime_addpart.3 curl_mime_name.3 \
 -  curl_mime_data.3 curl_mime_data_cb.3 curl_mime_filedata.3              \
 -  curl_mime_filename.3 curl_mime_subparts.3                              \
 -  curl_mime_type.3 curl_mime_headers.3 curl_mime_encoder.3
 +man_MANS = gnurl_easy_cleanup.3 gnurl_easy_getinfo.3 gnurl_easy_init.3      \
 +  gnurl_easy_perform.3 gnurl_easy_setopt.3 gnurl_easy_duphandle.3           \
 +  gnurl_formadd.3 gnurl_formfree.3 gnurl_getdate.3 gnurl_getenv.3            \
 +  gnurl_slist_append.3 gnurl_slist_free_all.3 gnurl_version.3               \
 +  gnurl_version_info.3 gnurl_escape.3 gnurl_unescape.3 gnurl_free.3          \
 +  gnurl_strequal.3 gnurl_strnequal.3 gnurl_mprintf.3 gnurl_global_init.3     \
 +  gnurl_global_cleanup.3 gnurl_multi_add_handle.3 gnurl_multi_cleanup.3     \
 +  gnurl_multi_fdset.3 gnurl_multi_info_read.3 gnurl_multi_init.3            \
 +  gnurl_multi_perform.3 gnurl_multi_remove_handle.3 gnurl_share_cleanup.3   \
 +  gnurl_share_init.3 gnurl_share_setopt.3 libgnurl.3 libgnurl-easy.3         \
 +  libgnurl-multi.3 libgnurl-share.3 libgnurl-errors.3 gnurl_easy_strerror.3  \
 +  gnurl_multi_strerror.3 gnurl_share_strerror.3 gnurl_global_init_mem.3     \
 +  libgnurl-tutorial.3 gnurl_easy_reset.3 gnurl_easy_escape.3                \
 +  gnurl_easy_unescape.3 gnurl_multi_setopt.3 gnurl_multi_socket.3           \
 +  gnurl_multi_timeout.3 gnurl_formget.3 gnurl_multi_assign.3                \
 +  gnurl_easy_pause.3 gnurl_easy_recv.3 gnurl_easy_send.3                    \
 +  gnurl_multi_socket_action.3 gnurl_multi_wait.3 libgnurl-symbols.3         \
-   libgnurl-thread.3 gnurl_multi_socket_all.3
++  libgnurl-thread.3 gnurl_multi_socket_all.3 gnurl_global_sslset.3           \
++  gnurl_mime_init.3 gnurl_mime_free.3 gnurl_mime_addpart.3 gnurl_mime_name.3 \
++  gnurl_mime_data.3 gnurl_mime_data_cb.3 gnurl_mime_filedata.3              \
++  gnurl_mime_filename.3 gnurl_mime_subparts.3                              \
++  gnurl_mime_type.3 gnurl_mime_headers.3 gnurl_mime_encoder.3
diff --cc docs/libcurl/gnurl_easy_setopt.3
index f756852ba,000000000..cafcf0819
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_easy_setopt.3
+++ b/docs/libcurl/gnurl_easy_setopt.3
@@@ -1,596 -1,0 +1,600 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH curl_easy_setopt 3 "25 Jun 2014" "libcurl 7.38.0" "libcurl Manual"
 +.SH NAME
 +curl_easy_setopt \- set options for a curl easy handle
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
 +.SH DESCRIPTION
 +\fIcurl_easy_setopt(3)\fP is used to tell libcurl how to behave. By setting
 +the appropriate options, the application can change libcurl's behavior.  All
 +options are set with an \fIoption\fP followed by a \fIparameter\fP. That
 +parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
 +pointer\fP or a \fBcurl_off_t\fP, 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. A typical
 +application uses many \fIcurl_easy_setopt(3)\fP calls in the setup phase.
 +
 +Options set with this function call are valid for all forthcoming transfers
 +performed using this \fIhandle\fP.  The options are not in any way reset
 +between transfers, so if you want subsequent transfers with different options,
 +you must change them between the transfers. You can optionally reset all
 +options back to internal default with \fIcurl_easy_reset(3)\fP.
 +
 +Strings passed to libcurl as 'char *' arguments, are copied by the library;
 +thus the string storage associated to the pointer argument may be overwritten
 +after \fIcurl_easy_setopt(3)\fP returns. The only exception to this rule is
 +really \fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string
 +\fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to
 +read up on.
 +
 +The order in which the options are set does not matter.
 +
 +Before version 7.17.0, strings were not copied. Instead the user was forced
 +keep them available until libcurl no longer needed them.
 +
 +The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
 +\fIcurl_easy_duphandle(3)\fP call.
 +.SH BEHAVIOR OPTIONS
 +.IP CURLOPT_VERBOSE
 +Display verbose information. See \fICURLOPT_VERBOSE(3)\fP
 +.IP CURLOPT_HEADER
 +Include the header in the body output. See \fICURLOPT_HEADER(3)\fP
 +.IP CURLOPT_NOPROGRESS
 +Shut off the progress meter. See \fICURLOPT_NOPROGRESS(3)\fP
 +.IP CURLOPT_NOSIGNAL
 +Do not install signal handlers. See \fICURLOPT_NOSIGNAL(3)\fP
 +.IP CURLOPT_WILDCARDMATCH
 +Transfer multiple files according to a file name pattern. See 
\fICURLOPT_WILDCARDMATCH(3)\fP
 +.SH CALLBACK OPTIONS
 +.IP CURLOPT_WRITEFUNCTION
 +Callback for writing data. See \fICURLOPT_WRITEFUNCTION(3)\fP
 +.IP CURLOPT_WRITEDATA
 +Data pointer to pass to the write callback. See \fICURLOPT_WRITEDATA(3)\fP
 +.IP CURLOPT_READFUNCTION
 +Callback for reading data. See \fICURLOPT_READFUNCTION(3)\fP
 +.IP CURLOPT_READDATA
 +Data pointer to pass to the read callback. See \fICURLOPT_READDATA(3)\fP
 +.IP CURLOPT_IOCTLFUNCTION
 +Callback for I/O operations. See \fICURLOPT_IOCTLFUNCTION(3)\fP
 +.IP CURLOPT_IOCTLDATA
 +Data pointer to pass to the I/O callback. See \fICURLOPT_IOCTLDATA(3)\fP
 +.IP CURLOPT_SEEKFUNCTION
 +Callback for seek operations. See \fICURLOPT_SEEKFUNCTION(3)\fP
 +.IP CURLOPT_SEEKDATA
 +Data pointer to pass to the seek callback. See \fICURLOPT_SEEKDATA(3)\fP
 +.IP CURLOPT_SOCKOPTFUNCTION
 +Callback for sockopt operations. See \fICURLOPT_SOCKOPTFUNCTION(3)\fP
 +.IP CURLOPT_SOCKOPTDATA
 +Data pointer to pass to the sockopt callback. See \fICURLOPT_SOCKOPTDATA(3)\fP
 +.IP CURLOPT_OPENSOCKETFUNCTION
 +Callback for socket creation. See \fICURLOPT_OPENSOCKETFUNCTION(3)\fP
 +.IP CURLOPT_OPENSOCKETDATA
 +Data pointer to pass to the open socket callback. See 
\fICURLOPT_OPENSOCKETDATA(3)\fP
 +.IP CURLOPT_CLOSESOCKETFUNCTION
 +Callback for closing socket. See \fICURLOPT_CLOSESOCKETFUNCTION(3)\fP
 +.IP CURLOPT_CLOSESOCKETDATA
 +Data pointer to pass to the close socket callback. See 
\fICURLOPT_CLOSESOCKETDATA(3)\fP
 +.IP CURLOPT_PROGRESSFUNCTION
 +OBSOLETE callback for progress meter. See \fICURLOPT_PROGRESSFUNCTION(3)\fP
 +.IP CURLOPT_PROGRESSDATA
 +Data pointer to pass to the progress meter callback. See 
\fICURLOPT_PROGRESSDATA(3)\fP
 +.IP CURLOPT_XFERINFOFUNCTION
 +Callback for progress meter. See \fICURLOPT_XFERINFOFUNCTION(3)\fP
 +.IP CURLOPT_XFERINFODATA
 +Data pointer to pass to the progress meter callback. See 
\fICURLOPT_XFERINFODATA(3)\fP
 +.IP CURLOPT_HEADERFUNCTION
 +Callback for writing received headers. See \fICURLOPT_HEADERFUNCTION(3)\fP
 +.IP CURLOPT_HEADERDATA
 +Data pointer to pass to the header callback. See \fICURLOPT_HEADERDATA(3)\fP
 +.IP CURLOPT_DEBUGFUNCTION
 +Callback for debug information. See \fICURLOPT_DEBUGFUNCTION(3)\fP
 +.IP CURLOPT_DEBUGDATA
 +Data pointer to pass to the debug callback. See \fICURLOPT_DEBUGDATA(3)\fP
 +.IP CURLOPT_SSL_CTX_FUNCTION
 +Callback for SSL context logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP
 +.IP CURLOPT_SSL_CTX_DATA
 +Data pointer to pass to the SSL context callback. See 
\fICURLOPT_SSL_CTX_DATA(3)\fP
 +.IP CURLOPT_CONV_TO_NETWORK_FUNCTION
 +Callback for code base conversion. See 
\fICURLOPT_CONV_TO_NETWORK_FUNCTION(3)\fP
 +.IP CURLOPT_CONV_FROM_NETWORK_FUNCTION
 +Callback for code base conversion. See 
\fICURLOPT_CONV_FROM_NETWORK_FUNCTION(3)\fP
 +.IP CURLOPT_CONV_FROM_UTF8_FUNCTION
 +Callback for code base conversion. See 
\fICURLOPT_CONV_FROM_UTF8_FUNCTION(3)\fP
 +.IP CURLOPT_INTERLEAVEFUNCTION
 +Callback for RTSP interleaved data. See \fICURLOPT_INTERLEAVEFUNCTION(3)\fP
 +.IP CURLOPT_INTERLEAVEDATA
 +Data pointer to pass to the RTSP interleave callback. See 
\fICURLOPT_INTERLEAVEDATA(3)\fP
 +.IP CURLOPT_CHUNK_BGN_FUNCTION
 +Callback for wildcard download start of chunk. See 
\fICURLOPT_CHUNK_BGN_FUNCTION(3)\fP
 +.IP CURLOPT_CHUNK_END_FUNCTION
 +Callback for wildcard download end of chunk. See 
\fICURLOPT_CHUNK_END_FUNCTION(3)\fP
 +.IP CURLOPT_CHUNK_DATA
 +Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP
 +.IP CURLOPT_FNMATCH_FUNCTION
 +Callback for wildcard matching. See \fICURLOPT_FNMATCH_FUNCTION(3)\fP
 +.IP CURLOPT_FNMATCH_DATA
 +Data pointer to pass to the wildcard matching callback. See 
\fICURLOPT_FNMATCH_DATA(3)\fP
 +.IP CURLOPT_SUPPRESS_CONNECT_HEADERS
 +Suppress proxy CONNECT response headers from user callbacks. See 
\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP
 +.SH ERROR OPTIONS
 +.IP CURLOPT_ERRORBUFFER
 +Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP
 +.IP CURLOPT_STDERR
 +stderr replacement stream. See \fICURLOPT_STDERR(3)\fP
 +.IP CURLOPT_FAILONERROR
 +Fail on HTTP 4xx errors. \fICURLOPT_FAILONERROR(3)\fP
 +.IP CURLOPT_KEEP_SENDING_ON_ERROR
 +Keep sending on HTTP >= 300 errors. \fICURLOPT_KEEP_SENDING_ON_ERROR(3)\fP
 +.SH NETWORK OPTIONS
 +.IP CURLOPT_URL
 +URL to work on. See \fICURLOPT_URL(3)\fP
 +.IP CURLOPT_PATH_AS_IS
 +Disable squashing /../ and /./ sequences in the path. See 
\fICURLOPT_PATH_AS_IS(3)\fP
 +.IP CURLOPT_PROTOCOLS
 +Allowed protocols. See \fICURLOPT_PROTOCOLS(3)\fP
 +.IP CURLOPT_REDIR_PROTOCOLS
 +Protocols to allow redirects to. See \fICURLOPT_REDIR_PROTOCOLS(3)\fP
 +.IP CURLOPT_DEFAULT_PROTOCOL
 +Default protocol. See \fICURLOPT_DEFAULT_PROTOCOL(3)\fP
 +.IP CURLOPT_PROXY
 +Proxy to use. See \fICURLOPT_PROXY(3)\fP
 +.IP CURLOPT_PRE_PROXY
 +Socks proxy to use. See \fICURLOPT_PRE_PROXY(3)\fP
 +.IP CURLOPT_PROXYPORT
 +Proxy port to use. See \fICURLOPT_PROXYPORT(3)\fP
 +.IP CURLOPT_PROXYTYPE
 +Proxy type. See \fICURLOPT_PROXYTYPE(3)\fP
 +.IP CURLOPT_NOPROXY
 +Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP
 +.IP CURLOPT_HTTPPROXYTUNNEL
 +Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP
 +.IP CURLOPT_CONNECT_TO
 +Connect to a specific host and port. See \fICURLOPT_CONNECT_TO(3)\fP
 +.IP CURLOPT_SOCKS5_AUTH
 +Socks5 authentication methods. See \fICURLOPT_SOCKS5_AUTH(3)\fP
 +.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
 +Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
 +.IP CURLOPT_SOCKS5_GSSAPI_NEC
 +Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
 +.IP CURLOPT_PROXY_SERVICE_NAME
 +Proxy authentication service name. \fICURLOPT_PROXY_SERVICE_NAME(3)\fP
 +.IP CURLOPT_SERVICE_NAME
 +Authentication service name. \fICURLOPT_SERVICE_NAME(3)\fP
 +.IP CURLOPT_INTERFACE
 +Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
 +.IP CURLOPT_LOCALPORT
 +Bind connection locally to this port. See \fICURLOPT_LOCALPORT(3)\fP
 +.IP CURLOPT_LOCALPORTRANGE
 +Bind connection locally to port range. See \fICURLOPT_LOCALPORTRANGE(3)\fP
 +.IP CURLOPT_DNS_CACHE_TIMEOUT
 +Timeout for DNS cache. See \fICURLOPT_DNS_CACHE_TIMEOUT(3)\fP
 +.IP CURLOPT_DNS_USE_GLOBAL_CACHE
 +OBSOLETE Enable global DNS cache. See \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP
 +.IP CURLOPT_BUFFERSIZE
 +Ask for alternate buffer size. See \fICURLOPT_BUFFERSIZE(3)\fP
 +.IP CURLOPT_PORT
 +Port number to connect to. See \fICURLOPT_PORT(3)\fP
 +.IP CURLOPT_TCP_FASTOPEN
 +Enable TFO, TCP Fast Open. See \fICURLOPT_TCP_FASTOPEN(3)\fP
 +.IP CURLOPT_TCP_NODELAY
 +Disable the Nagle algorithm. See \fICURLOPT_TCP_NODELAY(3)\fP
 +.IP CURLOPT_ADDRESS_SCOPE
 +IPv6 scope for local addresses. See \fICURLOPT_ADDRESS_SCOPE(3)\fP
 +.IP CURLOPT_TCP_KEEPALIVE
 +Enable TCP keep-alive. See \fICURLOPT_TCP_KEEPALIVE(3)\fP
 +.IP CURLOPT_TCP_KEEPIDLE
 +Idle time before sending keep-alive. See \fICURLOPT_TCP_KEEPIDLE(3)\fP
 +.IP CURLOPT_TCP_KEEPINTVL
 +Interval between keep-alive probes. See \fICURLOPT_TCP_KEEPINTVL(3)\fP
 +.IP CURLOPT_UNIX_SOCKET_PATH
 +Path to a Unix domain socket. See \fICURLOPT_UNIX_SOCKET_PATH(3)\fP
 +.IP CURLOPT_ABSTRACT_UNIX_SOCKET
 +Path to an abstract Unix domain socket. See 
\fICURLOPT_ABSTRACT_UNIX_SOCKET(3)\fP
 +.SH NAMES and PASSWORDS OPTIONS (Authentication)
 +.IP CURLOPT_NETRC
 +Enable .netrc parsing. See \fICURLOPT_NETRC(3)\fP
 +.IP CURLOPT_NETRC_FILE
 +\&.netrc file name. See \fICURLOPT_NETRC_FILE(3)\fP
 +.IP CURLOPT_USERPWD
 +User name and password. See \fICURLOPT_USERPWD(3)\fP
 +.IP CURLOPT_PROXYUSERPWD
 +Proxy user name and password. See \fICURLOPT_PROXYUSERPWD(3)\fP
 +.IP CURLOPT_USERNAME
 +User name. See \fICURLOPT_USERNAME(3)\fP
 +.IP CURLOPT_PASSWORD
 +Password. See \fICURLOPT_PASSWORD(3)\fP
 +.IP CURLOPT_LOGIN_OPTIONS
 +Login options. See \fICURLOPT_LOGIN_OPTIONS(3)\fP
 +.IP CURLOPT_PROXYUSERNAME
 +Proxy user name. See \fICURLOPT_PROXYUSERNAME(3)\fP
 +.IP CURLOPT_PROXYPASSWORD
 +Proxy password. See \fICURLOPT_PROXYPASSWORD(3)\fP
 +.IP CURLOPT_HTTPAUTH
 +HTTP server authentication methods. See \fICURLOPT_HTTPAUTH(3)\fP
 +.IP CURLOPT_TLSAUTH_USERNAME
 +TLS authentication user name. See \fICURLOPT_TLSAUTH_USERNAME(3)\fP
 +.IP CURLOPT_PROXY_TLSAUTH_USERNAME
 +Proxy TLS authentication user name. See 
\fICURLOPT_PROXY_TLSAUTH_USERNAME(3)\fP
 +.IP CURLOPT_TLSAUTH_PASSWORD
 +TLS authentication password. See \fICURLOPT_TLSAUTH_PASSWORD(3)\fP
 +.IP CURLOPT_PROXY_TLSAUTH_PASSWORD
 +Proxy TLS authentication password. See \fICURLOPT_PROXY_TLSAUTH_PASSWORD(3)\fP
 +.IP CURLOPT_TLSAUTH_TYPE
 +TLS authentication methods. See \fICURLOPT_TLSAUTH_TYPE(3)\fP
 +.IP CURLOPT_PROXY_TLSAUTH_TYPE
 +Proxy TLS authentication methods. See \fICURLOPT_PROXY_TLSAUTH_TYPE(3)\fP
 +.IP CURLOPT_PROXYAUTH
 +HTTP proxy authentication methods. See \fICURLOPT_PROXYAUTH(3)\fP
 +.IP CURLOPT_SASL_IR
 +Enable SASL initial response. See \fICURLOPT_SASL_IR(3)\fP
 +.IP CURLOPT_XOAUTH2_BEARER
 +OAuth2 bearer token. See \fICURLOPT_XOAUTH2_BEARER(3)\fP
 +.SH HTTP OPTIONS
 +.IP CURLOPT_AUTOREFERER
 +Automatically set Referer: header. See \fICURLOPT_AUTOREFERER(3)\fP
 +.IP CURLOPT_ACCEPT_ENCODING
 +Accept-Encoding and automatic decompressing data. See 
\fICURLOPT_ACCEPT_ENCODING(3)\fP
 +.IP CURLOPT_TRANSFER_ENCODING
 +Request Transfer-Encoding. See \fICURLOPT_TRANSFER_ENCODING(3)\fP
 +.IP CURLOPT_FOLLOWLOCATION
 +Follow HTTP redirects. See \fICURLOPT_FOLLOWLOCATION(3)\fP
 +.IP CURLOPT_UNRESTRICTED_AUTH
 +Do not restrict authentication to original host. 
\fICURLOPT_UNRESTRICTED_AUTH(3)\fP
 +.IP CURLOPT_MAXREDIRS
 +Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
 +.IP CURLOPT_POSTREDIR
 +How to act on redirects after POST. See \fICURLOPT_POSTREDIR(3)\fP
 +.IP CURLOPT_PUT
 +Issue a HTTP PUT request. See \fICURLOPT_PUT(3)\fP
 +.IP CURLOPT_POST
 +Issue a HTTP POST request. See \fICURLOPT_POST(3)\fP
 +.IP CURLOPT_POSTFIELDS
 +Send a POST with this data. See \fICURLOPT_POSTFIELDS(3)\fP
 +.IP CURLOPT_POSTFIELDSIZE
 +The POST data is this big. See \fICURLOPT_POSTFIELDSIZE(3)\fP
 +.IP CURLOPT_POSTFIELDSIZE_LARGE
 +The POST data is this big. See \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
 +.IP CURLOPT_COPYPOSTFIELDS
 +Send a POST with this data - and copy it. See \fICURLOPT_COPYPOSTFIELDS(3)\fP
 +.IP CURLOPT_HTTPPOST
 +Multipart formpost HTTP POST. See \fICURLOPT_HTTPPOST(3)\fP
 +.IP CURLOPT_REFERER
 +Referer: header. See \fICURLOPT_REFERER(3)\fP
 +.IP CURLOPT_USERAGENT
 +User-Agent: header. See \fICURLOPT_USERAGENT(3)\fP
 +.IP CURLOPT_HTTPHEADER
 +Custom HTTP headers. See \fICURLOPT_HTTPHEADER(3)\fP
 +.IP CURLOPT_HEADEROPT
 +Control custom headers. See \fICURLOPT_HEADEROPT(3)\fP
 +.IP CURLOPT_PROXYHEADER
 +Custom HTTP headers sent to proxy. See \fICURLOPT_PROXYHEADER(3)\fP
 +.IP CURLOPT_HTTP200ALIASES
 +Alternative versions of 200 OK. See \fICURLOPT_HTTP200ALIASES(3)\fP
 +.IP CURLOPT_COOKIE
 +Cookie(s) to send. See \fICURLOPT_COOKIE(3)\fP
 +.IP CURLOPT_COOKIEFILE
 +File to read cookies from. See \fICURLOPT_COOKIEFILE(3)\fP
 +.IP CURLOPT_COOKIEJAR
 +File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP
 +.IP CURLOPT_COOKIESESSION
 +Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP
 +.IP CURLOPT_COOKIELIST
 +Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP
 +.IP CURLOPT_HTTPGET
 +Do a HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
 +.IP CURLOPT_REQUEST_TARGET
 +Set the request target. \fICURLOPT_REQUEST_TARGET(3)\fP
 +.IP CURLOPT_HTTP_VERSION
 +HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP
 +.IP CURLOPT_IGNORE_CONTENT_LENGTH
 +Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP
 +.IP CURLOPT_HTTP_CONTENT_DECODING
 +Disable Content decoding. See \fICURLOPT_HTTP_CONTENT_DECODING(3)\fP
 +.IP CURLOPT_HTTP_TRANSFER_DECODING
 +Disable Transfer decoding. See \fICURLOPT_HTTP_TRANSFER_DECODING(3)\fP
 +.IP CURLOPT_EXPECT_100_TIMEOUT_MS
 +100-continue timeout. See \fICURLOPT_EXPECT_100_TIMEOUT_MS(3)\fP
 +.IP CURLOPT_PIPEWAIT
 +Wait on connection to pipeline on it. See \fICURLOPT_PIPEWAIT(3)\fP
 +.IP CURLOPT_STREAM_DEPENDS
 +This HTTP/2 stream depends on another. See \fICURLOPT_STREAM_DEPENDS(3)\fP
 +.IP CURLOPT_STREAM_DEPENDS_E
 +This HTTP/2 stream depends on another exclusively. See
 +\fICURLOPT_STREAM_DEPENDS_E(3)\fP
 +.IP CURLOPT_STREAM_WEIGHT
 +Set this HTTP/2 stream's weight. See \fICURLOPT_STREAM_WEIGHT(3)\fP
 +.SH SMTP OPTIONS
 +.IP CURLOPT_MAIL_FROM
 +Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP
 +.IP CURLOPT_MAIL_RCPT
 +Address of the recipients. See \fICURLOPT_MAIL_RCPT(3)\fP
 +.IP CURLOPT_MAIL_AUTH
 +Authentication address. See \fICURLOPT_MAIL_AUTH(3)\fP
 +.SH TFTP OPTIONS
 +.IP CURLOPT_TFTP_BLKSIZE
 +TFTP block size. See \fICURLOPT_TFTP_BLKSIZE(3)\fP
 +.IP CURLOPT_TFTP_NO_OPTIONS
 +Do not send TFTP options requests. See \fICURLOPT_TFTP_NO_OPTIONS(3)\fP
 +.SH FTP OPTIONS
 +.IP CURLOPT_FTPPORT
 +Use active FTP. See \fICURLOPT_FTPPORT(3)\fP
 +.IP CURLOPT_QUOTE
 +Commands to run before transfer. See \fICURLOPT_QUOTE(3)\fP
 +.IP CURLOPT_POSTQUOTE
 +Commands to run after transfer. See \fICURLOPT_POSTQUOTE(3)\fP
 +.IP CURLOPT_PREQUOTE
 +Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP
 +.IP CURLOPT_APPEND
 +Append to remote file. See \fICURLOPT_APPEND(3)\fP
 +.IP CURLOPT_FTP_USE_EPRT
 +Use EPTR. See \fICURLOPT_FTP_USE_EPRT(3)\fP
 +.IP CURLOPT_FTP_USE_EPSV
 +Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP
 +.IP CURLOPT_FTP_USE_PRET
 +Use PRET. See \fICURLOPT_FTP_USE_PRET(3)\fP
 +.IP CURLOPT_FTP_CREATE_MISSING_DIRS
 +Create missing directories on the remote server. See 
\fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP
 +.IP CURLOPT_FTP_RESPONSE_TIMEOUT
 +Timeout for FTP responses. See \fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP
 +.IP CURLOPT_FTP_ALTERNATIVE_TO_USER
 +Alternative to USER. See \fICURLOPT_FTP_ALTERNATIVE_TO_USER(3)\fP
 +.IP CURLOPT_FTP_SKIP_PASV_IP
 +Ignore the IP address in the PASV response. See 
\fICURLOPT_FTP_SKIP_PASV_IP(3)\fP
 +.IP CURLOPT_FTPSSLAUTH
 +Control how to do TLS. See \fICURLOPT_FTPSSLAUTH(3)\fP
 +.IP CURLOPT_FTP_SSL_CCC
 +Back to non-TLS again after authentication. See \fICURLOPT_FTP_SSL_CCC(3)\fP
 +.IP CURLOPT_FTP_ACCOUNT
 +Send ACCT command. See \fICURLOPT_FTP_ACCOUNT(3)\fP
 +.IP CURLOPT_FTP_FILEMETHOD
 +Specify how to reach files. See \fICURLOPT_FTP_FILEMETHOD(3)\fP
 +.SH RTSP OPTIONS
 +.IP CURLOPT_RTSP_REQUEST
 +RTSP request. See \fICURLOPT_RTSP_REQUEST(3)\fP
 +.IP CURLOPT_RTSP_SESSION_ID
 +RTSP session-id. See \fICURLOPT_RTSP_SESSION_ID(3)\fP
 +.IP CURLOPT_RTSP_STREAM_URI
 +RTSP stream URI. See \fICURLOPT_RTSP_STREAM_URI(3)\fP
 +.IP CURLOPT_RTSP_TRANSPORT
 +RTSP Transport: header. See \fICURLOPT_RTSP_TRANSPORT(3)\fP
 +.IP CURLOPT_RTSP_CLIENT_CSEQ
 +Client CSEQ number. See \fICURLOPT_RTSP_CLIENT_CSEQ(3)\fP
 +.IP CURLOPT_RTSP_SERVER_CSEQ
 +CSEQ number for RTSP Server->Client request. See 
\fICURLOPT_RTSP_SERVER_CSEQ(3)\fP
 +.SH PROTOCOL OPTIONS
 +.IP CURLOPT_TRANSFERTEXT
 +Use text transfer. See \fICURLOPT_TRANSFERTEXT(3)\fP
 +.IP CURLOPT_PROXY_TRANSFER_MODE
 +Add transfer mode to URL over proxy. See \fICURLOPT_PROXY_TRANSFER_MODE(3)\fP
 +.IP CURLOPT_CRLF
 +Convert newlines. See \fICURLOPT_CRLF(3)\fP
 +.IP CURLOPT_RANGE
 +Range requests. See \fICURLOPT_RANGE(3)\fP
 +.IP CURLOPT_RESUME_FROM
 +Resume a transfer. See \fICURLOPT_RESUME_FROM(3)\fP
 +.IP CURLOPT_RESUME_FROM_LARGE
 +Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP
 +.IP CURLOPT_CUSTOMREQUEST
 +Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP
 +.IP CURLOPT_FILETIME
 +Request file modification date and time. See \fICURLOPT_FILETIME(3)\fP
 +.IP CURLOPT_DIRLISTONLY
 +List only. See \fICURLOPT_DIRLISTONLY(3)\fP
 +.IP CURLOPT_NOBODY
 +Do not get the body contents. See \fICURLOPT_NOBODY(3)\fP
 +.IP CURLOPT_INFILESIZE
 +Size of file to send. \fICURLOPT_INFILESIZE(3)\fP
 +.IP CURLOPT_INFILESIZE_LARGE
 +Size of file to send. \fICURLOPT_INFILESIZE_LARGE(3)\fP
 +.IP CURLOPT_UPLOAD
 +Upload data. See \fICURLOPT_UPLOAD(3)\fP
++.IP CURLOPT_MIMEPOST
++Post/send MIME data. See \fICURLOPT_MIMEPOST(3)\fP
 +.IP CURLOPT_MAXFILESIZE
 +Maximum file size to get. See \fICURLOPT_MAXFILESIZE(3)\fP
 +.IP CURLOPT_MAXFILESIZE_LARGE
 +Maximum file size to get. See \fICURLOPT_MAXFILESIZE_LARGE(3)\fP
 +.IP CURLOPT_TIMECONDITION
 +Make a time conditional request. See \fICURLOPT_TIMECONDITION(3)\fP
 +.IP CURLOPT_TIMEVALUE
 +Time value for the time conditional request. See \fICURLOPT_TIMEVALUE(3)\fP
 +.SH CONNECTION OPTIONS
 +.IP CURLOPT_TIMEOUT
 +Timeout for the entire request. See \fICURLOPT_TIMEOUT(3)\fP
 +.IP CURLOPT_TIMEOUT_MS
 +Millisecond timeout for the entire request. See \fICURLOPT_TIMEOUT_MS(3)\fP
 +.IP CURLOPT_LOW_SPEED_LIMIT
 +Low speed limit to abort transfer. See \fICURLOPT_LOW_SPEED_LIMIT(3)\fP
 +.IP CURLOPT_LOW_SPEED_TIME
 +Time to be below the speed to trigger low speed abort. See 
\fICURLOPT_LOW_SPEED_TIME(3)\fP
 +.IP CURLOPT_MAX_SEND_SPEED_LARGE
 +Cap the upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP
 +.IP CURLOPT_MAX_RECV_SPEED_LARGE
 +Cap the download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP
 +.IP CURLOPT_MAXCONNECTS
 +Maximum number of connections in the connection pool. See 
\fICURLOPT_MAXCONNECTS(3)\fP
 +.IP CURLOPT_FRESH_CONNECT
 +Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP
 +.IP CURLOPT_FORBID_REUSE
 +Prevent subsequent connections from re-using this. See 
\fICURLOPT_FORBID_REUSE(3)\fP
 +.IP CURLOPT_CONNECTTIMEOUT
 +Timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT(3)\fP
 +.IP CURLOPT_CONNECTTIMEOUT_MS
 +Millisecond timeout for the connection phase. See 
\fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
 +.IP CURLOPT_IPRESOLVE
 +IP version to resolve to. See \fICURLOPT_IPRESOLVE(3)\fP
 +.IP CURLOPT_CONNECT_ONLY
 +Only connect, nothing else. See \fICURLOPT_CONNECT_ONLY(3)\fP
 +.IP CURLOPT_USE_SSL
 +Use TLS/SSL. See \fICURLOPT_USE_SSL(3)\fP
 +.IP CURLOPT_RESOLVE
 +Provide fixed/fake name resolves. See \fICURLOPT_RESOLVE(3)\fP
 +.IP CURLOPT_DNS_INTERFACE
 +Bind name resolves to this interface. See \fICURLOPT_DNS_INTERFACE(3)\fP
 +.IP CURLOPT_DNS_LOCAL_IP4
 +Bind name resolves to this IP4 address. See \fICURLOPT_DNS_LOCAL_IP4(3)\fP
 +.IP CURLOPT_DNS_LOCAL_IP6
 +Bind name resolves to this IP6 address. See \fICURLOPT_DNS_LOCAL_IP6(3)\fP
 +.IP CURLOPT_DNS_SERVERS
 +Preferred DNS servers. See \fICURLOPT_DNS_SERVERS(3)\fP
 +.IP CURLOPT_ACCEPTTIMEOUT_MS
 +Timeout for waiting for the server's connect back to be accepted. See 
\fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP
 +.SH SSL and SECURITY OPTIONS
 +.IP CURLOPT_SSLCERT
 +Client cert. See \fICURLOPT_SSLCERT(3)\fP
 +.IP CURLOPT_PROXY_SSLCERT
 +Proxy client cert. See \fICURLOPT_PROXY_SSLCERT(3)\fP
 +.IP CURLOPT_SSLCERTTYPE
 +Client cert type.  See \fICURLOPT_SSLCERTTYPE(3)\fP
 +.IP CURLOPT_PROXY_SSLCERTTYPE
 +Proxy client cert type.  See \fICURLOPT_PROXY_SSLCERTTYPE(3)\fP
 +.IP CURLOPT_SSLKEY
 +Client key. See \fICURLOPT_SSLKEY(3)\fP
 +.IP CURLOPT_PROXY_SSLKEY
 +Proxy client key. See \fICURLOPT_PROXY_SSLKEY(3)\fP
 +.IP CURLOPT_SSLKEYTYPE
 +Client key type. See \fICURLOPT_SSLKEYTYPE(3)\fP
 +.IP CURLOPT_PROXY_SSLKEYTYPE
 +Proxy client key type. See \fICURLOPT_PROXY_SSLKEYTYPE(3)\fP
 +.IP CURLOPT_KEYPASSWD
 +Client key password. See \fICURLOPT_KEYPASSWD(3)\fP
 +.IP CURLOPT_PROXY_KEYPASSWD
 +Proxy client key password. See \fICURLOPT_PROXY_KEYPASSWD(3)\fP
 +.IP CURLOPT_SSL_ENABLE_ALPN
 +Enable use of ALPN. See \fICURLOPT_SSL_ENABLE_ALPN(3)\fP
 +.IP CURLOPT_SSL_ENABLE_NPN
 +Enable use of NPN. See \fICURLOPT_SSL_ENABLE_NPN(3)\fP
 +.IP CURLOPT_SSLENGINE
 +Use identifier with SSL engine. See \fICURLOPT_SSLENGINE(3)\fP
 +.IP CURLOPT_SSLENGINE_DEFAULT
 +Default SSL engine. See \fICURLOPT_SSLENGINE_DEFAULT(3)\fP
 +.IP CURLOPT_SSL_FALSESTART
 +Enable TLS False Start. See \fICURLOPT_SSL_FALSESTART(3)\fP
 +.IP CURLOPT_SSLVERSION
 +SSL version to use. See \fICURLOPT_SSLVERSION(3)\fP
 +.IP CURLOPT_PROXY_SSLVERSION
 +Proxy SSL version to use. See \fICURLOPT_PROXY_SSLVERSION(3)\fP
 +.IP CURLOPT_SSL_VERIFYHOST
 +Verify the host name in the SSL certificate. See 
\fICURLOPT_SSL_VERIFYHOST(3)\fP
 +.IP CURLOPT_PROXY_SSL_VERIFYHOST
 +Verify the host name in the proxy SSL certificate. See 
\fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP
 +.IP CURLOPT_SSL_VERIFYPEER
 +Verify the SSL certificate. See \fICURLOPT_SSL_VERIFYPEER(3)\fP
 +.IP CURLOPT_PROXY_SSL_VERIFYPEER
 +Verify the proxy SSL certificate. See \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP
 +.IP CURLOPT_SSL_VERIFYSTATUS
 +Verify the SSL certificate's status. See \fICURLOPT_SSL_VERIFYSTATUS(3)\fP
 +.IP CURLOPT_CAINFO
 +CA cert bundle. See \fICURLOPT_CAINFO(3)\fP
 +.IP CURLOPT_PROXY_CAINFO
 +Proxy CA cert bundle. See \fICURLOPT_PROXY_CAINFO(3)\fP
 +.IP CURLOPT_ISSUERCERT
 +Issuer certificate. See \fICURLOPT_ISSUERCERT(3)\fP
 +.IP CURLOPT_CAPATH
 +Path to CA cert bundle. See \fICURLOPT_CAPATH(3)\fP
 +.IP CURLOPT_PROXY_CAPATH
 +Path to proxy CA cert bundle. See \fICURLOPT_PROXY_CAPATH(3)\fP
 +.IP CURLOPT_CRLFILE
 +Certificate Revocation List. See \fICURLOPT_CRLFILE(3)\fP
 +.IP CURLOPT_PROXY_CRLFILE
 +Proxy Certificate Revocation List. See \fICURLOPT_PROXY_CRLFILE(3)\fP
 +.IP CURLOPT_CERTINFO
 +Extract certificate info. See \fICURLOPT_CERTINFO(3)\fP
 +.IP CURLOPT_PINNEDPUBLICKEY
 +Set pinned SSL public key . See \fICURLOPT_PINNEDPUBLICKEY(3)\fP
 +.IP CURLOPT_PROXY_PINNEDPUBLICKEY
 +Set the proxy's pinned SSL public key. See
 +\fICURLOPT_PROXY_PINNEDPUBLICKEY(3)\fP
 +.IP CURLOPT_RANDOM_FILE
 +Provide source for entropy random data. See \fICURLOPT_RANDOM_FILE(3)\fP
 +.IP CURLOPT_EGDSOCKET
 +Identify EGD socket for entropy. See \fICURLOPT_EGDSOCKET(3)\fP
 +.IP CURLOPT_SSL_CIPHER_LIST
 +Ciphers to use. See \fICURLOPT_SSL_CIPHER_LIST(3)\fP
 +.IP CURLOPT_PROXY_SSL_CIPHER_LIST
 +Proxy ciphers to use. See \fICURLOPT_PROXY_SSL_CIPHER_LIST(3)\fP
 +.IP CURLOPT_SSL_SESSIONID_CACHE
 +Disable SSL session-id cache. See \fICURLOPT_SSL_SESSIONID_CACHE(3)\fP
 +.IP CURLOPT_SSL_OPTIONS
 +Control SSL behavior. See \fICURLOPT_SSL_OPTIONS(3)\fP
 +.IP CURLOPT_PROXY_SSL_OPTIONS
 +Control proxy SSL behavior. See \fICURLOPT_PROXY_SSL_OPTIONS(3)\fP
 +.IP CURLOPT_KRBLEVEL
 +Kerberos security level. See \fICURLOPT_KRBLEVEL(3)\fP
 +.IP CURLOPT_GSSAPI_DELEGATION
 +Disable GSS-API delegation. See \fICURLOPT_GSSAPI_DELEGATION(3)\fP
 +.SH SSH OPTIONS
 +.IP CURLOPT_SSH_AUTH_TYPES
 +SSH authentication types. See \fICURLOPT_SSH_AUTH_TYPES(3)\fP
++.IP CURLOPT_SSH_COMPRESSION
++Enable SSH compression. See \fICURLOPT_SSH_COMPRESSION(3)\fP
 +.IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
 +MD5 of host's public key. See \fICURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)\fP
 +.IP CURLOPT_SSH_PUBLIC_KEYFILE
 +File name of public key. See \fICURLOPT_SSH_PUBLIC_KEYFILE(3)\fP
 +.IP CURLOPT_SSH_PRIVATE_KEYFILE
 +File name of private key. See \fICURLOPT_SSH_PRIVATE_KEYFILE(3)\fP
 +.IP CURLOPT_SSH_KNOWNHOSTS
 +File name with known hosts. See \fICURLOPT_SSH_KNOWNHOSTS(3)\fP
 +.IP CURLOPT_SSH_KEYFUNCTION
 +Callback for known hosts handling. See \fICURLOPT_SSH_KEYFUNCTION(3)\fP
 +.IP CURLOPT_SSH_KEYDATA
 +Custom pointer to pass to ssh key callback. See \fICURLOPT_SSH_KEYDATA(3)\fP
 +.SH OTHER OPTIONS
 +.IP CURLOPT_PRIVATE
 +Private pointer to store. See \fICURLOPT_PRIVATE(3)\fP
 +.IP CURLOPT_SHARE
 +Share object to use. See \fICURLOPT_SHARE(3)\fP
 +.IP CURLOPT_NEW_FILE_PERMS
 +Mode for creating new remote files. See \fICURLOPT_NEW_FILE_PERMS(3)\fP
 +.IP CURLOPT_NEW_DIRECTORY_PERMS
 +Mode for creating new remote directories. See 
\fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP
 +.SH TELNET OPTIONS
 +.IP CURLOPT_TELNETOPTIONS
 +TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP
 +.SH RETURN VALUE
 +\fICURLE_OK\fP (zero) means that the option was set properly, non-zero means 
an
 +error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors(3)\fP
 +man page for the full list with descriptions.
 +
 +If you try to set an option that libcurl doesn't know about, perhaps because
 +the library is too old to support it or the option was removed in a recent
 +version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for
 +the option was disabled at compile-time, it will return
 +\fICURLE_NOT_BUILT_IN\fP.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  CURLcode res;
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +  res = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH "SEE ALSO"
 +.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
 +.BR curl_easy_getinfo "(3), " curl_multi_setopt "(3), "
diff --cc docs/libcurl/gnurl_formadd.3
index e3ef58366,000000000..12604f1ae
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_formadd.3
+++ b/docs/libcurl/gnurl_formadd.3
@@@ -1,258 -1,0 +1,263 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
 +.SH NAME
 +curl_formadd - add a section to a multipart/formdata HTTP POST
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +.sp
 +.BI "CURLFORMcode curl_formadd(struct curl_httppost ** " firstitem,
 +.BI "struct curl_httppost ** " lastitem, " ...);"
 +.ad
 +.SH DESCRIPTION
++This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!
++
 +curl_formadd() is used to append sections when building a multipart/formdata
 +HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
 +at a time until you've added all the sections you want included and then you
 +pass the \fIfirstitem\fP pointer as parameter to \fICURLOPT_HTTPPOST(3)\fP.
 +\fIlastitem\fP is set after each \fIcurl_formadd(3)\fP call and on repeated
 +invokes it should be left as set to allow repeated invokes to find the end of
 +the list faster.
 +
 +After the \fIlastitem\fP pointer follow the real arguments.
 +
 +The pointers \fIfirstitem\fP and \fIlastitem\fP should both be pointing to
 +NULL in the first call to this function. All list-data will be allocated by
 +the function itself. You must call \fIcurl_formfree(3)\fP on the
 +\fIfirstitem\fP after the form post has been done to free the resources.
 +
 +Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
 +You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
 +
 +First, there are some basics you need to understand about multipart/formdata
 +posts. Each part consists of at least a NAME and a CONTENTS part. If the part
 +is made for file upload, there are also a stored CONTENT-TYPE and a FILENAME.
 +Below, we'll discuss what options you use to set these properties in the
 +parts you want to add to your post.
 +
 +The options listed first are for making normal parts. The options from
 +\fICURLFORM_FILE\fP through \fICURLFORM_BUFFERLENGTH\fP are for file upload
 +parts.
 +.SH OPTIONS
 +.IP CURLFORM_COPYNAME
 +followed by a string which provides the \fIname\fP of this part. libcurl
 +copies the string so your application doesn't need to keep it around after
- this function call. If the name isn't NUL-terminated, or if you'd
- like it to contain zero bytes, you must set its length with
- \fBCURLFORM_NAMELENGTH\fP. The copied data will be freed by
- \fIcurl_formfree(3)\fP.
++this function call. If the name isn't NUL-terminated, you must set its length
++with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain
++zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP.
 +.IP CURLFORM_PTRNAME
 +followed by a string which provides the \fIname\fP of this part. libcurl
 +will use the pointer and refer to the data in your application, so you
 +must make sure it remains until curl no longer needs it. If the name
- isn't NUL-terminated, or if you'd like it to contain zero
- bytes, you must set its length with \fBCURLFORM_NAMELENGTH\fP.
++isn't NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP.
++The \fIname\fP is not allowed to contain zero-valued bytes.
 +.IP CURLFORM_COPYCONTENTS
 +followed by a pointer to the contents of this part, the actual data
 +to send away. libcurl copies the provided data, so your application doesn't
 +need to keep it around after this function call. If the data isn't null
 +terminated, or if you'd like it to contain zero bytes, you must
 +set the length of the name with \fBCURLFORM_CONTENTSLENGTH\fP. The copied
 +data will be freed by \fIcurl_formfree(3)\fP.
 +.IP CURLFORM_PTRCONTENTS
 +followed by a pointer to the contents of this part, the actual data
 +to send away. libcurl will use the pointer and refer to the data in your
 +application, so you must make sure it remains until curl no longer needs it.
 +If the data isn't NUL-terminated, or if you'd like it to contain zero bytes,
 +you must set its length  with \fBCURLFORM_CONTENTSLENGTH\fP.
 +.IP CURLFORM_CONTENTLEN
 +followed by a curl_off_t value giving the length of the contents. Note that
 +for \fICURLFORM_STREAM\fP contents, this option is mandatory.
 +
 +If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
 +the contents to figure out the size. If you really want to send a zero byte
 +content then you must make sure strlen() on the data pointer returns zero.
 +
 +(Option added in 7.46.0)
 +.IP CURLFORM_CONTENTSLENGTH
 +(This option is deprecated. Use \fICURLFORM_CONTENTLEN\fP instead!)
 +
 +followed by a long giving the length of the contents. Note that for
 +\fICURLFORM_STREAM\fP contents, this option is mandatory.
 +
 +If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
 +the contents to figure out the size. If you really want to send a zero byte
 +content then you must make sure strlen() on the data pointer returns zero.
 +.IP CURLFORM_FILECONTENT
 +followed by a filename, causes that file to be read and its contents used
 +as data in this part. This part does \fInot\fP automatically become a file
 +upload part simply because its data was read from a file.
 +
 +The specified file needs to kept around until the associated transfer is done.
 +.IP CURLFORM_FILE
 +followed by a filename, makes this part a file upload part. It sets the
 +\fIfilename\fP field to the basename of the provided filename, it reads the
 +contents of the file and passes them as data and sets the content-type if the
 +given file match one of the internally known file extensions.  For
 +\fBCURLFORM_FILE\fP the user may send one or more files in one part by
 +providing multiple \fBCURLFORM_FILE\fP arguments each followed by the filename
 +(and each \fICURLFORM_FILE\fP is allowed to have a
 +\fICURLFORM_CONTENTTYPE\fP).
 +
 +The given upload file has to exist in its full in the file system already when
 +the upload starts, as libcurl needs to read the correct file size beforehand.
 +
 +The specified file needs to kept around until the associated transfer is done.
 +.IP CURLFORM_CONTENTTYPE
 +is used in combination with \fICURLFORM_FILE\fP. Followed by a pointer to a
 +string which provides the content-type for this part, possibly instead of an
 +internally chosen one.
 +.IP CURLFORM_FILENAME
 +is used in combination with \fICURLFORM_FILE\fP. Followed by a pointer to a
 +string, it tells libcurl to use the given string as the \fIfilename\fP in the
 +file upload part instead of the actual file name.
 +.IP CURLFORM_BUFFER
 +is used for custom file upload parts without use of \fICURLFORM_FILE\fP.  It
 +tells libcurl that the file contents are already present in a buffer.  The
 +parameter is a string which provides the \fIfilename\fP field in the content
 +header.
 +.IP CURLFORM_BUFFERPTR
 +is used in combination with \fICURLFORM_BUFFER\fP. The parameter is a pointer
 +to the buffer to be uploaded. This buffer must not be freed until after
 +\fIcurl_easy_cleanup(3)\fP is called. You must also use
 +\fICURLFORM_BUFFERLENGTH\fP to set the number of bytes in the buffer.
 +.IP CURLFORM_BUFFERLENGTH
 +is used in combination with \fICURLFORM_BUFFER\fP. The parameter is a
 +long which gives the length of the buffer.
 +.IP CURLFORM_STREAM
 +Tells libcurl to use the \fICURLOPT_READFUNCTION(3)\fP callback to get
 +data. The parameter you pass to \fICURLFORM_STREAM\fP is the pointer passed on
 +to the read callback's fourth argument. If you want the part to look like a
 +file upload one, set the \fICURLFORM_FILENAME\fP parameter as well. Note that
 +when using \fICURLFORM_STREAM\fP, \fICURLFORM_CONTENTSLENGTH\fP must also be
 +set with the total expected length of the part unless the formpost is sent
 +chunked encoded. (Option added in libcurl 7.18.2)
 +.IP CURLFORM_ARRAY
 +Another possibility to send options to curl_formadd() is the
 +\fBCURLFORM_ARRAY\fP option, that passes a struct curl_forms array pointer as
 +its value. Each curl_forms structure element has a CURLformoption and a char
 +pointer. The final element in the array must be a CURLFORM_END. All available
 +options can be used in an array, except the CURLFORM_ARRAY option itself!  The
 +last argument in such an array must always be \fBCURLFORM_END\fP.
 +.IP CURLFORM_CONTENTHEADER
 +specifies extra headers for the form POST section.  This takes a curl_slist
 +prepared in the usual way using \fBcurl_slist_append\fP and appends the list
 +of headers to those libcurl automatically generates. The list must exist while
 +the POST occurs, if you free it before the post completes you may experience
 +problems.
 +
 +When you've passed the HttpPost pointer to \fIcurl_easy_setopt(3)\fP (using
 +the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after
 +you've called \fIcurl_easy_cleanup(3)\fP for the curl handle.
 +
 +See example below.
++.SH AVAILABILITY
++Deprecated in 7.56.0. Before this release, field names were allowed to
++contain zero-valued bytes.
 +.SH RETURN VALUE
 +0 means everything was ok, non-zero means an error occurred corresponding
 +to a CURL_FORMADD_* constant defined in
 +.I <curl/curl.h>
 +.SH EXAMPLE
 +.nf
 +
 + struct curl_httppost* post = NULL;
 + struct curl_httppost* last = NULL;
 + char namebuffer[] = "name buffer";
 + long namelength = strlen(namebuffer);
 + char buffer[] = "test buffer";
 + char htmlbuffer[] = "<HTML>test buffer</HTML>";
 + long htmlbufferlength = strlen(htmlbuffer);
 + struct curl_forms forms[3];
 + char file1[] = "my-face.jpg";
 + char file2[] = "your-face.jpg";
 + /* add null character into htmlbuffer, to demonstrate that
 +    transfers of buffers containing null characters actually work
 + */
 + htmlbuffer[8] = '\\0';
 +
 + /* Add simple name/content section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
 +              CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
 +
 + /* Add simple name/content/contenttype section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
 +              CURLFORM_COPYCONTENTS, "<HTML></HTML>",
 +              CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
 +
 + /* Add name/ptrcontent section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
 +              CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
 +
 + /* Add ptrname/ptrcontent section */
 + curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer,
 +              CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH,
 +              namelength, CURLFORM_END);
 +
 + /* Add name/ptrcontent/contenttype section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "html_code_with_hole",
 +              CURLFORM_PTRCONTENTS, htmlbuffer,
 +              CURLFORM_CONTENTSLENGTH, htmlbufferlength,
 +              CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
 +
 + /* Add simple file section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
 +              CURLFORM_FILE, "my-face.jpg", CURLFORM_END);
 +
 + /* Add file/contenttype section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
 +              CURLFORM_FILE, "my-face.jpg",
 +              CURLFORM_CONTENTTYPE, "image/jpeg", CURLFORM_END);
 +
 + /* Add two file section */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
 +              CURLFORM_FILE, "my-face.jpg",
 +              CURLFORM_FILE, "your-face.jpg", CURLFORM_END);
 +
 + /* Add two file section using CURLFORM_ARRAY */
 + forms[0].option = CURLFORM_FILE;
 + forms[0].value  = file1;
 + forms[1].option = CURLFORM_FILE;
 + forms[1].value  = file2;
 + forms[2].option  = CURLFORM_END;
 +
 + /* Add a buffer to upload */
 + curl_formadd(&post, &last,
 +              CURLFORM_COPYNAME, "name",
 +              CURLFORM_BUFFER, "data",
 +              CURLFORM_BUFFERPTR, record,
 +              CURLFORM_BUFFERLENGTH, record_length,
 +              CURLFORM_END);
 +
 + /* no option needed for the end marker */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
 +              CURLFORM_ARRAY, forms, CURLFORM_END);
 + /* Add the content of a file as a normal post text value */
 + curl_formadd(&post, &last, CURLFORM_COPYNAME, "filecontent",
 +              CURLFORM_FILECONTENT, ".bashrc", CURLFORM_END);
 + /* Set the form info */
 + curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
 +
 +.SH "SEE ALSO"
- .BR curl_easy_setopt "(3), "
- .BR curl_formfree "(3)"
++.BR curl_easy_setopt "(3),"
++.BR curl_formfree "(3),"
++.BR curl_mime_init "(3)"
diff --cc docs/libcurl/gnurl_formfree.3
index 9c204ea93,000000000..80eabd3fd
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_formfree.3
+++ b/docs/libcurl/gnurl_formfree.3
@@@ -1,44 -1,0 +1,48 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
 +.SH NAME
 +curl_formfree - free a previously build multipart/formdata HTTP POST chain
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +.sp
 +.BI "void curl_formfree(struct curl_httppost *" form);
 +.ad
 +.SH DESCRIPTION
++This function is deprecated. Do not use! See \fIcurl_mime_init(3)\fP instead!
++
 +curl_formfree() is used to clean up data previously built/appended with
 +\fIcurl_formadd(3)\fP. This must be called when the data has been used, which
 +typically means after \fIcurl_easy_perform(3)\fP has been called.
 +
 +The pointer to free is the same pointer you passed to the
 +\fICURLOPT_HTTPPOST(3)\fP option, which is the \fIfirstitem\fP pointer from
 +the \fIcurl_formadd(3)\fP invoke(s).
 +
 +\fBform\fP is the pointer as returned from a previous call to
 +\fIcurl_formadd(3)\fP and may be NULL.
++.SH AVAILABILITY
++Deprecated in 7.56.0.
 +.SH RETURN VALUE
 +None
 +.SH "SEE ALSO"
- .BR curl_formadd "(3) "
++.BR curl_formadd "(3), " curl_mime_init "(3), " curl_mime_free "(3)"
diff --cc docs/libcurl/gnurl_formget.3
index d8ed80af1,000000000..f32ce2634
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_formget.3
+++ b/docs/libcurl/gnurl_formget.3
@@@ -1,70 -1,0 +1,71 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
 +.SH NAME
 +curl_formget - serialize a previously built multipart/formdata HTTP POST chain
 +.SH SYNOPSIS
 +.nf
 +.B #include <gnurl/curl.h>
 +
 +int curl_formget(struct curl_httppost * form, void *userp,
 +                  curl_formget_callback append );
 +.SH DESCRIPTION
 +curl_formget() is used to serialize data previously built/appended with
 +\fIcurl_formadd(3)\fP. Accepts a void pointer as second argument named
 +\fIuserp\fP which will be passed as the first argument to the
 +curl_formget_callback function.
 +
 +.BI "typedef size_t (*curl_formget_callback)(void *" userp, " const char *" 
buf,
 +.BI " size_t " len ");"
 +
 +The curl_formget_callback will be executed for each part of the HTTP POST
 +chain. The character buffer passed to the callback must not be freed. The
 +callback should return the buffer length passed to it on success.
 +
 +If the \fBCURLFORM_STREAM\fP option is used in the formpost, it will prevent
 +\fIcurl_formget(3)\fP from working until you've performed the actual HTTP
 +request as only then will libcurl get the actual read callback to use!
 +.SH RETURN VALUE
 +0 means everything was ok, non-zero means an error occurred
 +.SH EXAMPLE
 +.nf
 +
 + size_t print_httppost_callback(void *arg, const char *buf, size_t len)
 + {
 +   fwrite(buf, len, 1, stdout);
 +   (*(size_t *) arg) += len;
 +   return len;
 + }
 +
 + size_t print_httppost(struct curl_httppost *post)
 + {
 +   size_t total_size = 0;
 +   if(curl_formget(post, &total_size, print_httppost_callback)) {
 +     return (size_t) -1;
 +   }
 +   return total_size;
 + }
 +.SH AVAILABILITY
- This function was added in libcurl 7.15.5
++This function was added in libcurl 7.15.5. The form API is deprecated in
++libcurl 7.56.0.
 +.SH "SEE ALSO"
- .BR curl_formadd "(3) "
++.BR curl_formadd "(3), " curl_mime_init "(3)"
diff --cc docs/libcurl/gnurl_global_init.3
index daa8a3c8b,000000000..2d32e6474
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_global_init.3
+++ b/docs/libcurl/gnurl_global_init.3
@@@ -1,97 -1,0 +1,98 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
 +.SH NAME
 +curl_global_init - Global libcurl initialisation
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +.sp
 +.BI "CURLcode curl_global_init(long " flags ");"
 +.ad
 +.SH DESCRIPTION
 +This function sets up the program environment that libcurl needs.  Think of it
 +as an extension of the library loader.
 +
 +This function must be called at least once within a program (a program is all
 +the code that shares a memory space) before the program calls any other
 +function in libcurl.  The environment it sets up is constant for the life of
 +the program and is the same for every program, so multiple calls have the same
 +effect as one call.
 +
 +The flags option is a bit pattern that tells libcurl exactly what features to
 +init, as described below. Set the desired bits by ORing the values together.
 +In normal operation, you must specify CURL_GLOBAL_ALL.  Don't use any other
 +value unless you are familiar with it and mean to control internal operations 
of
 +libcurl.
 +
 +\fBThis function is not thread safe.\fP You must not call it when any other
 +thread in the program (i.e. a thread sharing the same memory) is running.
 +This doesn't just mean no other thread that is using libcurl.  Because
 +\fIcurl_global_init(3)\fP calls functions of other libraries that are
 +similarly thread unsafe, it could conflict with any other thread that uses
 +these other libraries.
 +
 +If you are initializing libcurl from a Windows DLL you should not initialize 
it
 +from DllMain or a static initializer because Windows holds the loader lock
 +during that time and it could cause a deadlock.
 +
 +See the description in \fIlibcurl(3)\fP of global environment requirements for
 +details of how to use this function.
 +.SH FLAGS
 +.IP CURL_GLOBAL_ALL
 +Initialize everything possible. This sets all known bits except
 +\fBCURL_GLOBAL_ACK_EINTR\fP.
 +
 +.IP CURL_GLOBAL_SSL
 +Initialize SSL.
 +
 +The implication here is that if this bit is not set, the initialization of the
 +SSL layer needs to be done by the application or at least outside of
 +libcurl. The exact procedure how to do SSL initializtion depends on the TLS
 +backend libcurl uses.
 +
 +Doing TLS based transfers without having the TLS layer initialized may lead to
 +unexpected behaviors.
 +.IP CURL_GLOBAL_WIN32
 +Initialize the Win32 socket libraries.
 +
 +The implication here is that if this bit is not set, the initialization of
 +winsock has to be done by the application or you risk getting undefined
 +behaviors. This option exists for when the initialization is handled outside
 +of libcurl so there's no need for libcurl to do it again.
 +.IP CURL_GLOBAL_NOTHING
 +Initialise nothing extra. This sets no bit.
 +.IP CURL_GLOBAL_DEFAULT
 +A sensible default. It will init both SSL and Win32. Right now, this equals
 +the functionality of the \fBCURL_GLOBAL_ALL\fP mask.
 +.IP CURL_GLOBAL_ACK_EINTR
 +When this flag is set, curl will acknowledge EINTR condition when connecting
 +or when waiting for data.  Otherwise, curl waits until full timeout
 +elapses. (Added in 7.30.0)
 +.SH RETURN VALUE
 +If this function returns non-zero, something went wrong and you cannot use the
 +other curl functions.
 +.SH "SEE ALSO"
 +.BR curl_global_init_mem "(3), "
 +.BR curl_global_cleanup "(3), "
++.BR curl_global_sslset "(3), "
 +.BR curl_easy_init "(3) "
 +.BR libcurl "(3) "
diff --cc docs/libcurl/gnurl_global_sslset.3
index 000000000,cee84458f..cee84458f
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_global_sslset.3
+++ b/docs/libcurl/gnurl_global_sslset.3
diff --cc docs/libcurl/gnurl_mime_addpart.3
index 000000000,22350668a..22350668a
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_addpart.3
+++ b/docs/libcurl/gnurl_mime_addpart.3
diff --cc docs/libcurl/gnurl_mime_data.3
index 000000000,d2112f2d4..d2112f2d4
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_data.3
+++ b/docs/libcurl/gnurl_mime_data.3
diff --cc docs/libcurl/gnurl_mime_data_cb.3
index 000000000,bc74a85a5..bc74a85a5
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_data_cb.3
+++ b/docs/libcurl/gnurl_mime_data_cb.3
diff --cc docs/libcurl/gnurl_mime_encoder.3
index 000000000,c17cf25b3..c17cf25b3
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_encoder.3
+++ b/docs/libcurl/gnurl_mime_encoder.3
diff --cc docs/libcurl/gnurl_mime_filedata.3
index 000000000,9a57068de..9a57068de
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_filedata.3
+++ b/docs/libcurl/gnurl_mime_filedata.3
diff --cc docs/libcurl/gnurl_mime_filename.3
index 000000000,42916e598..42916e598
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_filename.3
+++ b/docs/libcurl/gnurl_mime_filename.3
diff --cc docs/libcurl/gnurl_mime_headers.3
index 000000000,1d02e1ee5..1d02e1ee5
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_headers.3
+++ b/docs/libcurl/gnurl_mime_headers.3
diff --cc docs/libcurl/gnurl_mime_init.3
index 000000000,469f02b7c..469f02b7c
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_init.3
+++ b/docs/libcurl/gnurl_mime_init.3
diff --cc docs/libcurl/gnurl_mime_type.3
index 000000000,59841d5bd..59841d5bd
mode 000000,100644..100644
--- a/docs/libcurl/gnurl_mime_type.3
+++ b/docs/libcurl/gnurl_mime_type.3
diff --cc docs/libcurl/gnurl_version_info.3
index fb590f954,000000000..35d7f4522
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_version_info.3
+++ b/docs/libcurl/gnurl_version_info.3
@@@ -1,176 -1,0 +1,180 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual"
 +.SH NAME
 +curl_version_info - returns run-time libcurl version info
 +.SH SYNOPSIS
 +.B #include <gnurl/curl.h>
 +.sp
 +.BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
 +.ad
 +.SH DESCRIPTION
 +Returns a pointer to a filled in static struct with information about various
 +features in the running version of libcurl. \fItype\fP should be set to the
 +version of this functionality by the time you write your program. This way,
 +libcurl will always return a proper struct that your program understands,
 +while programs in the future might get a different
 +struct. \fBCURLVERSION_NOW\fP will be the most recent one for the library you
 +have installed:
 +
 +        data = curl_version_info(CURLVERSION_NOW);
 +
 +Applications should use this information to judge if things are possible to do
 +or not, instead of using compile-time checks, as dynamic/DLL libraries can be
 +changed independent of applications.
 +
 +The curl_version_info_data struct looks like this
 +
 +.nf
 +typedef struct {
 +  CURLversion age;          /* see description below */
 +
 +  /* when 'age' is 0 or higher, the members below also exist: */
 +  const char *version;      /* human readable string */
 +  unsigned int version_num; /* numeric representation */
 +  const char *host;         /* human readable string */
 +  int features;             /* bitmask, see below */
 +  char *ssl_version;        /* human readable string */
 +  long ssl_version_num;     /* not used, always zero */
 +  const char *libz_version; /* human readable string */
 +  const char * const *protocols; /* protocols */
 +
 +  /* when 'age' is 1 or higher, the members below also exist: */
 +  const char *ares;         /* human readable string */
 +  int ares_num;             /* number */
 +
 +  /* when 'age' is 2 or higher, the member below also exists: */
 +  const char *libidn;       /* human readable string */
 +
 +  /* when 'age' is 3 or higher (7.16.1 or later), the members below also
 +     exist  */
 +  int iconv_ver_num;       /* '_libiconv_version' if iconv support enabled */
 +
 +  const char *libssh_version; /* human readable string */
 +
 +} curl_version_info_data;
 +.fi
 +
 +\fIage\fP describes what the age of this struct is. The number depends on how
 +new the libcurl you're using is. You are however guaranteed to get a struct
 +that you have a matching struct for in the header, as you tell libcurl your
 +"age" with the input argument.
 +
 +\fIversion\fP is just an ascii string for the libcurl version.
 +
 +\fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
 +| <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
 +returned as 0x070908.
 +
 +\fIhost\fP is an ascii string showing what host information that this libcurl
 +was built for. As discovered by a configure script or set by the build
 +environment.
 +
 +\fIfeatures\fP can have none, one or more bits set, and the currently defined
 +bits are:
 +.RS
 +.IP CURL_VERSION_IPV6
 +supports IPv6
 +.IP CURL_VERSION_KERBEROS4
 +supports Kerberos V4 (when using FTP)
 +.IP CURL_VERSION_KERBEROS5
 +supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 
proxy
 +(Added in 7.40.0)
 +.IP CURL_VERSION_SSL
 +supports SSL (HTTPS/FTPS) (Added in 7.10)
 +.IP CURL_VERSION_LIBZ
 +supports HTTP deflate using libz (Added in 7.10)
 +.IP CURL_VERSION_NTLM
 +supports HTTP NTLM (added in 7.10.6)
 +.IP CURL_VERSION_GSSNEGOTIATE
 +supports HTTP GSS-Negotiate (added in 7.10.6)
 +.IP CURL_VERSION_DEBUG
 +libcurl was built with debug capabilities (added in 7.10.6)
 +.IP CURL_VERSION_CURLDEBUG
 +libcurl was built with memory tracking debug capabilities. This is mainly of
 +interest for libcurl hackers. (added in 7.19.6)
 +.IP CURL_VERSION_ASYNCHDNS
 +libcurl was built with support for asynchronous name lookups, which allows
 +more exact timeouts (even on Windows) and less blocking when using the multi
 +interface. (added in 7.10.7)
 +.IP CURL_VERSION_SPNEGO
 +libcurl was built with support for SPNEGO authentication (Simple and Protected
 +GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
 +.IP CURL_VERSION_LARGEFILE
 +libcurl was built with support for large files. (Added in 7.11.1)
 +.IP CURL_VERSION_IDN
 +libcurl was built with support for IDNA, domain names with international
 +letters. (Added in 7.12.0)
 +.IP CURL_VERSION_SSPI
 +libcurl was built with support for SSPI. This is only available on Windows and
 +makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and
 +Digest authentication. It also allows libcurl to use the current user
 +credentials without the app having to pass them on. (Added in 7.13.2)
 +.IP CURL_VERSION_GSSAPI
 +libcurl was built with support for GSS-API. This makes libcurl use provided
 +functions for Kerberos and SPNEGO authentication. It also allows libcurl
 +to use the current user credentials without the app having to pass them on.
 +(Added in 7.38.0)
 +.IP CURL_VERSION_CONV
 +libcurl was built with support for character conversions, as provided by the
 +CURLOPT_CONV_* callbacks. (Added in 7.15.4)
 +.IP CURL_VERSION_TLSAUTH_SRP
 +libcurl was built with support for TLS-SRP. (Added in 7.21.4)
 +.IP CURL_VERSION_NTLM_WB
 +libcurl was built with support for NTLM delegation to a winbind helper.
 +(Added in 7.22.0)
 +.IP CURL_VERSION_HTTP2
 +libcurl was built with support for HTTP2.
 +(Added in 7.33.0)
 +.IP CURL_VERSION_UNIX_SOCKETS
 +libcurl was built with support for Unix domain sockets.
 +(Added in 7.40.0)
 +.IP CURL_VERSION_PSL
 +libcurl was built with support for Mozilla's Public Suffix List. This makes
 +libcurl ignore cookies with a domain that's on the list.
 +(Added in 7.47.0)
 +.IP CURL_VERSION_HTTPS_PROXY
 +libcurl was built with support for HTTPS-proxy.
 +(Added in 7.52.0)
++.IP CURL_VERSION_MULTI_SSL
++libcurl was built with multiple SSL backends. For details, see
++\fIcurl_global_sslset(3)\fP.
++(Added in 7.56.0)
 +.RE
 +\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
 +has no SSL support, this is NULL.
 +
 +\fIssl_version_num\fP is always 0.
 +
 +\fIlibz_version\fP is an ASCII string (there is no numerical version). If
 +libcurl has no libz support, this is NULL.
 +
 +\fIprotocols\fP is a pointer to an array of char * pointers, containing the
 +names protocols that libcurl supports (using lowercase letters). The protocol
 +names are the same as would be used in URLs. The array is terminated by a NULL
 +entry.
 +.SH RETURN VALUE
 +A pointer to a curl_version_info_data struct.
 +.SH "SEE ALSO"
 +\fIcurl_version(3)\fP
 +
diff --cc docs/libcurl/opts/GNURLOPT_CAPATH.3
index dfef33b4d,000000000..bceffdc83
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_CAPATH.3
+++ b/docs/libcurl/opts/GNURLOPT_CAPATH.3
@@@ -1,69 -1,0 +1,70 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_CAPATH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_CAPATH \- specify directory holding CA certificates
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);
 +.SH DESCRIPTION
 +Pass a char * to a zero terminated string naming a directory holding multiple
 +CA certificates to verify the peer with. If libcurl is built against OpenSSL,
 +the certificate directory must be prepared using the openssl c_rehash utility.
 +This makes sense only when used in combination with the
 +\fICURLOPT_SSL_VERIFYPEER(3)\fP option.
 +
 +The \fICURLOPT_CAPATH(3)\fP function apparently does not work in Windows due
 +to some limitation in openssl.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH DEFAULT
 +NULL
 +.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_CAPATH, "/etc/cert-dir");
 +  ret = curl_easy_perform(curl);
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
- This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS
- backend provides the option only for backward compatibility.
++This option is supported by the OpenSSL, GnuTLS, PolarSSL and mbedTLS
++(since 7.56.0) backends. The NSS backend provides the option only for
++backward compatibility.
 +.SH RETURN VALUE
 +CURLE_OK if supported; or an error such as:
 +
 +CURLE_NOT_BUILT_IN - Not supported by the SSL backend
 +
 +CURLE_UNKNOWN_OPTION
 +
 +CURLE_OUT_OF_MEMORY
 +.SH "SEE ALSO"
 +.BR CURLOPT_CAINFO "(3), "
 +.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
index 56b371292,000000000..3e3dca396
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT.3
@@@ -1,60 -1,0 +1,64 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_CONNECTTIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);
 +.SH DESCRIPTION
 +Pass a long. It should contain the maximum time in seconds that you allow the
 +connection phase to the server to take.  This only limits the connection
 +phase, it has no impact once it has connected. Set to zero to switch to the
 +default built-in connection timeout - 300 seconds. See also the
 +\fICURLOPT_TIMEOUT(3)\fP option.
 +
 +In unix-like systems, this might cause signals to be used unless
 +\fICURLOPT_NOSIGNAL(3)\fP is set.
++
++If both \fICURLOPT_CONNECTTIMEOUT(3)\fP and \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
++are set, the value set last will be used.
 +.SH DEFAULT
 +300
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +
 +  /* complete connection within 10 seconds */
 +  curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10L);
 +
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Always
 +.SH RETURN VALUE
 +Returns CURLE_OK
 +.SH "SEE ALSO"
++.BR CURLOPT_CONNECTTIMEOUT_MS "(3), " 
 +.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT_MS.3
index 2d86042cc,000000000..7a7ee9302
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT_MS.3
+++ b/docs/libcurl/opts/GNURLOPT_CONNECTTIMEOUT_MS.3
@@@ -1,60 -1,0 +1,64 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_CONNECTTIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT_MS, long 
timeout);
 +.SH DESCRIPTION
 +Pass a long. It should contain the maximum time in milliseconds that you allow
 +the connection phase to the server to take.  This only limits the connection
 +phase, it has no impact once it has connected. Set to zero to switch to the
 +default built-in connection timeout - 300 seconds. See also the
 +\fICURLOPT_TIMEOUT_MS(3)\fP option.
 +
 +In unix-like systems, this might cause signals to be used unless
 +\fICURLOPT_NOSIGNAL(3)\fP is set.
++
++If both \fICURLOPT_CONNECTTIMEOUT(3)\fP and \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
++are set, the value set last will be used.
 +.SH DEFAULT
 +300000
 +.SH PROTOCOLS
 +All
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com";);
 +
 +  /* complete connection within 10000 milliseconds */
 +  curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 10000L);
 +
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Always
 +.SH RETURN VALUE
 +Returns CURLE_OK
 +.SH "SEE ALSO"
++.BR CURLOPT_CONNECTTIMEOUT "(3), " 
 +.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_HTTPPOST.3
index 942045000,000000000..8cf6018b6
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_HTTPPOST.3
+++ b/docs/libcurl/opts/GNURLOPT_HTTPPOST.3
@@@ -1,79 -1,0 +1,82 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
- .\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_HTTPPOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_HTTPPOST \- specify the multipart formpost content
 +.SH SYNOPSIS
 +.nf
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPOST,
 +                          struct curl_httppost *formpost);
 +.SH DESCRIPTION
 +Tells libcurl you want a multipart/formdata HTTP POST to be made and you
 +instruct what data to pass on to the server in the \fIformpost\fP argument.
 +Pass a pointer to a linked list of curl_httppost structs as parameter.  The
 +easiest way to create such a list, is to use \fIcurl_formadd(3)\fP as
 +documented. The data in this list must remain intact as long as the curl
 +transfer is alive and is using it.
 +
 +Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
 +You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP.
 +
 +When setting \fICURLOPT_HTTPPOST(3)\fP, it will automatically set
 +\fICURLOPT_NOBODY(3)\fP to 0.
++
++This option is deprecated! Do not use it. Use \fICURLOPT_MIMEPOST(3)\fP
++instead after having prepared mime data.
 +.SH DEFAULT
 +NULL
 +.SH PROTOCOLS
 +HTTP
 +.SH EXAMPLE
 +.nf
 +/* Fill in the file upload field. This makes libcurl load data from
 +   the given file name when curl_easy_perform() is called. */
 +curl_formadd(&formpost,
 +             &lastptr,
 +             CURLFORM_COPYNAME, "sendfile",
 +             CURLFORM_FILE, "postit2.c",
 +             CURLFORM_END);
 +
 +/* Fill in the filename field */
 +curl_formadd(&formpost,
 +             &lastptr,
 +             CURLFORM_COPYNAME, "filename",
 +             CURLFORM_COPYCONTENTS, "postit2.c",
 +             CURLFORM_END);
 +
 +/* Fill in the submit field too, even if this is rarely needed */
 +curl_formadd(&formpost,
 +             &lastptr,
 +             CURLFORM_COPYNAME, "submit",
 +             CURLFORM_COPYCONTENTS, "send",
 +             CURLFORM_END);
 +.fi
 +.SH AVAILABILITY
- As long as HTTP is enabled
++As long as HTTP is enabled. Deprecated in 7.56.0.
 +.SH RETURN VALUE
 +Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
- .BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POST "(3), "
- .BR curl_formadd "(3), " curl_formfree "(3), "
++.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POST "(3), " CURLOPT_MIMEPOST "(3),"
++.BR curl_formadd "(3), " curl_formfree "(3), " curl_mime_init "(3)"
diff --cc docs/libcurl/opts/GNURLOPT_INTERLEAVEDATA.3
index 232e64abf,000000000..79a059446
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_INTERLEAVEDATA.3
+++ b/docs/libcurl/opts/GNURLOPT_INTERLEAVEDATA.3
@@@ -1,57 -1,0 +1,58 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_INTERLEAVEDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
- CURLOPT_INTERLEAVEDATA \- custom pointer to RTSP interleave callback
++CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void 
*pointer);
 +.SH DESCRIPTION
 +This is the userdata \fIpointer\fP that will be passed to
- \fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is
- received.
++\fICURLOPT_INTERLEAVEFUNCTION(3)\fP when interleaved RTP data is received. If
++the interleave function callback is not set, this pointer is not used
++anywhere.
 +.SH DEFAULT
 +NULL
 +.SH PROTOCOLS
 +RTSP
 +.SH EXAMPLE
 +.nf
 +static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user)
 +{
 +  struct local *l = (struct local *)user;
 +  /* take care of the packet in 'ptr', then return... */
 +  return size * nmemb;
 +}
 +{
 +  struct local rtp_data;
 +  curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
 +  curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.20.0
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
 +.BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
index 25bcd0f94,000000000..326a29c46
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_INTERLEAVEFUNCTION.3
@@@ -1,80 -1,0 +1,84 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <address@hidden>, et 
al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_INTERLEAVEFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" 
"curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
 +.SH SYNOPSIS
 +.nf
 +#include <gnurl/curl.h>
 +
 +size_t interleave_callback(void *ptr, size_t size, size_t nmemb,
 +                           void *userdata);
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEFUNCTION,
 +                          interleave_callback);
 +.SH DESCRIPTION
 +Pass a pointer to your callback function, which should match the prototype
 +shown above.
 +
 +This callback function gets called by libcurl as soon as it has received
 +interleaved RTP data. This function gets called for each $ block and therefore
 +contains exactly one upper-layer protocol unit (e.g.  one RTP packet). Curl
 +writes the interleaved header as well as the included data for each call. The
 +first byte is always an ASCII dollar sign. The dollar sign is followed by a
 +one byte channel identifier and then a 2 byte integer length in network byte
 +order. See \fIRFC2326 Section 10.12\fP for more information on how RTP
 +interleaving behaves. If unset or set to NULL, curl will use the default write
 +function.
 +
 +Interleaved RTP poses some challenges for the client application. Since the
 +stream data is sharing the RTSP control connection, it is critical to service
 +the RTP in a timely fashion. If the RTP data is not handled quickly,
 +subsequent response processing may become unreasonably delayed and the
 +connection may close. The application may use \fICURL_RTSPREQ_RECEIVE\fP to
 +service RTP data when no requests are desired. If the application makes a
 +request, (e.g.  \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
 +process any pending RTP data before marking the request as finished.
++
++The \fICURLOPT_WRITEDATA(3)\fP is passed in the \fIuserdata\fP argument in the
++callback.
 +.SH DEFAULT
- NULL
++NULL, the interleave data is then passed to the regular write function:
++\fICURLOPT_WRITEFUNCTION(3)\fP.
 +.SH PROTOCOLS
 +RTSP
 +.SH EXAMPLE
 +.nf
 +static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user)
 +{
 +  struct local *l = (struct local *)user;
 +  /* take care of the packet in 'ptr', then return... */
 +  return size * nmemb;
 +}
 +{
 +  struct local rtp_data;
 +  curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
 +  curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.20.0
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
 +.SH "SEE ALSO"
- .BR CURLOPT_INTERLEAVEFUNCTION "(3), " CURLOPT_RTSP_REQUEST "(3), "
++.BR CURLOPT_INTERLEAVEDATA "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_NOPROXY.3
index 9b01eba1f,000000000..873724484
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_NOPROXY.3
+++ b/docs/libcurl/opts/GNURLOPT_NOPROXY.3
@@@ -1,69 -1,0 +1,74 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_NOPROXY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_NOPROXY \- disable proxy use for specific hosts
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);
 +.SH DESCRIPTION
 +Pass a pointer to a zero terminated string. The string consists of a comma
 +separated list of host names that do not require a proxy to get reached, even
 +if one is specified.  The only wildcard available is a single * character,
 +which matches all hosts, and effectively disables the proxy. Each name in this
 +list is matched as either a domain which contains the hostname, or the
 +hostname itself. For example, example.com would match example.com,
 +example.com:80, and www.example.com, but not www.notanexample.com or
 +example.com.othertld.
 +
 +If the name in the noproxy list has a leading period, it is a domain match
 +against the provided host name. This way ".example.com" will switch off proxy
 +use for both "www.example.com" as well as for "foo.example.com".
 +
++Setting the noproxy string to "" (an empty string) will explicitly enable the
++proxy for all host names, even if there is an environment variable set for it.
++
 +The application does not have to keep the string around after setting this
 +option.
++.SH "Environment variables"
++See \fIGNURLOPT_PROXY(3)\fP
 +.SH DEFAULT
 +NULL
 +.SH PROTOCOLS
 +Most
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  /* accept various URLs */
 +  curl_easy_setopt(curl, CURLOPT_URL, input);
 +  /* use this proxy */
 +  curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80";);
 +  /* ... but make sure this host name is not proxied */
 +  curl_easy_setopt(curl, CURLOPT_NOPROXY, "www.example.com");
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Added in 7.19.4
 +.SH RETURN VALUE
 +Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
 +CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 +.SH "SEE ALSO"
- .BR CURLOPT_PROXY "(3), " CURLOPT_PROXYAUTH "(3), "
++.BR GNURLOPT_PROXY "(3), " GNURLOPT_PROXYAUTH "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_PROXY.3
index 1fc4000b3,000000000..615af887d
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_PROXY.3
+++ b/docs/libcurl/opts/GNURLOPT_PROXY.3
@@@ -1,117 -1,0 +1,118 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_PROXY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
 +.SH NAME
 +CURLOPT_PROXY \- set proxy to use
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY, char *proxy);
 +.SH DESCRIPTION
 +Set the \fIproxy\fP to use for the upcoming request. The parameter should be a
 +char * to a zero terminated string holding the host name or dotted numerical
 +IP address. A numerical IPv6 address must be written within [brackets].
 +
 +To specify port number in this string, append :[port] to the end of the host
 +name. The proxy's port number may optionally be specified with the separate
 +option \fICURLOPT_PROXYPORT(3)\fP. If not specified, libcurl will default to
 +using port 1080 for proxies.
 +
 +The proxy string may be prefixed with [scheme]:// to specify which kind of
 +proxy is used.
 +
 +.RS
 +.IP http://
 +HTTP Proxy. Default when no scheme or proxy type is specified.
 +.IP https://
 +HTTPS Proxy. (Added in 7.52.0 for OpenSSL, GnuTLS and NSS)
 +.IP socks4://
 +SOCKS4 Proxy.
 +.IP socks4a://
 +SOCKS4a Proxy. Proxy resolves URL hostname.
 +.IP socks5://
 +SOCKS5 Proxy.
 +.IP socks5h://
 +SOCKS5 Proxy. Proxy resolves URL hostname.
 +.RE
 +
 +Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify
 +which kind of proxy the string identifies.
 +
 +When you tell the library to use a HTTP proxy, libcurl will transparently
 +convert operations to HTTP even if you specify an FTP URL etc. This may have
 +an impact on what other features of the library you can use, such as
 +\fICURLOPT_QUOTE(3)\fP and similar FTP specifics that don't work unless you
 +tunnel through the HTTP proxy. Such tunneling is activated with
 +\fICURLOPT_HTTPPROXYTUNNEL(3)\fP.
 +
 +Setting the proxy string to "" (an empty string) will explicitly disable the
 +use of a proxy, even if there is an environment variable set for it.
 +
 +A proxy host string can also include protocol scheme (http://) and embedded
 +user + password.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH "Environment variables"
 +libcurl respects the proxy environment variables named \fBhttp_proxy\fP,
 +\fBftp_proxy\fP, \fBsftp_proxy\fP etc. If set, libcurl will use the specified
 +proxy for that URL scheme. So for a "FTP://" URL, the \fBftp_proxy\fP is
 +considered. \fBall_proxy\fP is used if no protocol specific proxy was set.
 +
 +If \fBno_proxy\fP (or \fBNO_PROXY\fP) is set, it can specify a list of host
 +names to not use a proxy for (even if one of the previous mention variables
 +are set). That is the exact equivalent of setting the \fICURLOPT_NOPROXY(3)\fP
 +option.
 +
- The \fICURLOPT_PROXY(3)\fP option overrides environment variables.
++The \fICURLOPT_PROXY(3)\fP and \fICURLOPT_NOPROXY(3)\fP options override
++environment variables.
 +.SH DEFAULT
 +Default is NULL, meaning no proxy is used.
 +
 +When you set a host name to use, do not assume that there's any particular
 +single port number used widely for proxies. Specify it!
 +.SH PROTOCOLS
 +All except file://. Note that some protocols don't do very well over proxy.
 +.SH EXAMPLE
 +.nf
 +CURL *curl = curl_easy_init();
 +if(curl) {
 +  curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/file.txt";);
 +  curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80";);
 +  curl_easy_perform(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Since 7.14.1 the proxy environment variable names can include the protocol
 +scheme.
 +
 +Since 7.21.7 the proxy string supports the socks protocols as "schemes".
 +
 +Since 7.50.2, unsupported schemes in proxy strings cause libcurl to return
 +error.
 +.SH RETURN VALUE
 +Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or
 +CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 +.SH "SEE ALSO"
 +.BR CURLOPT_PROXYPORT "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
 +.BR CURLOPT_PROXYTYPE "(3)"
diff --cc docs/libcurl/opts/GNURLOPT_USERPWD.3
index b0bd19bb0,000000000..c303d39c3
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_USERPWD.3
+++ b/docs/libcurl/opts/GNURLOPT_USERPWD.3
@@@ -1,90 -1,0 +1,91 @@@
 +.\" **************************************************************************
 +.\" *                                  _   _ ____  _
 +.\" *  Project                     ___| | | |  _ \| |
 +.\" *                             / __| | | | |_) | |
 +.\" *                            | (__| |_| |  _ <| |___
 +.\" *                             \___|\___/|_| \_\_____|
 +.\" *
 +.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 +.\" *
 +.\" * This software is licensed as described in the file COPYING, which
 +.\" * you should have received as part of this distribution. The terms
 +.\" * are also available at https://curl.haxx.se/docs/copyright.html.
 +.\" *
 +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 +.\" * copies of the Software, and permit persons to whom the Software is
 +.\" * furnished to do so, under the terms of the COPYING file.
 +.\" *
 +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
ANY
 +.\" * KIND, either express or implied.
 +.\" *
 +.\" **************************************************************************
 +.\"
 +.TH CURLOPT_USERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt 
options"
 +.SH NAME
 +CURLOPT_USERPWD \- user name and password to use in authentication
 +.SH SYNOPSIS
 +#include <gnurl/curl.h>
 +
 +CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERPWD, char *userpwd);
 +.SH DESCRIPTION
 +Pass a char * as parameter, pointing to a zero terminated login details string
 +for the connection. The format of which is: [user name]:[password].
 +
 +When using Kerberos V5 authentication with a Windows based server, you should
 +specify the user name part with the domain name in order for the server to
 +successfully obtain a Kerberos Ticket. If you don't then the initial part of
 +the authentication handshake may fail.
 +
 +When using NTLM, the user name can be specified simply as the user name
 +without the domain name should the server be part of a single domain and
 +forest.
 +
 +To specify the domain name use either Down-Level Logon Name or UPN (User
 +Principal Name) formats. For example, EXAMPLE\\user and address@hidden
 +respectively.
 +
 +Some HTTP servers (on Windows) support inclusion of the domain for Basic
 +authentication as well.
 +
 +When using HTTP and \fICURLOPT_FOLLOWLOCATION(3)\fP, libcurl might perform
 +several requests to possibly different hosts. libcurl will only send this user
 +and password information to hosts using the initial host name (unless
 +\fICURLOPT_UNRESTRICTED_AUTH(3)\fP is set), so if libcurl follows locations to
 +other hosts it will not send the user and password to those. This is enforced
 +to prevent accidental information leakage.
 +
 +Use \fICURLOPT_HTTPAUTH(3)\fP to specify the authentication method for HTTP
 +based connections or \fICURLOPT_LOGIN_OPTIONS(3)\fP to control IMAP, POP3 and
 +SMTP options.
 +
 +The user and password strings are not URL decoded, so there's no way to send
 +in a user name containing a colon using this option. Use
 +\fICURLOPT_USERNAME(3)\fP for that, or include it in the URL.
 +
 +The application does not have to keep the string around after setting this
 +option.
 +.SH DEFAULT
 +NULL
 +.SH PROTOCOLS
 +Most
 +.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_USERPWD, "clark:kent");
 +
 +  ret = curl_easy_perform(curl);
 +
 +  curl_easy_cleanup(curl);
 +}
 +.fi
 +.SH AVAILABILITY
 +Always
 +.SH RETURN VALUE
 +Returns CURLE_OK on success or
 +CURLE_OUT_OF_MEMORY if there was insufficient heap space.
 +.SH "SEE ALSO"
 +.BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
++.BR CURLOPT_PROXYUSERPWD "(3), "
diff --cc docs/libcurl/opts/Makefile.inc
index fc20ee351,f710b5eb3..4300ec1cd
--- a/docs/libcurl/opts/Makefile.inc
+++ b/docs/libcurl/opts/Makefile.inc
@@@ -1,321 -1,323 +1,323 @@@
  # Shared between Makefile.am and CMakeLists.txt
  
  man_MANS =                                      \
 -  CURLINFO_ACTIVESOCKET.3                       \
 -  CURLINFO_APPCONNECT_TIME.3                    \
 -  CURLINFO_CERTINFO.3                           \
 -  CURLINFO_CONDITION_UNMET.3                    \
 -  CURLINFO_CONNECT_TIME.3                       \
 -  CURLINFO_CONTENT_LENGTH_DOWNLOAD.3            \
 -  CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3          \
 -  CURLINFO_CONTENT_LENGTH_UPLOAD.3              \
 -  CURLINFO_CONTENT_LENGTH_UPLOAD_T.3            \
 -  CURLINFO_CONTENT_TYPE.3                       \
 -  CURLINFO_COOKIELIST.3                         \
 -  CURLINFO_EFFECTIVE_URL.3                      \
 -  CURLINFO_FILETIME.3                           \
 -  CURLINFO_FTP_ENTRY_PATH.3                     \
 -  CURLINFO_HEADER_SIZE.3                        \
 -  CURLINFO_HTTPAUTH_AVAIL.3                     \
 -  CURLINFO_HTTP_CONNECTCODE.3                   \
 -  CURLINFO_HTTP_VERSION.3                       \
 -  CURLINFO_LASTSOCKET.3                         \
 -  CURLINFO_LOCAL_IP.3                           \
 -  CURLINFO_LOCAL_PORT.3                         \
 -  CURLINFO_NAMELOOKUP_TIME.3                    \
 -  CURLINFO_NUM_CONNECTS.3                       \
 -  CURLINFO_OS_ERRNO.3                           \
 -  CURLINFO_PRETRANSFER_TIME.3                   \
 -  CURLINFO_PRIMARY_IP.3                         \
 -  CURLINFO_PRIMARY_PORT.3                       \
 -  CURLINFO_PRIVATE.3                            \
 -  CURLINFO_PROTOCOL.3                           \
 -  CURLINFO_PROXYAUTH_AVAIL.3                    \
 -  CURLINFO_PROXY_SSL_VERIFYRESULT.3             \
 -  CURLINFO_REDIRECT_COUNT.3                     \
 -  CURLINFO_REDIRECT_TIME.3                      \
 -  CURLINFO_REDIRECT_URL.3                       \
 -  CURLINFO_REQUEST_SIZE.3                       \
 -  CURLINFO_RESPONSE_CODE.3                      \
 -  CURLINFO_RTSP_CLIENT_CSEQ.3                   \
 -  CURLINFO_RTSP_CSEQ_RECV.3                     \
 -  CURLINFO_RTSP_SERVER_CSEQ.3                   \
 -  CURLINFO_RTSP_SESSION_ID.3                    \
 -  CURLINFO_SCHEME.3                             \
 -  CURLINFO_SIZE_DOWNLOAD.3                      \
 -  CURLINFO_SIZE_DOWNLOAD_T.3                    \
 -  CURLINFO_SIZE_UPLOAD.3                        \
 -  CURLINFO_SIZE_UPLOAD_T.3                      \
 -  CURLINFO_SPEED_DOWNLOAD.3                     \
 -  CURLINFO_SPEED_DOWNLOAD_T.3                   \
 -  CURLINFO_SPEED_UPLOAD.3                       \
 -  CURLINFO_SPEED_UPLOAD_T.3                     \
 -  CURLINFO_SSL_ENGINES.3                        \
 -  CURLINFO_SSL_VERIFYRESULT.3                   \
 -  CURLINFO_STARTTRANSFER_TIME.3                 \
 -  CURLINFO_TLS_SESSION.3                        \
 -  CURLINFO_TLS_SSL_PTR.3                        \
 -  CURLINFO_TOTAL_TIME.3                         \
 -  CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3          \
 -  CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3        \
 -  CURLMOPT_MAXCONNECTS.3                        \
 -  CURLMOPT_MAX_HOST_CONNECTIONS.3               \
 -  CURLMOPT_MAX_PIPELINE_LENGTH.3                \
 -  CURLMOPT_MAX_TOTAL_CONNECTIONS.3              \
 -  CURLMOPT_PIPELINING.3                         \
 -  CURLMOPT_PIPELINING_SERVER_BL.3               \
 -  CURLMOPT_PIPELINING_SITE_BL.3                 \
 -  CURLMOPT_PUSHDATA.3                           \
 -  CURLMOPT_PUSHFUNCTION.3                       \
 -  CURLMOPT_SOCKETDATA.3                         \
 -  CURLMOPT_SOCKETFUNCTION.3                     \
 -  CURLMOPT_TIMERDATA.3                          \
 -  CURLMOPT_TIMERFUNCTION.3                      \
 -  CURLOPT_ABSTRACT_UNIX_SOCKET.3                \
 -  CURLOPT_ACCEPTTIMEOUT_MS.3                    \
 -  CURLOPT_ACCEPT_ENCODING.3                     \
 -  CURLOPT_ADDRESS_SCOPE.3                       \
 -  CURLOPT_APPEND.3                              \
 -  CURLOPT_AUTOREFERER.3                         \
 -  CURLOPT_BUFFERSIZE.3                          \
 -  CURLOPT_CAINFO.3                              \
 -  CURLOPT_CAPATH.3                              \
 -  CURLOPT_CERTINFO.3                            \
 -  CURLOPT_CHUNK_BGN_FUNCTION.3                  \
 -  CURLOPT_CHUNK_DATA.3                          \
 -  CURLOPT_CHUNK_END_FUNCTION.3                  \
 -  CURLOPT_CLOSESOCKETDATA.3                     \
 -  CURLOPT_CLOSESOCKETFUNCTION.3                 \
 -  CURLOPT_CONNECTTIMEOUT.3                      \
 -  CURLOPT_CONNECTTIMEOUT_MS.3                   \
 -  CURLOPT_CONNECT_ONLY.3                        \
 -  CURLOPT_CONNECT_TO.3                          \
 -  CURLOPT_CONV_FROM_NETWORK_FUNCTION.3          \
 -  CURLOPT_CONV_FROM_UTF8_FUNCTION.3             \
 -  CURLOPT_CONV_TO_NETWORK_FUNCTION.3            \
 -  CURLOPT_COOKIE.3                              \
 -  CURLOPT_COOKIEFILE.3                          \
 -  CURLOPT_COOKIEJAR.3                           \
 -  CURLOPT_COOKIELIST.3                          \
 -  CURLOPT_COOKIESESSION.3                       \
 -  CURLOPT_COPYPOSTFIELDS.3                      \
 -  CURLOPT_CRLF.3                                \
 -  CURLOPT_CRLFILE.3                             \
 -  CURLOPT_CUSTOMREQUEST.3                       \
 -  CURLOPT_DEBUGDATA.3                           \
 -  CURLOPT_DEBUGFUNCTION.3                       \
 -  CURLOPT_DEFAULT_PROTOCOL.3                    \
 -  CURLOPT_DIRLISTONLY.3                         \
 -  CURLOPT_DNS_CACHE_TIMEOUT.3                   \
 -  CURLOPT_DNS_INTERFACE.3                       \
 -  CURLOPT_DNS_LOCAL_IP4.3                       \
 -  CURLOPT_DNS_LOCAL_IP6.3                       \
 -  CURLOPT_DNS_SERVERS.3                         \
 -  CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
 -  CURLOPT_EGDSOCKET.3                           \
 -  CURLOPT_ERRORBUFFER.3                         \
 -  CURLOPT_EXPECT_100_TIMEOUT_MS.3               \
 -  CURLOPT_FAILONERROR.3                         \
 -  CURLOPT_FILETIME.3                            \
 -  CURLOPT_FNMATCH_DATA.3                        \
 -  CURLOPT_FNMATCH_FUNCTION.3                    \
 -  CURLOPT_FOLLOWLOCATION.3                      \
 -  CURLOPT_FORBID_REUSE.3                        \
 -  CURLOPT_FRESH_CONNECT.3                       \
 -  CURLOPT_FTPPORT.3                             \
 -  CURLOPT_FTPSSLAUTH.3                          \
 -  CURLOPT_FTP_ACCOUNT.3                         \
 -  CURLOPT_FTP_ALTERNATIVE_TO_USER.3             \
 -  CURLOPT_FTP_CREATE_MISSING_DIRS.3             \
 -  CURLOPT_FTP_FILEMETHOD.3                      \
 -  CURLOPT_FTP_RESPONSE_TIMEOUT.3                \
 -  CURLOPT_FTP_SKIP_PASV_IP.3                    \
 -  CURLOPT_FTP_SSL_CCC.3                         \
 -  CURLOPT_FTP_USE_EPRT.3                        \
 -  CURLOPT_FTP_USE_EPSV.3                        \
 -  CURLOPT_FTP_USE_PRET.3                        \
 -  CURLOPT_GSSAPI_DELEGATION.3                   \
 -  CURLOPT_HEADER.3                              \
 -  CURLOPT_HEADERDATA.3                          \
 -  CURLOPT_HEADERFUNCTION.3                      \
 -  CURLOPT_HEADEROPT.3                           \
 -  CURLOPT_HTTP200ALIASES.3                      \
 -  CURLOPT_HTTPAUTH.3                            \
 -  CURLOPT_HTTPGET.3                             \
 -  CURLOPT_HTTPHEADER.3                          \
 -  CURLOPT_HTTPPOST.3                            \
 -  CURLOPT_HTTPPROXYTUNNEL.3                     \
 -  CURLOPT_HTTP_CONTENT_DECODING.3               \
 -  CURLOPT_HTTP_TRANSFER_DECODING.3              \
 -  CURLOPT_HTTP_VERSION.3                        \
 -  CURLOPT_IGNORE_CONTENT_LENGTH.3               \
 -  CURLOPT_INFILESIZE.3                          \
 -  CURLOPT_INFILESIZE_LARGE.3                    \
 -  CURLOPT_INTERFACE.3                           \
 -  CURLOPT_INTERLEAVEDATA.3                      \
 -  CURLOPT_INTERLEAVEFUNCTION.3                  \
 -  CURLOPT_IOCTLDATA.3                           \
 -  CURLOPT_IOCTLFUNCTION.3                       \
 -  CURLOPT_IPRESOLVE.3                           \
 -  CURLOPT_ISSUERCERT.3                          \
 -  CURLOPT_KEEP_SENDING_ON_ERROR.3               \
 -  CURLOPT_KEYPASSWD.3                           \
 -  CURLOPT_KRBLEVEL.3                            \
 -  CURLOPT_LOCALPORT.3                           \
 -  CURLOPT_LOCALPORTRANGE.3                      \
 -  CURLOPT_LOGIN_OPTIONS.3                       \
 -  CURLOPT_LOW_SPEED_LIMIT.3                     \
 -  CURLOPT_LOW_SPEED_TIME.3                      \
 -  CURLOPT_MAIL_AUTH.3                           \
 -  CURLOPT_MAIL_FROM.3                           \
 -  CURLOPT_MAIL_RCPT.3                           \
 -  CURLOPT_MAXCONNECTS.3                         \
 -  CURLOPT_MAXFILESIZE.3                         \
 -  CURLOPT_MAXFILESIZE_LARGE.3                   \
 -  CURLOPT_MAXREDIRS.3                           \
 -  CURLOPT_MAX_RECV_SPEED_LARGE.3                \
 -  CURLOPT_MAX_SEND_SPEED_LARGE.3                \
 -  CURLOPT_MIMEPOST.3                            \
 -  CURLOPT_NETRC.3                               \
 -  CURLOPT_NETRC_FILE.3                          \
 -  CURLOPT_NEW_DIRECTORY_PERMS.3                 \
 -  CURLOPT_NEW_FILE_PERMS.3                      \
 -  CURLOPT_NOBODY.3                              \
 -  CURLOPT_NOPROGRESS.3                          \
 -  CURLOPT_NOPROXY.3                             \
 -  CURLOPT_NOSIGNAL.3                            \
 -  CURLOPT_OPENSOCKETDATA.3                      \
 -  CURLOPT_OPENSOCKETFUNCTION.3                  \
 -  CURLOPT_PASSWORD.3                            \
 -  CURLOPT_PATH_AS_IS.3                          \
 -  CURLOPT_PINNEDPUBLICKEY.3                     \
 -  CURLOPT_PIPEWAIT.3                            \
 -  CURLOPT_PORT.3                                \
 -  CURLOPT_POST.3                                \
 -  CURLOPT_POSTFIELDS.3                          \
 -  CURLOPT_POSTFIELDSIZE.3                       \
 -  CURLOPT_POSTFIELDSIZE_LARGE.3                 \
 -  CURLOPT_POSTQUOTE.3                           \
 -  CURLOPT_POSTREDIR.3                           \
 -  CURLOPT_PREQUOTE.3                            \
 -  CURLOPT_PRE_PROXY.3                           \
 -  CURLOPT_PRIVATE.3                             \
 -  CURLOPT_PROGRESSDATA.3                        \
 -  CURLOPT_PROGRESSFUNCTION.3                    \
 -  CURLOPT_PROTOCOLS.3                           \
 -  CURLOPT_PROXY.3                               \
 -  CURLOPT_PROXYAUTH.3                           \
 -  CURLOPT_PROXYHEADER.3                         \
 -  CURLOPT_PROXYPASSWORD.3                       \
 -  CURLOPT_PROXYPORT.3                           \
 -  CURLOPT_PROXYTYPE.3                           \
 -  CURLOPT_PROXYUSERNAME.3                       \
 -  CURLOPT_PROXYUSERPWD.3                        \
 -  CURLOPT_PROXY_CAINFO.3                        \
 -  CURLOPT_PROXY_CAPATH.3                        \
 -  CURLOPT_PROXY_CRLFILE.3                       \
 -  CURLOPT_PROXY_KEYPASSWD.3                     \
 -  CURLOPT_PROXY_PINNEDPUBLICKEY.3               \
 -  CURLOPT_PROXY_SERVICE_NAME.3                  \
 -  CURLOPT_PROXY_SSLCERT.3                       \
 -  CURLOPT_PROXY_SSLCERTTYPE.3                   \
 -  CURLOPT_PROXY_SSLKEY.3                        \
 -  CURLOPT_PROXY_SSLKEYTYPE.3                    \
 -  CURLOPT_PROXY_SSLVERSION.3                    \
 -  CURLOPT_PROXY_SSL_CIPHER_LIST.3               \
 -  CURLOPT_PROXY_SSL_OPTIONS.3                   \
 -  CURLOPT_PROXY_SSL_VERIFYHOST.3                \
 -  CURLOPT_PROXY_SSL_VERIFYPEER.3                \
 -  CURLOPT_PROXY_TLSAUTH_PASSWORD.3              \
 -  CURLOPT_PROXY_TLSAUTH_TYPE.3                  \
 -  CURLOPT_PROXY_TLSAUTH_USERNAME.3              \
 -  CURLOPT_PROXY_TRANSFER_MODE.3                 \
 -  CURLOPT_PUT.3                                 \
 -  CURLOPT_QUOTE.3                               \
 -  CURLOPT_RANDOM_FILE.3                         \
 -  CURLOPT_RANGE.3                               \
 -  CURLOPT_READDATA.3                            \
 -  CURLOPT_READFUNCTION.3                        \
 -  CURLOPT_REDIR_PROTOCOLS.3                     \
 -  CURLOPT_REFERER.3                             \
 -  CURLOPT_REQUEST_TARGET.3                      \
 -  CURLOPT_RESOLVE.3                             \
 -  CURLOPT_RESUME_FROM.3                         \
 -  CURLOPT_RESUME_FROM_LARGE.3                   \
 -  CURLOPT_RTSP_CLIENT_CSEQ.3                    \
 -  CURLOPT_RTSP_REQUEST.3                        \
 -  CURLOPT_RTSP_SERVER_CSEQ.3                    \
 -  CURLOPT_RTSP_SESSION_ID.3                     \
 -  CURLOPT_RTSP_STREAM_URI.3                     \
 -  CURLOPT_RTSP_TRANSPORT.3                      \
 -  CURLOPT_SASL_IR.3                             \
 -  CURLOPT_SEEKDATA.3                            \
 -  CURLOPT_SEEKFUNCTION.3                        \
 -  CURLOPT_SERVICE_NAME.3                        \
 -  CURLOPT_SHARE.3                               \
 -  CURLOPT_SOCKOPTDATA.3                         \
 -  CURLOPT_SOCKOPTFUNCTION.3                     \
 -  CURLOPT_SOCKS5_AUTH.3                         \
 -  CURLOPT_SOCKS5_GSSAPI_NEC.3                   \
 -  CURLOPT_SOCKS5_GSSAPI_SERVICE.3               \
 -  CURLOPT_SSH_AUTH_TYPES.3                      \
 -  CURLOPT_SSH_COMPRESSION.3                     \
 -  CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3             \
 -  CURLOPT_SSH_KEYDATA.3                         \
 -  CURLOPT_SSH_KEYFUNCTION.3                     \
 -  CURLOPT_SSH_KNOWNHOSTS.3                      \
 -  CURLOPT_SSH_PRIVATE_KEYFILE.3                 \
 -  CURLOPT_SSH_PUBLIC_KEYFILE.3                  \
 -  CURLOPT_SSLCERT.3                             \
 -  CURLOPT_SSLCERTTYPE.3                         \
 -  CURLOPT_SSLENGINE.3                           \
 -  CURLOPT_SSLENGINE_DEFAULT.3                   \
 -  CURLOPT_SSLKEY.3                              \
 -  CURLOPT_SSLKEYTYPE.3                          \
 -  CURLOPT_SSLVERSION.3                          \
 -  CURLOPT_SSL_CIPHER_LIST.3                     \
 -  CURLOPT_SSL_CTX_DATA.3                        \
 -  CURLOPT_SSL_CTX_FUNCTION.3                    \
 -  CURLOPT_SSL_ENABLE_ALPN.3                     \
 -  CURLOPT_SSL_ENABLE_NPN.3                      \
 -  CURLOPT_SSL_FALSESTART.3                      \
 -  CURLOPT_SSL_OPTIONS.3                         \
 -  CURLOPT_SSL_SESSIONID_CACHE.3                 \
 -  CURLOPT_SSL_VERIFYHOST.3                      \
 -  CURLOPT_SSL_VERIFYPEER.3                      \
 -  CURLOPT_SSL_VERIFYSTATUS.3                    \
 -  CURLOPT_STDERR.3                              \
 -  CURLOPT_STREAM_DEPENDS.3                      \
 -  CURLOPT_STREAM_DEPENDS_E.3                    \
 -  CURLOPT_STREAM_WEIGHT.3                       \
 -  CURLOPT_SUPPRESS_CONNECT_HEADERS.3            \
 -  CURLOPT_TCP_FASTOPEN.3                        \
 -  CURLOPT_TCP_KEEPALIVE.3                       \
 -  CURLOPT_TCP_KEEPIDLE.3                        \
 -  CURLOPT_TCP_KEEPINTVL.3                       \
 -  CURLOPT_TCP_NODELAY.3                         \
 -  CURLOPT_TELNETOPTIONS.3                       \
 -  CURLOPT_TFTP_BLKSIZE.3                        \
 -  CURLOPT_TFTP_NO_OPTIONS.3                     \
 -  CURLOPT_TIMECONDITION.3                       \
 -  CURLOPT_TIMEOUT.3                             \
 -  CURLOPT_TIMEOUT_MS.3                          \
 -  CURLOPT_TIMEVALUE.3                           \
 -  CURLOPT_TLSAUTH_PASSWORD.3                    \
 -  CURLOPT_TLSAUTH_TYPE.3                        \
 -  CURLOPT_TLSAUTH_USERNAME.3                    \
 -  CURLOPT_TRANSFERTEXT.3                        \
 -  CURLOPT_TRANSFER_ENCODING.3                   \
 -  CURLOPT_UNIX_SOCKET_PATH.3                    \
 -  CURLOPT_UNRESTRICTED_AUTH.3                   \
 -  CURLOPT_UPLOAD.3                              \
 -  CURLOPT_URL.3                                 \
 -  CURLOPT_USERAGENT.3                           \
 -  CURLOPT_USERNAME.3                            \
 -  CURLOPT_USERPWD.3                             \
 -  CURLOPT_USE_SSL.3                             \
 -  CURLOPT_VERBOSE.3                             \
 -  CURLOPT_WILDCARDMATCH.3                       \
 -  CURLOPT_WRITEDATA.3                           \
 -  CURLOPT_WRITEFUNCTION.3                       \
 -  CURLOPT_XFERINFODATA.3                        \
 -  CURLOPT_XFERINFOFUNCTION.3                    \
 -  CURLOPT_XOAUTH2_BEARER.3
 +  GNURLINFO_ACTIVESOCKET.3                       \
 +  GNURLINFO_APPCONNECT_TIME.3                    \
 +  GNURLINFO_CERTINFO.3                           \
 +  GNURLINFO_CONDITION_UNMET.3                    \
 +  GNURLINFO_CONNECT_TIME.3                       \
 +  GNURLINFO_CONTENT_LENGTH_DOWNLOAD.3            \
 +  GNURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3          \
 +  GNURLINFO_CONTENT_LENGTH_UPLOAD.3              \
 +  GNURLINFO_CONTENT_LENGTH_UPLOAD_T.3            \
 +  GNURLINFO_CONTENT_TYPE.3                       \
 +  GNURLINFO_COOKIELIST.3                         \
 +  GNURLINFO_EFFECTIVE_URL.3                      \
 +  GNURLINFO_FILETIME.3                           \
 +  GNURLINFO_FTP_ENTRY_PATH.3                     \
 +  GNURLINFO_HEADER_SIZE.3                        \
 +  GNURLINFO_HTTPAUTH_AVAIL.3                     \
 +  GNURLINFO_HTTP_CONNECTCODE.3                   \
 +  GNURLINFO_HTTP_VERSION.3                       \
 +  GNURLINFO_LASTSOCKET.3                         \
 +  GNURLINFO_LOCAL_IP.3                           \
 +  GNURLINFO_LOCAL_PORT.3                         \
 +  GNURLINFO_NAMELOOKUP_TIME.3                    \
 +  GNURLINFO_NUM_CONNECTS.3                       \
 +  GNURLINFO_OS_ERRNO.3                           \
 +  GNURLINFO_PRETRANSFER_TIME.3                   \
 +  GNURLINFO_PRIMARY_IP.3                         \
 +  GNURLINFO_PRIMARY_PORT.3                       \
 +  GNURLINFO_PRIVATE.3                            \
 +  GNURLINFO_PROTOCOL.3                           \
 +  GNURLINFO_PROXYAUTH_AVAIL.3                    \
 +  GNURLINFO_PROXY_SSL_VERIFYRESULT.3             \
 +  GNURLINFO_REDIRECT_COUNT.3                     \
 +  GNURLINFO_REDIRECT_TIME.3                      \
 +  GNURLINFO_REDIRECT_URL.3                       \
 +  GNURLINFO_REQUEST_SIZE.3                       \
 +  GNURLINFO_RESPONSE_CODE.3                      \
 +  GNURLINFO_RTSP_CLIENT_CSEQ.3                   \
 +  GNURLINFO_RTSP_CSEQ_RECV.3                     \
 +  GNURLINFO_RTSP_SERVER_CSEQ.3                   \
 +  GNURLINFO_RTSP_SESSION_ID.3                    \
 +  GNURLINFO_SCHEME.3                             \
 +  GNURLINFO_SIZE_DOWNLOAD.3                      \
 +  GNURLINFO_SIZE_DOWNLOAD_T.3                    \
 +  GNURLINFO_SIZE_UPLOAD.3                        \
 +  GNURLINFO_SIZE_UPLOAD_T.3                      \
 +  GNURLINFO_SPEED_DOWNLOAD.3                     \
 +  GNURLINFO_SPEED_DOWNLOAD_T.3                   \
 +  GNURLINFO_SPEED_UPLOAD.3                       \
 +  GNURLINFO_SPEED_UPLOAD_T.3                     \
 +  GNURLINFO_SSL_ENGINES.3                        \
 +  GNURLINFO_SSL_VERIFYRESULT.3                   \
 +  GNURLINFO_STARTTRANSFER_TIME.3                 \
 +  GNURLINFO_TLS_SESSION.3                        \
 +  GNURLINFO_TLS_SSL_PTR.3                        \
 +  GNURLINFO_TOTAL_TIME.3                         \
-   GNURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3          \
-   GNURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3        \
-   GNURLMOPT_MAXCONNECTS.3                        \
-   GNURLMOPT_MAX_HOST_CONNECTIONS.3               \
-   GNURLMOPT_MAX_PIPELINE_LENGTH.3                \
-   GNURLMOPT_MAX_TOTAL_CONNECTIONS.3              \
-   GNURLMOPT_PIPELINING.3                         \
-   GNURLMOPT_PIPELINING_SERVER_BL.3               \
-   GNURLMOPT_PIPELINING_SITE_BL.3                 \
-   GNURLMOPT_PUSHDATA.3                           \
-   GNURLMOPT_PUSHFUNCTION.3                       \
-   GNURLMOPT_SOCKETDATA.3                         \
-   GNURLMOPT_SOCKETFUNCTION.3                     \
-   GNURLMOPT_TIMERDATA.3                          \
-   GNURLMOPT_TIMERFUNCTION.3                      \
++  GNURLMOPTCHUNK_LENGTH_PENALTY_SIZE.3          \
++  GNURLMOPTCONTENT_LENGTH_PENALTY_SIZE.3        \
++  GNURLMOPTMAXCONNECTS.3                        \
++  GNURLMOPTMAX_HOST_CONNECTIONS.3               \
++  GNURLMOPTMAX_PIPELINE_LENGTH.3                \
++  GNURLMOPTMAX_TOTAL_CONNECTIONS.3              \
++  GNURLMOPTPIPELINING.3                         \
++  GNURLMOPTPIPELINING_SERVER_BL.3               \
++  GNURLMOPTPIPELINING_SITE_BL.3                 \
++  GNURLMOPTPUSHDATA.3                           \
++  GNURLMOPTPUSHFUNCTION.3                       \
++  GNURLMOPTSOCKETDATA.3                         \
++  GNURLMOPTSOCKETFUNCTION.3                     \
++  GNURLMOPTTIMERDATA.3                          \
++  GNURLMOPTTIMERFUNCTION.3                      \
 +  GNURLOPT_ABSTRACT_UNIX_SOCKET.3                \
 +  GNURLOPT_ACCEPTTIMEOUT_MS.3                    \
 +  GNURLOPT_ACCEPT_ENCODING.3                     \
 +  GNURLOPT_ADDRESS_SCOPE.3                       \
 +  GNURLOPT_APPEND.3                              \
 +  GNURLOPT_AUTOREFERER.3                         \
 +  GNURLOPT_BUFFERSIZE.3                          \
 +  GNURLOPT_CAINFO.3                              \
 +  GNURLOPT_CAPATH.3                              \
 +  GNURLOPT_CERTINFO.3                            \
 +  GNURLOPT_CHUNK_BGN_FUNCTION.3                  \
 +  GNURLOPT_CHUNK_DATA.3                          \
 +  GNURLOPT_CHUNK_END_FUNCTION.3                  \
 +  GNURLOPT_CLOSESOCKETDATA.3                     \
 +  GNURLOPT_CLOSESOCKETFUNCTION.3                 \
 +  GNURLOPT_CONNECTTIMEOUT.3                      \
 +  GNURLOPT_CONNECTTIMEOUT_MS.3                   \
 +  GNURLOPT_CONNECT_ONLY.3                        \
 +  GNURLOPT_CONNECT_TO.3                          \
 +  GNURLOPT_CONV_FROM_NETWORK_FUNCTION.3          \
 +  GNURLOPT_CONV_FROM_UTF8_FUNCTION.3             \
 +  GNURLOPT_CONV_TO_NETWORK_FUNCTION.3            \
 +  GNURLOPT_COOKIE.3                              \
 +  GNURLOPT_COOKIEFILE.3                          \
 +  GNURLOPT_COOKIEJAR.3                           \
 +  GNURLOPT_COOKIELIST.3                          \
 +  GNURLOPT_COOKIESESSION.3                       \
 +  GNURLOPT_COPYPOSTFIELDS.3                      \
 +  GNURLOPT_CRLF.3                                \
 +  GNURLOPT_CRLFILE.3                             \
 +  GNURLOPT_CUSTOMREQUEST.3                       \
 +  GNURLOPT_DEBUGDATA.3                           \
 +  GNURLOPT_DEBUGFUNCTION.3                       \
 +  GNURLOPT_DEFAULT_PROTOCOL.3                    \
 +  GNURLOPT_DIRLISTONLY.3                         \
 +  GNURLOPT_DNS_CACHE_TIMEOUT.3                   \
 +  GNURLOPT_DNS_INTERFACE.3                       \
 +  GNURLOPT_DNS_LOCAL_IP4.3                       \
 +  GNURLOPT_DNS_LOCAL_IP6.3                       \
 +  GNURLOPT_DNS_SERVERS.3                         \
 +  GNURLOPT_DNS_USE_GLOBAL_CACHE.3                \
 +  GNURLOPT_EGDSOCKET.3                           \
 +  GNURLOPT_ERRORBUFFER.3                         \
 +  GNURLOPT_EXPECT_100_TIMEOUT_MS.3               \
 +  GNURLOPT_FAILONERROR.3                         \
 +  GNURLOPT_FILETIME.3                            \
 +  GNURLOPT_FNMATCH_DATA.3                        \
 +  GNURLOPT_FNMATCH_FUNCTION.3                    \
 +  GNURLOPT_FOLLOWLOCATION.3                      \
 +  GNURLOPT_FORBID_REUSE.3                        \
 +  GNURLOPT_FRESH_CONNECT.3                       \
 +  GNURLOPT_FTPPORT.3                             \
 +  GNURLOPT_FTPSSLAUTH.3                          \
 +  GNURLOPT_FTP_ACCOUNT.3                         \
 +  GNURLOPT_FTP_ALTERNATIVE_TO_USER.3             \
 +  GNURLOPT_FTP_CREATE_MISSING_DIRS.3             \
 +  GNURLOPT_FTP_FILEMETHOD.3                      \
 +  GNURLOPT_FTP_RESPONSE_TIMEOUT.3                \
 +  GNURLOPT_FTP_SKIP_PASV_IP.3                    \
 +  GNURLOPT_FTP_SSL_CCC.3                         \
 +  GNURLOPT_FTP_USE_EPRT.3                        \
 +  GNURLOPT_FTP_USE_EPSV.3                        \
 +  GNURLOPT_FTP_USE_PRET.3                        \
 +  GNURLOPT_GSSAPI_DELEGATION.3                   \
 +  GNURLOPT_HEADER.3                              \
 +  GNURLOPT_HEADERDATA.3                          \
 +  GNURLOPT_HEADERFUNCTION.3                      \
 +  GNURLOPT_HEADEROPT.3                           \
 +  GNURLOPT_HTTP200ALIASES.3                      \
 +  GNURLOPT_HTTPAUTH.3                            \
 +  GNURLOPT_HTTPGET.3                             \
 +  GNURLOPT_HTTPHEADER.3                          \
 +  GNURLOPT_HTTPPOST.3                            \
 +  GNURLOPT_HTTPPROXYTUNNEL.3                     \
 +  GNURLOPT_HTTP_CONTENT_DECODING.3               \
 +  GNURLOPT_HTTP_TRANSFER_DECODING.3              \
 +  GNURLOPT_HTTP_VERSION.3                        \
 +  GNURLOPT_IGNORE_CONTENT_LENGTH.3               \
 +  GNURLOPT_INFILESIZE.3                          \
 +  GNURLOPT_INFILESIZE_LARGE.3                    \
 +  GNURLOPT_INTERFACE.3                           \
 +  GNURLOPT_INTERLEAVEDATA.3                      \
 +  GNURLOPT_INTERLEAVEFUNCTION.3                  \
 +  GNURLOPT_IOCTLDATA.3                           \
 +  GNURLOPT_IOCTLFUNCTION.3                       \
 +  GNURLOPT_IPRESOLVE.3                           \
 +  GNURLOPT_ISSUERCERT.3                          \
 +  GNURLOPT_KEEP_SENDING_ON_ERROR.3               \
 +  GNURLOPT_KEYPASSWD.3                           \
 +  GNURLOPT_KRBLEVEL.3                            \
 +  GNURLOPT_LOCALPORT.3                           \
 +  GNURLOPT_LOCALPORTRANGE.3                      \
 +  GNURLOPT_LOGIN_OPTIONS.3                       \
 +  GNURLOPT_LOW_SPEED_LIMIT.3                     \
 +  GNURLOPT_LOW_SPEED_TIME.3                      \
 +  GNURLOPT_MAIL_AUTH.3                           \
 +  GNURLOPT_MAIL_FROM.3                           \
 +  GNURLOPT_MAIL_RCPT.3                           \
 +  GNURLOPT_MAXCONNECTS.3                         \
 +  GNURLOPT_MAXFILESIZE.3                         \
 +  GNURLOPT_MAXFILESIZE_LARGE.3                   \
 +  GNURLOPT_MAXREDIRS.3                           \
 +  GNURLOPT_MAX_RECV_SPEED_LARGE.3                \
 +  GNURLOPT_MAX_SEND_SPEED_LARGE.3                \
++  GNURLOPT_MIMEPOST.3                            \
 +  GNURLOPT_NETRC.3                               \
 +  GNURLOPT_NETRC_FILE.3                          \
 +  GNURLOPT_NEW_DIRECTORY_PERMS.3                 \
 +  GNURLOPT_NEW_FILE_PERMS.3                      \
 +  GNURLOPT_NOBODY.3                              \
 +  GNURLOPT_NOPROGRESS.3                          \
 +  GNURLOPT_NOPROXY.3                             \
 +  GNURLOPT_NOSIGNAL.3                            \
 +  GNURLOPT_OPENSOCKETDATA.3                      \
 +  GNURLOPT_OPENSOCKETFUNCTION.3                  \
 +  GNURLOPT_PASSWORD.3                            \
 +  GNURLOPT_PATH_AS_IS.3                          \
 +  GNURLOPT_PINNEDPUBLICKEY.3                     \
 +  GNURLOPT_PIPEWAIT.3                            \
 +  GNURLOPT_PORT.3                                \
 +  GNURLOPT_POST.3                                \
 +  GNURLOPT_POSTFIELDS.3                          \
 +  GNURLOPT_POSTFIELDSIZE.3                       \
 +  GNURLOPT_POSTFIELDSIZE_LARGE.3                 \
 +  GNURLOPT_POSTQUOTE.3                           \
 +  GNURLOPT_POSTREDIR.3                           \
 +  GNURLOPT_PREQUOTE.3                            \
 +  GNURLOPT_PRE_PROXY.3                           \
 +  GNURLOPT_PRIVATE.3                             \
 +  GNURLOPT_PROGRESSDATA.3                        \
 +  GNURLOPT_PROGRESSFUNCTION.3                    \
 +  GNURLOPT_PROTOCOLS.3                           \
 +  GNURLOPT_PROXY.3                               \
 +  GNURLOPT_PROXYAUTH.3                           \
 +  GNURLOPT_PROXYHEADER.3                         \
 +  GNURLOPT_PROXYPASSWORD.3                       \
 +  GNURLOPT_PROXYPORT.3                           \
 +  GNURLOPT_PROXYTYPE.3                           \
 +  GNURLOPT_PROXYUSERNAME.3                       \
 +  GNURLOPT_PROXYUSERPWD.3                        \
 +  GNURLOPT_PROXY_CAINFO.3                        \
 +  GNURLOPT_PROXY_CAPATH.3                        \
 +  GNURLOPT_PROXY_CRLFILE.3                       \
 +  GNURLOPT_PROXY_KEYPASSWD.3                     \
 +  GNURLOPT_PROXY_PINNEDPUBLICKEY.3               \
 +  GNURLOPT_PROXY_SERVICE_NAME.3                  \
 +  GNURLOPT_PROXY_SSLCERT.3                       \
 +  GNURLOPT_PROXY_SSLCERTTYPE.3                   \
 +  GNURLOPT_PROXY_SSLKEY.3                        \
 +  GNURLOPT_PROXY_SSLKEYTYPE.3                    \
 +  GNURLOPT_PROXY_SSLVERSION.3                    \
 +  GNURLOPT_PROXY_SSL_CIPHER_LIST.3               \
 +  GNURLOPT_PROXY_SSL_OPTIONS.3                   \
 +  GNURLOPT_PROXY_SSL_VERIFYHOST.3                \
 +  GNURLOPT_PROXY_SSL_VERIFYPEER.3                \
 +  GNURLOPT_PROXY_TLSAUTH_PASSWORD.3              \
 +  GNURLOPT_PROXY_TLSAUTH_TYPE.3                  \
 +  GNURLOPT_PROXY_TLSAUTH_USERNAME.3              \
 +  GNURLOPT_PROXY_TRANSFER_MODE.3                 \
 +  GNURLOPT_PUT.3                                 \
 +  GNURLOPT_QUOTE.3                               \
 +  GNURLOPT_RANDOM_FILE.3                         \
 +  GNURLOPT_RANGE.3                               \
 +  GNURLOPT_READDATA.3                            \
 +  GNURLOPT_READFUNCTION.3                        \
 +  GNURLOPT_REDIR_PROTOCOLS.3                     \
 +  GNURLOPT_REFERER.3                             \
 +  GNURLOPT_REQUEST_TARGET.3                      \
 +  GNURLOPT_RESOLVE.3                             \
 +  GNURLOPT_RESUME_FROM.3                         \
 +  GNURLOPT_RESUME_FROM_LARGE.3                   \
 +  GNURLOPT_RTSP_CLIENT_CSEQ.3                    \
 +  GNURLOPT_RTSP_REQUEST.3                        \
 +  GNURLOPT_RTSP_SERVER_CSEQ.3                    \
 +  GNURLOPT_RTSP_SESSION_ID.3                     \
 +  GNURLOPT_RTSP_STREAM_URI.3                     \
 +  GNURLOPT_RTSP_TRANSPORT.3                      \
 +  GNURLOPT_SASL_IR.3                             \
 +  GNURLOPT_SEEKDATA.3                            \
 +  GNURLOPT_SEEKFUNCTION.3                        \
 +  GNURLOPT_SERVICE_NAME.3                        \
 +  GNURLOPT_SHARE.3                               \
 +  GNURLOPT_SOCKOPTDATA.3                         \
 +  GNURLOPT_SOCKOPTFUNCTION.3                     \
 +  GNURLOPT_SOCKS5_AUTH.3                         \
 +  GNURLOPT_SOCKS5_GSSAPI_NEC.3                   \
 +  GNURLOPT_SOCKS5_GSSAPI_SERVICE.3               \
 +  GNURLOPT_SSH_AUTH_TYPES.3                      \
++  GNURLOPT_SSH_COMPRESSION.3                     \
 +  GNURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3             \
 +  GNURLOPT_SSH_KEYDATA.3                         \
 +  GNURLOPT_SSH_KEYFUNCTION.3                     \
 +  GNURLOPT_SSH_KNOWNHOSTS.3                      \
 +  GNURLOPT_SSH_PRIVATE_KEYFILE.3                 \
 +  GNURLOPT_SSH_PUBLIC_KEYFILE.3                  \
 +  GNURLOPT_SSLCERT.3                             \
 +  GNURLOPT_SSLCERTTYPE.3                         \
 +  GNURLOPT_SSLENGINE.3                           \
 +  GNURLOPT_SSLENGINE_DEFAULT.3                   \
 +  GNURLOPT_SSLKEY.3                              \
 +  GNURLOPT_SSLKEYTYPE.3                          \
 +  GNURLOPT_SSLVERSION.3                          \
 +  GNURLOPT_SSL_CIPHER_LIST.3                     \
 +  GNURLOPT_SSL_CTX_DATA.3                        \
 +  GNURLOPT_SSL_CTX_FUNCTION.3                    \
 +  GNURLOPT_SSL_ENABLE_ALPN.3                     \
 +  GNURLOPT_SSL_ENABLE_NPN.3                      \
 +  GNURLOPT_SSL_FALSESTART.3                      \
 +  GNURLOPT_SSL_OPTIONS.3                         \
 +  GNURLOPT_SSL_SESSIONID_CACHE.3                 \
 +  GNURLOPT_SSL_VERIFYHOST.3                      \
 +  GNURLOPT_SSL_VERIFYPEER.3                      \
 +  GNURLOPT_SSL_VERIFYSTATUS.3                    \
 +  GNURLOPT_STDERR.3                              \
 +  GNURLOPT_STREAM_DEPENDS.3                      \
 +  GNURLOPT_STREAM_DEPENDS_E.3                    \
 +  GNURLOPT_STREAM_WEIGHT.3                       \
 +  GNURLOPT_SUPPRESS_CONNECT_HEADERS.3            \
 +  GNURLOPT_TCP_FASTOPEN.3                        \
 +  GNURLOPT_TCP_KEEPALIVE.3                       \
 +  GNURLOPT_TCP_KEEPIDLE.3                        \
 +  GNURLOPT_TCP_KEEPINTVL.3                       \
 +  GNURLOPT_TCP_NODELAY.3                         \
 +  GNURLOPT_TELNETOPTIONS.3                       \
 +  GNURLOPT_TFTP_BLKSIZE.3                        \
 +  GNURLOPT_TFTP_NO_OPTIONS.3                     \
 +  GNURLOPT_TIMECONDITION.3                       \
 +  GNURLOPT_TIMEOUT.3                             \
 +  GNURLOPT_TIMEOUT_MS.3                          \
 +  GNURLOPT_TIMEVALUE.3                           \
 +  GNURLOPT_TLSAUTH_PASSWORD.3                    \
 +  GNURLOPT_TLSAUTH_TYPE.3                        \
 +  GNURLOPT_TLSAUTH_USERNAME.3                    \
 +  GNURLOPT_TRANSFERTEXT.3                        \
 +  GNURLOPT_TRANSFER_ENCODING.3                   \
 +  GNURLOPT_UNIX_SOCKET_PATH.3                    \
 +  GNURLOPT_UNRESTRICTED_AUTH.3                   \
 +  GNURLOPT_UPLOAD.3                              \
 +  GNURLOPT_URL.3                                 \
 +  GNURLOPT_USERAGENT.3                           \
 +  GNURLOPT_USERNAME.3                            \
 +  GNURLOPT_USERPWD.3                             \
 +  GNURLOPT_USE_SSL.3                             \
 +  GNURLOPT_VERBOSE.3                             \
 +  GNURLOPT_WILDCARDMATCH.3                       \
 +  GNURLOPT_WRITEDATA.3                           \
 +  GNURLOPT_WRITEFUNCTION.3                       \
 +  GNURLOPT_XFERINFODATA.3                        \
 +  GNURLOPT_XFERINFOFUNCTION.3                    \
 +  GNURLOPT_XOAUTH2_BEARER.3
diff --cc include/gnurl/multi.h
index 46d979853,000000000..55efae0be
mode 100644,000000..100644
--- a/include/gnurl/multi.h
+++ b/include/gnurl/multi.h
@@@ -1,439 -1,0 +1,439 @@@
 +#ifndef __CURL_MULTI_H
 +#define __CURL_MULTI_H
 +/***************************************************************************
 + *                                  _   _ ____  _
 + *  Project                     ___| | | |  _ \| |
 + *                             / __| | | | |_) | |
 + *                            | (__| |_| |  _ <| |___
 + *                             \___|\___/|_| \_\_____|
 + *
-  * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
++ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
 + *
 + * This software is licensed as described in the file COPYING, which
 + * you should have received as part of this distribution. The terms
 + * are also available at https://curl.haxx.se/docs/copyright.html.
 + *
 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 + * copies of the Software, and permit persons to whom the Software is
 + * furnished to do so, under the terms of the COPYING file.
 + *
 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 + * KIND, either express or implied.
 + *
 + ***************************************************************************/
 +/*
 +  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_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_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 invidual 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),
 +
 +  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);
 +
 +#ifdef __cplusplus
 +} /* end of extern "C" */
 +#endif
 +
 +#endif
diff --cc lib/Makefile.am
index 2aa1bb030,151c2615e..d99e49cf9
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@@ -98,16 -84,16 +84,20 @@@ AM_CPPFLAGS += -DBUILDING_LIBCUR
  AM_LDFLAGS =
  AM_CFLAGS =
  
 -libcurl_la_CPPFLAGS_EXTRA =
 -libcurl_la_LDFLAGS_EXTRA =
 -libcurl_la_CFLAGS_EXTRA =
 +libgnurl_la_CPPFLAGS_EXTRA =
 +libgnurl_la_LDFLAGS_EXTRA =
 +libgnurl_la_CFLAGS_EXTRA =
 +
 address@hidden@
 +libgnurl_la_LDFLAGS_EXTRA += $(CODE_COVERAGE_LDFLAGS)
 +libgnurl_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS)
  
+ @CODE_COVERAGE_RULES@
+ libcurl_la_LDFLAGS_EXTRA += $(CODE_COVERAGE_LDFLAGS)
+ libcurl_la_CFLAGS_EXTRA += $(CODE_COVERAGE_CFLAGS)
+ 
  if CURL_LT_SHLIB_USE_VERSION_INFO
 -libcurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
 +libgnurl_la_LDFLAGS_EXTRA += $(VERSIONINFO)
  endif
  
  if CURL_LT_SHLIB_USE_NO_UNDEFINED
diff --cc lib/curl_setup.h
index 519d8e5c4,402ebc03d..1034b5a78
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@@ -139,16 -139,9 +139,9 @@@
  /*  please, do it beyond the point further indicated in this file.  */
  /* ================================================================ */
  
 -#include <curl/curl.h>
 +#include <gnurl/curl.h>
  
- /*
-  * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
-  */
- 
- #ifdef SIZEOF_CURL_OFF_T
- #  error "SIZEOF_CURL_OFF_T shall not be defined!"
-    Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
- #endif
+ #define CURL_SIZEOF_CURL_OFF_T SIZEOF_CURL_OFF_T
  
  /*
   * Disable other protocols when http is the only one desired.
diff --cc lib/formdata.c
index 2d7b6b627,3568ac579..1037d0ec8
--- a/lib/formdata.c
+++ b/lib/formdata.c
@@@ -42,14 -44,7 +44,6 @@@
  #include "curl_memory.h"
  #include "memdebug.h"
  
- #ifndef HAVE_BASENAME
- static char *Curl_basename(char *path);
- #define basename(x)  Curl_basename((x))
- #endif
- 
- static size_t readfromfile(struct Form *form, char *buffer, size_t size);
- static CURLcode formboundary(struct Curl_easy *data, char *buffer, size_t 
len);
--
  /* What kind of Content-Type to use on un-specified files with unrecognized
     extensions. */
  #define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream"
diff --cc lib/getinfo.c
index 99ba587af,862ced019..b235f54ca
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@@ -269,16 -270,16 +270,49 @@@ static CURLcode getinfo_offt(struct Cur
        data->progress.size_dl:-1;
      break;
    case CURLINFO_CONTENT_LENGTH_UPLOAD_T:
 +    *param_offt = (data->progress.flags & PGRS_UL_SIZE_KNOWN)?
 +      data->progress.size_ul:-1;
 +    break;
 +  default:
 +    return CURLE_UNKNOWN_OPTION;
 +  }
 +
 +  return CURLE_OK;
 +}
 +
++#define DOUBLE_SECS(x) (double)(x)/1000000
++
++static CURLcode getinfo_offt(struct Curl_easy *data, CURLINFO info,
++                             curl_off_t *param_offt)
++{
++  switch(info) {
++  case CURLINFO_SIZE_UPLOAD_T:
++    *param_offt = data->progress.uploaded;
++    break;
++  case CURLINFO_SIZE_DOWNLOAD_T:
++    *param_offt = data->progress.downloaded;
++    break;
++  case CURLINFO_SPEED_DOWNLOAD_T:
++    *param_offt =  data->progress.dlspeed;
++    break;
++  case CURLINFO_SPEED_UPLOAD_T:
++    *param_offt = data->progress.ulspeed;
++    break;
++  case CURLINFO_CONTENT_LENGTH_DOWNLOAD_T:
++    *param_offt = (data->progress.flags & PGRS_DL_SIZE_KNOWN)?
++      data->progress.size_dl:-1;
++    break;
++  case CURLINFO_CONTENT_LENGTH_UPLOAD_T:
+     *param_offt = (data->progress.flags & PGRS_UL_SIZE_KNOWN)?
+       data->progress.size_ul:-1;
+     break;
+   default:
+     return CURLE_UNKNOWN_OPTION;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
  static CURLcode getinfo_double(struct Curl_easy *data, CURLINFO info,
                                 double *param_doublep)
  {
diff --cc lib/http.c
index 741098e84,38227eb6c..b5164f758
--- a/lib/http.c
+++ b/lib/http.c
@@@ -1645,12 -1631,12 +1631,16 @@@ CURLcode Curl_add_custom_headers(struc
            else if(conn->allocptr.te &&
                    /* when asking for Transfer-Encoding, don't pass on a custom
                       Connection: */
-                   checkprefix("Connection", headers->data))
+                   checkprefix("Connection:", headers->data))
+             ;
+           else if((conn->httpversion == 20) &&
+                   checkprefix("Transfer-Encoding:", headers->data))
+             /* HTTP/2 doesn't support chunked requests */
              ;
 +          else if((conn->httpversion == 20) &&
 +                  checkprefix("Transfer-Encoding:", headers->data))
 +            /* HTTP/2 doesn't support chunked requests */
 +            ;
            else {
              CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n",
                                                 headers->data);
diff --cc lib/mime.c
index 000000000,496f5e6fb..0aa12d1eb
mode 000000,100644..100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@@ -1,0 -1,1860 +1,1860 @@@
+ /***************************************************************************
+  *                                  _   _ ____  _
+  *  Project                     ___| | | |  _ \| |
+  *                             / __| | | | |_) | |
+  *                            | (__| |_| |  _ <| |___
+  *                             \___|\___/|_| \_\_____|
+  *
+  * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+  * are also available at https://curl.haxx.se/docs/copyright.html.
+  *
+  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+  * copies of the Software, and permit persons to whom the Software is
+  * furnished to do so, under the terms of the COPYING file.
+  *
+  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+  * KIND, either express or implied.
+  *
+  ***************************************************************************/
+ 
+ #include "curl_setup.h"
+ 
 -#include <curl/curl.h>
++#include <gnurl/curl.h>
+ 
+ #include "mime.h"
+ #include "non-ascii.h"
+ 
+ #if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \
+     !defined(CURL_DISABLE_IMAP)
+ 
+ #if defined(HAVE_LIBGEN_H) && defined(HAVE_BASENAME)
+ #include <libgen.h>
+ #endif
+ 
+ #include "rand.h"
+ #include "slist.h"
+ #include "strcase.h"
+ /* The last 3 #include files should be in this order */
+ #include "curl_printf.h"
+ #include "curl_memory.h"
+ #include "memdebug.h"
+ 
+ #ifdef WIN32
+ # ifndef R_OK
+ #  define R_OK 4
+ # endif
+ #endif
+ 
+ 
+ #define FILE_CONTENTTYPE_DEFAULT        "application/octet-stream"
+ #define MULTIPART_CONTENTTYPE_DEFAULT   "multipart/mixed"
+ #define DISPOSITION_DEFAULT             "attachment"
+ 
+ #define READ_ERROR                      ((size_t) -1)
+ 
+ /* Encoders. */
+ static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
+                                 curl_mimepart *part);
+ static curl_off_t encoder_nop_size(curl_mimepart *part);
+ static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
+                                 curl_mimepart *part);
+ static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
+                                 curl_mimepart *part);
+ static curl_off_t encoder_base64_size(curl_mimepart *part);
+ static size_t encoder_qp_read(char *buffer, size_t size, bool ateof,
+                               curl_mimepart *part);
+ static curl_off_t encoder_qp_size(curl_mimepart *part);
+ 
+ static const mime_encoder encoders[] = {
+   {"binary", encoder_nop_read, encoder_nop_size},
+   {"8bit", encoder_nop_read, encoder_nop_size},
+   {"7bit", encoder_7bit_read, encoder_nop_size},
+   {"base64", encoder_base64_read, encoder_base64_size},
+   {"quoted-printable", encoder_qp_read, encoder_qp_size},
+   {ZERO_NULL, ZERO_NULL, ZERO_NULL}
+ };
+ 
+ /* Base64 encoding table */
+ static const char base64[] =
+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ 
+ /* Quoted-printable character class table.
+  *
+  * We cannot rely on ctype functions since quoted-printable input data
+  * is assumed to be ascii-compatible, even on non-ascii platforms. */
+ #define QP_OK           1       /* Can be represented by itself. */
+ #define QP_SP           2       /* Space or tab. */
+ #define QP_CR           3       /* Carriage return. */
+ #define QP_LF           4       /* Line-feed. */
+ static const unsigned char qp_class[] = {
+  0,     0,     0,     0,     0,     0,     0,     0,            /* 00 - 07 */
+  0,     QP_SP, QP_LF, 0,     0,     QP_CR, 0,     0,            /* 08 - 0F */
+  0,     0,     0,     0,     0,     0,     0,     0,            /* 10 - 17 */
+  0,     0,     0,     0,     0,     0,     0,     0,            /* 18 - 1F */
+  QP_SP, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 20 - 27 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 28 - 2F */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 30 - 37 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0    , QP_OK, QP_OK,        /* 38 - 3F */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 40 - 47 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 48 - 4F */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 50 - 57 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 58 - 5F */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 60 - 67 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 68 - 6F */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK,        /* 70 - 77 */
+  QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, QP_OK, 0,            /* 78 - 7F */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* 80 - 8F */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* 90 - 9F */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* A0 - AF */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* B0 - BF */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* C0 - CF */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* D0 - DF */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                /* E0 - EF */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0                 /* F0 - FF */
+ };
+ 
+ 
+ /* Binary --> hexadecimal ASCII table. */
+ static const char aschex[] =
+   "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x41\x42\x43\x44\x45\x46";
+ 
+ 
+ 
+ #ifndef __VMS
+ #define filesize(name, stat_data) (stat_data.st_size)
+ #define fopen_read fopen
+ 
+ #else
+ 
+ #include <fabdef.h>
+ /*
+  * get_vms_file_size does what it takes to get the real size of the file
+  *
+  * For fixed files, find out the size of the EOF block and adjust.
+  *
+  * For all others, have to read the entire file in, discarding the contents.
+  * Most posted text files will be small, and binary files like zlib archives
+  * and CD/DVD images should be either a STREAM_LF format or a fixed format.
+  *
+  */
+ curl_off_t VmsRealFileSize(const char *name,
+                            const struct_stat *stat_buf)
+ {
+   char buffer[8192];
+   curl_off_t count;
+   int ret_stat;
+   FILE * file;
+ 
+   file = fopen(name, FOPEN_READTEXT); /* VMS */
+   if(file == NULL)
+     return 0;
+ 
+   count = 0;
+   ret_stat = 1;
+   while(ret_stat > 0) {
+     ret_stat = fread(buffer, 1, sizeof(buffer), file);
+     if(ret_stat != 0)
+       count += ret_stat;
+   }
+   fclose(file);
+ 
+   return count;
+ }
+ 
+ /*
+  *
+  *  VmsSpecialSize checks to see if the stat st_size can be trusted and
+  *  if not to call a routine to get the correct size.
+  *
+  */
+ static curl_off_t VmsSpecialSize(const char *name,
+                                  const struct_stat *stat_buf)
+ {
+   switch(stat_buf->st_fab_rfm) {
+   case FAB$C_VAR:
+   case FAB$C_VFC:
+     return VmsRealFileSize(name, stat_buf);
+     break;
+   default:
+     return stat_buf->st_size;
+   }
+ }
+ 
+ #define filesize(name, stat_data) VmsSpecialSize(name, &stat_data)
+ 
+ /*
+  * vmsfopenread
+  *
+  * For upload to work as expected on VMS, different optional
+  * parameters must be added to the fopen command based on
+  * record format of the file.
+  *
+  */
+ static FILE * vmsfopenread(const char *file, const char *mode)
+ {
+   struct_stat statbuf;
+   int result;
+ 
+   result = stat(file, &statbuf);
+ 
+   switch(statbuf.st_fab_rfm) {
+   case FAB$C_VAR:
+   case FAB$C_VFC:
+   case FAB$C_STMCR:
+     return fopen(file, FOPEN_READTEXT); /* VMS */
+     break;
+   default:
+     return fopen(file, FOPEN_READTEXT, "rfm=stmlf", "ctx=stm");
+   }
+ }
+ 
+ #define fopen_read vmsfopenread
+ #endif
+ 
+ 
+ #ifndef HAVE_BASENAME
+ /*
+   (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004
+   Edition)
+ 
+   The basename() function shall take the pathname pointed to by path and
+   return a pointer to the final component of the pathname, deleting any
+   trailing '/' characters.
+ 
+   If the string pointed to by path consists entirely of the '/' character,
+   basename() shall return a pointer to the string "/". If the string pointed
+   to by path is exactly "//", it is implementation-defined whether '/' or "//"
+   is returned.
+ 
+   If path is a null pointer or points to an empty string, basename() shall
+   return a pointer to the string ".".
+ 
+   The basename() function may modify the string pointed to by path, and may
+   return a pointer to static storage that may then be overwritten by a
+   subsequent call to basename().
+ 
+   The basename() function need not be reentrant. A function that is not
+   required to be reentrant is not required to be thread-safe.
+ 
+ */
+ static char *Curl_basename(char *path)
+ {
+   /* Ignore all the details above for now and make a quick and simple
+      implementaion here */
+   char *s1;
+   char *s2;
+ 
+   s1 = strrchr(path, '/');
+   s2 = strrchr(path, '\\');
+ 
+   if(s1 && s2) {
+     path = (s1 > s2? s1 : s2) + 1;
+   }
+   else if(s1)
+     path = s1 + 1;
+   else if(s2)
+     path = s2 + 1;
+ 
+   return path;
+ }
+ 
+ #define basename(x)  Curl_basename((x))
+ #endif
+ 
+ 
+ /* Set readback state. */
+ static void mimesetstate(mime_state *state, enum mimestate tok, void *ptr)
+ {
+   state->state = tok;
+   state->ptr = ptr;
+   state->offset = 0;
+ }
+ 
+ 
+ /* Escape header string into allocated memory. */
+ static char *escape_string(const char *src)
+ {
+   size_t bytecount = 0;
+   size_t i;
+   char *dst;
+ 
+   for(i = 0; src[i]; i++)
+     if(src[i] == '"' || src[i] == '\\')
+       bytecount++;
+ 
+   bytecount += i;
+   dst = malloc(bytecount + 1);
+   if(!dst)
+     return NULL;
+ 
+   for(i = 0; *src; src++) {
+     if(*src == '"' || *src == '\\')
+       dst[i++] = '\\';
+     dst[i++] = *src;
+   }
+ 
+   dst[i] = '\0';
+   return dst;
+ }
+ 
+ /* Check if header matches. */
+ static char *match_header(struct curl_slist *hdr, const char *lbl, size_t len)
+ {
+   char *value = NULL;
+ 
+   if(strncasecompare(hdr->data, lbl, len) && hdr->data[len] == ':')
+     for(value = hdr->data + len + 1; *value == ' '; value++)
+       ;
+   return value;
+ }
+ 
+ /* Get a header from an slist. */
+ static char *search_header(struct curl_slist *hdrlist, const char *hdr)
+ {
+   size_t len = strlen(hdr);
+   char *value = NULL;
+ 
+   for(; !value && hdrlist; hdrlist = hdrlist->next)
+     value = match_header(hdrlist, hdr, len);
+ 
+   return value;
+ }
+ 
+ static char *strippath(const char *fullfile)
+ {
+   char *filename;
+   char *base;
+   filename = strdup(fullfile); /* duplicate since basename() may ruin the
+                                   buffer it works on */
+   if(!filename)
+     return NULL;
+   base = strdup(basename(filename));
+ 
+   free(filename); /* free temporary buffer */
+ 
+   return base; /* returns an allocated string or NULL ! */
+ }
+ 
+ /* Initialize data encoder state. */
+ static void cleanup_encoder_state(mime_encoder_state *p)
+ {
+   p->pos = 0;
+   p->bufbeg = 0;
+   p->bufend = 0;
+ }
+ 
+ 
+ /* Dummy encoder. This is used for 8bit and binary content encodings. */
+ static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
+                                curl_mimepart *part)
+ {
+   mime_encoder_state *st = &part->encstate;
+   size_t insize = st->bufend - st->bufbeg;
+ 
+   (void) ateof;
+ 
+   if(size > insize)
+     size = insize;
+   if(size)
+     memcpy(buffer, st->buf, size);
+   st->bufbeg += size;
+   return size;
+ }
+ 
+ static curl_off_t encoder_nop_size(curl_mimepart *part)
+ {
+   return part->datasize;
+ }
+ 
+ 
+ /* 7bit encoder: the encoder is just a data validity check. */
+ static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
+                                 curl_mimepart *part)
+ {
+   mime_encoder_state *st = &part->encstate;
+   size_t cursize = st->bufend - st->bufbeg;
+ 
+   (void) ateof;
+ 
+   if(size > cursize)
+     size = cursize;
+ 
+   for(cursize = 0; cursize < size; cursize++) {
+     *buffer = st->buf[st->bufbeg];
+     if(*buffer++ & 0x80)
+       return cursize? cursize: READ_ERROR;
+     st->bufbeg++;
+   }
+ 
+   return cursize;
+ }
+ 
+ 
+ /* Base64 content encoder. */
+ static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
+                                 curl_mimepart *part)
+ {
+   mime_encoder_state *st = &part->encstate;
+   size_t cursize = 0;
+   int i;
+   char *ptr = buffer;
+ 
+   while(st->bufbeg < st->bufend) {
+     /* Line full ? */
+     if(st->pos >= MAX_ENCODED_LINE_LENGTH - 4) {
+       /* Yes, we need 2 characters for CRLF. */
+       if(size < 2)
+         break;
+       *ptr++ = '\r';
+       *ptr++ = '\n';
+       st->pos = 0;
+       cursize += 2;
+       size -= 2;
+     }
+ 
+     /* Be sure there is enough space and input data for a base64 group. */
+     if(size < 4 || st->bufend - st->bufbeg < 3)
+       break;
+ 
+     /* Encode three bytes a four characters. */
+     i = st->buf[st->bufbeg++] & 0xFF;
+     i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
+     i = (i << 8) | (st->buf[st->bufbeg++] & 0xFF);
+     *ptr++ = base64[(i >> 18) & 0x3F];
+     *ptr++ = base64[(i >> 12) & 0x3F];
+     *ptr++ = base64[(i >> 6) & 0x3F];
+     *ptr++ = base64[i & 0x3F];
+     cursize += 4;
+     st->pos += 4;
+     size -= 4;
+   }
+ 
+   /* If at eof, we have to flush the buffered data. */
+   if(ateof && size >= 4) {
+     /* Buffered data size can only be 0, 1 or 2. */
+     ptr[2] = ptr[3] = '=';
+     i = 0;
+     switch(st->bufend - st->bufbeg) {
+     case 2:
+       i = (st->buf[st->bufbeg + 1] & 0xFF) << 8;
+       /* FALLTHROUGH */
+     case 1:
+       i |= (st->buf[st->bufbeg] & 0xFF) << 16;
+       ptr[0] = base64[(i >> 18) & 0x3F];
+       ptr[1] = base64[(i >> 12) & 0x3F];
+       if(++st->bufbeg != st->bufend) {
+         ptr[2] = base64[(i >> 6) & 0x3F];
+         st->bufbeg++;
+       }
+       cursize += 4;
+       st->pos += 4;
+       break;
+     }
+   }
+ 
+ #ifdef CURL_DOES_CONVERSIONS
+   /* This is now textual data, Convert character codes. */
+   if(part->easy && cursize) {
+     CURLcode result = Curl_convert_to_network(part->easy, buffer, cursize);
+     if(result)
+       return READ_ERROR;
+   }
+ #endif
+ 
+   return cursize;
+ }
+ 
+ static curl_off_t encoder_base64_size(curl_mimepart *part)
+ {
+   curl_off_t size = part->datasize;
+ 
+   if(size <= 0)
+     return size;    /* Unknown size or no data. */
+ 
+   /* Compute base64 character count. */
+   size = 4 * (1 + (size - 1) / 3);
+ 
+   /* Effective character count must include CRLFs. */
+   return size + 2 * ((size - 1) / MAX_ENCODED_LINE_LENGTH);
+ }
+ 
+ 
+ /* Quoted-printable lookahead.
+  *
+  * Check if a CRLF or end of data is in input buffer at current position + n.
+  * Return -1 if more data needed, 1 if CRLF or end of data, else 0.
+  */
+ static int qp_lookahead_eol(mime_encoder_state *st, int ateof, size_t n)
+ {
+   n += st->bufbeg;
+   if(n >= st->bufend && ateof)
+     return 1;
+   if(n + 2 > st->bufend)
+     return ateof? 0: -1;
+   if(qp_class[st->buf[n] & 0xFF] == QP_CR &&
+      qp_class[st->buf[n + 1] & 0xFF] == QP_LF)
+     return 1;
+   return 0;
+ }
+ 
+ /* Quoted-printable encoder. */
+ static size_t encoder_qp_read(char *buffer, size_t size, bool ateof,
+                               curl_mimepart *part)
+ {
+   mime_encoder_state *st = &part->encstate;
+   char *ptr = buffer;
+   size_t cursize = 0;
+   int i;
+   size_t len;
+   size_t consumed;
+   int softlinebreak;
+   char buf[4];
+ 
+   /* On all platforms, input is supposed to be ASCII compatible: for this
+      reason, we use hexadecimal ASCII codes in this function rather than
+      character constants that can be interpreted as non-ascii on some
+      platforms. Preserve ASCII encoding on output too. */
+   while(st->bufbeg < st->bufend) {
+     len = 1;
+     consumed = 1;
+     i = st->buf[st->bufbeg];
+     buf[0] = (char) i;
+     buf[1] = aschex[(i >> 4) & 0xF];
+     buf[2] = aschex[i & 0xF];
+ 
+     switch(qp_class[st->buf[st->bufbeg] & 0xFF]) {
+     case QP_OK:          /* Not a special character. */
+       break;
+     case QP_SP:          /* Space or tab. */
+       /* Spacing must be escaped if followed by CRLF. */
+       switch(qp_lookahead_eol(st, ateof, 1)) {
+       case -1:          /* More input data needed. */
+         return cursize;
+       case 0:           /* No encoding needed. */
+         break;
+       default:          /* CRLF after space or tab. */
+         buf[0] = '\x3D';    /* '=' */
+         len = 3;
+         break;
+       }
+       break;
+     case QP_CR:         /* Carriage return. */
+       /* If followed by a line-feed, output the CRLF pair.
+          Else escape it. */
+       switch(qp_lookahead_eol(st, ateof, 0)) {
+       case -1:          /* Need more data. */
+         return cursize;
+       case 1:           /* CRLF found. */
+         buf[len++] = '\x0A';    /* Append '\n'. */
+         consumed = 2;
+         break;
+       default:          /* Not followed by LF: escape. */
+         buf[0] = '\x3D';    /* '=' */
+         len = 3;
+         break;
+       }
+       break;
+     default:            /* Character must be escaped. */
+       buf[0] = '\x3D';    /* '=' */
+       len = 3;
+       break;
+     }
+ 
+     /* Be sure the encoded character fits within maximum line length. */
+     if(buf[len - 1] != '\x0A') {    /* '\n' */
+       softlinebreak = st->pos + len > MAX_ENCODED_LINE_LENGTH;
+       if(!softlinebreak && st->pos + len == MAX_ENCODED_LINE_LENGTH) {
+         /* We may use the current line only if end of data or followed by
+            a CRLF. */
+         switch(qp_lookahead_eol(st, ateof, consumed)) {
+         case -1:        /* Need more data. */
+           return cursize;
+           break;
+         case 0:         /* Not followed by a CRLF. */
+           softlinebreak = 1;
+           break;
+         }
+       }
+       if(softlinebreak) {
+         strcpy(buf, "\x3D\x0D\x0A");    /* "=\r\n" */
+         len = 3;
+         consumed = 0;
+       }
+     }
+ 
+     /* If the output buffer would overflow, do not store. */
+     if(len > size)
+       break;
+ 
+     /* Append to output buffer. */
+     memcpy(ptr, buf, len);
+     cursize += len;
+     ptr += len;
+     size -= len;
+     st->pos += len;
+     if(buf[len - 1] == '\x0A')    /* '\n' */
+       st->pos = 0;
+     st->bufbeg += consumed;
+   }
+ 
+   return cursize;
+ }
+ 
+ static curl_off_t encoder_qp_size(curl_mimepart *part)
+ {
+   /* Determining the size can only be done by reading the data: unless the
+      data size is 0, we return it as unknown (-1). */
+   return part->datasize? -1: 0;
+ }
+ 
+ 
+ /* In-memory data callbacks. */
+ /* Argument is a pointer to the mime part. */
+ static size_t mime_mem_read(char *buffer, size_t size, size_t nitems,
+                             void *instream)
+ {
+   curl_mimepart *part = (curl_mimepart *) instream;
+   size_t sz = (size_t) part->datasize - part->state.offset;
+ 
+   (void) size;   /* Always 1.*/
+ 
+   if(sz > nitems)
+     sz = nitems;
+ 
+   if(sz)
+     memcpy(buffer, (char *) part->data, sz);
+ 
+   part->state.offset += sz;
+   return sz;
+ }
+ 
+ static int mime_mem_seek(void *instream, curl_off_t offset, int whence)
+ {
+   curl_mimepart *part = (curl_mimepart *) instream;
+ 
+   switch(whence) {
+   case SEEK_CUR:
+     offset += part->state.offset;
+     break;
+   case SEEK_END:
+     offset += part->datasize;
+     break;
+   }
+ 
+   if(offset < 0 || offset > part->datasize)
+     return CURL_SEEKFUNC_FAIL;
+ 
+   part->state.offset = (size_t) offset;
+   return CURL_SEEKFUNC_OK;
+ }
+ 
+ static void mime_mem_free(void *ptr)
+ {
+   Curl_safefree(((curl_mimepart *) ptr)->data);
+ }
+ 
+ 
+ /* Named file callbacks. */
+ /* Argument is a pointer to the mime part. */
+ static int mime_open_file(curl_mimepart * part)
+ {
+   /* Open a MIMEKIND_FILE part. */
+ 
+   if(part->fp)
+     return 0;
+   part->fp = fopen_read(part->data, "rb");
+   return part->fp? 0: -1;
+ }
+ 
+ static size_t mime_file_read(char *buffer, size_t size, size_t nitems,
+                              void *instream)
+ {
+   curl_mimepart *part = (curl_mimepart *) instream;
+ 
+   if(mime_open_file(part))
+     return READ_ERROR;
+ 
+   return fread(buffer, size, nitems, part->fp);
+ }
+ 
+ static int mime_file_seek(void *instream, curl_off_t offset, int whence)
+ {
+   curl_mimepart *part = (curl_mimepart *) instream;
+ 
+   if(whence == SEEK_SET && !offset && !part->fp)
+     return CURL_SEEKFUNC_OK;   /* Not open: implicitly already at BOF. */
+ 
+   if(mime_open_file(part))
+     return CURL_SEEKFUNC_FAIL;
+ 
+   return fseek(part->fp, (long) offset, whence)?
+                CURL_SEEKFUNC_CANTSEEK: CURL_SEEKFUNC_OK;
+ }
+ 
+ static void mime_file_free(void *ptr)
+ {
+   curl_mimepart *part = (curl_mimepart *) ptr;
+ 
+   if(part->fp) {
+     fclose(part->fp);
+     part->fp = NULL;
+   }
+   Curl_safefree(part->data);
+   part->data = NULL;
+ }
+ 
+ 
+ /* Subparts callbacks. */
+ /* Argument is a pointer to the mime structure. */
+ 
+ /* Readback a byte string segment. */
+ static size_t readback_bytes(mime_state *state,
+                              char *buffer, size_t bufsize,
+                              const char *bytes, size_t numbytes,
+                              const char *trail)
+ {
+   size_t sz;
+ 
+   sz = numbytes - state->offset;
+ 
+   if(numbytes > state->offset) {
+     sz = numbytes - state->offset;
+     bytes += state->offset;
+   }
+   else {
+     size_t tsz = strlen(trail);
+ 
+     sz = state->offset - numbytes;
+     if(sz >= tsz)
+       return 0;
+     bytes = trail + sz;
+     sz = tsz - sz;
+   }
+ 
+   if(sz > bufsize)
+     sz = bufsize;
+ 
+   memcpy(buffer, bytes, sz);
+   state->offset += sz;
+   return sz;
+ }
+ 
+ /* Read a non-encoded part content. */
+ static size_t read_part_content(curl_mimepart *part,
+                                 char *buffer, size_t bufsize)
+ {
+   size_t sz = 0;
+ 
+   if(part->readfunc)
+     sz = part->readfunc(buffer, 1, bufsize, part->arg);
+   return sz;
+ }
+ 
+ /* Read and encode part content. */
+ static size_t read_encoded_part_content(curl_mimepart *part,
+                                         char *buffer, size_t bufsize)
+ {
+   mime_encoder_state *st = &part->encstate;
+   size_t cursize = 0;
+   size_t sz;
+   bool ateof = FALSE;
+ 
+   while(bufsize) {
+     if(st->bufbeg < st->bufend || ateof) {
+       /* Encode buffered data. */
+       sz = part->encoder->encodefunc(buffer, bufsize, ateof, part);
+       switch(sz) {
+       case 0:
+         if(ateof)
+           return cursize;
+         break;
+       case CURL_READFUNC_ABORT:
+       case CURL_READFUNC_PAUSE:
+       case READ_ERROR:
+         return cursize? cursize: sz;
+       default:
+         cursize += sz;
+         buffer += sz;
+         bufsize -= sz;
+         continue;
+       }
+     }
+ 
+     /* We need more data in input buffer. */
+     if(st->bufbeg) {
+       size_t len = st->bufend - st->bufbeg;
+ 
+       if(len)
+         memmove(st->buf, st->buf + st->bufbeg, len);
+       st->bufbeg = 0;
+       st->bufend = len;
+     }
+     if(st->bufend >= sizeof st->buf)
+       return cursize? cursize: READ_ERROR;    /* Buffer full. */
+     sz = read_part_content(part, st->buf + st->bufend,
+                            sizeof st->buf - st->bufend);
+     switch(sz) {
+     case 0:
+       ateof = TRUE;
+       break;
+     case CURL_READFUNC_ABORT:
+     case CURL_READFUNC_PAUSE:
+     case READ_ERROR:
+       return cursize? cursize: sz;
+     default:
+       st->bufend += sz;
+       break;
+     }
+   }
+ 
+   return cursize;
+ }
+ 
+ /* Readback a mime part. */
+ static size_t readback_part(curl_mimepart *part,
+                             char *buffer, size_t bufsize)
+ {
+   size_t cursize = 0;
+   size_t sz;
+   struct curl_slist *hdr;
+ #ifdef CURL_DOES_CONVERSIONS
+   char *convbuf = buffer;
+ #endif
+ 
+   /* Readback from part. */
+ 
+   while(bufsize) {
+     sz = 0;
+     hdr = (struct curl_slist *) part->state.ptr;
+     switch(part->state.state) {
+     case MIMESTATE_BEGIN:
+       mimesetstate(&part->state, part->flags & MIME_BODY_ONLY? MIMESTATE_BODY:
+                                  MIMESTATE_CURLHEADERS, part->curlheaders);
+       break;
+     case MIMESTATE_USERHEADERS:
+       if(!hdr) {
+         mimesetstate(&part->state, MIMESTATE_EOH, NULL);
+         break;
+       }
+       if(match_header(hdr, "Content-Type", 12)) {
+         mimesetstate(&part->state, MIMESTATE_USERHEADERS, hdr->next);
+         break;
+       }
+       /* FALLTHROUGH */
+     case MIMESTATE_CURLHEADERS:
+       if(!hdr)
+         mimesetstate(&part->state, MIMESTATE_USERHEADERS, part->userheaders);
+       else {
+         sz = readback_bytes(&part->state, buffer, bufsize,
+                             hdr->data, strlen(hdr->data), "\r\n");
+         if(!sz)
+           mimesetstate(&part->state, part->state.state, hdr->next);
+       }
+       break;
+     case MIMESTATE_EOH:
+       sz = readback_bytes(&part->state, buffer, bufsize, "\r\n", 2, "");
+       if(!sz)
+         mimesetstate(&part->state, MIMESTATE_BODY, NULL);
+       break;
+     case MIMESTATE_BODY:
+ #ifdef CURL_DOES_CONVERSIONS
+       if(part->easy && convbuf < buffer) {
+         CURLcode result = Curl_convert_to_network(part->easy, convbuf,
+                                                   buffer - convbuf);
+         if(result)
+           return READ_ERROR;
+         convbuf = buffer;
+       }
+ #endif
+       cleanup_encoder_state(&part->encstate);
+       mimesetstate(&part->state, MIMESTATE_CONTENT, NULL);
+       break;
+     case MIMESTATE_CONTENT:
+       if(part->encoder)
+         sz = read_encoded_part_content(part, buffer, bufsize);
+       else
+         sz = read_part_content(part, buffer, bufsize);
+       switch(sz) {
+       case 0:
+         mimesetstate(&part->state, MIMESTATE_END, NULL);
+         /* Try sparing open file descriptors. */
+         if(part->kind == MIMEKIND_FILE && part->fp) {
+           fclose(part->fp);
+           part->fp = NULL;
+         }
+         /* FALLTHROUGH */
+       case CURL_READFUNC_ABORT:
+       case CURL_READFUNC_PAUSE:
+       case READ_ERROR:
+         return cursize? cursize: sz;
+       }
+       break;
+     case MIMESTATE_END:
+       return cursize;
+     default:
+       break;    /* Other values not in part state. */
+     }
+ 
+     /* Bump buffer and counters according to read size. */
+     cursize += sz;
+     buffer += sz;
+     bufsize -= sz;
+   }
+ 
+ #ifdef CURL_DOES_CONVERSIONS
+       if(part->easy && convbuf < buffer &&
+          part->state.state < MIMESTATE_BODY) {
+         CURLcode result = Curl_convert_to_network(part->easy, convbuf,
+                                                   buffer - convbuf);
+         if(result)
+           return READ_ERROR;
+       }
+ #endif
+ 
+   return cursize;
+ }
+ 
+ /* Readback from mime. */
+ static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
+                                  void *instream)
+ {
+   curl_mime *mime = (curl_mime *) instream;
+   size_t cursize = 0;
+   size_t sz;
+   curl_mimepart *part;
+ #ifdef CURL_DOES_CONVERSIONS
+   char *convbuf = buffer;
+ #endif
+ 
+   (void) size;   /* Always 1. */
+ 
+   while(nitems) {
+     sz = 0;
+     part = mime->state.ptr;
+     switch(mime->state.state) {
+     case MIMESTATE_BEGIN:
+     case MIMESTATE_BODY:
+ #ifdef CURL_DOES_CONVERSIONS
+       convbuf = buffer;
+ #endif
+       mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, mime->firstpart);
+       /* The first boundary always follows the header termination empty line,
+          so is always preceded by a CRLK. We can then spare 2 characters
+          by skipping the leading CRLF in boundary. */
+       mime->state.offset += 2;
+       break;
+     case MIMESTATE_BOUNDARY1:
+       sz = readback_bytes(&mime->state, buffer, nitems, "\r\n--", 4, "");
+       if(!sz)
+         mimesetstate(&mime->state, MIMESTATE_BOUNDARY2, part);
+       break;
+     case MIMESTATE_BOUNDARY2:
+       sz = readback_bytes(&mime->state, buffer, nitems, mime->boundary,
+                           strlen(mime->boundary), part? "\r\n": "--\r\n");
+       if(!sz) {
+ #ifdef CURL_DOES_CONVERSIONS
+         if(mime->easy && convbuf < buffer) {
+           CURLcode result = Curl_convert_to_network(mime->easy, convbuf,
+                                                     buffer - convbuf);
+           if(result)
+             return READ_ERROR;
+           convbuf = buffer;
+         }
+ #endif
+         mimesetstate(&mime->state, MIMESTATE_CONTENT, part);
+       }
+       break;
+     case MIMESTATE_CONTENT:
+       if(!part) {
+         mimesetstate(&mime->state, MIMESTATE_END, NULL);
+         break;
+       }
+       sz = readback_part(part, buffer, nitems);
+       switch(sz) {
+       case CURL_READFUNC_ABORT:
+       case CURL_READFUNC_PAUSE:
+       case READ_ERROR:
+         return cursize? cursize: sz;
+       case 0:
+ #ifdef CURL_DOES_CONVERSIONS
+         convbuf = buffer;
+ #endif
+         mimesetstate(&mime->state, MIMESTATE_BOUNDARY1, part->nextpart);
+         break;
+       }
+       break;
+     case MIMESTATE_END:
+       return cursize;
+     default:
+       break;    /* other values not used in mime state. */
+     }
+ 
+     /* Bump buffer and counters according to read size. */
+     cursize += sz;
+     buffer += sz;
+     nitems -= sz;
+   }
+ 
+ #ifdef CURL_DOES_CONVERSIONS
+       if(mime->easy && convbuf < buffer &&
+          mime->state.state <= MIMESTATE_CONTENT) {
+         CURLcode result = Curl_convert_to_network(mime->easy, convbuf,
+                                                   buffer - convbuf);
+         if(result)
+           return READ_ERROR;
+       }
+ #endif
+ 
+   return cursize;
+ }
+ 
+ static int mime_part_rewind(curl_mimepart *part)
+ {
+   int res = CURL_SEEKFUNC_OK;
+   enum mimestate targetstate = MIMESTATE_BEGIN;
+ 
+   if(part->flags & MIME_BODY_ONLY)
+     targetstate = MIMESTATE_BODY;
+   cleanup_encoder_state(&part->encstate);
+   if(part->state.state > targetstate) {
+     res = CURL_SEEKFUNC_CANTSEEK;
+     if(part->seekfunc) {
+       res = part->seekfunc(part->arg, (curl_off_t) 0, SEEK_SET);
+       switch(res) {
+       case CURL_SEEKFUNC_OK:
+       case CURL_SEEKFUNC_FAIL:
+       case CURL_SEEKFUNC_CANTSEEK:
+         break;
+       case -1:    /* For fseek() error. */
+         res = CURL_SEEKFUNC_CANTSEEK;
+         break;
+       default:
+         res = CURL_SEEKFUNC_FAIL;
+         break;
+       }
+     }
+   }
+ 
+   if(res == CURL_SEEKFUNC_OK)
+     mimesetstate(&part->state, targetstate, NULL);
+ 
+   return res;
+ }
+ 
+ static int mime_subparts_seek(void *instream, curl_off_t offset, int whence)
+ {
+   curl_mime *mime = (curl_mime *) instream;
+   curl_mimepart *part;
+   int result = CURL_SEEKFUNC_OK;
+   int res;
+ 
+   if(whence != SEEK_SET || offset)
+     return CURL_SEEKFUNC_CANTSEEK;    /* Only support full rewind. */
+ 
+   if(mime->state.state == MIMESTATE_BEGIN)
+    return CURL_SEEKFUNC_OK;           /* Already rewound. */
+ 
+   for(part = mime->firstpart; part; part = part->nextpart) {
+     res = mime_part_rewind(part);
+     if(res != CURL_SEEKFUNC_OK)
+       result = res;
+   }
+ 
+   if(result == CURL_SEEKFUNC_OK)
+     mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
+ 
+   return result;
+ }
+ 
+ static void mime_subparts_free(void *ptr)
+ {
+   curl_mime *mime = (curl_mime *) ptr;
+   curl_mime_free(mime);
+ }
+ 
+ 
+ /* Release part content. */
+ static void cleanup_part_content(curl_mimepart *part)
+ {
+   if(part->freefunc)
+     part->freefunc(part->arg);
+ 
+   part->readfunc = NULL;
+   part->seekfunc = NULL;
+   part->freefunc = NULL;
+   part->arg = (void *) part;          /* Defaults to part itself. */
+   part->data = NULL;
+   part->fp = NULL;
+   part->datasize = (curl_off_t) 0;    /* No size yet. */
+   part->encoder = NULL;
+   cleanup_encoder_state(&part->encstate);
+   part->kind = MIMEKIND_NONE;
+ }
+ 
+ void Curl_mime_cleanpart(curl_mimepart *part)
+ {
+   cleanup_part_content(part);
+   curl_slist_free_all(part->curlheaders);
+   if(part->flags & MIME_USERHEADERS_OWNER)
+     curl_slist_free_all(part->userheaders);
+   Curl_safefree(part->mimetype);
+   Curl_safefree(part->name);
+   Curl_safefree(part->filename);
+   Curl_mime_initpart(part, part->easy);
+ }
+ 
+ /* Recursively delete a mime handle and its parts. */
+ void curl_mime_free(curl_mime *mime)
+ {
+   curl_mimepart *part;
+ 
+   if(mime) {
+     while(mime->firstpart) {
+       part = mime->firstpart;
+       mime->firstpart = part->nextpart;
+       Curl_mime_cleanpart(part);
+       free(part);
+     }
+ 
+     free(mime->boundary);
+     free(mime);
+   }
+ }
+ 
+ /*
+  * Mime build functions.
+  */
+ 
+ /* Create a mime handle. */
+ curl_mime *curl_mime_init(struct Curl_easy *easy)
+ {
+   curl_mime *mime;
+ 
+   mime = (curl_mime *) malloc(sizeof *mime);
+ 
+   if(mime) {
+     mime->easy = easy;
+     mime->parent = NULL;
+     mime->firstpart = NULL;
+     mime->lastpart = NULL;
+ 
+     /* Get a part boundary. */
+     mime->boundary = malloc(24 + MIME_RAND_BOUNDARY_CHARS + 1);
+     if(!mime->boundary) {
+       free(mime);
+       return NULL;
+     }
+ 
+     memset(mime->boundary, '-', 24);
+     Curl_rand_hex(easy, (unsigned char *) mime->boundary + 24,
+                   MIME_RAND_BOUNDARY_CHARS + 1);
+     mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
+   }
+ 
+   return mime;
+ }
+ 
+ /* Initialize a mime part. */
+ void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy)
+ {
+   memset((char *) part, 0, sizeof *part);
+   part->easy = easy;
+   mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
+ }
+ 
+ /* Create a mime part and append it to a mime handle's part list. */
+ curl_mimepart *curl_mime_addpart(curl_mime *mime)
+ {
+   curl_mimepart *part;
+ 
+   if(!mime)
+     return NULL;
+ 
+   part = (curl_mimepart *) malloc(sizeof *part);
+ 
+   if(part) {
+     Curl_mime_initpart(part, mime->easy);
+     part->parent = mime;
+ 
+     if(mime->lastpart)
+       mime->lastpart->nextpart = part;
+     else
+       mime->firstpart = part;
+ 
+     mime->lastpart = part;
+   }
+ 
+   return part;
+ }
+ 
+ /* Set mime part name. */
+ CURLcode curl_mime_name(curl_mimepart *part, const char *name)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   Curl_safefree(part->name);
+   part->name = NULL;
+ 
+   if(name) {
+     part->name = strdup(name);
+     if(!part->name)
+       return CURLE_OUT_OF_MEMORY;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ /* Set mime part remote file name. */
+ CURLcode curl_mime_filename(curl_mimepart *part, const char *filename)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   Curl_safefree(part->filename);
+   part->filename = NULL;
+ 
+   if(filename) {
+     part->filename = strdup(filename);
+     if(!part->filename)
+       return CURLE_OUT_OF_MEMORY;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ /* Set mime part content from memory data. */
+ CURLcode curl_mime_data(curl_mimepart *part,
+                         const char *data, size_t datasize)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   cleanup_part_content(part);
+ 
+   if(data) {
+     if(datasize == CURL_ZERO_TERMINATED)
+       datasize = strlen(data);
+ 
+     part->data = malloc(datasize + 1);
+     if(!part->data)
+       return CURLE_OUT_OF_MEMORY;
+ 
+     part->datasize = datasize;
+ 
+     if(datasize)
+       memcpy(part->data, data, datasize);
+     part->data[datasize] = '\0';    /* Set a nul terminator as sentinel. */
+ 
+     part->readfunc = mime_mem_read;
+     part->seekfunc = mime_mem_seek;
+     part->freefunc = mime_mem_free;
+     part->kind = MIMEKIND_DATA;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ /* Set mime part content from named local file. */
+ CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename)
+ {
+   CURLcode result = CURLE_OK;
+   char *base;
+ 
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   cleanup_part_content(part);
+ 
+   if(filename) {
+     struct_stat sbuf;
+ 
+     if(stat(filename, &sbuf) || access(filename, R_OK))
+       result = CURLE_READ_ERROR;
+ 
+     part->data = strdup(filename);
+     if(!part->data)
+       result = CURLE_OUT_OF_MEMORY;
+ 
+     part->datasize = -1;
+     if(!result && S_ISREG(sbuf.st_mode)) {
+       part->datasize = filesize(filename, sbuf);
+       part->seekfunc = mime_file_seek;
+     }
+ 
+     part->readfunc = mime_file_read;
+     part->freefunc = mime_file_free;
+     part->kind = MIMEKIND_FILE;
+ 
+     /* As a side effect, set the filename to the current file's base name.
+        It is possible to withdraw this by explicitly calling
+        curl_mime_filename() with a NULL filename argument after the current
+        call. */
+     base = strippath(filename);
+     if(!base)
+       result = CURLE_OUT_OF_MEMORY;
+     else {
+       CURLcode res = curl_mime_filename(part, base);
+ 
+       if(res)
+         result = res;
+       free(base);
+     }
+   }
+   return result;
+ }
+ 
+ /* Set mime part type. */
+ CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   Curl_safefree(part->mimetype);
+   part->mimetype = NULL;
+ 
+   if(mimetype) {
+     part->mimetype = strdup(mimetype);
+     if(!part->mimetype)
+       return CURLE_OUT_OF_MEMORY;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ /* Set mime data transfer encoder. */
+ CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding)
+ {
+   CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
+   const mime_encoder *mep;
+ 
+   if(!part)
+     return result;
+ 
+   part->encoder = NULL;
+ 
+   if(!encoding)
+     return CURLE_OK;    /* Removing current encoder. */
+ 
+   for(mep = encoders; mep->name; mep++)
+     if(strcasecompare(encoding, mep->name)) {
+       part->encoder = mep;
+       result = CURLE_OK;
+     }
+ 
+   return result;
+ }
+ 
+ /* Set mime part headers. */
+ CURLcode curl_mime_headers(curl_mimepart *part,
+                            struct curl_slist *headers, int take_ownership)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   if(part->flags & MIME_USERHEADERS_OWNER) {
+     curl_slist_free_all(part->userheaders);
+     part->flags &= ~MIME_USERHEADERS_OWNER;
+   }
+   part->userheaders = headers;
+   if(headers && take_ownership)
+     part->flags |= MIME_USERHEADERS_OWNER;
+   return CURLE_OK;
+ }
+ 
+ /* Set mime part content from callback. */
+ CURLcode curl_mime_data_cb(curl_mimepart *part, curl_off_t datasize,
+                            curl_read_callback readfunc,
+                            curl_seek_callback seekfunc,
+                            curl_free_callback freefunc, void *arg)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   cleanup_part_content(part);
+ 
+   if(readfunc) {
+     part->readfunc = readfunc;
+     part->seekfunc = seekfunc;
+     part->freefunc = freefunc;
+     part->arg = arg;
+     part->datasize = datasize;
+     part->kind = MIMEKIND_CALLBACK;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ /* Set mime part content from subparts. */
+ CURLcode curl_mime_subparts(curl_mimepart *part,
+                             curl_mime *subparts)
+ {
+   if(!part)
+     return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+   /* Accept setting twice the same subparts. */
+   if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
+     return CURLE_OK;
+ 
+   cleanup_part_content(part);
+ 
+   if(subparts) {
+     /* Must belong to the same data handle. */
+     if(part->easy && subparts->easy && part->easy != subparts->easy)
+       return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+     /* Should not have been attached already. */
+     if(subparts->parent)
+       return CURLE_BAD_FUNCTION_ARGUMENT;
+ 
+     subparts->parent = part;
+     part->readfunc = mime_subparts_read;
+     part->seekfunc = mime_subparts_seek;
+     part->freefunc = mime_subparts_free;
+     part->arg = subparts;
+     part->datasize = -1;
+     part->kind = MIMEKIND_MULTIPART;
+   }
+ 
+   return CURLE_OK;
+ }
+ 
+ 
+ /* Readback from top mime. */
+ /* Argument is the dummy top part. */
+ size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void 
*instream)
+ {
+   curl_mimepart *part = (curl_mimepart *) instream;
+ 
+   (void) size;   /* Always 1. */
+   return readback_part(part, buffer, nitems);
+ }
+ 
+ /* Rewind mime stream. */
+ CURLcode Curl_mime_rewind(curl_mimepart *part)
+ {
+   return mime_part_rewind(part) == CURL_SEEKFUNC_OK?
+          CURLE_OK: CURLE_SEND_FAIL_REWIND;
+ }
+ 
+ /* Compute header list size. */
+ static size_t slist_size(struct curl_slist *s,
+                          size_t overhead, const char *skip)
+ {
+   size_t size = 0;
+   size_t skiplen = skip? strlen(skip): 0;
+ 
+   for(; s; s = s->next)
+     if(!skip || !match_header(s, skip, skiplen))
+       size += strlen(s->data) + overhead;
+   return size;
+ }
+ 
+ /* Get/compute multipart size. */
+ static curl_off_t multipart_size(curl_mime *mime)
+ {
+   curl_off_t size;
+   curl_off_t sz;
+   size_t boundarysize;
+   curl_mimepart *part;
+ 
+   if(!mime)
+     return 0;           /* Not present -> empty. */
+ 
+   boundarysize = 4 + strlen(mime->boundary) + 2;
+   size = boundarysize;  /* Final boundary - CRLF after headers. */
+ 
+   for(part = mime->firstpart; part; part = part->nextpart) {
+     sz = Curl_mime_size(part);
+ 
+     if(sz < 0)
+       size = sz;
+ 
+     if(size >= 0)
+       size += boundarysize + sz;
+   }
+ 
+   return size;
+ }
+ 
+ /* Get/compute mime size. */
+ curl_off_t Curl_mime_size(curl_mimepart *part)
+ {
+   curl_off_t size;
+ 
+   if(part->datasize < 0 && part->kind == MIMEKIND_MULTIPART)
+     part->datasize = multipart_size(part->arg);
+ 
+   size = part->datasize;
+ 
+   if(part->encoder)
+     size = part->encoder->sizefunc(part);
+ 
+   if(size >= 0 && !(part->flags & MIME_BODY_ONLY)) {
+     /* Compute total part size. */
+     size += slist_size(part->curlheaders, 2, NULL);
+     size += slist_size(part->userheaders, 2, "Content-Type");
+     size += 2;    /* CRLF after headers. */
+   }
+   return size;
+ }
+ 
+ /* Add a header. */
+ /* VARARGS2 */
+ CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...)
+ {
+   struct curl_slist *hdr = NULL;
+   char *s = NULL;
+   va_list ap;
+ 
+   va_start(ap, fmt);
+   s = curl_mvaprintf(fmt, ap);
+   va_end(ap);
+ 
+   if(s) {
+     hdr = Curl_slist_append_nodup(*slp, s);
+     if(hdr)
+       *slp = hdr;
+     else
+       free(s);
+   }
+ 
+   return hdr? CURLE_OK: CURLE_OUT_OF_MEMORY;
+ }
+ 
+ /* Add a content type header. */
+ static CURLcode add_content_type(struct curl_slist **slp,
+                                  const char *type, const char *boundary)
+ {
+   return Curl_mime_add_header(slp, "Content-Type: %s%s%s", type,
+                               boundary? "; boundary=": "",
+                               boundary? boundary: "");
+ }
+ 
+ 
+ static const char *ContentTypeForFilename(const char *filename)
+ {
+   unsigned int i;
+ 
+   /*
+    * If no content type was specified, we scan through a few well-known
+    * extensions and pick the first we match!
+    */
+   struct ContentType {
+     const char *extension;
+     const char *type;
+   };
+   static const struct ContentType ctts[] = {
+     {".gif",  "image/gif"},
+     {".jpg",  "image/jpeg"},
+     {".jpeg", "image/jpeg"},
+     {".png",  "image/png"},
+     {".svg",  "image/svg+xml"},
+     {".txt",  "text/plain"},
+     {".htm",  "text/html"},
+     {".html", "text/html"},
+     {".pdf",  "application/pdf"},
+     {".xml",  "application/xml"}
+   };
+ 
+   if(filename) {
+     size_t len1 = strlen(filename);
+     const char *nameend = filename + len1;
+ 
+     for(i = 0; i < sizeof ctts / sizeof ctts[0]; i++) {
+       size_t len2 = strlen(ctts[i].extension);
+ 
+       if(len1 >= len2 && strcasecompare(nameend - len2, ctts[i].extension))
+           return ctts[i].type;
+     }
+   }
+   return NULL;
+ }
+ 
+ CURLcode Curl_mime_prepare_headers(curl_mimepart *part,
+                                    const char *contenttype,
+                                    const char *disposition,
+                                    enum mimestrategy strategy)
+ {
+   curl_mime *mime = NULL;
+   const char *boundary = NULL;
+   char *s;
+   const char *cte = NULL;
+   CURLcode ret = CURLE_OK;
+ 
+   /* Get rid of previously prepared headers. */
+   curl_slist_free_all(part->curlheaders);
+   part->curlheaders = NULL;
+ 
+   /* Be sure we won't access old headers later. */
+   if(part->state.state == MIMESTATE_CURLHEADERS)
+     mimesetstate(&part->state, MIMESTATE_CURLHEADERS, NULL);
+ 
+   /* Build the content-type header. */
+   s = search_header(part->userheaders, "Content-Type");
+   if(s)
+     contenttype = s;
+   if(part->mimetype)
+     contenttype = part->mimetype;
+   if(!contenttype) {
+     switch(part->kind) {
+     case MIMEKIND_MULTIPART:
+       contenttype = MULTIPART_CONTENTTYPE_DEFAULT;
+       break;
+     case MIMEKIND_FILE:
+       contenttype = ContentTypeForFilename(part->filename);
+       if(!contenttype)
+         contenttype = ContentTypeForFilename(part->data);
+       if(!contenttype && part->filename)
+         contenttype = FILE_CONTENTTYPE_DEFAULT;
+       break;
+     default:
+       contenttype = ContentTypeForFilename(part->filename);
+       break;
+     }
+   }
+ 
+   if(part->kind == MIMEKIND_MULTIPART) {
+     mime = (curl_mime *) part->arg;
+     if(mime)
+       boundary = mime->boundary;
+   }
+   else if(contenttype && strcasecompare(contenttype, "text/plain"))
+     if(strategy == MIMESTRATEGY_MAIL || !part->filename)
+       contenttype = NULL;
+ 
+   /* Issue content-disposition header only if not already set by caller. */
+   if(!search_header(part->userheaders, "Content-Disposition")) {
+     if(!disposition)
+       if(part->filename || part->name ||
+         (contenttype && !strncasecompare(contenttype, "multipart/", 10)))
+           disposition = DISPOSITION_DEFAULT;
+     if(disposition && curl_strequal(disposition, "attachment") &&
+      !part->name && !part->filename)
+       disposition = NULL;
+     if(disposition) {
+       char *name = NULL;
+       char *filename = NULL;
+ 
+       if(part->name) {
+         name = escape_string(part->name);
+         if(!name)
+           ret = CURLE_OUT_OF_MEMORY;
+       }
+       if(!ret && part->filename) {
+         filename = escape_string(part->filename);
+         if(!filename)
+           ret = CURLE_OUT_OF_MEMORY;
+       }
+       if(!ret)
+         ret = Curl_mime_add_header(&part->curlheaders,
+                                    "Content-Disposition: %s%s%s%s%s%s%s",
+                                    disposition,
+                                    name? "; name=\"": "",
+                                    name? name: "",
+                                    name? "\"": "",
+                                    filename? "; filename=\"": "",
+                                    filename? filename: "",
+                                    filename? "\"": "");
+       Curl_safefree(name);
+       Curl_safefree(filename);
+       if(ret)
+         return ret;
+       }
+     }
+ 
+   /* Issue Content-Type header. */
+   if(contenttype) {
+     ret = add_content_type(&part->curlheaders, contenttype, boundary);
+     if(ret)
+       return ret;
+   }
+ 
+   /* Content-Transfer-Encoding header. */
+   if(!search_header(part->userheaders, "Content-Transfer-Encoding")) {
+     if(part->encoder)
+       cte = part->encoder->name;
+     else if(contenttype && strategy == MIMESTRATEGY_MAIL &&
+      part->kind != MIMEKIND_MULTIPART)
+       cte = "8bit";
+     if(cte) {
+       ret = Curl_mime_add_header(&part->curlheaders,
+                                  "Content-Transfer-Encoding: %s", cte);
+       if(ret)
+         return ret;
+     }
+   }
+ 
+   /* If we were reading curl-generated headers, restart with new ones (this
+      should not occur). */
+   if(part->state.state == MIMESTATE_CURLHEADERS)
+     mimesetstate(&part->state, MIMESTATE_CURLHEADERS, part->curlheaders);
+ 
+   /* Process subparts. */
+   if(part->kind == MIMEKIND_MULTIPART && mime) {
+     curl_mimepart *subpart;
+ 
+     disposition = NULL;
+     if(strcasecompare(contenttype, "multipart/form-data"))
+       disposition = "form-data";
+     for(subpart = mime->firstpart; subpart; subpart = subpart->nextpart) {
+       ret = Curl_mime_prepare_headers(subpart, NULL, disposition, strategy);
+       if(ret)
+         return ret;
+     }
+   }
+   return ret;
+ }
+ 
+ #else /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */
+ 
+ /* Mime not compiled in: define stubs for externally-referenced functions. */
+ curl_mime *curl_mime_init(CURL *easy)
+ {
+   (void) easy;
+   return NULL;
+ }
+ 
+ void curl_mime_free(curl_mime *mime)
+ {
+   (void) mime;
+ }
+ 
+ curl_mimepart *curl_mime_addpart(curl_mime *mime)
+ {
+   (void) mime;
+   return NULL;
+ }
+ 
+ CURLcode curl_mime_name(curl_mimepart *part, const char *name)
+ {
+   (void) part;
+   (void) name;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_filename(curl_mimepart *part, const char *filename)
+ {
+   (void) part;
+   (void) filename;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype)
+ {
+   (void) part;
+   (void) mimetype;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_encoder(curl_mimepart *part, const char *encoding)
+ {
+   (void) part;
+   (void) encoding;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_data(curl_mimepart *part,
+                         const char *data, size_t datasize)
+ {
+   (void) part;
+   (void) data;
+   (void) datasize;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_filedata(curl_mimepart *part, const char *filename)
+ {
+   (void) part;
+   (void) filename;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_data_cb(curl_mimepart *part,
+                            curl_off_t datasize,
+                            curl_read_callback readfunc,
+                            curl_seek_callback seekfunc,
+                            curl_free_callback freefunc,
+                            void *arg)
+ {
+   (void) part;
+   (void) datasize;
+   (void) readfunc;
+   (void) seekfunc;
+   (void) freefunc;
+   (void) arg;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_subparts(curl_mimepart *part, curl_mime *subparts)
+ {
+   (void) part;
+   (void) subparts;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ CURLcode curl_mime_headers(curl_mimepart *part,
+                            struct curl_slist *headers, int take_ownership)
+ {
+   (void) part;
+   (void) headers;
+   (void) take_ownership;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ void Curl_mime_initpart(curl_mimepart *part, struct Curl_easy *easy)
+ {
+   (void) part;
+   (void) easy;
+ }
+ 
+ void Curl_mime_cleanpart(curl_mimepart *part)
+ {
+   (void) part;
+ }
+ 
+ CURLcode Curl_mime_prepare_headers(curl_mimepart *part,
+                                    const char *contenttype,
+                                    const char *disposition,
+                                    enum mimestrategy strategy)
+ {
+   (void) part;
+   (void) contenttype;
+   (void) disposition;
+   (void) strategy;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ curl_off_t Curl_mime_size(curl_mimepart *part)
+ {
+   (void) part;
+   return (curl_off_t) -1;
+ }
+ 
+ size_t Curl_mime_read(char *buffer, size_t size, size_t nitems, void 
*instream)
+ {
+   (void) buffer;
+   (void) size;
+   (void) nitems;
+   (void) instream;
+   return 0;
+ }
+ 
+ CURLcode Curl_mime_rewind(curl_mimepart *part)
+ {
+   (void) part;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ /* VARARGS2 */
+ CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...)
+ {
+   (void) slp;
+   (void) fmt;
+   return CURLE_NOT_BUILT_IN;
+ }
+ 
+ #endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */
diff --cc lib/url.c
index acaf913da,584635bc3..55884c982
--- a/lib/url.c
+++ b/lib/url.c
@@@ -4471,8 -4523,8 +4523,9 @@@ static CURLcode parseurlandfillconn(str
          ptr++;
  
        /* This cannot be made with strcpy, as the memory chunks overlap! */
-       memmove(path, ptr, strlen(ptr)+1);
+       memmove(path, ptr, strlen(ptr) + 1);
      }
++#endif
  
  #if !defined(MSDOS) && !defined(WIN32) && !defined(__CYGWIN__)
      if(STARTS_WITH_DRIVE_PREFIX(path)) {
diff --cc lib/urldata.h
index bde643b46,66e4596fd..6dc715394
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@@ -278,78 -199,8 +199,9 @@@ struct ssl_connect_data 
    bool use;
    ssl_connection_state state;
    ssl_connect_state connecting_state;
- #if defined(USE_OPENSSL)
-   /* these ones requires specific SSL-types */
-   SSL_CTX* ctx;
-   SSL*     handle;
-   X509*    server_cert;
- #elif defined(USE_GNUTLS)
-   gnutls_session_t session;
-   gnutls_certificate_credentials_t cred;
- #ifdef USE_TLS_SRP
-   gnutls_srp_client_credentials_t srp_client_cred;
- #endif
- #elif defined(USE_MBEDTLS)
-   mbedtls_ctr_drbg_context ctr_drbg;
-   mbedtls_entropy_context entropy;
-   mbedtls_ssl_context ssl;
-   int server_fd;
-   mbedtls_x509_crt cacert;
-   mbedtls_x509_crt clicert;
-   mbedtls_x509_crl crl;
-   mbedtls_pk_context pk;
-   mbedtls_ssl_config config;
-   const char *protocols[3];
- #elif defined(USE_POLARSSL)
-   ctr_drbg_context ctr_drbg;
-   entropy_context entropy;
-   ssl_context ssl;
-   int server_fd;
-   x509_crt cacert;
-   x509_crt clicert;
-   x509_crl crl;
-   rsa_context rsa;
- #elif defined(USE_CYASSL)
-   SSL_CTX* ctx;
-   SSL*     handle;
- #elif defined(USE_NSS)
-   PRFileDesc *handle;
-   char *client_nickname;
-   struct Curl_easy *data;
-   struct curl_llist obj_list;
-   PK11GenericObject *obj_clicert;
- #elif defined(USE_GSKIT)
-   gsk_handle handle;
-   int iocport;
-   int localfd;
-   int remotefd;
- #elif defined(USE_AXTLS)
-   SSL_CTX* ssl_ctx;
-   SSL*     ssl;
- #elif defined(USE_SCHANNEL)
-   struct curl_schannel_cred *cred;
-   struct curl_schannel_ctxt *ctxt;
-   SecPkgContext_StreamSizes stream_sizes;
-   size_t encdata_length, decdata_length;
-   size_t encdata_offset, decdata_offset;
-   unsigned char *encdata_buffer, *decdata_buffer;
-   /* encdata_is_incomplete: if encdata contains only a partial record that
-      can't be decrypted without another Curl_read_plain (that is, status is
-      SEC_E_INCOMPLETE_MESSAGE) then set this true. after Curl_read_plain 
writes
-      more bytes into encdata then set this back to false. */
-   bool encdata_is_incomplete;
-   unsigned long req_flags, ret_flags;
-   CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err 
*/
-   bool recv_sspi_close_notify; /* true if connection closed by close_notify */
-   bool recv_connection_closed; /* true if connection closed, regardless how */
-   bool use_alpn; /* true if ALPN is used for this connection */
- #elif defined(USE_DARWINSSL)
-   SSLContextRef ssl_ctx;
-   curl_socket_t ssl_sockfd;
-   bool ssl_direction; /* true if writing, false if reading */
-   size_t ssl_write_buffered_length;
- #elif defined(USE_SSL)
- #error "SSL backend specific information missing from ssl_connect_data"
++
+ #if defined(USE_SSL)
+   struct ssl_backend_data *backend;
  #endif
  };
  
diff --cc lib/vtls/axtls.h
index 4e5994666,3f1e129c2..5f518e4b7
--- a/lib/vtls/axtls.h
+++ b/lib/vtls/axtls.h
@@@ -24,47 -24,10 +24,10 @@@
   ***************************************************************************/
  
  #ifdef USE_AXTLS
 -#include "curl/curl.h"
 +#include "gnurl/curl.h"
  #include "urldata.h"
  
- int Curl_axtls_init(void);
- int Curl_axtls_cleanup(void);
- CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex);
- CURLcode Curl_axtls_connect_nonblocking(
-     struct connectdata *conn,
-     int sockindex,
-     bool *done);
- 
-  /* close a SSL connection */
- void Curl_axtls_close(struct connectdata *conn, int sockindex);
- 
- void Curl_axtls_session_free(void *ptr);
- size_t Curl_axtls_version(char *buffer, size_t size);
- int Curl_axtls_shutdown(struct connectdata *conn, int sockindex);
- int Curl_axtls_check_cxn(struct connectdata *conn);
- CURLcode Curl_axtls_random(struct Curl_easy *data,
-                            unsigned char *entropy,
-                            size_t length);
- 
- /* Set the API backend definition to axTLS */
- #define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS
- 
- /* API setup for axTLS */
- #define curlssl_init Curl_axtls_init
- #define curlssl_cleanup Curl_axtls_cleanup
- #define curlssl_connect Curl_axtls_connect
- #define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking
- #define curlssl_session_free(x)  Curl_axtls_session_free(x)
- #define curlssl_close_all(x) ((void)x)
- #define curlssl_close Curl_axtls_close
- #define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
- #define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
- #define curlssl_set_engine_default(x) ((void)x, CURLE_NOT_BUILT_IN)
- #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL)
- #define curlssl_version Curl_axtls_version
- #define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
- #define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
- #define curlssl_random(x,y,z) Curl_axtls_random(x,y,z)
+ extern const struct Curl_ssl Curl_ssl_axtls;
  
  #endif /* USE_AXTLS */
  #endif /* HEADER_CURL_AXTLS_H */
diff --cc lib/vtls/vtls.c
index d5d0971c4,bb8fda419..1be646e8e
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@@ -111,20 -106,20 +106,22 @@@ boo
  Curl_clone_primary_ssl_config(struct ssl_primary_config *source,
                                struct ssl_primary_config *dest)
  {
-   dest->verifyhost = source->verifyhost;
-   dest->verifypeer = source->verifypeer;
    dest->version = source->version;
    dest->version_max = source->version_max;
+   dest->verifypeer = source->verifypeer;
+   dest->verifyhost = source->verifyhost;
+   dest->verifystatus = source->verifystatus;
+   dest->sessionid = source->sessionid;
  
-   CLONE_STRING(CAfile);
    CLONE_STRING(CApath);
-   CLONE_STRING(cipher_list);
-   CLONE_STRING(egdsocket);
-   CLONE_STRING(random_file);
+   CLONE_STRING(CAfile);
    CLONE_STRING(clientcert);
+   CLONE_STRING(random_file);
+   CLONE_STRING(egdsocket);
+   CLONE_STRING(cipher_list);
  
 +  /* Disable dest sessionid cache if a client cert is used, CVE-2016-5419. */
 +  dest->sessionid = (dest->clientcert ? false : source->sessionid);
    return TRUE;
  }
  
diff --cc lib/wildcard.h
index 89d965ccf,8a5e4b769..198b70b86
--- a/lib/wildcard.h
+++ b/lib/wildcard.h
@@@ -22,10 -22,10 +22,12 @@@
   *
   ***************************************************************************/
  
 -#include <curl/curl.h>
 +#include <gnurl/curl.h>
 +
 +#include "llist.h"
  
+ #include "llist.h"
+ 
  /* list of wildcard process states */
  typedef enum {
    CURLWC_CLEAR = 0,
diff --cc src/Makefile.am
index a6bab6bdc,bfcd877fc..f436524bd
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@@ -41,10 -41,10 +41,12 @@@ AM_CPPFLAGS = -I$(top_srcdir)/includ
                -I$(top_srcdir)/lib            \
                -I$(top_srcdir)/src
  
 -bin_PROGRAMS = curl
 +bin_PROGRAMS = gnurl
 +
 +SUBDIRS = ../docs
  
+ SUBDIRS = ../docs
+ 
  if USE_CPPFLAG_CURL_STATICLIB
  AM_CPPFLAGS += -DCURL_STATICLIB
  endif
@@@ -94,8 -94,7 +96,7 @@@ EXTRA_DIST = mkhelp.pl makefile.dj Make
   curl.rc Makefile.netware Makefile.inc Makefile.Watcom CMakeLists.txt
  
  # Use absolute directory to disable VPATH
 -MANPAGE=$(abs_top_builddir)/docs/curl.1
 +MANPAGE=$(abs_top_builddir)/docs/gnurl.1
- 
  README=$(top_srcdir)/docs/MANUAL
  MKHELP=$(top_srcdir)/src/mkhelp.pl
  HUGE=tool_hugehelp.c
diff --cc src/Makefile.m32
index 22e11e8e0,e55427a5e..836fa2738
--- a/src/Makefile.m32
+++ b/src/Makefile.m32
@@@ -206,13 -204,18 +204,18 @@@ NGHTTP2 = 
  endif
  
  INCLUDES = -I. -I../include -I../lib
+ ifdef SSL
+   ifdef WINSSL
+     CFLAGS += -DCURL_WITH_MULTI_SSL
+   endif
+ endif
  
  ifdef DYN
 -  curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
 -  curl_LDADD = -L$(PROOT)/lib -lcurldll
 +  curl_DEPENDENCIES = $(PROOT)/lib/libgnurldll.a $(PROOT)/lib/libgnurl.dll
 +  curl_LDADD = -L$(PROOT)/lib -lgnurldll
  else
 -  curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
 -  curl_LDADD = -L$(PROOT)/lib -lcurl
 +  curl_DEPENDENCIES = $(PROOT)/lib/libgnurl.a
 +  curl_LDADD = -L$(PROOT)/lib -lgnurl
    CFLAGS += -DCURL_STATICLIB
    LDFLAGS += -static
  endif
diff --cc tests/fuzz/Makefile.am
index 259b86c4f,3bd24dd66..dcea6d576
--- a/tests/fuzz/Makefile.am
+++ b/tests/fuzz/Makefile.am
@@@ -37,13 -35,16 +35,16 @@@ AM_CXXFLAGS = -I$(top_srcdir)/includ
                -I$(top_srcdir)/lib            \
                -I$(top_srcdir)/tests/fuzz
  
- EXTRA_DIST = Makefile.inc CMakeLists.txt
+ LIBS = -lpthread -lm
  
- LIBS = -lpthread -lFuzzer -lstdc++ -lm
- LDFLAGS = -L/usr/lib/llvm-5.0/lib
+ # Run e.g. "make all LIB_FUZZING_ENGINE=/path/to/libFuzzer.a"
+ # to link the fuzzer(s) against a real fuzzing engine.
+ #
+ # OSS-Fuzz will define its own value for LIB_FUZZING_ENGINE.
+ LIB_FUZZING_ENGINE ?= libstandaloneengine.a
  
 -LDADD = $(top_builddir)/lib/libcurl.la      \
 +LDADD = $(top_builddir)/lib/libgnurl.la      \
-         @LDFLAGS@ @LIBCURL_LIBS@
+         $(LIB_FUZZING_ENGINE) @LDFLAGS@ @LIBCURL_LIBS@
  
  # Makefile.inc provides neat definitions
  include Makefile.inc
diff --cc tests/libtest/Makefile.am
index 6ebad89c8,a4e85ef0c..f4c705e41
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@@ -109,8 -109,23 +109,23 @@@ libhostname_la_SOURCES = sethostname.c 
  libhostname_la_LIBADD =
  libhostname_la_DEPENDENCIES =
  
+ # Build a stub gssapi implementation for testing
+ if BUILD_STUB_GSS
+ noinst_LTLIBRARIES += libstubgss.la
+ 
+ libstubgss_la_CPPFLAGS = $(AM_CPPFLAGS)
+ libstubgss_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version -rpath /nowhere
+ libstubgss_la_CFLAGS = $(AM_CFLAGS) -g -Wno-unused-parameter
+ 
+ libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h
+ 
+ libstubgss_la_LIBADD =
+ libstubgss_la_DEPENDENCIES =
+ endif
+ 
+ 
 -lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl 
$(top_srcdir)/include/curl/curl.h
 -      @PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < 
$(top_srcdir)/include/curl/curl.h > lib1521.c
 +lib1521.c: $(top_srcdir)/tests/libtest/mk-lib1521.pl 
$(top_srcdir)/include/gnurl/curl.h
 +      @PERL@ $(top_srcdir)/tests/libtest/mk-lib1521.pl < 
$(top_srcdir)/include/gnurl/curl.h > lib1521.c
  
  checksrc:
        @PERL@ $(top_srcdir)/lib/checksrc.pl $(srcdir)/*.c
diff --cc tests/unit/unit1606.c
index eca8f3c38,9da0b70b6..9640ce2c7
--- a/tests/unit/unit1606.c
+++ b/tests/unit/unit1606.c
@@@ -31,11 -39,11 +39,12 @@@ static CURLcode unit_setup(void
  
  static void unit_stop(void)
  {
 +
+   curl_easy_cleanup(easy);
+   curl_global_cleanup();
  }
  
- static int runawhile(struct Curl_easy *easy,
-                      long time_limit,
+ static int runawhile(long time_limit,
                       long speed_limit,
                       curl_off_t speed,
                       int dec)

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



reply via email to

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