Import curl 7.43
This is a simple import of curl 7.43.
The only change from the official release is the fact that the
Android.mk was removed to avoid build error trying to parse it.
BUG: 22347561
Change-Id: I52ef6798d30b25d22d1f62770d571adec8bcf4d5
diff --git a/docs/.gitignore b/docs/.gitignore
new file mode 100644
index 0000000..23f832b
--- /dev/null
+++ b/docs/.gitignore
@@ -0,0 +1,2 @@
+*.html
+*.pdf
diff --git a/docs/BINDINGS b/docs/BINDINGS
index 5cf07fe..fed16e9 100644
--- a/docs/BINDINGS
+++ b/docs/BINDINGS
@@ -6,14 +6,14 @@
libcurl bindings
-Creative people have written bindings or interfaces for various environments
-and programming languages. Using one of these allows you to take advantage of
-curl powers from within your favourite language or system.
+ Creative people have written bindings or interfaces for various environments
+ and programming languages. Using one of these allows you to take advantage of
+ curl powers from within your favourite language or system.
-This is a list of all known interfaces as of this writing.
+ This is a list of all known interfaces as of this writing.
-The bindings listed below are not part of the curl/libcurl distribution
-archives, but must be downloaded and installed separately.
+ The bindings listed below are not part of the curl/libcurl distribution
+ archives, but must be downloaded and installed separately.
Ada95
@@ -41,13 +41,16 @@
Cocoa
- Written by Dan Wood
+ BBHTTP: written by Bruno de Carvalho
+ https://github.com/brunodecarvalho/BBHTTP
+
+ curlhandle: Written by Dan Wood
http://curlhandle.sourceforge.net/
D
Written by Kenneth Bogert
- http://curl.haxx.se/libcurl/d/
+ http://dlang.org/library/std/net/curl.html
Dylan
@@ -55,8 +58,9 @@
http://dylanlibs.sourceforge.net/
Eiffel
+
Written by Eiffel Software
- http://curl.haxx.se/libcurl/eiffel/
+ https://room.eiffel.com/library/curl
Euphoria
@@ -74,13 +78,23 @@
Gambas
- http://gambas.sourceforge.net
+ http://gambas.sourceforge.net/
glib/GTK+
Written by Richard Atterer
http://atterer.net/glibcurl/
+Guile:
+
+ Written by Michael L. Gran
+ http://www.lonelycactus.com/guile-curl.html
+
+Harbour
+
+ Written by Viktor Szakáts
+ https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl
+
Haskell
Written by Galois, Inc
@@ -88,8 +102,12 @@
Java
- Maintained by [blank]
- http://curl.haxx.se/libcurl/java/
+ https://github.com/pjlegato/curl-java
+
+Julia
+
+ Written by Paul Howe
+ https://github.com/forio/Curl.jl
Lisp
@@ -101,7 +119,7 @@
luacurl by Alexander Marinov
http://luacurl.luaforge.net/
- Lua-cURL by Jürgen Hötzel
+ Lua-cURL by Jürgen Hötzel
http://luaforge.net/projects/lua-curl/
Mono
@@ -112,7 +130,12 @@
.NET
libcurl-net by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-net/
+ https://sourceforge.net/projects/libcurl-net/
+
+node.js
+
+ node-libcurl by Jonathan Cardoso Machado
+ https://github.com/JCMais/node-libcurl
Object-Pascal
@@ -122,7 +145,7 @@
O'Caml
Written by Lars Nilsson
- http://sourceforge.net/projects/ocurl/
+ https://sourceforge.net/projects/ocurl/
Pascal
@@ -131,13 +154,13 @@
Perl
- Maintained by Cris Bailiff
- http://curl.haxx.se/libcurl/perl/
+ Maintained by Cris Bailiff and Bálint Szilakszi
+ https://github.com/szbalint/WWW--Curl
PHP
Written by Sterling Hughes
- http://curl.haxx.se/libcurl/php/
+ https://php.net/curl
PostgreSQL
@@ -151,8 +174,7 @@
R
- RCurl by Duncan Temple Lang
- http://www.omegahat.org/RCurl/
+ http://cran.r-project.org/package=curl
Rexx
@@ -173,10 +195,15 @@
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
http://curl-multi.rubyforge.org/
+Rust
+
+ curl-rust - by Carl Lerche
+ https://github.com/carllerche/curl-rust
+
Scheme
Bigloo binding by Kirill Lisovsky
- http://curl.haxx.se/libcurl/scheme/
+ http://www.metapaper.net/lisovsky/web/curl/
S-Lang
@@ -200,13 +227,13 @@
Tcl
- Tclcurl by Andrés García
- http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html
+ Tclcurl by Andrés García
+ http://mirror.yellow5.com/tclcurl/
Visual Basic
libcurl-vb by Jeffrey Phillips
- http://sourceforge.net/projects/libcurl-vb/
+ https://sourceforge.net/projects/libcurl-vb/
Visual Foxpro
@@ -226,3 +253,8 @@
Written by David Szafranski
http://perso.wanadoo.fr/xblite/libraries.html
+
+Xojo
+
+ Written by Andrew Lambert
+ https://github.com/charonn0/RB-libcURL
diff --git a/docs/BUGS b/docs/BUGS
index 8cbad04..36686ef 100644
--- a/docs/BUGS
+++ b/docs/BUGS
@@ -6,39 +6,54 @@
BUGS
+ 1. Bugs
+ 1.1 There are still bugs
+ 1.2 Where to report
+ 1.3 What to report
+ 1.4 libcurl problems
+ 1.5 Who will fix the problems
+ 1.6 How to get a stack trace
+ 1.7 Bugs in libcurl bindings
+
+==============================================================================
+
+1.1 There are still bugs
+
Curl and libcurl have grown substantially since the beginning. At the time
- of writing (July 2007), there are about 47000 lines of source code, and by
- the time you read this it has probably grown even more.
+ of writing (January 2013), there are about 83,000 lines of source code, and
+ by the time you read this it has probably grown even more.
Of course there are lots of bugs left. And lots of misfeatures.
To help us make curl the stable and solid product we want it to be, we need
bug reports and bug fixes.
-WHERE TO REPORT
+1.2 Where to report
If you can't fix a bug yourself and submit a fix for it, try to report an as
detailed report as possible to a curl mailing list to allow one of us to
- have a go at a solution. You should also post your bug/problem at curl's bug
- tracking system over at
+ have a go at a solution. You can optionally also post your bug/problem at
+ curl's bug tracking system over at
- http://sourceforge.net/bugs/?group_id=976
+ https://github.com/bagder/curl/issues
- (but please read the sections below first before doing that)
+ Please read the rest of this document below first before doing that!
If you feel you need to ask around first, find a suitable mailing list and
post there. The lists are available on http://curl.haxx.se/mail/
-WHAT TO REPORT
+1.3 What to report
When reporting a bug, you should include all information that will help us
understand what's wrong, what you expected to happen and how to repeat the
bad behavior. You therefore need to tell us:
- - your operating system's name and version number (uname -a under a unix
- is fine)
+ - your operating system's name and version number
+
- what version of curl you're using (curl -V is fine)
+
- versions of the used libraries that libcurl is built to use
+
- what URL you were working with (if possible), at least which protocol
and anything and everything else you think matters. Tell us what you
@@ -59,7 +74,48 @@
The address and how to subscribe to the mailing lists are detailed in the
MANUAL file.
-HOW TO GET A STACK TRACE
+1.4 libcurl problems
+
+ First, post all libcurl problems on the curl-library mailing list.
+
+ When you've written your own application with libcurl to perform transfers,
+ it is even more important to be specific and detailed when reporting bugs.
+
+ Tell us the libcurl version and your operating system. Tell us the name and
+ version of all relevant sub-components like for example the SSL library
+ you're using and what name resolving your libcurl uses. If you use SFTP or
+ SCP, the libssh2 version is relevant etc.
+
+ Showing us a real source code example repeating your problem is the best way
+ to get our attention and it will greatly increase our chances to understand
+ your problem and to work on a fix (if we agree it truly is a problem).
+
+ Lots of problems that appear to be libcurl problems are actually just abuses
+ of the libcurl API or other malfunctions in your applications. It is advised
+ that you run your problematic program using a memory debug tool like
+ valgrind or similar before you post memory-related or "crashing" problems to
+ us.
+
+1.5 Who will fix the problems
+
+ If the problems or bugs you describe are considered to be bugs, we want to
+ have the problems fixed.
+
+ There are no developers in the curl project that are paid to work on bugs.
+ All developers that take on reported bugs do this on a voluntary basis. We
+ do it out of an ambition to keep curl and libcurl excellent products and out
+ of pride.
+
+ But please do not assume that you can just lump over something to us and it
+ will then magically be fixed after some given time. Most often we need
+ feedback and help to understand what you've experienced and how to repeat a
+ problem. Then we may only be able to assist YOU to debug the problem and to
+ track down the proper fix.
+
+ We get reports from many people every month and each report can take a
+ considerable amount of time to really go to the bottom with.
+
+1.6 How to get a stack trace
First, you must make sure that you compile all sources with -g and that you
don't 'strip' the final executable. Try to avoid optimizing the code as
@@ -79,3 +135,12 @@
crashed. Include the stack trace with your detailed bug report. It'll help a
lot.
+1.7 Bugs in libcurl bindings
+
+ There will of course pop up bugs in libcurl bindings. You should then
+ primarily approach the team that works on that particular binding and see
+ what you can do to help them fix the problem.
+
+ If you suspect that the problem exists in the underlying libcurl, then
+ please convert your program over to plain C and follow the steps outlined
+ above.
diff --git a/docs/CONTRIBUTE b/docs/CONTRIBUTE
index db03c42..c6ea977 100644
--- a/docs/CONTRIBUTE
+++ b/docs/CONTRIBUTE
@@ -34,6 +34,7 @@
3.3 How To Make a Patch without git
3.4 How to get your changes into the main sources
3.5 Write good commit messages
+ 3.6 About pull requests
==============================================================================
@@ -51,6 +52,10 @@
We also hang out on IRC in #curl on irc.freenode.net
+ If you're at all interested in the code side of things, consider clicking
+ 'watch' on the curl repo at github to get notified on pull requests and new
+ issues posted there.
+
1.2. License
When contributing with code, you agree to put your changes and new code under
@@ -77,10 +82,10 @@
1.3 What To Read
- Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the
- most recent CHANGES. Just lurking on the libcurl mailing list is gonna give
- you a lot of insights on what's going on right now. Asking there is a good
- idea too.
+ Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the
+ most recent changes in the git log. Just lurking on the curl-library mailing
+ list is gonna give you a lot of insights on what's going on right now. Asking
+ there is a good idea too.
2. cURL Coding Standards
@@ -97,12 +102,12 @@
2.2 Indenting
- Please try using the same indenting levels and bracing method as all the
- other code already does. It makes the source code a lot easier to follow if
- all of it is written using the same style. We don't ask you to like it, we
- just ask you to follow the tradition! ;-) This mainly means: 2-level indents,
- using spaces only (no tabs) and having the opening brace ({) on the same line
- as the if() or while().
+ Use the same indenting levels and bracing method as all the other code
+ already does. It makes the source code easier to follow if all of it is
+ written using the same style. We don't ask you to like it, we just ask you to
+ follow the tradition! ;-) This mainly means: 2-level indents, using spaces
+ only (no tabs) and having the opening brace ({) on the same line as the if()
+ or while().
Also note that we use if() and while() with no space before the parenthesis.
@@ -150,6 +155,9 @@
description exactly what they correct so that all patches can be selectively
applied by the maintainer or other interested parties.
+ Also, separate patches enable bisecting much better when we track problems in
+ the future.
+
2.9 Patch Against Recent Sources
Please try to get the latest available sources to make your patches
@@ -177,6 +185,10 @@
test case that verifies that it works as documented. If every submitter also
posts a few test cases, it won't end up as a heavy burden on a single person!
+ If you don't have test cases or perhaps you have done something that is very
+ hard to write tests for, do explain exactly how you have otherwise tested and
+ verified your changes.
+
3. Pushing Out Your Changes
3.1 Write Access to git Repository
@@ -189,9 +201,9 @@
3.2 How To Make a Patch with git
- You need to first checkout the respository:
+ You need to first checkout the repository:
- git clone git://github.com/bagder/curl.git
+ git clone https://github.com/bagder/curl.git
You then proceed and edit all the files you like and you commit them to your
local repository:
@@ -211,7 +223,7 @@
commit.
Now send those patches off to the curl-library list. You can of course opt to
- do that with the 'get send-email' command.
+ do that with the 'git send-email' command.
3.3 How To Make a Patch without git
@@ -233,47 +245,62 @@
For unix-like operating systems:
- http://www.gnu.org/software/patch/patch.html
- http://www.gnu.org/directory/diffutils.html
+ https://savannah.gnu.org/projects/patch/
+ https://www.gnu.org/software/diffutils/
For Windows:
- http://gnuwin32.sourceforge.net/packages/patch.htm
- http://gnuwin32.sourceforge.net/packages/diffutils.htm
+ http://gnuwin32.sourceforge.net/packages/patch.htm
+ http://gnuwin32.sourceforge.net/packages/diffutils.htm
3.4 How to get your changes into the main sources
- 1. Submit your patch to the curl-library mailing list
+ Submit your patch to the curl-library mailing list.
- 2. Make the patch against as recent sources as possible.
+ Make the patch against as recent sources as possible.
- 3. Make sure your patch adheres to the source indent and coding style of
- already existing source code. Failing to do so just adds more work for me.
+ Make sure your patch adheres to the source indent and coding style of already
+ existing source code. Failing to do so just adds more work for me.
- 4. Respond to replies on the list about the patch and answer questions and/or
- fix nits/flaws. This is very important. I will take lack of replies as a
- sign that you're not very anxious to get your patch accepted and I tend to
- simply drop such patches from my TODO list.
+ Respond to replies on the list about the patch and answer questions and/or
+ fix nits/flaws. This is very important. I will take lack of replies as a sign
+ that you're not very anxious to get your patch accepted and I tend to simply
+ drop such patches from my TODO list.
- 5. If you've followed the above mentioned paragraphs and your patch still
- hasn't been incorporated after some weeks, consider resubmitting it to the
- list.
+ If you've followed the above paragraphs and your patch still hasn't been
+ incorporated after some weeks, consider resubmitting it to the list.
3.5 Write good commit messages
- A short guide to how to do fine commit messages in the curl project.
+ A short guide to how to do fine commit messages in the curl project.
- ---- start ----
- [area]: [short line describing the main effect]
+ ---- start ----
+ [area]: [short line describing the main effect]
- [separate the above single line from the rest with an empty line]
+ [separate the above single line from the rest with an empty line]
- [full description, no wider than 72 columns that describe as much as
- possible as to why this change is made, and possibly what things
- it fixes and everything else that is related]
- ---- stop ----
+ [full description, no wider than 72 columns that describe as much as
+ possible as to why this change is made, and possibly what things
+ it fixes and everything else that is related]
- Don't forget to use commit --author="" if you commit someone else's work,
- and make sure that you have your own user and email setup correctly in git
- before you commit
+ [Bug: link to source of the report or more related discussion]
+ [Reported-by: John Doe - credit the reporter]
+ [whatever-else-by: credit all helpers, finders, doers]
+ ---- stop ----
+ Don't forget to use commit --author="" if you commit someone else's work,
+ and make sure that you have your own user and email setup correctly in git
+ before you commit
+
+3.6 About pull requests
+
+ With git (and especially github) it is easy and tempting to send a pull
+ request to the curl project to have changes merged this way instead of
+ mailing patches to the curl-library mailing list.
+
+ We used to dislike this but we're trying to change that and accept that this
+ is a frictionless way for people to contribute to the project. We now welcome
+ pull requests!
+
+ We will continue to avoid using github's merge tools to make the history
+ linear and to make sure commits follow our style guidelines.
diff --git a/docs/DISTRO-DILEMMA b/docs/DISTRO-DILEMMA
index 108e6ba..2d317fd 100644
--- a/docs/DISTRO-DILEMMA
+++ b/docs/DISTRO-DILEMMA
@@ -59,7 +59,7 @@
OpenSSL does. Now, you can build and distribute an TLS/SSL capable libcurl
without including any Original BSD licensed code.
- I believe Debian is the first (only?) distro that provides libcurl/GnutTLS
+ I believe Debian is the first (only?) distro that provides libcurl/GnuTLS
packages.
yassl
@@ -72,20 +72,20 @@
While these three libraries offer similar features, they are not equal.
libcurl does not (yet) offer a standardized stable ABI if you decide to
- switch from using libcurl-openssl to libcurl-gnutls or vice versa. The GnuTLS
+ switch from using libcurl-openssl to libcurl-gnutls or vice-versa. The GnuTLS
and yassl support is very recent in libcurl and it has not been tested nor
used very extensively, while the OpenSSL equivalent code has been used and
thus matured since 1999.
GnuTLS
- - LGPL licensened
+ - LGPL licensed
- supports SRP
- lacks SSLv2 support
- lacks MD2 support (used by at least some CA certs)
- lacks the crypto functions libcurl uses for NTLM
OpenSSL
- - Original BSD licensened
+ - Original BSD licensed
- lacks SRP
- supports SSLv2
- older and more widely used
@@ -112,7 +112,7 @@
In Debian land, there seems to be a common opinion that LGPL is "maximally
compatible" with apps while Original BSD is not. Like this:
- http://lists.debian.org/debian-devel/2005/09/msg01417.html
+ https://lists.debian.org/debian-devel/2005/09/msg01417.html
More SSL Libraries
@@ -163,13 +163,13 @@
Footnotes
[1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6
- [2] = http://www.fsf.org/licensing/essays/bsd.html
- [3] = http://www.fsf.org/licensing/licenses/gpl.html
+ [2] = https://www.gnu.org/philosophy/bsd.html
+ [3] = https://www.gnu.org/licenses/gpl.html
[4] = http://curl.haxx.se/docs/copyright.html
- [5] = http://www.openssl.org/source/license.html
- [6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3
- [7] = http://www.fsf.org/licensing/licenses/lgpl.html
- [8] = http://en.wikipedia.org/wiki/OpenSSL_exception
+ [5] = https://www.openssl.org/source/license.html
+ [6] = https://www.gnu.org/licenses/gpl.html end of section 3
+ [7] = https://www.gnu.org/licenses/lgpl.html
+ [8] = https://en.wikipedia.org/wiki/OpenSSL_exception
Feedback/Updates provided by
diff --git a/docs/FAQ b/docs/FAQ
index 2e35dd6..06a306d 100644
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -1,4 +1,3 @@
-Updated: October 6, 2010 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
@@ -22,6 +21,7 @@
1.12 I have a problem who can I chat with?
1.13 curl's ECCN number?
1.14 How do I submit my patch?
+ 1.15 How do I port libcurl to my OS?
2. Install Related Problems
2.1 configure doesn't find OpenSSL even when it is installed
@@ -36,7 +36,7 @@
3.2 How do I tell curl to resume a transfer?
3.3 Why doesn't my posting using -F work?
3.4 How do I tell curl to run custom FTP commands?
- 3.5 How can I disable the Pragma: nocache header?
+ 3.5 How can I disable the Accept: */* header?
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
3.7 Can I use curl to delete/rename a file through FTP?
3.8 How do I tell curl to follow HTTP redirects?
@@ -51,6 +51,9 @@
3.17 How do I list the root dir of an FTP server?
3.18 Can I use curl to send a POST/PUT and not wait for a response?
3.19 How do I get HTTP from a host using a specific IP address?
+ 3.20 How to SFTP from my user's home directory?
+ 3.21 Protocol xxx not supported or disabled in libcurl
+ 3.22 curl -X gives me HTTP problems
4. Running Problems
4.1 Problems connecting to SSL servers.
@@ -78,6 +81,8 @@
4.17 Non-functional connect timeouts on Windows
4.18 file:// URLs containing drive letters (Windows, NetWare)
4.19 Why doesn't cURL return an error when the network cable is unplugged?
+ 4.20 curl doesn't return error for HTTP non-200 responses!
+ 4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
5. libcurl Issues
5.1 Is libcurl thread-safe?
@@ -95,6 +100,9 @@
5.13 How do I stop an ongoing transfer?
5.14 Using C++ non-static functions for callbacks?
5.15 How do I get an FTP directory listing?
+ 5.16 I want a different time-out!
+ 5.17 Can I write a server with libcurl?
+ 5.18 Does libcurl use threads?
6. License Issues
6.1 I have a GPL program, can I use the libcurl library?
@@ -107,7 +115,7 @@
7. PHP/CURL Issues
7.1 What is PHP/CURL?
- 7.2 Who write PHP/CURL?
+ 7.2 Who wrote PHP/CURL?
7.3 Can I perform multiple requests using the same handle?
==============================================================================
@@ -128,15 +136,15 @@
A free and easy-to-use client-side URL transfer library, supporting DICT,
FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
- POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
+ POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
- kerberos, HTTP form based upload, proxies, cookies, user+password
+ Kerberos, SPNEGO, HTTP form based upload, proxies, cookies, user+password
authentication, file transfer resume, http proxy tunneling and more!
libcurl is highly portable, it builds and works identically on numerous
- platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
- IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac
+ platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HP-UX,
+ IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac
OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF,
Android, Minix, IBM TPF and more...
@@ -150,7 +158,10 @@
Since curl uses libcurl, curl supports the same wide range of common
Internet protocols that libcurl does.
- We pronounce curl and cURL with an initial k sound: [kurl].
+ We pronounce curl with an initial k sound. It rhymes with words like girl
+ and earl. This is a short WAV file to help you:
+
+ http://media.merriam-webster.com/soundc11/c/curl0001.wav
There are numerous sub-projects and related projects that also use the word
curl in the project names in various combinations, but you should take
@@ -198,27 +209,25 @@
better. We do however believe in a few rules when it comes to the future of
curl:
- * Curl -- the command line tool -- is to remain a non-graphical command line
- tool. If you want GUIs or fancy scripting capabilities, you should look
- for another tool that uses libcurl.
+ Curl -- the command line tool -- is to remain a non-graphical command line
+ tool. If you want GUIs or fancy scripting capabilities, you should look for
+ another tool that uses libcurl.
- * We do not add things to curl that other small and available tools already
- do very fine at the side. Curl's output is fine to pipe into another
- program or redirect to another file for the next program to interpret.
+ We do not add things to curl that other small and available tools already do
+ very fine at the side. Curl's output is fine to pipe into another program or
+ redirect to another file for the next program to interpret.
- * We focus on protocol related issues and improvements. If you wanna do more
- magic with the supported protocols than curl currently does, chances are
- big we will agree. If you wanna add more protocols, we may very well
- agree.
+ We focus on protocol related issues and improvements. If you wanna do more
+ magic with the supported protocols than curl currently does, chances are big
+ we will agree. If you wanna add more protocols, we may very well agree.
- * If you want someone else to make all the work while you wait for us to
- implement it for you, that is not a very friendly attitude. We spend a
- considerable time already on maintaining and developing curl. In order to
- get more out of us, you should consider trading in some of your time and
- efforts in return.
+ If you want someone else to make all the work while you wait for us to
+ implement it for you, that is not a very friendly attitude. We spend a
+ considerable time already on maintaining and developing curl. In order to
+ get more out of us, you should consider trading in some of your time and
+ efforts in return.
- * If you write the code, chances are bigger that it will get into curl
- faster.
+ If you write the code, chances are bigger that it will get into curl faster.
1.5 Who makes curl?
@@ -235,16 +244,16 @@
1.6 What do you get for making curl?
Project cURL is entirely free and open. No person gets paid for developing
- (lib)curl on full or even part time. We do this voluntarily on our spare
- time. Occasionally companies pay individual developers to work on curl, but
- that's up to each company and developer. It is not controlled by nor
- supervised in any way by the project.
+ curl on full time. We do this voluntarily, mostly on spare time.
+ Occasionally companies pay individual developers to work on curl, but that's
+ up to each company and developer. It is not controlled by nor supervised in
+ any way by the project.
We still get help from companies. Haxx provides web site, bandwidth, mailing
- lists etc and sourceforge.net hosts project services we take advantage from,
- like the bug tracker. Also again, some companies have sponsored certain
- parts of the development in the past and I hope some will continue to do so
- in the future.
+ lists etc, sourceforge.net hosts project services we take advantage from,
+ like the bug tracker and github hosts the primary git repository. Also
+ again, some companies have sponsored certain parts of the development in the
+ past and I hope some will continue to do so in the future.
If you want to support our project, consider a donation or a banner-program
or even better: by helping us coding, documenting, testing etc.
@@ -259,7 +268,7 @@
Our project name curl has been in effective use since 1998. We were not the
first computer related project to use the name "curl" and do not claim any
- first-hand rights to the name.
+ rights to the name.
We recognize that we will be living in parallel with curl.com and wish them
every success.
@@ -304,49 +313,17 @@
We don't know how many users that downloaded or installed curl and then
never use it.
- Some facts to use as input to the math:
+ In May 2012 Daniel did a counting game and came up with a number that may
+ be completely wrong or somewhat accurate. Over 500 million!
- curl packages are downloaded from the curl.haxx.se and mirrors over a
- million times per year. curl is installed by default with most Linux
- distributions. curl is installed by default with Mac OS X. curl and libcurl
- as used by numerous applications that include libcurl binaries in their
- distribution packages (like Adobe Acrobat Reader and Google Earth).
-
- More than a hundred known named companies use curl in commercial
- environments and products and more than a hundred known named open source
- projects depend on (lib)curl.
-
- In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
- estimated a user base of one million users or more.
-
- In March 2005, the "Linux Counter project" estimated a total Linux user base
- of some 29 millions, while Netcraft detected some 4 million "active" Linux
- based web servers. A guess is that a fair amount of these Linux
- installations have curl installed.
-
- The Debian project maintains statistics on packages installed by people
- who have voluntarily run their package counting application. In mid-2010,
- libcurl3 was installed on over 55000 such systems (62% of reporting systems)
- and was one of the 320 most popular installed packages (out of about 107000
- possible packages).
-
- All this taken together, there is no doubt that there are millions of
- (lib)curl users.
-
- http://curl.haxx.se/docs/companies.html
- http://curl.haxx.se/docs/programs.html
- http://curl.haxx.se/libcurl/using/apps.html
- http://counter.li.org/estimates.php
- http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
- http://qa.debian.org/popcon.php?package=curl
+ See http://daniel.haxx.se/blog/2012/05/16/300m-users/
1.11 Why don't you update ca-bundle.crt
- The ca-bundle.crt file that used to be bundled with curl was very outdated
- (it being last modified year 2000 should tell) and must be replaced with a
- much more modern and up-to-date version by anyone who wants to verify peers
- anyway. It is no longer provided, the last curl release that shipped it was
- curl 7.18.0.
+ The ca cert bundle that used to shipped with curl was very outdated and must
+ be replaced with an up-to-date version by anyone who wants to verify
+ peers. It is no longer provided by curl. The last curl release ever that
+ shipped a ca cert bundle was curl 7.18.0.
In the cURL project we've decided not to attempt to keep this file updated
(or even present anymore) since deciding what to add to a ca cert bundle is
@@ -375,7 +352,7 @@
cryptography. When doing so, the Export Control Classification Number (ECCN)
is used to identify the level of export control etc.
- ASF gives a good explanation at http://www.apache.org/dev/crypto.html
+ ASF gives a good explanation at https://www.apache.org/dev/crypto.html
We believe curl's number might be ECCN 5D002, another possibility is
5D992. It seems necessary to write them, asking to confirm.
@@ -404,6 +381,19 @@
Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
+ 1.15 How do I port libcurl to my OS?
+
+ Here's a rough step-by-step:
+
+ 1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h
+
+ 2. edit lib/config-[youros].h to match your OS and setup
+
+ 3. edit lib/curl_setup.h to include config-[youros].h when your OS is
+ detected by the preprocessor, in the style others already exist
+
+ 4. compile lib/*.c and make them into a library
+
2. Install Related Problems
@@ -446,19 +436,24 @@
2.2 Does curl work/build with other SSL libraries?
- Curl has been written to use OpenSSL, GnuTLS, yassl, NSS or PolarSSL,
- although there should not be many problems using a different library. If
- anyone does "port" curl to use a different SSL library, we are of course
- very interested in getting the patch!
+ Curl has been written to use a generic SSL function layer internally, and
+ that SSL functionality can then be provided by one out of many different SSL
+ backends.
+
+ curl can be built to use one of the following SSL alternatives: OpenSSL,
+ GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X),
+ WinSSL (native Windows) or GSKit (native IBM i). They all have their pros
+ and cons, and we try to maintain a comparison of them here:
+ http://curl.haxx.se/docs/ssl-compared.html
2.3 Where can I find a copy of LIBEAY32.DLL?
That is an OpenSSL binary built for Windows.
- Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs
- on a windows machine to do https://. Check out the curl web site to find
- accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
- packages.
+ Curl can be built with OpenSSL to do the SSL stuff. The LIBEAY32.DLL is then
+ what curl needs on a windows machine to do https:// etc. Check out the curl
+ web site to find accurate and up-to-date pointers to recent OpenSSL DLLs and
+ other binary packages.
2.4 Does curl support SOCKS (RFC 1928) ?
@@ -470,9 +465,13 @@
3.1 curl: (1) SSL is disabled, https: not supported
If you get this output when trying to get anything from a https:// server,
- it means that the configure script couldn't find all libs and include files
- it requires for SSL to work. If the configure script fails to find them,
- curl is simply built without SSL support.
+ it means that the instance of curl/libcurl that you're using was built
+ without support for this protocol.
+
+ This could've happened if the configure script that was run at build time
+ couldn't find all libs and include files curl requires for SSL to work. If
+ the configure script fails to find them, curl is simply built without SSL
+ support.
To get the https:// support into a curl that was previously built but that
reports that https:// is not supported, you should dig through the document
@@ -485,15 +484,14 @@
3.2 How do I tell curl to resume a transfer?
Curl supports resumed transfers both ways on both FTP and HTTP.
-
Try the -C option.
3.3 Why doesn't my posting using -F work?
You can't simply use -F or -d at your choice. The web server that will
- receive your post assumes one of the formats. If the form you're trying to
- "fake" sets the type to 'multipart/form-data', then and only then you must
- use the -F type. In all the most common cases, you should use -d which then
+ receive your post expects one of the formats. If the form you're trying to
+ submit uses the type 'multipart/form-data', then and only then you must use
+ the -F type. In all the most common cases, you should use -d which then
causes a posting with the type 'application/x-www-form-urlencoded'.
This is described in some detail in the MANUAL and TheArtOfHttpScripting
@@ -507,22 +505,23 @@
You can tell curl to perform optional commands both before and/or after a
file transfer. Study the -Q/--quote option.
- Since curl is used for file transfers, you don't use curl to just perform
- FTP commands without transferring anything. Therefore you must always specify
- a URL to transfer to/from even when doing custom FTP commands.
+ Since curl is used for file transfers, you don't normally use curl to
+ perform FTP commands without transferring anything. Therefore you must
+ always specify a URL to transfer to/from even when doing custom FTP
+ commands, or use -I which implies the "no body" option sent to libcurl.
- 3.5 How can I disable the Pragma: nocache header?
+ 3.5 How can I disable the Accept: */* header?
You can change all internally generated headers by adding a replacement with
the -H/--header option. By adding a header with empty contents you safely
- disable that one. Use -H "Pragma:" to disable that specific header.
+ disable that one. Use -H "Accept:" to disable that specific header.
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
To curl, all contents are alike. It doesn't matter how the page was
- generated. It may be ASP, PHP, Perl, shell-script, SSI or plain
- HTML-files. There's no difference to curl and it doesn't even know what kind
- of language that generated the page.
+ generated. It may be ASP, PHP, Perl, shell-script, SSI or plain HTML
+ files. There's no difference to curl and it doesn't even know what kind of
+ language that generated the page.
See also item 3.14 regarding javascript.
@@ -559,6 +558,12 @@
install and use them, in the libcurl section of the curl web site:
http://curl.haxx.se/libcurl/
+ All the various bindings to libcurl are made by other projects and people,
+ outside of the cURL project. The cURL project itself only produces libcurl
+ with its plain C API. If you don't find anywhere else to ask you can ask
+ about bindings on the curl-library list too, but be prepared that people on
+ that list may not know anything about bindings.
+
In October 2009, there were interfaces available for the following
languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
@@ -633,15 +638,15 @@
Some workarounds usually suggested to overcome this Javascript dependency:
- - Depending on the Javascript complexity, write up a script that
- translates it to another language and execute that.
+ Depending on the Javascript complexity, write up a script that translates it
+ to another language and execute that.
- - Read the Javascript code and rewrite the same logic in another language.
+ Read the Javascript code and rewrite the same logic in another language.
- - Implement a Javascript interpreter, people have successfully used the
- Mozilla Javascript engine in the past.
+ Implement a Javascript interpreter, people have successfully used the
+ Mozilla Javascript engine in the past.
- - Ask your admins to stop this, for a static proxy setup or similar.
+ Ask your admins to stop this, for a static proxy setup or similar.
3.15 Can I do recursive fetches with curl?
@@ -657,34 +662,38 @@
There are three different kinds of "certificates" to keep track of when we
talk about using SSL-based protocols (HTTPS or FTPS) using curl or libcurl.
- - Client certificate. The server you communicate may require that you can
- provide this in order to prove that you actually are who you claim to be.
- If the server doesn't require this, you don't need a client certificate.
+ CLIENT CERTIFICATE
- A client certificate is always used together with a private key, and the
- private key has a pass phrase that protects it.
+ The server you communicate may require that you can provide this in order to
+ prove that you actually are who you claim to be. If the server doesn't
+ require this, you don't need a client certificate.
- - Server certificate. The server you communicate with has a server
- certificate. You can and should verify this certificate to make sure that
- you are truly talking to the real server and not a server impersonating
- it.
+ A client certificate is always used together with a private key, and the
+ private key has a pass phrase that protects it.
- - Certificate Authority certificate ("CA cert"). You often have several CA
- certs in a CA cert bundle that can be used to verify a server certificate
- that was signed by one of the authorities in the bundle. curl does not
- come with a CA cert bundle but most curl installs provide one. You can
- also override the default.
+ SERVER CERTIFICATE
- The server certificate verification process is made by using a Certificate
- Authority certificate ("CA cert") that was used to sign the server
- certificate. Server certificate verification is enabled by default in curl
- and libcurl and is often the reason for problems as explained in FAQ entry
- 4.12 and the SSLCERTS document
- (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
- "self-signed" or otherwise signed by a CA that you do not have a CA cert
- for, cannot be verified. If the verification during a connect fails, you
- are refused access. You then need to explicitly disable the verification
- to connect to the server.
+ The server you communicate with has a server certificate. You can and should
+ verify this certificate to make sure that you are truly talking to the real
+ server and not a server impersonating it.
+
+ CERTIFICATE AUTHORITY CERTIFICATE ("CA cert")
+
+ You often have several CA certs in a CA cert bundle that can be used to
+ verify a server certificate that was signed by one of the authorities in the
+ bundle. curl does not come with a CA cert bundle but most curl installs
+ provide one. You can also override the default.
+
+ The server certificate verification process is made by using a Certificate
+ Authority certificate ("CA cert") that was used to sign the server
+ certificate. Server certificate verification is enabled by default in curl
+ and libcurl and is often the reason for problems as explained in FAQ entry
+ 4.12 and the SSLCERTS document
+ (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
+ "self-signed" or otherwise signed by a CA that you do not have a CA cert
+ for, cannot be verified. If the verification during a connect fails, you are
+ refused access. You then need to explicitly disable the verification to
+ connect to the server.
3.17 How do I list the root dir of an FTP server?
@@ -715,6 +724,69 @@
curl --header "Host: www.example.com" http://127.0.0.1/
+ You can also opt to add faked host name entries to curl with the --resolve
+ option. That has the added benefit that things like redirects will also work
+ properly. The above operation would instead be done as:
+
+ curl --resolve www.example.com:80:127.0.0.1 http://www.example.com/
+
+ 3.20 How to SFTP from my user's home directory?
+
+ Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
+ work with. It means that if you don't specify that you want the user's home
+ directory, you get the actual root directory.
+
+ To specify a file in your user's home directory, you need to use the correct
+ URL syntax which for sftp might look similar to:
+
+ curl -O -u user:password sftp://example.com/~/file.txt
+
+ and for SCP it is just a different protocol prefix:
+
+ curl -O -u user:password scp://example.com/~/file.txt
+
+ 3.21 Protocol xxx not supported or disabled in libcurl
+
+ When passing on a URL to curl to use, it may respond that the particular
+ protocol is not supported or disabled. The particular way this error message
+ is phrased is because curl doesn't make a distinction internally of whether
+ a particular protocol is not supported (i.e. never got any code added that
+ knows how to speak that protocol) or if it was explicitly disabled. curl can
+ be built to only support a given set of protocols, and the rest would then
+ be disabled or not supported.
+
+ Note that this error will also occur if you pass a wrongly spelled protocol
+ part as in "htpt://example.com" or as in the less evident case if you prefix
+ the protocol part with a space as in " http://example.com/".
+
+ 3.22 curl -X gives me HTTP problems
+
+ In normal circumstances, -X should hardly ever be used.
+
+ By default you use curl without explicitly saying which request method to
+ use when the URL identifies a HTTP transfer. If you just pass in a URL like
+ "curl http://example.com" it will use GET. If you use -d or -F curl will use
+ POST, -I will cause a HEAD and -T will make it a PUT.
+
+ If for whatever reason you're not happy with these default choices that curl
+ does for you, you can override those request methods by specifying -X
+ [WHATEVER]. This way you can for example send a DELETE by doing "curl -X
+ DELETE [URL]".
+
+ It is thus pointless to do "curl -XGET [URL]" as GET would be used
+ anyway. In the same vein it is pointless to do "curl -X POST -d data
+ [URL]"... But you can make a fun and somewhat rare request that sends a
+ request-body in a GET request with something like "curl -X GET -d data
+ [URL]"
+
+ Note that -X doesn't actually change curl's behavior as it only modifies the
+ actual string sent in the request, but that may of course trigger a
+ different set of events.
+
+ Accordingly, by using -XPOST on a command line that for example would follow
+ a 303 redirect, you will effectively prevent curl from behaving
+ correctly. Be aware.
+
4. Running Problems
@@ -745,12 +817,13 @@
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
- In Windows, the standard DOS shell treats the %-symbol specially and you
- need to use TWO %-symbols for each single one you want to use in the URL.
+ In Windows, the standard DOS shell treats the percent sign specially and you
+ need to use TWO percent signs for each single one you want to use in the
+ URL.
- Also note that if you want the literal %-symbol to be part of the data you
- pass in a POST using -d/--data you must encode it as '%25' (which then also
- needs the %-symbol doubled on Windows machines).
+ If you want a literal percent sign to be part of the data you pass in a POST
+ using -d/--data you must encode it as '%25' (which then also needs the
+ percent sign doubled on Windows machines).
4.3 How can I use {, }, [ or ] to specify multiple URLs?
@@ -792,7 +865,7 @@
4.5.3 "403 Forbidden"
- The server understood the request, but is refusing to fulfill it.
+ The server understood the request, but is refusing to fulfil it.
Authorization will not help and the request SHOULD NOT be repeated.
4.5.4 "404 Not Found"
@@ -863,8 +936,8 @@
4.9 Curl can't authenticate to the server that requires NTLM?
- NTLM support requires OpenSSL, GnuTLS, NSS or Microsoft Windows libraries at
- build-time to provide this functionality.
+ NTLM support requires OpenSSL, GnuTLS, NSS, Secure Transport, or Microsoft
+ Windows libraries at build-time to provide this functionality.
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
should not use such ones.
@@ -919,13 +992,13 @@
4.14 Redirects work in browser but not with curl!
curl supports HTTP redirects fine (see item 3.8). Browsers generally support
- at least two other ways to perform directs that curl does not:
+ at least two other ways to perform redirects that curl does not:
- - Meta tags. You can write a HTML tag that will cause the browser to
- redirect to another given URL after a certain time.
+ Meta tags. You can write a HTML tag that will cause the browser to redirect
+ to another given URL after a certain time.
- - Javascript. You can write a Javascript program embedded in a HTML page
- that redirects the browser to another given URL.
+ Javascript. You can write a Javascript program embedded in a HTML page that
+ redirects the browser to another given URL.
There is no way to make curl follow these redirects. You must either
manually figure out what the page is set to do, or you write a script that
@@ -969,7 +1042,7 @@
timeout is set.
See option TcpMaxConnectRetransmissions on this page:
- http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
+ https://support.microsoft.com/en-us/kb/175523/en-us
Also, even on non-Windows systems there may run a firewall or anti-virus
software or similar that accepts the connection but does not actually do
@@ -986,7 +1059,7 @@
You'll find that even if D:\blah.txt does exist, cURL returns a 'file
not found' error.
- According to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html),
+ According to RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt),
file:// URLs must contain a host component, but it is ignored by
most implementations. In the above example, 'D:' is treated as the
host component, and is taken away. Thus, cURL tries to open '/blah.txt'.
@@ -1006,11 +1079,11 @@
4.19 Why doesn't cURL return an error when the network cable is unplugged?
- Unplugging the cable is not an error situation. The TCP/IP protocol stack
+ Unplugging a cable is not an error situation. The TCP/IP protocol stack
was designed to be fault tolerant, so even though there may be a physical
break somewhere the connection shouldn't be affected, just possibly
delayed. Eventually, the physical break will be fixed or the data will be
- re-routed around the physical problem.
+ re-routed around the physical problem through another path.
In such cases, the TCP/IP stack is responsible for detecting when the
network connection is irrevocably lost. Since with some protocols it is
@@ -1028,6 +1101,46 @@
falls too low, and --connect-timeout and --max-time can be used to put an
overall timeout on the connection phase or the entire transfer.
+ A libcurl-using application running in a known physical environment (e.g.
+ an embedded device with only a single network connection) may want to act
+ immediately if its lone network connection goes down. That can be achieved
+ by having the application monitor the network connection on its own using an
+ OS-specific mechanism, then signalling libcurl to abort (see also item 5.13).
+
+ 4.20 curl doesn't return error for HTTP non-200 responses!
+
+ Correct. Unless you use -f (--fail).
+
+ When doing HTTP transfers, curl will perform exactly what you're asking it
+ to do and if successful it will not return an error. You can use curl to
+ test your web server's "file not found" page (that gets 404 back), you can
+ use it to check your authentication protected web pages (that get a 401
+ back) and so on.
+
+ The specific HTTP response code does not constitute a problem or error for
+ curl. It simply sends and delivers HTTP as you asked and if that worked,
+ everything is fine and dandy. The response code is generally providing more
+ higher level error information that curl doesn't care about. The error was
+ not in the HTTP transfer.
+
+ If you want your command line to treat error codes in the 400 and up range
+ as errors and thus return a non-zero value and possibly show an error
+ message, curl has a dedicated option for that: -f (CURLOPT_FAILONERROR in
+ libcurl speak).
+
+ You can also use the -w option and the variable %{response_code} to extract
+ the exact response code that was return in the response.
+
+ 4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
+
+ If you use verbose to see the HTTP request when you send off a HTTP/2
+ request, it will still say 1.1.
+
+ The reason for this is that we first generate the request to send using the
+ old 1.1 style and show that request in the verbose output, and then we
+ convert it over to the binary header-compressed HTTP/2 style. The actual
+ "1.1" part from that request is then not actually used in the transfer. The
+ binary HTTP/2 headers are not human readable.
5. libcurl Issues
@@ -1037,18 +1150,26 @@
We have written the libcurl code specifically adjusted for multi-threaded
programs. libcurl will use thread-safe functions instead of non-safe ones if
- your system has such.
+ your system has such. Note that you must never share the same handle in
+ multiple threads.
+
+ libcurl's implementation of timeouts might use signals (depending on what it
+ was built to use for name resolving), and signal handling is generally not
+ thread-safe. Multi-threaded Applicationss that call libcurl from different
+ threads (on different handles) might want to use CURLOPT_NOSIGNAL, e.g.:
+
+ curl_easy_setopt(handle, CURLOPT_NOSIGNAL, true);
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
need to provide one or two locking functions:
- http://www.openssl.org/docs/crypto/threads.html
+ https://www.openssl.org/docs/crypto/threads.html
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
for the crypto functions).
- http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
+ https://web.archive.org/web/20111103083330/http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
No special locking is needed with a NSS-powered libcurl. NSS is thread-safe.
@@ -1117,6 +1238,11 @@
libcurl will reuse connections for all transfers that are made using the
same libcurl handle.
+ When you use the easy interface, the connection cache is kept within the
+ easy handle. If you instead use the multi interface, the connection cache
+ will be kept within the multi handle and will be shared among all the easy
+ handles that are used within the same multi handle.
+
5.7 Link errors when building libcurl on Windows!
You need to make sure that your project, and all the libraries (both static
@@ -1138,13 +1264,12 @@
the import libraries below. These are the libraries produced by the various
lib/Makefile.* files:
- Target: static lib. import lib for libcurl*.dll.
- -----------------------------------------------------------
- MingW: libcurl.a libcurldll.a
- MSVC (release): libcurl.lib libcurl_imp.lib
- MSVC (debug): libcurld.lib libcurld_imp.lib
- Borland: libcurl.lib libcurl_imp.lib
-
+ Target: static lib. import lib for libcurl*.dll.
+ -----------------------------------------------------------
+ MingW: libcurl.a libcurldll.a
+ MSVC (release): libcurl.lib libcurl_imp.lib
+ MSVC (debug): libcurld.lib libcurld_imp.lib
+ Borland: libcurl.lib libcurl_imp.lib
5.8 libcurl.so.X: open failed: No such file or directory
@@ -1175,24 +1300,23 @@
you want to change name resolver function you must rebuild libcurl and tell
it to use a different function.
- - The non-ipv6 resolver that can use one out of four host name resolve calls
+ - The non-IPv6 resolver that can use one out of four host name resolve calls
(depending on what your system supports):
- A - gethostbyname()
- B - gethostbyname_r() with 3 arguments
- C - gethostbyname_r() with 5 arguments
- D - gethostbyname_r() with 6 arguments
+ A - gethostbyname()
+ B - gethostbyname_r() with 3 arguments
+ C - gethostbyname_r() with 5 arguments
+ D - gethostbyname_r() with 6 arguments
- - The ipv6-resolver that uses getaddrinfo()
+ - The IPv6-resolver that uses getaddrinfo()
- The c-ares based name resolver that uses the c-ares library for resolves.
- Using this offers asynchronous name resolves but it currently has no IPv6
- support.
+ Using this offers asynchronous name resolves.
- The threaded resolver (default option on Windows). It uses:
- A - gethostbyname() on plain ipv4 hosts
- B - getaddrinfo() on ipv6-enabled hosts
+ A - gethostbyname() on plain IPv4 hosts
+ B - getaddrinfo() on IPv6 enabled hosts
Also note that libcurl never resolves or reverse-lookups addresses given as
pure numbers, such as 127.0.0.1 or ::1.
@@ -1210,30 +1334,32 @@
5.12 Can I make libcurl fake or hide my real IP address?
- No. libcurl operates on a higher level than so. Besides, faking IP address
- would imply sending IP packages with a made-up source address, and then you
- normally get a problem with intercepting the packages sent back as they
- would then not be routed to you!
+ No. libcurl operates on a higher level. Besides, faking IP address would
+ imply sending IP packet with a made-up source address, and then you normally
+ get a problem with receiving the packet sent back as they would then not be
+ routed to you!
If you use a proxy to access remote sites, the sites will not see your local
IP address but instead the address of the proxy.
Also note that on many networks NATs or other IP-munging techniques are used
that makes you see and use a different IP address locally than what the
- remote server will see you coming from.
+ remote server will see you coming from. You may also consider using
+ https://www.torproject.org/ .
5.13 How do I stop an ongoing transfer?
- There are several ways, but none of them are instant. There is no function
- you can call from another thread or similar that will stop it immediately.
- Instead you need to make sure that one of the callbacks you use return an
- appropriate value that will stop the transfer.
+ With the easy interface you make sure to return the correct error code from
+ one of the callbacks, but none of them are instant. There is no function you
+ can call from another thread or similar that will stop it immediately.
+ Instead, you need to make sure that one of the callbacks you use returns an
+ appropriate value that will stop the transfer. Suitable callbacks that you
+ can do this with include the progress callback, the read callback and the
+ write callback.
- Suitable callbacks that you can do this with include the progress callback,
- the read callback and the write callback.
-
- If you're using the multi interface, you also stop a transfer by removing
- the particular easy handle from the multi stack.
+ If you're using the multi interface, you can also stop a transfer by
+ removing the particular easy handle from the multi stack at any moment you
+ think the transfer is done or when you wish to abort the transfer.
5.14 Using C++ non-static functions for callbacks?
@@ -1243,14 +1369,14 @@
member function that is passed a pointer to the class:
// f is the pointer to your object.
- static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
+ static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
{
// Call non-static member function.
static_cast<YourClass*>(f)->nonStaticFunction();
}
// This is how you pass pointer to the static function:
- curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
+ curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
5.15 How do I get an FTP directory listing?
@@ -1275,6 +1401,44 @@
libcurl since 7.21.0 also provide the ability to specify a wildcard to
download multiple files from one FTP directory.
+ 5.16 I want a different time-out!
+
+ Time and time again users realize that CURLOPT_TIMEOUT and
+ CURLOPT_CONNECTIMEOUT are not sufficiently advanced or flexible to cover all
+ the various use cases and scenarios applications end up with.
+
+ libcurl offers many more ways to time-out operations. A common alternative
+ is to use the CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME options to
+ specify the lowest possible speed to accept before to consider the transfer
+ timed out.
+
+ The most flexible way is by writing your own time-out logic and using
+ CURLOPT_PROGRESSFUNCTION (perhaps in combination with other callbacks) and
+ use that to figure out exactly when the right condition is met when the
+ transfer should get stopped.
+
+ 5.17 Can I write a server with libcurl?
+
+ No. libcurl offers no functions or building blocks to build any kind of
+ internet protocol server. libcurl is only a client-side library. For server
+ libraries, you need to continue your search elsewhere but there exist many
+ good open source ones out there for most protocols you could possibly want a
+ server for. And there are really good stand-alone ones that have been tested
+ and proven for many years. There's no need for you to reinvent them!
+
+ 5.18 Does libcurl use threads?
+
+ Put simply: no, libcurl will execute in the same thread you call it in. All
+ callbacks will be called in the same thread as the one you call libcurl in.
+
+ If you want to avoid your thread to be blocked by the libcurl call, you make
+ sure you use the non-blocking API which will do transfers asynchronously -
+ but still in the same single thread.
+
+ libcurl will potentially internally use threads for name resolving, if it
+ was built to work like that, but in those cases it'll create the child
+ threads by itself and they will only be used and then killed internally by
+ libcurl and never exposed to the outside.
6. License Issues
@@ -1284,7 +1448,10 @@
this section was much enhanced by Bjorn Reese.)
We are not lawyers and this is not legal advice. You should probably consult
- one if you want true and accurate legal insights without our prejudice.
+ one if you want true and accurate legal insights without our prejudice. Note
+ especially that this section concerns the libcurl license only; compiling in
+ features of libcurl that depend on other libraries (e.g. OpenSSL) may affect
+ the licensing obligations of your application.
6.1 I have a GPL program, can I use the libcurl library?
@@ -1342,12 +1509,16 @@
You do not have to reveal or make public any changes to the libcurl source
code.
- You do not have to reveal or make public that you are using libcurl within
+ You do not have to broadcast to the world that you are using libcurl within
your app.
- As can be seen here: http://curl.haxx.se/docs/companies.html and
- elsewhere, more and more companies are discovering the power
- of libcurl and take advantage of it even in commercial environments.
+ All we ask is that you disclose "the copyright notice and this permission
+ notice" somewhere. Most probably like in the documentation or in the section
+ where other third party dependencies already are mentioned and acknowledged.
+
+ As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
+ more and more companies are discovering the power of libcurl and take
+ advantage of it even in commercial environments.
7. PHP/CURL Issues
@@ -1363,7 +1534,7 @@
CURL (often using all caps) or sometimes ext/curl, but both cause much
confusion to users which in turn gives us a higher question load.
- 7.2 Who write PHP/CURL?
+ 7.2 Who wrote PHP/CURL?
PHP/CURL is a module that comes with the regular PHP package. It depends and
uses libcurl, so you need to have libcurl installed properly first before
diff --git a/docs/FEATURES b/docs/FEATURES
index 32589e1..10fbdd5 100644
--- a/docs/FEATURES
+++ b/docs/FEATURES
@@ -13,27 +13,29 @@
- multiple file upload on a single command line
- custom maximum transfer rate
- redirectable stderr
+ - metalink support (*13)
-libcurl supports
+libcurl
- full URL syntax with no length limit
- custom maximum download time
- custom least download speed acceptable
- custom output result after completion
- guesses protocol from host name unless specified
- uses .netrc
- - progress bar/time specs while downloading
+ - progress bar with time statistics while downloading
- "standard" proxy environment variables support
- compiles on win32 (reported builds on 40+ operating systems)
- selectable network interface for outgoing traffic
- IPv6 support on unix and Windows
- - persistant connections
- - socks5 support
- - supports user name + password in proxy environment variables
+ - persistent connections
+ - socks 4 + 5 support, with or without local name resolving
+ - supports user name and password in proxy environment variables
- operations through proxy "tunnel" (using CONNECT)
- - supports large files (>2GB and >4GB) both upload/download
- - replacable memory functions (malloc, free, realloc, etc)
+ - support for large files (>2GB and >4GB) during upload and download
+ - replaceable memory functions (malloc, free, realloc, etc)
- asynchronous name resolving (*6)
- both a push and a pull style interface
+ - international domain names (*11)
HTTP
- HTTP/1.1 compliant (optionally uses 1.0)
@@ -43,8 +45,8 @@
- POST
- Pipelining
- multipart formpost (RFC1867-style)
- - authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
- SPNEGO (*4) to server and proxy
+ - authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3)
+ to server and proxy
- resume (both GET and PUT)
- follow redirects
- maximum amount of redirects to follow
@@ -53,14 +55,16 @@
- reads/writes the netscape cookie file format
- custom headers (replace/remove internally generated headers)
- custom user-agent string
- - custom referer string
+ - custom referrer string
- range
- proxy authentication
- time conditions
- via http-proxy
- retrieve file modification date
- Content-Encoding support for deflate and gzip
- - "Transfer-Encoding: chunked" support for "uploads"
+ - "Transfer-Encoding: chunked" support in uploads
+ - data compression (*12)
+ - HTTP/2 (*5)
HTTPS (*1)
- (all the HTTP features)
@@ -68,12 +72,12 @@
- verify server certificate
- via http-proxy
- select desired encryption
- - force usage of a specific SSL version (SSLv2(*7), SSLv3 or TLSv1)
+ - force usage of a specific SSL version (SSLv2 (*7), SSLv3 (*10) or TLSv1)
FTP
- download
- authentication
- - kerberos4 (*5), kerberos5 (*3)
+ - Kerberos 5 (*14)
- active/passive using PORT, EPRT, PASV or EPSV
- single file size information (compare to HTTP HEAD)
- 'type=' URL support
@@ -93,7 +97,7 @@
FTPS (*1)
- implicit ftps:// support that use SSL on both connections
- - explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
+ - explicit "AUTH TLS" and "AUTH SSL" usage to "upgrade" plain ftp://
connection to use SSL for both or one of the connections
SCP (*8)
@@ -104,7 +108,8 @@
- with custom commands sent before/after the transfer
TFTP
- - download / upload
+ - download
+ - upload
TELNET
- connection negotiation
@@ -119,18 +124,83 @@
FILE
- URL support
- - "uploads"
+ - upload
- resume
+SMB
+ - SMBv1 over TCP and SSL
+ - download
+ - upload
+ - authentication with NTLMv1
+
+SMTP
+ - authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9), Kerberos 5
+ (*4) and External.
+ - send e-mails
+ - mail from support
+ - mail size support
+ - mail auth support for trusted server-to-server relaying
+ - multiple recipients
+ - via http-proxy
+
+SMTPS (*1)
+ - implicit smtps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain smtp:// connections to use SSL
+ - via http-proxy
+
+POP3
+ - authentication: Clear Text, APOP and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
+ Kerberos 5 (*4) and External.
+ - list e-mails
+ - retrieve e-mails
+ - enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
+ custom requests
+ - via http-proxy
+
+POP3S (*1)
+ - implicit pop3s:// support
+ - explicit "STLS" usage to "upgrade" plain pop3:// connections to use SSL
+ - via http-proxy
+
+IMAP
+ - authentication: Clear Text and SASL
+ - SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9),
+ Kerberos 5 (*4) and External.
+ - list the folders of a mailbox
+ - select a mailbox with support for verifying the UIDVALIDITY
+ - fetch e-mails with support for specifying the UID and SECTION
+ - upload e-mails via the append command
+ - enhanced command support for: EXAMINE, CREATE, DELETE, RENAME, STATUS,
+ STORE, COPY and UID via custom requests
+ - via http-proxy
+
+IMAPS (*1)
+ - implicit imaps:// support
+ - explicit "STARTTLS" usage to "upgrade" plain imap:// connections to use SSL
+ - via http-proxy
+
FOOTNOTES
=========
- *1 = requires OpenSSL, GnuTLS, NSS, yassl or PolarSSL
+ *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native
+ Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i)
*2 = requires OpenLDAP
- *3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
- *4 = requires FBopenssl
- *5 = requires a krb4 library, such as the MIT one or similar.
+ *3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
+ SSPI (native Windows)
+ *4 = requires a GSS-API implementation, however, only Windows SSPI is
+ currently supported
+ *5 = requires nghttp2 and possibly a recent TLS library
*6 = requires c-ares
- *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
+ *7 = requires OpenSSL, NSS, GSKit, WinSSL or Secure Transport; GnuTLS, for
+ example, only supports SSLv3 and TLSv1
*8 = requires libssh2
- *9 = requires OpenSSL, GnuTLS, NSS or yassl
+ *9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
+ Windows)
+ *10 = requires any of the SSL libraries in (*1) above other than axTLS, which
+ does not support SSLv3
+ *11 = requires libidn or Windows
+ *12 = requires libz
+ *13 = requires libmetalink, and either an Apple or Microsoft operating
+ system, or OpenSSL, or GnuTLS, or NSS
+ *14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
diff --git a/docs/HISTORY b/docs/HISTORY
index e04fb53..e76e5b9 100644
--- a/docs/HISTORY
+++ b/docs/HISTORY
@@ -4,22 +4,30 @@
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
- How cURL Became Like This
+How cURL Became Like This
+=========================
-
-In the second half of 1997, Daniel Stenberg came up with the idea to make
+Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot
+for an Amiga related channel on EFnet. He then came up with the idea to make
currency-exchange calculations available to Internet Relay Chat (IRC)
users. All the necessary data are published on the Web; he just needed to
automate their retrieval.
Daniel simply adopted an existing command-line open-source tool, httpget, that
-Brazilian Rafael Sagula had written. After a few minor adjustments, it did
-just what he needed.
+Brazilian Rafael Sagula had written and recently release version 0.1 of. After
+a few minor adjustments, it did just what he needed.
-Soon, he found currencies on a GOPHER site, so support for that had to go in,
-and not before long FTP download support was added as well. The name of the
-project was changed to urlget to better fit what it actually did now, since
-the http-only days were already passed.
+1997
+----
+
+HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support.
+
+We soon found and fixed support for getting currencies over GOPHER. Once FTP
+download support was added, the name of the project was changed and urlget 2.0
+was released in August 1997. The http-only days were already passed.
+
+1998
+----
The project slowly grew bigger. When upload capabilities were added and the
name once again was misleading, a second name change was made and on March 20,
@@ -33,33 +41,39 @@
SSL support was added, powered by the SSLeay library.
-August 1998, first announcement of curl on freshmeat.net.
+August, first announcement of curl on freshmeat.net.
-October 1998, with the curl 4.9 release and the introduction of cookie
-support, curl was no longer released under the GPL license. Now we're at 4000
-lines of code, we switched over to the MPL license to restrict the effects of
+October, with the curl 4.9 release and the introduction of cookie support,
+curl was no longer released under the GPL license. Now we're at 4000 lines of
+code, we switched over to the MPL license to restrict the effects of
"copyleft".
-November 1998, configure script and reported successful compiles on several
+November, configure script and reported successful compiles on several
major operating systems. The never-quite-understood -F option was added and
curl could now simulate quite a lot of a browser. TELNET support was added.
Curl 5 was released in December 1998 and introduced the first ever curl man
page. People started making Linux RPM packages out of it.
-January 1999, DICT support added.
+1999
+----
+
+January, DICT support added.
OpenSSL took over where SSLeay was abandoned.
-May 1999, first Debian package.
+May, first Debian package.
-August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300
-visits weekly.
+August, LDAP:// and FILE:// support added. The curl web site gets 1300 visits
+weekly.
Released curl 6.0 in September. 15000 lines of code.
-December 28 1999, added the project on Sourceforge and started using its
-services for managing the project.
+December 28, added the project on Sourceforge and started using its services
+for managing the project.
+
+2000
+----
Spring 2000, major internal overhaul to provide a suitable library interface.
The first non-beta release was named 7.1 and arrived in August. This offered
@@ -67,19 +81,22 @@
other software and programs to get based on and powered by libcurl. Almost
20000 lines of code.
-August 2000, the curl web site gets 4000 visits weekly.
+August, the curl web site gets 4000 visits weekly.
The PHP guys adopted libcurl already the same month, when the first ever third
party libcurl binding showed up. CURL has been a supported module in PHP since
the release of PHP 4.0.2. This would soon get followers. More than 16
different bindings exist at the time of this writing.
-September 2000, kerberos4 support was added.
+September, kerberos4 support was added.
-In November 2000 started the work on a test suite for curl. It was later
-re-written from scratch again. The libcurl major SONAME number was set to 1.
+In November started the work on a test suite for curl. It was later re-written
+from scratch again. The libcurl major SONAME number was set to 1.
-January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or
+2001
+----
+
+January, Daniel released curl 7.5.2 under a new license again: MIT (or
MPL). The MIT license is extremely liberal and can be used combined with GPL
in other projects. This would finally put an end to the "complaints" from
people involved in GPLed projects that previously were prohibited from using
@@ -92,17 +109,20 @@
The first experimental ftps:// support was added in March 2001.
-August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more
-and more of a standard utility of Linux distributions and a regular in the BSD
+August. curl is bundled in Mac OS X, 10.1. It was already becoming more and
+more of a standard utility of Linux distributions and a regular in the BSD
ports collections. The curl web site gets 8000 visits weekly. Curl Corporation
contacted Daniel to discuss "the name issue". After Daniel's reply, they have
never since got in touch again.
-September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During
-the forthcoming 7.9.x releases, we introduced the multi interface slowly and
+September, libcurl 7.9 introduces cookie jar and curl_formadd(). During the
+forthcoming 7.9.x releases, we introduced the multi interface slowly and
without much whistles.
-June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is
+2002
+----
+
+June, the curl web site gets 13000 visits weekly. curl and libcurl is
35000 lines of code. Reported successful compiles on more than 40 combinations
of CPUs and operating systems.
@@ -111,134 +131,152 @@
a hint, but the packages are mirrored extensively, bundled with numerous OS
distributions and otherwise retrieved as part of other software.
-September 2002, with the release of curl 7.10 it is released under the MIT
-license only.
+September, with the release of curl 7.10 it is released under the MIT license
+only.
-January 2003. Started working on the distributed curl tests. The autobuilds.
+2003
+----
-February 2003, the curl site averages at 20000 visits weekly. At any given
-moment, there's an average of 3 people browsing the curl.haxx.se site.
+January. Started working on the distributed curl tests. The autobuilds.
+
+February, the curl site averages at 20000 visits weekly. At any given moment,
+there's an average of 3 people browsing the curl.haxx.se site.
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
and Negotiate (June).
-November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique
-visitors to the curl.haxx.se site. Five official web mirrors.
+November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
+to the curl.haxx.se site. Five official web mirrors.
-December 2003, full-fledged SSL for FTP is supported.
+December, full-fledged SSL for FTP is supported.
-January 2004: curl 7.11.0 introduced large file support.
+2004
+----
-June 2004:
+January: curl 7.11.0 introduced large file support.
- curl 7.12.0 introduced IDN support. 10 official web mirrors.
+June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
- This release bumped the major SONAME to 3 due to the removal of the
- curl_formparse() function
+This release bumped the major SONAME to 3 due to the removal of the
+curl_formparse() function
-August 2004:
- Curl and libcurl 7.12.1
+August: Curl and libcurl 7.12.1
- Public curl release number: 82
- Releases counted from the very beginning: 109
- Available command line options: 96
- Available curl_easy_setopt() options: 120
- Number of public functions in libcurl: 36
- Amount of public web site mirrors: 12
- Number of known libcurl bindings: 26
+ Public curl release number: 82
+ Releases counted from the very beginning: 109
+ Available command line options: 96
+ Available curl_easy_setopt() options: 120
+ Number of public functions in libcurl: 36
+ Amount of public web site mirrors: 12
+ Number of known libcurl bindings: 26
-April 2005:
+2005
+----
- GnuTLS can now optionally be used for the secure layer when curl is built.
+April. GnuTLS can now optionally be used for the secure layer when curl is
+built.
-September 2005:
+September: TFTP support was added.
- TFTP support was added.
+More than 100,000 unique visitors of the curl web site. 25 mirrors.
- More than 100,000 unique visitors of the curl web site. 25 mirrors.
+December: security vulnerability: libcurl URL Buffer Overflow
-December 2005:
+2006
+----
- security vulnerability: libcurl URL Buffer Overflow
+January. We dropped support for Gopher. We found bugs in the implementation
+that turned out having been introduced years ago, so with the conclusion that
+nobody had found out in all this time we removed it instead of fixing it.
-January 2006:
+March: security vulnerability: libcurl TFTP Packet Buffer Overflow
- We dropped support for Gopher. We found bugs in the implementation that
- turned out having been introduced years ago, so with the conclusion that
- nobody had found out in all this time we removed it instead of fixing it.
+April: Added the multi_socket() API
-March 2006:
+September: The major SONAME number for libcurl was bumped to 4 due to the
+removal of ftp third party transfer support.
- security vulnerability: libcurl TFTP Packet Buffer Overflow
+November: Added SCP and SFTP support
-April 2006:
+2007
+----
- Added the multi_socket() API
+February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
-September 2006:
+July: security vulnerability: libcurl GnuTLS insufficient cert verification
- The major SONAME number for libcurl was bumped to 4 due to the removal of
- ftp third party transfer support.
+2008
+----
-November 2006:
+November:
- Added SCP and SFTP support
-
-February 2007:
-
- Added support for the Mozilla NSS library to do the SSL/TLS stuff
-
-July 2007:
-
- security vulnerability: libcurl GnuTLS insufficient cert verification
-
-November 2008:
-
- Command line options: 128
- curl_easy_setopt() options: 158
- Public functions in libcurl: 58
- Known libcurl bindings: 37
- Contributors: 683
+ Command line options: 128
+ curl_easy_setopt() options: 158
+ Public functions in libcurl: 58
+ Known libcurl bindings: 37
+ Contributors: 683
145,000 unique visitors. >100 GB downloaded.
-March 2009:
+2009
+----
- security vulnerability: libcurl Arbitrary File Access
+March: security vulnerability: libcurl Arbitrary File Access
-August 2009:
+August: security vulnerability: libcurl embedded zero in cert name
- security vulnerability: libcurl embedded zero in cert name
+December: Added support for IMAP, POP3 and SMTP
-December 2009:
+2010
+----
- Added support for IMAP, POP3 and SMTP
+January: Added support for RTSP
-January 2010:
+February: security vulnerability: libcurl data callback excessive length
- Added support for RTSP
+March: The project switched over to use git (hosted by github) instead of CVS
+for source code control
-February 2010:
+May: Added support for RTMP
- security vulnerability: libcurl data callback excessive length
+Added support for PolarSSL to do the SSL/TLS stuff
-March 2010:
+August:
- The project switched over to use git instead of CVS for source code control
-
-May 2010:
-
- Added support for RTMP
-
- Added support for PolarSSL to do the SSL/TLS stuff
-
-August 2010:
-
- Public curl releases: 117
- Command line options: 138
- curl_easy_setopt() options: 180
- Public functions in libcurl: 58
- Known libcurl bindings: 39
- Contributors: 808
+ Public curl releases: 117
+ Command line options: 138
+ curl_easy_setopt() options: 180
+ Public functions in libcurl: 58
+ Known libcurl bindings: 39
+ Contributors: 808
Gopher support added (re-added actually)
+
+2012
+----
+
+ July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
+ (Native Mac OS X and iOS TLS backend).
+
+ Supports metalink
+
+ October: SSH-agent support.
+
+2013
+----
+
+ February: Cleaned up internals to always uses the "multi" non-blocking
+ approach internally and only expose the blocking API with a wrapper.
+
+ September: First small steps on supporting HTTP/2 with nghttp2.
+
+ October: Removed krb4 support.
+
+ December: Happy eyeballs.
+
+2014
+----
+
+ March: first real release supporting HTTP/2
+
+ September: Web site had 245,000 unique visitors and served 236GB data
diff --git a/docs/HTTP-COOKIES b/docs/HTTP-COOKIES
new file mode 100644
index 0000000..b5abddf
--- /dev/null
+++ b/docs/HTTP-COOKIES
@@ -0,0 +1,123 @@
+Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+
+HTTP Cookies
+
+ 1. HTTP Cookies
+ 1.1 Cookie overview
+ 1.2 Cookies saved to disk
+ 1.3 Cookies with curl the command line tool
+ 1.4 Cookies with libcurl
+ 1.5 Cookies with javascript
+
+==============================================================================
+
+1. HTTP Cookies
+
+ 1.1 Cookie overview
+
+ HTTP cookies are pieces of 'name=contents' snippets that a server tells the
+ client to hold and then the client sends back those the server on subsequent
+ requests to the same domains/paths for which the cookies were set.
+
+ Cookies are either "session cookies" which typically are forgotten when the
+ session is over which is often translated to equal when browser quits, or
+ the cookies aren't session cookies they have expiration dates after which
+ the client will throw them away.
+
+ Cookies are set to the client with the Set-Cookie: header and are sent to
+ servers with the Cookie: header.
+
+ For a very long time, the only spec explaining how to use cookies was the
+ original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
+
+ In 2011, RFC6265 (https://www.ietf.org/rfc/rfc6265.txt) was finally published
+ and details how cookies work within HTTP.
+
+ 1.2 Cookies saved to disk
+
+ Netscape once created a file format for storing cookies on disk so that they
+ would survive browser restarts. curl adopted that file format to allow
+ sharing the cookies with browsers, only to see browsers move away from that
+ format. Modern browsers no longer use it, while curl still does.
+
+ The netscape cookie file format stores one cookie per physical line in the
+ file with a bunch of associated meta data, each field separated with
+ TAB. That file is called the cookiejar in curl terminology.
+
+ When libcurl saves a cookiejar, it creates a file header of its own in which
+ there is a URL mention that will link to the web version of this document.
+
+ 1.3 Cookies with curl the command line tool
+
+ curl has a full cookie "engine" built in. If you just activate it, you can
+ have curl receive and send cookies exactly as mandated in the specs.
+
+ Command line options:
+
+ -b, --cookie
+
+ tell curl a file to read cookies from and start the cookie engine, or if
+ it isn't a file it will pass on the given string. -b name=var works and so
+ does -b cookiefile.
+
+ -j, --junk-session-cookies
+
+ when used in combination with -b, it will skip all "session cookies" on
+ load so as to appear to start a new cookie session.
+
+ -c, --cookie-jar
+
+ tell curl to start the cookie engine and write cookies to the given file
+ after the request(s)
+
+ 1.4 Cookies with libcurl
+
+ libcurl offers several ways to enable and interface the cookie engine. These
+ options are the ones provided by the native API. libcurl bindings may offer
+ access to them using other means.
+
+ CURLOPT_COOKIE
+
+ Is used when you want to specify the exact contents of a cookie header to
+ send to the server.
+
+ CURLOPT_COOKIEFILE
+
+ Tell libcurl to activate the cookie engine, and to read the initial set of
+ cookies from the given file. Read-only.
+
+ CURLOPT_COOKIEJAR
+
+ Tell libcurl to activate the cookie engine, and when the easy handle is
+ closed save all known cookies to the given cookiejar file. Write-only.
+
+ CURLOPT_COOKIELIST
+
+ Provide detailed information about a single cookie to add to the internal
+ storage of cookies. Pass in the cookie as a HTTP header with all the
+ details set, or pass in a line from a netscape cookie file. This option
+ can also be used to flush the cookies etc.
+
+ CURLINFO_COOKIELIST
+
+ Extract cookie information from the internal cookie storage as a linked
+ list.
+
+ 1.5 Cookies with javascript
+
+ These days a lot of the web is built up by javascript. The webbrowser loads
+ complete programs that render the page you see. These javascript programs
+ can also set and access cookies.
+
+ Since curl and libcurl are plain HTTP clients without any knowledge of or
+ capability to handle javascript, such cookies will not be detected or used.
+
+ Often, if you want to mimic what a browser does on such web sites, you can
+ record web browser HTTP traffic when using such a site and then repeat the
+ cookie operations using curl or libcurl.
diff --git a/docs/HTTP2.md b/docs/HTTP2.md
new file mode 100644
index 0000000..b4e2983
--- /dev/null
+++ b/docs/HTTP2.md
@@ -0,0 +1,107 @@
+HTTP/2 with curl
+================
+
+[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
+[http2 explained](http://daniel.haxx.se/http2/)
+
+Build prerequisites
+-------------------
+ - nghttp2
+ - OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version
+
+[nghttp2](https://nghttp2.org/)
+-------------------------------
+
+libcurl uses this 3rd party library for the low level protocol handling
+parts. The reason for this is that HTTP/2 is much more complex at that layer
+than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
+existing and well functional library.
+
+We require at least version 1.0.0.
+
+Over an http:// URL
+-------------------
+
+If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
+include an upgrade header in the initial request to the host to allow
+upgrading to HTTP/2.
+
+Possibly we can later introduce an option that will cause libcurl to fail if
+not possible to upgrade. Possibly we introduce an option that makes libcurl
+use HTTP/2 at once over http://
+
+Over an https:// URL
+--------------------
+
+If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
+ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
+an option that will cause libcurl to fail if not possible to use HTTP/2.
+Consider options to explicitly disable ALPN and/or NPN.
+
+ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
+for a similar purpose, was made prior to ALPN and is used for SPDY so early
+HTTP/2 servers are implemented using NPN before ALPN support is widespread.
+
+SSL libs
+--------
+
+The challenge is the ALPN and NPN support and all our different SSL
+backends. You may need a fairly updated SSL library version for it to
+provide the necessary TLS features. Right now we support:
+
+ - OpenSSL: ALPN and NPN
+ - NSS: ALPN and NPN
+ - GnuTLS: ALPN
+ - PolarSSL: ALPN
+
+Multiplexing
+------------
+
+Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
+term for doing multiple independent transfers over the same physical TCP
+connection.
+
+To take advantage of multiplexing, you need to use the multi interface and set
+`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
+attempt to re-use existing HTTP/2 connections and just add a new stream over
+that when doing subsequent parallel requests.
+
+While libcurl sets up a connection to a HTTP server there is a period during
+which it doesn't know if it can pipeline or do multiplexing and if you add new
+transfers in that period, libcurl will default to start new connections for
+those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
+can ask that a transfer should rather wait and see in case there's a
+connection for the same host in progress that might end up being possible to
+multiplex on. It favours keeping the number of connections low to the cost of
+slightly longer time to first byte transferred.
+
+Applications
+------------
+
+We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
+in HTTP 1.1 style. This allows applications to work unmodified.
+
+curl tool
+---------
+
+curl offers the `--http2` command line option to enable use of HTTP/2
+
+HTTP Alternative Services
+-------------------------
+
+Alt-Svc is a suggested extension with a corresponding frame (ALTSVC) in HTTP/2
+that tells the client about an alternative "route" to the same content for the
+same origin server that you get the response from. A browser or long-living
+client can use that hint to create a new connection asynchronously. For
+libcurl, we may introduce a way to bring such clues to the applicaton and/or
+let a subsequent request use the alternate route
+automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
+
+TODO
+----
+
+ - Provide API to set priorities / dependencies of individual streams
+
+ - Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
+ curl can connect with HTTP/2 at once without 1.1+Upgrade.
+
diff --git a/docs/INSTALL b/docs/INSTALL
index 9a5844f..4570318 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -14,9 +14,16 @@
binary package. This document describes how to compile, build and install
curl and libcurl from source code.
-UNIX
+Building from git
+=================
+
+ If you get your code off a git repository, see the GIT-INFO file in the
+ root directory for specific instructions on how to proceed.
+
+Unix
====
- A normal unix installation is made in three or four steps (after you've
+
+ A normal Unix installation is made in three or four steps (after you've
unpacked the source archive):
./configure
@@ -109,18 +116,6 @@
./configure --disable-thread
- To build curl with kerberos4 support enabled, curl requires the krb4 libs
- and headers installed. You can then use a set of options to tell
- configure where those are:
-
- --with-krb4-includes[=DIR] Specify location of kerberos4 headers
- --with-krb4-libs[=DIR] Specify location of kerberos4 libs
- --with-krb4[=DIR] where to look for Kerberos4
-
- In most cases, /usr/athena is the install prefix and then it works with
-
- ./configure --with-krb4=/usr/athena
-
If you're a curl developer and use gcc, you might want to enable more
debug options with the --enable-debug option.
@@ -129,27 +124,31 @@
default. But if you want to alter it, you can select how to deal with
each individual library.
- To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-gnutls.
+ To build with GnuTLS for SSL/TLS, use both --without-ssl and
+ --with-gnutls.
- To build with yassl support instead of OpenSSL or GnuTLS, you must build
- yassl with its OpenSSL emulation enabled and point to that directory root
- with configure --with-ssl.
+ To build with Cyassl for SSL/TLS, use both --without-ssl and
+ --with-cyassl.
- To build with NSS support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-nss.
+ To build with NSS for SSL/TLS, use both --without-ssl and --with-nss.
- To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
- you need to use both --without-ssl and --with-polarssl.
+ To build with PolarSSL for SSL/TLS, use both --without-ssl and
+ --with-polarssl.
- To get GSSAPI support, build with --with-gssapi and have the MIT or
- Heimdal Kerberos 5 packages installed.
+ To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls.
+
+ To build with GSS-API support, use --with-gssapi and have the MIT Kerberos
+ or Heimdal packages installed.
To get support for SCP and SFTP, build with --with-libssh2 and have
libssh2 0.16 or later installed.
+ To get Metalink support, build with --with-libmetalink and have the
+ libmetalink packages installed.
+
SPECIAL CASES
-------------
+
Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
to get correct large file support.
@@ -158,7 +157,6 @@
./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
-
Win32
=====
@@ -175,19 +173,21 @@
advice given above.
KB94248 - How To Use the C Run-Time
- http://support.microsoft.com/kb/94248/en-us
+ https://support.microsoft.com/kb/94248/en-us
KB140584 - How to link with the correct C Run-Time (CRT) library
- http://support.microsoft.com/kb/140584/en-us
+ https://support.microsoft.com/kb/140584/en-us
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
- http://msdn.microsoft.com/en-us/library/ms235460
+ https://msdn.microsoft.com/en-us/library/ms235460
If your app is misbehaving in some strange way, or it is suffering
from memory corruption, before asking for further help, please try
first to rebuild every single library your app uses as well as your
app using the debug multithreaded dynamic C runtime.
+ If you get linkage errors read section 5.7 of the FAQ document.
+
MingW32
-------
@@ -208,9 +208,9 @@
adjust as necessary. It is also possible to override these paths with
environment variables, for example:
- set ZLIB_PATH=c:\zlib-1.2.3
- set OPENSSL_PATH=c:\openssl-0.9.8k
- set LIBSSH2_PATH=c:\libssh2-1.1
+ set ZLIB_PATH=c:\zlib-1.2.8
+ set OPENSSL_PATH=c:\openssl-1.0.2c
+ set LIBSSH2_PATH=c:\libssh2-1.6.0
ATTENTION: if you want to build with libssh2 support you have to use latest
version 0.17 - previous versions will NOT work with 7.17.0 and later!
@@ -229,11 +229,10 @@
If you want to enable LDAPS support then set LDAPS=1.
- - optional MingW32-built OpenlDAP SDK available from:
+ - optional MingW32-built OpenLDAP SDK available from:
http://www.gknw.net/mirror/openldap/
- optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
-
+ https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
Cygwin
------
@@ -252,8 +251,10 @@
MSVC 6 caveats
--------------
- If you use MSVC 6 it is required that you use the February 2003 edition PSDK:
- http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
+ If you use MSVC 6 it is required that you use the February 2003 edition of
+ the 'Platform SDK' which can be downloaded from:
+
+ https://www.microsoft.com/en-us/download/details.aspx?id=12261
Building any software with MSVC 6 without having PSDK installed is just
asking for trouble down the road once you have released it, you might notice
@@ -261,10 +262,8 @@
choice of static vs dynamic runtime and third party libraries. Anyone using
software built in such way will at some point regret having done so.
- When someone uses MSVC 6 without PSDK he is using a compiler back from 1998.
-
If the compiler has been updated with the installation of a service pack as
- those mentioned in http://support.microsoft.com/kb/194022 the compiler can be
+ those mentioned in https://support.microsoft.com/kb/194022 the compiler can be
safely used to read source code, translate and make it object code.
But, even with the service packs mentioned above installed, the resulting
@@ -272,13 +271,6 @@
header files and libraries with bugs and security issues which have already
been addressed and fixed long time ago.
- In order to make use of the updated system headers and fixed libraries
- for MSVC 6, it is required that 'Platform SDK', PSDK from now onwards,
- is installed. The specific PSDK that must be installed for MSVC 6 is the
- February 2003 edition, which is the latest one supporting the MSVC 6 compiler,
- this PSDK is also known as 'Windows Server 2003 PSDK' and can be downloaded
- from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
-
So, building curl and libcurl with MSVC 6 without PSDK is absolutely
discouraged for the benefit of anyone using software built in such
environment. And it will not be supported in any way, as we could just
@@ -307,11 +299,11 @@
Then run 'nmake vc' in curl's root directory.
If you want to compile with zlib support, you will need to build
- zlib (http://www.gzip.org/zlib/) as well. Please read the zlib
+ zlib (http://www.zlib.net/) as well. Please read the zlib
documentation on how to compile zlib. Define the ZLIB_PATH environment
variable to the location of zlib.h and zlib.lib, for example:
- set ZLIB_PATH=c:\zlib-1.2.3
+ set ZLIB_PATH=c:\zlib-1.2.8
Then run 'nmake vc-zlib' in curl's root directory.
@@ -325,7 +317,7 @@
Before running nmake define the OPENSSL_PATH environment variable with
the root/base directory of OpenSSL, for example:
- set OPENSSL_PATH=c:\openssl-0.9.8k
+ set OPENSSL_PATH=c:\openssl-0.9.8zc
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
@@ -340,64 +332,61 @@
at runtime.
Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
- MSVC 6 IDE
- ----------
+ MSVC IDE
+ --------
- A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
- source distribution archive to allow proper building of the two included
- projects, the libcurl library and the curl tool.
+ A fairly comprehensive set of Visual Studio project files are available for
+ v6.0 through v12.0 and are located in the projects folder to allow proper
+ building of both the libcurl library as well as the curl tool.
- 1) Open the vc6curl.dsw workspace with MSVC6's IDE.
- 2) Select 'Build' from top menu.
- 3) Select 'Batch Build' from dropdown menu.
- 4) Make sure that the eight project configurations are 'checked'.
- 5) Click on the 'Build' button.
- 6) Once the eight project configurations are built you are done.
-
- Dynamic and static libcurl libraries are built in debug and release flavours,
- and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
- LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
-
- In the same way four curl executables are created, each using its respective
- library. The resulting curl executables are located in its own subdirectory,
- DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
-
- These reference VC++ 6.0 configurations are generated using the dynamic CRT.
-
- Intentionally, these reference VC++ 6.0 projects and configurations don't use
- third party libraries, such as OpenSSL or Zlib, to allow proper compilation
- and configuration for all new users without further requirements.
-
- If you need something more 'involved' you might adjust them for your own use,
- or explore the world of makefiles described above 'MSVC from command line'.
+ For more information about these projects and building via Visual Studio
+ please see the README file located in the projects folder.
Borland C++ compiler
- ---------------------
+ --------------------
- compile openssl
+ Ensure that your build environment is properly set up to use the compiler
+ and associated tools. PATH environment variable must include the path to
+ bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
- Make sure you include the paths to curl/include and openssl/inc32 in
- your bcc32.cnf file
+ It is advisable to set environment variable BCCDIR to the base path of
+ the compiler installation.
- eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
+ set BCCDIR=c:\Borland\BCC55
- Check to make sure that all of the sources listed in lib/Makefile.b32
- are present in the /path_to_curl/lib directory. (Check the src
- directory for missing ones.)
+ In order to build a plain vanilla version of curl and libcurl run the
+ following command from curl's root directory:
- Make sure the environment variable "BCCDIR" is set to the install
- location for the compiler eg : c:\Borland\BCC55
+ make borland
- command line:
- make -f /path_to_curl/lib/Makefile-ssl.b32
+ To build curl and libcurl with zlib and OpenSSL support set environment
+ variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
+ already built zlib and OpenSSL libraries and from curl's root directory
+ run command:
- compile simplessl.c with appropriate links
+ make borland-ssl-zlib
- c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
- -L c:\borland\bcc55\lib\psdk\ws2_32.lib
- -L c:\openssl\out32\libeay32.lib
- -L c:\openssl\out32\ssleay32.lib
- simplessl.c
+ libcurl library will be built in 'lib' subdirectory while curl tool
+ is built in 'src' subdirectory. In order to use libcurl library it is
+ advisable to modify compiler's configuration file bcc32.cfg located
+ in c:\Borland\BCC55\bin to reflect the location of libraries include
+ paths for example the '-I' line could result in something like:
+
+ -I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
+
+ bcc3.cfg '-L' line could also be modified to reflect the location of
+ of libcurl library resulting for example:
+
+ -L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
+
+ In order to build sample program 'simple.c' from the docs\examples
+ subdirectory run following command from mentioned subdirectory:
+
+ bcc32 simple.c libcurl.lib cw32mt.lib
+
+ In order to build sample program simplessl.c an SSL enabled libcurl
+ is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
+ libraries.
OTHER MSVC IDEs
---------------
@@ -409,7 +398,6 @@
Make the sources in the src/ drawer be a "win32 console application"
project. Name it curl.
-
Disabling Specific Protocols in Win32 builds
--------------------------------------------
@@ -428,16 +416,53 @@
CURL_DISABLE_FILE disables FILE
CURL_DISABLE_TFTP disables TFTP
CURL_DISABLE_HTTP disables HTTP
+ CURL_DISABLE_IMAP disables IMAP
+ CURL_DISABLE_POP3 disables POP3
+ CURL_DISABLE_SMTP disables SMTP
- If you want to set any of these defines you have the following
- possibilities:
+ If you want to set any of these defines you have the following options:
- Modify lib/config-win32.h
- - Modify lib/setup.h
+ - Modify lib/curl_setup.h
- Modify lib/Makefile.vc6
- - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
- in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
+ - Modify the "Preprocessor Definitions" in the libcurl project
+ Note: The pre-processor settings can be found using the Visual Studio IDE
+ under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
+ Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
+ versions.
+
+ Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
+ --------------------------------------------------------------------
+
+ In order to compile libcurl and curl using BSD-style lwIP TCP/IP stack
+ it is necessary to make definition of preprocessor symbol USE_LWIPSOCK
+ visible to libcurl and curl compilation processes. To set this definition
+ you have the following alternatives:
+
+ - Modify lib/config-win32.h and src/config-win32.h
+ - Modify lib/Makefile.vc6
+ - Modify the "Preprocessor Definitions" in the libcurl project
+
+ Note: The pre-processor settings can be found using the Visual Studio IDE
+ under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
+ Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
+ versions.
+
+ Once that libcurl has been built with BSD-style lwIP TCP/IP stack support,
+ in order to use it with your program it is mandatory that your program
+ includes lwIP header file <lwip/opt.h> (or another lwIP header that includes
+ this) before including any libcurl header. Your program does not need the
+ USE_LWIPSOCK preprocessor definition which is for libcurl internals only.
+
+ Compilation has been verified with lwIP 1.4.0 and contrib-1.4.0 from:
+
+ http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip
+ http://download.savannah.gnu.org/releases/lwip/contrib-1.4.0.zip
+
+ This BSD-style lwIP TCP/IP stack support must be considered experimental
+ given that it has been verified that lwIP 1.4.0 still needs some polish,
+ and libcurl might yet need some additional adjustment, caveat emptor.
Important static libcurl usage note
-----------------------------------
@@ -446,9 +471,41 @@
add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for
dynamic import symbols.
+Apple iOS and Mac OS X
+======================
+
+ On recent Apple operating systems, curl can be built to use Apple's
+ SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with
+ Secure Transport for SSL/TLS, use the configure option --with-darwinssl. (It
+ is not necessary to use the option --without-ssl.) This feature requires iOS
+ 5.0 or later, or OS X 10.5 ("Leopard") or later.
+
+ When Secure Transport is in use, the curl options --cacert and --capath and
+ their libcurl equivalents, will be ignored, because Secure Transport uses
+ the certificates stored in the Keychain to evaluate whether or not to trust
+ the server. This, of course, includes the root certificates that ship with
+ the OS. The --cert and --engine options, and their libcurl equivalents, are
+ currently unimplemented in curl with Secure Transport.
+
+ For OS X users: In OS X 10.8 ("Mountain Lion"), Apple made a major
+ overhaul to the Secure Transport API that, among other things, added
+ support for the newer TLS 1.1 and 1.2 protocols. To get curl to support
+ TLS 1.1 and 1.2, you must build curl on Mountain Lion or later, or by
+ using the equivalent SDK. If you set the MACOSX_DEPLOYMENT_TARGET
+ environmental variable to an earlier version of OS X prior to building curl,
+ then curl will use the new Secure Transport API on Mountain Lion and later,
+ and fall back on the older API when the same curl binary is executed on
+ older cats. For example, running these commands in curl's directory in the
+ shell will build the code such that it will run on cats as old as OS X 10.6
+ ("Snow Leopard") (using bash):
+
+ export MACOSX_DEPLOYMENT_TARGET="10.6"
+ ./configure --with-darwinssl
+ make
IBM OS/2
========
+
Building under OS/2 is not much different from building under unix.
You need:
@@ -476,15 +533,15 @@
If you're getting huge binaries, probably your makefiles have the -g in
CFLAGS.
-
VMS
===
+
(The VMS section is in whole contributed by the friendly Nico Baggus)
Curl seems to work with FTP & HTTP other protocols are not tested. (the
perl http/ftp testing server supplied as testing too cannot work on VMS
because vms has no concept of fork(). [ I tried to give it a whack, but
- thats of no use.
+ that's of no use.
SSL stuff has not been ported.
@@ -523,6 +580,7 @@
the name can be fetched from external or internal message libraries
Error code - the err codes assigned by the application
Sev. - severity: Even = error, off = non error
+
0 = Warning
1 = Success
2 = Error
@@ -544,12 +602,13 @@
Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2
So far for porting notes as of:
+
13-jul-2001
N. Baggus
-
QNX
===
+
(This section was graciously brought to us by David Bentham)
As QNX is targeted for resource constrained environments, the QNX headers
@@ -560,11 +619,12 @@
A good all-round solution to this is to override the default when building
libcurl, by overriding CFLAGS during configure, example
- # configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
+ # configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
RISC OS
=======
+
The library can be cross-compiled using gccsdk as follows:
CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
@@ -574,9 +634,9 @@
where riscos-gcc and riscos-ar are links to the gccsdk tools.
You can then link your program with curl/lib/.libs/libcurl.a
-
AmigaOS
=======
+
(This section was graciously brought to us by Diego Casorran)
To build cURL/libcurl on AmigaOS just type 'make amiga' ...
@@ -596,20 +656,19 @@
To enable SSL support, you need a OpenSSL native version (without ixemul),
you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/
-
NetWare
=======
+
To compile curl.nlm / libcurl.nlm you need:
+
- either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
- gnu make and awk running on the platform you compile on;
native Win32 versions can be downloaded from:
http://www.gknw.net/development/prgtools/
- - recent Novell LibC SDK available from:
- http://developer.novell.com/ndk/libc.htm
- - or recent Novell CLib SDK available from:
- http://developer.novell.com/ndk/clib.htm
+ - recent Novell LibC or Novell CLib SDK available from:
+ https://www.novell.com/developer/ndk/
- optional recent Novell CLDAP SDK available from:
- http://developer.novell.com/ndk/cldap.htm
+ https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
- optional zlib sources (static or dynamic linking with zlib.imp);
sources with NetWare Makefile can be obtained from:
http://www.gknw.net/mirror/zlib/
@@ -617,7 +676,7 @@
you can find precompiled packages at:
http://www.gknw.net/development/ossl/netware/
for CLIB-based builds OpenSSL 0.9.8h or later is required - earlier versions
- dont support buildunf with CLIB BSD sockets.
+ don't support building with CLIB BSD sockets.
- optional SSH2 sources (version 0.17 or later);
Set a search path to your compiler, linker and tools; on Linux make
@@ -638,11 +697,11 @@
Builds automatically created 8 times a day from current git are here:
http://www.gknw.net/mirror/curl/autobuilds/
the status of these builds can be viewed at the autobuild table:
- http://curl.haxx.se/auto/
-
+ http://curl.haxx.se/dev/builds.html
eCos
====
+
curl does not use the eCos build system, so you must first build eCos
separately, then link curl to the resulting eCos library. Here's a sample
configure line to do so on an x86 Linux box targeting x86:
@@ -710,9 +769,9 @@
config.errors = stderr; /* default errors to stderr */
-
Minix
=====
+
curl can be compiled on Minix 3 using gcc or ACK (starting with
ver. 3.1.3). Ensure that GNU gawk and bash are both installed and
available in the PATH.
@@ -742,9 +801,9 @@
make
chmem =256000 src/curl
-
Symbian OS
==========
+
The Symbian OS port uses the Symbian build system to compile. From the
packages/Symbian/group/ directory, run:
@@ -755,16 +814,16 @@
SDK doesn't include support for P.I.P.S., you will need to contact
your SDK vendor to obtain that first.
-
VxWorks
========
+
Build for VxWorks is performed using cross compilation.
That means you build on Windows machine using VxWorks tools and
run the built image on the VxWorks device.
To build libcurl for VxWorks you need:
- - CYGWIN (free, http://cygwin.com/)
+ - CYGWIN (free, https://cygwin.com/)
- Wind River Workbench (commercial)
If you have CYGWIN and Workbench installed on you machine
@@ -781,14 +840,54 @@
As a result the libcurl.a library should be created in the 'lib' folder.
To clean the build results type 'make -f ./Makefile.vxworks clean'.
-
Android
=======
- See the build notes in the Android.mk file.
+ Method using the static makefile:
+
+ - see the build notes in the packages/Android/Android.mk file.
+
+ Method using a configure cross-compile (tested with Android NDK r7c, r8):
+
+ - prepare the toolchain of the Android NDK for standalone use; this can
+ be done by invoking the script:
+ ./build/tools/make-standalone-toolchain.sh
+ which creates a usual cross-compile toolchain. Lets assume that you put
+ this toolchain below /opt then invoke configure with something like:
+ export PATH=/opt/arm-linux-androideabi-4.4.3/bin:$PATH
+ ./configure --host=arm-linux-androideabi [more configure options]
+ make
+ - if you want to compile directly from our GIT repo you might run into
+ this issue with older automake stuff:
+ checking host system type...
+ Invalid configuration `arm-linux-androideabi':
+ system `androideabi' not recognized
+ configure: error: /bin/sh ./config.sub arm-linux-androideabi failed
+ this issue can be fixed with using more recent versions of config.sub
+ and config.guess which can be obtained here:
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
+ you need to replace your system-own versions which usually can be
+ found in your automake folder:
+ find /usr -name config.sub
+
+ Wrapper for pkg-config:
+
+ - In order to make proper use of pkg-config so that configure is able to
+ find all dependencies you should create a wrapper script for pkg-config;
+ file /opt/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-pkg-config:
+
+ #!/bin/sh
+ SYSROOT=$(dirname ${0%/*})/sysroot
+ export PKG_CONFIG_DIR=
+ export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/local/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
+ export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
+ exec pkg-config "$@"
+
+ also create a copy or symlink with name arm-unknown-linux-androideabi-pkg-config.
CROSS COMPILE
=============
+
(This section was graciously brought to us by Jim Duey, with additions by
Dan Fandrich)
@@ -834,9 +933,9 @@
./configure --host=ARCH-OS
-
REDUCING SIZE
=============
+
There are a number of configure options that can be used to reduce the
size of libcurl for embedded applications where binary size is an
important factor. First, be sure to set the CFLAGS variable when
@@ -865,14 +964,17 @@
--disable-verbose (eliminates debugging strings and error code strings)
--enable-hidden-symbols (eliminates unneeded symbols in the shared library)
--without-libidn (disables support for the libidn DNS library)
+ --without-librtmp (disables support for RTMP)
--without-ssl (disables support for SSL/TLS)
--without-zlib (disables support for on-the-fly decompression)
The GNU compiler and linker have a number of options that can reduce the
size of the libcurl dynamic libraries on some platforms even further.
Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
- configure command-line:
- CFLAGS="-ffunction-sections -fdata-sections" \
+ configure command-line, e.g.
+
+ CFLAGS="-Os -ffunction-sections -fdata-sections \
+ -fno-unwind-tables -fno-asynchronous-unwind-tables" \
LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
Be sure also to strip debugging symbols from your binaries after
@@ -882,9 +984,9 @@
.comment section).
Using these techniques it is possible to create a basic HTTP-only shared
- libcurl library for i386 Linux platforms that is only 98 KiB in size, and
- an FTP-only library that is 94 KiB in size (as of libcurl version 7.20.0,
- using gcc 4.3.3).
+ libcurl library for i386 Linux platforms that is only 114 KiB in size, and
+ an FTP-only library that is 115 KiB in size (as of libcurl version 7.35.0,
+ using gcc 4.8.2).
You may find that statically linking libcurl to your application will
result in a lower total size than dynamically linking.
@@ -896,13 +998,12 @@
command line. Following is a list of appropriate key words:
--disable-cookies !cookies
- --disable-crypto-auth !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth
--disable-manual !--manual
--disable-proxy !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
-
PORTS
=====
+
This is a probably incomplete list of known hardware and operating systems
that curl has been compiled for. If you know a system curl compiles and
runs on, that isn't listed, please let us know!
@@ -916,9 +1017,9 @@
- Alpha OpenVMS V7.1-1H2
- Alpha Tru64 v5.0 5.1
- AVR32 Linux
- - ARM Android 1.5, 2.1
+ - ARM Android 1.5, 2.1, 2.3, 3.2, 4.x
- ARM INTEGRITY
- - ARM iPhone OS
+ - ARM iOS
- Cell Linux
- Cell Cell OS
- HP-PA HP-UX 9.X 10.X 11.X
@@ -956,6 +1057,7 @@
- i386 HURD
- i386 Haiku OS
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
+ - i386 Mac OS X
- i386 MINIX 3.1
- i386 NetBSD
- i386 Novell NetWare
@@ -980,17 +1082,22 @@
Useful URLs
===========
-c-ares http://daniel.haxx.se/projects/c-ares/license.html
-GNU GSS http://www.gnu.org/software/gss/
-GnuTLS http://www.gnu.org/software/gnutls/
-Heimdal http://www.pdc.kth.se/heimdal/
-libidn http://www.gnu.org/software/libidn/
-libssh2 http://www.libssh2.org
-MingW http://www.mingw.org
+axTLS http://axtls.sourceforge.net/
+c-ares http://c-ares.haxx.se/
+GNU GSS https://www.gnu.org/software/gss/
+GnuTLS https://www.gnu.org/software/gnutls/
+Heimdal http://www.h5l.org/
+libidn https://www.gnu.org/software/libidn/
+libmetalink https://launchpad.net/libmetalink/
+libssh2 http://www.libssh2.org/
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
-NSS http://www.mozilla.org/projects/security/pki/nss/
-OpenLDAP http://www.openldap.org
-OpenSSL http://www.openssl.org
-PolarSSL http://polarssl.org
-yassl http://www.yassl.com/
-Zlib http://www.gzip.org/zlib/
+NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
+OpenLDAP http://www.openldap.org/
+OpenSSL https://www.openssl.org/
+PolarSSL https://tls.mbed.org/
+wolfSSL https://www.wolfssl.com/wolfSSL/
+Zlib http://www.zlib.net/
+
+MingW http://www.mingw.org/
+MinGW-w64 http://mingw-w64.sourceforge.net/
+OpenWatcom http://www.openwatcom.org/
diff --git a/docs/INSTALL.cmake b/docs/INSTALL.cmake
new file mode 100644
index 0000000..b2924e6
--- /dev/null
+++ b/docs/INSTALL.cmake
@@ -0,0 +1,100 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+ How To Compile with CMake
+
+Building with CMake
+==========================
+ This document describes how to compile, build and install curl and libcurl
+ from source code using the CMake build tool. To build with CMake, you will
+ of course have to first install CMake. The minimum required version of
+ CMake is specified in the file CMakeLists.txt found in the top of the curl
+ source tree. Once the correct version of CMake is installed you can follow
+ the instructions below for the platform you are building on.
+
+ CMake builds can be configured either from the command line, or from one
+ of CMake's GUI's.
+
+Current flaws in the curl CMake build
+=====================================
+
+ Missing features in the cmake build:
+
+ - Builds libcurl without large file support
+ - Can't select which SSL library to build with, only OpenSSL
+ - Doesn't build with SCP and SFTP support (libssh2)
+ - Doesn't allow different resolver backends (no c-ares build support)
+ - No RTMP support built
+ - Doesn't allow build curl and libcurl debug enabled
+ - Doesn't allow a custom CA bundle path
+ - Doesn't allow you to disable specific protocols from the build
+ - Doesn't find or use krb4 or GSS
+ - Rebuilds test files too eagerly, but still can't run the tests
+
+
+Important notice
+==================
+ If you got your curl sources from a distribution tarball, make sure to
+ delete the generic 'include/curl/curlbuild.h' file that comes with it:
+ rm -f curl/include/curl/curlbuild.h
+
+ The purpose of this file is to provide reasonable definitions for systems
+ where autoconfiguration is not available. CMake will create its own
+ version of this file in its build directory. If the "generic" version
+ is not deleted, weird build errors may occur on some systems.
+
+Command Line CMake
+==================
+ A CMake build of curl is similar to the autotools build of curl. It
+ consists of the following steps after you have unpacked the source.
+
+ 1. Create an out of source build tree parallel to the curl source
+ tree and change into that directory
+
+ $ mkdir curl-build
+ $ cd curl-build
+
+ 2. Run CMake from the build tree, giving it the path to the top of
+ the curl source tree. CMake will pick a compiler for you. If you
+ want to specify the compile, you can set the CC environment
+ variable prior to running CMake.
+
+ $ cmake ../curl
+ $ make
+
+ 3. Install to default location:
+
+ $ make install
+
+ (The test suite does not work with the cmake build)
+
+ccmake
+=========
+ CMake comes with a curses based interface called ccmake. To run ccmake on
+ a curl use the instructions for the command line cmake, but substitute
+ ccmake ../curl for cmake ../curl. This will bring up a curses interface
+ with instructions on the bottom of the screen. You can press the "c" key
+ to configure the project, and the "g" key to generate the project. After
+ the project is generated, you can run make.
+
+cmake-gui
+=========
+ CMake also comes with a Qt based GUI called cmake-gui. To configure with
+ cmake-gui, you run cmake-gui and follow these steps:
+ 1. Fill in the "Where is the source code" combo box with the path to
+ the curl source tree.
+ 2. Fill in the "Where to build the binaries" combo box with the path
+ to the directory for your build tree, ideally this should not be the
+ same as the source tree, but a parallel directory called curl-build or
+ something similar.
+ 3. Once the source and binary directories are specified, press the
+ "Configure" button.
+ 4. Select the native build tool that you want to use.
+ 5. At this point you can change any of the options presented in the
+ GUI. Once you have selected all the options you want, click the
+ "Generate" button.
+ 6. Run the native build tool that you used CMake to generate.
+
diff --git a/docs/INSTALL.devcpp b/docs/INSTALL.devcpp
index 7f58e4b..ee2d703 100644
--- a/docs/INSTALL.devcpp
+++ b/docs/INSTALL.devcpp
@@ -26,7 +26,7 @@
it comes to Windows O/S.
Secondly the help that does exist for the Windows O/S focused around mingw
-thru a command line argument environment.
+through a command line argument environment.
You may ask "Why is this a problem?"
@@ -95,7 +95,7 @@
check the following sites
http://aditsu.freeunixhost.com/dev-cpp-faq.html
-http://sourceforge.net/forum/message.php?msg_id=3252213
+https://sourceforge.net/p/dev-cpp/discussion/48211/thread/2a85ea46
As I have mentioned before I will confine this to the SSL Library compilations
but the process is very similar for compilation of the executable - curl.exe;
diff --git a/docs/INTERNALS b/docs/INTERNALS
index 9d0bdba..4cd63b4 100644
--- a/docs/INTERNALS
+++ b/docs/INTERNALS
@@ -1,27 +1,68 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
+Table of Contents
+=================
-INTERNALS
+ - [Intro](#intro)
+ - [git](#git)
+ - [Portability](#Portability)
+ - [Windows vs Unix](#winvsunix)
+ - [Library](#Library)
+ - [`Curl_connect`](#Curl_connect)
+ - [`Curl_do`](#Curl_do)
+ - [`Curl_readwrite`](#Curl_readwrite)
+ - [`Curl_done`](#Curl_done)
+ - [`Curl_disconnect`](#Curl_disconnect)
+ - [HTTP(S)](#http)
+ - [FTP](#ftp)
+ - [Kerberos](#kerberos)
+ - [TELNET](#telnet)
+ - [FILE](#file)
+ - [SMB](#smb)
+ - [LDAP](#ldap)
+ - [E-mail](#email)
+ - [General](#general)
+ - [Persistent Connections](#persistent)
+ - [multi interface/non-blocking](#multi)
+ - [SSL libraries](#ssl)
+ - [Library Symbols](#symbols)
+ - [Return Codes and Informationals](#returncodes)
+ - [AP/ABI](#abi)
+ - [Client](#client)
+ - [Memory Debugging](#memorydebug)
+ - [Test Suite](#test)
+ - [Asynchronous name resolves](#asyncdns)
+ - [c-ares](#cares)
+ - [`curl_off_t`](#curl_off_t)
+ - [curlx](#curlx)
+ - [Content Encoding](#contentencoding)
+ - [hostip.c explained](#hostip)
+ - [Track Down Memory Leaks](#memoryleak)
+ - [`multi_socket`](#multi_socket)
+ - [Structs in libcurl](#structs)
- The project is split in two. The library and the client. The client part uses
- the library, but the library is designed to allow other applications to use
- it.
+<a name="intro"></a>
+curl internals
+==============
+
+ This project is split in two. The library and the client. The client part
+ uses the library, but the library is designed to allow other applications to
+ use it.
The largest amount of code and complexity is in the library part.
-GIT
+
+<a name="git"></a>
+git
===
+
All changes to the sources are committed to the git repository as soon as
- they're somewhat verified to work. Changes shall be commited as independently
+ they're somewhat verified to work. Changes shall be committed as independently
as possible so that individual changes can be easier spotted and tracked
afterwards.
Tagging shall be used extensively, and by the time we release new archives we
should tag the sources with a name similar to the released version number.
+<a name="Portability"></a>
Portability
===========
@@ -33,45 +74,55 @@
want it to remain functional and buildable with these and later versions
(older versions may still work but is not what we work hard to maintain):
- OpenSSL 0.9.6
- GnuTLS 1.2
- zlib 1.1.4
- libssh2 0.16
- c-ares 1.6.0
- libidn 0.4.1
- *yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
- openldap 2.0
- MIT krb5 lib 1.2.4
- qsossl V5R2M0
- NSS 3.11.x
- Heimdal ?
+Dependencies
+------------
- * = only partly functional, but that's due to bugs in the third party lib, not
- because of libcurl code
+ - OpenSSL 0.9.7
+ - GnuTLS 1.2
+ - zlib 1.1.4
+ - libssh2 0.16
+ - c-ares 1.6.0
+ - libidn 0.4.1
+ - cyassl 2.0.0
+ - openldap 2.0
+ - MIT Kerberos 1.2.4
+ - GSKit V5R3M0
+ - NSS 3.14.x
+ - axTLS 1.2.7
+ - PolarSSL 1.3.0
+ - Heimdal ?
+ - nghttp2 1.0.0
+
+Operating Systems
+-----------------
On systems where configure runs, we aim at working on them all - if they have
a suitable C compiler. On systems that don't run configure, we strive to keep
curl running fine on:
- Windows 98
- AS/400 V5R2M0
- Symbian 9.1
- Windows CE ?
- TPF ?
+ - Windows 98
+ - AS/400 V5R3M0
+ - Symbian 9.1
+ - Windows CE ?
+ - TPF ?
+
+Build tools
+-----------
When writing code (mostly for generating stuff included in release tarballs)
we use a few "build tools" and we make sure that we remain functional with
these versions:
- GNU Libtool 1.4.2
- GNU Autoconf 2.57
- GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
- GNU M4 1.4
- perl 4
- roffit 0.5
- groff ? (any version that supports "groff -Tps -man [in] [out]")
- ps2pdf (gs) ?
+ - GNU Libtool 1.4.2
+ - GNU Autoconf 2.57
+ - GNU Automake 1.7
+ - GNU M4 1.4
+ - perl 5.004
+ - roffit 0.5
+ - groff ? (any version that supports "groff -Tps -man [in] [out]")
+ - ps2pdf (gs) ?
+<a name="winvsunix"></a>
Windows vs Unix
===============
@@ -86,11 +137,12 @@
2. Windows requires a couple of init calls for the socket stuff.
- That's taken care of by the curl_global_init() call, but if other libs also
- do it etc there might be reasons for applications to alter that behaviour.
+ That's taken care of by the `curl_global_init()` call, but if other libs
+ also do it etc there might be reasons for applications to alter that
+ behaviour.
3. The file descriptors for network communication and file operations are
- not easily interchangable as in unix.
+ not easily interchangeable as in unix.
We avoid this by not trying any funny tricks on file descriptors.
@@ -100,25 +152,29 @@
We set stdout to binary under windows
- Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
+ Inside the source code, We make an effort to avoid `#ifdef [Your OS]`. All
conditionals that deal with features *should* instead be in the format
- '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
- we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
- are supposed to look exactly as a curl_config.h file would have looked like on
- a Windows machine!
+ `#ifdef HAVE_THAT_WEIRD_FUNCTION`. Since Windows can't run configure scripts,
+ we maintain a `curl_config-win32.h` file in lib directory that is supposed to
+ look exactly as a `curl_config.h` file would have looked like on a Windows
+ machine!
Generally speaking: always remember that this will be compiled on dozens of
operating systems. Don't walk on the edge.
+<a name="Library"></a>
Library
=======
+ (See `LIBCURL-STRUCTS` for a separate document describing all major internal
+ structs and their purposes.)
+
There are plenty of entry points to the library, namely each publicly defined
function that libcurl offers to applications. All of those functions are
- rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are
+ rather small and easy-to-follow. All the ones prefixed with `curl_easy` are
put in the lib/easy.c file.
- curl_global_init_() and curl_global_cleanup() should be called by the
+ `curl_global_init_()` and `curl_global_cleanup()` should be called by the
application to initialize and clean up global stuff in the library. As of
today, it can handle the global SSL initing if SSL is enabled and it can init
the socket layer on windows machines. libcurl itself has no "global" scope.
@@ -126,52 +182,56 @@
All printf()-style functions use the supplied clones in lib/mprintf.c. This
makes sure we stay absolutely platform independent.
- curl_easy_init() allocates an internal struct and makes some initializations.
- The returned handle does not reveal internals. This is the 'SessionHandle'
- struct which works as an "anchor" struct for all curl_easy functions. All
- connections performed will get connect-specific data allocated that should be
- used for things related to particular connections/requests.
+ [ `curl_easy_init()`][2] allocates an internal struct and makes some
+ initializations. The returned handle does not reveal internals. This is the
+ 'SessionHandle' struct which works as an "anchor" struct for all `curl_easy`
+ functions. All connections performed will get connect-specific data allocated
+ that should be used for things related to particular connections/requests.
- curl_easy_setopt() takes three arguments, where the option stuff must be
- passed in pairs: the parameter-ID and the parameter-value. The list of
+ [`curl_easy_setopt()`][1] takes three arguments, where the option stuff must
+ be passed in pairs: the parameter-ID and the parameter-value. The list of
options is documented in the man page. This function mainly sets things in
the 'SessionHandle' struct.
- curl_easy_perform() does a whole lot of things:
+ `curl_easy_perform()` is just a wrapper function that makes use of the multi
+ API. It basically calls `curl_multi_init()`, `curl_multi_add_handle()`,
+ `curl_multi_wait()`, and `curl_multi_perform()` until the transfer is done
+ and then returns.
- It starts off in the lib/easy.c file by calling Curl_perform() and the main
- work then continues in lib/url.c. The flow continues with a call to
- Curl_connect() to connect to the remote site.
+ Some of the most important key functions in url.c are called from multi.c
+ when certain key steps are to be made in the transfer operation.
- o Curl_connect()
+<a name="Curl_connect"></a>
+Curl_connect()
+--------------
- ... analyzes the URL, it separates the different components and connects to
- the remote host. This may involve using a proxy and/or using SSL. The
- Curl_resolv() function in lib/hostip.c is used for looking up host names
+ Analyzes the URL, it separates the different components and connects to the
+ remote host. This may involve using a proxy and/or using SSL. The
+ `Curl_resolv()` function in lib/hostip.c is used for looking up host names
(it does then use the proper underlying method, which may vary between
platforms and builds).
- When Curl_connect is done, we are connected to the remote site. Then it is
- time to tell the server to get a document/file. Curl_do() arranges this.
+ When `Curl_connect` is done, we are connected to the remote site. Then it
+ is time to tell the server to get a document/file. `Curl_do()` arranges
+ this.
This function makes sure there's an allocated and initiated 'connectdata'
struct that is used for this particular connection only (although there may
be several requests performed on the same connect). A bunch of things are
inited/inherited from the SessionHandle struct.
- o Curl_do()
+<a name="Curl_do"></a>
+Curl_do()
+---------
- Curl_do() makes sure the proper protocol-specific function is called. The
- functions are named after the protocols they handle. Curl_ftp(),
- Curl_http(), Curl_dict(), etc. They all reside in their respective files
- (ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by
- Curl_ftp().
+ `Curl_do()` makes sure the proper protocol-specific function is called. The
+ functions are named after the protocols they handle.
The protocol-specific functions of course deal with protocol-specific
- negotiations and setup. They have access to the Curl_sendf() (from
+ negotiations and setup. They have access to the `Curl_sendf()` (from
lib/sendf.c) function to send printf-style formatted data to the remote
host and when they're ready to make the actual file transfer they call the
- Curl_Transfer() function (in lib/transfer.c) to setup the transfer and
+ `Curl_Transfer()` function (in lib/transfer.c) to setup the transfer and
returns.
If this DO function fails and the connection is being re-used, libcurl will
@@ -180,64 +240,48 @@
we have discovered a dead connection before the DO function and thus we
might wrongly be re-using a connection that was closed by the remote peer.
- Some time during the DO function, the Curl_setup_transfer() function must
+ Some time during the DO function, the `Curl_setup_transfer()` function must
be called with some basic info about the upcoming transfer: what socket(s)
- to read/write and the expected file tranfer sizes (if known).
+ to read/write and the expected file transfer sizes (if known).
- o Transfer()
+<a name="Curl_readwrite"></a>
+Curl_readwrite()
+----------------
- Curl_perform() then calls Transfer() in lib/transfer.c that performs the
- entire file transfer.
+ Called during the transfer of the actual protocol payload.
During transfer, the progress functions in lib/progress.c are called at a
frequent interval (or at the user's choice, a specified callback might get
called). The speedcheck functions in lib/speedcheck.c are also used to
verify that the transfer is as fast as required.
- o Curl_done()
+<a name="Curl_done"></a>
+Curl_done()
+-----------
Called after a transfer is done. This function takes care of everything
that has to be done after a transfer. This function attempts to leave
- matters in a state so that Curl_do() should be possible to call again on
+ matters in a state so that `Curl_do()` should be possible to call again on
the same connection (in a persistent connection case). It might also soon
- be closed with Curl_disconnect().
+ be closed with `Curl_disconnect()`.
- o Curl_disconnect()
+<a name="Curl_disconnect"></a>
+Curl_disconnect()
+-----------------
When doing normal connections and transfers, no one ever tries to close any
- connections so this is not normally called when curl_easy_perform() is
+ connections so this is not normally called when `curl_easy_perform()` is
used. This function is only used when we are certain that no more transfers
is going to be made on the connection. It can be also closed by force, or
it can be called to make sure that libcurl doesn't keep too many
- connections alive at the same time (there's a default amount of 5 but that
- can be changed with the CURLOPT_MAXCONNECTS option).
+ connections alive at the same time.
This function cleans up all resources that are associated with a single
connection.
- Curl_perform() is the function that does the main "connect - do - transfer -
- done" loop. It loops if there's a Location: to follow.
-
- When completed, the curl_easy_cleanup() should be called to free up used
- resources. It runs Curl_disconnect() on all open connectons.
-
- A quick roundup on internal function sequences (many of these call
- protocol-specific function-pointers):
-
- curl_connect - connects to a remote site and does initial connect fluff
- This also checks for an existing connection to the requested site and uses
- that one if it is possible.
-
- curl_do - starts a transfer
- curl_transfer() - transfers data
- curl_done - ends a transfer
-
- curl_disconnect - disconnects from a remote site. This is called when the
- disconnect is really requested, which doesn't necessarily have to be
- exactly after curl_done in case we want to keep the connection open for
- a while.
-
- HTTP(S)
+<a name="http"></a>
+HTTP(S)
+=======
HTTP offers a lot and is the protocol in curl that uses the most lines of
code. There is a special file (lib/formdata.c) that offers all the multipart
@@ -249,116 +293,142 @@
HTTPS uses in almost every means the same procedure as HTTP, with only two
exceptions: the connect procedure is different and the function used to read
or write from the socket is different, although the latter fact is hidden in
- the source by the use of curl_read() for reading and curl_write() for writing
- data to the remote server.
+ the source by the use of `Curl_read()` for reading and `Curl_write()` for
+ writing data to the remote server.
- http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
+ `http_chunks.c` contains functions that understands HTTP 1.1 chunked transfer
encoding.
- An interesting detail with the HTTP(S) request, is the add_buffer() series of
- functions we use. They append data to one single buffer, and when the
- building is done the entire request is sent off in one single write. This is
- done this way to overcome problems with flawed firewalls and lame servers.
+ An interesting detail with the HTTP(S) request, is the `Curl_add_buffer()`
+ series of functions we use. They append data to one single buffer, and when
+ the building is done the entire request is sent off in one single write. This
+ is done this way to overcome problems with flawed firewalls and lame servers.
- FTP
+<a name="ftp"></a>
+FTP
+===
- The Curl_if2ip() function can be used for getting the IP number of a
+ The `Curl_if2ip()` function can be used for getting the IP number of a
specified network interface, and it resides in lib/if2ip.c.
- Curl_ftpsendf() is used for sending FTP commands to the remote server. It was
- made a separate function to prevent us programmers from forgetting that they
- must be CRLF terminated. They must also be sent in one single write() to make
- firewalls and similar happy.
+ `Curl_ftpsendf()` is used for sending FTP commands to the remote server. It
+ was made a separate function to prevent us programmers from forgetting that
+ they must be CRLF terminated. They must also be sent in one single write() to
+ make firewalls and similar happy.
- Kerberos
+<a name="kerberos"></a>
+Kerberos
+--------
- The kerberos support is mainly in lib/krb4.c and lib/security.c.
+ Kerberos support is mainly in lib/krb5.c and lib/security.c but also
+ `curl_sasl_sspi.c` and `curl_sasl_gssapi.c` for the email protocols and
+ `socks_gssapi.c` and `socks_sspi.c` for SOCKS5 proxy specifics.
- TELNET
+<a name="telnet"></a>
+TELNET
+======
Telnet is implemented in lib/telnet.c.
- FILE
+<a name="file"></a>
+FILE
+====
The file:// protocol is dealt with in lib/file.c.
- LDAP
+<a name="smb"></a>
+SMB
+===
- Everything LDAP is in lib/ldap.c.
+ The smb:// protocol is dealt with in lib/smb.c.
- GENERAL
+<a name="ldap"></a>
+LDAP
+====
+
+ Everything LDAP is in lib/ldap.c and lib/openldap.c
+
+<a name="email"></a>
+E-mail
+======
+
+ The e-mail related source code is in lib/imap.c, lib/pop3.c and lib/smtp.c.
+
+<a name="general"></a>
+General
+=======
URL encoding and decoding, called escaping and unescaping in the source code,
is found in lib/escape.c.
- While transfering data in Transfer() a few functions might get used.
- curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
+ While transferring data in Transfer() a few functions might get used.
+ `curl_getdate()` in lib/parsedate.c is for HTTP date comparisons (and more).
- lib/getenv.c offers curl_getenv() which is for reading environment variables
- in a neat platform independent way. That's used in the client, but also in
- lib/url.c when checking the proxy environment variables. Note that contrary
- to the normal unix getenv(), this returns an allocated buffer that must be
- free()ed after use.
+ lib/getenv.c offers `curl_getenv()` which is for reading environment
+ variables in a neat platform independent way. That's used in the client, but
+ also in lib/url.c when checking the proxy environment variables. Note that
+ contrary to the normal unix getenv(), this returns an allocated buffer that
+ must be free()ed after use.
lib/netrc.c holds the .netrc parser
lib/timeval.c features replacement functions for systems that don't have
- gettimeofday() and a few support functions for timeval convertions.
+ gettimeofday() and a few support functions for timeval conversions.
- A function named curl_version() that returns the full curl version string is
- found in lib/version.c.
+ A function named `curl_version()` that returns the full curl version string
+ is found in lib/version.c.
+<a name="persistent"></a>
Persistent Connections
======================
The persistent connection support in libcurl requires some considerations on
how to do things inside of the library.
- o The 'SessionHandle' struct returned in the curl_easy_init() call must never
- hold connection-oriented data. It is meant to hold the root data as well as
- all the options etc that the library-user may choose.
- o The 'SessionHandle' struct holds the "connection cache" (an array of
- pointers to 'connectdata' structs). There's one connectdata struct
- allocated for each connection that libcurl knows about. Note that when you
- use the multi interface, the multi handle will hold the connection cache
- and not the particular easy handle. This of course to allow all easy handles
- in a multi stack to be able to share and re-use connections.
- o This enables the 'curl handle' to be reused on subsequent transfers.
- o When we are about to perform a transfer with curl_easy_perform(), we first
- check for an already existing connection in the cache that we can use,
- otherwise we create a new one and add to the cache. If the cache is full
- already when we add a new connection, we close one of the present ones. We
- select which one to close dependent on the close policy that may have been
- previously set.
- o When the transfer operation is complete, we try to leave the connection
- open. Particular options may tell us not to, and protocols may signal
- closure on connections and then we don't keep it open of course.
- o When curl_easy_cleanup() is called, we close all still opened connections,
+ - The 'SessionHandle' struct returned in the [`curl_easy_init()`][2] call
+ must never hold connection-oriented data. It is meant to hold the root data
+ as well as all the options etc that the library-user may choose.
+
+ - The 'SessionHandle' struct holds the "connection cache" (an array of
+ pointers to 'connectdata' structs).
+
+ - This enables the 'curl handle' to be reused on subsequent transfers.
+
+ - When libcurl is told to perform a transfer, it first checks for an already
+ existing connection in the cache that we can use. Otherwise it creates a
+ new one and adds that the cache. If the cache is full already when a new
+ connection is added added, it will first close the oldest unused one.
+
+ - When the transfer operation is complete, the connection is left
+ open. Particular options may tell libcurl not to, and protocols may signal
+ closure on connections and then they won't be kept open of course.
+
+ - When `curl_easy_cleanup()` is called, we close all still opened connections,
unless of course the multi interface "owns" the connections.
- You do realize that the curl handle must be re-used in order for the
- persistent connections to work.
+ The curl handle must be re-used in order for the persistent connections to
+ work.
+<a name="multi"></a>
multi interface/non-blocking
============================
- We make an effort to provide a non-blocking interface to the library, the
- multi interface. To make that interface work as good as possible, no
- low-level functions within libcurl must be written to work in a blocking
- manner.
+ The multi interface is a non-blocking interface to the library. To make that
+ interface work as good as possible, no low-level functions within libcurl
+ must be written to work in a blocking manner. (There are still a few spots
+ violating this rule.)
One of the primary reasons we introduced c-ares support was to allow the name
resolve phase to be perfectly non-blocking as well.
- The ultimate goal is to provide the easy interface simply by wrapping the
- multi interface functions and thus treat everything internally as the multi
- interface is the single interface we have.
+ The FTP and the SFTP/SCP protocols are examples of how we adapt and adjust
+ the code to allow non-blocking operations even on multi-stage command-
+ response protocols. They are built around state machines that return when
+ they would otherwise block waiting for data. The DICT, LDAP and TELNET
+ protocols are crappy examples and they are subject for rewrite in the future
+ to better fit the libcurl protocol family.
- The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
- and adjust the code to allow non-blocking operations even on multi-stage
- protocols. The DICT, LDAP and TELNET are crappy examples and they are subject
- for rewrite in the future to better fit the libcurl protocol family.
-
+<a name="ssl"></a>
SSL libraries
=============
@@ -368,34 +438,39 @@
in future libcurl versions.
To deal with this internally in the best way possible, we have a generic SSL
- function API as provided by the sslgen.[ch] system, and they are the only SSL
- functions we must use from within libcurl. sslgen is then crafted to use the
- appropriate lower-level function calls to whatever SSL library that is in
- use.
+ function API as provided by the vtls/vtls.[ch] system, and they are the only
+ SSL functions we must use from within libcurl. vtls is then crafted to use
+ the appropriate lower-level function calls to whatever SSL library that is in
+ use. For example vtls/openssl.[ch] for the OpenSSL library.
+<a name="symbols"></a>
Library Symbols
===============
- All symbols used internally in libcurl must use a 'Curl_' prefix if they're
+ All symbols used internally in libcurl must use a `Curl_` prefix if they're
used in more than a single file. Single-file symbols must be made static.
- Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
- but they are to be changed to follow this pattern in future versions.)
+ Public ("exported") symbols must use a `curl_` prefix. (There are exceptions,
+ but they are to be changed to follow this pattern in future versions.) Public
+ API functions are marked with `CURL_EXTERN` in the public header files so
+ that all others can be hidden on platforms where this is possible.
+<a name="returncodes"></a>
Return Codes and Informationals
===============================
I've made things simple. Almost every function in libcurl returns a CURLcode,
- that must be CURLE_OK if everything is OK or otherwise a suitable error code
- as the curl/curl.h include file defines. The very spot that detects an error
- must use the Curl_failf() function to set the human-readable error
+ that must be `CURLE_OK` if everything is OK or otherwise a suitable error
+ code as the curl/curl.h include file defines. The very spot that detects an
+ error must use the `Curl_failf()` function to set the human-readable error
description.
In aiding the user to understand what's happening and to debug curl usage, we
- must supply a fair amount of informational messages by using the Curl_infof()
- function. Those messages are only displayed when the user explicitly asks for
- them. They are best used when revealing information that isn't otherwise
- obvious.
+ must supply a fair amount of informational messages by using the
+ `Curl_infof()` function. Those messages are only displayed when the user
+ explicitly asks for them. They are best used when revealing information that
+ isn't otherwise obvious.
+<a name="abi"></a>
API/ABI
=======
@@ -403,29 +478,31 @@
that makes it easier to keep a solid API/ABI over time. See docs/libcurl/ABI
for our promise to users.
+<a name="client"></a>
Client
======
- main() resides in src/main.c together with most of the client code.
+ main() resides in `src/tool_main.c`.
- src/hugehelp.c is automatically generated by the mkhelp.pl perl script to
- display the complete "manual" and the src/urlglob.c file holds the functions
- used for the URL-"globbing" support. Globbing in the sense that the {} and []
- expansion stuff is there.
+ `src/tool_hugehelp.c` is automatically generated by the mkhelp.pl perl script
+ to display the complete "manual" and the src/tool_urlglob.c file holds the
+ functions used for the URL-"globbing" support. Globbing in the sense that the
+ {} and [] expansion stuff is there.
The client mostly messes around to setup its 'config' struct properly, then
- it calls the curl_easy_*() functions of the library and when it gets back
- control after the curl_easy_perform() it cleans up the library, checks status
- and exits.
+ it calls the `curl_easy_*()` functions of the library and when it gets back
+ control after the `curl_easy_perform()` it cleans up the library, checks
+ status and exits.
When the operation is done, the ourWriteOut() function in src/writeout.c may
be called to report about the operation. That function is using the
- curl_easy_getinfo() function to extract useful information from the curl
+ `curl_easy_getinfo()` function to extract useful information from the curl
session.
- Recent versions may loop and do all this several times if many URLs were
- specified on the command line or config file.
+ It may loop and do all this several times if many URLs were specified on the
+ command line or config file.
+<a name="memorydebug"></a>
Memory Debugging
================
@@ -455,34 +532,564 @@
the configure script. When --enable-debug is given both features will be
enabled, unless some restriction prevents memory tracking from being used.
+<a name="test"></a>
Test Suite
==========
- Since November 2000, a test suite has evolved. It is placed in its own
- subdirectory directly off the root in the curl archive tree, and it contains
- a bunch of scripts and a lot of test case data.
+ The test suite is placed in its own subdirectory directly off the root in the
+ curl archive tree, and it contains a bunch of scripts and a lot of test case
+ data.
- The main test script is runtests.pl that will invoke the two servers
+ The main test script is runtests.pl that will invoke test servers like
httpserver.pl and ftpserver.pl before all the test cases are performed. The
test suite currently only runs on unix-like platforms.
- You'll find a complete description of the test case data files in the
- tests/README file.
+ You'll find a description of the test suite in the tests/README file, and the
+ test case data files in the tests/FILEFORMAT file.
The test suite automatically detects if curl was built with the memory
- debugging enabled, and if it was it will detect memory leaks too.
+ debugging enabled, and if it was it will detect memory leaks, too.
-Building Releases
-=================
+<a name="asyncdns"></a>
+Asynchronous name resolves
+==========================
- There's no magic to this. When you consider everything stable enough to be
- released, run the 'maketgz' script (using 'make distcheck' will give you a
- pretty good view on the status of the current sources). maketgz prompts for
- version number of the client and the library before it creates a release
- archive. maketgz uses 'make dist' for the actual archive building, why you
- need to fill in the Makefile.am files properly for which files that should
- be included in the release archives.
+ libcurl can be built to do name resolves asynchronously, using either the
+ normal resolver in a threaded manner or by using c-ares.
- NOTE: you need to have curl checked out from git to be able to do a proper
- release build. The release tarballs do not have everything setup in order to
- do releases properly.
+<a name="cares"></a>
+[c-ares][3]
+------
+
+### Build libcurl to use a c-ares
+
+1. ./configure --enable-ares=/path/to/ares/install
+2. make
+
+### c-ares on win32
+
+ First I compiled c-ares. I changed the default C runtime library to be the
+ single-threaded rather than the multi-threaded (this seems to be required to
+ prevent linking errors later on). Then I simply build the areslib project
+ (the other projects adig/ahost seem to fail under MSVC).
+
+ Next was libcurl. I opened lib/config-win32.h and I added a:
+ `#define USE_ARES 1`
+
+ Next thing I did was I added the path for the ares includes to the include
+ path, and the libares.lib to the libraries.
+
+ Lastly, I also changed libcurl to be single-threaded rather than
+ multi-threaded, again this was to prevent some duplicate symbol errors. I'm
+ not sure why I needed to change everything to single-threaded, but when I
+ didn't I got redefinition errors for several CRT functions (malloc, stricmp,
+ etc.)
+
+<a name="curl_off_t"></a>
+`curl_off_t`
+==========
+
+ curl_off_t is a data type provided by the external libcurl include
+ headers. It is the type meant to be used for the [`curl_easy_setopt()`][1]
+ options that end with LARGE. The type is 64bit large on most modern
+ platforms.
+
+curlx
+=====
+
+ The libcurl source code offers a few functions by source only. They are not
+ part of the official libcurl API, but the source files might be useful for
+ others so apps can optionally compile/build with these sources to gain
+ additional functions.
+
+ We provide them through a single header file for easy access for apps:
+ "curlx.h"
+
+`curlx_strtoofft()`
+-------------------
+ A macro that converts a string containing a number to a curl_off_t number.
+ This might use the curlx_strtoll() function which is provided as source
+ code in strtoofft.c. Note that the function is only provided if no
+ strtoll() (or equivalent) function exist on your platform. If curl_off_t
+ is only a 32 bit number on your platform, this macro uses strtol().
+
+`curlx_tvnow()`
+---------------
+ returns a struct timeval for the current time.
+
+`curlx_tvdiff()`
+--------------
+ returns the difference between two timeval structs, in number of
+ milliseconds.
+
+`curlx_tvdiff_secs()`
+---------------------
+ returns the same as curlx_tvdiff but with full usec resolution (as a
+ double)
+
+Future
+------
+
+ Several functions will be removed from the public curl_ name space in a
+ future libcurl release. They will then only become available as curlx_
+ functions instead. To make the transition easier, we already today provide
+ these functions with the curlx_ prefix to allow sources to get built properly
+ with the new function names. The functions this concerns are:
+
+ - `curlx_getenv`
+ - `curlx_strequal`
+ - `curlx_strnequal`
+ - `curlx_mvsnprintf`
+ - `curlx_msnprintf`
+ - `curlx_maprintf`
+ - `curlx_mvaprintf`
+ - `curlx_msprintf`
+ - `curlx_mprintf`
+ - `curlx_mfprintf`
+ - `curlx_mvsprintf`
+ - `curlx_mvprintf`
+ - `curlx_mvfprintf`
+
+<a name="contentencoding"></a>
+Content Encoding
+================
+
+## About content encodings
+
+ [HTTP/1.1][4] specifies that a client may request that a server encode its
+ response. This is usually used to compress a response using one of a set of
+ commonly available compression techniques. These schemes are 'deflate' (the
+ zlib algorithm), 'gzip' and 'compress'. A client requests that the sever
+ perform an encoding by including an Accept-Encoding header in the request
+ document. The value of the header should be one of the recognized tokens
+ 'deflate', ... (there's a way to register new schemes/tokens, see sec 3.5 of
+ the spec). A server MAY honor the client's encoding request. When a response
+ is encoded, the server includes a Content-Encoding header in the
+ response. The value of the Content-Encoding header indicates which scheme was
+ used to encode the data.
+
+ A client may tell a server that it can understand several different encoding
+ schemes. In this case the server may choose any one of those and use it to
+ encode the response (indicating which one using the Content-Encoding header).
+ It's also possible for a client to attach priorities to different schemes so
+ that the server knows which it prefers. See sec 14.3 of RFC 2616 for more
+ information on the Accept-Encoding header.
+
+## Supported content encodings
+
+ The 'deflate' and 'gzip' content encoding are supported by libcurl. Both
+ regular and chunked transfers work fine. The zlib library is required for
+ this feature.
+
+## The libcurl interface
+
+ To cause libcurl to request a content encoding use:
+
+ [`curl_easy_setopt`][1](curl, [`CURLOPT_ACCEPT_ENCODING`][5], string)
+
+ where string is the intended value of the Accept-Encoding header.
+
+ Currently, libcurl only understands how to process responses that use the
+ "deflate" or "gzip" Content-Encoding, so the only values for
+ [`CURLOPT_ACCEPT_ENCODING`][5] that will work (besides "identity," which does
+ nothing) are "deflate" and "gzip" If a response is encoded using the
+ "compress" or methods, libcurl will return an error indicating that the
+ response could not be decoded. If <string> is NULL no Accept-Encoding header
+ is generated. If <string> is a zero-length string, then an Accept-Encoding
+ header containing all supported encodings will be generated.
+
+ The [`CURLOPT_ACCEPT_ENCODING`][5] must be set to any non-NULL value for
+ content to be automatically decoded. If it is not set and the server still
+ sends encoded content (despite not having been asked), the data is returned
+ in its raw form and the Content-Encoding type is not checked.
+
+## The curl interface
+
+ Use the [--compressed][6] option with curl to cause it to ask servers to
+ compress responses using any format supported by curl.
+
+<a name="hostip"></a>
+hostip.c explained
+==================
+
+ The main compile-time defines to keep in mind when reading the host*.c source
+ file are these:
+
+## `CURLRES_IPV6`
+
+ this host has getaddrinfo() and family, and thus we use that. The host may
+ not be able to resolve IPv6, but we don't really have to take that into
+ account. Hosts that aren't IPv6-enabled have CURLRES_IPV4 defined.
+
+## `CURLRES_ARES`
+
+ is defined if libcurl is built to use c-ares for asynchronous name
+ resolves. This can be Windows or *nix.
+
+## `CURLRES_THREADED`
+
+ is defined if libcurl is built to use threading for asynchronous name
+ resolves. The name resolve will be done in a new thread, and the supported
+ asynch API will be the same as for ares-builds. This is the default under
+ (native) Windows.
+
+ If any of the two previous are defined, `CURLRES_ASYNCH` is defined too. If
+ libcurl is not built to use an asynchronous resolver, `CURLRES_SYNCH` is
+ defined.
+
+## host*.c sources
+
+ The host*.c sources files are split up like this:
+
+ - hostip.c - method-independent resolver functions and utility functions
+ - hostasyn.c - functions for asynchronous name resolves
+ - hostsyn.c - functions for synchronous name resolves
+ - asyn-ares.c - functions for asynchronous name resolves using c-ares
+ - asyn-thread.c - functions for asynchronous name resolves using threads
+ - hostip4.c - IPv4 specific functions
+ - hostip6.c - IPv6 specific functions
+
+ The hostip.h is the single united header file for all this. It defines the
+ `CURLRES_*` defines based on the config*.h and curl_setup.h defines.
+
+<a name="memoryleak"></a>
+Track Down Memory Leaks
+=======================
+
+## Single-threaded
+
+ Please note that this memory leak system is not adjusted to work in more
+ than one thread. If you want/need to use it in a multi-threaded app. Please
+ adjust accordingly.
+
+
+## Build
+
+ Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with
+ --enable-debug fixes this). 'make clean' first, then 'make' so that all
+ files actually are rebuilt properly. It will also make sense to build
+ libcurl with the debug option (usually -g to the compiler) so that debugging
+ it will be easier if you actually do find a leak in the library.
+
+ This will create a library that has memory debugging enabled.
+
+## Modify Your Application
+
+ Add a line in your application code:
+
+ `curl_memdebug("dump");`
+
+ This will make the malloc debug system output a full trace of all resource
+ using functions to the given file name. Make sure you rebuild your program
+ and that you link with the same libcurl you built for this purpose as
+ described above.
+
+## Run Your Application
+
+ Run your program as usual. Watch the specified memory trace file grow.
+
+ Make your program exit and use the proper libcurl cleanup functions etc. So
+ that all non-leaks are returned/freed properly.
+
+## Analyze the Flow
+
+ Use the tests/memanalyze.pl perl script to analyze the dump file:
+
+ tests/memanalyze.pl dump
+
+ This now outputs a report on what resources that were allocated but never
+ freed etc. This report is very fine for posting to the list!
+
+ If this doesn't produce any output, no leak was detected in libcurl. Then
+ the leak is mostly likely to be in your code.
+
+<a name="multi_socket"></a>
+`multi_socket`
+==============
+
+ Implementation of the `curl_multi_socket` API
+
+ The main ideas of this API are simply:
+
+ 1 - The application can use whatever event system it likes as it gets info
+ from libcurl about what file descriptors libcurl waits for what action
+ on. (The previous API returns `fd_sets` which is very select()-centric).
+
+ 2 - When the application discovers action on a single socket, it calls
+ libcurl and informs that there was action on this particular socket and
+ libcurl can then act on that socket/transfer only and not care about
+ any other transfers. (The previous API always had to scan through all
+ the existing transfers.)
+
+ The idea is that [`curl_multi_socket_action()`][7] calls a given callback
+ with information about what socket to wait for what action on, and the
+ callback only gets called if the status of that socket has changed.
+
+ We also added a timer callback that makes libcurl call the application when
+ the timeout value changes, and you set that with [`curl_multi_setopt()`][9]
+ and the [`CURLMOPT_TIMERFUNCTION`][10] option. To get this to work,
+ Internally, there's an added a struct to each easy handle in which we store
+ an "expire time" (if any). The structs are then "splay sorted" so that we
+ can add and remove times from the linked list and yet somewhat swiftly
+ figure out both how long time there is until the next nearest timer expires
+ and which timer (handle) we should take care of now. Of course, the upside
+ of all this is that we get a [`curl_multi_timeout()`][8] that should also
+ work with old-style applications that use [`curl_multi_perform()`][11].
+
+ We created an internal "socket to easy handles" hash table that given
+ a socket (file descriptor) return the easy handle that waits for action on
+ that socket. This hash is made using the already existing hash code
+ (previously only used for the DNS cache).
+
+ To make libcurl able to report plain sockets in the socket callback, we had
+ to re-organize the internals of the [`curl_multi_fdset()`][12] etc so that
+ the conversion from sockets to `fd_sets` for that function is only done in
+ the last step before the data is returned. I also had to extend c-ares to
+ get a function that can return plain sockets, as that library too returned
+ only `fd_sets` and that is no longer good enough. The changes done to c-ares
+ are available in c-ares 1.3.1 and later.
+
+<a name="structs"></a>
+Structs in libcurl
+==================
+
+This section should cover 7.32.0 pretty accurately, but will make sense even
+for older and later versions as things don't change drastically that often.
+
+## SessionHandle
+
+ The SessionHandle handle struct is the one returned to the outside in the
+ external API as a "CURL *". This is usually known as an easy handle in API
+ documentations and examples.
+
+ Information and state that is related to the actual connection is in the
+ 'connectdata' struct. When a transfer is about to be made, libcurl will
+ either create a new connection or re-use an existing one. The particular
+ connectdata that is used by this handle is pointed out by
+ SessionHandle->easy_conn.
+
+ Data and information that regard this particular single transfer is put in
+ the SingleRequest sub-struct.
+
+ When the SessionHandle struct is added to a multi handle, as it must be in
+ order to do any transfer, the ->multi member will point to the `Curl_multi`
+ struct it belongs to. The ->prev and ->next members will then be used by the
+ multi code to keep a linked list of SessionHandle structs that are added to
+ that same multi handle. libcurl always uses multi so ->multi *will* point to
+ a `Curl_multi` when a transfer is in progress.
+
+ ->mstate is the multi state of this particular SessionHandle. When
+ `multi_runsingle()` is called, it will act on this handle according to which
+ state it is in. The mstate is also what tells which sockets to return for a
+ specific SessionHandle when [`curl_multi_fdset()`][12] is called etc.
+
+ The libcurl source code generally use the name 'data' for the variable that
+ points to the SessionHandle.
+
+ When doing multiplexed HTTP/2 transfers, each SessionHandle is associated
+ with an individual stream, sharing the same connectdata struct. Multiplexing
+ makes it even more important to keep things associated with the right thing!
+
+## connectdata
+
+ A general idea in libcurl is to keep connections around in a connection
+ "cache" after they have been used in case they will be used again and then
+ re-use an existing one instead of creating a new as it creates a significant
+ performance boost.
+
+ Each 'connectdata' identifies a single physical connection to a server. If
+ the connection can't be kept alive, the connection will be closed after use
+ and then this struct can be removed from the cache and freed.
+
+ Thus, the same SessionHandle can be used multiple times and each time select
+ another connectdata struct to use for the connection. Keep this in mind, as
+ it is then important to consider if options or choices are based on the
+ connection or the SessionHandle.
+
+ Functions in libcurl will assume that connectdata->data points to the
+ SessionHandle that uses this connection (for the moment).
+
+ As a special complexity, some protocols supported by libcurl require a
+ special disconnect procedure that is more than just shutting down the
+ socket. It can involve sending one or more commands to the server before
+ doing so. Since connections are kept in the connection cache after use, the
+ original SessionHandle may no longer be around when the time comes to shut
+ down a particular connection. For this purpose, libcurl holds a special
+ dummy `closure_handle` SessionHandle in the `Curl_multi` struct to use when
+ needed.
+
+ FTP uses two TCP connections for a typical transfer but it keeps both in
+ this single struct and thus can be considered a single connection for most
+ internal concerns.
+
+ The libcurl source code generally use the name 'conn' for the variable that
+ points to the connectdata.
+
+## Curl_multi
+
+ Internally, the easy interface is implemented as a wrapper around multi
+ interface functions. This makes everything multi interface.
+
+ `Curl_multi` is the multi handle struct exposed as "CURLM *" in external APIs.
+
+ This struct holds a list of SessionHandle structs that have been added to
+ this handle with [`curl_multi_add_handle()`][13]. The start of the list is
+ ->easyp and ->num_easy is a counter of added SessionHandles.
+
+ ->msglist is a linked list of messages to send back when
+ [`curl_multi_info_read()`][14] is called. Basically a node is added to that
+ list when an individual SessionHandle's transfer has completed.
+
+ ->hostcache points to the name cache. It is a hash table for looking up name
+ to IP. The nodes have a limited life time in there and this cache is meant
+ to reduce the time for when the same name is wanted within a short period of
+ time.
+
+ ->timetree points to a tree of SessionHandles, sorted by the remaining time
+ until it should be checked - normally some sort of timeout. Each
+ SessionHandle has one node in the tree.
+
+ ->sockhash is a hash table to allow fast lookups of socket descriptor to
+ which SessionHandle that uses that descriptor. This is necessary for the
+ `multi_socket` API.
+
+ ->conn_cache points to the connection cache. It keeps track of all
+ connections that are kept after use. The cache has a maximum size.
+
+ ->closure_handle is described in the 'connectdata' section.
+
+ The libcurl source code generally use the name 'multi' for the variable that
+ points to the Curl_multi struct.
+
+## Curl_handler
+
+ Each unique protocol that is supported by libcurl needs to provide at least
+ one `Curl_handler` struct. It defines what the protocol is called and what
+ functions the main code should call to deal with protocol specific issues.
+ In general, there's a source file named [protocol].c in which there's a
+ "struct `Curl_handler` `Curl_handler_[protocol]`" declared. In url.c there's
+ then the main array with all individual `Curl_handler` structs pointed to
+ from a single array which is scanned through when a URL is given to libcurl
+ to work with.
+
+ ->scheme is the URL scheme name, usually spelled out in uppercase. That's
+ "HTTP" or "FTP" etc. SSL versions of the protcol need its own `Curl_handler`
+ setup so HTTPS separate from HTTP.
+
+ ->setup_connection is called to allow the protocol code to allocate protocol
+ specific data that then gets associated with that SessionHandle for the rest
+ of this transfer. It gets freed again at the end of the transfer. It will be
+ called before the 'connectdata' for the transfer has been selected/created.
+ Most protocols will allocate its private 'struct [PROTOCOL]' here and assign
+ SessionHandle->req.protop to point to it.
+
+ ->connect_it allows a protocol to do some specific actions after the TCP
+ connect is done, that can still be considered part of the connection phase.
+
+ Some protocols will alter the connectdata->recv[] and connectdata->send[]
+ function pointers in this function.
+
+ ->connecting is similarly a function that keeps getting called as long as the
+ protocol considers itself still in the connecting phase.
+
+ ->do_it is the function called to issue the transfer request. What we call
+ the DO action internally. If the DO is not enough and things need to be kept
+ getting done for the entire DO sequence to complete, ->doing is then usually
+ also provided. Each protocol that needs to do multiple commands or similar
+ for do/doing need to implement their own state machines (see SCP, SFTP,
+ FTP). Some protocols (only FTP and only due to historical reasons) has a
+ separate piece of the DO state called `DO_MORE`.
+
+ ->doing keeps getting called while issuing the transfer request command(s)
+
+ ->done gets called when the transfer is complete and DONE. That's after the
+ main data has been transferred.
+
+ ->do_more gets called during the `DO_MORE` state. The FTP protocol uses this
+ state when setting up the second connection.
+
+ ->`proto_getsock`
+ ->`doing_getsock`
+ ->`domore_getsock`
+ ->`perform_getsock`
+ Functions that return socket information. Which socket(s) to wait for which
+ action(s) during the particular multi state.
+
+ ->disconnect is called immediately before the TCP connection is shutdown.
+
+ ->readwrite gets called during transfer to allow the protocol to do extra
+ reads/writes
+
+ ->defport is the default report TCP or UDP port this protocol uses
+
+ ->protocol is one or more bits in the `CURLPROTO_*` set. The SSL versions
+ have their "base" protocol set and then the SSL variation. Like
+ "HTTP|HTTPS".
+
+ ->flags is a bitmask with additional information about the protocol that will
+ make it get treated differently by the generic engine:
+
+ - `PROTOPT_SSL` - will make it connect and negotiate SSL
+
+ - `PROTOPT_DUAL` - this protocol uses two connections
+
+ - `PROTOPT_CLOSEACTION` - this protocol has actions to do before closing the
+ connection. This flag is no longer used by code, yet still set for a bunch
+ protocol handlers.
+
+ - `PROTOPT_DIRLOCK` - "direction lock". The SSH protocols set this bit to
+ limit which "direction" of socket actions that the main engine will
+ concern itself about.
+
+ - `PROTOPT_NONETWORK` - a protocol that doesn't use network (read file:)
+
+ - `PROTOPT_NEEDSPWD` - this protocol needs a password and will use a default
+ one unless one is provided
+
+ - `PROTOPT_NOURLQUERY` - this protocol can't handle a query part on the URL
+ (?foo=bar)
+
+## conncache
+
+ Is a hash table with connections for later re-use. Each SessionHandle has
+ a pointer to its connection cache. Each multi handle sets up a connection
+ cache that all added SessionHandles share by default.
+
+## Curl_share
+
+ The libcurl share API allocates a `Curl_share` struct, exposed to the
+ external API as "CURLSH *".
+
+ The idea is that the struct can have a set of own versions of caches and
+ pools and then by providing this struct in the `CURLOPT_SHARE` option, those
+ specific SessionHandles will use the caches/pools that this share handle
+ holds.
+
+ Then individual SessionHandle structs can be made to share specific things
+ that they otherwise wouldn't, such as cookies.
+
+ The `Curl_share` struct can currently hold cookies, DNS cache and the SSL
+ session cache.
+
+## CookieInfo
+
+ This is the main cookie struct. It holds all known cookies and related
+ information. Each SessionHandle has its own private CookieInfo even when
+ they are added to a multi handle. They can be made to share cookies by using
+ the share API.
+
+
+[1]: http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
+[2]: http://curl.haxx.se/libcurl/c/curl_easy_init.html
+[3]: http://c-ares.haxx.se/
+[4]: https://tools.ietf.org/html/rfc7230 "RFC 7230"
+[5]: http://curl.haxx.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
+[6]: http://curl.haxx.se/docs/manpage.html#--compressed
+[7]: http://curl.haxx.se/libcurl/c/curl_multi_socket_action.html
+[8]: http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
+[9]: http://curl.haxx.se/libcurl/c/curl_multi_setopt.html
+[10]: http://curl.haxx.se/libcurl/c/CURLMOPT_TIMERFUNCTION.html
+[11]: http://curl.haxx.se/libcurl/c/curl_multi_perform.html
+[12]: http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
+[13]: http://curl.haxx.se/libcurl/c/curl_multi_add_handle.html
+[14]: http://curl.haxx.se/libcurl/c/curl_multi_info_read.html
diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS
index 9647891..345dc45 100644
--- a/docs/KNOWN_BUGS
+++ b/docs/KNOWN_BUGS
@@ -3,27 +3,86 @@
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
+90. IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
+ code reveals that pingpong.c contains some truncation code, at line 408,
+ when it deems the server response to be too large truncating it to 40
+ characters"
+ http://curl.haxx.se/bug/view.cgi?id=1366
+
+89. Disabling HTTP Pipelining when there are ongoing transfers can lead to
+ heap corruption and crash. http://curl.haxx.se/bug/view.cgi?id=1411
+
+88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus
+ curl's -R option also doesn't work then.
+
+87. -J/--remote-header-name doesn't decode %-encoded file names. RFC6266
+ details how it should be done. The can of worm is basically that we have no
+ charset handling in curl and ascii >=128 is a challenge for us. Not to
+ mention that decoding also means that we need to check for nastiness that is
+ attempted, like "../" sequences and the like. Probably everything to the left
+ of any embedded slashes should be cut off.
+ http://curl.haxx.se/bug/view.cgi?id=1294
+
+86. The disconnect commands (LOGOUT and QUIT) may not be sent by IMAP, POP3
+ and SMTP if a failure occurs during the authentication phase of a
+ connection.
+
+85. Wrong STARTTRANSFER timer accounting for POST requests
+ Timer works fine with GET requests, but while using POST the time for
+ CURLINFO_STARTTRANSFER_TIME is wrong. While using POST
+ CURLINFO_STARTTRANSFER_TIME minus CURLINFO_PRETRANSFER_TIME is near to zero
+ every time.
+ http://curl.haxx.se/bug/view.cgi?id=1213
+
+84. CURLINFO_SSL_VERIFYRESULT is only implemented for the OpenSSL and NSS
+ backends, so relying on this information in a generic app is flaky.
+
+82. When building with the Windows Borland compiler, it fails because the
+ "tlib" tool doesn't support hyphens (minus signs) in file names and we have
+ such in the build.
+ http://curl.haxx.se/bug/view.cgi?id=1222
+
+81. When using -J (with -O), automatically resumed downloading together with
+ "-C -" fails. Without -J the same command line works! This happens because
+ the resume logic is worked out before the target file name (and thus its
+ pre-transfer size) has been figured out!
+ http://curl.haxx.se/bug/view.cgi?id=1169
+
+80. Curl doesn't recognize certificates in DER format in keychain, but it
+ works with PEM.
+ http://curl.haxx.se/bug/view.cgi?id=1065
+
+79. SMTP. When sending data to multiple recipients, curl will abort and return
+ failure if one of the recipients indicate failure (on the "RCPT TO"
+ command). Ordinary mail programs would proceed and still send to the ones
+ that can receive data. This is subject for change in the future.
+ http://curl.haxx.se/bug/view.cgi?id=1116
+
+78. curl and libcurl don't always signal the client properly when "sending"
+ zero bytes files - it makes for example the command line client not creating
+ any file at all. Like when using FTP.
+ http://curl.haxx.se/bug/view.cgi?id=1063
+
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
that platform), and long is only 32 bits. It makes it impossible for
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
option as for all other operating systems.
-75. NTLM authentication involving unicode user name or password.
+75. NTLM authentication involving unicode user name or password only works
+ properly if built with UNICODE defined together with the WinSSL/schannel
+ backend. The original problem was mentioned in:
http://curl.haxx.se/mail/lib-2009-10/0024.html
- http://curl.haxx.se/bug/view.cgi?id=2944325
+ http://curl.haxx.se/bug/view.cgi?id=896
-74. The HTTP spec allows headers to be merged and become comma-separated
- instead of being repeated several times. This also include Authenticate: and
- Proxy-Authenticate: headers and while this hardly every happens in real life
- it will confuse libcurl which does not properly support it for all headers -
- like those Authenticate headers.
+ The WinSSL/schannel version verified to work as mentioned in
+ http://curl.haxx.se/mail/lib-2012-07/0073.html
73. if a connection is made to a FTP server but the server then just never
sends the 220 response or otherwise is dead slow, libcurl will not
acknowledge the connection timeout during that phase but only the "real"
timeout - which may surprise users as it is probably considered to be the
connect phase to most people. Brought up (and is being misunderstood) in:
- http://curl.haxx.se/bug/view.cgi?id=2844077
+ http://curl.haxx.se/bug/view.cgi?id=856
72. "Pausing pipeline problems."
http://curl.haxx.se/mail/lib-2009-07/0214.html
@@ -38,10 +97,10 @@
something beyond ascii but currently libcurl will only pass in the verbatim
string the app provides. There are several browsers that already do this
encoding. The key seems to be the updated draft to RFC2231:
- http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
+ https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
66. When using telnet, the time limitation options don't work.
- http://curl.haxx.se/bug/view.cgi?id=2818950
+ http://curl.haxx.se/bug/view.cgi?id=846
65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
multi interface is used, libcurl will fail if the (passive) TCP connection
@@ -67,19 +126,12 @@
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
-57. On VMS-Alpha: When using an http-file-upload the file is not sent to the
- Server with the correct content-length. Sending a file with 511 or less
- bytes, content-length 512 is used. Sending a file with 513 - 1023 bytes,
- content-length 1024 is used. Files with a length of a multiple of 512 Bytes
- show the correct content-length. Only these files work for upload.
- http://curl.haxx.se/bug/view.cgi?id=2057858
-
56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
server using the multi interface, the commands are not being sent correctly
and instead the connection is "cancelled" (the operation is considered done)
prematurely. There is a half-baked (busy-looping) patch provided in the bug
report but it cannot be accepted as-is. See
- http://curl.haxx.se/bug/view.cgi?id=2006544
+ http://curl.haxx.se/bug/view.cgi?id=748
55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
library header files exporting symbols/macros that should be kept private
@@ -103,12 +155,12 @@
protocol code. This should be very rare.
43. There seems to be a problem when connecting to the Microsoft telnet server.
- http://curl.haxx.se/bug/view.cgi?id=1720605
+ http://curl.haxx.se/bug/view.cgi?id=649
41. When doing an operation over FTP that requires the ACCT command (but not
when logging in), the operation will fail since libcurl doesn't detect this
and thus fails to issue the correct command:
- http://curl.haxx.se/bug/view.cgi?id=1693337
+ http://curl.haxx.se/bug/view.cgi?id=635
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
http://curl.haxx.se/mail/lib-2007-01/0045.html
@@ -116,55 +168,28 @@
38. Kumar Swamy Bhatt's problem in ftp/ssl "LIST" operation:
http://curl.haxx.se/mail/lib-2007-01/0103.html
-37. Having more than one connection to the same host when doing NTLM
- authentication (with performs multiple "passes" and authenticates a
- connection rather than a HTTP request), and particularly when using the
- multi interface, there's a risk that libcurl will re-use a wrong connection
- when doing the different passes in the NTLM negotiation and thus fail to
- negotiate (in seemingly mysterious ways).
-
35. Both SOCKS5 and SOCKS4 proxy connections are done blocking, which is very
bad when used with the multi interface.
34. The SOCKS4 connection codes don't properly acknowledge (connect) timeouts.
Also see #12. According to bug #1556528, even the SOCKS5 connect code does
- not do it right: http://curl.haxx.se/bug/view.cgi?id=1556528,
+ not do it right: http://curl.haxx.se/bug/view.cgi?id=604
31. "curl-config --libs" will include details set in LDFLAGS when configure is
run that might be needed only for building libcurl. Further, curl-config
--cflags suffers from the same effects with CFLAGS/CPPFLAGS.
-30. You need to use -g to the command line tool in order to use RFC2732-style
- IPv6 numerical addresses in URLs.
-
-29. IPv6 URLs with zone ID is not nicely supported.
- http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
- specifies the use of a plus sign instead of a percent when specifying zone
- IDs in URLs to get around the problem of percent signs being
- special. According to the reporter, Firefox deals with the URL _with_ a
- percent letter (which seems like a blatant URL spec violation).
- libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25).
-
- See http://curl.haxx.se/bug/view.cgi?id=1371118
-
26. NTLM authentication using SSPI (on Windows) when (lib)curl is running in
"system context" will make it use wrong(?) user name - at least when compared
- to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=1281867
+ to what winhttp does. See http://curl.haxx.se/bug/view.cgi?id=535
23. SOCKS-related problems:
- A) libcurl doesn't support SOCKS for IPv6.
B) libcurl doesn't support FTPS over a SOCKS proxy.
E) libcurl doesn't support active FTP over a SOCKS proxy
We probably have even more bugs and lack of features when a SOCKS proxy is
used.
-22. Sending files to a FTP server using curl on VMS, might lead to curl
- complaining on "unaligned file size" on completion. The problem is related
- to VMS file structures and the perceived file sizes stat() returns. A
- possible fix would involve sending a "STRU VMS" command.
- http://curl.haxx.se/bug/view.cgi?id=1156287
-
21. FTP ASCII transfers do not follow RFC959. They don't convert the data
accordingly (not for sending nor for receiving). RFC 959 section 3.1.1.1
clearly describes how this should be done:
@@ -184,7 +209,7 @@
be to use a data structure other than a plain C string, one that can handle
embedded NUL characters. From a practical standpoint, most FTP servers
would not meaningfully support NUL characters within RFC 959 <string>,
- anyway (e.g., UNIX pathnames may not contain NUL).
+ anyway (e.g., Unix pathnames may not contain NUL).
14. Test case 165 might fail on a system which has libidn present, but with an
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
@@ -199,10 +224,10 @@
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
phase).
-10. To get HTTP Negotiate authentication to work fine, you need to provide a
- (fake) user name (this concerns both curl and the lib) because the code
- wrongly only considers authentication if there's a user name provided.
- http://curl.haxx.se/bug/view.cgi?id=1004841. How?
+10. To get HTTP Negotiate (SPNEGO) authentication to work fine, you need to
+ provide a (fake) user name (this concerns both curl and the lib) because the
+ code wrongly only considers authentication if there's a user name provided.
+ http://curl.haxx.se/bug/view.cgi?id=440 How?
http://curl.haxx.se/mail/lib-2004-08/0182.html
8. Doing resumed upload over HTTP does not work with '-C -', because curl
diff --git a/docs/LICENSE-MIXING b/docs/LICENSE-MIXING
index 3db1a3d..ccb6ada 100644
--- a/docs/LICENSE-MIXING
+++ b/docs/LICENSE-MIXING
@@ -21,33 +21,31 @@
libcurl http://curl.haxx.se/docs/copyright.html
Uses an MIT (or Modified BSD)-style license that is as liberal as
- possible. Some of the source files that deal with KRB4 have Original
- BSD-style announce-clause licenses. You may not distribute binaries
- with krb4-enabled libcurl that also link with GPL-licensed code!
+ possible.
-OpenSSL http://www.openssl.org/source/license.html
+OpenSSL https://www.openssl.org/source/license.html
(May be used for SSL/TLS support) Uses an Original BSD-style license
with an announcement clause that makes it "incompatible" with GPL. You
are not allowed to ship binaries that link with OpenSSL that includes
GPL code (unless that specific GPL code includes an exception for
OpenSSL - a habit that is growing more and more common). If OpenSSL's
- licensing is a problem for you, consider using GnuTLS or yassl
- instead.
+ licensing is a problem for you, consider using another TLS library.
GnuTLS http://www.gnutls.org/
(May be used for SSL/TLS support) Uses the LGPL[3] license. If this is
- a problem for you, consider using OpenSSL instead. Also note that
+ a problem for you, consider using another TLS library. Also note that
GnuTLS itself depends on and uses other libs (libgcrypt and
libgpg-error) and they too are LGPL- or GPL-licensed.
-yassl http://www.yassl.com/
+WolfSSL https://www.wolfssl.com/
- (May be used for SSL/TLS support) Uses the GPL[1] license. If this is
- a problem for you, consider using OpenSSL or GnuTLS instead.
+ (May be used for SSL/TLS support) Uses the GPL[1] license or a
+ propietary license. If this is a problem for you, consider using
+ another TLS library.
-NSS http://www.mozilla.org/projects/security/pki/nss/
+NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
(May be used for SSL/TLS support) Is covered by the MPL[4] license,
the GPL[1] license and the LGPL[3] license. You may choose to license
@@ -55,47 +53,53 @@
grant you different permissions and impose different obligations. You
should select the license that best meets your needs.
+axTLS http://axtls.sourceforge.net/
+
+ (May be used for SSL/TLS support) Uses a Modified BSD-style license.
+
+mbedTLS https://tls.mbed.org/
+
+ (May be used for SSL/TLS support) Uses the GPL[1] license or a
+ propietary license. If this is a problem for you, consider using
+ another TLS library.
+
+BoringSSL https://boringssl.googlesource.com/
+
+ (May be used for SSL/TLS support) As an OpenSSL fork, it has the same
+ license as that.
+
+libressl http://www.libressl.org/
+
+ (May be used for SSL/TLS support) As an OpenSSL fork, it has the same
+ license as that.
+
c-ares http://daniel.haxx.se/projects/c-ares/license.html
(Used for asynchronous name resolves) Uses an MIT license that is very
liberal and imposes no restrictions on any other library or part you
may link with.
-zlib http://www.gzip.org/zlib/zlib_license.html
+zlib http://www.zlib.net/zlib_license.html
(Used for compressed Transfer-Encoding support) Uses an MIT-style
license that shouldn't collide with any other library.
-krb4
-
- While nothing in particular says that a Kerberos4 library must use any
- particular license, the one I've tried and used successfully so far
- (kth-krb4) is partly Original BSD-licensed with the announcement
- clause. Some of the code in libcurl that is written to deal with
- Kerberos4 is Modified BSD-licensed.
-
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
(May be used for GSS support) MIT licensed, that shouldn't collide
with any other parts.
-Heimdal http://www.pdc.kth.se/heimdal/
+Heimdal http://www.h5l.org
(May be used for GSS support) Heimdal is Original BSD licensed with
the announcement clause.
-GNU GSS http://www.gnu.org/software/gss/
+GNU GSS https://www.gnu.org/software/gss/
(May be used for GSS support) GNU GSS is GPL licensed. Note that you
may not distribute binary curl packages that uses this if you build
curl to also link and use any Original BSD licensed libraries!
-fbopenssl
-
- (Used for SPNEGO support) Unclear license. Based on its name, I assume
- that it uses the OpenSSL license and thus shares the same issues as
- described for OpenSSL above.
-
libidn http://josefsson.org/libidn/
(Used for IDNA support) Uses the GNU Lesser General Public
@@ -117,10 +121,10 @@
(Used for scp and sftp support) libssh2 uses a Modified BSD-style
license.
-[1] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html
-[2] = http://www.fsf.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
+[1] = GPL - GNU General Public License: https://www.gnu.org/licenses/gpl.html
+[2] = https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
how to write such an exception to the GPL
[3] = LGPL - GNU Lesser General Public License:
- http://www.gnu.org/licenses/lgpl.html
+ https://www.gnu.org/licenses/lgpl.html
[4] = MPL - Mozilla Public License:
- http://www.mozilla.org/MPL/
+ https://www.mozilla.org/MPL/
diff --git a/docs/MAIL-ETIQUETTE b/docs/MAIL-ETIQUETTE
new file mode 100644
index 0000000..b6c0f45
--- /dev/null
+++ b/docs/MAIL-ETIQUETTE
@@ -0,0 +1,265 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+MAIL ETIQUETTE
+
+ 1. About the lists
+ 1.1 Mailing Lists
+ 1.2 Netiquette
+ 1.3 Do Not Mail a Single Individual
+ 1.4 Subscription Required
+ 1.5 Moderation of new posters
+ 1.6 Handling trolls and spam
+ 1.7 How to unsubscribe
+ 1.8 I posted, now what?
+
+ 2. Sending mail
+ 2.1 Reply or New Mail
+ 2.2 Reply to the List
+ 2.3 Use a Sensible Subject
+ 2.4 Do Not Top-Post
+ 2.5 HTML is not for mails
+ 2.6 Quoting
+ 2.7 Digest
+ 2.8 Please Tell Us How You Solved The Problem!
+
+==============================================================================
+
+1. About the lists
+
+ 1.1 Mailing Lists
+
+ The mailing lists we have are all listed and described at
+ http://curl.haxx.se/mail/
+
+ Each mailing list is targeted to a specific set of users and subjects,
+ please use the one or the ones that suit you the most.
+
+ Each mailing list have hundreds up to thousands of readers, meaning that
+ each mail sent will be received and read by a very large amount of people.
+ People from various cultures, regions, religions and continents.
+
+ 1.2 Netiquette
+
+ Netiquette is a common name for how to behave on the internet. Of course, in
+ each particular group and subculture there will be differences in what is
+ acceptable and what is considered good manners.
+
+ This document outlines what we in the cURL project considers to be good
+ etiquette, and primarily this focus on how to behave on and how to use our
+ mailing lists.
+
+ 1.3 Do Not Mail a Single Individual
+
+ Many people send one question to one person. One person gets many mails, and
+ there is only one person who can give you a reply. The question may be
+ something that other people are also wanting to ask. These other people have
+ no way to read the reply, but to ask the one person the question. The one
+ person consequently gets overloaded with mail.
+
+ If you really want to contact an individual and perhaps pay for his or her
+ services, by all means go ahead, but if it's just another curl question,
+ take it to a suitable list instead.
+
+ 1.4 Subscription Required
+
+ All curl mailing lists require that you are subscribed to allow a mail to go
+ through to all the subscribers.
+
+ If you post without being subscribed (or from a different mail address than
+ the one you are subscribed with), your mail will simply be silently
+ discarded. You have to subscribe first, then post.
+
+ The reason for this unfortunate and strict subscription policy is of course
+ to stop spam from pestering the lists.
+
+ 1.5 Moderation of new posters
+
+ Several of the curl mailing lists automatically make all posts from new
+ subscribers require moderation. This means that after you've subscribed and
+ send your first mail to a list, that mail will not be let through to the
+ list until a mailing list administrator has verified that it is OK and
+ permits it to get posted.
+
+ Once a first post has been made that proves the sender is actually talking
+ about curl-related subjects, the moderation "flag" will be switched off and
+ future posts will go through without being moderated.
+
+ The reason for this moderation policy is that we do suffer from spammers who
+ actually subscribe and send spam to our lists.
+
+ 1.6 Handling trolls and spam
+
+ Despite our good intentions and hard work to keep spam off the lists and to
+ maintain a friendly and positive atmosphere, there will be times when spam
+ and or trolls get through.
+
+ Troll - "someone who posts inflammatory, extraneous, or off-topic messages
+ in an online community"
+
+ Spam - "use of electronic messaging systems to send unsolicited bulk
+ messages"
+
+ No matter what, we NEVER EVER respond to trolls or spammers on the list. If
+ you believe the list admin should do something particular, contact him/her
+ off-list. The subject will be taken care of as good as possible to prevent
+ repeated offenses, but responding on the list to such messages never lead to
+ anything good and only puts the light even more on the offender: which was
+ the entire purpose of it getting to the list in the first place.
+
+ Don't feed the trolls!
+
+ 1.7 How to unsubscribe
+
+ You unsubscribe the same way you subscribed in the first place. You go to
+ the page for the particular mailing list you're subscribed to and you enter
+ your email address and password and press the unsubscribe button.
+
+ Also, this information is included in the headers of every mail that is sent
+ out to all curl related mailing lists and there's footer in each mail that
+ links to the "admin" page on which you can unsubscribe and change other
+ options.
+
+ You NEVER EVER email the mailing list requesting someone else to get you off
+ the list.
+
+ 1.8 I posted, now what?
+
+ If you aren't subscribed with the exact same email address that you used to
+ send the email, your post will just be silently discarded.
+
+ If you posted for the first time to the mailing list, you first need to wait
+ for an administrator to allow your email to go through. This normally
+ happens very quickly but in case we're asleep, you may have to wait a few
+ hours.
+
+ Once your email goes through it is sent out to several hundred or even
+ thousand recipients. Your email may cover an area that not that many people
+ know about or are interested in. Or possibly the person who knows about it
+ is on vacation or under a very heavy work load right now. You have to wait
+ for a response and you must not expect to get a response at all, but
+ hopefully you get an answer within a couple of days.
+
+ You do yourself and all of us a service when you include as many details as
+ possible already in your first email. Mention your operating system and
+ environment. Tell us which curl version you're using and tell us what you
+ did, what happened and what you expected would happen. Preferably, show us
+ what you did in details enough to allow others to help point out the problem
+ or repeat the same steps in their places.
+
+ Failing to include details will only delay responses and make people respond
+ and ask for the details and you have to send a follow-up email that includes
+ them.
+
+ Expect the responses to primarily help YOU debug the issue, or ask you
+ questions that can lead you or others towards a solution or explanation to
+ whatever you experience.
+
+ If you are a repeat offender to the guidelines outlined in this document,
+ chances are that people will ignore you at will and your chances to get
+ responses will greatly diminish.
+
+
+2. Sending mail
+
+ 2.1 Reply or New Mail
+
+ Please do not reply to an existing message as a short-cut to post a message
+ to the lists.
+
+ Many mail programs and web archivers use information within mails to keep
+ them together as "threads", as collections of posts that discuss a certain
+ subject. If you don't intend to reply on the same or similar subject, don't
+ just hit reply on an existing mail and change subject, create a new mail.
+
+ 2.2 Reply to the List
+
+ When replying to a message from the list, make sure that you do "group
+ reply" or "reply to all", and not just reply to the author of the single
+ mail you reply to.
+
+ We're actively discouraging replying back to the single person by setting
+ the Reply-To: field in outgoing mails back to the mailing list address,
+ making it harder for people to mail the author only by mistake.
+
+ 2.3 Use a Sensible Subject
+
+ Please use a subject of the mail that makes sense and that is related to the
+ contents of your mail. It makes it a lot easier to find your mail afterwards
+ and it makes it easier to track mail threads and topics.
+
+ 2.4 Do Not Top-Post
+
+ If you reply to a message, don't use top-posting. Top-posting is when you
+ write the new text at the top of a mail and you insert the previous quoted
+ mail conversation below. It forces users to read the mail in a backwards
+ order to properly understand it.
+
+ This is why top posting is so bad:
+
+ A: Because it messes up the order in which people normally read
+ text.
+ Q: Why is top-posting such a bad thing?
+ A: Top-posting.
+ Q: What is the most annoying thing in e-mail?
+
+ Apart from the screwed up read order (especially when mixed together in a
+ thread when someone responds using the mandated bottom-posting style), it
+ also makes it impossible to quote only parts of the original mail.
+
+ When you reply to a mail. You let the mail client insert the previous mail
+ quoted. Then you put the cursor on the first line of the mail and you move
+ down through the mail, deleting all parts of the quotes that don't add
+ context for your comments. When you want to add a comment you do so, inline,
+ right after the quotes that relate to your comment. Then you continue
+ downwards again.
+
+ When most of the quotes have been removed and you've added your own words,
+ you're done!
+
+ 2.5 HTML is not for mails
+
+ Please switch off those HTML encoded messages. You can mail all those funny
+ mails to your friends. We speak plain text mails.
+
+ 2.6 Quoting
+
+ Quote as little as possible. Just enough to provide the context you cannot
+ leave out. A lengthy description can be found here:
+
+ https://www.netmeister.org/news/learn2quote.html
+
+ 2.7 Digest
+
+ We allow subscribers to subscribe to the "digest" version of the mailing
+ lists. A digest is a collection of mails lumped together in one single mail.
+
+ Should you decide to reply to a mail sent out as a digest, there are two
+ things you MUST consider if you really really cannot subscribe normally
+ instead:
+
+ Cut off all mails and chatter that is not related to the mail you want to
+ reply to.
+
+ Change the subject name to something sensible and related to the subject,
+ preferably even the actual subject of the single mail you wanted to reply to
+
+ 2.8 Please Tell Us How You Solved The Problem!
+
+ Many people mail questions to the list, people spend some of their time and
+ make an effort in providing good answers to these questions.
+
+ If you are the one who asks, please consider responding once more in case
+ one of the hints was what solved your problems. The guys who write answers
+ feel good to know that they provided a good answer and that you fixed the
+ problem. Far too often, the person who asked the question is never heard of
+ again, and we never get to know if he/she is gone because the problem was
+ solved or perhaps because the problem was unsolvable!
+
+ Getting the solution posted also helps other users that experience the same
+ problem(s). They get to see (possibly in the web archives) that the
+ suggested fixes actually has helped at least one person.
+
diff --git a/docs/MANUAL b/docs/MANUAL
index d7085b7..fb34948 100644
--- a/docs/MANUAL
+++ b/docs/MANUAL
@@ -19,7 +19,7 @@
curl http://www.weirdserver.com:8000/
- Get a list of a directory of an FTP site:
+ Get a directory listing of an FTP site:
curl ftp://cool.haxx.se/
@@ -41,20 +41,31 @@
Get a file from an SSH server using SFTP:
- curl -u username sftp://shell.example.com/etc/issue
+ curl -u username sftp://example.com/etc/issue
- Get a file from an SSH server using SCP using a private key to authenticate:
+ Get a file from an SSH server using SCP using a private key
+ (not password-protected) to authenticate:
- curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
- scp://shell.example.com/~/personal.txt
+ curl -u username: --key ~/.ssh/id_rsa \
+ scp://example.com/~/file.txt
+
+ Get a file from an SSH server using SCP using a private key
+ (password-protected) to authenticate:
+
+ curl -u username: --key ~/.ssh/id_rsa --pass private_key_password \
+ scp://example.com/~/file.txt
Get the main page from an IPv6 web server:
- curl -g "http://[2001:1890:1112:1::20]/"
+ curl "http://[2001:1890:1112:1::20]/"
+
+ Get a file from an SMB server:
+
+ curl -u "domain\username:passwd" smb://server.example.com/share/file.txt
DOWNLOAD TO A FILE
- Get a web page and store in a local file:
+ Get a web page and store in a local file with a specific name:
curl -o thatpage.html http://www.netscape.com/
@@ -91,10 +102,13 @@
SFTP / SCP
- This is similar to FTP, but you can specify a private key to use instead of
- a password. Note that the private key may itself be protected by a password
- that is unrelated to the login password of the remote system. If you
- provide a private key file you must also provide a public key file.
+ This is similar to FTP, but you can use the --key option to specify a
+ private key to use instead of a password. Note that the private key may
+ itself be protected by a password that is unrelated to the login password
+ of the remote system; this password is specified using the --pass option.
+ Typically, curl will automatically extract the public key from the private
+ key file, but in cases where curl does not have the proper library support,
+ a matching public key file must be specified using the --pubkey option.
HTTP
@@ -108,14 +122,15 @@
curl -u name:passwd http://machine.domain/full/path/to/file
HTTP offers many different methods of authentication and curl supports
- several: Basic, Digest, NTLM and Negotiate. Without telling which method to
- use, curl defaults to Basic. You can also ask curl to pick the most secure
- ones out of the ones that the server accepts for the given URL, by using
- --anyauth.
+ several: Basic, Digest, NTLM and Negotiate (SPNEGO). Without telling which
+ method to use, curl defaults to Basic. You can also ask curl to pick the
+ most secure ones out of the ones that the server accepts for the given URL,
+ by using --anyauth.
- NOTE! Since HTTP URLs don't support user and password, you can't use that
- style when using Curl via a proxy. You _must_ use the -u style fetch
- during such circumstances.
+ NOTE! According to the URL specification, HTTP URLs can not contain a user
+ and password, so that style will not work when using curl via a proxy, even
+ though curl allows it at other times. When using a proxy, you _must_ use
+ the -u style for user and password.
HTTPS
@@ -123,11 +138,17 @@
PROXY
- Get an ftp file using a proxy named my-proxy that uses port 888:
+ curl supports both HTTP and SOCKS proxy servers, with optional authentication.
+ It does not have special support for FTP proxy servers since there are no
+ standards for those, but it can still be made to work with many of them. You
+ can also use both HTTP and SOCKS proxies to transfer files to and from FTP
+ servers.
+
+ Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
- Get a file from a HTTP server that requires user and password, using the
+ Get a file from an HTTP server that requires user and password, using the
same proxy as above:
curl -u user:passwd -x my-proxy:888 http://www.get.this/
@@ -146,12 +167,26 @@
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
- See also the environment variables Curl support that offer further proxy
+ See also the environment variables Curl supports that offer further proxy
control.
+ Most FTP proxy servers are set up to appear as a normal FTP server from the
+ client's perspective, with special commands to select the remote FTP server.
+ curl supports the -u, -Q and --ftp-account options that can be used to
+ set up transfers through many FTP proxies. For example, a file can be
+ uploaded to a remote FTP server using a Blue Coat FTP proxy with the
+ options:
+
+ curl -u "[email protected] Proxy-Username:Remote-Pass" \
+ --ftp-account Proxy-Password --upload-file local-file \
+ ftp://my-ftp.proxy.server:21/remote/upload/path/
+
+ See the manual for your FTP proxy to determine the form it expects to set up
+ transfers, and curl's -v option to see exactly what curl is sending.
+
RANGES
- With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
+ HTTP 1.1 introduced byte-ranges. Using this, a client can request
to get only one or more subparts of a specified document. Curl supports
this with the -r flag.
@@ -182,8 +217,8 @@
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
- Upload a local file to the remote site, and use the local file name remote
- too:
+ Upload a local file to the remote site, and use the local file name at the remote
+ site too:
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
@@ -197,16 +232,21 @@
curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
+SMB / SMBS
+
+ curl -T file.txt -u "domain\username:passwd"
+ smb://server.example.com/share/
+
HTTP
- Upload all data on stdin to a specified http site:
+ Upload all data on stdin to a specified HTTP site:
curl -T - http://www.upload.com/myfile
- Note that the http server must have been configured to accept PUT before
+ Note that the HTTP server must have been configured to accept PUT before
this can be done successfully.
- For other ways to do http data upload, see the POST section below.
+ For other ways to do HTTP data upload, see the POST section below.
VERBOSE / DEBUG
@@ -269,7 +309,7 @@
The 'variable' names are the names set with "name=" in the <input> tags, and
the data is the contents you want to fill in for the inputs. The data *must*
be properly URL encoded. That means you replace space with + and that you
- write weird letters with %XX where XX is the hexadecimal representation of
+ replace weird letters with %XX where XX is the hexadecimal representation of
the letter's ASCII code.
Example:
@@ -308,7 +348,7 @@
If the content-type is not specified, curl will try to guess from the file
extension (it only knows a few), or use the previously specified type (from
an earlier file if several files are specified in a list) or else it will
- using the default type 'text/plain'.
+ use the default type 'application/octet-stream'.
Emulate a fill-in form with -F. Let's say you fill in three fields in a
form. One field is a file name which to post, one field is your name and one
@@ -341,8 +381,8 @@
REFERRER
- A HTTP request has the option to include information about which address
- that referred to actual page. Curl allows you to specify the
+ An HTTP request has the option to include information about which address
+ referred it to the actual page. Curl allows you to specify the
referrer to be used on the command line. It is especially useful to
fool or trick stupid servers or CGI scripts that rely on that information
being available or contain certain data.
@@ -353,7 +393,7 @@
USER AGENT
- A HTTP request has the option to include information about the browser
+ An HTTP request has the option to include information about the browser
that generated the request. Curl allows it to be specified on the command
line. It is especially useful to fool or trick stupid servers or CGI
scripts that only accept certain browsers.
@@ -430,8 +470,8 @@
stored cookies which match the request as it follows the location. The
file "empty.txt" may be a nonexistent file.
- Alas, to both read and write cookies from a netscape cookie file, you can
- set both -b and -c to use the same file:
+ To read and write cookies from a netscape cookie file, you can set both -b
+ and -c to use the same file:
curl -b cookies.txt -c cookies.txt www.example.com
@@ -593,21 +633,21 @@
FTP and firewalls
The FTP protocol requires one of the involved parties to open a second
- connection as soon as data is about to get transfered. There are two ways to
+ connection as soon as data is about to get transferred. There are two ways to
do this.
The default way for curl is to issue the PASV command which causes the
server to open another port and await another connection performed by the
- client. This is good if the client is behind a firewall that don't allow
+ client. This is good if the client is behind a firewall that doesn't allow
incoming connections.
curl ftp.download.com
- If the server for example, is behind a firewall that don't allow connections
- on other ports than 21 (or if it just doesn't support the PASV command), the
+ If the server, for example, is behind a firewall that doesn't allow connections
+ on ports other than 21 (or if it just doesn't support the PASV command), the
other way to do it is to use the PORT command and instruct the server to
- connect to the client on the given (as parameters to the PORT command) IP
- number and port.
+ connect to the client on the given IP number and port (as parameters to the
+ PORT command).
The -P flag to curl supports a few different options. Your machine may have
several IP-addresses and/or network interfaces and curl allows you to select
@@ -665,8 +705,8 @@
If you neglect to specify the password on the command line, you will be
prompted for the correct password before any data can be received.
- Many older SSL-servers have problems with SSLv3 or TLS, that newer versions
- of OpenSSL etc is using, therefore it is sometimes useful to specify what
+ Many older SSL-servers have problems with SSLv3 or TLS, which newer versions
+ of OpenSSL etc use, therefore it is sometimes useful to specify what
SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
version to use (for SSLv3, SSLv2 or TLSv1 respectively):
@@ -675,14 +715,13 @@
Otherwise, curl will first attempt to use v3 and then v2.
To use OpenSSL to convert your favourite browser's certificate into a PEM
- formatted one that curl can use, do something like this (assuming netscape,
- but IE is likely to work similarly):
+ formatted one that curl can use, do something like this:
- You start with hitting the 'security' menu button in netscape.
+ In Netscape, you start with hitting the 'Security' menu button.
Select 'certificates->yours' and then pick a certificate in the list
- Press the 'export' button
+ Press the 'Export' button
enter your PIN code for the certs
@@ -693,11 +732,21 @@
# ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
+ In Firefox, select Options, then Advanced, then the Encryption tab,
+ View Certificates. This opens the Certificate Manager, where you can
+ Export. Be sure to select PEM for the Save as type.
+
+ In Internet Explorer, select Internet Options, then the Content tab, then
+ Certificates. Then you can Export, and depending on the format you may
+ need to convert to PEM.
+
+ In Chrome, select Settings, then Show Advanced Settings. Under HTTPS/SSL
+ select Manage Certificates.
RESUMING FILE TRANSFERS
To continue a file transfer where it was previously aborted, curl supports
- resume on http(s) downloads as well as ftp uploads and downloads.
+ resume on HTTP(S) downloads as well as FTP uploads and downloads.
Continue downloading a document:
@@ -711,7 +760,7 @@
curl -C - -o file http://www.server.com/
- (*1) = This requires that the ftp server supports the non-standard command
+ (*1) = This requires that the FTP server supports the non-standard command
SIZE. If it doesn't, curl will say so.
(*2) = This requires that the web server supports at least HTTP/1.1. If it
@@ -720,7 +769,7 @@
TIME CONDITIONS
HTTP allows a client to specify a time condition for the document it
- requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to
+ requests. It is If-Modified-Since or If-Unmodified-Since. Curl allows you to
specify them with the -z/--time-cond flag.
For example, you can easily make a download that only gets performed if the
@@ -768,7 +817,7 @@
and offer ldap:// support.
LDAP is a complex thing and writing an LDAP query is not an easy task. I do
- advice you to dig up the syntax description for that elsewhere. Two places
+ advise you to dig up the syntax description for that elsewhere. Two places
that might suit you are:
Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
@@ -777,7 +826,7 @@
RFC 2255, "The LDAP URL Format" http://curl.haxx.se/rfc/rfc2255.txt
- To show you an example, this is now I can get all people from my local LDAP
+ To show you an example, this is how I can get all people from my local LDAP
server that has a certain sub-domain in their email address:
curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
@@ -811,15 +860,15 @@
NETRC
Unix introduced the .netrc concept a long time ago. It is a way for a user
- to specify name and password for commonly visited ftp sites in a file so
+ to specify name and password for commonly visited FTP sites in a file so
that you don't have to type them in each time you visit those sites. You
realize this is a big security risk if someone else gets hold of your
passwords, so therefore most unix programs won't read this file unless it is
only readable by yourself (curl doesn't care though).
- Curl supports .netrc files if told so (using the -n/--netrc and
- --netrc-optional options). This is not restricted to only ftp,
- but curl can use it for all protocols where authentication is used.
+ Curl supports .netrc files if told to (using the -n/--netrc and
+ --netrc-optional options). This is not restricted to just FTP,
+ so curl can use it for all protocols where authentication is used.
A very simple .netrc file could look something like:
@@ -840,7 +889,7 @@
Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
the kerberos package installed and used at curl build time for it to be
- used.
+ available.
First, get the krb-ticket the normal way, like with the kinit/kauth tool.
Then use curl in way similar to:
@@ -875,7 +924,7 @@
- NEW_ENV=<var,val> Sets an environment variable.
- NOTE: the telnet protocol does not specify any way to login with a specified
+ NOTE: The telnet protocol does not specify any way to login with a specified
user and password so curl can't do that automatically. To do that, you need
to track when the login prompt is received and send the username and
password accordingly.
@@ -894,7 +943,7 @@
Note that curl cannot use persistent connections for transfers that are used
in subsequence curl invokes. Try to stuff as many URLs as possible on the
same command line if they are using the same host, as that'll make the
- transfers faster. If you use a http proxy for file transfers, practically
+ transfers faster. If you use an HTTP proxy for file transfers, practically
all transfers will be persistent.
MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
@@ -926,15 +975,37 @@
When this style is used, the -g option must be given to stop curl from
interpreting the square brackets as special globbing characters. Link local
and site local addresses including a scope identifier, such as fe80::1234%1,
- may also be used, but the scope portion must be numeric and the percent
- character must be URL escaped. The previous example in an SFTP URL might
- look like:
+ may also be used, but the scope portion must be numeric or match an existing
+ network interface on Linux and the percent character must be URL escaped. The
+ previous example in an SFTP URL might look like:
sftp://[fe80::1234%251]/
IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
or --ftp-port options) should not be URL encoded.
+METALINK
+
+ Curl supports Metalink (both version 3 and 4 (RFC 5854) are supported), a way
+ to list multiple URIs and hashes for a file. Curl will make use of the mirrors
+ listed within for failover if there are errors (such as the file or server not
+ being available). It will also verify the hash of the file after the download
+ completes. The Metalink file itself is downloaded and processed in memory and
+ not stored in the local file system.
+
+ Example to use a remote Metalink file:
+
+ curl --metalink http://www.example.com/example.metalink
+
+ To use a Metalink file in the local file system, use FILE protocol (file://):
+
+ curl --metalink file://example.metalink
+
+ Please note that if FILE protocol is disabled, there is no way to use a local
+ Metalink file at the time of this writing. Also note that if --metalink and
+ --include are used together, --include will be ignored. This is because including
+ headers in the response will break Metalink parser and if the headers are included
+ in the file described in Metalink file, hash check will fail.
MAILING LISTS
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 316b4f4..e3e27d3 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,11 +1,31 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
+noinst_man_MANS = mk-ca-bundle.1
+GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
+PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
HTMLPAGES = $(GENHTMLPAGES) index.html
@@ -16,7 +36,9 @@
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
+ $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
+ MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE \
+ SSL-PROBLEMS HTTP2.md ROADMAP.md
MAN2HTML= roffit < $< >$@
diff --git a/docs/Makefile.in b/docs/Makefile.in
deleted file mode 100644
index 3cc2e3b..0000000
--- a/docs/Makefile.in
+++ /dev/null
@@ -1,649 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL \
- THANKS TODO
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-MANS = $(man_MANS)
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-man_MANS = curl.1 curl-config.1
-GENHTMLPAGES = curl.html curl-config.html
-PDFPAGES = curl.pdf curl-config.pdf
-HTMLPAGES = $(GENHTMLPAGES) index.html
-SUBDIRS = examples libcurl
-CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
-EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
- README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
- KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
- $(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
-
-MAN2HTML = roffit < $< >$@
-SUFFIXES = .1 .html .pdf
-all: all-recursive
-
-.SUFFIXES:
-.SUFFIXES: .1 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man1: $(man1_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-uninstall-man1:
- @$(NORMAL_UNINSTALL)
- @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.1*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 1*) ;; \
- *) ext='1' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
- done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
- include_option=--etags-include; \
- empty_fix=.; \
- else \
- include_option=--include; \
- empty_fix=; \
- fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
- || exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
- $(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
- distdir) \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-recursive
-all-am: Makefile $(MANS)
-installdirs: installdirs-recursive
-installdirs-am:
- for dir in "$(DESTDIR)$(man1dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-info: info-recursive
-
-info-am:
-
-install-data-am: install-man
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man: install-man1
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-man
-
-uninstall-info: uninstall-info-recursive
-
-uninstall-man: uninstall-man1
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-man1 install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am \
- uninstall-man uninstall-man1
-
-
-html: $(HTMLPAGES)
- cd libcurl; make html
-
-pdf: $(PDFPAGES)
- cd libcurl; make pdf
-
-.1.html:
- $(MAN2HTML)
-
-.1.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/README.cmake b/docs/README.cmake
new file mode 100644
index 0000000..084c1de
--- /dev/null
+++ b/docs/README.cmake
@@ -0,0 +1,16 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+README.cmake
+ Read the README file first.
+
+ Curl contains CMake build files that provide a way to build Curl with the
+ CMake build tool (www.cmake.org). CMake is a cross platform meta build tool
+ that generates native makefiles and IDE project files. The CMake build
+ system can be used to build Curl on any of its supported platforms.
+
+ Read the INSTALL.cmake file for instructions on how to compile curl with
+ CMake.
diff --git a/docs/README.netware b/docs/README.netware
index 41da2e8..12065f3 100644
--- a/docs/README.netware
+++ b/docs/README.netware
@@ -10,7 +10,7 @@
Curl has been successfully compiled with gcc / nlmconv on different flavours
of Linux as well as with the official Metrowerks CodeWarrior compiler.
- While not being the main development target, a continously growing share of
+ While not being the main development target, a continuously growing share of
curl users are NetWare-based, specially also consuming the lib from PHP.
The unix-style man pages are tricky to read on windows, so therefore are all
diff --git a/docs/RELEASE-PROCEDURE b/docs/RELEASE-PROCEDURE
new file mode 100644
index 0000000..fc31274
--- /dev/null
+++ b/docs/RELEASE-PROCEDURE
@@ -0,0 +1,89 @@
+curl release procedure - how to do a release
+============================================
+
+in the source code repo
+-----------------------
+
+- edit `RELEASE-NOTES` to be accurate
+
+- update `docs/THANKS`
+
+- make sure all relevant changes are committed on the master branch
+
+- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the
+ tag and we use underscores instead of dots in the version number.
+
+- run "./maketgz 7.34.0" to build the release tarballs. It is important that
+ you run this on a machine with the correct set of autotools etc installed
+ as this is what then will be shipped and used by most users on *nix like
+ systems.
+
+- push the git commits and the new tag
+
+- gpg sign the 4 tarballs as maketgz suggests
+
+- upload the 8 resulting files to the primary download directory
+
+in the curl-www repo
+--------------------
+
+- edit `Makefile` (version number and date),
+
+- edit `_newslog.html` (announce the new release) and
+
+- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES)
+
+- commit all local changes
+
+- tag the repo with the same tag as used for the source repo
+
+- make sure all relevant changes are committed and pushed on the master branch
+
+ (the web site then updates its contents automatically)
+
+inform
+------
+
+- send an email to curl-users, curl-announce and curl-library. Insert the
+ RELEASE-NOTES into the mail.
+
+celebrate
+---------
+
+- suitable beverage intake is encouraged for the festivities
+
+curl release scheduling
+=======================
+
+Basics
+------
+
+We do releases every 8 weeks on Wednesdays. If critical problems arise, we can
+insert releases outside of the schedule or we can move the release date - but
+this is very rare.
+
+Each 8 week release cycle is split in two 4-week periods.
+
+- During the first 4 weeks after a release, we allow new features and changes
+ to curl and libcurl. If we accept any such changes, we bump the minor number
+ used for the next release.
+
+- During the second 4-week period we do not merge any features or changes, we
+ then only focus on fixing bugs and polishing things to make a solid coming
+ release.
+
+Coming dates
+------------
+
+Based on the description above, here are some planned release dates (at the
+time of this writing):
+
+- June 17, 2015 (version 7.43.0)
+- August 12, 2015
+- October 7, 2015
+- December 2, 2015
+- January 27, 2016
+- March 23, 2016
+- May 18, 2016
+- July 13, 2016
+- September 7, 2016
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
new file mode 100644
index 0000000..eb52d18
--- /dev/null
+++ b/docs/ROADMAP.md
@@ -0,0 +1,139 @@
+curl the next few years - perhaps
+=================================
+
+Roadmap of things Daniel Stenberg and Steve Holme want to work on next. It is
+intended to serve as a guideline for others for information, feedback and
+possible participation.
+
+HTTP/2
+------
+
+- test suite
+
+ Base this on existing nghttp2 server to start with to make functional
+ tests. Later on we can adopt that code or work with nghttp2 to provide ways
+ to have the http2 server respond with broken responses to make sure we deal
+ with that nicely as well.
+
+ To decide: if we need to bundle parts of the nghttp2 stuff that probably
+ won't be shipped by many distros.
+
+- stream properties API
+
+ Provide options for setting priorities and dependencies among the streams
+ (easy handles). They are mostly information set for the stream and sent to
+ the server so we don't have to add much logic for this.
+
+- server push
+
+ Not exactly clear exactly how to support this API-wise, but by adding
+ handles without asking for a resource it could be a way to be prepared to
+ receive pushes in case such are sent. We probably need it to still specify
+ a URL with host name, port etc but we probably need a special option to
+ tell libcurl it is for server push purposes.
+
+- provide option for HTTP/2 "prior knowledge" over clear text
+
+ As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
+ it speaks HTTP/2.
+
+- provide option to allow curl to default to HTTP/2 only when using HTTPS
+
+ We could switch on HTTP/2 by-default for HTTPS quite easily and it
+ shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
+ lots of Upgrade: roundtrips that users won't like. So a separated option
+ alternative makes sense.
+
+SRV records
+-----------
+
+How to find services for specific domains/hosts.
+
+HTTPS to proxy
+--------------
+
+To avoid network traffic to/from the proxy getting snooped on.
+
+curl_formadd()
+--------------
+
+make sure there's an easy handle passed in to `curl_formadd()`,
+`curl_formget()` and `curl_formfree()` by adding replacement functions and
+deprecating the old ones to allow custom mallocs and more
+
+third-party SASL
+----------------
+
+add support for third-party SASL libraries such as Cyrus SASL - may need to
+move existing native and SSPI based authentication into vsasl folder after
+reworking HTTP and SASL code
+
+SASL authentication in LDAP
+---------------------------
+
+...
+
+Simplify the SMTP email
+-----------------------
+
+Simplify the SMTP email interface so that programmers don't have to
+construct the body of an email that contains all the headers, alternative
+content, images and attachments - maintain raw interface so that
+programmers that want to do this can
+
+email capabilities
+------------------
+
+Allow the email protocols to return the capabilities before
+authenticating. This will allow an application to decide on the best
+authentication mechanism
+
+Win32 pthreads
+--------------
+
+Allow Windows threading model to be replaced by Win32 pthreads port
+
+dynamic buffer size
+-------------------
+
+Implement a dynamic buffer size to allow SFTP to use much larger buffers and
+possibly allow the size to be customizable by applications. Use less memory
+when handles are not in use?
+
+New stuff - curl
+----------------
+
+1. Embed a language interpreter (lua?). For that middle ground where curl
+ isn’t enough and a libcurl binding feels “too much”. Build-time conditional
+ of course.
+
+2. Simplify the SMTP command line so that the headers and multi-part content
+ don't have to be constructed before calling curl
+
+Improve
+-------
+
+1. build for windows (considered hard by many users)
+
+2. curl -h output (considered overwhelming to users)
+
+3. we have > 160 command line options, is there a way to redo things to
+ simplify or improve the situation as we are likely to keep adding
+ features/options in the future too
+
+4. docs (considered "bad" by users but how do we make it better?)
+
+ - split up curl.1
+
+5. authentication framework (consider merging HTTP and SASL authentication to
+ give one API for protocols to call)
+
+6. Perform some of the clean up from the TODO document, removing old
+ definitions and such like that are currently earmarked to be removed years
+ ago
+
+Remove
+------
+
+1. makefile.vc files as there is no point in maintaining two sets of Windows
+ makefiles. Note: These are currently being used by the Windows autobuilds
diff --git a/docs/SECURITY b/docs/SECURITY
new file mode 100644
index 0000000..ee844d8
--- /dev/null
+++ b/docs/SECURITY
@@ -0,0 +1,107 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+curl security for developers
+============================
+
+This document is intended to provide guidance to curl developers on how
+security vulnerabilities should be handled.
+
+Publishing Information
+----------------------
+
+All known and public curl or libcurl related vulnerabilities are listed on
+[the curl web site security page](http://curl.haxx.se/docs/security.html).
+
+Security vulnerabilities should not be entered in the project's public bug
+tracker unless the necessary configuration is in place to limit access to the
+issue to only the reporter and the project's security team.
+
+Vulnerability Handling
+----------------------
+
+The typical process for handling a new security vulnerability is as follows.
+
+No information should be made public about a vulnerability until it is
+formally announced at the end of this process. That means, for example that a
+bug tracker entry must NOT be created to track the issue since that will make
+the issue public and it should not be discussed on any of the project's public
+mailing lists. Also messages associated with any commits should not make
+any reference to the security nature of the commit if done prior to the public
+announcement.
+
+- The person discovering the issue, the reporter, reports the vulnerability
+ privately to `[email protected]`. That's an email alias that reaches a
+ handful of selected and trusted people.
+
+- Messages that do not relate to the reporting or managing of an undisclosed
+ security vulnerability in curl or libcurl are ignored and no further action
+ is required.
+
+- A person in the security team sends an e-mail to the original reporter to
+ acknowledge the report.
+
+- The security team investigates the report and either rejects it or accepts
+ it.
+
+- If the report is rejected, the team writes to the reporter to explain why.
+
+- If the report is accepted, the team writes to the reporter to let him/her
+ know it is accepted and that they are working on a fix.
+
+- The security team discusses the problem, works out a fix, considers the
+ impact of the problem and suggests a release schedule. This discussion
+ should involve the reporter as much as possible.
+
+- The release of the information should be "as soon as possible" and is most
+ often synced with an upcoming release that contains the fix. If the
+ reporter, or anyone else, thinks the next planned release is too far away
+ then a separate earlier release for security reasons should be considered.
+
+- Write a security advisory draft about the problem that explains what the
+ problem is, its impact, which versions it affects, solutions or
+ workarounds, when the release is out and make sure to credit all
+ contributors properly.
+
+- Request a CVE number from distros@openwall[1] when also informing and
+ preparing them for the upcoming public security vulnerability announcement -
+ attach the advisory draft for information. Note that 'distros' won't accept
+ an embargo longer than 19 days.
+
+- Update the "security advisory" with the CVE number.
+
+- The security team commits the fix in a private branch. The commit message
+ should ideally contain the CVE number. This fix is usually also distributed
+ to the 'distros' mailing list to allow them to use the fix prior to the
+ public announcement.
+
+- At the day of the next release, the private branch is merged into the master
+ branch and pushed. Once pushed, the information is accessible to the public
+ and the actual release should follow suit immediately afterwards.
+
+- The project team creates a release that includes the fix.
+
+- The project team announces the release and the vulnerability to the world in
+ the same manner we always announce releases. It gets sent to the
+ curl-announce, curl-library and curl-users mailing lists.
+
+- The security web page on the web site should get the new vulnerability
+ mentioned.
+
+[1] = http://oss-security.openwall.org/wiki/mailing-lists/distros
+
+CURL-SECURITY (at haxx dot se)
+------------------------------
+
+Who is on this list? There are a couple of criteria you must meet, and then we
+might ask you to join the list or you can ask to join it. It really isn't very
+formal. We basically only require that you have a long-term presence in the
+curl project and you have shown an understanding for the project and its way
+of working. You must've been around for a good while and you should have no
+plans in vanishing in the near future.
+
+We do not make the list of partipants public mostly because it tends to vary
+somewhat over time and a list somewhere will only risk getting outdated.
diff --git a/docs/SSL-PROBLEMS b/docs/SSL-PROBLEMS
new file mode 100644
index 0000000..3650267
--- /dev/null
+++ b/docs/SSL-PROBLEMS
@@ -0,0 +1,67 @@
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
+
+SSL problems
+
+ First, let's establish that we often refer to TLS and SSL interchangeably as
+ SSL here. The current protocol is called TLS, it was called SSL a long time
+ ago.
+
+ There are several known reasons why a connection that involves SSL might
+ fail. This is a document that attempts to details the most common ones and
+ how to mitigate them.
+
+CA certs
+
+ CA certs are used to digitally verify the server's certificate. You need a
+ "ca bundle" for this. See lots of more details on this in the SSLCERTS
+ document.
+
+CA bundle missing intermediate certificates
+
+ When using said CA bundle to verify a server cert, you will experience
+ problems if your CA cert does not have the certificates for the
+ intermediates in the whole trust chain.
+
+SSL version
+
+ Some broken servers fail to support the protocol negotiation properly that
+ SSL servers are supposed to handle. This may cause the connection to fail
+ completely. Sometimes you may need to explicitly select a SSL version to use
+ when connecting to make the connection succeed.
+
+ An additional complication can be that modern SSL libraries sometimes are
+ built with support for older SSL and TLS versions disabled!
+
+SSL ciphers
+
+ Clients give servers a list of ciphers to select from. If the list doesn't
+ include any ciphers the server wants/can use, the connection handshake
+ fails.
+
+ curl has recently disabled the user of a whole bunch of seriously insecure
+ ciphers from its default set (slightly depending on SSL backend in use).
+
+ You may have to explicitly provide an alternative list of ciphers for curl
+ to use to allow the server to use a WEAK cipher for you.
+
+ Note that these weak ciphers are identified as flawed. For example, this
+ includes symmetric ciphers with less than 128 bit keys and RC4.
+
+ References:
+
+ https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
+
+Allow BEAST
+
+ BEAST is the name of a TLS 1.0 attack that surfaced 2011. When adding means
+ to mitigate this attack, it turned out that some broken servers out there in
+ the wild didn't work properly with the BEAST mitigation in place.
+
+ To make such broken servers work, the --ssl-allow-beast option was
+ introduced. Exactly as it sounds, it re-introduces the BEAST vulnerability
+ but on the other hand it allows curl to connect to that kind of strange
+ servers.
diff --git a/docs/SSLCERTS b/docs/SSLCERTS
index 0d1414c..89e5bb6 100644
--- a/docs/SSLCERTS
+++ b/docs/SSLCERTS
@@ -1,17 +1,46 @@
- Peer SSL Certificate Verification
- =================================
+SSL Certificate Verification
+============================
+
+SSL is TLS
+----------
+
+SSL is the old name. It is called TLS these days.
+
+
+Native SSL
+----------
+
+If libcurl was built with Schannel or Secure Transport support (the native SSL
+libraries included in Windows and Mac OS X), then this does not apply to
+you. Scroll down for details on how the OS-native engines handle SSL
+certificates. If you're not sure, then run "curl -V" and read the results. If
+the version string says "WinSSL" in it, then it was built with Schannel
+support.
+
+It is about trust
+-----------------
+
+This system is about trust. In your local CA cert bundle you have certs from
+*trusted* Certificate Authorities that you then can use to verify that the
+server certificates you see are valid. They're signed by one of the CAs you
+trust.
+
+Which CAs do you trust? You can decide to trust the same set of companies your
+operating system trusts, or the set one of the known browsers trust. That's
+basically trust via someone else you trust. You should just be aware that
+modern operating systems and browsers are setup to trust *hundreds* of
+companies and recent years several such CAs have been found untrustworthy.
+
+Certificate Verification
+------------------------
libcurl performs peer SSL certificate verification by default. This is done
by using CA cert bundle that the SSL library can use to make sure the peer's
server certificate is valid.
-If you communicate with HTTPS or FTPS servers using certificates that are
-signed by CAs present in the bundle, you can be sure that the remote server
-really is the one it claims to be.
-
-Until 7.18.0, curl bundled a severely outdated ca bundle file that was
-installed by default. These days, the curl archives include no ca certs at
-all. You need to get them elsewhere. See below for example.
+If you communicate with HTTPS, FTPS or other TLS-using servers using
+certificates that are signed by CAs present in the bundle, you can be sure
+that the remote server really is the one it claims to be.
If the remote server uses a self-signed certificate, if you don't install a CA
cert bundle, if the server uses a certificate signed by a CA that isn't
@@ -20,13 +49,13 @@
server, do one of the following:
1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
+ `curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);`
With the curl command line tool, you disable this with -k/--insecure.
2. Get a CA certificate that can verify the remote server and use the proper
option to point out this CA cert for verification when connecting. For
- libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath);
+ libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAPATH, capath);`
With the curl command line tool: --cacert [file]
@@ -40,32 +69,32 @@
If you use Internet Explorer, this is one way to get extract the CA cert
for a particular server:
- o View the certificate by double-clicking the padlock
- o Find out where the CA certificate is kept (Certificate>
+ - View the certificate by double-clicking the padlock
+ - Find out where the CA certificate is kept (Certificate>
Authority Information Access>URL)
- o Get a copy of the crt file using curl
- o Convert it from crt to PEM using the openssl tool:
+ - Get a copy of the crt file using curl
+ - Convert it from crt to PEM using the openssl tool:
openssl x509 -inform DES -in yourdownloaded.crt \
-out outcert.pem -text
- o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
+ - Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
as described below.
If you use the 'openssl' tool, this is one way to get extract the CA cert
for a particular server:
- o openssl s_client -connect xxxxx.com:443 |tee logfile
- o type "QUIT", followed by the "ENTER" key
- o The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
+ - `openssl s_client -connect xxxxx.com:443 |tee logfile`
+ - type "QUIT", followed by the "ENTER" key
+ - The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
markers.
- o If you want to see the data in the certificate, you can do: "openssl
+ - If you want to see the data in the certificate, you can do: "openssl
x509 -inform PEM -in certfile -text -out certdata" where certfile is
the cert you extracted from logfile. Look in certdata.
- o If you want to trust the certificate, you can append it to your
- cert_bundle or use it stand-alone as described. Just remember that the
+ - If you want to trust the certificate, you can append it to your
+ cert bundle or use it stand-alone as described. Just remember that the
security is no better than the way you obtained the certificate.
4. If you're using the curl command line tool, you can specify your own CA
- cert path by setting the environment variable CURL_CA_BUNDLE to the path
+ cert path by setting the environment variable `CURL_CA_BUNDLE` to the path
of your choice.
If you're using the curl command line tool on Windows, curl will search
@@ -80,9 +109,7 @@
5. Get a better/different/newer CA cert bundle! One option is to extract the
one a recent Firefox browser uses by running 'make ca-bundle' in the curl
build tree root, or possibly download a version that was generated this
- way for you:
-
- http://curl.haxx.se/docs/caextract.html
+ way for you: [CA Extract](http://curl.haxx.se/docs/caextract.html)
Neglecting to use one of the above methods when dealing with a server using a
certificate that isn't signed by one of the certificates in the installed CA
@@ -90,27 +117,37 @@
during the handshake and SSL will then refuse further communication with that
server.
- Peer SSL Certificate Verification with NSS
- ==========================================
+Certificate Verification with NSS
+---------------------------------
-If libcurl is build with NSS support then depending on the OS distribution it
-is probably required to take some additional steps to use the system-wide CA
-cert db. RedHat ships with an additional module libnsspem.so which enables NSS
-to read the OpenSSL PEM CA bundle. With OpenSuSE this lib is missing, and NSS
-can only work with its own internal formats. Also NSS got a new database
-format:
-https://wiki.mozilla.org/NSS_Shared_DB
-Starting with version 7.19.7 libcurl will check for the NSS version it runs,
-and add automatically the 'sql:' prefix to the certdb directory (either the
-hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR
-environment variable) if a version 3.12.0 or later is detected.
-To check which certdb format your distribution provides examine the default
-certdb location /etc/pki/nssdb; the new certdb format can be identified by
-the filenames cert9.db, key4.db, pkcs11.txt; filenames of older versions are
-cert8.db, key3.db, modsec.db.
-Usually these cert databases are empty; but NSS also has built-in CAs which are
-provided through a shared library libnssckbi.so; if you want to use these
-built-in CAs then create a symlink to libnssckbi.so in /etc/pki/nssdb:
-ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so
+If libcurl was built with NSS support, then depending on the OS distribution,
+it is probably required to take some additional steps to use the system-wide
+CA cert db. RedHat ships with an additional module, libnsspem.so, which
+enables NSS to read the OpenSSL PEM CA bundle. This library is missing in
+OpenSuSE, and without it, NSS can only work with its own internal formats. NSS
+also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB).
+Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to
+the certdb directory (either the hardcoded default /etc/pki/nssdb or the
+directory configured with SSL_DIR environment variable). To check which certdb
+format your distribution provides, examine the default certdb location:
+/etc/pki/nssdb; the new certdb format can be identified by the filenames
+cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db,
+key3.db, secmod.db.
+Certificate Verification with Schannel and Secure Transport
+-----------------------------------------------------------
+
+If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure
+Transport (Apple's native TLS engine) support, then libcurl will still perform
+peer certificate verification, but instead of using a CA cert bundle, it will
+use the certificates that are built into the OS. These are the same
+certificates that appear in the Internet Options control panel (under Windows)
+or Keychain Access application (under OS X). Any custom security rules for
+certificates will be honored.
+
+Schannel will run CRL checks on certificates unless peer verification is
+disabled. Secure Transport on iOS will run OCSP checks on certificates unless
+peer verification is disabled. Secure Transport on OS X will run either OCSP
+or CRL checks on certificates if those features are enabled, and this behavior
+can be adjusted in the preferences of Keychain Access.
diff --git a/docs/THANKS b/docs/THANKS
index a85f488..89a738d 100644
--- a/docs/THANKS
+++ b/docs/THANKS
@@ -4,134 +4,224 @@
If you have contributed but are missing here, please let us know!
+Aaro Koskinen
Aaron Oneal
+Aaron Orenstein
+Abram Pousada
Adam D. Moss
Adam Light
Adam Piggott
+Adam Sampson
+Adam Tkac
Adrian Schuur
+Adriano Meirelles
+Ajit Dhumale
+Aki Koskinen
Akos Pasztory
Alan Pinstein
Albert Chin-A-Young
Albert Choy
Ale Vesely
+Alejandro Alvarez Ayllon
Aleksandar Milivojevic
+Aleksey Tulinov
+Alessandro Ghedini
Alessandro Vesely
Alex Bligh
Alex Fishman
+Alex Gruz
+Alex McLellan
Alex Neblett
Alex Suykov
+Alex Vinnik
Alex aka WindEagle
Alexander Beedie
+Alexander Dyagilev
+Alexander Elgert
+Alexander Klauer
Alexander Kourakos
Alexander Krasnostavsky
Alexander Lazic
+Alexander Pepper
+Alexander Peslyak
Alexander Zhuravlev
Alexey Borzov
Alexey Pesternikov
Alexey Simak
+Alexey Zakhlestin
Alexis Carvalho
+Alfred Gebert
Allen Pulsifer
+Alona Rossen
Amol Pattekar
+Amr Shahin
Anatoli Tubman
+Anders Bakken
Anders Gustafsson
+Anders Havn
Andi Jahja
Andre Guibert de Bruet
+Andre Heinecke
Andreas Damm
Andreas Faerber
Andreas Farber
+Andreas Malzahn
Andreas Ntaflos
Andreas Olsson
Andreas Rieke
Andreas Schuldei
Andreas Wurf
Andrei Benea
-Andres Garcia
+Andrei Cipu
+Andrei Kurushin
+Andrej E Baranov
Andrew Benham
Andrew Biggs
Andrew Bushnell
Andrew Francis
Andrew Fuller
+Andrew Kurushin
Andrew Moise
Andrew Wansink
Andrew de los Reyes
-Andrés García
+Andrey Labunets
+Andrii Moiseiev
+Andrés García
Andy Cedilnik
Andy Serpa
Andy Tsouladze
Angus Mackay
+Anthon Pang
+Anthony Avina
Anthony Bryan
+Anthony G. Basile
Antoine Calando
+Anton Bychkov
Anton Kalmykov
+Anton Malov
+Anton Yabchinskiy
Arkadiusz Miskiewicz
Armel Asselin
+Arnaud Compan
Arnaud Ebalard
+Arthur Murray
Arve Knudsen
+Arvid Norberg
+Ashish Shukla
+Ask Bjørn Hansen
+Askar Safin
Ates Goral
Augustus Saunders
Avery Fay
Axel Tillequin
+Balaji Parasuram
+Balaji Salunke
Balint Szilakszi
+Barry Abrahamson
Bart Whiteley
Bas Mevissen
+Ben Boeckel
Ben Darnell
Ben Greear
Ben Madsen
+Ben Noordhuis
Ben Van Hof
+Ben Winslow
Benbuck Nason
Benjamin Gerard
+Benjamin Gilbert
+Benjamin Johnson
+Benoit Neil
+Benoit Sigoure
Bernard Leak
+Bernhard Reutner-Fischer
+Bert Huijben
Bertrand Demiddelaer
+Bill Doyle
Bill Egert
Bill Hoffman
+Bill Middlecamp
+Bill Nagel
+Bjoern Sikora
Bjorn Augustsson
Bjorn Reese
-Björn Stenberg
+Björn Stenberg
+Blaise Potard
+Bob Relyea
Bob Richmond
Bob Schader
Bogdan Nicula
Brad Burdick
+Brad Harder
+Brad Hards
+Brad King
+Brad Spencer
Bradford Bruce
+Brandon Casey
+Brandon Wang
Brendan Jurd
Brent Beardsley
Brian Akins
+Brian Chrisman
Brian Dessent
Brian J. Murrell
+Brian Prodoehl
Brian R Duffy
Brian Ulm
Brock Noland
Bruce Mitchener
+Bruno Thomsen
+Bruno de Carvalho
Bryan Henderson
Bryan Kemp
+Byrial Jensen
+Cameron Kaiser
Camille Moncelier
Caolan McNamara
+Carlo Wood
Carsten Lange
Casey O'Donnell
+Catalin Patulea
Chad Monroe
+Chandrakant Bagul
Charles Kerr
+Charles Romestant
+Chen Prog
Chih-Chung Chang
Chris "Bob Bob"
+Chris Araman
Chris Combes
-Chris Conroy
+Chris Conlon
Chris Deidun
Chris Flerackers
Chris Gaukroger
Chris Maltby
Chris Mumford
+Chris Smowton
+Chris Young
+Christian Grothoff
+Christian Hägele
Christian Krause
Christian Kurz
Christian Robottom Reis
Christian Schmitz
Christian Vogt
+Christian Weisgerber
Christophe Demory
Christophe Legry
Christopher Conroy
Christopher Palow
Christopher R. Palmer
+Christopher Stone
Ciprian Badescu
Claes Jakobsson
Clarence Gardner
+Clemens Gruber
Clifford Wolf
Cody Jones
+Cody Mack
+Colby Ranger
+Colin Blair
Colin Hogben
Colin Watson
Colm Buckley
@@ -141,12 +231,20 @@
Craig Davison
Craig Markwardt
Cris Bailiff
+Cristian Rodríguez
Curt Bogmine
Cyrill Osterwalder
+Cédric Deltheil
+D. Flinkmann
+Da-Yoon Chung
+Dag Ekengren
+Dagobert Michelsen
+Damian Dixon
Damien Adant
Dan Becker
Dan C
Dan Fandrich
+Dan Locks
Dan Nelson
Dan Petitt
Dan Torop
@@ -154,19 +252,25 @@
Daniel Black
Daniel Cater
Daniel Egger
-Daniel Fandrich
Daniel Johnson
+Daniel Melani
+Daniel Mentz
Daniel Steinberg
Daniel Stenberg
+Daniel Theron
Daniel at touchtunes
Darryl House
+Darshan Mody
Dave Dribin
Dave Halbakken
Dave Hamilton
Dave May
+Dave Reisner
+Dave Thompson
Dave Vasilevsky
David Bau
David Binderman
+David Blaikie
David Byron
David Cohen
David Eriksson
@@ -179,31 +283,47 @@
David Lang
David LeBlanc
David McCreedy
+David Meyer
David Odin
David Phillips
David Rosenstrauch
+David Ryskalczyk
David Shaw
+David Strauss
David Tarendash
David Thiel
+David Walser
+David Woodhouse
David Wright
David Yan
Dengminwen
+Dennis Clarke
+Derek Higgins
Detlef Schmier
Didier Brisebourg
Diego Casorran
+Dilyan Palauzov
Dima Barsky
+Dima Tisnek
+Dimitar Boevski
+Dimitre Dimitrov
+Dimitrios Siganos
Dimitris Sarris
Dinar
Dirk Eddelbuettel
Dirk Manske
+Dmitri Shubin
Dmitriy Sergeyev
Dmitry Bartsevich
+Dmitry Eremin-Solenikov
+Dmitry Falko
Dmitry Kurochkin
Dmitry Popov
Dmitry Rechkin
Dolbneff A.V
Domenico Andreoli
Dominick Meglio
+Dominique Leuenberger
Doug Kaufman
Doug Porter
Douglas E. Wegscheid
@@ -211,6 +331,7 @@
Douglas R. Horner
Douglas Steinwand
Dov Murik
+Drake Arconis
Duane Cathey
Duncan Mac-Vicar Prett
Dustin Boswell
@@ -218,60 +339,91 @@
Dylan Salisbury
Early Ehlinger
Ebenezer Ikonne
+Ed Morley
Edin Kadribasic
Eduard Bloch
+Edward Rudd
+Edward Sheldrake
+Eelco Dolstra
Eetu Ojanen
+Egon Eckert
+Eldar Zaitov
Ellis Pritchard
+Elmira A Semenova
Emanuele Bovisio
+Emil Lerner
Emil Romanus
Emiliano Ida
Enrico Scholz
Enrik Berkhan
Eric Cooper
+Eric Hu
Eric Landes
Eric Lavigne
+Eric Lubin
Eric Melville
Eric Mertens
Eric Rautman
+Eric S. Raymond
Eric Thelin
Eric Vergnaud
Eric Wong
Eric Young
Erick Nuwendam
+Erik Johansson
+Ernest Beinrohr
Erwan Legrand
Erwin Authried
+Ethan Glasser Camp
Eugene Kotlyarov
Evan Jordan
+Evgeny Turnaev
Eygene Ryabinkin
+Fabian Frank
+Fabian Hiernaux
Fabian Keil
Fabrizio Ammollo
Fedor Karpelevitch
+Felix Yan
Felix von Leitner
Feng Tu
Florian Schoppmann
+Florian Weimer
Forrest Cahoon
+Frank Gevaerts
Frank Hempel
Frank Keeney
Frank McGeough
Frank Meier
Frank Ticheler
+Frank Van Uffelen
+František Kučera
+François Charlier
Fred Machado
Fred New
Fred Noz
+Fred Stluka
Frederic Lepied
+Fredrik Thulin
Gabriel Kuri
+Gabriel Sjoberg
+Garrett Holmstrom
Gary Maxwell
Gautam Kachroo
Gautam Mani
Gavrie Philipson
Gaz Iqbal
+Gaël Portay
+Geoff Beier
Georg Horn
Georg Huettenegger
Georg Lippitsch
Georg Wicherski
Gerd v. Egidy
+Gergely Nagy
Gerhard Herre
-Gerrit Bruchhäuser
+Gerrit Bruchhäuser
+Ghennadi Procopciuc
Giancarlo Formicuccia
Giaslas Georgios
Gil Weber
@@ -281,34 +433,57 @@
Gisle Vanem
Giuseppe Attardi
Giuseppe D'Ambrosio
+Glen A Johnson Jr.
Glen Nakamura
Glen Scott
+Glenn Sheridan
+Gordon Marler
+Gorilla Maguila
Grant Erickson
+Grant Pannell
Greg Hewgill
Greg Morse
Greg Onufer
+Greg Pratt
Greg Zavertnik
Grigory Entin
Guenole Bescon
Guenter Knauf
+Guido Berhoerster
Guillaume Arluison
+Gunter Knauf
Gustaf Hui
Gwenole Beauchesne
-Götz Babin-Ebell
+Gökhan Şengün
+Götz Babin-Ebell
Hamish Mackenzie
Hang Kin Lau
+Hang Su
+Hanno Böck
Hanno Kranzhoff
Hans Steegers
Hans-Jurgen May
Hardeep Singh
+Haris Okanovic
Harshal Pradhan
Hauke Duden
+He Qin
Heikki Korpela
+Heinrich Ko
+Heinrich Schaefer
+Helwing Lutz
+Hendrik Visage
Henrik Storner
+Henry Ludemann
+Herve Amblard
Hidemoto Nakada
+Ho-chi Chen
Hoi-Ho Chan
+Hongli Lai
Howard Chu
+Hubert Kario
Hzhijun
+Ian D Allen
Ian Ford
Ian Gulliver
Ian Lynagh
@@ -318,21 +493,27 @@
Igor Franchuk
Igor Novoseltsev
Igor Polyakov
+Iida Yosiaki
Ilguiz Latypov
Ilja van Sprundel
Immanuel Gregoire
Ingmar Runge
Ingo Ralf Blum
Ingo Wilken
+Isaac Boukris
+Ishan SinghLevett
+Ivo Bellin Salarin
Jack Zhang
Jacky Lam
Jacob Meuser
Jacob Moshenko
Jad Chamcham
+Jakub Zakrzewski
James Bursa
James Cheng
James Clancy
James Cone
+James Dury
James Gallagher
James Griffiths
James Housley
@@ -340,81 +521,139 @@
Jamie Lokier
Jamie Newton
Jamie Wilkinson
+Jan Ehrhardt
+Jan Koen Annot
Jan Kunder
+Jan Schaumann
Jan Van Boghout
+Jared Jennings
Jared Lundell
+Jari Aalto
Jari Sundell
+Jason Glasgow
+Jason Liu
Jason McDonald
Jason S. Priebe
+Javier Barroso
Jay Austin
Jayesh A Shah
Jaz Fresh
Jean Jacques Drouin
Jean-Claude Chauve
Jean-Francois Bertrand
+Jean-Francois Durand
Jean-Louis Lemaire
Jean-Marc Ranger
+Jean-Noël Rouvignac
Jean-Philippe Barrette-LaPierre
+Jeff Connelly
+Jeff Hodges
Jeff Johnson
+Jeff King
Jeff Lawson
Jeff Phillips
Jeff Pohlmeyer
Jeff Weber
-Jeffrey Pohlmeyer
+Jens Rantil
Jeremy Friesner
+Jeremy Huddleston
+Jeremy Lin
+Jeroen Koekkoek
+Jeroen Ooms
Jerome Muffat-Meridol
+Jerome Robert
Jerome Vouillon
+Jerry Krinock
+Jerry Wu
Jes Badwal
Jesper Jensen
Jesse Noller
+Jie He
Jim Drash
Jim Freeman
+Jim Hollinger
Jim Meyering
+Jiri Dvorak
+Jiri Hruska
+Jiri Jaburek
+Jiri Malak
Jocelyn Jaubert
Joe Halpin
Joe Malicki
+Joe Mason
Joel Chen
+Joel Depooter
Jofell Gallardo
Johan Anderson
+Johan Lantz
Johan Nilsson
Johan van Selst
+Johannes Bauer
+Johannes Ernst
+John Bradshaw
+John Coffey
John Crow
John Dennis
+John Dunn
John E. Malmberg
+John Gardiner Myers
John Janssen
+John Joseph Bachir
John Kelly
John Lask
John Lightsey
+John Marino
+John Marshall
John McGowan
John P. McCaskey
+John Suprock
John Wilkinson
John-Mark Bell
Johnny Luong
Jon Grubbs
Jon Nelson
Jon Sargeant
+Jon Seymour
+Jon Spencer
+Jon Torrey
Jon Travis
Jon Turner
Jonas Forsman
+Jonas Schnelli
Jonatan Lander
+Jonatan Vela
+Jonathan Cardoso Machado
+Jonathan Cardoso Machado Machado
Jonathan Hseu
+Jonathan Nieder
Jongki Suwandi
+Jose Alf
Jose Kahan
Josef Wolf
Josh Kapell
Joshua Kwan
+Josue Andrade Gomes
+Juan Barreto
Juan F. Codagnone
-Juan Ignacio Hervás
+Juan Ignacio Hervás
Judson Bishop
Juergen Wilke
Jukka Pihl
Julian Noble
+Julian Ospald
+Julian Taylor
Julien Chaffraix
+Julien Nabet
+Julien Royer
Jun-ichiro itojun Hagino
Jurij Smakov
Justin Fletcher
-Jörg Mueller-Tolk
-Jörn Hartroth
+Justin Karneges
+Justin Maggard
+Jörg Mueller-Tolk
+Jörn Hartroth
+K. R. Walker
+Kai Engert
Kai Sommerfeld
Kai-Uwe Rommel
Kalle Vahlman
@@ -439,62 +678,104 @@
Kevin Reed
Kevin Roth
Kim Rinnewitz
+Kim Vandry
Kimmo Kinnunen
Kjell Ericson
Kjetil Jacobsen
Klevtsov Vadim
+Konstantin Isakov
Kris Kennaway
Krishnendu Majumdar
Krister Johansen
Kristian Gunstone
-Kristian Köhntopp
+Kristian Köhntopp
+Kyle J. McKay
+Kyle L. Huff
Kyle Sallee
Lachlan O'Dea
Larry Campbell
Larry Fahnoe
+Larry Lin
+Larry Stone
+Lars Buitinck
Lars Gustafsson
Lars J. Aas
+Lars Johannesen
Lars Nilsson
Lars Torben Wilson
Lau Hang Kin
Laurent Rabret
Legoff Vincent
Lehel Bernadt
+Leif W
+Leith Bade
Len Krause
Lenaic Lefever
Lenny Rachitsky
+Leon Winter
+Leonardo Rosati
Liam Healy
+Lijo Antony
Linas Vepstas
+Lindley French
Ling Thio
Linus Nielsen Feltzing
Lisa Xu
+Liviu Chircu
Liza Alenchery
+Lluís Batlle i Rossell
Loic Dachary
Loren Kirkby
+Luan Cestari
Luca Altea
-Luca Alteas
Lucas Adamski
+Lucas Pardue
+Ludek Finstrle
+Ludovico Cavedon
Lukasz Czekierda
+Luke Amery
Luke Call
+Luke Dashjr
Luong Dinh Dung
+Lyndon Hill
Maciej Karpiuk
+Maciej Puzio
Maciej W. Rozycki
+Maks Naumov
+Mamoru Tasaka
+Mandy Wu
Manfred Schwarb
+Manuel Massing
Marc Boucher
+Marc Deslauriers
+Marc Doughty
+Marc Hesse
+Marc Hoersken
Marc Kleine-Budde
+Marc Renault
+Marcel Raad
+Marcel Roelofs
Marcelo Juchem
+Marcin Adamski
+Marcin Gryszkalis
Marcin Konicki
Marco G. Salvagno
Marco Maggi
+Marcus Sundberg
Marcus Webster
Mario Schroeder
+Mark Brand
Mark Butler
Mark Davies
Mark Eichin
Mark Incley
Mark Karpeles
Mark Lentczner
+Mark Salisbury
+Mark Snelling
+Mark Tully
Markus Duft
+Markus Elfring
Markus Koetter
Markus Moeller
Markus Oberhumer
@@ -503,6 +784,8 @@
Martin Drasar
Martin Hager
Martin Hedenfalk
+Martin Jansen
+Martin Lemke
Martin Skinner
Martin Storsjo
Marty Kuhrt
@@ -512,101 +795,163 @@
Mateusz Loskot
Mathias Axelsson
Mats Lidell
+Matt Arsenault
+Matt Ford
Matt Kraai
Matt Veenstra
Matt Witherspoon
Matt Wixson
+Matteo Rocco
Matthew Blain
Matthew Clarke
+Matthew Hall
+Matthias Bolte
Maurice Barnum
+Mauro Iorio
Max Katsev
Maxim Ivanov
Maxim Perenesenko
+Maxim Prohorov
+Maxime Larocque
+Mehmet Bozkurt
Mekonikum
+Melissa Mears
Mettgut Jamalla
Michael Benedict
Michael Calmer
Michael Cronenworth
Michael Curtis
+Michael Day
Michael Goffioul
Michael Jahn
Michael Jerris
+Michael Kaufmann
Michael Mealling
+Michael Mueller
+Michael Osipov
Michael Smith
+Michael Stapelberg
Michael Stillwell
Michael Wallner
Michal Bonino
Michal Marek
+Michał Górny
+Michał Kowalczyk
+Michel Promonet
Michele Bini
+Miguel Angel
+Miguel Diaz
Mihai Ionescu
Mikael Johansson
Mikael Sennerholm
Mike Bytnar
Mike Crowe
Mike Dobbs
+Mike Giancola
+Mike Hasselberg
+Mike Henshaw
Mike Hommey
+Mike Mio
Mike Power
Mike Protts
Mike Revi
Miklos Nemeth
+Miroslav Spousta
Mitz Wark
Mohamed Lrhazi
+Mohammad AlSaleh
Mohun Biswas
-Moonesamy
+Mostyn Bramley-Moore
+Myk Taylor
+Nach M. S.
+Nagai H
Nathan Coulter
Nathan O'Sullivan
Nathanael Nerode
+Naveen Chandran
Naveen Noel
+Neil Bowers
Neil Dunbar
Neil Spring
Nic Roets
+Nicholas Maniscalco
Nick Gimbrone
Nick Humfrey
Nick Zitzmann
Nico Baggus
Nicolas Berloquin
Nicolas Croiset
-Nicolas François
+Nicolas François
Niels van Tongeren
Nikita Schmidt
Nikitinskit Dmitriy
Niklas Angebrand
Nikolai Kondrashov
+Nikos Mavrogiannopoulos
+Ning Dong
Nir Soffer
Nis Jorgensen
+Nobuhiro Ban
Nodak Sodak
Norbert Frese
Norbert Novotny
Ofer
-Olaf Stueben
-Olaf Stüben
+Ola Mork
+Olaf Flebbe
+Olaf Stüben
+Oliver Gondža
+Oliver Kuckertz
+Oliver Schindler
+Olivier Berger
+Oren Souroujon
Oren Tirosh
+Orgad Shaneh
+Ori Avtalion
+Oscar Koeroo
+Oscar Norlander
P R Schaffner
+Paolo Piacentini
+Paras Sethia
Pascal Terjan
+Pasha Kuznetsov
+Pasi Karkkainen
Pat Ray
+Patrice Guerin
+Patricia Muscalu
Patrick Bihan-Faou
+Patrick McManus
Patrick Monnerat
+Patrick Rapin
Patrick Scott
Patrick Smith
+Patrick Watson
Patrik Thunstrom
+Pau Garcia i Quiles
+Paul Donohue
Paul Harrington
Paul Howarth
+Paul Marks
Paul Marquis
Paul Moore
Paul Nolan
+Paul Oliver
Paul Querna
+Paul Saab
Pavel Cenek
Pavel Orehov
Pavel Raiskup
Pawel A. Gajda
Pawel Kierski
+Pedro Larroy
Pedro Neves
-Pete Su
Peter Bray
Peter Forret
+Peter Gal
Peter Heuchert
+Peter Hjalmarsson
Peter Korsgaard
Peter Lamberg
+Peter Laser
Peter O'Gorman
Peter Pentchev
Peter Silva
@@ -614,12 +959,18 @@
Peter Sylvester
Peter Todd
Peter Verhas
+Peter Wang
+Peter Wu
Peter Wullinger
Peteris Krumins
+Petr Bahula
+Petr Novak
+Petr Pisar
Phil Blundell
Phil Karn
Phil Lisiecki
Phil Pellouchoud
+Philip Craig
Philip Gladstone
Philip Langdale
Philippe Hameau
@@ -627,15 +978,26 @@
Philippe Vaucher
Pierre
Pierre Brico
+Pierre Chapuis
Pierre Joye
+Pierre Ynard
Pooyan McSporran
Pramod Sharma
+Prash Dush
+Priyanka Shah
Puneet Pawaia
Quagmire
+Quanah Gibson-Mount
+Quinn Slack
+Radu Simionescu
Rafa Muyo
Rafael Sagula
+Rafayel Mkrtchyan
+Rafaël Carré
Rainer Canavan
+Rainer Jung
Rainer Koenig
+Rajesh Naganathan
Ralf S. Engelschall
Ralph Beckmann
Ralph Mitchell
@@ -644,14 +1006,19 @@
Ravi Pratap
Ray Dassen
Ray Pekowski
+Ray Satiro
Reinout van Schouwen
+Remi Gacogne
Renato Botelho
Renaud Chaillat
Renaud Duhaut
+Renaud Guillard
Rene Bernhardt
Rene Rebe
Reuven Wachtfogel
+Reza Arbab
Ricardo Cadime
+Rich Burridge
Rich Gray
Rich Rauenzahn
Richard Archer
@@ -660,56 +1027,87 @@
Richard Clayton
Richard Cooper
Richard Gorton
+Richard Michael
+Richard Moore
Richard Prescott
+Richard Silverman
Rick Jones
Rick Richardson
Rob Crittenden
+Rob Davies
Rob Jones
Rob Stanzel
+Rob Ward
Robert A. Monat
+Robert B. Harris
Robert D. Young
Robert Foreman
Robert Iakobashvili
Robert Olson
+Robert Schumann
Robert Weaver
+Robert Wruck
Robin Cornelius
Robin Johnson
Robin Kay
Robson Braga Araujo
Rodney Simmons
+Rodric Glaser
+Rodrigo Silva
Roland Blom
Roland Krikava
Roland Zimmermann
Rolland Dudemaine
Roman Koifman
+Roman Mamedov
+Romulo A. Ceccon
+Ron Parker
Ron Zapp
Rosimildo da Silva
Roy Shan
Rune Kleveland
Ruslan Gazizov
+Rutger Hofman
+Ryan Braud
Ryan Chan
Ryan Nelson
+Ryan Schmidt
+Rémy Léone
S. Moonesamy
-Salvador Dávila
+Salvador Dávila
Salvatore Sorrentino
-Sam Listopad
+Sam Deane
+Sam Hurst
+Sam Schanken
Sampo Kellomaki
-Samuel Díaz García
+Samuel Díaz García
Samuel Listopad
+Samuel Thibault
Sander Gates
Sandor Feldi
+Santhana Todatry
+Saqib Ali
+Sara Golemon
+Saran Neti
+Sascha Swiercy
Saul good
+Scott Bailey
Scott Barrett
Scott Cantor
Scott Davis
Scott McCreary
-Sebastien Willemijns
+Sean Boudreau
+Sebastian Rasmussen
Senthil Raja Velu
+Sergei Nikulov
+Sergey Tatarincev
Sergio Ballestrero
Seshubabu Pasam
Sh Diao
+Shao Shuchao
Sharad Gupta
Shard
+Shawn Landden
Shawn Poulson
Shmulik Regev
Siddhartha Prakash Jain
@@ -722,18 +1120,28 @@
Sonia Subramanian
Spacen Jasset
Spiridonoff A.V
+Spork Schivago
Stadler Stephan
Stan van de Burgt
+Stanislav Ivochkin
+Stefan Bühler
+Stefan Eissing
Stefan Esser
Stefan Krause
+Stefan Neis
Stefan Teleman
+Stefan Tomanek
Stefan Ulrich
+Steinar H. Gunderson
Stephan Bergmann
Stephen Collyer
Stephen Kick
Stephen More
Sterling Hughes
Steve Green
+Steve H Truong
+Steve Havelka
+Steve Holme
Steve Lhomme
Steve Little
Steve Marx
@@ -741,44 +1149,76 @@
Steve Roskowski
Steven Bazyl
Steven G. Johnson
+Steven Gu
Steven M. Schweda
+Steven Parkes
Stoned Elipot
+Sune Ahlgren
Sven Anders
Sven Neuhaus
Sven Wegener
-Sébastien Willemijns
+Symeon Paraschoudis
+Sébastien Willemijns
T. Bharath
T. Yamada
+Tae Hyoung Ahn
+Taneli Vahakangas
Tanguy Fautre
+Tatsuhiro Tsujikawa
Temprimus
+Thomas Braun
Thomas J. Moore
Thomas Klausner
+Thomas L. Shinnick
Thomas Lopatic
+Thomas Ruecker
Thomas Schwinge
Thomas Tonino
+Tiit Pikma
+Till Maas
Tim Ansell
Tim Baker
Tim Bartley
Tim Chen
Tim Costello
+Tim Harder
+Tim Heckman
+Tim Newsome
+Tim Ruehsen
Tim Sneddon
-Tobias Rundström
+Tim Starling
+Timo Sirainen
+Tinus van den Berg
+Tobias Markus
+Tobias Rundström
+Tobias Stoeckmann
Toby Peterson
+Todd A Ouska
Todd Kulesza
+Todd Ouska
Todd Vierling
Tom Benoist
Tom Donovan
+Tom Grace
Tom Lee
Tom Mattison
Tom Moers
Tom Mueller
Tom Regner
+Tom Sparrow
+Tom Wright
Tom Zerucha
+Tomas Hoger
+Tomas Mlcoch
Tomas Pospisek
Tomas Szepe
+Tomas Tomecek
+Tomasz Kojm
Tomasz Lacki
+Tommie Gannert
Tommy Tam
Ton Voon
+Toni Moreno
Toon Verwaest
Tor Arntsen
Torsten Foertsch
@@ -788,36 +1228,70 @@
Troels Walsted Hansen
Troy Engel
Tupone Alfredo
-Ulf Härnhammar
+Tyler Hall
+Török Edwin
+Ulf Härnhammar
+Ulf Samuelsson
+Ulrich Doehner
+Ulrich Telle
Ulrich Zadow
Venkat Akella
Victor Snezhko
+Vijay Panghal
Vikram Saxena
+Viktor Szakáts
+Ville Skyttä
Vilmos Nebehaj
Vincent Bronner
Vincent Le Normand
Vincent Penquerc'h
Vincent Sanders
+Vincent Torri
Vlad Grachov
+Vlad Ureche
+Vladimir Grishchenko
Vladimir Lazarenko
Vojtech Janota
Vojtech Minarik
+Vojtěch Král
+Vsevolod Novikov
+Waldek Kozba
Walter J. Mack
+Ward Willats
+Warren Menzer
Wayne Haigh
Werner Koch
Wesley Laxton
Wesley Miaw
Wez Furlong
Wilfredo Sanchez
+Will Dietz
+Willem Sparreboom
+William Ahern
Wojciech Zwiefka
+Wouter Van Rooy
+Wu Yongzheng
Xavier Bouchoux
+Yaakov Selkowitz
+Yamada Yasuharu
Yang Tse
Yarram Sunil
+Yasuharu Yamada
+Yehezkel Horowitz
Yehoshua Hershberg
+Yi Huang
+Yingwei Liu
+Yousuke Kimoto
+Yukihiro Kawada
+Yun SangHo
Yuriy Sosov
+Yves Arrouye
Yves Lejeune
+Zdenek Pavlas
+Zekun Ni
Zmey Petroff
Zvi Har'El
nk
swalkaus at yahoo.com
tommink[at]post.pl
+Никита Дорохин
diff --git a/docs/THANKS-filter b/docs/THANKS-filter
new file mode 100644
index 0000000..39a8a4c
--- /dev/null
+++ b/docs/THANKS-filter
@@ -0,0 +1,52 @@
+# This is a list of names we have recorded that already are thanked
+# appropriately in THANKS. This list contains variations of their names and
+# their "canonical" name. This file is used for scripting purposes to avoid
+# duplicate entries and will not be included in release tarballs.
+# When removing dupes that aren't identical names from THANKS, add a line
+# here!
+#
+# Used-by: contributor.sh
+s/Andres Garcia/Andrés García/
+s/Chris Conroy/Christopher Conroy/
+s/Francois Charlier/François Charlier/
+s/Gokhan Sengun/Gökhan Şengün/
+s/John Malmberg/John E. Malmberg/
+s/Luca Alteas/Luca Altea/
+s/Michal Gorny/Michał Górny/
+s/Michal Górny/Michał Górny/
+s/Moonesamy/S. Moonesamy/
+s/Pete Su$/Peter Su/
+s/Sam Listopad/Samuel Listopad/
+s/Sebastien Willemijns/Sébastien Willemijns/
+s/YAMADA Yasuharu/Yasuharu Yamada/
+s/Karl M$/Karl Moerder/
+s/Bjorn Stenberg/Björn Stenberg/
+s/upstream tests 305 and 404//
+s/Gaël PORTAY/Gaël Portay/
+s/Romulo Ceccon/Romulo A. Ceccon/
+s/Nach M. S$/Nach M. S./
+s/Jay Satiro/Ray Satiro/
+s/Richard J. Moore/Richard Moore/
+s/Sergey Nikulov/Sergei Nikulov/
+s/Petr Písař/Petr Pisar/
+s/Nick Zitzmann (originally)/Nick Zitzmann/
+s/product-security at Apple//
+s/IT DOES NOT WORK//
+s/Albert Chin/Albert Chin-A-Young/
+s/Paras S\z/Paras Sethia/
+s/Paras Sethiaethia/Paras Sethia/
+s/Дмитрий Фалько/Dmitry Falko/
+s/byte_bucket in the #curl IRC channel//
+s/Michal Górny and Anthony G. Basile//
+s/Alejandro Alvarez$/Alejandro Alvarez Ayllon/
+s/Ant Bryan/Anthony Bryan/
+s/Cédric Deltheil/Cédric Deltheil/
+s/Christian Hagele/Christian Hägele/
+s/douglas steinwand/Douglas Steinwand/
+s/Frank Van Uffelen and Fabian Hiernaux//
+s/Rodrigo Silva (MestreLion)/Rodrigo Silva/
+s/tetetest tetetest//
+s/Jiří Hruška/Jiri Hruska/
+s/Viktor Szakats/Viktor Szakáts/
+s/Jonathan Cardoso/Jonathan Cardoso Machado/
+s/Linus Nielsen/Linus Nielsen Feltzing/
diff --git a/docs/TODO b/docs/TODO
index 0a4c981..65bf2ff 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -9,35 +9,47 @@
Things to do in project cURL. Please tell us what you think, contribute and
send us patches that improve things!
+ Be aware that these are things that we could do, or have once been considered
+ things we could do. If you want to work on any of these areas, please
+ consider bringing it up for discussions first on the mailing list so that we
+ all agree it is still a good idea for the project!
+
All bugs documented in the KNOWN_BUGS document are subject for fixing!
1. libcurl
- 1.1 Zero-copy interface
1.2 More data sharing
1.3 struct lifreq
1.4 signal-based resolver timeouts
+ 1.5 get rid of PATH_MAX
+ 1.6 Modified buffer size approach
+ 1.7 Detect when called from within callbacks
+ 1.8 Allow SSL (HTTPS) to proxy
+ 1.9 Cache negative name resolves
2. libcurl - multi interface
2.1 More non-blocking
- 2.2 Remove easy interface internally
- 2.3 Avoid having to remove/readd handles
- 2.4 Fix HTTP Pipelining for PUT
+ 2.2 Fix HTTP Pipelining for PUT
+ 2.3 Better support for same name resolves
3. Documentation
- 3.1 More and better
+ 3.1 Update date and version in man pages
4. FTP
4.1 HOST
4.2 Alter passive/active on failure and retry
4.3 Earlier bad letter detection
4.4 REST for large files
- 4.5 FTP proxy support
- 4.6 ASCII support
+ 4.5 ASCII support
+ 4.6 GSSAPI via Windows SSPI
+ 4.7 STAT for LIST without data connection
5. HTTP
5.1 Better persistency for HTTP 1.0
5.2 support FF3 sqlite cookie files
5.3 Rearrange request header order
+ 5.4 SPDY
+ 5.5 auth= in URLs
+ 5.6 Refuse "downgrade" redirects
6. TELNET
6.1 ditch stdin
@@ -45,71 +57,93 @@
6.3 feature negotiation debug data
6.4 send data in chunks
- 7. SSL
- 7.1 Disable specific versions
- 7.2 Provide mutex locking API
- 7.3 Evaluate SSL patches
- 7.4 Cache OpenSSL contexts
- 7.5 Export session ids
- 7.6 Provide callback for cert verification
- 7.7 Support other SSL libraries
- 7.8 Support SRP on the TLS layer
- 7.9 improve configure --with-ssl
+ 7. SMTP
+ 7.1 Pipelining
+ 7.2 Enhanced capability support
+
+ 8. POP3
+ 8.1 Pipelining
+ 8.2 Enhanced capability support
+
+ 9. IMAP
+ 9.1 Enhanced capability support
+
+ 10. LDAP
+ 10.1 SASL based authentication mechanisms
+
+ 11. SMB
+ 11.1 File listing support
+ 11.2 Honor file timestamps
+ 11.3 Use NTLMv2
+
+ 12. New protocols
+ 12.1 RSYNC
- 8. GnuTLS
- 8.1 SSL engine stuff
- 8.2 SRP
- 8.3 check connection
- 8.4 non-gcrypt
+ 13. SSL
+ 13.1 Disable specific versions
+ 13.2 Provide mutex locking API
+ 13.3 Evaluate SSL patches
+ 13.4 Cache OpenSSL contexts
+ 13.5 Export session ids
+ 13.6 Provide callback for cert verification
+ 13.7 improve configure --with-ssl
+ 13.8 Support DANE
- 9. Other protocols
+ 14. GnuTLS
+ 14.1 SSL engine stuff
+ 14.2 check connection
- 10. New protocols
- 10.1 RSYNC
+ 15. WinSSL/SChannel
+ 15.1 Add support for client certificate authentication
+ 15.2 Add support for custom server certificate validation
+ 15.3 Add support for the --ciphers option
- 11. Client
- 11.1 sync
- 11.2 glob posts
- 11.3 prevent file overwriting
- 11.4 simultaneous parallel transfers
- 11.5 provide formpost headers
- 11.6 url-specific options
- 11.7 metalink support
- 11.8 warning when setting an option
+ 16. SASL
+ 16.1 Other authentication mechanisms
+ 16.2 Add QOP support to GSSAPI authentication
+
+ 17. Client
+ 17.1 sync
+ 17.2 glob posts
+ 17.3 prevent file overwriting
+ 17.4 simultaneous parallel transfers
+ 17.5 provide formpost headers
+ 17.6 warning when setting an option
+ 17.7 warning when sending binary output to terminal
+ 17.8 offer color-coded HTTP header output
+ 17.9 Choose the name of file in braces for complex URLs
- 12. Build
- 12.1 roffit
+ 18. Build
+ 18.1 roffit
- 13. Test suite
- 13.1 SSL tunnel
- 13.2 nicer lacking perl message
- 13.3 more protocols supported
- 13.4 more platforms supported
+ 19. Test suite
+ 19.1 SSL tunnel
+ 19.2 nicer lacking perl message
+ 19.3 more protocols supported
+ 19.4 more platforms supported
+ 19.5 Add support for concurrent connections
- 14. Next SONAME bump
- 14.1 http-style HEAD output for ftp
- 14.2 combine error codes
- 14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+ 20. Next SONAME bump
+ 20.1 http-style HEAD output for FTP
+ 20.2 combine error codes
+ 20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
- 15. Next major release
- 15.1 cleanup return codes
- 15.2 remove obsolete defines
- 15.3 size_t
- 15.4 remove several functions
- 15.5 remove CURLOPT_FAILONERROR
- 15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
- 15.7 remove progress meter from libcurl
+ 21. Next major release
+ 21.1 cleanup return codes
+ 21.2 remove obsolete defines
+ 21.3 size_t
+ 21.4 remove several functions
+ 21.5 remove CURLOPT_FAILONERROR
+ 21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+ 21.7 remove progress meter from libcurl
+ 21.8 remove 'curl_httppost' from public
+ 21.9 have form functions use CURL handle argument
+ 21.10 Add CURLOPT_MAIL_CLIENT option
==============================================================================
1. libcurl
-1.1 Zero-copy interface
-
- Introduce another callback interface for upload/download that makes one less
- copy of data and thus a faster operation.
- [http://curl.haxx.se/dev/no_copy_callbacks.txt]
-
1.2 More data sharing
curl_share_* functions already exist and work, and they can be extended to
@@ -120,7 +154,7 @@
Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
- To support ipv6 interface addresses for network interfaces properly.
+ To support IPv6 interface addresses for network interfaces properly.
1.4 signal-based resolver timeouts
@@ -134,6 +168,57 @@
Also, alarm() provides timeout resolution only to the nearest second. alarm
ought to be replaced by setitimer on systems that support it.
+1.5 get rid of PATH_MAX
+
+ Having code use and rely on PATH_MAX is not nice:
+ http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
+
+ Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
+ we need libssh2 to properly tell us when we pass in a too small buffer and
+ its current API (as of libssh2 1.2.7) doesn't.
+
+1.6 Modified buffer size approach
+
+ Current libcurl allocates a fixed 16K size buffer for download and an
+ additional 16K for upload. They are always unconditionally part of the easy
+ handle. If CRLF translations are requested, an additional 32K "scratch
+ buffer" is allocated. A total of 64K transfer buffers in the worst case.
+
+ First, while the handles are not actually in use these buffers could be freed
+ so that lingering handles just kept in queues or whatever waste less memory.
+
+ Secondly, SFTP is a protocol that needs to handle many ~30K blocks at once
+ since each need to be individually acked and therefore libssh2 must be
+ allowed to send (or receive) many separate ones in parallel to achieve high
+ transfer speeds. A current libcurl build with a 16K buffer makes that
+ impossible, but one with a 512K buffer will reach MUCH faster transfers. But
+ allocating 512K unconditionally for all buffers just in case they would like
+ to do fast SFTP transfers at some point is not a good solution either.
+
+ Dynamically allocate buffer size depending on protocol in use in combination
+ with freeing it after each individual transfer? Other suggestions?
+
+1.7 Detect when called from within callbacks
+
+ We should set a state variable before calling callbacks, so that we
+ subsequently can add code within libcurl that returns error if called within
+ callbacks for when that's not supported.
+
+1.8 Allow SSL (HTTPS) to proxy
+
+ To prevent local users from snooping on your traffic to the proxy. Supported
+ by Chrome already:
+ https://www.chromium.org/developers/design-documents/secure-web-proxy
+
+ ...and by Firefox soon:
+ https://bugzilla.mozilla.org/show_bug.cgi?id=378637
+
+1.9 Cache negative name resolves
+
+ A name resolve that has failed is likely to fail when made again within a
+ short period of time. Currently we only cache positive responses.
+
+
2. libcurl - multi interface
2.1 More non-blocking
@@ -143,7 +228,6 @@
- Name resolves on non-windows unless c-ares is used
- NSS SSL connections
- - Active FTP connections
- HTTP proxy CONNECT operations
- SOCKS proxy handshakes
- file:// transfers
@@ -151,52 +235,37 @@
- The "DONE" operation (post transfer protocol-specific actions) for the
protocols SFTP, SMTP, FTP. Fixing Curl_done() for this is a worthy task.
-2.2 Remove easy interface internally
-
- Make curl_easy_perform() a wrapper-function that simply creates a multi
- handle, adds the easy handle to it, runs curl_multi_perform() until the
- transfer is done, then detach the easy handle, destroy the multi handle and
- return the easy handle's return code. This will thus make everything
- internally use and assume the multi interface. The select()-loop should use
- curl_multi_socket().
-
-2.3 Avoid having to remove/readd handles
-
- curl_multi_handle_control() - this can control the easy handle (while) added
- to a multi handle in various ways:
-
- o RESTART, unconditionally restart this easy handle's transfer from the
- start, re-init the state
-
- o RESTART_COMPLETED, restart this easy handle's transfer but only if the
- existing transfer has already completed and it is in a "finished state".
-
- o STOP, just stop this transfer and consider it completed
-
- o PAUSE?
-
- o RESUME?
-
-2.4 Fix HTTP Pipelining for PUT
+2.2 Fix HTTP Pipelining for PUT
HTTP Pipelining can be a way to greatly enhance performance for multiple
serial requests and currently libcurl only supports that for HEAD and GET
requests but it should also be possible for PUT.
+2.3 Better support for same name resolves
+
+ If a name resolve has been initiated for name NN and a second easy handle
+ wants to resolve that name as well, make it wait for the first resolve to end
+ up in the cache instead of doing a second separate resolve. This is
+ especially needed when adding many simultaneous handles using the same host
+ name when the DNS resolver can get flooded.
+
+
3. Documentation
-3.1 More and better
+3.1 Update date and version in man pages
- Exactly
+ 'maketgz' or another suitable script could update the .TH sections of the man
+ pages at release time to use the current date and curl/libcurl version
+ number.
4. FTP
4.1 HOST
- HOST is a suggested command in the works for a client to tell which host name
- to use, to offer FTP servers named-based virtual hosting:
+ HOST is a command for a client to tell which host name to use, to offer FTP
+ servers named-based virtual hosting:
- http://tools.ietf.org/html/draft-hethmon-mcmurray-ftp-hosts-11
+ https://tools.ietf.org/html/rfc7151
4.2 Alter passive/active on failure and retry
@@ -207,7 +276,7 @@
4.3 Earlier bad letter detection
- Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in the
+ Make the detection of (bad) %0d and %0a codes in FTP URL parts earlier in the
process to avoid doing a resolve and connect in vain.
4.4 REST for large files
@@ -216,17 +285,25 @@
the server doesn't set the pointer to the requested index. The tricky
(impossible?) part is to figure out if the server did the right thing or not.
-4.5 FTP proxy support
-
- Support the most common FTP proxies, Philip Newton provided a list allegedly
- from ncftp. This is not a subject without debate, and is probably not really
- suitable for libcurl. http://curl.haxx.se/mail/archive-2003-04/0126.html
-
-4.6 ASCII support
+4.5 ASCII support
FTP ASCII transfers do not follow RFC959. They don't convert the data
accordingly.
+4.6 GSSAPI via Windows SSPI
+
+In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5)
+via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add
+support for GSSAPI authentication via Windows SSPI.
+
+4.7 STAT for LIST without data connection
+
+Some FTP servers allow STAT for listing directories instead of using LIST, and
+the response is then sent over the control connection instead of as the
+otherwise usedw data connection: http://www.nsftools.com/tips/RawFTP.htm#STAT
+
+This is not detailed in any FTP specification.
+
5. HTTP
5.1 Better persistency for HTTP 1.0
@@ -252,6 +329,33 @@
headers use a default value so only headers that need to be moved have to be
specified.
+5.4 SPDY
+
+ Chrome and Firefox already support SPDY and lots of web services do. There's
+ a library for us to use for this (spdylay) that has a similar API and the
+ same author as nghttp2.
+
+ spdylay: https://github.com/tatsuhiro-t/spdylay
+
+5.5 auth= in URLs
+
+ Add the ability to specify the preferred authentication mechanism to use by
+ using ;auth=<mech> in the login part of the URL.
+
+ For example:
+
+ http://test:pass;[email protected] would be equivalent to specifying --user
+ test:pass;auth=NTLM or --user test:pass --ntlm from the command line.
+
+ Additionally this should be implemented for proxy base URLs as well.
+
+5.6 Refuse "downgrade" redirects
+
+ See https://github.com/bagder/curl/issues/226
+
+ Consider a way to tell curl to refuse to "downgrade" protocol with a redirect
+ and/or possibly a bit that refuses redirect to change protocol completely.
+
6. TELNET
@@ -277,35 +381,96 @@
use, but inefficient for any other. Sent data should be sent in larger
chunks.
-7. SSL
+7. SMTP
-7.1 Disable specific versions
+7.1 Pipelining
+
+ Add support for pipelining emails.
+
+7.2 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the EHLO command.
+
+8. POP3
+
+8.1 Pipelining
+
+ Add support for pipelining commands.
+
+8.2 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPA command.
+
+9. IMAP
+
+9.1 Enhanced capability support
+
+ Add the ability, for an application that uses libcurl, to obtain the list of
+ capabilities returned from the CAPABILITY command.
+
+10. LDAP
+
+10.1 SASL based authentication mechanisms
+
+ Currently the LDAP module only supports ldap_simple_bind_s() in order to bind
+ to an LDAP server. However, this function sends username and password details
+ using the simple authentication mechanism (as clear text). However, it should
+ be possible to use ldap_bind_s() instead specifying the security context
+ information ourselves.
+
+11. SMB
+
+11.1 File listing support
+
+Add support for listing the contents of a SMB share. The output should probably
+be the same as/similar to FTP.
+
+11.2 Honor file timestamps
+
+The timestamp of the transferred file should reflect that of the original file.
+
+11.3 Use NTLMv2
+
+Currently the SMB authentication uses NTLMv1.
+
+12. New protocols
+
+12.1 RSYNC
+
+ There's no RFC for the protocol or an URI/URL format. An implementation
+ should most probably use an existing rsync library, such as librsync.
+
+13. SSL
+
+13.1 Disable specific versions
Provide an option that allows for disabling specific SSL versions, such as
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
-7.2 Provide mutex locking API
+13.2 Provide mutex locking API
Provide a libcurl API for setting mutex callbacks in the underlying SSL
library, so that the same application code can use mutex-locking
independently of OpenSSL or GnutTLS being used.
-7.3 Evaluate SSL patches
+13.3 Evaluate SSL patches
Evaluate/apply Gertjan van Wingerde's SSL patches:
http://curl.haxx.se/mail/lib-2004-03/0087.html
-7.4 Cache OpenSSL contexts
+13.4 Cache OpenSSL contexts
"Look at SSL cafile - quick traces look to me like these are done on every
- request as well, when they should only be necessary once per ssl context (or
+ request as well, when they should only be necessary once per SSL context (or
once per handle)". The major improvement we can rather easily do is to make
sure we don't create and kill a new SSL "context" for every request, but
instead make one for every connection and re-use that SSL context in the same
style connections are re-used. It will make us use slightly more memory but
it will libcurl do less creations and deletions of SSL contexts.
-7.5 Export session ids
+13.5 Export session ids
Add an interface to libcurl that enables "session IDs" to get
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
@@ -313,67 +478,92 @@
the state from such a buffer at a later date - this is used by mod_ssl for
apache to implement and SSL session ID cache".
-7.6 Provide callback for cert verification
+13.6 Provide callback for cert verification
OpenSSL supports a callback for customised verification of the peer
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
it be? There's so much that could be done if it were!
-7.7 Support other SSL libraries
-
- Make curl's SSL layer capable of using other free SSL libraries. Such as
- MatrixSSL (http://www.matrixssl.org/).
-
-7.8 Support SRP on the TLS layer
-
- Peter Sylvester's patch for SRP on the TLS layer. Awaits OpenSSL support for
- this, no need to support this in libcurl before there's an OpenSSL release
- that does it.
-
-7.9 improve configure --with-ssl
+13.7 improve configure --with-ssl
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
then NSS...
-8. GnuTLS
+13.8 Support DANE
-8.1 SSL engine stuff
+ DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
+ keys and certs over DNS using DNSSEC as an alternative to the CA model.
+ https://www.rfc-editor.org/rfc/rfc6698.txt
+
+ An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
+ (http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
+ approach. See Daniel's comments:
+ http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
+ correct library to base this development on.
+
+14. GnuTLS
+
+14.1 SSL engine stuff
Is this even possible?
-8.2 SRP
-
- Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
- TLS to provide name and password. GnuTLS already supports it...
-
-8.3 check connection
+14.2 check connection
Add a way to check if the connection seems to be alive, to correspond to the
SSL_peak() way we use with OpenSSL.
-8.4 non-gcrypt
+15. WinSSL/SChannel
- libcurl assumes that there are gcrypt functions available when
- GnuTLS is.
+15.1 Add support for client certificate authentication
- GnuTLS can be built to use libnettle instead as crypto library,
- which breaks the previously mentioned assumption
+ WinSSL/SChannel currently makes use of the OS-level system and user
+ certificate and private key stores. This does not allow the application
+ or the user to supply a custom client certificate using curl or libcurl.
- The correct fix would be to detect which crypto layer that is in use and
- adapt our code to use that instead of blindly assuming gcrypt.
+ Therefore support for the existing -E/--cert and --key options should be
+ implemented by supplying a custom certificate to the SChannel APIs, see:
+ - Getting a Certificate for Schannel
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
-9. Other protocols
+15.2 Add support for custom server certificate validation
-10. New protocols
+ WinSSL/SChannel currently makes use of the OS-level system and user
+ certificate trust store. This does not allow the application or user to
+ customize the server certificate validation process using curl or libcurl.
-10.1 RSYNC
+ Therefore support for the existing --cacert or --capath options should be
+ implemented by supplying a custom certificate to the SChannel APIs, see:
+ - Getting a Certificate for Schannel
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
- There's no RFC for protocol nor URI/URL format. An implementation should
- most probably use an existing rsync library, such as librsync.
+15.3 Add support for the --ciphers option
-11. Client
+ The cipher suites used by WinSSL/SChannel are configured on an OS-level
+ instead of an application-level. This does not allow the application or
+ the user to customize the configured cipher suites using curl or libcurl.
-11.1 sync
+ Therefore support for the existing --ciphers option should be implemented
+ by mapping the OpenSSL/GnuTLS cipher suites to the SChannel APIs, see
+ - Specifying Schannel Ciphers and Cipher Strengths
+ https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
+
+16. SASL
+
+16.1 Other authentication mechanisms
+
+ Add support for other authentication mechanisms such as OLP,
+ GSS-SPNEGO and others.
+
+16.2 Add QOP support to GSSAPI authentication
+
+ Currently the GSSAPI authentication only supports the default QOP of auth
+ (Authentication), whilst Kerberos V5 supports both auth-int (Authentication
+ with integrity protection) and auth-conf (Authentication with integrity and
+ privacy protection).
+
+17. Client
+
+17.1 sync
"curl --sync http://example.com/feed[1-100].rss" or
"curl --sync http://example.net/{index,calendar,history}.html"
@@ -382,12 +572,12 @@
remote file is newer than the local file. A Last-Modified HTTP date header
should also be used to set the mod date on the downloaded file.
-11.2 glob posts
+17.2 glob posts
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
This is easily scripted though.
-11.3 prevent file overwriting
+17.3 prevent file overwriting
Add an option that prevents cURL from overwriting existing local files. When
used, and there already is an existing file with the target file name
@@ -395,14 +585,14 @@
existing). So that index.html becomes first index.html.1 and then
index.html.2 etc.
-11.4 simultaneous parallel transfers
+17.4 simultaneous parallel transfers
The client could be told to use maximum N simultaneous parallel transfers and
then just make sure that happens. It should of course not make more than one
connection to the same remote host. This would require the client to use the
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
-11.5 provide formpost headers
+17.5 provide formpost headers
Extending the capabilities of the multipart formposting. How about leaving
the ';type=foo' syntax as it is and adding an extra tag (headers) which
@@ -416,69 +606,88 @@
which should overwrite the program reasonable defaults (plain/text,
8bit...)
-11.6 url-specific options
-
- Provide a way to make options bound to a specific URL among several on the
- command line. Possibly by letting ':' separate options between URLs,
- similar to this:
-
- curl --data foo --url url.com : \
- --url url2.com : \
- --url url3.com --data foo3
-
- (More details: http://curl.haxx.se/mail/archive-2004-07/0133.html)
-
- The example would do a POST-GET-POST combination on a single command line.
-
-11.7 metalink support
-
- Add metalink support to curl (http://www.metalinker.org/). This is most useful
- with simultaneous parallel transfers (11.6) but not necessary.
-
-11.8 warning when setting an option
+17.6 warning when setting an option
Display a warning when libcurl returns an error when setting an option.
This can be useful to tell when support for a particular feature hasn't been
compiled into the library.
-12. Build
+17.7 warning when sending binary output to terminal
-12.1 roffit
+ Provide a way that prompts the user for confirmation before binary data is
+ sent to the terminal, much in the style 'less' does it.
+
+17.8 offer color-coded HTTP header output
+
+ By offering different color output on the header name and the header
+ contents, they could be made more readable and thus help users working on
+ HTTP services.
+
+17.9 Choose the name of file in braces for complex URLs
+
+ When using braces to download a list of URLs and you use complicated names
+ in the list of alternatives, it could be handy to allow curl to use other
+ names when saving.
+
+ Consider a way to offer that. Possibly like
+ {partURL1:name1,partURL2:name2,partURL3:name3} where the name following the
+ colon is the output name.
+
+ See https://github.com/bagder/curl/issues/221
+
+
+18. Build
+
+18.1 roffit
Consider extending 'roffit' to produce decent ASCII output, and use that
- instead of (g)nroff when building src/hugehelp.c
+ instead of (g)nroff when building src/tool_hugehelp.c
-13. Test suite
+19. Test suite
-13.1 SSL tunnel
+19.1 SSL tunnel
Make our own version of stunnel for simple port forwarding to enable HTTPS
and FTP-SSL tests without the stunnel dependency, and it could allow us to
provide test tools built with either OpenSSL or GnuTLS
-13.2 nicer lacking perl message
+19.2 nicer lacking perl message
If perl wasn't found by the configure script, don't attempt to run the tests
but explain something nice why it doesn't.
-13.3 more protocols supported
+19.3 more protocols supported
- Extend the test suite to include more protocols. The telnet could just do ftp
+ Extend the test suite to include more protocols. The telnet could just do FTP
or http operations (for which we have test servers).
-13.4 more platforms supported
+19.4 more platforms supported
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
fork()s and it should become even more portable.
-14. Next SONAME bump
+19.5 Add support for concurrent connections
-14.1 http-style HEAD output for ftp
+ Tests 836, 882 and 938 were designed to verify that separate connections aren't
+ used when using different login credentials in protocols that shouldn't re-use
+ a connection under such circumstances.
+
+ Unfortunately, ftpserver.pl doesn't appear to support multiple concurrent
+ connections. The read while() loop seems to loop until it receives a disconnect
+ from the client, where it then enters the waiting for connections loop. When
+ the client opens a second connection to the server, the first connection hasn't
+ been dropped (unless it has been forced - which we shouldn't do in these tests)
+ and thus the wait for connections loop is never entered to receive the second
+ connection.
+
+20. Next SONAME bump
+
+20.1 http-style HEAD output for FTP
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
- from being output in NOBODY requests over ftp
+ from being output in NOBODY requests over FTP
-14.2 combine error codes
+20.2 combine error codes
Combine some of the error codes to remove duplicates. The original
numbering should not be changed, and the old identifiers would be
@@ -488,37 +697,44 @@
Candidates for removal and their replacements:
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
+
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
+
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
+
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
+
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
+
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
-14.3 extend CURLOPT_SOCKOPTFUNCTION prototype
+20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
The current prototype only provides 'purpose' that tells what the
connection/socket is for, but not any protocol or similar. It makes it hard
for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
similar.
-15. Next major release
+21. Next major release
-15.1 cleanup return codes
+21.1 cleanup return codes
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
CURLMcode. These should be changed to be the same.
-15.2 remove obsolete defines
+21.2 remove obsolete defines
remove obsolete defines from curl/curl.h
-15.3 size_t
+21.3 size_t
make several functions use size_t instead of int in their APIs
-15.4 remove several functions
+21.4 remove several functions
remove the following functions from the public API:
@@ -539,18 +755,18 @@
curl_multi_socket_all
-15.5 remove CURLOPT_FAILONERROR
+21.5 remove CURLOPT_FAILONERROR
Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
internally. Let the app judge success or not for itself.
-15.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
+21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
Remove support for a global DNS cache. Anything global is silly, and we
already offer the share interface for the same functionality but done
"right".
-15.7 remove progress meter from libcurl
+21.7 remove progress meter from libcurl
The internally provided progress meter output doesn't belong in the library.
Basically no application wants it (apart from curl) but instead applications
@@ -559,3 +775,31 @@
The progress callback should then be bumped as well to get proper 64bit
variable types passed to it instead of doubles so that big files work
correctly.
+
+21.8 remove 'curl_httppost' from public
+
+ curl_formadd() was made to fill in a public struct, but the fact that the
+ struct is public is never really used by application for their own advantage
+ but instead often restricts how the form functions can or can't be modified.
+
+ Changing them to return a private handle will benefit the implementation and
+ allow us much greater freedoms while still maintaining a solid API and ABI.
+
+21.9 have form functions use CURL handle argument
+
+ curl_formadd() and curl_formget() both currently have no CURL handle
+ argument, but both can use a callback that is set in the easy handle, and
+ thus curl_formget() with callback cannot function without first having
+ curl_easy_perform() (or similar) called - which is hard to grasp and a design
+ mistake.
+
+21.10 Add CURLOPT_MAIL_CLIENT option
+
+ Rather than use the URL to specify the mail client string to present in the
+ HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
+ specifying this data as the URL is non-standard and to be honest a bit of a
+ hack ;-)
+
+ Please see the following thread for more information:
+ http://curl.haxx.se/mail/lib-2012-05/0178.html
+
diff --git a/docs/TheArtOfHttpScripting b/docs/TheArtOfHttpScripting
index 183dd17..76faee4 100644
--- a/docs/TheArtOfHttpScripting
+++ b/docs/TheArtOfHttpScripting
@@ -1,16 +1,73 @@
-Online: http://curl.haxx.se/docs/httpscripting.html
-Date: May 28, 2008
+ _ _ ____ _
+ ___| | | | _ \| |
+ / __| | | | |_) | |
+ | (__| |_| | _ <| |___
+ \___|\___/|_| \_\_____|
- The Art Of Scripting HTTP Requests Using Curl
- =============================================
- This document will assume that you're familiar with HTML and general
- networking.
+The Art Of Scripting HTTP Requests Using Curl
- The possibility to write scripts is essential to make a good computer
- system. Unix' capability to be extended by shell scripts and various tools to
- run various automated commands and scripts is one reason why it has succeeded
- so well.
+ 1. HTTP Scripting
+ 1.1 Background
+ 1.2 The HTTP Protocol
+ 1.3 See the Protocol
+ 1.4 See the Timing
+ 1.5 See the Response
+ 2. URL
+ 2.1 Spec
+ 2.2 Host
+ 2.3 Port number
+ 2.4 User name and password
+ 2.5 Path part
+ 3. Fetch a page
+ 3.1 GET
+ 3.2 HEAD
+ 3.3 Multiple URLs in a single command line
+ 3.4 Multiple HTTP methods in a single command line
+ 4. HTML forms
+ 4.1 Forms explained
+ 4.2 GET
+ 4.3 POST
+ 4.4 File Upload POST
+ 4.5 Hidden Fields
+ 4.6 Figure Out What A POST Looks Like
+ 5. HTTP upload
+ 5.1 PUT
+ 6. HTTP Authentication
+ 6.1 Basic Authentication
+ 6.2 Other Authentication
+ 6.3 Proxy Authentication
+ 6.4 Hiding credentials
+ 7. More HTTP Headers
+ 7.1 Referer
+ 7.2 User Agent
+ 8. Redirects
+ 8.1 Location header
+ 8.2 Other redirects
+ 9. Cookies
+ 9.1 Cookie Basics
+ 9.2 Cookie options
+ 10. HTTPS
+ 10.1 HTTPS is HTTP secure
+ 10.2 Certificates
+ 11. Custom Request Elements
+ 11.1 Modify method and headers
+ 11.2 More on changed methods
+ 12. Web Login
+ 12.1 Some login tricks
+ 13. Debug
+ 13.1 Some debug tricks
+ 14. References
+ 14.1 Standards
+ 14.2 Sites
+
+==============================================================================
+
+1. HTTP Scripting
+
+ 1.1 Background
+
+ This document assumes that you're familiar with HTML and general networking.
The increasing amount of applications moving to the web has made "HTTP
Scripting" more frequently requested and wanted. To be able to automatically
@@ -27,7 +84,7 @@
to glue everything together using some kind of script language or repeated
manual invokes.
-1. The HTTP Protocol
+ 1.2 The HTTP Protocol
HTTP is the protocol used to fetch data from web servers. It is a very simple
protocol that is built upon TCP/IP. The protocol also allows information to
@@ -38,18 +95,108 @@
request a particular action, and then the server replies a few text lines
before the actual requested content is sent to the client.
- Using curl's option --verbose (-v as a short option) will display what kind of
- commands curl sends to the server, as well as a few other informational texts.
- --verbose is the single most useful option when it comes to debug or even
- understand the curl<->server interaction.
+ The client, curl, sends a HTTP request. The request contains a method (like
+ GET, POST, HEAD etc), a number of request headers and sometimes a request
+ body. The HTTP server responds with a status line (indicating if things went
+ well), response headers and most often also a response body. The "body" part
+ is the plain data you requested, like the actual HTML or the image etc.
+
+ 1.3 See the Protocol
+
+ Using curl's option --verbose (-v as a short option) will display what kind
+ of commands curl sends to the server, as well as a few other informational
+ texts.
+
+ --verbose is the single most useful option when it comes to debug or even
+ understand the curl<->server interaction.
+
+ Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
+ even more details as they show EVERYTHING curl sends and receives. Use it
+ like this:
+
+ curl --trace-ascii debugdump.txt http://www.example.com/
+
+ 1.4 See the Timing
+
+ Many times you may wonder what exactly is taking all the time, or you just
+ want to know the amount of milliseconds between two points in a
+ transfer. For those, and other similar situations, the --trace-time option
+ is what you need. It'll prepend the time to each trace output line:
+
+ curl --trace-ascii d.txt --trace-time http://example.com/
+
+ 1.5 See the Response
+
+ By default curl sends the response to stdout. You need to redirect it
+ somewhere to avoid that, most often that is done with -o or -O.
2. URL
+ 2.1 Spec
+
The Uniform Resource Locator format is how you specify the address of a
particular resource on the Internet. You know these, you've seen URLs like
- http://curl.haxx.se or https://yourbank.com a million times.
+ http://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
+ canonical spec. And yeah, the formal name is not URL, it is URI.
-3. GET a page
+ 2.2 Host
+
+ The host name is usually resolved using DNS or your /etc/hosts file to an IP
+ address and that's what curl will communicate with. Alternatively you specify
+ the IP address directly in the URL instead of a name.
+
+ For development and other trying out situation, you can point out a different
+ IP address for a host name than what would otherwise be used, by using curl's
+ --resolve option:
+
+ curl --resolve www.example.org:80:127.0.0.1 http://www.example.org/
+
+ 2.3 Port number
+
+ Each protocol curl supports operate on a default port number, be it over TCP
+ or in some cases UDP. Normally you don't have to take that into
+ consideration, but at times you run test servers on other ports or
+ similar. Then you can specify the port number in the URL with a colon and a
+ number immediately following the host name. Like when doing HTTP to port
+ 1234:
+
+ curl http://www.example.org:1234/
+
+ The port number you specify in the URL is the number that the server uses to
+ offer its services. Sometimes you may use a local proxy, and then you may
+ need to specify that proxy's port number separate on what curl needs to
+ connect to locally. Like when using a HTTP proxy on port 4321:
+
+ curl --proxy http://proxy.example.org:4321 http://remote.example.org/
+
+ 2.4 User name and password
+
+ Some services are setup to require HTTP authentication and then you need to
+ provide name and password which then is transferred to the remote site in
+ various ways depending on the exact authentication protocol used.
+
+ You can opt to either insert the user and password in the URL or you can
+ provide them separately:
+
+ curl http://user:[email protected]/
+
+ or
+
+ curl -u user:password http://example.org/
+
+ You need to pay attention that this kind of HTTP authentication is not what
+ is usually done and requested by user-oriented web sites these days. They
+ tend to use forms and cookies instead.
+
+ 2.5 Path part
+
+ The path part is just sent off to the server to request that it sends back
+ the associated response. The path is what is to the right side of the slash
+ that follows the host name and possibly port number.
+
+3. Fetch a page
+
+ 3.1 GET
The simplest and most common request/operation made using HTTP is to get a
URL. The URL could itself refer to a web page, an image or a file. The client
@@ -61,12 +208,65 @@
you get a web page returned in your terminal window. The entire HTML document
that that URL holds.
- All HTTP replies contain a set of headers that are normally hidden, use
- curl's --include (-i) option to display them as well as the rest of the
- document. You can also ask the remote server for ONLY the headers by using the
- --head (-I) option (which will make curl issue a HEAD request).
+ All HTTP replies contain a set of response headers that are normally hidden,
+ use curl's --include (-i) option to display them as well as the rest of the
+ document.
-4. Forms
+ 3.2 HEAD
+
+ You can ask the remote server for ONLY the headers by using the --head (-I)
+ option which will make curl issue a HEAD request. In some special cases
+ servers deny the HEAD method while others still work, which is a particular
+ kind of annoyance.
+
+ The HEAD method is defined and made so that the server returns the headers
+ exactly the way it would do for a GET, but without a body. It means that you
+ may see a Content-Length: in the response headers, but there must not be an
+ actual body in the HEAD response.
+
+ 3.3 Multiple URLs in a single command line
+
+ A single curl command line may involve one or many URLs. The most common case
+ is probably to just use one, but you can specify any amount of URLs. Yes
+ any. No limits. You'll then get requests repeated over and over for all the
+ given URLs.
+
+ Example, send two GETs:
+
+ curl http://url1.example.com http://url2.example.com
+
+ If you use --data to POST to the URL, using multiple URLs means that you send
+ that same POST to all the given URLs.
+
+ Example, send two POSTs:
+
+ curl --data name=curl http://url1.example.com http://url2.example.com
+
+
+ 3.4 Multiple HTTP methods in a single command line
+
+ Sometimes you need to operate on several URLs in a single command line and do
+ different HTTP methods on each. For this, you'll enjoy the --next option. It
+ is basically a separator that separates a bunch of options from the next. All
+ the URLs before --next will get the same method and will get all the POST
+ data merged into one.
+
+ When curl reaches the --next on the command line, it'll sort of reset the
+ method and the POST data and allow a new set.
+
+ Perhaps this is best shown with a few examples. To send first a HEAD and then
+ a GET:
+
+ curl -I http://example.com --next http://example.com
+
+ To first send a POST and then a GET:
+
+ curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
+
+
+4. HTML forms
+
+ 4.1 Forms explained
Forms are the general way a web site can present a HTML page with fields for
the user to enter data in, and then press some kind of 'OK' or 'submit'
@@ -79,7 +279,7 @@
Of course there has to be some kind of program in the server end to receive
the data you send. You cannot just invent something out of the air.
- 4.1 GET
+ 4.2 GET
A GET-form uses the method GET, as specified in HTML like:
@@ -105,7 +305,7 @@
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
- 4.2 POST
+ 4.3 POST
The GET method makes all input field names get displayed in the URL field of
your browser. That's generally a good thing when you want to be able to
@@ -127,7 +327,8 @@
And to use curl to post this form with the same data filled in as before, we
could do it like:
- curl --data "birthyear=1905&press=%20OK%20" http://www.hotmail.com/when/junk.cgi
+ curl --data "birthyear=1905&press=%20OK%20" \
+ http://www.example.com/when.cgi
This kind of POST will use the Content-Type
application/x-www-form-urlencoded and is the most widely used POST kind.
@@ -141,7 +342,11 @@
curl --data-urlencode "name=I am Daniel" http://www.example.com
- 4.3 File Upload POST
+ If you repeat --data several times on the command line, curl will
+ concatenate all the given data pieces - and put a '&' symbol between each
+ data segment.
+
+ 4.4 File Upload POST
Back in late 1995 they defined an additional way to post data over HTTP. It
is documented in the RFC 1867, why this method sometimes is referred to as
@@ -162,7 +367,7 @@
curl --form upload=@localfilename --form press=OK [URL]
- 4.4 Hidden Fields
+ 4.5 Hidden Fields
A very common way for HTML based application to pass state information
between pages is to add hidden fields to the forms. Hidden fields are
@@ -183,7 +388,7 @@
curl --data "birthyear=1905&press=OK&person=daniel" [URL]
- 4.5 Figure Out What A POST Looks Like
+ 4.6 Figure Out What A POST Looks Like
When you're about fill in a form and send to a server by using curl instead
of a browser, you're of course very interested in sending a POST exactly the
@@ -196,7 +401,9 @@
You will then clearly see the data get appended to the URL, separated with a
'?'-letter as GET forms are supposed to.
-5. PUT
+5. HTTP upload
+
+ 5.1 PUT
The perhaps best way to upload data to a HTTP server is to use PUT. Then
again, this of course requires that someone put a program or script on the
@@ -204,10 +411,12 @@
Put a file to a HTTP server with curl:
- curl --upload-file uploadfile http://www.uploadhttp.com/receive.cgi
+ curl --upload-file uploadfile http://www.example.com/receive.cgi
6. HTTP Authentication
+ 6.1 Basic Authentication
+
HTTP Authentication is the ability to tell the server your username and
password so that it can verify that you're allowed to do the request you're
doing. The Basic authentication used in HTTP (which is the type curl uses by
@@ -217,12 +426,16 @@
To tell curl to use a user and password for authentication:
- curl --user name:password http://www.secrets.com
+ curl --user name:password http://www.example.com
+
+ 6.2 Other Authentication
The site might require a different authentication method (check the headers
returned by the server), and then --ntlm, --digest, --negotiate or even
--anyauth might be options that suit you.
+ 6.3 Proxy Authentication
+
Sometimes your HTTP access is only available through the use of a HTTP
proxy. This seems to be especially common at various companies. A HTTP proxy
may require its own user and password to allow the client to get through to
@@ -236,6 +449,8 @@
If you use any one these user+password options but leave out the password
part, curl will prompt for the password interactively.
+ 6.4 Hiding credentials
+
Do note that when a program is run, its parameters might be possible to see
when listing the running processes of the system. Thus, other users may be
able to watch your passwords if you pass them as plain command line
@@ -245,7 +460,9 @@
many web sites will not use this concept when they provide logins etc. See
the Web Login chapter further below for more details on that.
-7. Referer
+7. More HTTP Headers
+
+ 7.1 Referer
A HTTP request may include a 'referer' field (yes it is misspelled), which
can be used to tell from which URL the client got to this particular
@@ -257,9 +474,9 @@
Use curl to set the referer field with:
- curl --referer http://curl.haxx.se http://daniel.haxx.se
+ curl --referer http://www.example.come http://www.example.com
-8. User Agent
+ 7.2 User Agent
Very similar to the referer field, all HTTP requests may set the User-Agent
field. It names what user agent (client) that is being used. Many
@@ -273,15 +490,17 @@
is time to set the User Agent field to fool the server into thinking you're
one of those browsers.
- To make curl look like Internet Explorer on a Windows 2000 box:
+ To make curl look like Internet Explorer 5 on a Windows 2000 box:
- curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
+ curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
- Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
+ Or why not look like you're using Netscape 4.73 on an old Linux box:
- curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
+ curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
-9. Redirects
+8. Redirects
+
+ 8.1 Location header
When a resource is requested from a server, the reply from the server may
include a hint about where the browser should go next to find this page, or a
@@ -294,14 +513,23 @@
To tell curl to follow a Location:
- curl --location http://www.sitethatredirects.com
+ curl --location http://www.example.com
If you use curl to POST to a site that immediately redirects you to another
page, you can safely use --location (-L) and --data/--form together. Curl will
only use POST in the first request, and then revert to GET in the following
operations.
-10. Cookies
+ 8.2 Other redirects
+
+ Browser typically support at least two other ways of redirects that curl
+ doesn't: first the html may contain a meta refresh tag that asks the browser
+ to load a specific URL after a set number of seconds, or it may use
+ javascript to do it.
+
+9. Cookies
+
+ 9.1 Cookie Basics
The way the web browsers do "client side state control" is by using
cookies. Cookies are just names with associated contents. The cookies are
@@ -318,46 +546,51 @@
must be able to record and send back cookies the way the web application
expects them. The same way browsers deal with them.
+ 9.2 Cookie options
+
The simplest way to send a few cookies to the server when getting a page with
curl is to add them on the command line like:
- curl --cookie "name=Daniel" http://www.cookiesite.com
+ curl --cookie "name=Daniel" http://www.example.com
Cookies are sent as common HTTP headers. This is practical as it allows curl
to record cookies simply by recording headers. Record cookies with curl by
using the --dump-header (-D) option like:
- curl --dump-header headers_and_cookies http://www.cookiesite.com
+ curl --dump-header headers_and_cookies http://www.example.com
(Take note that the --cookie-jar option described below is a better way to
store cookies.)
Curl has a full blown cookie parsing engine built-in that comes to use if you
want to reconnect to a server and use cookies that were stored from a
- previous connection (or handicrafted manually to fool the server into
+ previous connection (or hand-crafted manually to fool the server into
believing you had a previous connection). To use previously stored cookies,
you run curl like:
- curl --cookie stored_cookies_in_file http://www.cookiesite.com
+ curl --cookie stored_cookies_in_file http://www.example.com
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
only want curl to understand received cookies, use --cookie with a file that
- doesn't exist. Example, if you want to let curl understand cookies from a page
- and follow a location (and thus possibly send back cookies it received), you
- can invoke it like:
+ doesn't exist. Example, if you want to let curl understand cookies from a
+ page and follow a location (and thus possibly send back cookies it received),
+ you can invoke it like:
- curl --cookie nada --location http://www.cookiesite.com
+ curl --cookie nada --location http://www.example.com
Curl has the ability to read and write cookie files that use the same file
- format that Netscape and Mozilla do. It is a convenient way to share cookies
- between browsers and automatic scripts. The --cookie (-b) switch automatically
+ format that Netscape and Mozilla once used. It is a convenient way to share
+ cookies between scripts or invokes. The --cookie (-b) switch automatically
detects if a given file is such a cookie file and parses it, and by using the
- --cookie-jar (-c) option you'll make curl write a new cookie file at the end of
- an operation:
+ --cookie-jar (-c) option you'll make curl write a new cookie file at the end
+ of an operation:
- curl --cookie cookies.txt --cookie-jar newcookies.txt http://www.cookiesite.com
+ curl --cookie cookies.txt --cookie-jar newcookies.txt \
+ http://www.example.com
-11. HTTPS
+10. HTTPS
+
+ 10.1 HTTPS is HTTP secure
There are a few ways to do secure HTTP transfers. The by far most common
protocol for doing this is what is generally known as HTTPS, HTTP over
@@ -368,12 +601,14 @@
truckload of advanced features to allow all those encryptions and key
infrastructure mechanisms encrypted HTTP requires.
- Curl supports encrypted fetches thanks to the freely available OpenSSL
- libraries. To get a page from a HTTPS server, simply run curl like:
+ Curl supports encrypted fetches when built to use a TLS library and it can be
+ built to use one out of a fairly large set of libraries - "curl -V" will show
+ which one your curl was built to use (if any!). To get a page from a HTTPS
+ server, simply run curl like:
- curl https://that.secure.server.com
+ curl https://secure.example.com
- 11.1 Certificates
+ 10.2 Certificates
In the HTTPS world, you use certificates to validate that you are the one
you claim to be, as an addition to normal passwords. Curl supports client-
@@ -382,7 +617,7 @@
can be specified on the command line or if not, entered interactively when
curl queries for it. Use a certificate with curl on a HTTPS server like:
- curl --cert mycert.pem https://that.secure.server.com
+ curl --cert mycert.pem https://secure.example.com
curl also tries to verify that the server is who it claims to be, by
verifying the server's certificate against a locally stored CA cert
@@ -395,7 +630,15 @@
http://curl.haxx.se/docs/sslcerts.html
-12. Custom Request Elements
+ At times you may end up with your own CA cert store and then you can tell
+ curl to use that to verify the server's certificate:
+
+ curl --cacert ca-bundle.pem https://example.com/
+
+
+11. Custom Request Elements
+
+11.1 Modify method and headers
Doing fancy stuff, you may need to add or change elements of a single curl
request.
@@ -403,19 +646,39 @@
For example, you can change the POST request to a PROPFIND and send the data
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
- curl --data "<xml>" --header "Content-Type: text/xml" --request PROPFIND url.com
+ curl --data "<xml>" --header "Content-Type: text/xml" \
+ --request PROPFIND url.com
You can delete a default header by providing one without content. Like you
can ruin the request by chopping off the Host: header:
- curl --header "Host:" http://mysite.com
+ curl --header "Host:" http://www.example.com
You can add headers the same way. Your server may want a "Destination:"
header, and you can add it:
- curl --header "Destination: http://moo.com/nowhere" http://url.com
+ curl --header "Destination: http://nowhere" http://example.com
-13. Web Login
+ 11.2 More on changed methods
+
+ It should be noted that curl selects which methods to use on its own
+ depending on what action to ask for. -d will do POST, -I will do HEAD and so
+ on. If you use the --request / -X option you can change the method keyword
+ curl selects, but you will not modify curl's behavior. This means that if you
+ for example use -d "data" to do a POST, you can modify the method to a
+ PROPFIND with -X and curl will still think it sends a POST. You can change
+ the normal GET to a POST method by simply adding -X POST in a command line
+ like:
+
+ curl -X POST http://example.org/
+
+ ... but curl will still think and act as if it sent a GET so it won't send any
+ request body etc.
+
+
+12. Web Login
+
+ 12.1 Some login tricks
While not strictly just HTTP related, it still cause a lot of people problems
so here's the executive run-down of how the vast majority of all login forms
@@ -434,7 +697,7 @@
sometimes they use such code to set or modify cookie contents. Possibly they
do that to prevent programmed logins, like this manual describes how to...
Anyway, if reading the code isn't enough to let you repeat the behavior
- manually, capturing the HTTP requests done by your browers and analyzing the
+ manually, capturing the HTTP requests done by your browsers and analyzing the
sent cookies is usually a working method to work out how to shortcut the
javascript need.
@@ -444,8 +707,9 @@
to do a proper login POST. Remember that the contents need to be URL encoded
when sent in a normal POST.
+13. Debug
-14. Debug
+ 13.1 Some debug tricks
Many times when you run curl on a site, you'll notice that the site doesn't
seem to respond the same way to your curl requests as it does to your
@@ -455,37 +719,40 @@
browser's requests:
* Use the --trace-ascii option to store fully detailed logs of the requests
- for easier analyzing and better understanding
+ for easier analyzing and better understanding
* Make sure you check for and use cookies when needed (both reading with
- --cookie and writing with --cookie-jar)
+ --cookie and writing with --cookie-jar)
* Set user-agent to one like a recent popular browser does
* Set referer like it is set by the browser
* If you use POST, make sure you send all the fields and in the same order as
- the browser does it. (See chapter 4.5 above)
+ the browser does it.
A very good helper to make sure you do this right, is the LiveHTTPHeader tool
that lets you view all headers you send and receive with Mozilla/Firefox
- (even when using HTTPS).
+ (even when using HTTPS). Chrome features similar functionality out of the box
+ among the developer's tools.
A more raw approach is to capture the HTTP traffic on the network with tools
such as ethereal or tcpdump and check what headers that were sent and
received by the browser. (HTTPS makes this technique inefficient.)
-15. References
+14. References
- RFC 2616 is a must to read if you want in-depth understanding of the HTTP
- protocol.
+ 14.1 Standards
- RFC 2396 explains the URL syntax.
+ RFC 7230 is a must to read if you want in-depth understanding of the HTTP
+ protocol
- RFC 2109 defines how cookies are supposed to work.
+ RFC 3986 explains the URL syntax
- RFC 1867 defines the HTTP post upload format.
+ RFC 1867 defines the HTTP post upload format
- http://www.openssl.org is the home of the OpenSSL project
+ RFC 6525 defines how HTTP cookies work
+
+ 14.2 Sites
http://curl.haxx.se is the home of the cURL project
diff --git a/docs/VERSIONS b/docs/VERSIONS
index 21c0d90..72a4547 100644
--- a/docs/VERSIONS
+++ b/docs/VERSIONS
@@ -1,42 +1,31 @@
- _ _ ____ _
- ___| | | | _ \| |
- / __| | | | |_) | |
- | (__| |_| | _ <| |___
- \___|\___/|_| \_\_____|
-
Version Numbers and Releases
+============================
Curl is not only curl. Curl is also libcurl. They're actually individually
versioned, but they mostly follow each other rather closely.
The version numbering is always built up using the same system:
- X.Y[.Z][-preN]
+ X.Y.Z
- Where
- X is main version number
- Y is release number
- Z is patch number
- N is pre-release number
+ - X is main version number
+ - Y is release number
+ - Z is patch number
+
+## Bumping numbers
One of these numbers will get bumped in each new release. The numbers to the
right of a bumped number will be reset to zero. If Z is zero, it may not be
- included in the version number. The pre release number is only included in
- pre releases (they're never used in public, official, releases).
+ included in the version number.
The main version number will get bumped when *really* big, world colliding
- changes are made. The release number is bumped when big changes are
- performed. The patch number is bumped when the changes are mere bugfixes and
- only minor feature changes. The pre-release is a counter, to identify which
- pre-release a certain release is.
-
- When reaching the end of a pre-release period, the version without the
- pre-release part will be released as a public release.
+ changes are made. The release number is bumped when changes are performed or
+ things/features are added. The patch number is bumped when the changes are
+ mere bugfixes.
It means that after release 1.2.3, we can release 2.0 if something really big
has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs
- were fixed. Before 1.2.4 is released, we might release a 1.2.4-pre1 release
- for the brave people to try before the actual release.
+ were fixed.
Bumping, as in increasing the number with 1, is unconditionally only
affecting one of the numbers (except the ones to the right of it, that may be
@@ -56,12 +45,12 @@
#define LIBCURL_VERSION_NUM 0xXXYYZZ
Where XX, YY and ZZ are the main version, release and patch numbers in
- hexadecimal. All three numbers are always represented using two digits. 1.2
- would appear as "0x010200" while version 9.11.7 appears as "0x090b07".
+ hexadecimal. All three number fields are always represented using two digits
+ (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
+ appears as "0x090b07".
- This 6-digit hexadecimal number does not show pre-release number, and it is
- always a greater number in a more recent release. It makes comparisons with
- greater than and less than work.
+ This 6-digit hexadecimal number is always a greater number in a more recent
+ release. It makes comparisons with greater than and less than work.
This number is also available as three separate defines:
- LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH.
+ `LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index c4f4e2b..14a9d2b 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -93,7 +93,6 @@
How do I build a single file with a one-line command?
- $ `curl-config --cc --cflags --libs` -o example example.c
-
+ $ `curl-config --cc --cflags` -o example example.c `curl-config --libs`
.SH "SEE ALSO"
.BR curl (1)
diff --git a/docs/curl-config.html b/docs/curl-config.html
deleted file mode 100644
index 3f49388..0000000
--- a/docs/curl-config.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<html><head>
-<title>curl-config man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl-config - Get information about a libcurl installation <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl-config [options]</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl-config</span> displays information about the curl and libcurl installation. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="--ca"></a><span class="nroffip">--ca</span>
-<p class="level1">Displays the built-in path to the CA cert bundle this libcurl uses.
-<p class="level0"><a name="--cc"></a><span class="nroffip">--cc</span>
-<p class="level1">Displays the compiler used to build libcurl.
-<p class="level0"><a name="--cflags"></a><span class="nroffip">--cflags</span>
-<p class="level1">Set of compiler options (CFLAGS) to use when compiling files that use libcurl. Currently that is only the include path to the curl include files.
-<p class="level0"><a name="--checkfor"></a><span class="nroffip">--checkfor [version]</span>
-<p class="level1">Specify the oldest possible libcurl version string you want, and this script will return 0 if the current installation is new enough or it returns 1 and outputs a text saying that the current version is not new enough. (Added in 7.15.4)
-<p class="level0"><a name="--configure"></a><span class="nroffip">--configure</span>
-<p class="level1">Displays the arguments given to configure when building curl.
-<p class="level0"><a name="--feature"></a><span class="nroffip">--feature</span>
-<p class="level1">Lists what particular main features the installed libcurl was built with. At the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume any particular order. The keywords will be separated by newlines. There may be none, one, or several keywords in the list.
-<p class="level0"><a name="--help"></a><span class="nroffip">--help</span>
-<p class="level1">Displays the available options.
-<p class="level0"><a name="--libs"></a><span class="nroffip">--libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl.
-<p class="level0"><a name="--prefix"></a><span class="nroffip">--prefix</span>
-<p class="level1">This is the prefix used when libcurl was installed. Libcurl is then installed in $prefix/lib and its header files are installed in $prefix/include and so on. The prefix is set with "configure --prefix".
-<p class="level0"><a name="--protocols"></a><span class="nroffip">--protocols</span>
-<p class="level1">Lists what particular protocols the installed libcurl was built to support. At the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols will be listed using uppercase and are separated by newlines. There may be none, one, or several protocols in the list. (Added in 7.13.0)
-<p class="level0"><a name="--static-libs"></a><span class="nroffip">--static-libs</span>
-<p class="level1">Shows the complete set of libs and other linker options you will need in order to link your application with libcurl statically. (Added in 7.17.1)
-<p class="level0"><a name="--version"></a><span class="nroffip">--version</span>
-<p class="level1">Outputs version information about the installed libcurl.
-<p class="level0"><a name="--vernum"></a><span class="nroffip">--vernum</span>
-<p class="level1">Outputs version information about the installed libcurl, in numerical mode. This outputs the version number, in hexadecimal, with 8 bits for each part; major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as 0c0d0e... Note that the initial zero might be omitted. (This option was broken in the 7.15.0 release.) <a name="EXAMPLES"></a><h2 class="nroffsh">EXAMPLES</h2>
-<p class="level0">What linker options do I need when I link with libcurl?
-<p class="level0"> $ curl-config --libs
-<p class="level0">What compiler options do I need when I compile using libcurl functions?
-<p class="level0"> $ curl-config --cflags
-<p class="level0">How do I know if libcurl was built with SSL support?
-<p class="level0"> $ curl-config --feature | grep SSL
-<p class="level0">What's the installed libcurl version?
-<p class="level0"> $ curl-config --version
-<p class="level0">How do I build a single file with a one-line command?
-<p class="level0"> $ `curl-config --cc --cflags --libs` -o example example.c
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">curl (1)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/curl-config.pdf b/docs/curl-config.pdf
deleted file mode 100644
index 074e1ca..0000000
--- a/docs/curl-config.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/curl.1 b/docs/curl.1
index 2acd7b7..11b95d4 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH curl 1 "28 November 2009" "Curl 7.20.0" "Curl Manual"
+.TH curl 1 "30 Nov 2014" "Curl 7.40.0" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
@@ -30,17 +30,16 @@
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
-LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The
-command is designed to work without user interaction.
+LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
+and TFTP). The command is designed to work without user interaction.
curl offers a busload of useful tricks like proxy support, user
authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
-resume and more. As you will see below, the number of features will make your
-head spin!
+resume, Metalink, and more. As you will see below, the number of features will
+make your head spin!
curl is powered by libcurl for all transfer-related features. See
-.BR libcurl (3)
-for details.
+\fIlibcurl(3)\fP for details.
.SH URL
The URL syntax is protocol-dependent. You'll find a detailed description in
RFC 3986.
@@ -48,18 +47,20 @@
You can specify multiple URLs or parts of URLs by writing part sets within
braces as in:
- http://site.{one,two,three}.com
+ http://site.{one,two,three}.com
or you can get sequences of alphanumeric series by using [] as in:
- ftp://ftp.numericals.com/file[1-100].txt
- ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
- ftp://ftp.letters.com/file[a-z].txt
+ ftp://ftp.numericals.com/file[1-100].txt
+
+ ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
+
+ ftp://ftp.letters.com/file[a-z].txt
Nested sequences are not supported, but you can use several ones next to each
other:
- http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
+ http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order.
@@ -67,8 +68,19 @@
You can specify a step counter for the ranges to get every Nth number or
letter:
- http://www.numericals.com/file[1-100:10].txt
- http://www.letters.com/file[a-z:2].txt
+ http://www.numericals.com/file[1-100:10].txt
+
+ http://www.letters.com/file[a-z:2].txt
+
+When using [] or {} sequences when invoked from a command line prompt, you
+probably have to put the full URL within double quotes to avoid the shell from
+interfering with it. This also goes for other characters treated special, like
+for example '&', '?' and '*'.
+
+Provide the IPv6 zone index in the URL with an escaped percentage sign and the
+interface name. Like in
+
+ http://[fe80::3%25eth0]/
If you specify URL without protocol:// prefix, curl will attempt to guess what
protocol you might want. It will then default to HTTP but try other protocols
@@ -79,14 +91,14 @@
validate it as a syntactically correct URL by any means but is instead
\fBvery\fP liberal with what it accepts.
-Curl will attempt to re-use connections for multiple file transfers, so that
+curl will attempt to re-use connections for multiple file transfers, so that
getting many files from the same server will not do multiple connects /
handshakes. This improves speed. Of course this is only done on files
specified on a single command line and cannot be used between separate curl
invokes.
.SH "PROGRESS METER"
-curl normally displays a progress meter during operations, indicating the amount
-of transferred data, transfer speeds and estimated time left, etc.
+curl normally displays a progress meter during operations, indicating the
+amount of transferred data, transfer speeds and estimated time left, etc.
curl displays this data to the terminal by default, so if you invoke curl to
do an operation and it is about to write data to the terminal, it
@@ -103,24 +115,84 @@
If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
friend.
.SH OPTIONS
-In general, all boolean options are enabled with --option and yet again
+Options start with one or two dashes. Many of the options require an
+additional value next to them.
+
+The short "single-dash" form of the options, -d for example, may be used with
+or without a space between it and its value, although a space is a recommended
+separator. The long "double-dash" form, --data for example, requires a space
+between it and its value.
+
+Short version options that don't need any additional values can be used
+immediately next to each other, like for example you can specify all the
+options -O, -L and -v at once as -OLv.
+
+In general, all boolean options are enabled with --\fBoption\fP and yet again
disabled with --\fBno-\fPoption. That is, you use the exact same option name
but prefix it with "no-". However, in this list we mostly only list and show
the --option version of them. (This concept with --no options was added in
7.19.0. Previously most options were toggled on/off on repeated use of the
same command line option.)
-.IP "-a/--append"
-(FTP/SFTP) When used in an upload, this will tell curl to append to the target
-file instead of overwriting it. If the file doesn't exist, it will be created.
-Note that this flag is ignored by some SSH servers (including OpenSSH).
-.IP "-A/--user-agent <agent string>"
+.IP "-#, --progress-bar"
+Make curl display progress as a simple progress bar instead of the standard,
+more informational, meter.
+.IP "-:, --next"
+Tells curl to use a separate operation for the following URL and associated
+options. This allows you to send several URL requests, each with their own
+specific options, for example, such as different user names or custom requests
+for each. (Added in 7.36.0)
+.IP "-0, --http1.0"
+(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally
+preferred: HTTP 1.1.
+.IP "--http1.1"
+(HTTP) Tells curl to use HTTP version 1.1. This is the internal default
+version. (Added in 7.33.0)
+.IP "--http2"
+(HTTP) Tells curl to issue its requests using HTTP 2. This requires that the
+underlying libcurl was built to support it. (Added in 7.33.0)
+.IP "--no-npn"
+Disable the NPN TLS extension. NPN is enabled by default if libcurl was built
+with an SSL library that supports NPN. NPN is used by a libcurl that supports
+HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
+
+(Added in 7.36.0)
+.IP "--no-alpn"
+Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built
+with an SSL library that supports ALPN. ALPN is used by a libcurl that supports
+HTTP 2 to negotiate HTTP 2 support with the server during https sessions.
+
+(Added in 7.36.0)
+.IP "-1, --tlsv1"
+(SSL)
+Forces curl to use TLS version 1.x when negotiating with a remote TLS server.
+You can use options \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, and \fI--tlsv1.2\fP to
+control the TLS version more precisely (if the SSL backend in use supports such
+a level of control).
+.IP "-2, --sslv2"
+(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL
+server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
+considered insecure.
+.IP "-3, --sslv3"
+(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL
+server. Sometimes curl is built without SSLv3 support.
+.IP "-4, --ipv4"
+This option tells curl to resolve names to IPv4 addresses only, and not for
+example try IPv6.
+.IP "-6, --ipv6"
+This option tells curl to resolve names to IPv6 addresses only, and not for
+example try IPv4.
+.IP "-a, --append"
+(FTP/SFTP) When used in an upload, this makes curl append to the target file
+instead of overwriting it. If the remote file doesn't exist, it will be
+created. Note that this flag is ignored by some SFTP servers (including
+OpenSSH).
+.IP "-A, --user-agent <agent string>"
(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
the string, surround the string with single quote marks. This can also be set
-with the \fI-H/--header\fP option of course.
+with the \fI-H, --header\fP option of course.
-If this option is set more than once, the last one will be the one that's
-used.
+If this option is used several times, the last one will be used.
.IP "--anyauth"
(HTTP) Tells curl to figure out authentication method by itself, and use the
most secure one the remote site claims to support. This is done by first
@@ -133,65 +205,49 @@
since it may require data to be sent twice and then the client must be able to
rewind. If the need should arise when uploading from stdin, the upload
operation will fail.
-.IP "-b/--cookie <name=data>"
-(HTTP)
-Pass the data to the HTTP server as a cookie. It is supposedly the
-data previously received from the server in a "Set-Cookie:" line.
-The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
+.IP "-b, --cookie <name=data>"
+(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data
+previously received from the server in a "Set-Cookie:" line. The data should
+be in the format "NAME1=VALUE1; NAME2=VALUE2".
If no '=' symbol is used in the line, it is treated as a filename to use to
read previously stored cookie lines from, which should be used in this session
if they match. Using this method also activates the "cookie parser" which will
make curl record incoming cookies too, which may be handy if you're using this
-in combination with the \fI-L/--location\fP option. The file format of the
+in combination with the \fI-L, --location\fP option. The file format of the
file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
cookie file format.
-\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
-input. No cookies will be stored in the file. To store cookies, use the
-\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
-using \fI-D/--dump-header\fP!
-
-If this option is set more than once, the last one will be the one that's
-used.
-.IP "-B/--use-ascii"
-Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
-enforced by using an URL that ends with ";type=A". This option causes data
-sent to stdout to be in text mode for win32 systems.
-.IP "--basic"
-(HTTP) Tells curl to use HTTP Basic authentication. This is the default and
-this option is usually pointless, unless you use it to override a previously
-set option that sets a different authentication method (such as \fI--ntlm\fP,
-\fI--digest\fP, or \fI--negotiate\fP).
-.IP "--ciphers <list of ciphers>"
-(SSL) Specifies which ciphers to use in the connection. The list of ciphers
-must specify valid ciphers. Read up on SSL cipher list details on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of
-NSS ciphers is in the NSSCipherSuite entry at this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
-
-If this option is used several times, the last one will override the others.
-.IP "--compressed"
-(HTTP) Request a compressed response using one of the algorithms libcurl
-supports, and return the uncompressed document. If this option is used and
-the server sends an unsupported encoding, curl will report an error.
-.IP "--connect-timeout <seconds>"
-Maximum time in seconds that you allow the connection to the server to take.
-This only limits the connection phase, once curl has connected this option is
-of no more use. See also the \fI-m/--max-time\fP option.
+The file specified with \fI-b, --cookie\fP is only used as input. No cookies
+will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP
+option.
If this option is used several times, the last one will be used.
-.IP "-c/--cookie-jar <file name>"
-Specify to which file you want curl to write all cookies after a completed
-operation. Curl writes all cookies previously read from a specified file as
-well as all cookies received from remote server(s). If no cookies are known,
-no file will be written. The file will be written using the Netscape cookie
-file format. If you set the file name to a single dash, "-", the cookies will
-be written to stdout.
+.IP "-B, --use-ascii"
+(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using
+an URL that ends with ";type=A". This option causes data sent to stdout to be
+in text mode for win32 systems.
+.IP "--basic"
+(HTTP) Tells curl to use HTTP Basic authentication with the remote host. This
+is the default and this option is usually pointless, unless you use it to
+override a previously set option that sets a different authentication method
+(such as \fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP).
-.B NOTE
+Used together with \fI-u, --user\fP and \fI-x, --proxy\fP.
+
+See also \fI--proxy-basic\fP.
+.IP "-c, --cookie-jar <file name>"
+(HTTP) Specify to which file you want curl to write all cookies after a
+completed operation. Curl writes all cookies previously read from a specified
+file as well as all cookies received from remote server(s). If no cookies are
+known, no data will be written. The file will be written using the Netscape
+cookie file format. If you set the file name to a single dash, "-", the
+cookies will be written to stdout.
+
+This command line option will activate the cookie engine that makes curl
+record and use cookies. Another way to activate it is to use the \fI-b,
+--cookie\fP option.
+
If the cookie jar can't be created or written to, the whole curl operation
won't fail or even report an error clearly. Using -v will get a warning
displayed, but that is the only visible feedback you get about this possibly
@@ -199,7 +255,7 @@
If this option is used several times, the last specified file name will be
used.
-.IP "-C/--continue-at <offset>"
+.IP "-C, --continue-at <offset>"
Continue/Resume a previous file transfer at the given offset. The given offset
is the exact number of bytes that will be skipped, counting from the beginning
of the source file before it is transferred to the destination. If used with
@@ -209,16 +265,41 @@
transfer. It then uses the given output/input files to figure that out.
If this option is used several times, the last one will be used.
+.IP "--ciphers <list of ciphers>"
+(SSL) Specifies which ciphers to use in the connection. The list of ciphers
+must specify valid ciphers. Read up on SSL cipher list details on this URL:
+\fIhttps://www.openssl.org/docs/apps/ciphers.html\fP
+
+NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
+ciphers is in the NSSCipherSuite entry at this URL:
+\fIhttps://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
+
+If this option is used several times, the last one will be used.
+.IP "--compressed"
+(HTTP) Request a compressed response using one of the algorithms curl
+supports, and save the uncompressed document. If this option is used and the
+server sends an unsupported encoding, curl will report an error.
+.IP "--connect-timeout <seconds>"
+Maximum time in seconds that you allow curl's connection to take. This only
+limits the connection phase, so if curl connects within the given period it
+will continue - if not it will exit. Since version 7.32.0, this option
+accepts decimal values.
+
+See also the \fI-m, --max-time\fP option.
+
+If this option is used several times, the last one will be used.
.IP "--create-dirs"
-When used in conjunction with the -o option, curl will create the necessary
-local directory hierarchy as needed. This option creates the dirs mentioned
-with the -o option, nothing else. If the -o file name uses no dir or if the
-dirs it mentions already exist, no dir will be created.
+When used in conjunction with the \fI-o\fP option, curl will create the
+necessary local directory hierarchy as needed. This option creates the dirs
+mentioned with the \fI-o\fP option, nothing else. If the \fI-o\fP file name
+uses no dir or if the dirs it mentions already exist, no dir will be created.
To create remote directories when using FTP or SFTP, try
\fI--ftp-create-dirs\fP.
.IP "--crlf"
-(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
+Convert LF to CRLF in upload. Useful for MVS (OS/390).
+
+(SMTP added in 7.40.0)
.IP "--crlfile <file>"
(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
List that may specify peer certificates that are to be considered revoked.
@@ -226,16 +307,17 @@
If this option is used several times, the last one will be used.
(Added in 7.19.7)
-.IP "-d/--data <data>"
+.IP "-d, --data <data>"
(HTTP) Sends the specified data in a POST request to the HTTP server, in the
same way that a browser does when a user has filled in an HTML form and
presses the submit button. This will cause curl to pass the data to the server
using the content-type application/x-www-form-urlencoded. Compare to
-\fI-F/--form\fP.
+\fI-F, --form\fP.
-\fI-d/--data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
-you should instead use the \fI--data-binary\fP option. To URL-encode the value
-of a form field you may use \fI--data-urlencode\fP.
+\fI-d, --data\fP is the same as \fI--data-ascii\fP. \fI--data-raw\fP is almost
+the same but does not have a special interpretation of the @ character. To
+post data purely binary, you should instead use the \fI--data-binary\fP option.
+To URL-encode the value of a form field you may use \fI--data-urlencode\fP.
If any of these options is used more than once on the same command line, the
data pieces specified will be merged together with a separating
@@ -243,20 +325,40 @@
chunk that looks like \&'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a file name to
-read the data from, or - if you want curl to read the data from stdin. The
-contents of the file must already be URL-encoded. Multiple files can also be
-specified. Posting data from a file named 'foobar' would thus be done with
-\fI--data @foobar\fP.
+read the data from, or - if you want curl to read the data from
+stdin. Multiple files can also be specified. Posting data from a file
+named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is
+told to read from a file like that, carriage returns and newlines will be
+stripped out. If you don't want the @ character to have a special
+interpretation use \fI--data-raw\fP instead.
+.IP "-D, --dump-header <file>"
+Write the protocol headers to the specified file.
+
+This option is handy to use when you want to store the headers that an HTTP
+site sends to you. Cookies from the headers could then be read in a second
+curl invocation by using the \fI-b, --cookie\fP option! The
+\fI-c, --cookie-jar\fP option is a better way to store cookies.
+
+When used in FTP, the FTP server response lines are considered being "headers"
+and thus are saved there.
+
+If this option is used several times, the last one will be used.
+.IP "--data-ascii <data>"
+See \fI-d, --data\fP.
.IP "--data-binary <data>"
(HTTP) This posts data exactly as specified with no extra processing
whatsoever.
If you start the data with the letter @, the rest should be a filename. Data
is posted in a similar manner as \fI--data-ascii\fP does, except that newlines
-are preserved and conversions are never done.
+and carriage returns are preserved and conversions are never done.
If this option is used several times, the ones following the first will append
-data as described in \fI-d/--data\fP.
+data as described in \fI-d, --data\fP.
+.IP "--data-raw <data>"
+(HTTP) This posts data similarly to \fI--data\fP but without the special
+interpretation of the @ character. See \fI-d, --data\fP.
+(Added in 7.43.0)
.IP "--data-urlencode <data>"
(HTTP) This posts data, similar to the other --data options with the exception
that this performs URL-encoding. (Added in 7.18.0)
@@ -284,87 +386,130 @@
sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
name is expected to be URL-encoded already.
.RE
+.IP "--delegation LEVEL"
+Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
+comes to user credentials. Used with GSS/kerberos.
+.RS
+.IP "none"
+Don't allow any delegation.
+.IP "policy"
+Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
+service ticket, which is a matter of realm policy.
+.IP "always"
+Unconditionally allow the server to delegate.
+.RE
.IP "--digest"
-(HTTP) Enables HTTP Digest authentication. This is a authentication that
-prevents the password from being sent over the wire in clear text. Use this in
-combination with the normal \fI-u/--user\fP option to set user name and
-password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
+(HTTP) Enables HTTP Digest authentication. This is an authentication scheme
+that prevents the password from being sent over the wire in clear text. Use
+this in combination with the normal \fI-u, --user\fP option to set user name
+and password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
related options.
-If this option is used several times, the following occurrences make no
-difference.
+If this option is used several times, only the first one is used.
.IP "--disable-eprt"
(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
active FTP transfers. Curl will normally always first attempt to use EPRT,
then LPRT before using PORT, but with this option, it will use PORT right
-away. EPRT and LPRT are extensions to the original FTP protocol, and may not work
-on all servers, but they enable more functionality in a better way than the
-traditional PORT command.
+away. EPRT and LPRT are extensions to the original FTP protocol, and may not
+work on all servers, but they enable more functionality in a better way than
+the traditional PORT command.
\fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
is an alias for \fB--disable-eprt\fP.
Disabling EPRT only changes the active behavior. If you want to switch to
-passive mode you need to not use \fI-P/--ftp-port\fP or force it with
+passive mode you need to not use \fI-P, --ftp-port\fP or force it with
\fI--ftp-pasv\fP.
.IP "--disable-epsv"
(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
transfers. Curl will normally always first attempt to use EPSV before PASV,
but with this option, it will not try using EPSV.
-\fB--epsv\fP can be used to explicitly enable EPRT again and \fB--no-epsv\fP
+\fB--epsv\fP can be used to explicitly enable EPSV again and \fB--no-epsv\fP
is an alias for \fB--disable-epsv\fP.
Disabling EPSV only changes the passive behavior. If you want to switch to
-active mode you need to use \fI-P/--ftp-port\fP.
-.IP "-D/--dump-header <file>"
-Write the protocol headers to the specified file.
+active mode you need to use \fI-P, --ftp-port\fP.
+.IP "--dns-interface <interface>"
+Tell curl to send outgoing DNS requests through <interface>. This option
+is a counterpart to \fI--interface\fP (which does not affect DNS). The
+supplied string must be an interface name (not an address).
-This option is handy to use when you want to store the headers that a HTTP
-site sends to you. Cookies from the headers could then be read in a second
-curl invocation by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
-option is however a better way to store cookies.
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-ipv4-addr <ip-address>"
+Tell curl to bind to <ip-address> when making IPv4 DNS requests, so that
+the DNS requests originate from this address. The argument should be a
+single IPv4 address.
-When used in FTP, the FTP server response lines are considered being "headers"
-and thus are saved there.
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-ipv6-addr <ip-address>"
+Tell curl to bind to <ip-address> when making IPv6 DNS requests, so that
+the DNS requests originate from this address. The argument should be a
+single IPv6 address.
-If this option is used several times, the last one will be used.
-.IP "-e/--referer <URL>"
-(HTTP) Sends the "Referer Page" information to the HTTP server. This can also
-be set with the \fI-H/--header\fP flag of course. When used with
-\fI-L/--location\fP you can append ";auto" to the --referer URL to make curl
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "--dns-servers <ip-address,ip-address>"
+Set the list of DNS servers to be used instead of the system default.
+The list of IP addresses should be separated with commas. Port numbers
+may also optionally be given as \fI:<port-number>\fP after each IP
+address.
+
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one. (Added in
+7.33.0)
+.IP "-e, --referer <URL>"
+(HTTP) Sends the "Referrer Page" information to the HTTP server. This can also
+be set with the \fI-H, --header\fP flag of course. When used with
+\fI-L, --location\fP you can append ";auto" to the --referer URL to make curl
automatically set the previous URL when it follows a Location: header. The
\&";auto" string can be used alone, even if you don't set an initial --referer.
If this option is used several times, the last one will be used.
+.IP "-E, --cert <certificate[:password]>"
+(SSL) Tells curl to use the specified client certificate file when getting a
+file with HTTPS, FTPS or another SSL-based protocol. The certificate must be
+in PKCS#12 format if using Secure Transport, or PEM format if using any other
+engine. If the optional password isn't specified, it will be queried
+for on the terminal. Note that this option assumes a \&"certificate" file that
+is the private key and the private certificate concatenated! See \fI--cert\fP
+and \fI--key\fP to specify them independently.
+
+If curl is built against the NSS SSL library then this option can tell
+curl the nickname of the certificate to use within the NSS database defined
+by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
+NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
+loaded. If you want to use a file from the current directory, please precede
+it with "./" prefix, in order to avoid confusion with a nickname. If the
+nickname contains ":", it needs to be preceded by "\\" so that it is not
+recognized as password delimiter. If the nickname contains "\\", it needs to
+be escaped as "\\\\" so that it is not recognized as an escape character.
+
+(iOS and Mac OS X only) If curl is built against Secure Transport, then the
+certificate string can either be the name of a certificate/private key in the
+system or user keychain, or the path to a PKCS#12-encoded certificate and
+private key. If you want to use a file from the current directory, please
+precede it with "./" prefix, in order to avoid confusion with a nickname.
+
+If this option is used several times, the last one will be used.
.IP "--engine <name>"
Select the OpenSSL crypto engine to use for cipher
operations. Use \fI--engine list\fP to print a list of build-time supported
engines. Note that not all (or none) of the engines may be available at
run-time.
.IP "--environment"
-(RISC OS ONLY) Sets a range of environment variables, using the names the -w
-option supports, to allow easier extraction of useful information after having
-run curl.
+(RISC OS ONLY) Sets a range of environment variables, using the names the
+\fI-w\fP option supports, to allow easier extraction of useful information
+after having run curl.
.IP "--egd-file <file>"
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
is used to seed the random engine for SSL connections. See also the
\fI--random-file\fP option.
-.IP "-E/--cert <certificate[:password]>"
-(SSL) Tells curl to use the specified certificate file when getting a file
-with HTTPS or FTPS. The certificate must be in PEM format. If the optional
-password isn't specified, it will be queried for on the terminal. Note that
-this option assumes a \&"certificate" file that is the private key and the
-private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
-them independently.
-
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the certificate to use within the NSS database defined
-by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
-NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
-loaded.
-
-If this option is used several times, the last one will be used.
.IP "--cert-type <type>"
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
DER and ENG are recognized types. If not specified, PEM is assumed.
@@ -384,50 +529,134 @@
\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the
Current Working Directory, or in any folder along your PATH.
-If curl is built against the NSS SSL library then this option tells
-curl the nickname of the CA certificate to use within the NSS database
-defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb).
-If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files
-may be loaded.
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
If this option is used several times, the last one will be used.
.IP "--capath <CA certificate directory>"
(SSL) Tells curl to use the specified certificate directory to verify the
-peer. The certificates must be in PEM format, and the directory must have been
-processed using the c_rehash utility supplied with openssl. Using
-\fI--capath\fP can allow curl to make SSL-connections much more efficiently
-than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
-certificates.
+peer. Multiple paths can be provided by separating them with ":" (e.g.
+\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
+built against OpenSSL, the directory must have been processed using the
+c_rehash utility supplied with OpenSSL. Using \fI--capath\fP can allow
+OpenSSL-powered curl to make SSL-connections much more efficiently than using
+\fI--cacert\fP if the \fI--cacert\fP file contains many CA certificates.
+
+If this option is set, the default capath value will be ignored, and if it is
+used several times, the last one will be used.
+.IP "--pinnedpubkey <pinned public key>"
+(SSL) Tells curl to use the specified public key file to verify the peer. The
+file must contain a single public key in PEM or DER format.
+
+When negotiating a TLS or SSL connection, the server sends a certificate
+indicating its identity. A public key is extracted from this certificate and
+if it does not exactly match the public key provided to this option, curl will
+abort the connection before sending or receiving any data.
+
+Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for NSS and
+wolfSSL/CyaSSL. Other SSL backends not supported.
If this option is used several times, the last one will be used.
-.IP "-f/--fail"
+.IP "--cert-status"
+(SSL) Tells curl to verify the status of the server certificate by using the
+Certificate Status Request (aka. OCSP stapling) TLS extension.
+
+If this option is enabled and the server sends an invalid (e.g. expired)
+response, if the response suggests that the server certificate has been revoked,
+or no response at all is received, the verification fails.
+
+This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
+(Added in 7.41.0)
+.IP "--false-start"
+
+(SSL) Tells curl to use false start during the TLS handshake. False start is a
+mode where a TLS client will start sending application data before verifying
+the server's Finished message, thus saving a round trip when performing a full
+handshake.
+
+This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
+or later, or OS X 10.9 or later) backends.
+(Added in 7.42.0)
+.IP "-f, --fail"
(HTTP) Fail silently (no output at all) on server errors. This is mostly done
-to better enable scripts etc to better deal with failed attempts. In
-normal cases when a HTTP server fails to deliver a document, it returns an
-HTML document stating so (which often also describes why and more). This flag
-will prevent curl from outputting that and return error 22.
+to better enable scripts etc to better deal with failed attempts. In normal
+cases when an HTTP server fails to deliver a document, it returns an HTML
+document stating so (which often also describes why and more). This flag will
+prevent curl from outputting that and return error 22.
This method is not fail-safe and there are occasions where non-successful
response codes will slip through, especially when authentication is involved
(response codes 401 and 407).
+.IP "-F, --form <name=content>"
+(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
+submit button. This causes curl to POST data using the Content-Type
+multipart/form-data according to RFC 2388. This enables uploading of binary
+files etc. To force the 'content' part to be a file, prefix the file name with
+an @ sign. To just get the content part from a file, prefix the file name with
+the symbol <. The difference between @ and < is then that @ makes a file get
+attached in the post as a file upload, while the < makes a text field and just
+get the contents for that text field from a file.
+
+Example, to send your password file to the server, where
+\&'password' is the name of the form-field to which /etc/passwd will be the
+input:
+
+\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
+
+To read content from stdin instead of a file, use - as the filename. This goes
+for both @ and < constructs.
+
+You can also tell curl what Content-Type to use by using 'type=', in a manner
+similar to:
+
+\fBcurl\fP -F "[email protected];type=text/html" url.com
+
+or
+
+\fBcurl\fP -F "name=daniel;type=text/foo" url.com
+
+You can also explicitly change the name field of a file upload part by setting
+filename=, like this:
+
+\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
+
+If filename/path contains ',' or ';', it must be quoted by double-quotes like:
+
+\fBcurl\fP -F "file=@\\"localfile\\";filename=\\"nameinpost\\"" url.com
+
+or
+
+\fBcurl\fP -F 'file=@"localfile";filename="nameinpost"' url.com
+
+Note that if a filename/path is quoted by double-quotes, any double-quote
+or backslash within the filename must be escaped by backslash.
+
+See further examples and details in the MANUAL.
+
+This option can be used multiple times.
.IP "--ftp-account [data]"
(FTP) When an FTP server asks for "account data" after user name and password
has been provided, this data is sent off using the ACCT command. (Added in
7.13.0)
-If this option is used twice, the second will override the previous use.
+If this option is used several times, the last one will be used.
+.IP "--ftp-alternative-to-user <command>"
+(FTP) If authenticating with the USER and PASS commands fails, send this
+command. When connecting to Tumbleweed's Secure Transport server over FTPS
+using a client certificate, using "SITE AUTH" will tell the server to retrieve
+the username from the certificate. (Added in 7.15.5)
.IP "--ftp-create-dirs"
(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't
currently exist on the server, the standard behavior of curl is to
fail. Using this option, curl will instead attempt to create missing
directories.
.IP "--ftp-method [method]"
-(FTP) Control what method curl should use to reach a file on a FTP(S)
+(FTP) Control what method curl should use to reach a file on an FTP(S)
server. The method argument should be one of the following alternatives:
.RS
.IP multicwd
curl does a single CWD operation for each path part in the given URL. For deep
-hierarchies this means very many commands. This is how RFC1738 says it should
+hierarchies this means very many commands. This is how RFC 1738 says it should
be done. This is the default but the slowest behavior.
.IP nocwd
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
@@ -437,23 +666,19 @@
\&"normally" (like in the multicwd case). This is somewhat more standards
compliant than 'nocwd' but without the full penalty of 'multicwd'.
.RE
+.IP
(Added in 7.15.1)
.IP "--ftp-pasv"
-(FTP) Use passive mode for the data conection. Passive is the internal default
+(FTP) Use passive mode for the data connection. Passive is the internal default
behavior, but using this option can be used to override a previous
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
-If this option is used several times, the following occurrences make no
-difference. Undoing an enforced passive really isn't doable but you must then
-instead enforce the correct \fI-P/--ftp-port\fP again.
+If this option is used several times, only the first one is used. Undoing an
+enforced passive really isn't doable but you must then instead enforce the
+correct \fI-P, --ftp-port\fP again.
Passive mode means that curl will try the EPSV command first and then PASV,
unless \fI--disable-epsv\fP is used.
-.IP "--ftp-alternative-to-user <command>"
-(FTP) If authenticating with the USER and PASS commands fails, send this
-command. When connecting to Tumbleweed's Secure Transport server over FTPS
-using a client certificate, using "SITE AUTH" will tell the server to retrieve
-the username from the certificate. (Added in 7.15.5)
.IP "--ftp-skip-pasv-ip"
(FTP) Tell curl to not use the IP address the server suggests in its response
to curl's PASV command when curl connects the data connection. Instead curl
@@ -466,30 +691,12 @@
FTP servers, mainly drftpd, require this non-standard command for
directory listings as well as up and downloads in PASV mode.
(Added in 7.20.x)
-.IP "--ssl"
-(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
-non-secure connection if the server doesn't support SSL/TLS. See also
-\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
-encryption required. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0) and that
-can still be used but will be removed in a future version.
-.IP "--ftp-ssl-control"
-(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
-authentication, but non-encrypted data transfers for efficiency. Fails the
-transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
-.IP "--ssl-reqd"
-(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
-connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-
-This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5) and
-that can still be used but will be removed in a future version.
.IP "--ftp-ssl-ccc"
(FTP) Use CCC (Clear Command Channel)
Shuts down the SSL/TLS layer after authenticating. The rest of the
control channel communication will be unencrypted. This allows
NAT routers to follow the FTP transaction. The default mode is
-passive. See --ftp-ssl-ccc-mode for other modes.
+passive. See \fI--ftp-ssl-ccc-mode\fP for other modes.
(Added in 7.16.1)
.IP "--ftp-ssl-ccc-mode [active/passive]"
(FTP) Use CCC (Clear Command Channel)
@@ -498,98 +705,85 @@
shutdown from the server. The active mode initiates the shutdown and
waits for a reply from the server.
(Added in 7.16.2)
-.IP "-F/--form <name=content>"
-(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
-submit button. This causes curl to POST data using the Content-Type
-multipart/form-data according to RFC2388. This enables uploading of binary
-files etc. To force the 'content' part to be a file, prefix the file name
-with an @ sign. To just get the content part from a file, prefix the file name
-with the symbol <. The difference between @ and < is then that @ makes a file
-get attached in the post as a file upload, while the < makes a text field and
-just get the contents for that text field from a file.
-
-Example, to send your password file to the server, where
-\&'password' is the name of the form-field to which /etc/passwd will be the
-input:
-
-\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
-
-To read the file's content from stdin instead of a file, use - where the file
-name should've been. This goes for both @ and < constructs.
-
-You can also tell curl what Content-Type to use by using 'type=', in a manner
-similar to:
-
-\fBcurl\fP -F "[email protected];type=text/html" url.com
-
-or
-
-\fBcurl\fP -F "name=daniel;type=text/foo" url.com
-
-You can also explicitly change the name field of an file upload part by
-setting filename=, like this:
-
-\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
-
-See further examples and details in the MANUAL.
-
-This option can be used multiple times.
+.IP "--ftp-ssl-control"
+(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure
+authentication, but non-encrypted data transfers for efficiency. Fails the
+transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
+that can still be used but will be removed in a future version.
.IP "--form-string <name=string>"
(HTTP) Similar to \fI--form\fP except that the value string for the named
parameter is used literally. Leading \&'@' and \&'<' characters, and the
\&';type=' string in the value have no special meaning. Use this in preference
to \fI--form\fP if there's any possibility that the string value may
accidentally trigger the \&'@' or \&'<' features of \fI--form\fP.
-.IP "-g/--globoff"
+.IP "-g, --globoff"
This option switches off the "URL globbing parser". When you set this option,
you can specify URLs that contain the letters {}[] without having them being
interpreted by curl itself. Note that these letters are not normal legal URL
contents but they should be encoded according to the URI standard.
-.IP "-G/--get"
-When used, this option will make all data specified with \fI-d/--data\fP or
-\fI--data-binary\fP to be used in a HTTP GET request instead of the POST
-request that otherwise would be used. The data will be appended to the URL
-with a '?' separator.
+.IP "-G, --get"
+When used, this option will make all data specified with \fI-d, --data\fP,
+\fI--data-binary\fP or \fI--data-urlencode\fP to be used in an HTTP GET
+request instead of the POST request that otherwise would be used. The data
+will be appended to the URL with a '?' separator.
If used in combination with -I, the POST data will instead be appended to the
URL with a HEAD request.
-If this option is used several times, the following occurrences make no
-difference. This is because undoing a GET doesn't make sense, but you should
-then instead enforce the alternative method you prefer.
-.IP "-h/--help"
-Usage help.
-.IP "-H/--header <header>"
-(HTTP) Extra header to use when getting a web page. You may specify any number
-of extra headers. Note that if you should add a custom header that has the
-same name as one of the internal ones curl would use, your externally set
-header will be used instead of the internal one. This allows you to make even
-trickier stuff than curl would normally do. You should not replace internally
-set headers without knowing perfectly well what you're doing. Remove an
-internal header by giving a replacement without content on the right side of
-the colon, as in: -H \&"Host:".
+If this option is used several times, only the first one is used. This is
+because undoing a GET doesn't make sense, but you should then instead enforce
+the alternative method you prefer.
+.IP "-H, --header <header>"
+(HTTP) Extra header to include in the request when sending HTTP to a
+server. You may specify any number of extra headers. Note that if you should
+add a custom header that has the same name as one of the internal ones curl
+would use, your externally set header will be used instead of the internal
+one. This allows you to make even trickier stuff than curl would normally
+do. You should not replace internally set headers without knowing perfectly
+well what you're doing. Remove an internal header by giving a replacement
+without content on the right side of the colon, as in: -H \&"Host:". If you
+send the custom header with no-value then its header must be terminated with a
+semicolon, such as \-H \&"X-Custom-Header;" to send "X-Custom-Header:".
curl will make sure that each header you add/replace is sent with the proper
end-of-line marker, you should thus \fBnot\fP add that as a part of the header
content: do not add newlines or carriage returns, they will only mess things up
for you.
-See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
+See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
+
+Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers
+intended for a proxy.
+
+Example:
+
+\&# curl -H "X-First-Name: Joe" http://192.168.0.1/
+
+\fBWARNING\fP: headers set with this option will be set in all requests - even
+after redirects are followed, like when told with \fB-L, --location\fP. This
+can lead to the header being sent to other hosts than the original host, so
+sensitive headers should be used with caution combined with following
+redirects.
This option can be used multiple times to add/replace/remove multiple headers.
.IP "--hostpubmd5 <md5>"
-Pass a string containing 32 hexadecimal digits. The string should be the 128
-bit MD5 checksum of the remote host's public key, curl will refuse the
-connection with the host unless the md5sums match. This option is only for SCP
-and SFTP transfers. (Added in 7.17.1)
+(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
+be the 128 bit MD5 checksum of the remote host's public key, curl will refuse
+the connection with the host unless the md5sums match. (Added in 7.17.1)
.IP "--ignore-content-length"
(HTTP)
Ignore the Content-Length header. This is particularly useful for servers
running Apache 1.x, which will report incorrect Content-Length for files
larger than 2 gigabytes.
-.IP "-i/--include"
+.IP "-i, --include"
(HTTP) Include the HTTP-header in the output. The HTTP-header includes things
like server-name, date of the document, HTTP-version and more...
+.IP "-I, --head"
+(HTTP/FTP/FILE)
+Fetch the HTTP-header only! HTTP-servers feature the command HEAD
+which this uses to get nothing but the header of a document. When used
+on an FTP or FILE file, curl displays the file size and last modification
+time only.
.IP "--interface <name>"
Perform an operation using a specified interface. You can enter interface
name, IP address or host name. An example could look like:
@@ -597,72 +791,46 @@
curl --interface eth0:1 http://www.netscape.com/
If this option is used several times, the last one will be used.
-.IP "-I/--head"
-(HTTP/FTP/FILE)
-Fetch the HTTP-header only! HTTP-servers feature the command HEAD
-which this uses to get nothing but the header of a document. When used
-on a FTP or FILE file, curl displays the file size and last modification
-time only.
-.IP "-j/--junk-session-cookies"
+.IP "-j, --junk-session-cookies"
(HTTP) When curl is told to read cookies from a given file, this option will
make it discard all "session cookies". This will basically have the same effect
as if a new session is started. Typical browsers always discard session
cookies when they're closed down.
-.IP "-J/--remote-header-name"
-(HTTP) This option tells the -O/--remote-name option to use the server-specified
-Content-Disposition filename instead of extracting a filename from the URL.
-.IP "-k/--insecure"
+.IP "-J, --remote-header-name"
+(HTTP) This option tells the \fI-O, --remote-name\fP option to use the
+server-specified Content-Disposition filename instead of extracting a filename
+from the URL.
+
+There's no attempt to decode %-sequences (yet) in the provided file name, so
+this option may provide you with rather unexpected file names.
+.IP "-k, --insecure"
(SSL) This option explicitly allows curl to perform "insecure" SSL connections
and transfers. All SSL connections are attempted to be made secure by using
the CA certificate bundle installed by default. This makes all connections
-considered "insecure" fail unless \fI-k/--insecure\fP is used.
+considered "insecure" fail unless \fI-k, --insecure\fP is used.
See this online resource for further details:
\fBhttp://curl.haxx.se/docs/sslcerts.html\fP
-.IP "--keepalive-time <seconds>"
-This option sets the time a connection needs to remain idle before sending
-keepalive probes and the time between individual keepalive probes. It is
-currently effective on operating systems offering the TCP_KEEPIDLE and
-TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
-option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
-
-If this option is used multiple times, the last occurrence sets the amount.
-.IP "--key <key>"
-(SSL/SSH) Private key file name. Allows you to provide your private key in this
-separate file.
-
-If this option is used several times, the last one will be used.
-.IP "--key-type <type>"
-(SSL) Private key file type. Specify which type your \fI--key\fP provided
-private key is. DER, PEM, and ENG are supported. If not specified, PEM is
-assumed.
-
-If this option is used several times, the last one will be used.
-.IP "--krb <level>"
-(FTP) Enable Kerberos authentication and use. The level must be entered and
-should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
-a level that is not one of these, 'private' will instead be used.
-
-This option requires a library built with kerberos4 or GSSAPI
-(GSS-Negotiate) support. This is not very common. Use \fI-V/--version\fP to
-see if your curl supports it.
-
-If this option is used several times, the last one will be used.
-.IP "-K/--config <config file>"
+.IP "-K, --config <config file>"
Specify which config file to read curl arguments from. The config file is a
text file in which command line arguments can be written which then will be
-used as if they were written on the actual command line. Options and their
-parameters must be specified on the same config file line, separated by
-whitespace, colon, the equals sign or any combination thereof (however,
-the preferred separator is the equals sign). If the parameter is to contain
-whitespace, the parameter must be enclosed within quotes. Within double
-quotes, the following escape sequences are available: \\\\, \\", \\t, \\n,
-\\r and \\v. A backslash preceding any other letter is ignored. If the
-first column of a config line is a '#' character, the rest of the line will be
-treated as a comment. Only write one option per physical line in the config
-file.
+used as if they were written on the actual command line.
-Specify the filename to -K/--config as '-' to make curl read the file from
+Options and their parameters must be specified on the same config file line,
+separated by whitespace, colon, or the equals sign. Long option names can
+optionally be given in the config file without the initial double dashes and
+if so, the colon or equals characters can be used as separators. If the option
+is specified with one or two dashes, there can be no colon or equals character
+between the option and its parameter.
+
+If the parameter is to contain whitespace, the parameter must be enclosed
+within quotes. Within double quotes, the following escape sequences are
+available: \\\\, \\", \\t, \\n, \\r and \\v. A backslash preceding any other
+letter is ignored. If the first column of a config line is a '#' character,
+the rest of the line will be treated as a comment. Only write one option per
+physical line in the config file.
+
+Specify the filename to -K, --config as '-' to make curl read the file from
stdin.
Note that to be able to specify a URL in the config file, you need to specify
@@ -671,21 +839,18 @@
url = "http://curl.haxx.se/docs/"
-Long option names can optionally be given in the config file without the
-initial double dashes.
-
When curl is invoked, it always (unless \fI-q\fP is used) checks for a default
config file and uses it if found. The default config file is checked for in
the following places in this order:
1) curl tries to find the "home dir": It first checks for the CURL_HOME and
then the HOME environment variables. Failing that, it uses getpwuid() on
-UNIX-like systems (which returns the home dir given the current user in your
+Unix-like systems (which returns the home dir given the current user in your
system). On Windows, it then checks for the APPDATA variable, or as a last
resort the '%USERPROFILE%\\Application Data'.
2) On windows, if there is no _curlrc file in the home dir, it checks for one
-in the same dir the curl executable is placed. On UNIX-like systems, it will
+in the same dir the curl executable is placed. On Unix-like systems, it will
simply try to load .curlrc from the determined home dir.
.nf
@@ -703,56 +868,60 @@
.fi
This option can be used multiple times to load multiple config files.
-.IP "--libcurl <file>"
-Append this option to any ordinary curl command line, and you will get a
-libcurl-using source code written to the file that does the equivalent
-of what your command-line operation does!
+.IP "--keepalive-time <seconds>"
+This option sets the time a connection needs to remain idle before sending
+keepalive probes and the time between individual keepalive probes. It is
+currently effective on operating systems offering the TCP_KEEPIDLE and
+TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This
+option has no effect if \fI--no-keepalive\fP is used. (Added in 7.18.0)
-NOTE: this does not properly support -F and the sending of multipart
-formposts, so in those cases the output program will be missing necessary
-calls to \fIcurl_formadd(3)\fP, and possibly more.
-
-If this option is used several times, the last given file name will be
-used. (Added in 7.16.1)
-.IP "--limit-rate <speed>"
-Specify the maximum transfer rate you want curl to use. This feature is useful
-if you have a limited pipe and you'd like your transfer not to use your entire
-bandwidth.
-
-The given speed is measured in bytes/second, unless a suffix is appended.
-Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
-megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-
-The given rate is the average speed counted during the entire transfer. It
-means that curl might use higher transfer speeds in short bursts, but over
-time it uses no more than the given rate.
-
-If you also use the \fI-Y/--speed-limit\fP option, that option will take
-precedence and might cripple the rate-limiting slightly, to help keeping the
-speed-limit logic working.
+If this option is used several times, the last one will be used. If
+unspecified, the option defaults to 60 seconds.
+.IP "--key <key>"
+(SSL/SSH) Private key file name. Allows you to provide your private key in this
+separate file. For SSH, if not specified, curl tries the following candidates
+in order: '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
If this option is used several times, the last one will be used.
-.IP "-l/--list-only"
+.IP "--key-type <type>"
+(SSL) Private key file type. Specify which type your \fI--key\fP provided
+private key is. DER, PEM, and ENG are supported. If not specified, PEM is
+assumed.
+
+If this option is used several times, the last one will be used.
+.IP "--krb <level>"
+(FTP) Enable Kerberos authentication and use. The level must be entered and
+should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
+a level that is not one of these, 'private' will instead be used.
+
+This option requires a library built with kerberos4 support. This is not
+very common. Use \fI-V, --version\fP to see if your curl supports it.
+
+If this option is used several times, the last one will be used.
+.IP "-l, --list-only"
(FTP)
-When listing an FTP directory, this switch forces a name-only view.
-Especially useful if you want to machine-parse the contents of an FTP
-directory since the normal directory view doesn't use a standard look
-or format.
+When listing an FTP directory, this switch forces a name-only view. This is
+especially useful if the user wants to machine-parse the contents of an FTP
+directory since the normal directory view doesn't use a standard look or
+format. When used like this, the option causes a NLST command to be sent to
+the server instead of LIST.
-This option causes an FTP NLST command to be sent. Some FTP servers
-list only files in their response to NLST; they do not include
-subdirectories and symbolic links.
+Note: Some FTP servers list only files in their response to NLST; they do not
+include sub-directories and symbolic links.
-.IP "--local-port <num>[-num]"
-Set a preferred number or range of local port numbers to use for the
-connection(s). Note that port numbers by nature are a scarce resource that
-will be busy at times so setting this range to something too narrow might
-cause unnecessary connection setup failures. (Added in 7.15.2)
-.IP "-L/--location"
+(POP3)
+When retrieving a specific email from POP3, this switch forces a LIST command
+to be performed instead of RETR. This is particularly useful if the user wants
+to see if a specific message id exists on the server and what size it is.
+
+Note: When combined with \fI-X, --request <command>\fP, this option can be used
+to send an UIDL command instead, so the user may use the email's unique
+identifier rather than it's message id to make the request. (Added in 7.21.5)
+.IP "-L, --location"
(HTTP/HTTPS) If the server reports that the requested page has moved to a
different location (indicated with a Location: header and a 3XX response code),
this option will make curl redo the request on the new place. If used together
-with \fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages
+with \fI-i, --include\fP or \fI-I, --head\fP, headers from all requested pages
will be shown. When authentication is used, curl only sends its credentials to
the initial host. If a redirect takes curl to a different host, it won't be
able to intercept the user+password. See also \fI--location-trusted\fP on how
@@ -763,17 +932,72 @@
POST or PUT), it will do the following request with a GET if the HTTP response
was 301, 302, or 303. If the response code was any other 3xx code, curl will
re-send the following request using the same unmodified method.
+
+You can tell curl to not change the non-GET request method to GET after a 30x
+response by using the dedicated options for that: \fI--post301\fP,
+\fI--post302\fP and \fI-post303\fP.
+.IP "--libcurl <file>"
+Append this option to any ordinary curl command line, and you will get a
+libcurl-using C source code written to the file that does the equivalent
+of what your command-line operation does!
+
+If this option is used several times, the last given file name will be
+used. (Added in 7.16.1)
+.IP "--limit-rate <speed>"
+Specify the maximum transfer rate you want curl to use - for both downloads
+and uploads. This feature is useful if you have a limited pipe and you'd like
+your transfer not to use your entire bandwidth. To make it slower than it
+otherwise would be.
+
+The given speed is measured in bytes/second, unless a suffix is appended.
+Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
+megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
+
+The given rate is the average speed counted during the entire transfer. It
+means that curl might use higher transfer speeds in short bursts, but over
+time it uses no more than the given rate.
+
+If you also use the \fI-Y, --speed-limit\fP option, that option will take
+precedence and might cripple the rate-limiting slightly, to help keeping the
+speed-limit logic working.
+
+If this option is used several times, the last one will be used.
+.IP "--local-port <num>[-num]"
+Set a preferred number or range of local port numbers to use for the
+connection(s). Note that port numbers by nature are a scarce resource that
+will be busy at times so setting this range to something too narrow might
+cause unnecessary connection setup failures. (Added in 7.15.2)
.IP "--location-trusted"
-(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
+(HTTP/HTTPS) Like \fI-L, --location\fP, but will allow sending the name +
password to all hosts that the site may redirect to. This may or may not
introduce a security breach if the site redirects you to a site to which
you'll send your authentication info (which is plaintext in the case of HTTP
Basic authentication).
-.IP "--mail-rcpt <address>"
-(SMTP) Specify a single address that the given mail should get sent to. This
-option can be used multiple times to specify many recipients.
+.IP "-m, --max-time <seconds>"
+Maximum time in seconds that you allow the whole operation to take. This is
+useful for preventing your batch jobs from hanging for hours due to slow
+networks or links going down. Since 7.32.0, this option accepts decimal
+values, but the actual timeout will decrease in accuracy as the specified
+timeout increases in decimal precision. See also the \fI--connect-timeout\fP
+option.
-(Added in 7.20.0)
+If this option is used several times, the last one will be used.
+.IP "--login-options <options>"
+Specify the login options to use during server authentication.
+
+You can use the login options to specify protocol specific options that may
+be used during authentication. At present only IMAP, POP3 and SMTP support
+login options. For more information about the login options please see
+RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in
+7.34.0).
+
+If this option is used several times, the last one will be used.
+.IP "--mail-auth <address>"
+(SMTP) Specify a single address. This will be used to specify the
+authentication address (identity) of a submitted message that is being relayed
+to another server.
+
+(Added in 7.25.0)
.IP "--mail-from <address>"
(SMTP) Specify a single address that the given mail should get sent from.
@@ -783,58 +1007,69 @@
requested is larger than this value, the transfer will not start and curl will
return with exit code 63.
-\fBNOTE:\fP The file size is not always known prior to download, and for such files
-this option has no effect even if the file transfer ends up being larger than
-this given limit. This concerns both FTP and HTTP transfers.
-.IP "-m/--max-time <seconds>"
-Maximum time in seconds that you allow the whole operation to take. This is
-useful for preventing your batch jobs from hanging for hours due to slow
-networks or links going down. See also the \fI--connect-timeout\fP option.
+\fBNOTE:\fP The file size is not always known prior to download, and for such
+files this option has no effect even if the file transfer ends up being larger
+than this given limit. This concerns both FTP and HTTP transfers.
+.IP "--mail-rcpt <address>"
+(SMTP) Specify a single address, user name or mailing list name.
+
+When performing a mail transfer, the recipient should specify a valid email
+address to send the mail to. (Added in 7.20.0)
+
+When performing an address verification (VRFY command), the recipient should be
+specified as the user name or user name and domain (as per Section 3.5 of
+RFC5321). (Added in 7.34.0)
+
+When performing a mailing list expand (EXPN command), the recipient should be
+specified using the mailing list name, such as "Friends" or "London-Office".
+(Added in 7.34.0)
+.IP "--max-redirs <num>"
+Set maximum number of redirection-followings allowed. If \fI-L, --location\fP
+is used, this option can be used to prevent curl from following redirections
+\&"in absurdum". By default, the limit is set to 50 redirections. Set this
+option to -1 to make it limitless.
If this option is used several times, the last one will be used.
-.IP "-M/--manual"
-Manual. Display the huge help text.
-.IP "-n/--netrc"
+.IP "--metalink"
+This option can tell curl to parse and process a given URI as Metalink file
+(both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors
+listed within for failover if there are errors (such as the file or server not
+being available). It will also verify the hash of the file after the download
+completes. The Metalink file itself is downloaded and processed in memory and
+not stored in the local file system.
+
+Example to use a remote Metalink file:
+
+\fBcurl\fP --metalink http://www.example.com/example.metalink
+
+To use a Metalink file in the local file system, use FILE protocol
+(file://):
+
+\fBcurl\fP --metalink file://example.metalink
+
+Please note that if FILE protocol is disabled, there is no way to use
+a local Metalink file at the time of this writing. Also note that if
+\fI--metalink\fP and \fI--include\fP are used together, \fI--include\fP will be
+ignored. This is because including headers in the response will break
+Metalink parser and if the headers are included in the file described
+in Metalink file, hash check will fail.
+
+(Added in 7.27.0, if built against the libmetalink library.)
+.IP "-n, --netrc"
Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
home directory for login name and password. This is typically used for FTP on
-UNIX. If used with HTTP, curl will enable user authentication. See
-.BR netrc(4)
-or
-.BR ftp(1)
-for details on the file format. Curl will not complain if that file
-doesn't have the right permissions (it should not be either world- or
-group-readable). The environment variable "HOME" is used to find the home
-directory.
+Unix. If used with HTTP, curl will enable user authentication. See
+\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
+complain if that file doesn't have the right permissions (it should not be
+either world- or group-readable). The environment variable "HOME" is used to
+find the home directory.
A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
to FTP to the machine host.domain.com with user name \&'myself' and password
\&'secret' should look similar to:
.B "machine host.domain.com login myself password secret"
-.IP "--netrc-optional"
-Very similar to \fI--netrc\fP, but this option makes the .netrc usage
-\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
-.IP "--negotiate"
-(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
-designed by Microsoft and is used in their web applications. It is primarily
-meant as a support for Kerberos5 authentication but may be also used along
-with another authentication method. For more information see IETF draft
-draft-brezak-spnego-http-04.txt.
-
-If you want to enable Negotiate for your proxy authentication, then use
-\fI--proxy-negotiate\fP.
-
-This option requires a library built with GSSAPI support. This is
-not very common. Use \fI-V/--version\fP to see if your version supports
-GSS-Negotiate.
-
-When using this option, you must also provide a fake -u/--user option to
-activate the authentication code properly. Sending a '-u :' is enough as the
-user name and password from the -u option aren't actually used.
-
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-N/--no-buffer"
+.IP "-N, --no-buffer"
Disables the buffering of the output stream. In normal work situations, curl
will use a standard buffered output stream that will have the effect that it
will output the data in chunks, not necessarily exactly when the data arrives.
@@ -842,6 +1077,34 @@
Note that this is the negated option name documented. You can thus use
\fI--buffer\fP to enforce the buffering.
+.IP "--netrc-file"
+This option is similar to \fI--netrc\fP, except that you provide the path
+(absolute or relative) to the netrc file that Curl should use.
+You can only specify one netrc file per invocation. If several
+\fI--netrc-file\fP options are provided, only the \fBlast one\fP will be used.
+(Added in 7.21.5)
+
+This option overrides any use of \fI--netrc\fP as they are mutually exclusive.
+It will also abide by \fI--netrc-optional\fP if specified.
+
+.IP "--netrc-optional"
+Very similar to \fI--netrc\fP, but this option makes the .netrc usage
+\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
+
+.IP "--negotiate"
+(HTTP) Enables Negotiate (SPNEGO) authentication.
+
+If you want to enable Negotiate (SPNEGO) for proxy authentication, then use
+\fI--proxy-negotiate\fP.
+
+This option requires a library built with GSS-API or SSPI support. Use \fI-V,
+--version\fP to see if your curl supports GSS-API/SSPI and SPNEGO.
+
+When using this option, you must also provide a fake \fI-u, --user\fP option to
+activate the authentication code properly. Sending a '-u :' is enough as the
+user name and password from the \fI-u\fP option aren't actually used.
+
+If this option is used several times, only the first one is used.
.IP "--no-keepalive"
Disables the use of keepalive messages on the TCP connection, as by default
curl enables them.
@@ -876,11 +1139,10 @@
\fI--proxy-ntlm\fP.
This option requires a library built with SSL support. Use
-\fI-V/--version\fP to see if your curl supports NTLM.
+\fI-V, --version\fP to see if your curl supports NTLM.
-If this option is used several times, the following occurrences make no
-difference.
-.IP "-o/--output <file>"
+If this option is used several times, only the first one is used.
+.IP "-o, --output <file>"
Write output to <file> instead of stdout. If you are using {} or [] to fetch
multiple documents, you can use '#' followed by a number in the <file>
specifier. That variable will be replaced with the current string for the URL
@@ -897,37 +1159,112 @@
See also the \fI--create-dirs\fP option to create the local directories
dynamically. Specifying the output as '-' (a single dash) will force the
output to be done to stdout.
-.IP "-O/--remote-name"
+.IP "-O, --remote-name"
Write output to a local file named like the remote file we get. (Only the file
part of the remote file is used, the path is cut off.)
The remote file name to use for saving is extracted from the given URL,
nothing else.
+Consequentially, the file will be saved in the current working directory. If
+you want the file saved in a different directory, make sure you change current
+working directory before you invoke curl with the \fB-O, --remote-name\fP flag!
+
+There is no URL decoding done on the file name. If it has %20 or other URL
+encoded parts of the name, they will end up as-is as file name.
+
You may use this option as many times as the number of URLs you have.
-.IP "--remote-name-all"
-This option changes the default action for all given URLs to be dealt with as
-if \fI-O/--remote-name\fP were used for each one. So if you want to disable
-that for a specific URL after \fI--remote-name-all\fP has been used, you must
-use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
+.IP "--oauth2-bearer"
+(IMAP, POP3, SMTP)
+Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token
+is used in conjunction with the user name which can be specified as part of the
+\fI--url\fP or \fI-u, --user\fP options.
+
+The Bearer Token and user name are formatted according to RFC 6750.
+
+If this option is used several times, the last one will be used.
+.IP "--proxy-header <header>"
+(HTTP) Extra header to include in the request when sending HTTP to a
+proxy. You may specify any number of extra headers. This is the equivalent
+option to \fI-H, --header\fP but is for proxy communication only like in
+CONNECT requests when you want a separate header sent to the proxy to what is
+sent to the actual remote host.
+
+curl will make sure that each header you add/replace is sent with the proper
+end-of-line marker, you should thus \fBnot\fP add that as a part of the header
+content: do not add newlines or carriage returns, they will only mess things
+up for you.
+
+Headers specified with this option will not be included in requests that curl
+knows will not be sent to a proxy.
+
+This option can be used multiple times to add/replace/remove multiple headers.
+
+(Added in 7.37.0)
+.IP "-p, --proxytunnel"
+When an HTTP proxy is used (\fI-x, --proxy\fP), this option will cause non-HTTP
+protocols to attempt to tunnel through the proxy instead of merely using it to
+do HTTP-like operations. The tunnel approach is made with the HTTP proxy
+CONNECT request and requires that the proxy allows direct connect to the
+remote port number curl wants to tunnel through to.
+.IP "-P, --ftp-port <address>"
+(FTP) Reverses the default initiator/listener roles when connecting with
+FTP. This switch makes curl use active mode. In practice, curl then tells the
+server to connect back to the client's specified address and port, while
+passive mode asks the server to setup an IP address and port for it to connect
+to. <address> should be one of:
+.RS
+.IP interface
+i.e "eth0" to specify which interface's IP address you want to use (Unix only)
+.IP "IP address"
+i.e "192.168.10.1" to specify the exact IP address
+.IP "host name"
+i.e "my.host.domain" to specify the machine
+.IP "-"
+make curl pick the same IP address that is already used for the control
+connection
+.RE
+.IP
+If this option is used several times, the last one will be used. Disable the
+use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
+instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
+
+Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
+address, to tell curl what TCP port range to use. That means you specify a
+port range, from a lower to a higher number. A single number works as well,
+but do note that it increases the risk of failure since the port may not be
+available.
.IP "--pass <phrase>"
(SSL/SSH) Passphrase for the private key
If this option is used several times, the last one will be used.
+.IP "--path-as-is"
+Tell curl to not handle sequences of /../ or /./ in the given URL
+path. Normally curl will squash or merge them according to standards but with
+this option set you tell it not to do that.
+
+(Added in 7.42.0)
.IP "--post301"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 301 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 301 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.17.1)
.IP "--post302"
-Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
-requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
-in web browsers, so curl does the conversion by default to maintain
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 302 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may require a POST to remain a POST after such
-a redirection. This option is meaningful only when using \fI-L/--location\fP
+a redirection. This option is meaningful only when using \fI-L, --location\fP
(Added in 7.19.1)
+.IP "--post303"
+(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
+into GET requests when following a 303 redirection. The non-RFC behaviour is
+ubiquitous in web browsers, so curl does the conversion by default to maintain
+consistency. However, a server may require a POST to remain a POST after such
+a redirection. This option is meaningful only when using \fI-L, --location\fP
+(Added in 7.26.0)
.IP "--proto <protocols>"
Tells curl to use the listed protocols for its initial retrieval. Protocols
are evaluated left to right, are comma separated, and are each a protocol
@@ -986,81 +1323,61 @@
Tells curl to use HTTP Digest authentication when communicating with the given
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
.IP "--proxy-negotiate"
-Tells curl to use HTTP Negotiate authentication when communicating
-with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
+Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
+with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO)
with a remote host. (Added in 7.17.1)
.IP "--proxy-ntlm"
Tells curl to use HTTP NTLM authentication when communicating with the given
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
+.IP "--proxy-service-name <servicename>"
+This option allows you to change the service name for proxy negotiation.
+
+Examples: --proxy-negotiate proxy-name \fI--proxy-service-name\fP sockd would use
+sockd/proxy-name. (Added in 7.43.0).
.IP "--proxy1.0 <proxyhost[:port]>"
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
assumed at port 1080.
-The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP),
+The only difference between this and the HTTP proxy option (\fI-x, --proxy\fP),
is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
protocol instead of the default HTTP 1.1.
-.IP "-p/--proxytunnel"
-When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
-protocols to attempt to tunnel through the proxy instead of merely using it to
-do HTTP-like operations. The tunnel approach is made with the HTTP proxy
-CONNECT request and requires that the proxy allows direct connect to the
-remote port number curl wants to tunnel through to.
.IP "--pubkey <key>"
(SSH) Public key file name. Allows you to provide your public key in this
separate file.
If this option is used several times, the last one will be used.
-.IP "-P/--ftp-port <address>"
-(FTP) Reverses the default initiator/listener roles when connecting with
-FTP. This switch makes curl use active mode. In practice, curl then tells the
-server to connect back to the client's specified address and port, while
-passive mode asks the server to setup an IP address and port for it to connect
-to. <address> should be one of:
-.RS
-.IP interface
-i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-.IP "IP address"
-i.e "192.168.10.1" to specify the exact IP address
-.IP "host name"
-i.e "my.host.domain" to specify the machine
-.IP "-"
-make curl pick the same IP address that is already used for the control
-connection
-.RE
-If this option is used several times, the last one will be used. Disable the
-use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
-instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
-
-Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
-address, to tell curl what TCP port range to use. That means you specify a
-port range, from a lower to a higher number. A single number works as well,
-but do note that it increases the risk of failure since the port may not be
-available.
+(As of 7.39.0, curl attempts to automatically extract the public key from the
+private key file, so passing this option is generally not required. Note that
+this public key extraction requires libcurl to be linked against a copy of
+libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
.IP "-q"
If used as the first parameter on the command line, the \fIcurlrc\fP config
-file will not be read and used. See the \fI-K/--config\fP for details on the
+file will not be read and used. See the \fI-K, --config\fP for details on the
default config file search path.
-.IP "-Q/--quote <command>"
+.IP "-Q, --quote <command>"
(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
-commands are sent BEFORE the transfer takes place (just after the
-initial PWD command in an FTP transfer, to be exact). To make commands
-take place after a successful transfer, prefix them with a dash '-'.
-To make commands be sent after libcurl has changed the working directory,
-just before the transfer command(s), prefix the command with a '+' (this
-is only supported for FTP). You may specify any number of commands. If
-the server returns failure for one of the commands, the entire operation
-will be aborted. You must send syntactically correct FTP commands as
-RFC959 defines to FTP servers, or one of the commands listed below to
-SFTP servers. This option can be used multiple times.
+commands are sent BEFORE the transfer takes place (just after the initial PWD
+command in an FTP transfer, to be exact). To make commands take place after a
+successful transfer, prefix them with a dash '-'. To make commands be sent
+after curl has changed the working directory, just before the transfer
+command(s), prefix the command with a '+' (this is only supported for
+FTP). You may specify any number of commands. If the server returns failure
+for one of the commands, the entire operation will be aborted. You must send
+syntactically correct FTP commands as RFC 959 defines to FTP servers, or one
+of the commands listed below to SFTP servers. This option can be used
+multiple times. When speaking to an FTP server, prefix the command with an
+asterisk (*) to make curl continue even if the command fails as by default
+curl will stop at first failure.
-SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
-commands before sending them to the server. Following is the list of
+SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands
+itself before sending them to the server. File names may be quoted
+shell-style to embed spaces or special characters. Following is the list of
all supported SFTP quote commands:
.RS
.IP "chgrp group file"
-The chgrp command sets the group ID of the file named by the file operand to the
-group ID specified by the group operand. The group operand is a decimal
+The chgrp command sets the group ID of the file named by the file operand to
+the group ID specified by the group operand. The group operand is a decimal
integer group ID.
.IP "chmod mode file"
The chmod command modifies the file mode bits of the specified file. The
@@ -1087,11 +1404,7 @@
.IP "symlink source_file target_file"
See ln.
.RE
-.IP "--random-file <file>"
-(SSL) Specify the path name to file containing what will be considered as
-random data. The data is used to seed the random engine for SSL connections.
-See also the \fI--egd-file\fP option.
-.IP "-r/--range <range>"
+.IP "-r, --range <range>"
(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a
HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified
in a number of ways.
@@ -1118,13 +1431,14 @@
.B 100-199,500-599
specifies two separate 100-byte ranges(*)(H)
.RE
-
+.IP
(*) = NOTE that this will cause the server to reply with a multipart
response!
-Only digit characters (0-9) are valid in the 'start' and 'stop' fields of
-the \&'start-stop' range syntax. If a non-digit character is given in the range, the server's
-response will be unspecified, depending on the server's configuration.
+Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the
+\&'start-stop' range syntax. If a non-digit character is given in the range,
+the server's response will be unspecified, depending on the server's
+configuration.
You should also be aware that many HTTP/1.1 servers do not have this feature
enabled, so that when you attempt to get a range, you'll instead get the whole
@@ -1135,13 +1449,34 @@
FTP command SIZE.
If this option is used several times, the last one will be used.
-.IP "--raw"
-When used, it disables all internal HTTP decoding of content or transfer
-encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-.IP "-R/--remote-time"
-When used, this will make libcurl attempt to figure out the timestamp of the
+.IP "-R, --remote-time"
+When used, this will make curl attempt to figure out the timestamp of the
remote file, and if that is available make the local file get that same
timestamp.
+.IP "--random-file <file>"
+(SSL) Specify the path name to file containing what will be considered as
+random data. The data is used to seed the random engine for SSL connections.
+See also the \fI--egd-file\fP option.
+.IP "--raw"
+(HTTP) When used, it disables all internal HTTP decoding of content or transfer
+encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
+.IP "--remote-name-all"
+This option changes the default action for all given URLs to be dealt with as
+if \fI-O, --remote-name\fP were used for each one. So if you want to disable
+that for a specific URL after \fI--remote-name-all\fP has been used, you must
+use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
+.IP "--resolve <host:port:address>"
+Provide a custom address for a specific host and port pair. Using this, you
+can make the curl requests(s) use a specified address and prevent the
+otherwise normally resolved address to be used. Consider it a sort of
+/etc/hosts alternative provided on the command line. The port number should be
+the number used for the specific protocol the host will be used for. It means
+you need several entries if you want to provide address for the same host but
+different ports.
+
+This option can be used many times to add many host names to resolve.
+
+(Added in 7.21.3)
.IP "--retry <num>"
If a transient error is returned when curl tries to perform a transfer, it
will retry this number of times before giving up. Setting the number to 0
@@ -1155,7 +1490,7 @@
also \fI--retry-max-time\fP to limit the total time allowed for
retries. (Added in 7.12.3)
-If this option is used multiple times, the last occurrence decide the amount.
+If this option is used several times, the last one will be used.
.IP "--retry-delay <seconds>"
Make curl sleep this amount of time before each retry when a transfer has
failed with a transient error (it changes the default backoff time algorithm
@@ -1163,46 +1498,83 @@
used. Setting this delay to zero will make curl use the default backoff time.
(Added in 7.12.3)
-If this option is used multiple times, the last occurrence determines the amount.
+If this option is used several times, the last one will be used.
.IP "--retry-max-time <seconds>"
The retry timer is reset before the first transfer attempt. Retries will be
done as usual (see \fI--retry\fP) as long as the timer hasn't reached this
given limit. Notice that if the timer hasn't reached the limit, the request
will be made and while performing, it may take longer than this given time
-period. To limit a single request\'s maximum time, use \fI-m/--max-time\fP.
+period. To limit a single request\'s maximum time, use \fI-m, --max-time\fP.
Set this option to zero to not timeout retries. (Added in 7.12.3)
-If this option is used multiple times, the last occurrence determines the
-amount.
-.IP "-s/--silent"
-Silent or quiet mode. Don't show progress meter or error messages. Makes
-Curl mute.
-.IP "-S/--show-error"
-When used with -s it makes curl show an error message if it fails.
+If this option is used several times, the last one will be used.
+.IP "-s, --silent"
+Silent or quiet mode. Don't show progress meter or error messages. Makes Curl
+mute. It will still output the data you ask for, potentially even to the
+terminal/stdout unless you redirect it.
+.IP "--sasl-ir"
+Enable initial response in SASL authentication.
+(Added in 7.31.0)
+.IP "--service-name <servicename>"
+This option allows you to change the service name for SPNEGO.
+
+Examples: --negotiate \fI--service-name\fP sockd would use
+sockd/server-name. (Added in 7.43.0).
+.IP "-S, --show-error"
+When used with \fI-s\fP it makes curl show an error message if it fails.
+.IP "--ssl"
+(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a
+non-secure connection if the server doesn't support SSL/TLS. See also
+\fI--ftp-ssl-control\fP and \fI--ssl-reqd\fP for different levels of
+encryption required. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl\fP (Added in 7.11.0). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-reqd"
+(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the
+connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
+
+This option was formerly known as \fI--ftp-ssl-reqd\fP (added in 7.15.5). That
+option name can still be used but will be removed in a future version.
+.IP "--ssl-allow-beast"
+(SSL) This option tells curl to not work around a security flaw in the SSL3
+and TLS1.0 protocols known as BEAST. If this option isn't used, the SSL layer
+may use workarounds known to cause interoperability problems with some older
+SSL implementations. WARNING: this option loosens the SSL security, and by
+using this flag you ask for exactly that. (Added in 7.25.0)
.IP "--socks4 <host[:port]>"
Use the specified SOCKS4 proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.15.2)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks4 proxy
+with \fI-x, --proxy\fP using a socks4:// protocol prefix.
+
If this option is used several times, the last one will be used.
.IP "--socks4a <host[:port]>"
Use the specified SOCKS4a proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.18.0)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks4a proxy
+with \fI-x, --proxy\fP using a socks4a:// protocol prefix.
+
If this option is used several times, the last one will be used.
.IP "--socks5-hostname <host[:port]>"
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
the port number is not specified, it is assumed at port 1080. (Added in
7.18.0)
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks5
+hostname proxy with \fI-x, --proxy\fP using a socks5h:// protocol prefix.
+
If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
@@ -1210,9 +1582,12 @@
Use the specified SOCKS5 proxy - but resolve the host name locally. If the
port number is not specified, it is assumed at port 1080.
-This option overrides any previous use of \fI-x/--proxy\fP, as they are
+This option overrides any previous use of \fI-x, --proxy\fP, as they are
mutually exclusive.
+Since 7.21.7, this option is superfluous since you can specify a socks5 proxy
+with \fI-x, --proxy\fP using a socks5:// protocol prefix.
+
If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
@@ -1222,27 +1597,21 @@
The default service name for a socks server is rcmd/server-fqdn. This option
allows you to change it.
-Examples:
- --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
-sockd/proxy-name
- --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name would use
-sockd/real-name for cases where the proxy-name does not match the princpal name.
- (Added in 7.19.4).
+Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
+sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
+sockd/real-name would use sockd/real-name for cases where the proxy-name does
+not match the principal name. (Added in 7.19.4).
.IP "--socks5-gssapi-nec"
-As part of the gssapi negotiation a protection mode is negotiated. The rfc1961
+As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
says in section 4.3/4.4 it should be protected, but the NEC reference
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
.IP "--stderr <file>"
Redirect all writes to stderr to the specified file instead. If the file name
-is a plain '-', it is instead written to stdout. This option has no point when
-you're using a shell with decent redirecting capabilities.
+is a plain '-', it is instead written to stdout.
If this option is used several times, the last one will be used.
-.IP "--tcp-nodelay"
-Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
-details about this option. (Added in 7.11.2)
-.IP "-t/--telnet-option <OPT=val>"
+.IP "-t, --telnet-option <OPT=val>"
Pass options to the telnet protocol. Supported options are:
TTYPE=<term> Sets the terminal type.
@@ -1250,21 +1619,13 @@
XDISPLOC=<X display> Sets the X display location.
NEW_ENV=<var,val> Sets an environment variable.
-.IP "--tftp-blksize <value>"
-(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
-curl will try to use when tranferring data to or from a TFTP server. By
-default 512 bytes will be used.
-
-If this option is used several times, the last one will be used.
-
-(Added in 7.20.0)
-.IP "-T/--upload-file <file>"
+.IP "-T, --upload-file <file>"
This transfers the specified local file to the remote URL. If there is no file
part in the specified URL, Curl will append the local file name. NOTE that you
must use a trailing / on the last directory to really prove to Curl that there
is no file name or curl will think that your last directory name is the remote
file name to use. That will most likely cause the upload operation to fail. If
-this is used on a HTTP(S) server, the PUT command will be used.
+this is used on an HTTP(S) server, the PUT command will be used.
Use the file name "-" (a single dash) to use stdin instead of a given file.
Alternately, the file name "." (a single period) may be specified instead
@@ -1281,12 +1642,53 @@
or even
curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
+.IP "--tcp-nodelay"
+Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
+details about this option. (Added in 7.11.2)
+.IP "--tftp-blksize <value>"
+(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
+curl will try to use when transferring data to or from a TFTP server. By
+default 512 bytes will be used.
+
+If this option is used several times, the last one will be used.
+
+(Added in 7.20.0)
+.IP "--tlsauthtype <authtype>"
+Set TLS authentication type. Currently, the only supported option is "SRP",
+for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
+specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
+(Added in 7.21.4)
+.IP "--tlspassword <password>"
+Set password for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
+7.21.4)
+.IP "--tlsuser <user>"
+Set username for use with the TLS authentication method specified with
+\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
+7.21.4)
+.IP "--tlsv1.0"
+(SSL)
+Forces curl to use TLS version 1.0 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tlsv1.1"
+(SSL)
+Forces curl to use TLS version 1.1 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tlsv1.2"
+(SSL)
+Forces curl to use TLS version 1.2 when negotiating with a remote TLS server.
+(Added in 7.34.0)
+.IP "--tr-encoding"
+(HTTP) Request a compressed Transfer-Encoding response using one of the
+algorithms curl supports, and uncompress the data while receiving it.
+
+(Added in 7.21.6)
.IP "--trace <file>"
Enables a full trace dump of all incoming and outgoing data, including
descriptive information, to the given output file. Use "-" as filename to have
the output sent to stdout.
-This option overrides previous uses of \fI-v/--verbose\fP or
+This option overrides previous uses of \fI-v, --verbose\fP or
\fI--trace-ascii\fP.
If this option is used several times, the last one will be used.
@@ -1299,30 +1701,50 @@
shows the ASCII part of the dump. It makes smaller output that might be easier
to read for untrained humans.
-This option overrides previous uses of \fI-v/--verbose\fP or \fI--trace\fP.
+This option overrides previous uses of \fI-v, --verbose\fP or \fI--trace\fP.
If this option is used several times, the last one will be used.
.IP "--trace-time"
Prepends a time stamp to each trace or verbose line that curl displays.
(Added in 7.14.0)
-.IP "-u/--user <user:password>"
+.IP "--unix-socket <path>"
+(HTTP) Connect through this Unix domain socket, instead of using the
+network. (Added in 7.40.0)
+.IP "-u, --user <user:password>"
Specify the user name and password to use for server authentication. Overrides
-\fI-n/--netrc\fP and \fI--netrc-optional\fP.
+\fI-n, --netrc\fP and \fI--netrc-optional\fP.
-If you just give the user name (without entering a colon) curl will prompt for
-a password.
+If you simply specify the user name, curl will prompt for a password.
-If you use an SSPI-enabled curl binary and do NTLM authentication, you can
-force curl to pick up the user name and password from your environment by
-simply specifying a single colon with this option: "-u :".
+The user name and passwords are split up on the first colon, which makes it
+impossible to use a colon in the user name with this option. The password can,
+still.
+
+When using Kerberos V5 with a Windows based server you should include the
+Windows domain name in the user name, in order for the server to successfully
+obtain a Kerberos Ticket. If you don't then the initial authentication
+handshake may fail.
+
+When using NTLM, the user name can be specified simply as the user name,
+without the domain, if there is a single domain and forest in your setup
+for example.
+
+To specify the domain name use either Down-Level Logon Name or UPN (User
+Principal Name) formats. For example, EXAMPLE\\user and [email protected]
+respectively.
+
+If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
+Negotiate, NTLM or Digest authentication then you can tell curl to select
+the user name and password from your environment by specifying a single colon
+with this option: "-u :".
If this option is used several times, the last one will be used.
-.IP "-U/--proxy-user <user:password>"
+.IP "-U, --proxy-user <user:password>"
Specify the user name and password to use for proxy authentication.
-If you use an SSPI-enabled curl binary and do NTLM authentication, you can
-force curl to pick up the user name and password from your environment by
-simply specifying a single colon with this option: "-U :".
+If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
+authentication then you can tell curl to select the user name and password
+from your environment by specifying a single colon with this option: "-U :".
If this option is used several times, the last one will be used.
.IP "--url <URL>"
@@ -1330,14 +1752,15 @@
URL(s) in a config file.
This option may be used any number of times. To control where this URL is
-written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
-.IP "-v/--verbose"
-Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
-starting with '>' means "header data" sent by curl, '<' means "header data"
-received by curl that is hidden in normal cases, and a line starting with '*'
-means additional info provided by curl.
+written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
+.IP "-v, --verbose"
+Be more verbose/talkative during the operation. Useful for debugging and
+seeing what's going on "under the hood". A line starting with '>' means
+"header data" sent by curl, '<' means "header data" received by curl that is
+hidden in normal cases, and a line starting with '*' means additional info
+provided by curl.
-Note that if you only want HTTP headers in the output, \fI-i/--include\fP
+Note that if you only want HTTP headers in the output, \fI-i, --include\fP
might be the option you're looking for.
If you think this option still doesn't give you enough details, consider using
@@ -1345,8 +1768,242 @@
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
-Use \fI-S/--silent\fP to make curl quiet.
-.IP "-V/--version"
+Use \fI-s, --silent\fP to make curl quiet.
+.IP "-w, --write-out <format>"
+Make curl display information on stdout after a completed transfer. The format
+is a string that may contain plain text mixed with any number of
+variables. The format can be specified as a literal "string", or you can have
+curl read the format from a file with "@filename" and to tell curl to read the
+format from stdin you write "@-".
+
+The variables present in the output format will be substituted by the value or
+text that curl thinks fit, as described below. All variables are specified
+as %{variable_name} and to output a normal % you just write them as
+%%. You can output a newline by using \\n, a carriage return with \\r and a tab
+space with \\t.
+
+.B NOTE:
+The %-symbol is a special symbol in the win32-environment, where all
+occurrences of % must be doubled when using this option.
+
+The variables available are:
+.RS
+.TP 15
+.B content_type
+The Content-Type of the requested document, if there was any.
+.TP
+.B filename_effective
+The ultimate filename that curl writes out to. This is only meaningful if curl
+is told to write to a file with the \fI--remote-name\fP or \fI--output\fP
+option. It's most useful in combination with the \fI--remote-header-name\fP
+option. (Added in 7.25.1)
+.TP
+.B ftp_entry_path
+The initial path curl ended up in when logging on to the remote FTP
+server. (Added in 7.15.4)
+.TP
+.B http_code
+The numerical response code that was found in the last retrieved HTTP(S) or
+FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
+same info.
+.TP
+.B http_connect
+The numerical code that was found in the last response (from a proxy) to a
+curl CONNECT request. (Added in 7.12.4)
+.TP
+.B local_ip
+The IP address of the local end of the most recently done connection - can be
+either IPv4 or IPv6 (Added in 7.29.0)
+.TP
+.B local_port
+The local port number of the most recently done connection (Added in 7.29.0)
+.TP
+.B num_connects
+Number of new connects made in the recent transfer. (Added in 7.12.3)
+.TP
+.B num_redirects
+Number of redirects that were followed in the request. (Added in 7.12.3)
+.TP
+.B redirect_url
+When an HTTP request was made without -L to follow redirects, this variable
+will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
+.TP
+.B remote_ip
+The remote IP address of the most recently done connection - can be either
+IPv4 or IPv6 (Added in 7.29.0)
+.TP
+.B remote_port
+The remote port number of the most recently done connection (Added in 7.29.0)
+.TP
+.B size_download
+The total amount of bytes that were downloaded.
+.TP
+.B size_header
+The total amount of bytes of the downloaded headers.
+.TP
+.B size_request
+The total amount of bytes that were sent in the HTTP request.
+.TP
+.B size_upload
+The total amount of bytes that were uploaded.
+.TP
+.B speed_download
+The average download speed that curl measured for the complete download. Bytes
+per second.
+.TP
+.B speed_upload
+The average upload speed that curl measured for the complete upload. Bytes per
+second.
+.TP
+.B ssl_verify_result
+The result of the SSL peer certificate verification that was requested. 0
+means the verification was successful. (Added in 7.19.0)
+.TP
+.B time_appconnect
+The time, in seconds, it took from the start until the SSL/SSH/etc
+connect/handshake to the remote host was completed. (Added in 7.19.0)
+.TP
+.B time_connect
+The time, in seconds, it took from the start until the TCP connect to the
+remote host (or proxy) was completed.
+.TP
+.B time_namelookup
+The time, in seconds, it took from the start until the name resolving was
+completed.
+.TP
+.B time_pretransfer
+The time, in seconds, it took from the start until the file transfer was just
+about to begin. This includes all pre-transfer commands and negotiations that
+are specific to the particular protocol(s) involved.
+.TP
+.B time_redirect
+The time, in seconds, it took for all redirection steps include name lookup,
+connect, pretransfer and transfer before the final transaction was
+started. time_redirect shows the complete execution time for multiple
+redirections. (Added in 7.12.3)
+.TP
+.B time_starttransfer
+The time, in seconds, it took from the start until the first byte was just
+about to be transferred. This includes time_pretransfer and also the time the
+server needed to calculate the result.
+.TP
+.B time_total
+The total time, in seconds, that the full operation lasted. The time will be
+displayed with millisecond resolution.
+.TP
+.B url_effective
+The URL that was fetched last. This is most meaningful if you've told curl
+to follow location: headers.
+.RE
+.IP
+If this option is used several times, the last one will be used.
+.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
+Use the specified proxy.
+
+The proxy string can be specified with a protocol:// prefix to specify
+alternative proxy protocols. Use socks4://, socks4a://, socks5:// or
+socks5h:// to request the specific SOCKS version to be used. No protocol
+specified, http:// and all others will be treated as HTTP proxies. (The
+protocol support was added in curl 7.21.7)
+
+If the port number is not specified in the proxy string, it is assumed to be
+1080.
+
+This option overrides existing environment variables that set the proxy to
+use. If there's an environment variable setting a proxy, you can set proxy to
+\&"" to override it.
+
+All operations that are performed over an HTTP proxy will transparently be
+converted to HTTP. It means that certain protocol specific operations might
+not be available. This is not the case if you can tunnel through the proxy, as
+one with the \fI-p, --proxytunnel\fP option.
+
+User and password that might be provided in the proxy string are URL decoded
+by curl. This allows you to pass in special characters such as @ by using %40
+or pass in a colon with %3a.
+
+The proxy host can be specified the exact same way as the proxy environment
+variables, including the protocol prefix (http://) and the embedded user +
+password.
+
+If this option is used several times, the last one will be used.
+.IP "-X, --request <command>"
+(HTTP) Specifies a custom request method to use when communicating with the
+HTTP server. The specified request method will be used instead of the method
+otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
+details and explanations. Common additional HTTP requests include PUT and
+DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
+more.
+
+Normally you don't need this option. All sorts of GET, HEAD, POST and PUT
+requests are rather invoked by using dedicated command line options.
+
+This option only changes the actual word used in the HTTP request, it does not
+alter the way curl behaves. So for example if you want to make a proper HEAD
+request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
+option.
+
+The method string you set with -X will be used for all requests, which if you
+for example use \fB-L, --location\fP may cause unintended side-effects when
+curl doesn't change request method according to the HTTP 30x response codes -
+and similar.
+
+(FTP)
+Specifies a custom FTP command to use instead of LIST when doing file lists
+with FTP.
+
+(POP3)
+Specifies a custom POP3 command to use instead of LIST or RETR. (Added in
+7.26.0)
+
+(IMAP)
+Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
+
+(SMTP)
+Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
+
+If this option is used several times, the last one will be used.
+.IP "--xattr"
+When saving output to a file, this option tells curl to store certain file
+metadata in extended file attributes. Currently, the URL is stored in the
+xdg.origin.url attribute and, for HTTP, the content type is stored in
+the mime_type attribute. If the file system does not support extended
+attributes, a warning is issued.
+
+.IP "-y, --speed-time <time>"
+If a download is slower than speed-limit bytes per second during a speed-time
+period, the download gets aborted. If speed-time is used, the default
+speed-limit will be 1 unless set with \fI-Y\fP.
+
+This option controls transfers and thus will not affect slow connects etc. If
+this is a concern for you, try the \fI--connect-timeout\fP option.
+
+If this option is used several times, the last one will be used.
+.IP "-Y, --speed-limit <speed>"
+If a download is slower than this given speed (in bytes per second) for
+speed-time seconds it gets aborted. speed-time is set with \fI-y\fP and is 30
+if not set.
+
+If this option is used several times, the last one will be used.
+.IP "-z, --time-cond <date expression>|<file>"
+(HTTP/FTP) Request a file that has been modified later than the given time and
+date, or one that has been modified before that time. The <date expression>
+can be all sorts of date strings or if it doesn't match any internal ones, it
+is taken as a filename and tries to get the modification date (mtime) from
+<file> instead. See the \fIcurl_getdate(3)\fP man pages for date expression
+details.
+
+Start the date expression with a dash (-) to make it request for a document
+that is older than the given date/time, default is a document that is newer
+than the specified date/time.
+
+If this option is used several times, the last one will be used.
+.IP "-h, --help"
+Usage help. This lists all current command line options with a short
+description.
+.IP "-M, --manual"
+Manual. Display the huge help text.
+.IP "-V, --version"
Displays information about curl and the libcurl version it uses.
The first line includes the full version of curl, libcurl and other 3rd party
@@ -1363,243 +2020,78 @@
.IP "krb4"
Krb4 for FTP is supported.
.IP "SSL"
-HTTPS and FTPS are supported.
+SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
+and so on.
.IP "libz"
Automatic decompression of compressed files over HTTP is supported.
.IP "NTLM"
NTLM authentication is supported.
-.IP "GSS-Negotiate"
-Negotiate authentication and krb5 for FTP is supported.
.IP "Debug"
This curl uses a libcurl built with Debug. This enables more error-tracking
and memory debugging etc. For curl-developers only!
.IP "AsynchDNS"
-This curl uses asynchronous name resolves.
+This curl uses asynchronous name resolves. Asynchronous name resolves can be
+done using either the c-ares or the threaded resolver backends.
.IP "SPNEGO"
-SPNEGO Negotiate authentication is supported.
+SPNEGO authentication is supported.
.IP "Largefile"
This curl supports transfers of large files, files larger than 2GB.
.IP "IDN"
This curl supports IDN - international domain names.
+.IP "GSS-API"
+GSS-API is supported.
.IP "SSPI"
-SSPI is supported. If you use NTLM and set a blank user name, curl will
-authenticate with your current user and password.
+SSPI is supported.
+.IP "TLS-SRP"
+SRP (Secure Remote Password) authentication is supported for TLS.
+.IP "HTTP2"
+HTTP/2 support has been built-in.
+.IP "Metalink"
+This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
+describes mirrors and hashes. curl will use mirrors for failover if
+there are errors (such as the file or server not being available).
.RE
-.IP "-w/--write-out <format>"
-Defines what to display on stdout after a completed and successful
-operation. The format is a string that may contain plain text mixed with any
-number of variables. The string can be specified as "string", to get read from
-a particular file you specify it "@filename" and to tell curl to read the
-format from stdin you write "@-".
-
-The variables present in the output format will be substituted by the value or
-text that curl thinks fit, as described below. All variables are specified
-as %{variable_name} and to output a normal % you just write them as
-%%. You can output a newline by using \\n, a carriage return with \\r and a tab
-space with \\t.
-
-.B NOTE:
-The %-symbol is a special symbol in the win32-environment, where all
-occurrences of % must be doubled when using this option.
-
-The variables available at this point are:
-.RS
-.TP 15
-.B url_effective
-The URL that was fetched last. This is most meaningful if you've told curl
-to follow location: headers.
-.TP
-.B http_code
-The numerical response code that was found in the last retrieved HTTP(S) or
-FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
-same info.
-.TP
-.B http_connect
-The numerical code that was found in the last response (from a proxy) to a
-curl CONNECT request. (Added in 7.12.4)
-.TP
-.B time_total
-The total time, in seconds, that the full operation lasted. The time will be
-displayed with millisecond resolution.
-.TP
-.B time_namelookup
-The time, in seconds, it took from the start until the name resolving was
-completed.
-.TP
-.B time_connect
-The time, in seconds, it took from the start until the TCP connect to the
-remote host (or proxy) was completed.
-.TP
-.B time_appconnect
-The time, in seconds, it took from the start until the SSL/SSH/etc
-connect/handshake to the remote host was completed. (Added in 7.19.0)
-.TP
-.B time_pretransfer
-The time, in seconds, it took from the start until the file transfer was just
-about to begin. This includes all pre-transfer commands and negotiations that
-are specific to the particular protocol(s) involved.
-.TP
-.B time_redirect
-The time, in seconds, it took for all redirection steps include name lookup,
-connect, pretransfer and transfer before the final transaction was
-started. time_redirect shows the complete execution time for multiple
-redirections. (Added in 7.12.3)
-.TP
-.B time_starttransfer
-The time, in seconds, it took from the start until the first byte was just about
-to be transferred. This includes time_pretransfer and also the time the
-server needed to calculate the result.
-.TP
-.B size_download
-The total amount of bytes that were downloaded.
-.TP
-.B size_upload
-The total amount of bytes that were uploaded.
-.TP
-.B size_header
-The total amount of bytes of the downloaded headers.
-.TP
-.B size_request
-The total amount of bytes that were sent in the HTTP request.
-.TP
-.B speed_download
-The average download speed that curl measured for the complete download. Bytes
-per second.
-.TP
-.B speed_upload
-The average upload speed that curl measured for the complete upload. Bytes per
-second.
-.TP
-.B content_type
-The Content-Type of the requested document, if there was any.
-.TP
-.B num_connects
-Number of new connects made in the recent transfer. (Added in 7.12.3)
-.TP
-.B num_redirects
-Number of redirects that were followed in the request. (Added in 7.12.3)
-.TP
-.B redirect_url
-When a HTTP request was made without -L to follow redirects, this variable
-will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
-.TP
-.B ftp_entry_path
-The initial path libcurl ended up in when logging on to the remote FTP
-server. (Added in 7.15.4)
-.TP
-.B ssl_verify_result
-The result of the SSL peer certificate verification that was requested. 0
-means the verification was successful. (Added in 7.19.0)
-.RE
-
-If this option is used several times, the last one will be used.
-.IP "-x/--proxy <proxyhost[:port]>"
-Use the specified HTTP proxy. If the port number is not specified, it is assumed
-at port 1080.
-
-This option overrides existing environment variables that set the proxy to
-use. If there's an environment variable setting a proxy, you can set proxy to
-\&"" to override it.
-
-\fBNote\fP that all operations that are performed over a HTTP proxy will
-transparently be converted to HTTP. It means that certain protocol specific
-operations might not be available. This is not the case if you can tunnel
-through the proxy, as done with the \fI-p/--proxytunnel\fP option.
-
-Starting with 7.14.1, the proxy host can be specified the exact same way as
-the proxy environment variables, including the protocol prefix (http://) and
-the embedded user + password.
-
-If this option is used several times, the last one will be used.
-.IP "-X/--request <command>"
-(HTTP) Specifies a custom request method to use when communicating with the
-HTTP server. The specified request will be used instead of the method
-otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
-details and explanations. Common additional HTTP requests include PUT and
-DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
-more.
-
-(FTP)
-Specifies a custom FTP command to use instead of LIST when doing file lists
-with FTP.
-
-If this option is used several times, the last one will be used.
-.IP "-y/--speed-time <time>"
-If a download is slower than speed-limit bytes per second during a speed-time
-period, the download gets aborted. If speed-time is used, the default
-speed-limit will be 1 unless set with -Y.
-
-This option controls transfers and thus will not affect slow connects etc. If
-this is a concern for you, try the \fI--connect-timeout\fP option.
-
-If this option is used several times, the last one will be used.
-.IP "-Y/--speed-limit <speed>"
-If a download is slower than this given speed (in bytes per second) for
-speed-time seconds it gets aborted. speed-time is set with -y and is 30 if
-not set.
-
-If this option is used several times, the last one will be used.
-.IP "-z/--time-cond <date expression>"
-(HTTP/FTP) Request a file that has been modified later than the given time and
-date, or one that has been modified before that time. The date expression can
-be all sorts of date strings or if it doesn't match any internal ones, it
-tries to get the time from a given file name instead! See the
-\fIcurl_getdate(3)\fP man pages for date expression details.
-
-Start the date expression with a dash (-) to make it request for a document
-that is older than the given date/time, default is a document that is newer
-than the specified date/time.
-
-If this option is used several times, the last one will be used.
-.IP "--max-redirs <num>"
-Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
-is used, this option can be used to prevent curl from following redirections
-\&"in absurdum". By default, the limit is set to 50 redirections. Set this
-option to -1 to make it limitless.
-
-If this option is used several times, the last one will be used.
-.IP "-0/--http1.0"
-(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its
-internally preferred: HTTP 1.1.
-.IP "-1/--tlsv1"
-(SSL)
-Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-.IP "-2/--sslv2"
-(SSL)
-Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-.IP "-3/--sslv3"
-(SSL)
-Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-.IP "-4/--ipv4"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv4 addresses only.
-.IP "-6/--ipv6"
-If libcurl is capable of resolving an address to multiple IP versions (which
-it is if it is IPv6-capable), this option tells libcurl to resolve names to
-IPv6 addresses only.
-.IP "-#/--progress-bar"
-Make curl display progress information as a progress bar instead of the
-default statistics.
.SH FILES
.I ~/.curlrc
.RS
-Default config file, see \fI-K/--config\fP for details.
+Default config file, see \fI-K, --config\fP for details.
.SH ENVIRONMENT
The environment variables can be specified in lower case or upper case. The
lower case version has precedence. http_proxy is an exception as it is only
available in lower case.
+
+Using an environment variable to set the proxy has the same effect as using
+the \fI--proxy\fP option.
+
.IP "http_proxy [protocol://]<host>[:port]"
Sets the proxy server to use for HTTP.
.IP "HTTPS_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for HTTPS.
-.IP "FTP_PROXY [protocol://]<host>[:port]"
-Sets the proxy server to use for FTP.
+.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
+Sets the proxy server to use for [url-protocol], where the protocol is a
+protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
+SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.
+.SH "PROXY PROTOCOL PREFIXES"
+Since curl version 7.21.7, the proxy string may be specified with a
+protocol:// prefix to specify alternative proxy protocols.
+
+If no protocol is specified in the proxy string or if the string doesn't match
+a supported one, the proxy will be treated as an HTTP proxy.
+
+The supported proxy protocol prefixes are as follows:
+.IP "socks4://"
+Makes it the equivalent of \fI--socks4\fP
+.IP "socks4a://"
+Makes it the equivalent of \fI--socks4a\fP
+.IP "socks5://"
+Makes it the equivalent of \fI--socks5\fP
+.IP "socks5h://"
+Makes it the equivalent of \fI--socks5-hostname\fP
.SH EXIT CODES
There are a bunch of different error codes and their corresponding error
messages that may appear during bad conditions. At the time of this writing,
@@ -1610,6 +2102,10 @@
Failed to initialize.
.IP 3
URL malformed. The syntax was not correct.
+.IP 4
+A feature or option that was needed to perform the desired request was not
+enabled or was explicitly disabled at build-time. To make curl able to do
+this, you probably need another build of libcurl!
.IP 5
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP 6
@@ -1642,7 +2138,7 @@
.IP 22
HTTP page not retrieved. The requested url was not found or returned another
error with the HTTP error code being 400 or above. This return code only
-appears if \fI-f/--fail\fP is used.
+appears if \fI-f, --fail\fP is used.
.IP 23
Write error. Curl couldn't write data to a local filesystem or similar.
.IP 25
@@ -1686,11 +2182,13 @@
.IP 47
Too many redirects. When following redirects, curl hit the maximum amount.
.IP 48
-Unknown TELNET option specified.
+Unknown option specified to libcurl. This indicates that you passed a weird
+option to curl that was passed on to libcurl and rejected. Read up in the
+manual!
.IP 49
Malformed telnet option.
.IP 51
-The peer's SSL certificate or SSH MD5 fingerprint was not ok.
+The peer's SSL certificate or SSH MD5 fingerprint was not OK.
.IP 52
The server didn't reply anything, which here is considered an error.
.IP 53
@@ -1751,6 +2249,20 @@
Could not load CRL file, missing or wrong format (added in 7.19.0).
.IP 83
Issuer check failed (added in 7.19.0).
+.IP 84
+The FTP PRET command failed
+.IP 85
+RTSP: mismatch of CSeq numbers
+.IP 86
+RTSP: mismatch of Session Identifiers
+.IP 87
+unable to parse FTP file list
+.IP 88
+FTP chunk callback reported error
+.IP 89
+No connection available, the session will be queued
+.IP 90
+SSL public key does not matched pinned public key
.IP XX
More error codes will appear here in future releases. The existing ones
are meant to never change.
@@ -1764,4 +2276,3 @@
.SH "SEE ALSO"
.BR ftp (1),
.BR wget (1)
-
diff --git a/docs/curl.html b/docs/curl.html
deleted file mode 100644
index c578011..0000000
--- a/docs/curl.html
+++ /dev/null
@@ -1,834 +0,0 @@
-<html><head>
-<title>curl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl - transfer a URL <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">curl [options]</span> <a class="emphasis" href="#URL">[URL...]</a> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0"><span Class="bold">curl</span> is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.
-<p class="level0">curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume and more. As you will see below, the number of features will make your head spin!
-<p class="level0">curl is powered by libcurl for all transfer-related features. See <span Class="manpage">libcurl (3)</span> for details. <a name="URL"></a><h2 class="nroffsh">URL</h2>
-<p class="level0">The URL syntax is protocol-dependent. You'll find a detailed description in RFC 3986.
-<p class="level0">You can specify multiple URLs or parts of URLs by writing part sets within braces as in:
-<p class="level0"> <a href="http://site">http://site</a>.{one,two,three}.com
-<p class="level0">or you can get sequences of alphanumeric series by using [] as in:
-<p class="level0"> <a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[1-100].txt <a href="ftp://ftp.numericals.com/file">ftp://ftp.numericals.com/file</a>[001-100].txt (with leading zeros) <a href="ftp://ftp.letters.com/file">ftp://ftp.letters.com/file</a>[a-z].txt
-<p class="level0">Nested sequences are not supported, but you can use several ones next to each other:
-<p class="level0"> <a href="http://any.org/archive">http://any.org/archive</a>[1996-1999]/vol[1-4]/part{a,b,c}.html
-<p class="level0">You can specify any amount of URLs on the command line. They will be fetched in a sequential manner in the specified order.
-<p class="level0">You can specify a step counter for the ranges to get every Nth number or letter:
-<p class="level0"> <a href="http://www.numericals.com/file">http://www.numericals.com/file</a>[1-100:10].txt <a href="http://www.letters.com/file">http://www.letters.com/file</a>[a-z:2].txt
-<p class="level0">If you specify URL without protocol:// prefix, curl will attempt to guess what protocol you might want. It will then default to HTTP but try other protocols based on often-used host name prefixes. For example, for host names starting with "ftp." curl will assume you want to speak FTP.
-<p class="level0">curl will do its best to use what you pass to it as a URL. It is not trying to validate it as a syntactically correct URL by any means but is instead <span Class="bold">very</span> liberal with what it accepts.
-<p class="level0">Curl will attempt to re-use connections for multiple file transfers, so that getting many files from the same server will not do multiple connects / handshakes. This improves speed. Of course this is only done on files specified on a single command line and cannot be used between separate curl invokes. <a name="PROGRESS"></a><h2 class="nroffsh">PROGRESS METER</h2>
-<p class="level0">curl normally displays a progress meter during operations, indicating the amount of transferred data, transfer speeds and estimated time left, etc.
-<p class="level0">curl displays this data to the terminal by default, so if you invoke curl to do an operation and it is about to write data to the terminal, it <span Class="emphasis">disables</span> the progress meter as otherwise it would mess up the output mixing progress meter and response data.
-<p class="level0">If you want a progress meter for HTTP POST or PUT requests, you need to redirect the response output to a file, using shell redirect (>), -o [file] or similar.
-<p class="level0">It is not the same case for FTP upload as that operation does not spit out any response data to the terminal.
-<p class="level0">If you prefer a progress "bar" instead of the regular meter, <a class="emphasis" href="#-">-#</a> is your friend. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">In general, all boolean options are enabled with --option and yet again disabled with --<span Class="bold">no-</span>option. That is, you use the exact same option name but prefix it with "no-". However, in this list we mostly only list and show the --option version of them. (This concept with --no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.)
-<p class="level0"><a name="-a--append"></a><span class="nroffip">-a/--append</span>
-<p class="level1">(FTP/SFTP) When used in an upload, this will tell curl to append to the target file instead of overwriting it. If the file doesn't exist, it will be created. Note that this flag is ignored by some SSH servers (including OpenSSH).
-<p class="level0"><a name="-A--user-agent"></a><span class="nroffip">-A/--user-agent <agent string></span>
-<p class="level1">(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in the string, surround the string with single quote marks. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> option of course.
-<p class="level1">If this option is set more than once, the last one will be the one that's used.
-<p class="level0"><a name="--anyauth"></a><span class="nroffip">--anyauth</span>
-<p class="level1">(HTTP) Tells curl to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a request and checking the response-headers, thus possibly inducing an extra network round-trip. This is used instead of setting a specific authentication method, which you can do with <a class="emphasis" href="#--basic">--basic</a>, <a class="emphasis" href="#--digest">--digest</a>, <a class="emphasis" href="#--ntlm">--ntlm</a>, and <a class="emphasis" href="#--negotiate">--negotiate</a>.
-<p class="level1">Note that using --anyauth is not recommended if you do uploads from stdin, since it may require data to be sent twice and then the client must be able to rewind. If the need should arise when uploading from stdin, the upload operation will fail.
-<p class="level0"><a name="-b--cookie"></a><span class="nroffip">-b/--cookie <name=data></span>
-<p class="level1">(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data previously received from the server in a "Set-Cookie:" line. The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
-<p class="level1">If no '=' symbol is used in the line, it is treated as a filename to use to read previously stored cookie lines from, which should be used in this session if they match. Using this method also activates the "cookie parser" which will make curl record incoming cookies too, which may be handy if you're using this in combination with the <a class="emphasis" href="#-L--location">-L/--location</a> option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format.
-<p class="level1"><span Class="bold">NOTE</span> that the file specified with <a class="emphasis" href="#-b--cookie">-b/--cookie</a> is only used as input. No cookies will be stored in the file. To store cookies, use the <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option or you could even save the HTTP headers to a file using <a class="emphasis" href="#-D--dump-header">-D/--dump-header</a>!
-<p class="level1">If this option is set more than once, the last one will be the one that's used.
-<p class="level0"><a name="-B--use-ascii"></a><span class="nroffip">-B/--use-ascii</span>
-<p class="level1">Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be enforced by using an URL that ends with ";type=A". This option causes data sent to stdout to be in text mode for win32 systems.
-<p class="level0"><a name="--basic"></a><span class="nroffip">--basic</span>
-<p class="level1">(HTTP) Tells curl to use HTTP Basic authentication. This is the default and this option is usually pointless, unless you use it to override a previously set option that sets a different authentication method (such as <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--digest">--digest</a>, or <a class="emphasis" href="#--negotiate">--negotiate</a>).
-<p class="level0"><a name="--ciphers"></a><span class="nroffip">--ciphers <list of ciphers></span>
-<p class="level1">(SSL) Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. Read up on SSL cipher list details on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span>
-<p class="level1">NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS ciphers is in the NSSCipherSuite entry at this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span>
-<p class="level1">If this option is used several times, the last one will override the others.
-<p class="level0"><a name="--compressed"></a><span class="nroffip">--compressed</span>
-<p class="level1">(HTTP) Request a compressed response using one of the algorithms libcurl supports, and return the uncompressed document. If this option is used and the server sends an unsupported encoding, curl will report an error.
-<p class="level0"><a name="--connect-timeout"></a><span class="nroffip">--connect-timeout <seconds></span>
-<p class="level1">Maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once curl has connected this option is of no more use. See also the <a class="emphasis" href="#-m--max-time">-m/--max-time</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-c--cookie-jar"></a><span class="nroffip">-c/--cookie-jar <file name></span>
-<p class="level1">Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies previously read from a specified file as well as all cookies received from remote server(s). If no cookies are known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash, "-", the cookies will be written to stdout.
-<p class="level1"><span Class="bold">NOTE</span> If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v will get a warning displayed, but that is the only visible feedback you get about this possibly lethal situation.
-<p class="level1">If this option is used several times, the last specified file name will be used.
-<p class="level0"><a name="-C--continue-at"></a><span class="nroffip">-C/--continue-at <offset></span>
-<p class="level1">Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of the source file before it is transferred to the destination. If used with uploads, the FTP server command SIZE will not be used by curl.
-<p class="level1">Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--create-dirs"></a><span class="nroffip">--create-dirs</span>
-<p class="level1">When used in conjunction with the -o option, curl will create the necessary local directory hierarchy as needed. This option creates the dirs mentioned with the -o option, nothing else. If the -o file name uses no dir or if the dirs it mentions already exist, no dir will be created.
-<p class="level1">To create remote directories when using FTP or SFTP, try <a class="emphasis" href="#--ftp-create-dirs">--ftp-create-dirs</a>.
-<p class="level0"><a name="--crlf"></a><span class="nroffip">--crlf</span>
-<p class="level1">(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
-<p class="level0"><a name="--crlfile"></a><span class="nroffip">--crlfile <file></span>
-<p class="level1">(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.19.7)
-<p class="level0"><a name="-d--data"></a><span class="nroffip">-d/--data <data></span>
-<p class="level1">(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to <a class="emphasis" href="#-F--form">-F/--form</a>.
-<p class="level1"><a class="emphasis" href="#-d--data">-d/--data</a> is the same as <span Class="emphasis">--data-ascii</span>. To post data purely binary, you should instead use the <a class="emphasis" href="#--data-binary">--data-binary</a> option. To URL-encode the value of a form field you may use <a class="emphasis" href="#--data-urlencode">--data-urlencode</a>.
-<p class="level1">If any of these options is used more than once on the same command line, the data pieces specified will be merged together with a separating &-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post chunk that looks like 'name=daniel&skill=lousy'.
-<p class="level1">If you start the data with the letter @, the rest should be a file name to read the data from, or - if you want curl to read the data from stdin. The contents of the file must already be URL-encoded. Multiple files can also be specified. Posting data from a file named 'foobar' would thus be done with <span Class="emphasis">--data @foobar</span>.
-<p class="level0"><a name="--data-binary"></a><span class="nroffip">--data-binary <data></span>
-<p class="level1">(HTTP) This posts data exactly as specified with no extra processing whatsoever.
-<p class="level1">If you start the data with the letter @, the rest should be a filename. Data is posted in a similar manner as <span Class="emphasis">--data-ascii</span> does, except that newlines are preserved and conversions are never done.
-<p class="level1">If this option is used several times, the ones following the first will append data as described in <a class="emphasis" href="#-d--data">-d/--data</a>.
-<p class="level0"><a name="--data-urlencode"></a><span class="nroffip">--data-urlencode <data></span>
-<p class="level1">(HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added in 7.18.0)
-<p class="level1">To be CGI-compliant, the <data> part should begin with a <span Class="emphasis">name</span> followed by a separator and a content specification. The <data> part can be passed to curl using one of the following syntaxes:
-<p class="level2">
-<p class="level1"><a name="content"></a><span class="nroffip">content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. Just be careful so that the content doesn't contain any = or @ symbols, as that will then make the syntax match one of the other cases below!
-<p class="level1"><a name="content"></a><span class="nroffip">=content</span>
-<p class="level2">This will make curl URL-encode the content and pass that on. The preceding = symbol is not included in the data.
-<p class="level1"><a name="namecontent"></a><span class="nroffip">name=content</span>
-<p class="level2">This will make curl URL-encode the content part and pass that on. Note that the name part is expected to be URL-encoded already.
-<p class="level1"><a name="filename"></a><span class="nroffip">@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST.
-<p class="level1"><a name="namefilename"></a><span class="nroffip">name@filename</span>
-<p class="level2">This will make curl load data from the given file (including any newlines), URL-encode that data and pass it on in the POST. The name part gets an equal sign appended, resulting in <span Class="emphasis">name=urlencoded-file-content</span>. Note that the name is expected to be URL-encoded already.
-<p class="level1">
-<p class="level0"><a name="--digest"></a><span class="nroffip">--digest</span>
-<p class="level1">(HTTP) Enables HTTP Digest authentication. This is a authentication that prevents the password from being sent over the wire in clear text. Use this in combination with the normal <a class="emphasis" href="#-u--user">-u/--user</a> option to set user name and password. See also <a class="emphasis" href="#--ntlm">--ntlm</a>, <a class="emphasis" href="#--negotiate">--negotiate</a> and <a class="emphasis" href="#--anyauth">--anyauth</a> for related options.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="--disable-eprt"></a><span class="nroffip">--disable-eprt</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original FTP protocol, and may not work on all servers, but they enable more functionality in a better way than the traditional PORT command.
-<p class="level1"><span Class="bold">--eprt</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-eprt</span> is an alias for <a class="bold" href="#--disable-eprt">--disable-eprt</a>.
-<p class="level1">Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> or force it with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>.
-<p class="level0"><a name="--disable-epsv"></a><span class="nroffip">--disable-epsv</span>
-<p class="level1">(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV, but with this option, it will not try using EPSV.
-<p class="level1"><span Class="bold">--epsv</span> can be used to explicitly enable EPRT again and <span Class="bold">--no-epsv</span> is an alias for <a class="bold" href="#--disable-epsv">--disable-epsv</a>.
-<p class="level1">Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a>.
-<p class="level0"><a name="-D--dump-header"></a><span class="nroffip">-D/--dump-header <file></span>
-<p class="level1">Write the protocol headers to the specified file.
-<p class="level1">This option is handy to use when you want to store the headers that a HTTP site sends to you. Cookies from the headers could then be read in a second curl invocation by using the <a class="emphasis" href="#-b--cookie">-b/--cookie</a> option! The <a class="emphasis" href="#-c--cookie-jar">-c/--cookie-jar</a> option is however a better way to store cookies.
-<p class="level1">When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-e--referer"></a><span class="nroffip">-e/--referer <URL></span>
-<p class="level1">(HTTP) Sends the "Referer Page" information to the HTTP server. This can also be set with the <a class="emphasis" href="#-H--header">-H/--header</a> flag of course. When used with <a class="emphasis" href="#-L--location">-L/--location</a> you can append ";auto" to the --referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used alone, even if you don't set an initial --referer.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--engine"></a><span class="nroffip">--engine <name></span>
-<p class="level1">Select the OpenSSL crypto engine to use for cipher operations. Use <a class="emphasis" href="#--engine">--engine list</a> to print a list of build-time supported engines. Note that not all (or none) of the engines may be available at run-time.
-<p class="level0"><a name="--environment"></a><span class="nroffip">--environment</span>
-<p class="level1">(RISC OS ONLY) Sets a range of environment variables, using the names the -w option supports, to allow easier extraction of useful information after having run curl.
-<p class="level0"><a name="--egd-file"></a><span class="nroffip">--egd-file <file></span>
-<p class="level1">(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--random-file">--random-file</a> option.
-<p class="level0"><a name="-E--cert"></a><span class="nroffip">-E/--cert <certificate[:password]></span>
-<p class="level1">(SSL) Tells curl to use the specified certificate file when getting a file with HTTPS or FTPS. The certificate must be in PEM format. If the optional password isn't specified, it will be queried for on the terminal. Note that this option assumes a "certificate" file that is the private key and the private certificate concatenated! See <span Class="emphasis">--cert</span> and <a class="emphasis" href="#--key">--key</a> to specify them independently.
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--cert-type"></a><span class="nroffip">--cert-type <type></span>
-<p class="level1">(SSL) Tells curl what certificate type the provided certificate is in. PEM, DER and ENG are recognized types. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--cacert"></a><span class="nroffip">--cacert <CA certificate></span>
-<p class="level1">(SSL) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM format. Normally curl is built to use a default file for this, so this option is typically used to alter that default file.
-<p class="level1">curl recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that variable.
-<p class="level1">The windows version of curl will automatically look for a CA certs file named ´curl-ca-bundle.crt´, either in the same directory as curl.exe, or in the Current Working Directory, or in any folder along your PATH.
-<p class="level1">If curl is built against the NSS SSL library then this option tells curl the nickname of the CA certificate to use within the NSS database defined by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--capath"></a><span class="nroffip">--capath <CA certificate directory></span>
-<p class="level1">(SSL) Tells curl to use the specified certificate directory to verify the peer. The certificates must be in PEM format, and the directory must have been processed using the c_rehash utility supplied with openssl. Using <a class="emphasis" href="#--capath">--capath</a> can allow curl to make SSL-connections much more efficiently than using <a class="emphasis" href="#--cacert">--cacert</a> if the <a class="emphasis" href="#--cacert">--cacert</a> file contains many CA certificates.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-f--fail"></a><span class="nroffip">-f/--fail</span>
-<p class="level1">(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal cases when a HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl from outputting that and return error 22.
-<p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
-<p class="level0"><a name="--ftp-account"></a><span class="nroffip">--ftp-account [data]</span>
-<p class="level1">(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0)
-<p class="level1">If this option is used twice, the second will override the previous use.
-<p class="level0"><a name="--ftp-create-dirs"></a><span class="nroffip">--ftp-create-dirs</span>
-<p class="level1">(FTP/SFTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this option, curl will instead attempt to create missing directories.
-<p class="level0"><a name="--ftp-method"></a><span class="nroffip">--ftp-method [method]</span>
-<p class="level1">(FTP) Control what method curl should use to reach a file on a FTP(S) server. The method argument should be one of the following alternatives:
-<p class="level2">
-<p class="level1"><a name="multicwd"></a><span class="nroffip">multicwd</span>
-<p class="level2">curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior.
-<p class="level1"><a name="nocwd"></a><span class="nroffip">nocwd</span>
-<p class="level2">curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
-<p class="level1"><a name="singlecwd"></a><span class="nroffip">singlecwd</span>
-<p class="level2">curl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
-<p class="level1">(Added in 7.15.1)
-<p class="level0"><a name="--ftp-pasv"></a><span class="nroffip">--ftp-pasv</span>
-<p class="level1">(FTP) Use passive mode for the data conection. Passive is the internal default behavior, but using this option can be used to override a previous <span Class="emphasis">-P/-ftp-port</span> option. (Added in 7.11.0)
-<p class="level1">If this option is used several times, the following occurrences make no difference. Undoing an enforced passive really isn't doable but you must then instead enforce the correct <a class="emphasis" href="#-P--ftp-port">-P/--ftp-port</a> again.
-<p class="level1">Passive mode means that curl will try the EPSV command first and then PASV, unless <a class="emphasis" href="#--disable-epsv">--disable-epsv</a> is used.
-<p class="level0"><a name="--ftp-alternative-to-user"></a><span class="nroffip">--ftp-alternative-to-user <command></span>
-<p class="level1">(FTP) If authenticating with the USER and PASS commands fails, send this command. When connecting to Tumbleweed's Secure Transport server over FTPS using a client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate. (Added in 7.15.5)
-<p class="level0"><a name="--ftp-skip-pasv-ip"></a><span class="nroffip">--ftp-skip-pasv-ip</span>
-<p class="level1">(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead curl will re-use the same IP address it already uses for the control connection. (Added in 7.14.2)
-<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-<p class="level0"><a name="--ftp-pret"></a><span class="nroffip">--ftp-pret</span>
-<p class="level1">(FTP) Tell curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. (Added in 7.20.x)
-<p class="level0"><a name="--ssl"></a><span class="nroffip">--ssl</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Try to use SSL/TLS for the connection. Reverts to a non-secure connection if the server doesn't support SSL/TLS. See also <a class="emphasis" href="#--ftp-ssl-control">--ftp-ssl-control</a> and <a class="emphasis" href="#--ssl-reqd">--ssl-reqd</a> for different levels of encryption required. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl</span> (Added in 7.11.0) and that can still be used but will be removed in a future version.
-<p class="level0"><a name="--ftp-ssl-control"></a><span class="nroffip">--ftp-ssl-control</span>
-<p class="level1">(FTP) Require SSL/TLS for the FTP login, clear for transfer. Allows secure authentication, but non-encrypted data transfers for efficiency. Fails the transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
-<p class="level0"><a name="--ssl-reqd"></a><span class="nroffip">--ssl-reqd</span>
-<p class="level1">(FTP, POP3, IMAP, SMTP) Require SSL/TLS for the connection. Terminates the connection if the server doesn't support SSL/TLS. (Added in 7.20.0)
-<p class="level1">This option was formerly known as <span Class="emphasis">--ftp-ssl-reqd</span> (added in 7.15.5) and that can still be used but will be removed in a future version.
-<p class="level0"><a name="--ftp-ssl-ccc"></a><span class="nroffip">--ftp-ssl-ccc</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. The default mode is passive. See --ftp-ssl-ccc-mode for other modes. (Added in 7.16.1)
-<p class="level0"><a name="--ftp-ssl-ccc-mode"></a><span class="nroffip">--ftp-ssl-ccc-mode [active/passive]</span>
-<p class="level1">(FTP) Use CCC (Clear Command Channel) Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait for the server to do it, and will not reply to the shutdown from the server. The active mode initiates the shutdown and waits for a reply from the server. (Added in 7.16.2)
-<p class="level0"><a name="-F--form"></a><span class="nroffip">-F/--form <name=content></span>
-<p class="level1">(HTTP) This lets curl emulate a filled-in form in which a user has pressed the submit button. This causes curl to POST data using the Content-Type multipart/form-data according to RFC2388. This enables uploading of binary files etc. To force the 'content' part to be a file, prefix the file name with an @ sign. To just get the content part from a file, prefix the file name with the symbol <. The difference between @ and < is then that @ makes a file get attached in the post as a file upload, while the < makes a text field and just get the contents for that text field from a file.
-<p class="level1">Example, to send your password file to the server, where 'password' is the name of the form-field to which /etc/passwd will be the input:
-<p class="level1"><span Class="bold">curl</span> -F password=@/etc/passwd www.mypasswords.com
-<p class="level1">To read the file's content from stdin instead of a file, use - where the file name should've been. This goes for both @ and < constructs.
-<p class="level1">You can also tell curl what Content-Type to use by using 'type=', in a manner similar to:
-<p class="level1"><span Class="bold">curl</span> -F "[email protected];type=text/html" url.com
-<p class="level1">or
-<p class="level1"><span Class="bold">curl</span> -F "name=daniel;type=text/foo" url.com
-<p class="level1">You can also explicitly change the name field of an file upload part by setting filename=, like this:
-<p class="level1"><span Class="bold">curl</span> -F "file=@localfile;filename=nameinpost" url.com
-<p class="level1">See further examples and details in the MANUAL.
-<p class="level1">This option can be used multiple times.
-<p class="level0"><a name="--form-string"></a><span class="nroffip">--form-string <name=string></span>
-<p class="level1">(HTTP) Similar to <span Class="emphasis">--form</span> except that the value string for the named parameter is used literally. Leading '@' and '<' characters, and the ';type=' string in the value have no special meaning. Use this in preference to <span Class="emphasis">--form</span> if there's any possibility that the string value may accidentally trigger the '@' or '<' features of <span Class="emphasis">--form</span>.
-<p class="level0"><a name="-g--globoff"></a><span class="nroffip">-g/--globoff</span>
-<p class="level1">This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the letters {}[] without having them being interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.
-<p class="level0"><a name="-G--get"></a><span class="nroffip">-G/--get</span>
-<p class="level1">When used, this option will make all data specified with <a class="emphasis" href="#-d--data">-d/--data</a> or <a class="emphasis" href="#--data-binary">--data-binary</a> to be used in a HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a '?' separator.
-<p class="level1">If used in combination with -I, the POST data will instead be appended to the URL with a HEAD request.
-<p class="level1">If this option is used several times, the following occurrences make no difference. This is because undoing a GET doesn't make sense, but you should then instead enforce the alternative method you prefer.
-<p class="level0"><a name="-h--help"></a><span class="nroffip">-h/--help</span>
-<p class="level1">Usage help.
-<p class="level0"><a name="-H--header"></a><span class="nroffip">-H/--header <header></span>
-<p class="level1">(HTTP) Extra header to use when getting a web page. You may specify any number of extra headers. Note that if you should add a custom header that has the same name as one of the internal ones curl would use, your externally set header will be used instead of the internal one. This allows you to make even trickier stuff than curl would normally do. You should not replace internally set headers without knowing perfectly well what you're doing. Remove an internal header by giving a replacement without content on the right side of the colon, as in: -H "Host:".
-<p class="level1">curl will make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus <span Class="bold">not</span> add that as a part of the header content: do not add newlines or carriage returns, they will only mess things up for you.
-<p class="level1">See also the <a class="emphasis" href="#-A--user-agent">-A/--user-agent</a> and <a class="emphasis" href="#-e--referer">-e/--referer</a> options.
-<p class="level1">This option can be used multiple times to add/replace/remove multiple headers.
-<p class="level0"><a name="--hostpubmd5"></a><span class="nroffip">--hostpubmd5 <md5></span>
-<p class="level1">Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the connection with the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1)
-<p class="level0"><a name="--ignore-content-length"></a><span class="nroffip">--ignore-content-length</span>
-<p class="level1">(HTTP) Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length for files larger than 2 gigabytes.
-<p class="level0"><a name="-i--include"></a><span class="nroffip">-i/--include</span>
-<p class="level1">(HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more...
-<p class="level0"><a name="--interface"></a><span class="nroffip">--interface <name></span>
-<p class="level1">Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
-<p class="level1"> curl --interface eth0:1 <a href="http://www.netscape.com/">http://www.netscape.com/</a>
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-I--head"></a><span class="nroffip">-I/--head</span>
-<p class="level1">(HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on a FTP or FILE file, curl displays the file size and last modification time only.
-<p class="level0"><a name="-j--junk-session-cookies"></a><span class="nroffip">-j/--junk-session-cookies</span>
-<p class="level1">(HTTP) When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as if a new session is started. Typical browsers always discard session cookies when they're closed down.
-<p class="level0"><a name="-J--remote-header-name"></a><span class="nroffip">-J/--remote-header-name</span>
-<p class="level1">(HTTP) This option tells the -O/--remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL.
-<p class="level0"><a name="-k--insecure"></a><span class="nroffip">-k/--insecure</span>
-<p class="level1">(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless <a class="emphasis" href="#-k--insecure">-k/--insecure</a> is used.
-<p class="level1">See this online resource for further details: <span Class="bold"><a href="http://curl.haxx.se/docs/sslcerts.html">http://curl.haxx.se/docs/sslcerts.html</a></span>
-<p class="level0"><a name="--keepalive-time"></a><span class="nroffip">--keepalive-time <seconds></span>
-<p class="level1">This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes. It is currently effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect if <a class="emphasis" href="#--no-keepalive">--no-keepalive</a> is used. (Added in 7.18.0)
-<p class="level1">If this option is used multiple times, the last occurrence sets the amount.
-<p class="level0"><a name="--key"></a><span class="nroffip">--key <key></span>
-<p class="level1">(SSL/SSH) Private key file name. Allows you to provide your private key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--key-type"></a><span class="nroffip">--key-type <type></span>
-<p class="level1">(SSL) Private key file type. Specify which type your <a class="emphasis" href="#--key">--key</a> provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--krb"></a><span class="nroffip">--krb <level></span>
-<p class="level1">(FTP) Enable Kerberos authentication and use. The level must be entered and should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a level that is not one of these, 'private' will instead be used.
-<p class="level1">This option requires a library built with kerberos4 or GSSAPI (GSS-Negotiate) support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports it.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-K--config"></a><span class="nroffip">-K/--config <config file></span>
-<p class="level1">Specify which config file to read curl arguments from. The config file is a text file in which command line arguments can be written which then will be used as if they were written on the actual command line. Options and their parameters must be specified on the same config file line, separated by whitespace, colon, the equals sign or any combination thereof (however, the preferred separator is the equals sign). If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the following escape sequences are available: \\, \", \t, \n, \r and \v. A backslash preceding any other letter is ignored. If the first column of a config line is a '#' character, the rest of the line will be treated as a comment. Only write one option per physical line in the config file.
-<p class="level1">Specify the filename to -K/--config as '-' to make curl read the file from stdin.
-<p class="level1">Note that to be able to specify a URL in the config file, you need to specify it using the <a class="emphasis" href="#--url">--url</a> option, and not by simply writing the URL on its own line. So, it could look similar to this:
-<p class="level1">url = "<a href="http://curl.haxx.se/docs/">http://curl.haxx.se/docs/</a>"
-<p class="level1">Long option names can optionally be given in the config file without the initial double dashes.
-<p class="level1">When curl is invoked, it always (unless <a class="emphasis" href="#-q">-q</a> is used) checks for a default config file and uses it if found. The default config file is checked for in the following places in this order:
-<p class="level1">1) curl tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment variables. Failing that, it uses getpwuid() on UNIX-like systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USERPROFILE%\Application Data'.
-<p class="level1">2) On windows, if there is no _curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On UNIX-like systems, it will simply try to load .curlrc from the determined home dir.
-<p class="level1"><pre>
-<p class="level1"># --- Example file ---
- # this is a comment
- url = "curl.haxx.se"
- output = "curlhere.html"
- user-agent = "superagent/1.0"
- <p class="level1"># and fetch another URL too
- url = "curl.haxx.se/docs/manpage.html"
- -O
- referer = "<a href="http://nowhereatall.com/">http://nowhereatall.com/</a>"
- # --- End of example file ---
- </pre>
-
-<p class="level1">
-<p class="level1">This option can be used multiple times to load multiple config files.
-<p class="level0"><a name="--libcurl"></a><span class="nroffip">--libcurl <file></span>
-<p class="level1">Append this option to any ordinary curl command line, and you will get a libcurl-using source code written to the file that does the equivalent of what your command-line operation does!
-<p class="level1">NOTE: this does not properly support -F and the sending of multipart formposts, so in those cases the output program will be missing necessary calls to <span Class="emphasis">curl_formadd(3)</span>, and possibly more.
-<p class="level1">If this option is used several times, the last given file name will be used. (Added in 7.16.1)
-<p class="level0"><a name="--limit-rate"></a><span class="nroffip">--limit-rate <speed></span>
-<p class="level1">Specify the maximum transfer rate you want curl to use. This feature is useful if you have a limited pipe and you'd like your transfer not to use your entire bandwidth.
-<p class="level1">The given speed is measured in bytes/second, unless a suffix is appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
-<p class="level1">The given rate is the average speed counted during the entire transfer. It means that curl might use higher transfer speeds in short bursts, but over time it uses no more than the given rate.
-<p class="level1">If you also use the <a class="emphasis" href="#-Y--speed-limit">-Y/--speed-limit</a> option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit logic working.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-l--list-only"></a><span class="nroffip">-l/--list-only</span>
-<p class="level1">(FTP) When listing an FTP directory, this switch forces a name-only view. Especially useful if you want to machine-parse the contents of an FTP directory since the normal directory view doesn't use a standard look or format.
-<p class="level1">This option causes an FTP NLST command to be sent. Some FTP servers list only files in their response to NLST; they do not include subdirectories and symbolic links.
-<p class="level1">
-<p class="level0"><a name="--local-port"></a><span class="nroffip">--local-port <num>[-num]</span>
-<p class="level1">Set a preferred number or range of local port numbers to use for the connection(s). Note that port numbers by nature are a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2)
-<p class="level0"><a name="-L--location"></a><span class="nroffip">-L/--location</span>
-<p class="level1">(HTTP/HTTPS) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with <a class="emphasis" href="#-i--include">-i/--include</a> or <a class="emphasis" href="#-I--head">-I/--head</a>, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept the user+password. See also <a class="emphasis" href="#--location-trusted">--location-trusted</a> on how to change this. You can limit the amount of redirects to follow by using the <a class="emphasis" href="#--max-redirs">--max-redirs</a> option.
-<p class="level1">When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method.
-<p class="level0"><a name="--location-trusted"></a><span class="nroffip">--location-trusted</span>
-<p class="level1">(HTTP/HTTPS) Like <a class="emphasis" href="#-L--location">-L/--location</a>, but will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication).
-<p class="level0"><a name="--mail-rcpt"></a><span class="nroffip">--mail-rcpt <address></span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent to. This option can be used multiple times to specify many recipients.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--mail-from"></a><span class="nroffip">--mail-from <address></span>
-<p class="level1">(SMTP) Specify a single address that the given mail should get sent from.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="--max-filesize"></a><span class="nroffip">--max-filesize <bytes></span>
-<p class="level1">Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return with exit code 63.
-<p class="level1"><span Class="bold">NOTE:</span> The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="-m--max-time"></a><span class="nroffip">-m/--max-time <seconds></span>
-<p class="level1">Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down. See also the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-M--manual"></a><span class="nroffip">-M/--manual</span>
-<p class="level1">Manual. Display the huge help text.
-<p class="level0"><a name="-n--netrc"></a><span class="nroffip">-n/--netrc</span>
-<p class="level1">Makes curl scan the <span Class="emphasis">.netrc</span> (<span Class="emphasis">_netrc</span> on Windows) file in the user's home directory for login name and password. This is typically used for FTP on UNIX. If used with HTTP, curl will enable user authentication. See <span Class="manpage">netrc(4)</span> or <span Class="manpage">ftp(1)</span> for details on the file format. Curl will not complain if that file doesn't have the right permissions (it should not be either world- or group-readable). The environment variable "HOME" is used to find the home directory.
-<p class="level1">A quick and very simple example of how to setup a <span Class="emphasis">.netrc</span> to allow curl to FTP to the machine host.domain.com with user name 'myself' and password 'secret' should look similar to:
-<p class="level1"><span Class="bold">machine host.domain.com login myself password secret</span>
-<p class="level0"><a name="--netrc-optional"></a><span class="nroffip">--netrc-optional</span>
-<p class="level1">Very similar to <span Class="emphasis">--netrc</span>, but this option makes the .netrc usage <span Class="bold">optional</span> and not mandatory as the <span Class="emphasis">--netrc</span> option does.
-<p class="level0"><a name="--negotiate"></a><span class="nroffip">--negotiate</span>
-<p class="level1">(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may be also used along with another authentication method. For more information see IETF draft draft-brezak-spnego-http-04.txt.
-<p class="level1">If you want to enable Negotiate for your proxy authentication, then use <a class="emphasis" href="#--proxy-negotiate">--proxy-negotiate</a>.
-<p class="level1">This option requires a library built with GSSAPI support. This is not very common. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your version supports GSS-Negotiate.
-<p class="level1">When using this option, you must also provide a fake -u/--user option to activate the authentication code properly. Sending a '-u :' is enough as the user name and password from the -u option aren't actually used.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="-N--no-buffer"></a><span class="nroffip">-N/--no-buffer</span>
-<p class="level1">Disables the buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will output the data in chunks, not necessarily exactly when the data arrives. Using this option will disable that buffering.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--buffer</span> to enforce the buffering.
-<p class="level0"><a name="--no-keepalive"></a><span class="nroffip">--no-keepalive</span>
-<p class="level1">Disables the use of keepalive messages on the TCP connection, as by default curl enables them.
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--keepalive</span> to enforce keepalive.
-<p class="level0"><a name="--no-sessionid"></a><span class="nroffip">--no-sessionid</span>
-<p class="level1">(SSL) Disable curl's use of SSL session-ID caching. By default all transfers are done using the cache. Note that while nothing should ever get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0)
-<p class="level1">Note that this is the negated option name documented. You can thus use <span Class="emphasis">--sessionid</span> to enforce session-ID caching.
-<p class="level0"><a name="--noproxy"></a><span class="nroffip">--noproxy <no-proxy-list></span>
-<p class="level1">Comma-separated list of hosts which do not use a proxy, if one is specified. The only wildcard 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, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4).
-<p class="level0"><a name="--ntlm"></a><span class="nroffip">--ntlm</span>
-<p class="level1">(HTTP) Enables NTLM authentication. The NTLM authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol, reverse-engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage everyone who uses NTLM to switch to a public and documented authentication method instead, such as Digest.
-<p class="level1">If you want to enable NTLM for your proxy authentication, then use <a class="emphasis" href="#--proxy-ntlm">--proxy-ntlm</a>.
-<p class="level1">This option requires a library built with SSL support. Use <a class="emphasis" href="#-V--version">-V/--version</a> to see if your curl supports NTLM.
-<p class="level1">If this option is used several times, the following occurrences make no difference.
-<p class="level0"><a name="-o--output"></a><span class="nroffip">-o/--output <file></span>
-<p class="level1">Write output to <file> instead of stdout. If you are using {} or [] to fetch multiple documents, you can use '#' followed by a number in the <file> specifier. That variable will be replaced with the current string for the URL being fetched. Like in:
-<p class="level1"> curl http://{one,two}.site.com -o "file_#1.txt"
-<p class="level1">or use several variables like:
-<p class="level1"> curl http://{site,host}.host[1-5].com -o "#1_#2"
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level1">See also the <a class="emphasis" href="#--create-dirs">--create-dirs</a> option to create the local directories dynamically. Specifying the output as '-' (a single dash) will force the output to be done to stdout.
-<p class="level0"><a name="-O--remote-name"></a><span class="nroffip">-O/--remote-name</span>
-<p class="level1">Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
-<p class="level1">The remote file name to use for saving is extracted from the given URL, nothing else.
-<p class="level1">You may use this option as many times as the number of URLs you have.
-<p class="level0"><a name="--remote-name-all"></a><span class="nroffip">--remote-name-all</span>
-<p class="level1">This option changes the default action for all given URLs to be dealt with as if <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> were used for each one. So if you want to disable that for a specific URL after <a class="emphasis" href="#--remote-name-all">--remote-name-all</a> has been used, you must use "-o -" or <span Class="emphasis">--no-remote-name</span>. (Added in 7.19.0)
-<p class="level0"><a name="--pass"></a><span class="nroffip">--pass <phrase></span>
-<p class="level1">(SSL/SSH) Passphrase for the private key
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--post301"></a><span class="nroffip">--post301</span>
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.17.1)
-<p class="level0"><a name="--post302"></a><span class="nroffip">--post302</span>
-<p class="level1">Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiquitous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when using <a class="emphasis" href="#-L--location">-L/--location</a> (Added in 7.19.1)
-<p class="level0"><a name="--proto"></a><span class="nroffip">--proto <protocols></span>
-<p class="level1">Tells curl to use the listed protocols for its initial retrieval. Protocols are evaluated left to right, are comma separated, and are each a protocol name or 'all', optionally prefixed by zero or more modifiers. Available modifiers are:
-<p class="level2">
-<p class="level2"><a class="bold" href="#">+</a> Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used).
-<p class="level2"><a class="bold" href="#-">-</a> Deny this protocol, removing it from the list of protocols already permitted.
-<p class="level2"><a class="bold" href="#">=</a> Permit only this protocol (ignoring the list already permitted), though subject to later modification by subsequent entries in the comma separated list.
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">For example:
-<p class="level2">
-<p class="level2"><a class="bold" href="#--proto">--proto -ftps</a> uses the default protocols, but disables ftps
-<p class="level2"><a class="bold" href="#--proto">--proto -all,https,+http</a> only enables http and https
-<p class="level2"><a class="bold" href="#--proto">--proto =http,https</a> also only enables http and https
-<p class="level1">
-<p class="level0"><a name=""></a><span class="nroffip"></span>
-<p class="level1">Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable potentially dangerous protocols, without relying upon support for that protocol being built into curl to avoid an error.
-<p class="level1">This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proto-redir"></a><span class="nroffip">--proto-redir <protocols></span>
-<p class="level1">Tells curl to use the listed protocols after a redirect. See --proto for how protocols are represented.
-<p class="level1">(Added in 7.20.2)
-<p class="level0"><a name="--proxy-anyauth"></a><span class="nroffip">--proxy-anyauth</span>
-<p class="level1">Tells curl to pick a suitable authentication method when communicating with the given proxy. This might cause an extra request/response round-trip. (Added in 7.13.2)
-<p class="level0"><a name="--proxy-basic"></a><span class="nroffip">--proxy-basic</span>
-<p class="level1">Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use <a class="emphasis" href="#--basic">--basic</a> for enabling HTTP Basic with a remote host. Basic is the default authentication method curl uses with proxies.
-<p class="level0"><a name="--proxy-digest"></a><span class="nroffip">--proxy-digest</span>
-<p class="level1">Tells curl to use HTTP Digest authentication when communicating with the given proxy. Use <a class="emphasis" href="#--digest">--digest</a> for enabling HTTP Digest with a remote host.
-<p class="level0"><a name="--proxy-negotiate"></a><span class="nroffip">--proxy-negotiate</span>
-<p class="level1">Tells curl to use HTTP Negotiate authentication when communicating with the given proxy. Use <a class="emphasis" href="#--negotiate">--negotiate</a> for enabling HTTP Negotiate with a remote host. (Added in 7.17.1)
-<p class="level0"><a name="--proxy-ntlm"></a><span class="nroffip">--proxy-ntlm</span>
-<p class="level1">Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use <a class="emphasis" href="#--ntlm">--ntlm</a> for enabling NTLM with a remote host.
-<p class="level0"><a name="--proxy10"></a><span class="nroffip">--proxy1.0 <proxyhost[:port]></span>
-<p class="level1">Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">The only difference between this and the HTTP proxy option (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol instead of the default HTTP 1.1.
-<p class="level0"><a name="-p--proxytunnel"></a><span class="nroffip">-p/--proxytunnel</span>
-<p class="level1">When an HTTP proxy is used (<a class="emphasis" href="#-x--proxy">-x/--proxy</a>), this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number curl wants to tunnel through to.
-<p class="level0"><a name="--pubkey"></a><span class="nroffip">--pubkey <key></span>
-<p class="level1">(SSH) Public key file name. Allows you to provide your public key in this separate file.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-P--ftp-port"></a><span class="nroffip">-P/--ftp-port <address></span>
-<p class="level1">(FTP) Reverses the default initiator/listener roles when connecting with FTP. This switch makes curl use active mode. In practice, curl then tells the server to connect back to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. <address> should be one of:
-<p class="level2">
-<p class="level1"><a name="interface"></a><span class="nroffip">interface</span>
-<p class="level2">i.e "eth0" to specify which interface's IP address you want to use (Unix only)
-<p class="level1"><a name="IP"></a><span class="nroffip">IP address</span>
-<p class="level2">i.e "192.168.10.1" to specify the exact IP address
-<p class="level1"><a name="host"></a><span class="nroffip">host name</span>
-<p class="level2">i.e "my.host.domain" to specify the machine
-<p class="level1"><a name="-"></a><span class="nroffip">-</span>
-<p class="level2">make curl pick the same IP address that is already used for the control connection
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used. Disable the use of PORT with <a class="emphasis" href="#--ftp-pasv">--ftp-pasv</a>. Disable the attempt to use the EPRT command instead of PORT by using <a class="emphasis" href="#--disable-eprt">--disable-eprt</a>. EPRT is really PORT++.
-<p class="level1">Starting in 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from a lower to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available.
-<p class="level0"><a name="-q"></a><span class="nroffip">-q</span>
-<p class="level1">If used as the first parameter on the command line, the <span Class="emphasis">curlrc</span> config file will not be read and used. See the <a class="emphasis" href="#-K--config">-K/--config</a> for details on the default config file search path.
-<p class="level0"><a name="-Q--quote"></a><span class="nroffip">-Q/--quote <command></span>
-<p class="level1">(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD command in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'. To make commands be sent after libcurl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any number of commands. If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC959 defines to FTP servers, or one of the commands listed below to SFTP servers. This option can be used multiple times.
-<p class="level1">SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote commands before sending them to the server. Following is the list of all supported SFTP quote commands:
-<p class="level2">
-<p class="level1"><a name="chgrp"></a><span class="nroffip">chgrp group file</span>
-<p class="level2">The chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal integer group ID.
-<p class="level1"><a name="chmod"></a><span class="nroffip">chmod mode file</span>
-<p class="level2">The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode number.
-<p class="level1"><a name="chown"></a><span class="nroffip">chown user file</span>
-<p class="level2">The chown command sets the owner of the file named by the file operand to the user ID specified by the user operand. The user operand is a decimal integer user ID.
-<p class="level1"><a name="ln"></a><span class="nroffip">ln source_file target_file</span>
-<p class="level2">The ln and symlink commands create a symbolic link at the target_file location pointing to the source_file location.
-<p class="level1"><a name="mkdir"></a><span class="nroffip">mkdir directory_name</span>
-<p class="level2">The mkdir command creates the directory named by the directory_name operand.
-<p class="level1"><a name="pwd"></a><span class="nroffip">pwd</span>
-<p class="level2">The pwd command returns the absolute pathname of the current working directory.
-<p class="level1"><a name="rename"></a><span class="nroffip">rename source target</span>
-<p class="level2">The rename command renames the file or directory named by the source operand to the destination path named by the target operand.
-<p class="level1"><a name="rm"></a><span class="nroffip">rm file</span>
-<p class="level2">The rm command removes the file specified by the file operand.
-<p class="level1"><a name="rmdir"></a><span class="nroffip">rmdir directory</span>
-<p class="level2">The rmdir command removes the directory entry specified by the directory operand, provided it is empty.
-<p class="level1"><a name="symlink"></a><span class="nroffip">symlink source_file target_file</span>
-<p class="level2">See ln.
-<p class="level1">
-<p class="level0"><a name="--random-file"></a><span class="nroffip">--random-file <file></span>
-<p class="level1">(SSL) Specify the path name to file containing what will be considered as random data. The data is used to seed the random engine for SSL connections. See also the <a class="emphasis" href="#--egd-file">--egd-file</a> option.
-<p class="level0"><a name="-r--range"></a><span class="nroffip">-r/--range <range></span>
-<p class="level1">(HTTP/FTP/SFTP/FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified in a number of ways.
-<p class="level2">
-<p class="level2"><span Class="bold">0-499</span> specifies the first 500 bytes
-<p class="level2"><span Class="bold">500-999</span> specifies the second 500 bytes
-<p class="level2"><span Class="bold">-500</span> specifies the last 500 bytes
-<p class="level2"><span Class="bold">9500-</span> specifies the bytes from offset 9500 and forward
-<p class="level2"><span Class="bold">0-0,-1</span> specifies the first and last byte only(*)(H)
-<p class="level2"><span Class="bold">500-700,600-799</span> specifies 300 bytes from offset 500(H)
-<p class="level2"><span Class="bold">100-199,500-599</span> specifies two separate 100-byte ranges(*)(H)
-<p class="level1">
-<p class="level1">(*) = NOTE that this will cause the server to reply with a multipart response!
-<p class="level1">Only digit characters (0-9) are valid in the 'start' and 'stop' fields of the 'start-stop' range syntax. If a non-digit character is given in the range, the server's response will be unspecified, depending on the server's configuration.
-<p class="level1">You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole document.
-<p class="level1">FTP and SFTP range downloads only support the simple 'start-stop' syntax (optionally with one of the numbers omitted). FTP use depends on the extended FTP command SIZE.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--raw"></a><span class="nroffip">--raw</span>
-<p class="level1">When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
-<p class="level0"><a name="-R--remote-time"></a><span class="nroffip">-R/--remote-time</span>
-<p class="level1">When used, this will make libcurl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp.
-<p class="level0"><a name="--retry"></a><span class="nroffip">--retry <num></span>
-<p class="level1">If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes curl do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code.
-<p class="level1">When curl is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10 minutes which then will be the delay between the rest of the retries. By using <a class="emphasis" href="#--retry-delay">--retry-delay</a> you disable this exponential backoff algorithm. See also <a class="emphasis" href="#--retry-max-time">--retry-max-time</a> to limit the total time allowed for retries. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence decide the amount.
-<p class="level0"><a name="--retry-delay"></a><span class="nroffip">--retry-delay <seconds></span>
-<p class="level1">Make curl sleep this amount of time before each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between retries). This option is only interesting if <a class="emphasis" href="#--retry">--retry</a> is also used. Setting this delay to zero will make curl use the default backoff time. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount.
-<p class="level0"><a name="--retry-max-time"></a><span class="nroffip">--retry-max-time <seconds></span>
-<p class="level1">The retry timer is reset before the first transfer attempt. Retries will be done as usual (see <a class="emphasis" href="#--retry">--retry</a>) as long as the timer hasn't reached this given limit. Notice that if the timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a single request´s maximum time, use <a class="emphasis" href="#-m--max-time">-m/--max-time</a>. Set this option to zero to not timeout retries. (Added in 7.12.3)
-<p class="level1">If this option is used multiple times, the last occurrence determines the amount.
-<p class="level0"><a name="-s--silent"></a><span class="nroffip">-s/--silent</span>
-<p class="level1">Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.
-<p class="level0"><a name="-S--show-error"></a><span class="nroffip">-S/--show-error</span>
-<p class="level1">When used with -s it makes curl show an error message if it fails.
-<p class="level0"><a name="--socks4"></a><span class="nroffip">--socks4 <host[:port]></span>
-<p class="level1">Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.15.2)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks4a"></a><span class="nroffip">--socks4a <host[:port]></span>
-<p class="level1">Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--socks5-hostname"></a><span class="nroffip">--socks5-hostname <host[:port]></span>
-<p class="level1">Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080. (Added in 7.18.0)
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level0"><a name="--socks5"></a><span class="nroffip">--socks5 <host[:port]></span>
-<p class="level1">Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">This option overrides any previous use of <a class="emphasis" href="#-x--proxy">-x/--proxy</a>, as they are mutually exclusive.
-<p class="level1">If this option is used several times, the last one will be used. (This option was previously wrongly documented and used as --socks without the number appended.)
-<p class="level1">This option (as well as <a class="emphasis" href="#--socks4">--socks4</a>) does not work with IPV6, FTPS or LDAP.
-<p class="level0"><a name="--socks5-gssapi-service"></a><span class="nroffip">--socks5-gssapi-service <servicename></span>
-<p class="level1">The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it.
-<p class="level1">Examples: --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd would use sockd/proxy-name --socks5 proxy-name <a class="emphasis" href="#--socks5-gssapi-service">--socks5-gssapi-service</a> sockd/real-name would use sockd/real-name for cases where the proxy-name does not match the princpal name. (Added in 7.19.4).
-<p class="level0"><a name="--socks5-gssapi-nec"></a><span class="nroffip">--socks5-gssapi-nec</span>
-<p class="level1">As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. The option <a class="emphasis" href="#--socks5-gssapi-nec">--socks5-gssapi-nec</a> allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-<p class="level0"><a name="--stderr"></a><span class="nroffip">--stderr <file></span>
-<p class="level1">Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout. This option has no point when you're using a shell with decent redirecting capabilities.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--tcp-nodelay"></a><span class="nroffip">--tcp-nodelay</span>
-<p class="level1">Turn on the TCP_NODELAY option. See the <span Class="emphasis">curl_easy_setopt(3)</span> man page for details about this option. (Added in 7.11.2)
-<p class="level0"><a name="-t--telnet-option"></a><span class="nroffip">-t/--telnet-option <OPT=val></span>
-<p class="level1">Pass options to the telnet protocol. Supported options are:
-<p class="level1">TTYPE=<term> Sets the terminal type.
-<p class="level1">XDISPLOC=<X display> Sets the X display location.
-<p class="level1">NEW_ENV=<var,val> Sets an environment variable.
-<p class="level0"><a name="--tftp-blksize"></a><span class="nroffip">--tftp-blksize <value></span>
-<p class="level1">(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that curl will try to use when tranferring data to or from a TFTP server. By default 512 bytes will be used.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="-T--upload-file"></a><span class="nroffip">-T/--upload-file <file></span>
-<p class="level1">This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a HTTP(S) server, the PUT command will be used.
-<p class="level1">Use the file name "-" (a single dash) to use stdin instead of a given file. Alternately, the file name "." (a single period) may be specified instead of "-" to use stdin in non-blocking mode to allow reading server output while stdin is being uploaded.
-<p class="level1">You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this:
-<p class="level1">curl -T "{file1,file2}" <a href="http://www.uploadtothissite.com">http://www.uploadtothissite.com</a>
-<p class="level1">or even
-<p class="level1">curl -T "img[1-1000].png" <a href="ftp://ftp.picturemania.com/upload/">ftp://ftp.picturemania.com/upload/</a>
-<p class="level0"><a name="--trace"></a><span class="nroffip">--trace <file></span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-ascii"></a><span class="nroffip">--trace-ascii <file></span>
-<p class="level1">Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output sent to stdout.
-<p class="level1">This is very similar to <a class="emphasis" href="#--trace">--trace</a>, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for untrained humans.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#-v--verbose">-v/--verbose</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--trace-time"></a><span class="nroffip">--trace-time</span>
-<p class="level1">Prepends a time stamp to each trace or verbose line that curl displays. (Added in 7.14.0)
-<p class="level0"><a name="-u--user"></a><span class="nroffip">-u/--user <user:password></span>
-<p class="level1">Specify the user name and password to use for server authentication. Overrides <a class="emphasis" href="#-n--netrc">-n/--netrc</a> and <a class="emphasis" href="#--netrc-optional">--netrc-optional</a>.
-<p class="level1">If you just give the user name (without entering a colon) curl will prompt for a password.
-<p class="level1">If you use an SSPI-enabled curl binary and do NTLM authentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-u :".
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-U--proxy-user"></a><span class="nroffip">-U/--proxy-user <user:password></span>
-<p class="level1">Specify the user name and password to use for proxy authentication.
-<p class="level1">If you use an SSPI-enabled curl binary and do NTLM authentication, you can force curl to pick up the user name and password from your environment by simply specifying a single colon with this option: "-U :".
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--url"></a><span class="nroffip">--url <URL></span>
-<p class="level1">Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file.
-<p class="level1">This option may be used any number of times. To control where this URL is written, use the <a class="emphasis" href="#-o--output">-o/--output</a> or the <a class="emphasis" href="#-O--remote-name">-O/--remote-name</a> options.
-<p class="level0"><a name="-v--verbose"></a><span class="nroffip">-v/--verbose</span>
-<p class="level1">Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.
-<p class="level1">Note that if you only want HTTP headers in the output, <a class="emphasis" href="#-i--include">-i/--include</a> might be the option you're looking for.
-<p class="level1">If you think this option still doesn't give you enough details, consider using <a class="emphasis" href="#--trace">--trace</a> or <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> instead.
-<p class="level1">This option overrides previous uses of <a class="emphasis" href="#--trace-ascii">--trace-ascii</a> or <a class="emphasis" href="#--trace">--trace</a>.
-<p class="level1">Use <span Class="emphasis">-S/--silent</span> to make curl quiet.
-<p class="level0"><a name="-V--version"></a><span class="nroffip">-V/--version</span>
-<p class="level1">Displays information about curl and the libcurl version it uses.
-<p class="level1">The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable.
-<p class="level1">The second line (starts with "Protocols:") shows all protocols that libcurl reports to support.
-<p class="level1">The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include:
-<p class="level2">
-<p class="level1"><a name="IPv6"></a><span class="nroffip">IPv6</span>
-<p class="level2">You can use IPv6 with this.
-<p class="level1"><a name="krb4"></a><span class="nroffip">krb4</span>
-<p class="level2">Krb4 for FTP is supported.
-<p class="level1"><a name="SSL"></a><span class="nroffip">SSL</span>
-<p class="level2">HTTPS and FTPS are supported.
-<p class="level1"><a name="libz"></a><span class="nroffip">libz</span>
-<p class="level2">Automatic decompression of compressed files over HTTP is supported.
-<p class="level1"><a name="NTLM"></a><span class="nroffip">NTLM</span>
-<p class="level2">NTLM authentication is supported.
-<p class="level1"><a name="GSS-Negotiate"></a><span class="nroffip">GSS-Negotiate</span>
-<p class="level2">Negotiate authentication and krb5 for FTP is supported.
-<p class="level1"><a name="Debug"></a><span class="nroffip">Debug</span>
-<p class="level2">This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only!
-<p class="level1"><a name="AsynchDNS"></a><span class="nroffip">AsynchDNS</span>
-<p class="level2">This curl uses asynchronous name resolves.
-<p class="level1"><a name="SPNEGO"></a><span class="nroffip">SPNEGO</span>
-<p class="level2">SPNEGO Negotiate authentication is supported.
-<p class="level1"><a name="Largefile"></a><span class="nroffip">Largefile</span>
-<p class="level2">This curl supports transfers of large files, files larger than 2GB.
-<p class="level1"><a name="IDN"></a><span class="nroffip">IDN</span>
-<p class="level2">This curl supports IDN - international domain names.
-<p class="level1"><a name="SSPI"></a><span class="nroffip">SSPI</span>
-<p class="level2">SSPI is supported. If you use NTLM and set a blank user name, curl will authenticate with your current user and password.
-<p class="level1">
-<p class="level0"><a name="-w--write-out"></a><span class="nroffip">-w/--write-out <format></span>
-<p class="level1">Defines what to display on stdout after a completed and successful operation. The format is a string that may contain plain text mixed with any number of variables. The string can be specified as "string", to get read from a particular file you specify it "@filename" and to tell curl to read the format from stdin you write "@-".
-<p class="level1">The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as %{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t.
-<p class="level1"><span Class="bold">NOTE:</span> The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option.
-<p class="level1">The variables available at this point are:
-<p class="level2">
-<p class="level2"><span Class="bold">url_effective</span> The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers.
-<p class="level2"><span Class="bold">http_code</span> The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias <span Class="bold">response_code</span> was added to show the same info.
-<p class="level2"><span Class="bold">http_connect</span> The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4)
-<p class="level2"><span Class="bold">time_total</span> The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.
-<p class="level2"><span Class="bold">time_namelookup</span> The time, in seconds, it took from the start until the name resolving was completed.
-<p class="level2"><span Class="bold">time_connect</span> The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
-<p class="level2"><span Class="bold">time_appconnect</span> The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0)
-<p class="level2"><span Class="bold">time_pretransfer</span> The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level2"><span Class="bold">time_redirect</span> The time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3)
-<p class="level2"><span Class="bold">time_starttransfer</span> The time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result.
-<p class="level2"><span Class="bold">size_download</span> The total amount of bytes that were downloaded.
-<p class="level2"><span Class="bold">size_upload</span> The total amount of bytes that were uploaded.
-<p class="level2"><span Class="bold">size_header</span> The total amount of bytes of the downloaded headers.
-<p class="level2"><span Class="bold">size_request</span> The total amount of bytes that were sent in the HTTP request.
-<p class="level2"><span Class="bold">speed_download</span> The average download speed that curl measured for the complete download. Bytes per second.
-<p class="level2"><span Class="bold">speed_upload</span> The average upload speed that curl measured for the complete upload. Bytes per second.
-<p class="level2"><span Class="bold">content_type</span> The Content-Type of the requested document, if there was any.
-<p class="level2"><span Class="bold">num_connects</span> Number of new connects made in the recent transfer. (Added in 7.12.3)
-<p class="level2"><span Class="bold">num_redirects</span> Number of redirects that were followed in the request. (Added in 7.12.3)
-<p class="level2"><span Class="bold">redirect_url</span> When a HTTP request was made without -L to follow redirects, this variable will show the actual URL a redirect <span Class="emphasis">would</span> take you to. (Added in 7.18.2)
-<p class="level2"><span Class="bold">ftp_entry_path</span> The initial path libcurl ended up in when logging on to the remote FTP server. (Added in 7.15.4)
-<p class="level2"><span Class="bold">ssl_verify_result</span> The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0)
-<p class="level1">
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-x--proxy"></a><span class="nroffip">-x/--proxy <proxyhost[:port]></span>
-<p class="level1">Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080.
-<p class="level1">This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to "" to override it.
-<p class="level1"><span Class="bold">Note</span> that all operations that are performed over a HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be available. This is not the case if you can tunnel through the proxy, as done with the <a class="emphasis" href="#-p--proxytunnel">-p/--proxytunnel</a> option.
-<p class="level1">Starting with 7.14.1, the proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (http://) and the embedded user + password.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-X--request"></a><span class="nroffip">-X/--request <command></span>
-<p class="level1">(HTTP) Specifies a custom request method to use when communicating with the HTTP server. The specified request will be used instead of the method otherwise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include PUT and DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.
-<p class="level1">(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-y--speed-time"></a><span class="nroffip">-y/--speed-time <time></span>
-<p class="level1">If a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit will be 1 unless set with -Y.
-<p class="level1">This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the <a class="emphasis" href="#--connect-timeout">--connect-timeout</a> option.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-Y--speed-limit"></a><span class="nroffip">-Y/--speed-limit <speed></span>
-<p class="level1">If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with -y and is 30 if not set.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-z--time-cond"></a><span class="nroffip">-z/--time-cond <date expression></span>
-<p class="level1">(HTTP/FTP) Request a file that has been modified later than the given time and date, or one that has been modified before that time. The date expression can be all sorts of date strings or if it doesn't match any internal ones, it tries to get the time from a given file name instead! See the <span Class="emphasis">curl_getdate(3)</span> man pages for date expression details.
-<p class="level1">Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the specified date/time.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="--max-redirs"></a><span class="nroffip">--max-redirs <num></span>
-<p class="level1">Set maximum number of redirection-followings allowed. If <a class="emphasis" href="#-L--location">-L/--location</a> is used, this option can be used to prevent curl from following redirections "in absurdum". By default, the limit is set to 50 redirections. Set this option to -1 to make it limitless.
-<p class="level1">If this option is used several times, the last one will be used.
-<p class="level0"><a name="-0--http10"></a><span class="nroffip">-0/--http1.0</span>
-<p class="level1">(HTTP) Forces curl to issue its requests using HTTP 1.0 instead of using its internally preferred: HTTP 1.1.
-<p class="level0"><a name="-1--tlsv1"></a><span class="nroffip">-1/--tlsv1</span>
-<p class="level1">(SSL) Forces curl to use TLS version 1 when negotiating with a remote TLS server.
-<p class="level0"><a name="-2--sslv2"></a><span class="nroffip">-2/--sslv2</span>
-<p class="level1">(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server.
-<p class="level0"><a name="-3--sslv3"></a><span class="nroffip">-3/--sslv3</span>
-<p class="level1">(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server.
-<p class="level0"><a name="-4--ipv4"></a><span class="nroffip">-4/--ipv4</span>
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv4 addresses only.
-<p class="level0"><a name="-6--ipv6"></a><span class="nroffip">-6/--ipv6</span>
-<p class="level1">If libcurl is capable of resolving an address to multiple IP versions (which it is if it is IPv6-capable), this option tells libcurl to resolve names to IPv6 addresses only.
-<p class="level0"><a name="---progress-bar"></a><span class="nroffip">-#/--progress-bar</span>
-<p class="level1">Make curl display progress information as a progress bar instead of the default statistics. <a name="FILES"></a><h2 class="nroffsh">FILES</h2>
-<p class="level0"><span Class="emphasis">~/.curlrc</span>
-<p class="level1">Default config file, see <a class="emphasis" href="#-K--config">-K/--config</a> for details. <a name="ENVIRONMENT"></a><h2 class="nroffsh">ENVIRONMENT</h2>
-<p class="level0">The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is only available in lower case.
-<p class="level0"><a name="httpproxy"></a><span class="nroffip">http_proxy [protocol://]<host>[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTP.
-<p class="level0"><a name="HTTPSPROXY"></a><span class="nroffip">HTTPS_PROXY [protocol://]<host>[:port]</span>
-<p class="level1">Sets the proxy server to use for HTTPS.
-<p class="level0"><a name="FTPPROXY"></a><span class="nroffip">FTP_PROXY [protocol://]<host>[:port]</span>
-<p class="level1">Sets the proxy server to use for FTP.
-<p class="level0"><a name="ALLPROXY"></a><span class="nroffip">ALL_PROXY [protocol://]<host>[:port]</span>
-<p class="level1">Sets the proxy server to use if no protocol-specific proxy is set.
-<p class="level0"><a name="NOPROXY"></a><span class="nroffip">NO_PROXY <comma-separated list of hosts></span>
-<p class="level1">list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts. <a name="EXIT"></a><h2 class="nroffsh">EXIT CODES</h2>
-<p class="level0">There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are:
-<p class="level0"><a name="1"></a><span class="nroffip">1</span>
-<p class="level1">Unsupported protocol. This build of curl has no support for this protocol.
-<p class="level0"><a name="2"></a><span class="nroffip">2</span>
-<p class="level1">Failed to initialize.
-<p class="level0"><a name="3"></a><span class="nroffip">3</span>
-<p class="level1">URL malformed. The syntax was not correct.
-<p class="level0"><a name="5"></a><span class="nroffip">5</span>
-<p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved.
-<p class="level0"><a name="6"></a><span class="nroffip">6</span>
-<p class="level1">Couldn't resolve host. The given remote host was not resolved.
-<p class="level0"><a name="7"></a><span class="nroffip">7</span>
-<p class="level1">Failed to connect to host.
-<p class="level0"><a name="8"></a><span class="nroffip">8</span>
-<p class="level1">FTP weird server reply. The server sent data curl couldn't parse.
-<p class="level0"><a name="9"></a><span class="nroffip">9</span>
-<p class="level1">FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server.
-<p class="level0"><a name="11"></a><span class="nroffip">11</span>
-<p class="level1">FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
-<p class="level0"><a name="13"></a><span class="nroffip">13</span>
-<p class="level1">FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
-<p class="level0"><a name="14"></a><span class="nroffip">14</span>
-<p class="level1">FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
-<p class="level0"><a name="15"></a><span class="nroffip">15</span>
-<p class="level1">FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
-<p class="level0"><a name="17"></a><span class="nroffip">17</span>
-<p class="level1">FTP couldn't set binary. Couldn't change transfer method to binary.
-<p class="level0"><a name="18"></a><span class="nroffip">18</span>
-<p class="level1">Partial file. Only a part of the file was transferred.
-<p class="level0"><a name="19"></a><span class="nroffip">19</span>
-<p class="level1">FTP couldn't download/access the given file, the RETR (or similar) command failed.
-<p class="level0"><a name="21"></a><span class="nroffip">21</span>
-<p class="level1">FTP quote error. A quote command returned error from the server.
-<p class="level0"><a name="22"></a><span class="nroffip">22</span>
-<p class="level1">HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if <a class="emphasis" href="#-f--fail">-f/--fail</a> is used.
-<p class="level0"><a name="23"></a><span class="nroffip">23</span>
-<p class="level1">Write error. Curl couldn't write data to a local filesystem or similar.
-<p class="level0"><a name="25"></a><span class="nroffip">25</span>
-<p class="level1">FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.
-<p class="level0"><a name="26"></a><span class="nroffip">26</span>
-<p class="level1">Read error. Various reading problems.
-<p class="level0"><a name="27"></a><span class="nroffip">27</span>
-<p class="level1">Out of memory. A memory allocation request failed.
-<p class="level0"><a name="28"></a><span class="nroffip">28</span>
-<p class="level1">Operation timeout. The specified time-out period was reached according to the conditions.
-<p class="level0"><a name="30"></a><span class="nroffip">30</span>
-<p class="level1">FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!
-<p class="level0"><a name="31"></a><span class="nroffip">31</span>
-<p class="level1">FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.
-<p class="level0"><a name="33"></a><span class="nroffip">33</span>
-<p class="level1">HTTP range error. The range "command" didn't work.
-<p class="level0"><a name="34"></a><span class="nroffip">34</span>
-<p class="level1">HTTP post error. Internal post-request generation error.
-<p class="level0"><a name="35"></a><span class="nroffip">35</span>
-<p class="level1">SSL connect error. The SSL handshaking failed.
-<p class="level0"><a name="36"></a><span class="nroffip">36</span>
-<p class="level1">FTP bad download resume. Couldn't continue an earlier aborted download.
-<p class="level0"><a name="37"></a><span class="nroffip">37</span>
-<p class="level1">FILE couldn't read file. Failed to open the file. Permissions?
-<p class="level0"><a name="38"></a><span class="nroffip">38</span>
-<p class="level1">LDAP cannot bind. LDAP bind operation failed.
-<p class="level0"><a name="39"></a><span class="nroffip">39</span>
-<p class="level1">LDAP search failed.
-<p class="level0"><a name="41"></a><span class="nroffip">41</span>
-<p class="level1">Function not found. A required LDAP function was not found.
-<p class="level0"><a name="42"></a><span class="nroffip">42</span>
-<p class="level1">Aborted by callback. An application told curl to abort the operation.
-<p class="level0"><a name="43"></a><span class="nroffip">43</span>
-<p class="level1">Internal error. A function was called with a bad parameter.
-<p class="level0"><a name="45"></a><span class="nroffip">45</span>
-<p class="level1">Interface error. A specified outgoing interface could not be used.
-<p class="level0"><a name="47"></a><span class="nroffip">47</span>
-<p class="level1">Too many redirects. When following redirects, curl hit the maximum amount.
-<p class="level0"><a name="48"></a><span class="nroffip">48</span>
-<p class="level1">Unknown TELNET option specified.
-<p class="level0"><a name="49"></a><span class="nroffip">49</span>
-<p class="level1">Malformed telnet option.
-<p class="level0"><a name="51"></a><span class="nroffip">51</span>
-<p class="level1">The peer's SSL certificate or SSH MD5 fingerprint was not ok.
-<p class="level0"><a name="52"></a><span class="nroffip">52</span>
-<p class="level1">The server didn't reply anything, which here is considered an error.
-<p class="level0"><a name="53"></a><span class="nroffip">53</span>
-<p class="level1">SSL crypto engine not found.
-<p class="level0"><a name="54"></a><span class="nroffip">54</span>
-<p class="level1">Cannot set SSL crypto engine as default.
-<p class="level0"><a name="55"></a><span class="nroffip">55</span>
-<p class="level1">Failed sending network data.
-<p class="level0"><a name="56"></a><span class="nroffip">56</span>
-<p class="level1">Failure in receiving network data.
-<p class="level0"><a name="58"></a><span class="nroffip">58</span>
-<p class="level1">Problem with the local certificate.
-<p class="level0"><a name="59"></a><span class="nroffip">59</span>
-<p class="level1">Couldn't use specified SSL cipher.
-<p class="level0"><a name="60"></a><span class="nroffip">60</span>
-<p class="level1">Peer certificate cannot be authenticated with known CA certificates.
-<p class="level0"><a name="61"></a><span class="nroffip">61</span>
-<p class="level1">Unrecognized transfer encoding.
-<p class="level0"><a name="62"></a><span class="nroffip">62</span>
-<p class="level1">Invalid LDAP URL.
-<p class="level0"><a name="63"></a><span class="nroffip">63</span>
-<p class="level1">Maximum file size exceeded.
-<p class="level0"><a name="64"></a><span class="nroffip">64</span>
-<p class="level1">Requested FTP SSL level failed.
-<p class="level0"><a name="65"></a><span class="nroffip">65</span>
-<p class="level1">Sending the data requires a rewind that failed.
-<p class="level0"><a name="66"></a><span class="nroffip">66</span>
-<p class="level1">Failed to initialise SSL Engine.
-<p class="level0"><a name="67"></a><span class="nroffip">67</span>
-<p class="level1">The user name, password, or similar was not accepted and curl failed to log in.
-<p class="level0"><a name="68"></a><span class="nroffip">68</span>
-<p class="level1">File not found on TFTP server.
-<p class="level0"><a name="69"></a><span class="nroffip">69</span>
-<p class="level1">Permission problem on TFTP server.
-<p class="level0"><a name="70"></a><span class="nroffip">70</span>
-<p class="level1">Out of disk space on TFTP server.
-<p class="level0"><a name="71"></a><span class="nroffip">71</span>
-<p class="level1">Illegal TFTP operation.
-<p class="level0"><a name="72"></a><span class="nroffip">72</span>
-<p class="level1">Unknown TFTP transfer ID.
-<p class="level0"><a name="73"></a><span class="nroffip">73</span>
-<p class="level1">File already exists (TFTP).
-<p class="level0"><a name="74"></a><span class="nroffip">74</span>
-<p class="level1">No such user (TFTP).
-<p class="level0"><a name="75"></a><span class="nroffip">75</span>
-<p class="level1">Character conversion failed.
-<p class="level0"><a name="76"></a><span class="nroffip">76</span>
-<p class="level1">Character conversion functions required.
-<p class="level0"><a name="77"></a><span class="nroffip">77</span>
-<p class="level1">Problem with reading the SSL CA cert (path? access rights?).
-<p class="level0"><a name="78"></a><span class="nroffip">78</span>
-<p class="level1">The resource referenced in the URL does not exist.
-<p class="level0"><a name="79"></a><span class="nroffip">79</span>
-<p class="level1">An unspecified error occurred during the SSH session.
-<p class="level0"><a name="80"></a><span class="nroffip">80</span>
-<p class="level1">Failed to shut down the SSL connection.
-<p class="level0"><a name="82"></a><span class="nroffip">82</span>
-<p class="level1">Could not load CRL file, missing or wrong format (added in 7.19.0).
-<p class="level0"><a name="83"></a><span class="nroffip">83</span>
-<p class="level1">Issuer check failed (added in 7.19.0).
-<p class="level0"><a name="XX"></a><span class="nroffip">XX</span>
-<p class="level1">More error codes will appear here in future releases. The existing ones are meant to never change. <a name="AUTHORS"></a><h2 class="nroffsh">AUTHORS / CONTRIBUTORS</h2>
-<p class="level0">Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file. <a name="WWW"></a><h2 class="nroffsh">WWW</h2>
-<p class="level0"><a href="http://curl.haxx.se">http://curl.haxx.se</a> <a name="FTP"></a><h2 class="nroffsh">FTP</h2>
-<p class="level0"><a href="ftp://ftp.sunet.se/pub/www/utilities/curl/">ftp://ftp.sunet.se/pub/www/utilities/curl/</a> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">ftp (1)</span> <span Class="manpage">wget (1)</span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/curl.pdf b/docs/curl.pdf
deleted file mode 100644
index d0e7ce2..0000000
--- a/docs/curl.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/examples/.gitignore b/docs/examples/.gitignore
new file mode 100644
index 0000000..d64e12d
--- /dev/null
+++ b/docs/examples/.gitignore
@@ -0,0 +1,75 @@
+10-at-a-time
+anyauthput
+certinfo
+chkspeed
+cookie_interface
+debug
+externalsocket
+fileupload
+fopen
+ftp-wildcard
+ftpget
+ftpgetinfo
+ftpgetresp
+ftpsget
+ftpupload
+getinfo
+getinmemory
+http-post
+httpcustomheader
+httpput
+https
+imap
+imap-append
+imap-copy
+imap-create
+imap-delete
+imap-examine
+imap-fetch
+imap-list
+imap-multi
+imap-noop
+imap-search
+imap-ssl
+imap-store
+imap-tls
+multi-app
+multi-debugcallback
+multi-double
+multi-post
+multi-single
+persistant
+pop3-dele
+pop3-list
+pop3-multi
+pop3-noop
+pop3-retr
+pop3-ssl
+pop3-stat
+pop3-tls
+pop3-top
+pop3-uidl
+pop3s
+pop3slist
+post-callback
+postinmemory
+postit2
+progressfunc
+resolve
+rtsp
+sendrecv
+sepheaders
+sftpget
+simple
+simplepost
+simplesmtp
+simplessl
+smtp-expn
+smtp-mail
+smtp-multi
+smtp-ssl
+smtp-tls
+smtp-vrfy
+url2file
+usercertinmem
+xmlstream
diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c
index b215cbf..5d95a8a 100644
--- a/docs/examples/10-at-a-time.c
+++ b/docs/examples/10-at-a-time.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Example application source code using the multi interface to download many
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi interface to download many
* files, but with a capped maximum amount of simultaneous transfers.
*
* Written by Michael Wallner
@@ -49,7 +62,6 @@
"http://www.uefa.com",
"http://www.ieee.org",
"http://www.apple.com",
- "http://www.sony.com",
"http://www.symantec.com",
"http://www.zdnet.com",
"http://www.fujitsu.com",
diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am
index 8d92f73..8e2bc9a 100644
--- a/docs/examples/Makefile.am
+++ b/docs/examples/Makefile.am
@@ -1,10 +1,29 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
- makefile.dj $(COMPLICATED_EXAMPLES)
+ Makefile.netware makefile.dj $(COMPLICATED_EXAMPLES)
# Specify our include paths here, and do it relative to $(top_srcdir) and
# $(top_builddir), to ensure that these paths which belong to the library
@@ -12,26 +31,33 @@
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include/curl \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
LIBDIR = $(top_builddir)/lib
-if STATICLIB
-# we need this define when building with a static lib on Windows
-STATICCPPFLAGS = -DCURL_STATICLIB
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS += -DCURL_NO_OLDIES
+
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
endif
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
# Dependencies
+if USE_EXPLICIT_LIB_DEPS
+LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
+else
LDADD = $(LIBDIR)/libcurl.la
+endif
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
include Makefile.inc
-
+all: $(check_PROGRAMS)
diff --git a/docs/examples/Makefile.example b/docs/examples/Makefile.example
index 29ca0d7..dfd1178 100644
--- a/docs/examples/Makefile.example
+++ b/docs/examples/Makefile.example
@@ -1,11 +1,24 @@
-#############################################################################
+#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
# What to call the final executable
TARGET = example
diff --git a/docs/examples/Makefile.in b/docs/examples/Makefile.in
deleted file mode 100644
index aba3989..0000000
--- a/docs/examples/Makefile.in
+++ /dev/null
@@ -1,820 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.inc
-check_PROGRAMS = 10-at-a-time$(EXEEXT) anyauthput$(EXEEXT) \
- cookie_interface$(EXEEXT) debug$(EXEEXT) fileupload$(EXEEXT) \
- fopen$(EXEEXT) ftpget$(EXEEXT) ftpgetresp$(EXEEXT) \
- ftpupload$(EXEEXT) getinfo$(EXEEXT) getinmemory$(EXEEXT) \
- http-post$(EXEEXT) httpput$(EXEEXT) https$(EXEEXT) \
- multi-app$(EXEEXT) multi-debugcallback$(EXEEXT) \
- multi-double$(EXEEXT) multi-post$(EXEEXT) \
- multi-single$(EXEEXT) persistant$(EXEEXT) \
- post-callback$(EXEEXT) postit2$(EXEEXT) sepheaders$(EXEEXT) \
- simple$(EXEEXT) simplepost$(EXEEXT) simplessl$(EXEEXT) \
- sendrecv$(EXEEXT) httpcustomheader$(EXEEXT) certinfo$(EXEEXT) \
- chkspeed$(EXEEXT) ftpgetinfo$(EXEEXT) ftp-wildcard$(EXEEXT)
-subdir = docs/examples
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-10_at_a_time_SOURCES = 10-at-a-time.c
-10_at_a_time_OBJECTS = 10-at-a-time.$(OBJEXT)
-10_at_a_time_LDADD = $(LDADD)
-10_at_a_time_DEPENDENCIES = $(LIBDIR)/libcurl.la
-anyauthput_SOURCES = anyauthput.c
-anyauthput_OBJECTS = anyauthput.$(OBJEXT)
-anyauthput_LDADD = $(LDADD)
-anyauthput_DEPENDENCIES = $(LIBDIR)/libcurl.la
-certinfo_SOURCES = certinfo.c
-certinfo_OBJECTS = certinfo.$(OBJEXT)
-certinfo_LDADD = $(LDADD)
-certinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-chkspeed_SOURCES = chkspeed.c
-chkspeed_OBJECTS = chkspeed.$(OBJEXT)
-chkspeed_LDADD = $(LDADD)
-chkspeed_DEPENDENCIES = $(LIBDIR)/libcurl.la
-cookie_interface_SOURCES = cookie_interface.c
-cookie_interface_OBJECTS = cookie_interface.$(OBJEXT)
-cookie_interface_LDADD = $(LDADD)
-cookie_interface_DEPENDENCIES = $(LIBDIR)/libcurl.la
-debug_SOURCES = debug.c
-debug_OBJECTS = debug.$(OBJEXT)
-debug_LDADD = $(LDADD)
-debug_DEPENDENCIES = $(LIBDIR)/libcurl.la
-fileupload_SOURCES = fileupload.c
-fileupload_OBJECTS = fileupload.$(OBJEXT)
-fileupload_LDADD = $(LDADD)
-fileupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
-fopen_SOURCES = fopen.c
-fopen_OBJECTS = fopen.$(OBJEXT)
-fopen_LDADD = $(LDADD)
-fopen_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftp_wildcard_SOURCES = ftp-wildcard.c
-ftp_wildcard_OBJECTS = ftp-wildcard.$(OBJEXT)
-ftp_wildcard_LDADD = $(LDADD)
-ftp_wildcard_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpget_SOURCES = ftpget.c
-ftpget_OBJECTS = ftpget.$(OBJEXT)
-ftpget_LDADD = $(LDADD)
-ftpget_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpgetinfo_SOURCES = ftpgetinfo.c
-ftpgetinfo_OBJECTS = ftpgetinfo.$(OBJEXT)
-ftpgetinfo_LDADD = $(LDADD)
-ftpgetinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpgetresp_SOURCES = ftpgetresp.c
-ftpgetresp_OBJECTS = ftpgetresp.$(OBJEXT)
-ftpgetresp_LDADD = $(LDADD)
-ftpgetresp_DEPENDENCIES = $(LIBDIR)/libcurl.la
-ftpupload_SOURCES = ftpupload.c
-ftpupload_OBJECTS = ftpupload.$(OBJEXT)
-ftpupload_LDADD = $(LDADD)
-ftpupload_DEPENDENCIES = $(LIBDIR)/libcurl.la
-getinfo_SOURCES = getinfo.c
-getinfo_OBJECTS = getinfo.$(OBJEXT)
-getinfo_LDADD = $(LDADD)
-getinfo_DEPENDENCIES = $(LIBDIR)/libcurl.la
-getinmemory_SOURCES = getinmemory.c
-getinmemory_OBJECTS = getinmemory.$(OBJEXT)
-getinmemory_LDADD = $(LDADD)
-getinmemory_DEPENDENCIES = $(LIBDIR)/libcurl.la
-http_post_SOURCES = http-post.c
-http_post_OBJECTS = http-post.$(OBJEXT)
-http_post_LDADD = $(LDADD)
-http_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
-httpcustomheader_SOURCES = httpcustomheader.c
-httpcustomheader_OBJECTS = httpcustomheader.$(OBJEXT)
-httpcustomheader_LDADD = $(LDADD)
-httpcustomheader_DEPENDENCIES = $(LIBDIR)/libcurl.la
-httpput_SOURCES = httpput.c
-httpput_OBJECTS = httpput.$(OBJEXT)
-httpput_LDADD = $(LDADD)
-httpput_DEPENDENCIES = $(LIBDIR)/libcurl.la
-https_SOURCES = https.c
-https_OBJECTS = https.$(OBJEXT)
-https_LDADD = $(LDADD)
-https_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_app_SOURCES = multi-app.c
-multi_app_OBJECTS = multi-app.$(OBJEXT)
-multi_app_LDADD = $(LDADD)
-multi_app_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_debugcallback_SOURCES = multi-debugcallback.c
-multi_debugcallback_OBJECTS = multi-debugcallback.$(OBJEXT)
-multi_debugcallback_LDADD = $(LDADD)
-multi_debugcallback_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_double_SOURCES = multi-double.c
-multi_double_OBJECTS = multi-double.$(OBJEXT)
-multi_double_LDADD = $(LDADD)
-multi_double_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_post_SOURCES = multi-post.c
-multi_post_OBJECTS = multi-post.$(OBJEXT)
-multi_post_LDADD = $(LDADD)
-multi_post_DEPENDENCIES = $(LIBDIR)/libcurl.la
-multi_single_SOURCES = multi-single.c
-multi_single_OBJECTS = multi-single.$(OBJEXT)
-multi_single_LDADD = $(LDADD)
-multi_single_DEPENDENCIES = $(LIBDIR)/libcurl.la
-persistant_SOURCES = persistant.c
-persistant_OBJECTS = persistant.$(OBJEXT)
-persistant_LDADD = $(LDADD)
-persistant_DEPENDENCIES = $(LIBDIR)/libcurl.la
-post_callback_SOURCES = post-callback.c
-post_callback_OBJECTS = post-callback.$(OBJEXT)
-post_callback_LDADD = $(LDADD)
-post_callback_DEPENDENCIES = $(LIBDIR)/libcurl.la
-postit2_SOURCES = postit2.c
-postit2_OBJECTS = postit2.$(OBJEXT)
-postit2_LDADD = $(LDADD)
-postit2_DEPENDENCIES = $(LIBDIR)/libcurl.la
-sendrecv_SOURCES = sendrecv.c
-sendrecv_OBJECTS = sendrecv.$(OBJEXT)
-sendrecv_LDADD = $(LDADD)
-sendrecv_DEPENDENCIES = $(LIBDIR)/libcurl.la
-sepheaders_SOURCES = sepheaders.c
-sepheaders_OBJECTS = sepheaders.$(OBJEXT)
-sepheaders_LDADD = $(LDADD)
-sepheaders_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simple_SOURCES = simple.c
-simple_OBJECTS = simple.$(OBJEXT)
-simple_LDADD = $(LDADD)
-simple_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simplepost_SOURCES = simplepost.c
-simplepost_OBJECTS = simplepost.$(OBJEXT)
-simplepost_LDADD = $(LDADD)
-simplepost_DEPENDENCIES = $(LIBDIR)/libcurl.la
-simplessl_SOURCES = simplessl.c
-simplessl_OBJECTS = simplessl.$(OBJEXT)
-simplessl_LDADD = $(LDADD)
-simplessl_DEPENDENCIES = $(LIBDIR)/libcurl.la
-DEFAULT_INCLUDES =
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
- cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
- ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
- getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
- multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
- multi-single.c persistant.c post-callback.c postit2.c \
- sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c
-DIST_SOURCES = 10-at-a-time.c anyauthput.c certinfo.c chkspeed.c \
- cookie_interface.c debug.c fileupload.c fopen.c ftp-wildcard.c \
- ftpget.c ftpgetinfo.c ftpgetresp.c ftpupload.c getinfo.c \
- getinmemory.c http-post.c httpcustomheader.c httpput.c https.c \
- multi-app.c multi-debugcallback.c multi-double.c multi-post.c \
- multi-single.c persistant.c post-callback.c postit2.c \
- sendrecv.c sepheaders.c simple.c simplepost.c simplessl.c
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign nostdinc
-EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
- makefile.dj $(COMPLICATED_EXAMPLES)
-
-
-# Specify our include paths here, and do it relative to $(top_srcdir) and
-# $(top_builddir), to ensure that these paths which belong to the library
-# being currently built and tested are searched before the library which
-# might possibly already be installed in the system.
-#
-# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
-# $(top_srcdir)/include is for libcurl's external include files
-INCLUDES = -I$(top_builddir)/include/curl \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include
-
-LIBDIR = $(top_builddir)/lib
-
-# we need this define when building with a static lib on Windows
-@STATICLIB_TRUE@STATICCPPFLAGS = -DCURL_STATICLIB
-
-# Dependencies
-LDADD = $(LIBDIR)/libcurl.la
-
-# These examples require external dependencies that may not be commonly
-# available on POSIX systems, so don't bother attempting to compile them here.
-COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \
- ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
- opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/examples/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/examples/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-10-at-a-time$(EXEEXT): $(10_at_a_time_OBJECTS) $(10_at_a_time_DEPENDENCIES)
- @rm -f 10-at-a-time$(EXEEXT)
- $(LINK) $(10_at_a_time_LDFLAGS) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS)
-anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES)
- @rm -f anyauthput$(EXEEXT)
- $(LINK) $(anyauthput_LDFLAGS) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS)
-certinfo$(EXEEXT): $(certinfo_OBJECTS) $(certinfo_DEPENDENCIES)
- @rm -f certinfo$(EXEEXT)
- $(LINK) $(certinfo_LDFLAGS) $(certinfo_OBJECTS) $(certinfo_LDADD) $(LIBS)
-chkspeed$(EXEEXT): $(chkspeed_OBJECTS) $(chkspeed_DEPENDENCIES)
- @rm -f chkspeed$(EXEEXT)
- $(LINK) $(chkspeed_LDFLAGS) $(chkspeed_OBJECTS) $(chkspeed_LDADD) $(LIBS)
-cookie_interface$(EXEEXT): $(cookie_interface_OBJECTS) $(cookie_interface_DEPENDENCIES)
- @rm -f cookie_interface$(EXEEXT)
- $(LINK) $(cookie_interface_LDFLAGS) $(cookie_interface_OBJECTS) $(cookie_interface_LDADD) $(LIBS)
-debug$(EXEEXT): $(debug_OBJECTS) $(debug_DEPENDENCIES)
- @rm -f debug$(EXEEXT)
- $(LINK) $(debug_LDFLAGS) $(debug_OBJECTS) $(debug_LDADD) $(LIBS)
-fileupload$(EXEEXT): $(fileupload_OBJECTS) $(fileupload_DEPENDENCIES)
- @rm -f fileupload$(EXEEXT)
- $(LINK) $(fileupload_LDFLAGS) $(fileupload_OBJECTS) $(fileupload_LDADD) $(LIBS)
-fopen$(EXEEXT): $(fopen_OBJECTS) $(fopen_DEPENDENCIES)
- @rm -f fopen$(EXEEXT)
- $(LINK) $(fopen_LDFLAGS) $(fopen_OBJECTS) $(fopen_LDADD) $(LIBS)
-ftp-wildcard$(EXEEXT): $(ftp_wildcard_OBJECTS) $(ftp_wildcard_DEPENDENCIES)
- @rm -f ftp-wildcard$(EXEEXT)
- $(LINK) $(ftp_wildcard_LDFLAGS) $(ftp_wildcard_OBJECTS) $(ftp_wildcard_LDADD) $(LIBS)
-ftpget$(EXEEXT): $(ftpget_OBJECTS) $(ftpget_DEPENDENCIES)
- @rm -f ftpget$(EXEEXT)
- $(LINK) $(ftpget_LDFLAGS) $(ftpget_OBJECTS) $(ftpget_LDADD) $(LIBS)
-ftpgetinfo$(EXEEXT): $(ftpgetinfo_OBJECTS) $(ftpgetinfo_DEPENDENCIES)
- @rm -f ftpgetinfo$(EXEEXT)
- $(LINK) $(ftpgetinfo_LDFLAGS) $(ftpgetinfo_OBJECTS) $(ftpgetinfo_LDADD) $(LIBS)
-ftpgetresp$(EXEEXT): $(ftpgetresp_OBJECTS) $(ftpgetresp_DEPENDENCIES)
- @rm -f ftpgetresp$(EXEEXT)
- $(LINK) $(ftpgetresp_LDFLAGS) $(ftpgetresp_OBJECTS) $(ftpgetresp_LDADD) $(LIBS)
-ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES)
- @rm -f ftpupload$(EXEEXT)
- $(LINK) $(ftpupload_LDFLAGS) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS)
-getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES)
- @rm -f getinfo$(EXEEXT)
- $(LINK) $(getinfo_LDFLAGS) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS)
-getinmemory$(EXEEXT): $(getinmemory_OBJECTS) $(getinmemory_DEPENDENCIES)
- @rm -f getinmemory$(EXEEXT)
- $(LINK) $(getinmemory_LDFLAGS) $(getinmemory_OBJECTS) $(getinmemory_LDADD) $(LIBS)
-http-post$(EXEEXT): $(http_post_OBJECTS) $(http_post_DEPENDENCIES)
- @rm -f http-post$(EXEEXT)
- $(LINK) $(http_post_LDFLAGS) $(http_post_OBJECTS) $(http_post_LDADD) $(LIBS)
-httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES)
- @rm -f httpcustomheader$(EXEEXT)
- $(LINK) $(httpcustomheader_LDFLAGS) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS)
-httpput$(EXEEXT): $(httpput_OBJECTS) $(httpput_DEPENDENCIES)
- @rm -f httpput$(EXEEXT)
- $(LINK) $(httpput_LDFLAGS) $(httpput_OBJECTS) $(httpput_LDADD) $(LIBS)
-https$(EXEEXT): $(https_OBJECTS) $(https_DEPENDENCIES)
- @rm -f https$(EXEEXT)
- $(LINK) $(https_LDFLAGS) $(https_OBJECTS) $(https_LDADD) $(LIBS)
-multi-app$(EXEEXT): $(multi_app_OBJECTS) $(multi_app_DEPENDENCIES)
- @rm -f multi-app$(EXEEXT)
- $(LINK) $(multi_app_LDFLAGS) $(multi_app_OBJECTS) $(multi_app_LDADD) $(LIBS)
-multi-debugcallback$(EXEEXT): $(multi_debugcallback_OBJECTS) $(multi_debugcallback_DEPENDENCIES)
- @rm -f multi-debugcallback$(EXEEXT)
- $(LINK) $(multi_debugcallback_LDFLAGS) $(multi_debugcallback_OBJECTS) $(multi_debugcallback_LDADD) $(LIBS)
-multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES)
- @rm -f multi-double$(EXEEXT)
- $(LINK) $(multi_double_LDFLAGS) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS)
-multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES)
- @rm -f multi-post$(EXEEXT)
- $(LINK) $(multi_post_LDFLAGS) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS)
-multi-single$(EXEEXT): $(multi_single_OBJECTS) $(multi_single_DEPENDENCIES)
- @rm -f multi-single$(EXEEXT)
- $(LINK) $(multi_single_LDFLAGS) $(multi_single_OBJECTS) $(multi_single_LDADD) $(LIBS)
-persistant$(EXEEXT): $(persistant_OBJECTS) $(persistant_DEPENDENCIES)
- @rm -f persistant$(EXEEXT)
- $(LINK) $(persistant_LDFLAGS) $(persistant_OBJECTS) $(persistant_LDADD) $(LIBS)
-post-callback$(EXEEXT): $(post_callback_OBJECTS) $(post_callback_DEPENDENCIES)
- @rm -f post-callback$(EXEEXT)
- $(LINK) $(post_callback_LDFLAGS) $(post_callback_OBJECTS) $(post_callback_LDADD) $(LIBS)
-postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES)
- @rm -f postit2$(EXEEXT)
- $(LINK) $(postit2_LDFLAGS) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS)
-sendrecv$(EXEEXT): $(sendrecv_OBJECTS) $(sendrecv_DEPENDENCIES)
- @rm -f sendrecv$(EXEEXT)
- $(LINK) $(sendrecv_LDFLAGS) $(sendrecv_OBJECTS) $(sendrecv_LDADD) $(LIBS)
-sepheaders$(EXEEXT): $(sepheaders_OBJECTS) $(sepheaders_DEPENDENCIES)
- @rm -f sepheaders$(EXEEXT)
- $(LINK) $(sepheaders_LDFLAGS) $(sepheaders_OBJECTS) $(sepheaders_LDADD) $(LIBS)
-simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES)
- @rm -f simple$(EXEEXT)
- $(LINK) $(simple_LDFLAGS) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
-simplepost$(EXEEXT): $(simplepost_OBJECTS) $(simplepost_DEPENDENCIES)
- @rm -f simplepost$(EXEEXT)
- $(LINK) $(simplepost_LDFLAGS) $(simplepost_OBJECTS) $(simplepost_LDADD) $(LIBS)
-simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES)
- @rm -f simplessl$(EXEEXT)
- $(LINK) $(simplessl_LDFLAGS) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/10-at-a-time.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anyauthput.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/certinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkspeed.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie_interface.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileupload.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp-wildcard.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpget.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetresp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpupload.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinmemory.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http-post.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpcustomheader.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/https.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-app.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistant.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/post-callback.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendrecv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sepheaders.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
-
-
-# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc
index 78d3126..4b0c28f 100644
--- a/docs/examples/Makefile.inc
+++ b/docs/examples/Makefile.inc
@@ -1,12 +1,43 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
+
# These are all libcurl example programs to be test compiled
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \
https multi-app multi-debugcallback multi-double multi-post multi-single \
persistant post-callback postit2 sepheaders simple simplepost simplessl \
- sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard
+ sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
+ smtp-mail smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn rtsp \
+ externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \
+ pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi \
+ imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \
+ imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \
+ imap-tls imap-multi url2file sftpget ftpsget postinmemory http2-download \
+ http2-upload
# These examples require external dependencies that may not be commonly
# available on POSIX systems, so don't bother attempting to compile them here.
-COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \
- ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
- opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
+COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \
+ ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
+ opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
+ smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
+ multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c
diff --git a/docs/examples/Makefile.m32 b/docs/examples/Makefile.m32
index 15750d0..2da5294 100644
--- a/docs/examples/Makefile.m32
+++ b/docs/examples/Makefile.m32
@@ -1,54 +1,185 @@
-#########################################################################
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
-## Makefile for building curl examples with MingW32
-## and optionally OpenSSL (0.9.8), libssh2 (0.18), zlib (1.2.3)
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
+#
+## Makefile for building curl examples with MingW (GCC-3.2 or later)
+## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
##
-## Usage:
-## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [SSPI=1] [IPV6=1] [DYN=1]
+## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
+## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
##
## Hint: you can also set environment vars to control the build, f.e.:
-## set ZLIB_PATH=c:/zlib-1.2.3
+## set ZLIB_PATH=c:/zlib-1.2.8
## set ZLIB=1
-##
-#########################################################################
+#
+###########################################################################
# Edit the path below to point to the base of your Zlib sources.
ifndef ZLIB_PATH
-ZLIB_PATH = ../../zlib-1.2.3
+ZLIB_PATH = ../../../zlib-1.2.8
endif
# Edit the path below to point to the base of your OpenSSL package.
ifndef OPENSSL_PATH
-OPENSSL_PATH = ../../openssl-0.9.8k
+OPENSSL_PATH = ../../../openssl-1.0.2a
endif
# Edit the path below to point to the base of your LibSSH2 package.
ifndef LIBSSH2_PATH
-LIBSSH2_PATH = ../../libssh2-1.2
+LIBSSH2_PATH = ../../../libssh2-1.5.0
+endif
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.4
+endif
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.30
+endif
+# Edit the path below to point to the base of your MS IDN package.
+# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
+# https://www.microsoft.com/en-us/download/details.aspx?id=734
+ifndef WINIDN_PATH
+WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs
endif
# Edit the path below to point to the base of your Novell LDAP NDK.
ifndef LDAP_SDK
LDAP_SDK = c:/novell/ndk/cldapsdk/win32
endif
+# Edit the path below to point to the base of your nghttp2 package.
+ifndef NGHTTP2_PATH
+NGHTTP2_PATH = ../../../nghttp2-1.0.0
+endif
PROOT = ../..
-ARES_LIB = $(PROOT)/ares
-SSL = 1
-ZLIB = 1
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = $(PROOT)/ares
+endif
-CC = gcc
-CFLAGS = -g -O2 -Wall
+# Edit the var below to set to your architecture or set environment var.
+ifndef ARCH
+ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64)
+ARCH = w64
+else
+ARCH = w32
+endif
+endif
+
+CC = $(CROSSPREFIX)gcc
+CFLAGS = -g -O2 -Wall
+CFLAGS += -fno-strict-aliasing
+ifeq ($(ARCH),w64)
+CFLAGS += -m64 -D_AMD64_
+LDFLAGS += -m64
+RCFLAGS += -F pe-x86-64
+else
+CFLAGS += -m32
+LDFLAGS += -m32
+RCFLAGS += -F pe-i386
+endif
# comment LDFLAGS below to keep debug info
-LDFLAGS = -s
-RC = windres
-RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
-RM = del /q /f > NUL 2>&1
-CP = copy
+LDFLAGS = -s
+RC = $(CROSSPREFIX)windres
+RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
+
+# Platform-dependent helper tool macros
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL = rm -f $1
+RMDIR = rm -fr $1
+MKDIR = mkdir -p $1
+COPY = -cp -afv $1 $2
+#COPYR = -cp -afr $1/* $2
+COPYR = -rsync -aC $1/* $2
+TOUCH = touch $1
+CAT = cat
+ECHONL = echo ""
+DL = '
+else
+ifeq "$(OS)" "Windows_NT"
+DEL = -del 2>NUL /q /f $(subst /,\,$1)
+RMDIR = -rd 2>NUL /q /s $(subst /,\,$1)
+else
+DEL = -del 2>NUL $(subst /,\,$1)
+RMDIR = -deltree 2>NUL /y $(subst /,\,$1)
+endif
+MKDIR = -md 2>NUL $(subst /,\,$1)
+COPY = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
+COPYR = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
+TOUCH = copy 2>&1>NUL /b $(subst /,\,$1) +,,
+CAT = type
+ECHONL = $(ComSpec) /c echo.
+endif
########################################################
## Nothing more to do below this line!
+ifeq ($(findstring -dyn,$(CFG)),-dyn)
+DYN = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+RTMP = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+SSH2 = 1
+SSL = 1
+ZLIB = 1
+endif
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+SSL = 1
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+IDN = 1
+endif
+ifeq ($(findstring -winidn,$(CFG)),-winidn)
+WINIDN = 1
+endif
+ifeq ($(findstring -sspi,$(CFG)),-sspi)
+SSPI = 1
+endif
+ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
+LDAPS = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+IPV6 = 1
+endif
+ifeq ($(findstring -metalink,$(CFG)),-metalink)
+METALINK = 1
+endif
+ifeq ($(findstring -winssl,$(CFG)),-winssl)
+WINSSL = 1
+SSPI = 1
+endif
+ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
+NGHTTP2 = 1
+endif
+
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
-LINK = $(CC) $(LDFLAGS) -o $@
ifdef DYN
curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
@@ -57,37 +188,68 @@
curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
curl_LDADD = -L$(PROOT)/lib -lcurl
CFLAGS += -DCURL_STATICLIB
+ LDFLAGS += -static
endif
ifdef ARES
ifndef DYN
- curl_DEPENDENCIES += $(ARES_LIB)/libcares.a
+ curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
endif
CFLAGS += -DUSE_ARES
- curl_LDADD += -L$(ARES_LIB) -lcares
+ curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
+endif
+ifdef RTMP
+ CFLAGS += -DUSE_LIBRTMP
+ curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
+endif
+ifdef NGHTTP2
+ CFLAGS += -DUSE_NGHTTP2
+ curl_LDADD += -L"$(NGHTTP2_PATH)/lib" -lnghttp2
endif
ifdef SSH2
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
- curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
+ curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
endif
ifdef SSL
- INCLUDES += -I"$(OPENSSL_PATH)/outinc"
- CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
- ifdef DYN
- curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
- else
- curl_LDADD += -L$(OPENSSL_PATH)/out -lssl -lcrypto -lgdi32
+ ifndef OPENSSL_LIBPATH
+ OPENSSL_LIBS = -lssl -lcrypto
+ ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
+ ifdef DYN
+ OPENSSL_LIBS = -lssl32 -leay32
+ endif
+ endif
+ ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
+ OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
+ endif
endif
+ ifndef DYN
+ OPENSSL_LIBS += -lgdi32 -lcrypt32
+ endif
+ CFLAGS += -DUSE_OPENSSL
+ curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
endif
ifdef ZLIB
INCLUDES += -I"$(ZLIB_PATH)"
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
- curl_LDADD += -L$(ZLIB_PATH) -lz
+ curl_LDADD += -L"$(ZLIB_PATH)" -lz
+endif
+ifdef IDN
+ CFLAGS += -DUSE_LIBIDN
+ curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
+else
+ifdef WINIDN
+ CFLAGS += -DUSE_WIN32_IDN
+ curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
+endif
endif
ifdef SSPI
CFLAGS += -DUSE_WINDOWS_SSPI
+ ifdef WINSSL
+ CFLAGS += -DUSE_SCHANNEL
+ endif
endif
ifdef IPV6
- CFLAGS += -DENABLE_IPV6
+ CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
endif
ifdef LDAPS
CFLAGS += -DHAVE_LDAP_SSL
@@ -102,32 +264,34 @@
endif
ifndef USE_LDAP_NOVELL
ifndef USE_LDAP_OPENLDAP
-curl_LDADD += -lwldap32
+ curl_LDADD += -lwldap32
endif
endif
curl_LDADD += -lws2_32
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
include Makefile.inc
-example_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
+check_PROGRAMS += ftpuploadresume.exe synctime.exe
-.SUFFIXES: .rc .res .o .exe
+.PRECIOUS: %.o
-all: $(example_PROGRAMS)
+all: $(check_PROGRAMS)
-.o.exe: $(curl_DEPENDENCIES)
- $(LINK) $< $(curl_LDADD)
+%.exe: %.o $(curl_DEPENDENCIES)
+ $(CC) $(LDFLAGS) -o $@ $< $(curl_LDADD)
-.c.o:
- $(COMPILE) -c $<
+%.o: %.c
+ $(CC) $(INCLUDES) $(CFLAGS) -c $<
-.rc.res:
+%.res: %.rc
$(RC) $(RCFLAGS) $< -o $@
clean:
- $(RM) $(example_PROGRAMS)
+ @$(call DEL, $(check_PROGRAMS:.exe=.o))
+distclean vclean: clean
+ @$(call DEL, $(check_PROGRAMS))
diff --git a/docs/examples/Makefile.netware b/docs/examples/Makefile.netware
new file mode 100644
index 0000000..f8e9955
--- /dev/null
+++ b/docs/examples/Makefile.netware
@@ -0,0 +1,434 @@
+#################################################################
+#
+## Makefile for building curl.nlm (NetWare version - gnu make)
+## Use: make -f Makefile.netware
+##
+## Comments to: Guenter Knauf http://www.gknw.net/phpbb
+#
+#################################################################
+
+# Edit the path below to point to the base of your Novell NDK.
+ifndef NDKBASE
+NDKBASE = c:/novell
+endif
+
+# Edit the path below to point to the base of your Zlib sources.
+ifndef ZLIB_PATH
+ZLIB_PATH = ../../../zlib-1.2.8
+endif
+
+# Edit the path below to point to the base of your OpenSSL package.
+ifndef OPENSSL_PATH
+OPENSSL_PATH = ../../../openssl-1.0.2a
+endif
+
+# Edit the path below to point to the base of your LibSSH2 package.
+ifndef LIBSSH2_PATH
+LIBSSH2_PATH = ../../../libssh2-1.5.0
+endif
+
+# Edit the path below to point to the base of your axTLS package.
+ifndef AXTLS_PATH
+AXTLS_PATH = ../../../axTLS-1.2.7
+endif
+
+# Edit the path below to point to the base of your libidn package.
+ifndef LIBIDN_PATH
+LIBIDN_PATH = ../../../libidn-1.30
+endif
+
+# Edit the path below to point to the base of your librtmp package.
+ifndef LIBRTMP_PATH
+LIBRTMP_PATH = ../../../librtmp-2.4
+endif
+
+# Edit the path below to point to the base of your fbopenssl package.
+ifndef FBOPENSSL_PATH
+FBOPENSSL_PATH = ../../fbopenssl-0.4
+endif
+
+# Edit the path below to point to the base of your c-ares package.
+ifndef LIBCARES_PATH
+LIBCARES_PATH = ../../ares
+endif
+
+ifndef INSTDIR
+INSTDIR = ..$(DS)..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
+endif
+
+# Edit the vars below to change NLM target settings.
+TARGET = examples
+VERSION = $(LIBCURL_VERSION)
+COPYR = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
+DESCR = cURL ($(LIBARCH))
+MTSAFE = YES
+STACK = 8192
+SCREEN = Example Program
+# Comment the line below if you dont want to load protected automatically.
+# LDRING = 3
+
+# Uncomment the next line to enable linking with POSIX semantics.
+# POSIXFL = 1
+
+# Edit the var below to point to your lib architecture.
+ifndef LIBARCH
+LIBARCH = LIBC
+endif
+
+# must be equal to NDEBUG or DEBUG, CURLDEBUG
+ifndef DB
+DB = NDEBUG
+endif
+# Optimization: -O<n> or debugging: -g
+ifeq ($(DB),NDEBUG)
+ OPT = -O2
+ OBJDIR = release
+else
+ OPT = -g
+ OBJDIR = debug
+endif
+
+# The following lines defines your compiler.
+ifdef CWFolder
+ METROWERKS = $(CWFolder)
+endif
+ifdef METROWERKS
+ # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
+ MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
+ CC = mwccnlm
+else
+ CC = gcc
+endif
+PERL = perl
+# Here you can find a native Win32 binary of the original awk:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+AWK = awk
+CP = cp -afv
+MKDIR = mkdir
+# RM = rm -f
+# If you want to mark the target as MTSAFE you will need a tool for
+# generating the xdc data for the linker; here's a minimal tool:
+# http://www.gknw.net/development/prgtools/mkxdc.zip
+MPKXDC = mkxdc
+
+# LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
+LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
+
+# Include the version info retrieved from curlver.h
+-include $(OBJDIR)/version.inc
+
+# Global flags for all compilers
+CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
+
+ifeq ($(CC),mwccnlm)
+LD = mwldnlm
+LDFLAGS = -nostdlib $< $(PRELUDE) $(LDLIBS) -o $@ -commandfile
+LIBEXT = lib
+CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
+CFLAGS += -relax_pointers
+#CFLAGS += -w on
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+ PRELUDE = $(NDK_LIBC)/imports/posixpre.o
+else
+ PRELUDE = $(NDK_LIBC)/imports/libcpre.o
+endif
+ CFLAGS += -align 4
+else
+ # PRELUDE = $(NDK_CLIB)/imports/clibpre.o
+ # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+ PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
+ # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
+ CFLAGS += -align 1
+endif
+else
+LD = nlmconv
+LDFLAGS = -T
+LIBEXT = a
+CFLAGS += -m32
+CFLAGS += -fno-builtin -fno-strict-aliasing
+ifeq ($(findstring gcc,$(CC)),gcc)
+CFLAGS += -fpcc-struct-return
+endif
+CFLAGS += -Wall # -pedantic
+ifeq ($(LIBARCH),LIBC)
+ifeq ($(POSIXFL),1)
+ PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o
+else
+ PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o
+endif
+else
+ # PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o
+ # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
+ # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
+ PRELUDE = $(NDK_ROOT)/pre/prelude.o
+ CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
+endif
+endif
+
+NDK_ROOT = $(NDKBASE)/ndk
+ifndef NDK_CLIB
+NDK_CLIB = $(NDK_ROOT)/nwsdk
+endif
+ifndef NDK_LIBC
+NDK_LIBC = $(NDK_ROOT)/libc
+endif
+ifndef NDK_LDAP
+NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
+endif
+CURL_INC = ../../include
+CURL_LIB = ../../lib
+
+INCLUDES = -I$(CURL_INC)
+
+ifeq ($(findstring -static,$(CFG)),-static)
+LINK_STATIC = 1
+endif
+ifeq ($(findstring -ares,$(CFG)),-ares)
+WITH_ARES = 1
+endif
+ifeq ($(findstring -rtmp,$(CFG)),-rtmp)
+WITH_RTMP = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -ssh2,$(CFG)),-ssh2)
+WITH_SSH2 = 1
+WITH_SSL = 1
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -axtls,$(CFG)),-axtls)
+WITH_AXTLS = 1
+WITH_SSL =
+else
+ifeq ($(findstring -ssl,$(CFG)),-ssl)
+WITH_SSL = 1
+endif
+endif
+ifeq ($(findstring -zlib,$(CFG)),-zlib)
+WITH_ZLIB = 1
+endif
+ifeq ($(findstring -idn,$(CFG)),-idn)
+WITH_IDN = 1
+endif
+ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
+ENABLE_IPV6 = 1
+endif
+
+ifdef LINK_STATIC
+ LDLIBS = $(CURL_LIB)/libcurl.$(LIBEXT)
+ifdef WITH_ARES
+ LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
+endif
+else
+ MODULES = libcurl.nlm
+ IMPORTS = @$(CURL_LIB)/libcurl.imp
+endif
+ifdef WITH_SSH2
+ # INCLUDES += -I$(LIBSSH2_PATH)/include
+ifdef LINK_STATIC
+ LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
+else
+ MODULES += libssh2.nlm
+ IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
+endif
+endif
+ifdef WITH_RTMP
+ # INCLUDES += -I$(LIBRTMP_PATH)
+ifdef LINK_STATIC
+ LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT)
+endif
+endif
+ifdef WITH_SSL
+ INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
+ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
+ LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
+ IMPORTS += GetProcessSwitchCount RunningProcess
+else
+ifdef WITH_AXTLS
+ INCLUDES += -I$(AXTLS_PATH)/inc
+ifdef LINK_STATIC
+ LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
+else
+ MODULES += libaxtls.nlm
+ IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
+endif
+endif
+endif
+ifdef WITH_ZLIB
+ # INCLUDES += -I$(ZLIB_PATH)
+ifdef LINK_STATIC
+ LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
+else
+ MODULES += libz.nlm
+ IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
+endif
+endif
+ifdef WITH_IDN
+ # INCLUDES += -I$(LIBIDN_PATH)/include
+ LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
+endif
+
+ifeq ($(LIBARCH),LIBC)
+ INCLUDES += -I$(NDK_LIBC)/include
+ # INCLUDES += -I$(NDK_LIBC)/include/nks
+ # INCLUDES += -I$(NDK_LIBC)/include/winsock
+ CFLAGS += -D_POSIX_SOURCE
+else
+ INCLUDES += -I$(NDK_CLIB)/include/nlm
+ # INCLUDES += -I$(NDK_CLIB)/include
+endif
+ifndef DISABLE_LDAP
+ # INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc
+endif
+CFLAGS += $(INCLUDES)
+
+ifeq ($(MTSAFE),YES)
+ XDCOPT = -n
+endif
+ifeq ($(MTSAFE),NO)
+ XDCOPT = -u
+endif
+ifdef XDCOPT
+ XDCDATA = $(OBJDIR)/$(TARGET).xdc
+endif
+
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DL = '
+DS = /
+PCT = %
+#-include $(NDKBASE)/nlmconv/ncpfs.inc
+else
+DS = \\
+PCT = %%
+endif
+
+# Makefile.inc provides the CSOURCES and HHEADERS defines
+include Makefile.inc
+
+check_PROGRAMS := $(patsubst %,%.nlm,$(strip $(check_PROGRAMS)))
+
+.PRECIOUS: $(OBJDIR)/%.o $(OBJDIR)/%.def $(OBJDIR)/%.xdc
+
+
+all: prebuild $(check_PROGRAMS)
+
+prebuild: $(OBJDIR) $(OBJDIR)/version.inc
+
+$(OBJDIR)/%.o: %.c
+ @echo Compiling $<
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
+ @echo Creating $@
+ @$(AWK) -f ../../packages/NetWare/get_ver.awk $< > $@
+
+install: $(INSTDIR) all
+ @$(CP) $(check_PROGRAMS) $(INSTDIR)
+
+clean:
+ -$(RM) -r $(OBJDIR)
+
+distclean vclean: clean
+ -$(RM) $(check_PROGRAMS)
+
+$(OBJDIR) $(INSTDIR):
+ @$(MKDIR) $@
+
+%.nlm: $(OBJDIR)/%.o $(OBJDIR)/%.def $(XDCDATA)
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $(OBJDIR)/$(@:.nlm=.def)
+
+$(OBJDIR)/%.xdc: Makefile.netware
+ @echo Creating $@
+ @$(MPKXDC) $(XDCOPT) $@
+
+$(OBJDIR)/%.def: Makefile.netware
+ @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
+ @echo $(DL)# Do not edit this file - it is created by Make!$(DL) >> $@
+ @echo $(DL)# All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)#$(DL) >> $@
+ @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
+ @echo $(DL)description "$(DESCR) $(notdir $(@:.def=)) Example"$(DL) >> $@
+ @echo $(DL)version $(VERSION)$(DL) >> $@
+ifdef NLMTYPE
+ @echo $(DL)type $(NLMTYPE)$(DL) >> $@
+endif
+ifdef STACK
+ @echo $(DL)stack $(STACK)$(DL) >> $@
+endif
+ifdef SCREEN
+ @echo $(DL)screenname "$(DESCR) $(notdir $(@:.def=)) $(SCREEN)"$(DL) >> $@
+else
+ @echo $(DL)screenname "DEFAULT"$(DL) >> $@
+endif
+ifneq ($(DB),NDEBUG)
+ @echo $(DL)debug$(DL) >> $@
+endif
+ @echo $(DL)threadname "_$(notdir $(@:.def=))"$(DL) >> $@
+ifdef XDCDATA
+ @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
+endif
+ifeq ($(LDRING),0)
+ @echo $(DL)flag_on 16$(DL) >> $@
+endif
+ifeq ($(LDRING),3)
+ @echo $(DL)flag_on 512$(DL) >> $@
+endif
+ifeq ($(LIBARCH),CLIB)
+ @echo $(DL)start _Prelude$(DL) >> $@
+ @echo $(DL)exit _Stop$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@
+ @echo $(DL)module clib$(DL) >> $@
+ifndef DISABLE_LDAP
+ @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
+# @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
+ @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
+endif
+else
+ifeq ($(POSIXFL),1)
+ @echo $(DL)flag_on 4194304$(DL) >> $@
+endif
+ @echo $(DL)flag_on 64$(DL) >> $@
+ @echo $(DL)pseudopreemption$(DL) >> $@
+ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
+ @echo $(DL)start POSIX_Start$(DL) >> $@
+ @echo $(DL)exit POSIX_Stop$(DL) >> $@
+ @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
+else
+ @echo $(DL)start _LibCPrelude$(DL) >> $@
+ @echo $(DL)exit _LibCPostlude$(DL) >> $@
+ @echo $(DL)check _LibCCheckUnload$(DL) >> $@
+endif
+ @echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@
+ @echo $(DL)module libc$(DL) >> $@
+ifndef DISABLE_LDAP
+ @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
+# @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
+ @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
+endif
+endif
+ifdef MODULES
+ @echo $(DL)module $(MODULES)$(DL) >> $@
+endif
+ifdef EXPORTS
+ @echo $(DL)export $(EXPORTS)$(DL) >> $@
+endif
+ifdef IMPORTS
+ @echo $(DL)import $(IMPORTS)$(DL) >> $@
+endif
+ifeq ($(findstring nlmconv,$(LD)),nlmconv)
+ @echo $(DL)input $(PRELUDE)$(DL) >> $@
+ @echo $(DL)input $(@:.def=.o)$(DL) >> $@
+ifdef LDLIBS
+ @echo $(DL)input $(LDLIBS)$(DL) >> $@
+endif
+ @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
+endif
diff --git a/docs/examples/README b/docs/examples/README
index d6c4785..1ca62a1 100644
--- a/docs/examples/README
+++ b/docs/examples/README
@@ -55,14 +55,18 @@
http-post.c - HTTP POST
httpput.c - HTTP PUT a local file
https.c - simple HTTPS transfer
+imap.c - simple IMAP transfer
multi-app.c - a multi-interface app
multi-debugcallback.c - a multi-interface app using the debug callback
multi-double.c - a multi-interface app doing two simultaneous transfers
multi-post.c - a multi-interface app doing a multipart formpost
multi-single.c - a multi-interface app getting a single file
+multi-uv.c - a multi-interface app using libuv
multithread.c - an example using multi-treading transferring multiple files
opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
persistant.c - request two URLs with a persistent connection
+pop3s.c - POP3S transfer
+pop3slist.c - POP3S LIST
post-callback.c - send a HTTP POST using a callback
postit2.c - send a HTTP multipart formpost
sampleconv.c - showing how a program on a non-ASCII platform would invoke
@@ -73,4 +77,6 @@
simplepost.c - HTTP POST
simplessl.c - HTTPS example with certificates many options set
synctime.c - Sync local time by extracting date from remote HTTP servers
+url2file.c - download a document and store it in a file
+xmlstream.c - Stream-parse a document using the streaming Expat parser
10-at-a-time.c - Download many files simultaneously, 10 at a time.
diff --git a/docs/examples/adddocsref.pl b/docs/examples/adddocsref.pl
new file mode 100755
index 0000000..2dcc24b
--- /dev/null
+++ b/docs/examples/adddocsref.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+# pass files as argument(s)
+
+my $docroot="http://curl.haxx.se/libcurl/c";
+
+for $f (@ARGV) {
+ open(NEW, ">$f.new");
+ open(F, "<$f");
+ while(<F>) {
+ my $l = $_;
+ if($l =~ /\/* $docroot/) {
+ # just ignore preciously added refs
+ }
+ elsif($l =~ /^( *).*curl_easy_setopt\([^,]*, *([^ ,]*) *,/) {
+ my ($prefix, $anc) = ($1, $2);
+ $anc =~ s/_//g;
+ print NEW "$prefix/* $docroot/curl_easy_setopt.html#$anc */\n";
+ print NEW $l;
+ }
+ elsif($l =~ /^( *).*(curl_([^\(]*))\(/) {
+ my ($prefix, $func) = ($1, $2);
+ print NEW "$prefix/* $docroot/$func.html */\n";
+ print NEW $l;
+ }
+ else {
+ print NEW $l;
+ }
+ }
+ close(F);
+ close(NEW);
+
+ system("mv $f $f.org");
+ system("mv $f.new $f");
+}
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index cec9fed..b89dca2 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <fcntl.h>
#ifdef WIN32
@@ -14,7 +26,8 @@
#else
# ifdef __VMS
typedef int intptr_t;
-# else
+# endif
+# if !defined(_AIX) && !defined(__sgi) && !defined(__osf__)
# include <stdint.h>
# endif
# include <unistd.h>
@@ -40,6 +53,12 @@
#define TRUE 1
#endif
+#if defined(_AIX) || defined(__sgi) || defined(__osf__)
+#ifndef intptr_t
+#define intptr_t long
+#endif
+#endif
+
/*
* This example shows a HTTP PUT operation with authentiction using "any"
* type. It PUTs a file given as a command line argument to the URL also given
@@ -77,12 +96,16 @@
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ curl_off_t nread;
intptr_t fd = (intptr_t)stream;
retcode = read(fd, ptr, size * nmemb);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
@@ -147,6 +170,10 @@
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/asiohiper.cpp b/docs/examples/asiohiper.cpp
new file mode 100644
index 0000000..eb5cd03
--- /dev/null
+++ b/docs/examples/asiohiper.cpp
@@ -0,0 +1,467 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+
+/*
+ * file: asiohiper.cpp
+ * Example program to demonstrate the use of multi socket interface
+ * with boost::asio
+ *
+ * This program is in c++ and uses boost::asio instead of libevent/libev.
+ * Requires boost::asio, boost::bind and boost::system
+ *
+ * This is an adaptation of libcurl's "hiperfifo.c" and "evhiperfifo.c"
+ * sample programs. This example implements a subset of the functionality from
+ * hiperfifo.c, for full functionality refer hiperfifo.c or evhiperfifo.c
+ *
+ * Written by Lijo Antony based on hiperfifo.c by Jeff Pohlmeyer
+ *
+ * When running, the program creates an easy handle for a URL and
+ * uses the curl_multi API to fetch it.
+ *
+ * Note:
+ * For the sake of simplicity, URL is hard coded to "www.google.com"
+ *
+ * This is purely a demo app, all retrieved data is simply discarded by the write
+ * callback.
+ */
+
+
+#include <curl/curl.h>
+#include <boost/asio.hpp>
+#include <boost/bind.hpp>
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+/* boost::asio related objects
+ * using global variables for simplicity
+ */
+boost::asio::io_service io_service;
+boost::asio::deadline_timer timer(io_service);
+std::map<curl_socket_t, boost::asio::ip::tcp::socket *> socket_map;
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+ CURLM *multi;
+ int still_running;
+} GlobalInfo;
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g);
+
+/* Update the event timer after curl_multi library calls */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+ fprintf(MSG_OUT, "\nmulti_timer_cb: timeout_ms %ld", timeout_ms);
+
+ /* cancel running timer */
+ timer.cancel();
+
+ if(timeout_ms > 0)
+ {
+ /* update timer */
+ timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
+ timer.async_wait(boost::bind(&timer_cb, _1, g));
+ }
+ else
+ {
+ /* call timeout function immediately */
+ boost::system::error_code error; /*success*/
+ timer_cb(error, g);
+ }
+
+ return 0;
+}
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code)
+ {
+ const char *s;
+ switch(code)
+ {
+ case CURLM_CALL_MULTI_PERFORM:
+ s = "CURLM_CALL_MULTI_PERFORM";
+ break;
+ case CURLM_BAD_HANDLE:
+ s = "CURLM_BAD_HANDLE";
+ break;
+ case CURLM_BAD_EASY_HANDLE:
+ s = "CURLM_BAD_EASY_HANDLE";
+ break;
+ case CURLM_OUT_OF_MEMORY:
+ s = "CURLM_OUT_OF_MEMORY";
+ break;
+ case CURLM_INTERNAL_ERROR:
+ s = "CURLM_INTERNAL_ERROR";
+ break;
+ case CURLM_UNKNOWN_OPTION:
+ s = "CURLM_UNKNOWN_OPTION";
+ break;
+ case CURLM_LAST:
+ s = "CURLM_LAST";
+ break;
+ default:
+ s = "CURLM_unknown";
+ break;
+ case CURLM_BAD_SOCKET:
+ s = "CURLM_BAD_SOCKET";
+ fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
+ /* ignore this error */
+ return;
+ }
+
+ fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
+
+ exit(code);
+ }
+}
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "\nREMAINING: %d", g->still_running);
+
+ while((msg = curl_multi_info_read(g->multi, &msgs_left)))
+ {
+ if(msg->msg == CURLMSG_DONE)
+ {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "\nDONE: %s => (%d) %s", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+}
+
+/* Called by asio when there is an action on a socket */
+static void event_cb(GlobalInfo *g, boost::asio::ip::tcp::socket *tcp_socket,
+ int action)
+{
+ fprintf(MSG_OUT, "\nevent_cb: action=%d", action);
+
+ CURLMcode rc;
+ rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action,
+ &g->still_running);
+
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+
+ if(g->still_running <= 0)
+ {
+ fprintf(MSG_OUT, "\nlast transfer done, kill timeout");
+ timer.cancel();
+ }
+}
+
+/* Called by asio when our timeout expires */
+static void timer_cb(const boost::system::error_code & error, GlobalInfo *g)
+{
+ if(!error)
+ {
+ fprintf(MSG_OUT, "\ntimer_cb: ");
+
+ CURLMcode rc;
+ rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+ }
+}
+
+/* Clean up any data */
+static void remsock(int *f, GlobalInfo *g)
+{
+ fprintf(MSG_OUT, "\nremsock: ");
+
+ if(f)
+ {
+ free(f);
+ }
+}
+
+static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
+{
+ fprintf(MSG_OUT, "\nsetsock: socket=%d, act=%d, fdp=%p", s, act, fdp);
+
+ std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(s);
+
+ if(it == socket_map.end())
+ {
+ fprintf(MSG_OUT, "\nsocket %d is a c-ares socket, ignoring", s);
+
+ return;
+ }
+
+ boost::asio::ip::tcp::socket * tcp_socket = it->second;
+
+ *fdp = act;
+
+ if(act == CURL_POLL_IN)
+ {
+ fprintf(MSG_OUT, "\nwatching for socket to become readable");
+
+ tcp_socket->async_read_some(boost::asio::null_buffers(),
+ boost::bind(&event_cb, g, tcp_socket, act));
+ }
+ else if (act == CURL_POLL_OUT)
+ {
+ fprintf(MSG_OUT, "\nwatching for socket to become writable");
+
+ tcp_socket->async_write_some(boost::asio::null_buffers(),
+ boost::bind(&event_cb, g, tcp_socket, act));
+ }
+ else if(act == CURL_POLL_INOUT)
+ {
+ fprintf(MSG_OUT, "\nwatching for socket to become readable & writable");
+
+ tcp_socket->async_read_some(boost::asio::null_buffers(),
+ boost::bind(&event_cb, g, tcp_socket, act));
+
+ tcp_socket->async_write_some(boost::asio::null_buffers(),
+ boost::bind(&event_cb, g, tcp_socket, act));
+ }
+}
+
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+ /* fdp is used to store current action */
+ int *fdp = (int *) calloc(sizeof(int), 1);
+
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+ fprintf(MSG_OUT, "\nsock_cb: socket=%d, what=%d, sockp=%p", s, what, sockp);
+
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ int *actionp = (int *) sockp;
+ const char *whatstr[] = { "none", "IN", "OUT", "INOUT", "REMOVE"};
+
+ fprintf(MSG_OUT,
+ "\nsocket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+
+ if(what == CURL_POLL_REMOVE)
+ {
+ fprintf(MSG_OUT, "\n");
+ remsock(actionp, g);
+ }
+ else
+ {
+ if(!actionp)
+ {
+ fprintf(MSG_OUT, "\nAdding data: %s", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else
+ {
+ fprintf(MSG_OUT,
+ "\nChanging action from %s to %s",
+ whatstr[*actionp], whatstr[what]);
+ setsock(actionp, s, e, what, g);
+ }
+ }
+
+ return 0;
+}
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+
+ size_t written = size * nmemb;
+ char* pBuffer = (char *) malloc(written + 1);
+
+ strncpy(pBuffer, (const char *)ptr, written);
+ pBuffer[written] = '\0';
+
+ fprintf(MSG_OUT, "%s", pBuffer);
+
+ free(pBuffer);
+
+ return written;
+}
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+
+ (void)ult;
+ (void)uln;
+
+ fprintf(MSG_OUT, "\nProgress: %s (%g/%g)", conn->url, dlnow, dltotal);
+ fprintf(MSG_OUT, "\nProgress: %s (%g)", conn->url, ult);
+
+ return 0;
+}
+
+/* CURLOPT_OPENSOCKETFUNCTION */
+static curl_socket_t opensocket(void *clientp, curlsocktype purpose,
+ struct curl_sockaddr *address)
+{
+ fprintf(MSG_OUT, "\nopensocket :");
+
+ curl_socket_t sockfd = CURL_SOCKET_BAD;
+
+ /* restrict to IPv4 */
+ if(purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET)
+ {
+ /* create a tcp socket object */
+ boost::asio::ip::tcp::socket *tcp_socket = new boost::asio::ip::tcp::socket(io_service);
+
+ /* open it and get the native handle*/
+ boost::system::error_code ec;
+ tcp_socket->open(boost::asio::ip::tcp::v4(), ec);
+
+ if(ec)
+ {
+ /* An error occurred */
+ std::cout << std::endl << "Couldn't open socket [" << ec << "][" << ec.message() << "]";
+ fprintf(MSG_OUT, "\nERROR: Returning CURL_SOCKET_BAD to signal error");
+ }
+ else
+ {
+ sockfd = tcp_socket->native_handle();
+ fprintf(MSG_OUT, "\nOpened socket %d", sockfd);
+
+ /* save it for monitoring */
+ socket_map.insert(std::pair<curl_socket_t, boost::asio::ip::tcp::socket *>(sockfd, tcp_socket));
+ }
+ }
+
+ return sockfd;
+}
+
+/* CURLOPT_CLOSESOCKETFUNCTION */
+static int closesocket(void *clientp, curl_socket_t item)
+{
+ fprintf(MSG_OUT, "\nclosesocket : %d", item);
+
+ std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(item);
+
+ if(it != socket_map.end())
+ {
+ delete it->second;
+ socket_map.erase(it);
+ }
+
+ return 0;
+}
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = (ConnInfo *) calloc(1, sizeof(ConnInfo));
+
+ conn->easy = curl_easy_init();
+ if(!conn->easy)
+ {
+ fprintf(MSG_OUT, "\ncurl_easy_init() failed, exiting!");
+
+ exit(2);
+ }
+
+ conn->global = g;
+ conn->url = strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+
+ /* call this function to get a socket */
+ curl_easy_setopt(conn->easy, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+
+ /* call this function to close a socket */
+ curl_easy_setopt(conn->easy, CURLOPT_CLOSESOCKETFUNCTION, closesocket);
+
+ fprintf(MSG_OUT,
+ "\nAdding easy %p to multi %p (%s)", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo g;
+ CURLMcode rc;
+
+ (void)argc;
+ (void)argv;
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.multi = curl_multi_init();
+
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ new_conn((char *)"www.google.com", &g); /* add a URL */
+
+ /* enter io_service run loop */
+ io_service.run();
+
+ curl_multi_cleanup(g.multi);
+
+ fprintf(MSG_OUT, "\ndone.\n");
+
+ return 0;
+}
diff --git a/docs/examples/cacertinmem.c b/docs/examples/cacertinmem.c
index 3870295..30a5153 100644
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * Example using a "in core" PEM certificate to retrieve a https page.
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example using a "in core" PEM certificate to retrieve a https page.
* Written by Theo Borm
*/
@@ -90,6 +103,10 @@
if (X509_STORE_add_cert(store, cert)==0)
printf("error adding certificate\n");
+ /* decrease reference counts */
+ X509_free(cert);
+ BIO_free(bio);
+
/* all set to go */
return CURLE_OK ;
}
@@ -108,7 +125,7 @@
rv=curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
rv=curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
rv=curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
- rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
+ rv=curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
diff --git a/docs/examples/certinfo.c b/docs/examples/certinfo.c
index ceb0ac2..ac0109b 100644
--- a/docs/examples/certinfo.c
+++ b/docs/examples/certinfo.c
@@ -1,17 +1,36 @@
-/*****************************************************************************
- */
-
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
{
+ (void)stream;
+ (void)ptr;
return size * nmemb;
}
-int main(int argc, char **argv)
+
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -33,18 +52,24 @@
res = curl_easy_perform(curl);
if(!res) {
- struct curl_certinfo *ci = NULL;
+ union {
+ struct curl_slist *to_info;
+ struct curl_certinfo *to_certinfo;
+ } ptr;
- res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
+ ptr.to_info = NULL;
- if(!res && ci) {
+ res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ptr.to_info);
+
+ if(!res && ptr.to_info) {
int i;
- printf("%d certs!\n", ci->num_of_certs);
- for(i=0; i<ci->num_of_certs; i++) {
+ printf("%d certs!\n", ptr.to_certinfo->num_of_certs);
+
+ for(i = 0; i < ptr.to_certinfo->num_of_certs; i++) {
struct curl_slist *slist;
- for(slist = ci->certinfo[i]; slist; slist = slist->next)
+ for(slist = ptr.to_certinfo->certinfo[i]; slist; slist = slist->next)
printf("%s\n", slist->data);
}
@@ -52,7 +77,6 @@
}
-
curl_easy_cleanup(curl);
}
diff --git a/docs/examples/chkspeed.c b/docs/examples/chkspeed.c
index d802469..31949b8 100644
--- a/docs/examples/chkspeed.c
+++ b/docs/examples/chkspeed.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Example source code to show how the callback function can be used to
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
* download data into a chunk of memory instead of storing it in a file.
* After successful download we use curl_easy_getinfo() calls to get the
* amount of downloaded bytes, the time used for the whole download, and
@@ -22,8 +35,6 @@
#include <time.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
#define URL_BASE "http://speedtest.your.domain/"
#define URL_1M URL_BASE "file_1M.bin"
@@ -49,7 +60,7 @@
{
CURL *curl_handle;
CURLcode res;
- int prtsep = 0, prttime = 0;
+ int prtall = 0, prtsep = 0, prttime = 0;
const char *url = URL_1M;
char *appname = argv[0];
@@ -66,12 +77,14 @@
fprintf(stderr, "\r%s %s - %s\n",
appname, CHKSPEED_VERSION, curl_version());
exit(1);
+ } else if (strncasecmp(*argv, "-A", 2) == 0) {
+ prtall = 1;
} else if (strncasecmp(*argv, "-X", 2) == 0) {
prtsep = 1;
} else if (strncasecmp(*argv, "-T", 2) == 0) {
prttime = 1;
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
- int m = atoi(*argv + 3);
+ long m = strtol((*argv)+3, NULL, 10);
switch(m) {
case 1: url = URL_1M;
break;
@@ -150,6 +163,18 @@
if((CURLE_OK == res) && (val>0))
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
+ if (prtall) {
+ /* check for name resolution time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_NAMELOOKUP_TIME, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Name lookup time: %0.3f sec.\n", val);
+
+ /* check for connect time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_CONNECT_TIME, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Connect time: %0.3f sec.\n", val);
+ }
+
} else {
fprintf(stderr, "Error while fetching '%s' : %s\n",
url, curl_easy_strerror(res));
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index 9f1e629..28ee781 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * This example shows usage of simple cookie interface.
- */
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 example shows usage of simple cookie interface. */
#include <stdio.h>
#include <string.h>
@@ -76,14 +89,19 @@
#endif
/* Netscape format cookie */
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
- ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
+ ".google.com", "TRUE", "/", "FALSE", (unsigned long)time(NULL) + 31337UL, "PREF", "hello google, i like you very much!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if (res != CURLE_OK) {
fprintf(stderr, "Curl curl_easy_setopt failed: %s\n", curl_easy_strerror(res));
return 1;
}
- /* HTTP-header style cookie */
+ /* HTTP-header style cookie. If you use the Set-Cookie format and don't
+ specify a domain then the cookie is sent for any domain and will not be
+ modified, likely not what you intended. Starting in 7.43.0 any-domain
+ cookies will not be exported either. For more information refer to the
+ CURLOPT_COOKIELIST documentation.
+ */
snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c
index 2c44280..8cb9914 100644
--- a/docs/examples/curlgtk.c
+++ b/docs/examples/curlgtk.c
@@ -13,8 +13,6 @@
#include <gtk/gtk.h>
#include <curl/curl.h>
-#include <curl/types.h> /* new for v7 */
-#include <curl/easy.h> /* new for v7 */
GtkWidget *Bar;
diff --git a/docs/examples/curlx.c b/docs/examples/curlx.c
index 62bdfe4..c68cf0d 100644
--- a/docs/examples/curlx.c
+++ b/docs/examples/curlx.c
@@ -239,8 +239,7 @@
SSL_CTX_set_cipher_list(ctx,"RC4-MD5");
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
- X509_STORE_add_cert(ctx->cert_store,sk_X509_value(p->ca,
- sk_X509_num(p->ca)-1));
+ X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), sk_X509_value(p->ca, sk_X509_num(p->ca)-1));
SSL_CTX_set_verify_depth(ctx,2);
@@ -491,7 +490,7 @@
BIO_printf(p.errorbio,"the response has a correct mimetype : %s\n",
response);
else
- BIO_printf(p.errorbio,"the reponse doesn\'t has an acceptable "
+ BIO_printf(p.errorbio,"the response doesn\'t have an acceptable "
"mime type, it is %s instead of %s\n",
response,mimetypeaccept);
}
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index cc68481..36dd80d 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
@@ -28,12 +40,12 @@
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
@@ -118,8 +130,15 @@
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c
index 6cdccf8..e03801d 100644
--- a/docs/examples/evhiperfifo.c
+++ b/docs/examples/evhiperfifo.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * Example application source code using the multi socket interface to
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
* download many files at once.
*
* This example features the same basic functionality as hiperfifo.c does,
@@ -120,7 +133,6 @@
const char *s;
switch ( code )
{
- case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
@@ -323,7 +335,7 @@
conn->url = strdup(url);
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
- curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
@@ -367,7 +379,7 @@
{
struct stat st;
static const char *fifo = "hiper.fifo";
- int sockfd;
+ curl_socket_t sockfd;
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
if ( lstat (fifo, &st) == 0 )
diff --git a/docs/examples/externalsocket.c b/docs/examples/externalsocket.c
new file mode 100644
index 0000000..5486d12
--- /dev/null
+++ b/docs/examples/externalsocket.c
@@ -0,0 +1,153 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 example demonstrating how an application can pass in a custom
+ * socket to libcurl to use. This example also handles the connect itself.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <curl/curl.h>
+
+#ifdef WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define close closesocket
+#else
+#include <sys/types.h> /* socket types */
+#include <sys/socket.h> /* socket definitions */
+#include <netinet/in.h>
+#include <arpa/inet.h> /* inet (3) funtions */
+#include <unistd.h> /* misc. Unix functions */
+#endif
+
+#include <errno.h>
+
+/* The IP address and port number to connect to */
+#define IPADDR "127.0.0.1"
+#define PORTNUM 80
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ int written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+static curl_socket_t opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address)
+{
+ curl_socket_t sockfd;
+ (void)purpose;
+ (void)address;
+ sockfd = *(curl_socket_t *)clientp;
+ /* the actual externally set socket is passed in via the OPENSOCKETDATA
+ option */
+ return sockfd;
+}
+
+static int sockopt_callback(void *clientp, curl_socket_t curlfd,
+ curlsocktype purpose)
+{
+ (void)clientp;
+ (void)curlfd;
+ (void)purpose;
+ /* This return code was added in libcurl 7.21.5 */
+ return CURL_SOCKOPT_ALREADY_CONNECTED;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct sockaddr_in servaddr; /* socket address structure */
+ curl_socket_t sockfd;
+
+#ifdef WIN32
+ WSADATA wsaData;
+ int initwsa;
+
+ if((initwsa = WSAStartup(MAKEWORD(2,0), &wsaData)) != 0) {
+ printf("WSAStartup failed: %d\n", initwsa);
+ return 1;
+ }
+#endif
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * Note that libcurl will internally think that you connect to the host
+ * and port that you specify in the URL option.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999");
+
+ /* Create the socket "manually" */
+ if( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == CURL_SOCKET_BAD ) {
+ printf("Error creating listening socket.\n");
+ return 3;
+ }
+
+ memset(&servaddr, 0, sizeof(servaddr));
+ servaddr.sin_family = AF_INET;
+ servaddr.sin_port = htons(PORTNUM);
+
+ if (INADDR_NONE == (servaddr.sin_addr.s_addr = inet_addr(IPADDR)))
+ return 2;
+
+ if(connect(sockfd,(struct sockaddr *) &servaddr, sizeof(servaddr)) ==
+ -1) {
+ close(sockfd);
+ printf("client error: connect: %s\n", strerror(errno));
+ return 1;
+ }
+
+ /* no progress meter please */
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* call this function to get a socket */
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
+
+ /* call this function to set options for the socket */
+ curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+
+ res = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ if(res) {
+ printf("libcurl error: %d\n", res);
+ return 4;
+ }
+ }
+ return 0;
+}
diff --git a/docs/examples/fileupload.c b/docs/examples/fileupload.c
index cdec751..665eca0 100644
--- a/docs/examples/fileupload.c
+++ b/docs/examples/fileupload.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
#include <sys/stat.h>
@@ -52,14 +64,21 @@
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
- /* now extract transfer info */
- curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
- curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
+ }
+ else {
+ /* now extract transfer info */
+ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
- fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
- speed_upload, total_time);
+ fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
+ speed_upload, total_time);
+ }
/* always cleanup */
curl_easy_cleanup(curl);
}
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index 1310993..0aad0ab 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -53,20 +53,24 @@
#include <curl/curl.h>
-enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
+enum fcurl_type_e {
+ CFTYPE_NONE=0,
+ CFTYPE_FILE=1,
+ CFTYPE_CURL=2
+};
struct fcurl_data
{
- enum fcurl_type_e type; /* type of handle */
- union {
- CURL *curl;
- FILE *file;
- } handle; /* handle */
+ enum fcurl_type_e type; /* type of handle */
+ union {
+ CURL *curl;
+ FILE *file;
+ } handle; /* handle */
- char *buffer; /* buffer to store cached data*/
- int buffer_len; /* currently allocated buffers length */
- int buffer_pos; /* end of data in buffer*/
- int still_running; /* Is background url fetch still in progress */
+ char *buffer; /* buffer to store cached data*/
+ size_t buffer_len; /* currently allocated buffers length */
+ size_t buffer_pos; /* end of data in buffer*/
+ int still_running; /* Is background url fetch still in progress */
};
typedef struct fcurl_data URL_FILE;
@@ -76,498 +80,463 @@
int url_fclose(URL_FILE *file);
int url_feof(URL_FILE *file);
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
-char * url_fgets(char *ptr, int size, URL_FILE *file);
+char * url_fgets(char *ptr, size_t size, URL_FILE *file);
void url_rewind(URL_FILE *file);
/* we use a global one for convenience */
CURLM *multi_handle;
/* curl calls this routine to get more data */
-static size_t
-write_callback(char *buffer,
- size_t size,
- size_t nitems,
- void *userp)
+static size_t write_callback(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *userp)
{
- char *newbuff;
- int rembuff;
+ char *newbuff;
+ size_t rembuff;
- URL_FILE *url = (URL_FILE *)userp;
- size *= nitems;
+ URL_FILE *url = (URL_FILE *)userp;
+ size *= nitems;
- rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
+ rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
- if(size > rembuff)
- {
- /* not enough space in buffer */
- newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
- if(newbuff==NULL)
- {
- fprintf(stderr,"callback buffer grow failed\n");
- size=rembuff;
- }
- else
- {
- /* realloc suceeded increase buffer size*/
- url->buffer_len+=size - rembuff;
- url->buffer=newbuff;
-
- /*printf("Callback buffer grown to %d bytes\n",url->buffer_len);*/
- }
+ if(size > rembuff) {
+ /* not enough space in buffer */
+ newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
+ if(newbuff==NULL) {
+ fprintf(stderr,"callback buffer grow failed\n");
+ size=rembuff;
}
+ else {
+ /* realloc succeeded increase buffer size*/
+ url->buffer_len+=size - rembuff;
+ url->buffer=newbuff;
+ }
+ }
- memcpy(&url->buffer[url->buffer_pos], buffer, size);
- url->buffer_pos += size;
+ memcpy(&url->buffer[url->buffer_pos], buffer, size);
+ url->buffer_pos += size;
- /*fprintf(stderr, "callback %d size bytes\n", size);*/
-
- return size;
+ return size;
}
/* use to attempt to fill the read buffer up to requested number of bytes */
-static int
-fill_buffer(URL_FILE *file,int want,int waittime)
+static int fill_buffer(URL_FILE *file, size_t want)
{
- fd_set fdread;
- fd_set fdwrite;
- fd_set fdexcep;
- struct timeval timeout;
- int rc;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ struct timeval timeout;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
- /* only attempt to fill buffer if transactions still running and buffer
- * doesnt exceed required size already
- */
- if((!file->still_running) || (file->buffer_pos > want))
- return 0;
+ /* only attempt to fill buffer if transactions still running and buffer
+ * doesn't exceed required size already
+ */
+ if((!file->still_running) || (file->buffer_pos > want))
+ return 0;
- /* attempt to fill buffer */
- do
+ /* attempt to fill buffer */
+ do {
+ int maxfd = -1;
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to fail on */
+ timeout.tv_sec = 60; /* 1 minute */
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
{
- int maxfd = -1;
- long curl_timeo = -1;
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
- FD_ZERO(&fdexcep);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
- /* set a suitable timeout to fail on */
- timeout.tv_sec = 60; /* 1 minute */
- timeout.tv_usec = 0;
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
- curl_multi_timeout(multi_handle, &curl_timeo);
- if(curl_timeo >= 0) {
- timeout.tv_sec = curl_timeo / 1000;
- if(timeout.tv_sec > 1)
- timeout.tv_sec = 1;
- else
- timeout.tv_usec = (curl_timeo % 1000) * 1000;
- }
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
- /* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially
- in case of (maxfd == -1), we call select(0, ...), which is basically
- equal to sleep. */
-
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-
- switch(rc) {
- case -1:
- /* select error */
- break;
-
- case 0:
- break;
-
- default:
- /* timeout or readable/writable sockets */
- curl_multi_perform(multi_handle, &file->still_running);
- break;
- }
- } while(file->still_running && (file->buffer_pos < want));
- return 1;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &file->still_running);
+ break;
+ }
+ } while(file->still_running && (file->buffer_pos < want));
+ return 1;
}
/* use to remove want bytes from the front of a files buffer */
-static int
-use_buffer(URL_FILE *file,int want)
+static int use_buffer(URL_FILE *file, size_t want)
{
- /* sort out buffer */
- if((file->buffer_pos - want) <=0)
- {
- /* ditch buffer - write will recreate */
- if(file->buffer)
- free(file->buffer);
+ /* sort out buffer */
+ if((file->buffer_pos - want) <=0) {
+ /* ditch buffer - write will recreate */
+ free(file->buffer);
+ file->buffer=NULL;
+ file->buffer_pos=0;
+ file->buffer_len=0;
+ }
+ else {
+ /* move rest down make it available for later */
+ memmove(file->buffer,
+ &file->buffer[want],
+ (file->buffer_pos - want));
- file->buffer=NULL;
- file->buffer_pos=0;
- file->buffer_len=0;
- }
- else
- {
- /* move rest down make it available for later */
- memmove(file->buffer,
- &file->buffer[want],
- (file->buffer_pos - want));
-
- file->buffer_pos -= want;
- }
- return 0;
+ file->buffer_pos -= want;
+ }
+ return 0;
}
-
-
-URL_FILE *
-url_fopen(const char *url,const char *operation)
+URL_FILE *url_fopen(const char *url,const char *operation)
{
- /* this code could check for URLs or types in the 'url' and
- basicly use the real fopen() for standard files */
+ /* this code could check for URLs or types in the 'url' and
+ basically use the real fopen() for standard files */
- URL_FILE *file;
- (void)operation;
+ URL_FILE *file;
+ (void)operation;
- file = malloc(sizeof(URL_FILE));
- if(!file)
- return NULL;
+ file = malloc(sizeof(URL_FILE));
+ if(!file)
+ return NULL;
- memset(file, 0, sizeof(URL_FILE));
+ memset(file, 0, sizeof(URL_FILE));
- if((file->handle.file=fopen(url,operation)))
- {
- file->type = CFTYPE_FILE; /* marked as URL */
+ if((file->handle.file=fopen(url,operation)))
+ file->type = CFTYPE_FILE; /* marked as URL */
+
+ else {
+ file->type = CFTYPE_CURL; /* marked as URL */
+ file->handle.curl = curl_easy_init();
+
+ curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
+ curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
+
+ if(!multi_handle)
+ multi_handle = curl_multi_init();
+
+ curl_multi_add_handle(multi_handle, file->handle.curl);
+
+ /* lets start the fetch */
+ curl_multi_perform(multi_handle, &file->still_running);
+
+ if((file->buffer_pos == 0) && (!file->still_running)) {
+ /* if still_running is 0 now, we should return NULL */
+
+ /* make sure the easy handle is not in the multi handle anymore */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
+
+ /* cleanup */
+ curl_easy_cleanup(file->handle.curl);
+
+ free(file);
+
+ file = NULL;
}
- else
- {
- file->type = CFTYPE_CURL; /* marked as URL */
- file->handle.curl = curl_easy_init();
-
- curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
- curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
- curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L);
- curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
-
- if(!multi_handle)
- multi_handle = curl_multi_init();
-
- curl_multi_add_handle(multi_handle, file->handle.curl);
-
- /* lets start the fetch */
- curl_multi_perform(multi_handle, &file->still_running);
-
- if((file->buffer_pos == 0) && (!file->still_running))
- {
- /* if still_running is 0 now, we should return NULL */
-
- /* make sure the easy handle is not in the multi handle anymore */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
-
- /* cleanup */
- curl_easy_cleanup(file->handle.curl);
-
- free(file);
-
- file = NULL;
- }
- }
- return file;
+ }
+ return file;
}
-int
-url_fclose(URL_FILE *file)
+int url_fclose(URL_FILE *file)
{
- int ret=0;/* default is good return */
+ int ret=0;/* default is good return */
- switch(file->type)
- {
- case CFTYPE_FILE:
- ret=fclose(file->handle.file); /* passthrough */
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ret=fclose(file->handle.file); /* passthrough */
+ break;
- case CFTYPE_CURL:
- /* make sure the easy handle is not in the multi handle anymore */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
+ case CFTYPE_CURL:
+ /* make sure the easy handle is not in the multi handle anymore */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
- /* cleanup */
- curl_easy_cleanup(file->handle.curl);
- break;
+ /* cleanup */
+ curl_easy_cleanup(file->handle.curl);
+ break;
- default: /* unknown or supported type - oh dear */
- ret=EOF;
- errno=EBADF;
- break;
+ default: /* unknown or supported type - oh dear */
+ ret=EOF;
+ errno=EBADF;
+ break;
+ }
- }
+ free(file->buffer);/* free any allocated buffer space */
+ free(file);
- if(file->buffer)
- free(file->buffer);/* free any allocated buffer space */
-
- free(file);
-
- return ret;
+ return ret;
}
-int
-url_feof(URL_FILE *file)
+int url_feof(URL_FILE *file)
{
- int ret=0;
+ int ret=0;
- switch(file->type)
- {
- case CFTYPE_FILE:
- ret=feof(file->handle.file);
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ret=feof(file->handle.file);
+ break;
- case CFTYPE_CURL:
- if((file->buffer_pos == 0) && (!file->still_running))
- ret = 1;
- break;
- default: /* unknown or supported type - oh dear */
- ret=-1;
- errno=EBADF;
- break;
- }
- return ret;
+ case CFTYPE_CURL:
+ if((file->buffer_pos == 0) && (!file->still_running))
+ ret = 1;
+ break;
+
+ default: /* unknown or supported type - oh dear */
+ ret=-1;
+ errno=EBADF;
+ break;
+ }
+ return ret;
}
-size_t
-url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
+size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
{
- size_t want;
+ size_t want;
- switch(file->type)
- {
- case CFTYPE_FILE:
- want=fread(ptr,size,nmemb,file->handle.file);
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ want=fread(ptr,size,nmemb,file->handle.file);
+ break;
- case CFTYPE_CURL:
- want = nmemb * size;
+ case CFTYPE_CURL:
+ want = nmemb * size;
- fill_buffer(file,want,1);
+ fill_buffer(file,want);
- /* check if theres data in the buffer - if not fill_buffer()
- * either errored or EOF */
- if(!file->buffer_pos)
- return 0;
+ /* check if theres data in the buffer - if not fill_buffer()
+ * either errored or EOF */
+ if(!file->buffer_pos)
+ return 0;
- /* ensure only available data is considered */
- if(file->buffer_pos < want)
- want = file->buffer_pos;
+ /* ensure only available data is considered */
+ if(file->buffer_pos < want)
+ want = file->buffer_pos;
- /* xfer data to caller */
- memcpy(ptr, file->buffer, want);
+ /* xfer data to caller */
+ memcpy(ptr, file->buffer, want);
- use_buffer(file,want);
+ use_buffer(file,want);
- want = want / size; /* number of items - nb correct op - checked
- * with glibc code*/
+ want = want / size; /* number of items */
+ break;
- /*printf("(fread) return %d bytes %d left\n", want,file->buffer_pos);*/
- break;
+ default: /* unknown or supported type - oh dear */
+ want=0;
+ errno=EBADF;
+ break;
- default: /* unknown or supported type - oh dear */
- want=0;
- errno=EBADF;
- break;
-
- }
- return want;
+ }
+ return want;
}
-char *
-url_fgets(char *ptr, int size, URL_FILE *file)
+char *url_fgets(char *ptr, size_t size, URL_FILE *file)
{
- int want = size - 1;/* always need to leave room for zero termination */
- int loop;
+ size_t want = size - 1;/* always need to leave room for zero termination */
+ size_t loop;
- switch(file->type)
- {
- case CFTYPE_FILE:
- ptr = fgets(ptr,size,file->handle.file);
+ switch(file->type) {
+ case CFTYPE_FILE:
+ ptr = fgets(ptr, (int)size, file->handle.file);
+ break;
+
+ case CFTYPE_CURL:
+ fill_buffer(file,want);
+
+ /* check if theres data in the buffer - if not fill either errored or
+ * EOF */
+ if(!file->buffer_pos)
+ return NULL;
+
+ /* ensure only available data is considered */
+ if(file->buffer_pos < want)
+ want = file->buffer_pos;
+
+ /*buffer contains data */
+ /* look for newline or eof */
+ for(loop=0;loop < want;loop++) {
+ if(file->buffer[loop] == '\n') {
+ want=loop+1;/* include newline */
break;
-
- case CFTYPE_CURL:
- fill_buffer(file,want,1);
-
- /* check if theres data in the buffer - if not fill either errored or
- * EOF */
- if(!file->buffer_pos)
- return NULL;
-
- /* ensure only available data is considered */
- if(file->buffer_pos < want)
- want = file->buffer_pos;
-
- /*buffer contains data */
- /* look for newline or eof */
- for(loop=0;loop < want;loop++)
- {
- if(file->buffer[loop] == '\n')
- {
- want=loop+1;/* include newline */
- break;
- }
- }
-
- /* xfer data to caller */
- memcpy(ptr, file->buffer, want);
- ptr[want]=0;/* allways null terminate */
-
- use_buffer(file,want);
-
- /*printf("(fgets) return %d bytes %d left\n", want,file->buffer_pos);*/
- break;
-
- default: /* unknown or supported type - oh dear */
- ptr=NULL;
- errno=EBADF;
- break;
+ }
}
- return ptr;/*success */
+ /* xfer data to caller */
+ memcpy(ptr, file->buffer, want);
+ ptr[want]=0;/* allways null terminate */
+
+ use_buffer(file,want);
+
+ break;
+
+ default: /* unknown or supported type - oh dear */
+ ptr=NULL;
+ errno=EBADF;
+ break;
+ }
+
+ return ptr;/*success */
}
-void
-url_rewind(URL_FILE *file)
+void url_rewind(URL_FILE *file)
{
- switch(file->type)
- {
- case CFTYPE_FILE:
- rewind(file->handle.file); /* passthrough */
- break;
+ switch(file->type) {
+ case CFTYPE_FILE:
+ rewind(file->handle.file); /* passthrough */
+ break;
- case CFTYPE_CURL:
- /* halt transaction */
- curl_multi_remove_handle(multi_handle, file->handle.curl);
+ case CFTYPE_CURL:
+ /* halt transaction */
+ curl_multi_remove_handle(multi_handle, file->handle.curl);
- /* restart */
- curl_multi_add_handle(multi_handle, file->handle.curl);
+ /* restart */
+ curl_multi_add_handle(multi_handle, file->handle.curl);
- /* ditch buffer - write will recreate - resets stream pos*/
- if(file->buffer)
- free(file->buffer);
+ /* ditch buffer - write will recreate - resets stream pos*/
+ free(file->buffer);
+ file->buffer=NULL;
+ file->buffer_pos=0;
+ file->buffer_len=0;
- file->buffer=NULL;
- file->buffer_pos=0;
- file->buffer_len=0;
+ break;
- break;
-
- default: /* unknown or supported type - oh dear */
- break;
-
- }
-
+ default: /* unknown or supported type - oh dear */
+ break;
+ }
}
-
/* Small main program to retrive from a url using fgets and fread saving the
* output to two test files (note the fgets method will corrupt binary files if
* they contain 0 chars */
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
- URL_FILE *handle;
- FILE *outf;
+ URL_FILE *handle;
+ FILE *outf;
- int nread;
- char buffer[256];
- const char *url;
+ size_t nread;
+ char buffer[256];
+ const char *url;
- if(argc < 2)
- {
- url="http://192.168.7.3/testfile";/* default to testurl */
- }
- else
- {
- url=argv[1];/* use passed url */
- }
+ if(argc < 2)
+ url="http://192.168.7.3/testfile";/* default to testurl */
+ else
+ url=argv[1];/* use passed url */
- /* copy from url line by line with fgets */
- outf=fopen("fgets.test","w+");
- if(!outf)
- {
- perror("couldn't open fgets output file\n");
- return 1;
- }
+ /* copy from url line by line with fgets */
+ outf=fopen("fgets.test","w+");
+ if(!outf) {
+ perror("couldn't open fgets output file\n");
+ return 1;
+ }
- handle = url_fopen(url, "r");
- if(!handle)
- {
- printf("couldn't url_fopen() %s\n", url);
- fclose(outf);
- return 2;
- }
-
- while(!url_feof(handle))
- {
- url_fgets(buffer,sizeof(buffer),handle);
- fwrite(buffer,1,strlen(buffer),outf);
- }
-
- url_fclose(handle);
-
+ handle = url_fopen(url, "r");
+ if(!handle) {
+ printf("couldn't url_fopen() %s\n", url);
fclose(outf);
+ return 2;
+ }
+
+ while(!url_feof(handle)) {
+ url_fgets(buffer,sizeof(buffer),handle);
+ fwrite(buffer,1,strlen(buffer),outf);
+ }
+
+ url_fclose(handle);
+
+ fclose(outf);
- /* Copy from url with fread */
- outf=fopen("fread.test","w+");
- if(!outf)
- {
- perror("couldn't open fread output file\n");
- return 1;
- }
+ /* Copy from url with fread */
+ outf=fopen("fread.test","w+");
+ if(!outf) {
+ perror("couldn't open fread output file\n");
+ return 1;
+ }
- handle = url_fopen("testfile", "r");
- if(!handle) {
- printf("couldn't url_fopen() testfile\n");
- fclose(outf);
- return 2;
- }
-
- do {
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
- } while(nread);
-
- url_fclose(handle);
-
+ handle = url_fopen("testfile", "r");
+ if(!handle) {
+ printf("couldn't url_fopen() testfile\n");
fclose(outf);
+ return 2;
+ }
+
+ do {
+ nread = url_fread(buffer, 1, sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
+ } while(nread);
+
+ url_fclose(handle);
+
+ fclose(outf);
- /* Test rewind */
- outf=fopen("rewind.test","w+");
- if(!outf)
- {
- perror("couldn't open fread output file\n");
- return 1;
- }
+ /* Test rewind */
+ outf=fopen("rewind.test","w+");
+ if(!outf) {
+ perror("couldn't open fread output file\n");
+ return 1;
+ }
- handle = url_fopen("testfile", "r");
- if(!handle) {
- printf("couldn't url_fopen() testfile\n");
- fclose(outf);
- return 2;
- }
-
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
- url_rewind(handle);
-
- buffer[0]='\n';
- fwrite(buffer,1,1,outf);
-
- nread = url_fread(buffer, 1,sizeof(buffer), handle);
- fwrite(buffer,1,nread,outf);
-
-
- url_fclose(handle);
-
+ handle = url_fopen("testfile", "r");
+ if(!handle) {
+ printf("couldn't url_fopen() testfile\n");
fclose(outf);
+ return 2;
+ }
+
+ nread = url_fread(buffer, 1,sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
+ url_rewind(handle);
+
+ buffer[0]='\n';
+ fwrite(buffer,1,1,outf);
+
+ nread = url_fread(buffer, 1,sizeof(buffer), handle);
+ fwrite(buffer,1,nread,outf);
- return 0;/* all done */
+ url_fclose(handle);
+
+ fclose(outf);
+
+
+ return 0;/* all done */
}
diff --git a/docs/examples/ftp-wildcard.c b/docs/examples/ftp-wildcard.c
index 0186a38..d175ddf 100644
--- a/docs/examples/ftp-wildcard.c
+++ b/docs/examples/ftp-wildcard.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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/curl.h>
#include <stdio.h>
@@ -14,14 +26,14 @@
FILE *output;
};
-static long file_is_comming(struct curl_fileinfo *finfo,
- struct callback_data *data,
- int remains);
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains);
static long file_is_downloaded(struct callback_data *data);
static size_t write_it(char *buff, size_t size, size_t nmemb,
- struct callback_data *data);
+ void *cb_data);
int main(int argc, char **argv)
{
@@ -49,7 +61,7 @@
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
/* callback is called before download of concrete file started */
- curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
+ curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming);
/* callback is called after data from the file have been transferred */
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
@@ -77,9 +89,9 @@
return rc;
}
-static long file_is_comming(struct curl_fileinfo *finfo,
- struct callback_data *data,
- int remains)
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains)
{
printf("%3d %40s %10luB ", remains, finfo->filename,
(unsigned long)finfo->size);
@@ -123,8 +135,9 @@
}
static size_t write_it(char *buff, size_t size, size_t nmemb,
- struct callback_data *data)
+ void *cb_data)
{
+ struct callback_data *data = cb_data;
size_t written = 0;
if(data->output)
written = fwrite(buff, size, nmemb, data->output);
diff --git a/docs/examples/ftpget.c b/docs/examples/ftpget.c
index 3c3888a..285283f 100644
--- a/docs/examples/ftpget.c
+++ b/docs/examples/ftpget.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* This is an example showing how to get a single file from an FTP server.
@@ -43,7 +53,7 @@
CURL *curl;
CURLcode res;
struct FtpFile ftpfile={
- "curl.tar.gz", /* name to store the file as if succesful */
+ "curl.tar.gz", /* name to store the file as if successful */
NULL
};
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c
index c4e234f..dfdcf78 100644
--- a/docs/examples/ftpgetinfo.c
+++ b/docs/examples/ftpgetinfo.c
@@ -1,18 +1,28 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <string.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* This is an example showing how to check a single file's size and mtime
@@ -21,6 +31,8 @@
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
{
+ (void)ptr;
+ (void)data;
/* we are not interested in the headers itself,
so we only return the size we would have saved ... */
return (size_t)(size * nmemb);
@@ -31,8 +43,8 @@
char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
CURL *curl;
CURLcode res;
- const time_t filetime;
- const double filesize;
+ long filetime = -1;
+ double filesize = 0.0;
const char *filename = strrchr(ftpurl, '/') + 1;
curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -55,10 +67,12 @@
if(CURLE_OK == res) {
/* http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
- if((CURLE_OK == res) && filetime)
- printf("filetime %s: %s", filename, ctime(&filetime));
+ if((CURLE_OK == res) && (filetime >= 0)) {
+ time_t file_time = (time_t)filetime;
+ printf("filetime %s: %s", filename, ctime(&file_time));
+ }
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
- if((CURLE_OK == res) && filesize)
+ if((CURLE_OK == res) && (filesize>0.0))
printf("filesize %s: %0.0f bytes\n", filename, filesize);
} else {
/* we failed */
diff --git a/docs/examples/ftpgetresp.c b/docs/examples/ftpgetresp.c
index 2122c4f..dcb296a 100644
--- a/docs/examples/ftpgetresp.c
+++ b/docs/examples/ftpgetresp.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
/*
* Similar to ftpget.c but this also stores the received response-lines
@@ -27,7 +37,7 @@
return fwrite(ptr, size, nmemb, writehere);
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -48,8 +58,12 @@
/* If you intend to use this on windows with a libcurl DLL, you must use
CURLOPT_WRITEFUNCTION as well */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/ftpsget.c b/docs/examples/ftpsget.c
new file mode 100644
index 0000000..dae4534
--- /dev/null
+++ b/docs/examples/ftpsget.c
@@ -0,0 +1,101 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+
+#include <curl/curl.h>
+
+/*
+ * This is an example showing how to get a single file from an FTPS server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out=(struct FtpFile *)stream;
+ if(out && !out->stream) {
+ /* open file for writing */
+ out->stream=fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, can't open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile={
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works! Note that we use an
+ * FTP:// URL with standard explicit FTPS. You can also do FTPS:// URLs if
+ * you want to do the rarer kind of transfers: implicit.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "ftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+ /* We activate SSL and we require it for both control and data */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index f1f66c0..e79f8d8 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <string.h>
@@ -39,16 +51,20 @@
variable's memory when passed in to it from an app like this. */
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
+ curl_off_t nread;
/* in real-world cases, this would probably get this data differently
as this fread() stuff is exactly what the library already would do
by default internally */
size_t retcode = fread(ptr, size, nmemb, stream);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -106,6 +122,10 @@
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* clean up the FTP commands list */
curl_slist_free_all (headerlist);
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c
index 81a790a..55b8986 100644
--- a/docs/examples/ftpuploadresume.c
+++ b/docs/examples/ftpuploadresume.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Upload to FTP, resuming failed transfers
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Upload to FTP, resuming failed transfers
*
* Compile for MinGW like this:
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
@@ -26,7 +39,7 @@
/* The MinGW headers are missing a few Win32 function definitions,
you shouldn't need this if you use VC++ */
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__MINGW64__)
int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
#endif
diff --git a/docs/examples/getinfo.c b/docs/examples/getinfo.c
index 0d8f1f2..acbe1e1 100644
--- a/docs/examples/getinfo.c
+++ b/docs/examples/getinfo.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index 635a936..a1c2140 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, et al.
*
- * Example source code to show how the callback function can be used to
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example source code to show how the callback function can be used to
* download data into a chunk of memory instead of storing it in a file.
*/
@@ -23,19 +36,19 @@
static size_t
-WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
size_t realsize = size * nmemb;
- struct MemoryStruct *mem = (struct MemoryStruct *)data;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
mem->memory = realloc(mem->memory, mem->size + realsize + 1);
- if (mem->memory == NULL) {
+ if(mem->memory == NULL) {
/* out of memory! */
printf("not enough memory (realloc returned NULL)\n");
- exit(EXIT_FAILURE);
+ return 0;
}
- memcpy(&(mem->memory[mem->size]), ptr, realsize);
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
mem->size += realsize;
mem->memory[mem->size] = 0;
@@ -43,9 +56,10 @@
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl_handle;
+ CURLcode res;
struct MemoryStruct chunk;
@@ -71,26 +85,28 @@
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* get it! */
- curl_easy_perform(curl_handle);
+ res = curl_easy_perform(curl_handle);
+
+ /* check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+
+ printf("%lu bytes retrieved\n", (long)chunk.size);
+ }
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
- /*
- * Now, our chunk.memory points to a memory block that is chunk.size
- * bytes big and contains the remote file.
- *
- * Do something nice with it!
- *
- * You should be aware of the fact that at this point we might have an
- * allocated data block, and nothing has yet deallocated that data. So when
- * you're done with it, you should free() it as a nice application.
- */
-
- printf("%lu bytes retrieved\n", chunk.size);
-
- if(chunk.memory)
- free(chunk.memory);
+ free(chunk.memory);
/* we're done with libcurl, so clean it up */
curl_global_cleanup();
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index ac11790..7571ffa 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * Example application source code using the multi socket interface to
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
* download many files at once.
*
* Written by Jeff Pohlmeyer
@@ -91,7 +104,6 @@
if ( CURLM_OK != code ) {
const char *s;
switch (code) {
- case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c
index c909687..84035aa 100644
--- a/docs/examples/hiperfifo.c
+++ b/docs/examples/hiperfifo.c
@@ -1,17 +1,30 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * Example application source code using the multi socket interface to
- * download many files at once.
+ * 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 http://curl.haxx.se/docs/copyright.html.
*
- * Written by Jeff Pohlmeyer
+ * 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.
+ *
+ ***************************************************************************/
+/* Example application source code using the multi socket interface to
+ download many files at once.
-Requires libevent and a (POSIX?) system that has mkfifo().
+Written by Jeff Pohlmeyer
+
+Requires libevent version 2 and a (POSIX?) system that has mkfifo().
This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
sample programs.
@@ -48,7 +61,7 @@
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
-#include <event.h>
+#include <event2/event.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
@@ -58,9 +71,11 @@
/* Global information, common to all connections */
-typedef struct _GlobalInfo {
- struct event fifo_event;
- struct event timer_event;
+typedef struct _GlobalInfo
+{
+ struct event_base *evbase;
+ struct event *fifo_event;
+ struct event *timer_event;
CURLM *multi;
int still_running;
FILE* input;
@@ -68,7 +83,8 @@
/* Information associated with a specific easy handle */
-typedef struct _ConnInfo {
+typedef struct _ConnInfo
+{
CURL *easy;
char *url;
GlobalInfo *global;
@@ -77,12 +93,13 @@
/* Information associated with a specific socket */
-typedef struct _SockInfo {
+typedef struct _SockInfo
+{
curl_socket_t sockfd;
CURL *easy;
int action;
long timeout;
- struct event ev;
+ struct event *ev;
int evset;
GlobalInfo *global;
} SockInfo;
@@ -98,7 +115,7 @@
timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000;
fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
- evtimer_add(&g->timer_event, &timeout);
+ evtimer_add(g->timer_event, &timeout);
return 0;
}
@@ -108,7 +125,6 @@
if ( CURLM_OK != code ) {
const char *s;
switch (code) {
- case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
@@ -173,8 +189,8 @@
check_multi_info(g);
if ( g->still_running <= 0 ) {
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
- if (evtimer_pending(&g->timer_event, NULL)) {
- evtimer_del(&g->timer_event);
+ if (evtimer_pending(g->timer_event, NULL)) {
+ evtimer_del(g->timer_event);
}
}
}
@@ -202,7 +218,7 @@
{
if (f) {
if (f->evset)
- event_del(&f->ev);
+ event_free(f->ev);
free(f);
}
}
@@ -219,16 +235,17 @@
f->action = act;
f->easy = e;
if (f->evset)
- event_del(&f->ev);
- event_set(&f->ev, f->sockfd, kind, event_cb, g);
- f->evset=1;
- event_add(&f->ev, NULL);
+ event_free(f->ev);
+ f->ev = event_new(g->evbase, f->sockfd, kind, event_cb, g);
+ f->evset = 1;
+ event_add(f->ev, NULL);
}
/* Initialize a new SockInfo structure */
-static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) {
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
SockInfo *fdp = calloc(sizeof(SockInfo), 1);
fdp->global = g;
@@ -346,11 +363,11 @@
}
/* Create a named pipe and tell libevent to monitor it */
+static const char *fifo = "hiper.fifo";
static int init_fifo (GlobalInfo *g)
{
struct stat st;
- static const char *fifo = "hiper.fifo";
- int sockfd;
+ curl_socket_t sockfd;
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
if (lstat (fifo, &st) == 0) {
@@ -373,11 +390,18 @@
g->input = fdopen(sockfd, "r");
fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
- event_set(&g->fifo_event, sockfd, EV_READ | EV_PERSIST, fifo_cb, g);
- event_add(&g->fifo_event, NULL);
+ g->fifo_event = event_new(g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb, g);
+ event_add(g->fifo_event, NULL);
return (0);
}
+static void clean_fifo(GlobalInfo *g)
+{
+ event_free(g->fifo_event);
+ fclose(g->input);
+ unlink(fifo);
+}
+
int main(int argc, char **argv)
{
GlobalInfo g;
@@ -385,10 +409,10 @@
(void)argv;
memset(&g, 0, sizeof(GlobalInfo));
- event_init();
+ g.evbase = event_base_new();
init_fifo(&g);
g.multi = curl_multi_init();
- evtimer_set(&g.timer_event, timer_cb, &g);
+ g.timer_event = evtimer_new(g.evbase, timer_cb, &g);
/* setup the generic multi interface options we want */
curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
@@ -399,7 +423,13 @@
/* we don't call any curl_multi_socket*() function yet as we have no handles
added! */
- event_dispatch();
+ event_base_dispatch(g.evbase);
+
+ /* this, of course, won't get called since only way to stop this program is
+ via ctrl-C, but it is here to show how cleanup /would/ be done. */
+ clean_fifo(&g);
+ event_free(g.timer_event);
+ event_base_free(g.evbase);
curl_multi_cleanup(g.multi);
return 0;
}
diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c
new file mode 100644
index 0000000..c11325d
--- /dev/null
+++ b/docs/examples/href_extractor.c
@@ -0,0 +1,86 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012, Daniel Stenberg, <[email protected]>, 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 http://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 example uses the "Streaming HTML parser" to extract the href pieces in
+ * a streaming manner from a downloaded HTML. Kindly donated by Michał
+ * Kowalczyk.
+ *
+ * The parser is found at
+ * http://code.google.com/p/htmlstreamparser/
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+#include <htmlstreamparser.h>
+
+
+static size_t write_callback(void *buffer, size_t size, size_t nmemb,
+ void *hsp)
+{
+ size_t realsize = size * nmemb, p;
+ for (p = 0; p < realsize; p++) {
+ html_parser_char_parse(hsp, ((char *)buffer)[p]);
+ if (html_parser_cmp_tag(hsp, "a", 1))
+ if (html_parser_cmp_attr(hsp, "href", 4))
+ if (html_parser_is_in(hsp, HTML_VALUE_ENDED)) {
+ html_parser_val(hsp)[html_parser_val_length(hsp)] = '\0';
+ printf("%s\n", html_parser_val(hsp));
+ }
+ }
+ return realsize;
+}
+
+int main(int argc, char *argv[])
+{
+ char tag[1], attr[4], val[128];
+ CURL *curl;
+ HTMLSTREAMPARSER *hsp;
+
+ if (argc != 2) {
+ printf("Usage: %s URL\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ curl = curl_easy_init();
+
+ hsp = html_parser_init();
+
+ html_parser_set_tag_to_lower(hsp, 1);
+ html_parser_set_attr_to_lower(hsp, 1);
+ html_parser_set_tag_buffer(hsp, tag, sizeof(tag));
+ html_parser_set_attr_buffer(hsp, attr, sizeof(attr));
+ html_parser_set_val_buffer(hsp, val, sizeof(val)-1);
+
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, hsp);
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ html_parser_cleanup(hsp);
+
+ return EXIT_SUCCESS;
+}
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index 9a46955..a36e331 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Download a document and use libtidy to parse the HTML.
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Download a document and use libtidy to parse the HTML.
* Written by Jeff Pohlmeyer
*
* LibTidy => http://tidy.sourceforge.net
diff --git a/docs/examples/htmltitle.cc b/docs/examples/htmltitle.cpp
similarity index 88%
rename from docs/examples/htmltitle.cc
rename to docs/examples/htmltitle.cpp
index da3354a..ab89bb6 100644
--- a/docs/examples/htmltitle.cc
+++ b/docs/examples/htmltitle.cpp
@@ -1,19 +1,31 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
// Get a web page, parse it with libxml.
//
// Written by Lars Nilsson
//
// GNU C++ compile command line suggestion (edit paths accordingly):
//
-// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cc \
+// g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
// -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
#include <stdio.h>
diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c
index 523177d..f1975b1 100644
--- a/docs/examples/http-post.c
+++ b/docs/examples/http-post.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
@@ -15,6 +27,10 @@
CURL *curl;
CURLcode res;
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. This URL can
@@ -26,9 +42,14 @@
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c
new file mode 100644
index 0000000..3b7ca81
--- /dev/null
+++ b/docs/examples/http2-download.c
@@ -0,0 +1,288 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <stdlib.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we don't enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+#define NUM_HANDLES 1000
+
+void *curl_hnd[NUM_HANDLES];
+int num_transfers;
+
+/* a handle to number lookup, highly ineffective when we do many
+ transfers... */
+static int hnd2num(CURL *hnd)
+{
+ int i;
+ for(i=0; i< num_transfers; i++) {
+ if(curl_hnd[i] == hnd)
+ return i;
+ }
+ return 0; /* weird, but just a fail-safe */
+}
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width=0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
+ num, text, (long)size, (long)size);
+
+ for(i=0; i<size; i+= width) {
+
+ fprintf(stderr, "%4.4lx: ", (long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stderr, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
+ i+=(c+2-width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
+ i+=(c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+ int num = hnd2num(handle);
+ (void)handle; /* prevent compiler warning */
+ (void)userp;
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== %d Info: %s", num, data);
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+static void setup(CURL *hnd, int num)
+{
+ FILE *out;
+ char filename[128];
+
+ sprintf(filename, "dl-%d", num);
+
+ out = fopen(filename, "wb");
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* set the same URL */
+ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
+
+ /* send it verbose for max debuggaility */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+
+ curl_hnd[num] = hnd;
+}
+
+/*
+ * Simply download two files over HTTP/2, using the same physical connection!
+ */
+int main(int argc, char **argv)
+{
+ CURL *easy[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running; /* keep number of running handles */
+
+ if(argc > 1)
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+
+ if(!num_transfers || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i=0; i<num_transfers; i++) {
+ easy[i] = curl_easy_init();
+ /* set options */
+ setup(easy[i], i);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, easy[i]);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(multi_handle, &still_running);
+
+ do {
+ struct timeval timeout;
+ int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+ }
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ for(i=0; i<num_transfers; i++)
+ curl_easy_cleanup(easy[i]);
+
+ return 0;
+}
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
new file mode 100644
index 0000000..bca16c0
--- /dev/null
+++ b/docs/examples/http2-upload.c
@@ -0,0 +1,352 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we don't enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+#define NUM_HANDLES 1000
+
+void *curl_hnd[NUM_HANDLES];
+int num_transfers;
+
+/* a handle to number lookup, highly ineffective when we do many
+ transfers... */
+static int hnd2num(CURL *hnd)
+{
+ int i;
+ for(i=0; i< num_transfers; i++) {
+ if(curl_hnd[i] == hnd)
+ return i;
+ }
+ return 0; /* weird, but just a fail-safe */
+}
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+ unsigned int width=0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
+ num, text, (long)size, (long)size);
+
+ for(i=0; i<size; i+= width) {
+
+ fprintf(stderr, "%4.4lx: ", (long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i+c < size)
+ fprintf(stderr, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i+c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
+ i+=(c+2-width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
+ i+=(c+3-width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ char timebuf[20];
+ const char *text;
+ int num = hnd2num(handle);
+ static time_t epoch_offset;
+ static int known_offset;
+ struct timeval tv;
+ time_t secs;
+ struct tm *now;
+
+ (void)handle; /* prevent compiler warning */
+ (void)userp;
+
+ gettimeofday(&tv, NULL);
+ if(!known_offset) {
+ epoch_offset = time(NULL) - tv.tv_sec;
+ known_offset = 1;
+ }
+ secs = epoch_offset + tv.tv_sec;
+ now = localtime(&secs); /* not thread safe but we don't care */
+ snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
+ now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "%s [%d] Info: %s", timebuf, num, data);
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+struct input {
+ FILE *in;
+ size_t bytes_read; /* count up */
+ CURL *hnd;
+};
+
+static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct input *i = userp;
+ size_t retcode = fread(ptr, size, nmemb, i->in);
+ i->bytes_read += retcode;
+ return retcode;
+}
+
+struct input indata[NUM_HANDLES];
+
+static void setup(CURL *hnd, int num, const char *upload)
+{
+ FILE *out;
+ char url[256];
+ char filename[128];
+ struct stat file_info;
+ curl_off_t uploadsize;
+
+ sprintf(filename, "dl-%d", num);
+ out = fopen(filename, "wb");
+
+ sprintf(url, "https://localhost:8443/upload-%d", num);
+
+ /* get the file size of the local file */
+ stat(upload, &file_info);
+ uploadsize = file_info.st_size;
+
+ indata[num].in = fopen(upload, "rb");
+ indata[num].hnd = hnd;
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback);
+ /* read from this file */
+ curl_easy_setopt(hnd, CURLOPT_READDATA, &indata[num]);
+ /* provide the size of the upload */
+ curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize);
+
+ /* send in the URL to store the upload as */
+ curl_easy_setopt(hnd, CURLOPT_URL, url);
+
+ /* upload please */
+ curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
+
+ /* send it verbose for max debuggaility */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+
+ curl_hnd[num] = hnd;
+}
+
+/*
+ * Upload all files over HTTP/2, using the same physical connection!
+ */
+int main(int argc, char **argv)
+{
+ CURL *easy[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running; /* keep number of running handles */
+ const char *filename = "index.html";
+
+ if(argc > 1)
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+
+ if(argc > 2)
+ /* if given a file name, upload this! */
+ filename = argv[2];
+
+ if(!num_transfers || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i=0; i<num_transfers; i++) {
+ easy[i] = curl_easy_init();
+ /* set options */
+ setup(easy[i], i, filename);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, easy[i]);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ /* We do HTTP/2 so let's stick to one connection per host */
+ curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(multi_handle, &still_running);
+
+ do {
+ struct timeval timeout;
+ int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0:
+ default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+ }
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ for(i=0; i<num_transfers; i++)
+ curl_easy_cleanup(easy[i]);
+
+ return 0;
+}
diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c
index 599b84f..8542ead 100644
--- a/docs/examples/httpcustomheader.c
+++ b/docs/examples/httpcustomheader.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
@@ -19,20 +31,36 @@
if(curl) {
struct curl_slist *chunk = NULL;
- chunk = curl_slist_append(chunk, "Accept: moo");
+ /* Remove a header curl would otherwise add by itself */
+ chunk = curl_slist_append(chunk, "Accept:");
+
+ /* Add a custom header */
chunk = curl_slist_append(chunk, "Another: yes");
- /* request with the built-in Accept: */
+ /* Modify a header curl otherwise adds differently */
+ chunk = curl_slist_append(chunk, "Host: example.com");
+
+ /* Add a header with "blank" contents to the right of the colon. Note that
+ we're then using a semicolon in the string we pass to curl! */
+ chunk = curl_slist_append(chunk, "X-silly-header;");
+
+ /* set our custom set of headers */
+ res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+
curl_easy_setopt(curl, CURLOPT_URL, "localhost");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- res = curl_easy_perform(curl);
- /* redo request with our own custom Accept: */
- res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
+
+ /* free the custom headers */
+ curl_slist_free_all(chunk);
}
return 0;
}
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c
index 821e95f..2e9dc21 100644
--- a/docs/examples/httpput.c
+++ b/docs/examples/httpput.c
@@ -1,17 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <unistd.h>
-
#include <curl/curl.h>
/*
@@ -27,13 +37,17 @@
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
+ curl_off_t nread;
/* in real-world cases, this would probably get this data differently
as this fread() stuff is exactly what the library already would do
by default internally */
retcode = fread(ptr, size, nmemb, stream);
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ nread = (curl_off_t)retcode;
+
+ fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T
+ " bytes from file\n", nread);
return retcode;
}
@@ -43,7 +57,6 @@
CURL *curl;
CURLcode res;
FILE * hd_src ;
- int hd ;
struct stat file_info;
char *file;
@@ -56,9 +69,7 @@
url = argv[2];
/* get the file size of the local file */
- hd = open(file, O_RDONLY) ;
- fstat(hd, &file_info);
- close(hd) ;
+ stat(file, &file_info);
/* get a FILE * of the same file, could also be made with
fdopen() from the previous descriptor, but hey this is just
@@ -94,6 +105,10 @@
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/https.c b/docs/examples/https.c
index 10b5c65..bd9a33b 100644
--- a/docs/examples/https.c
+++ b/docs/examples/https.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
@@ -15,6 +27,8 @@
CURL *curl;
CURLcode res;
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
@@ -33,7 +47,7 @@
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
-#ifdef SKIP_HOSTNAME_VERFICATION
+#ifdef SKIP_HOSTNAME_VERIFICATION
/*
* If the site you're connecting to uses a different host name that what
* they have mentioned in their server certificate's commonName (or
@@ -43,10 +57,18 @@
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
#endif
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+
+ curl_global_cleanup();
+
return 0;
}
diff --git a/docs/examples/imap-append.c b/docs/examples/imap-append.c
new file mode 100644
index 0000000..fa531a8
--- /dev/null
+++ b/docs/examples/imap-append.c
@@ -0,0 +1,116 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+#define FROM "<[email protected]>"
+#define TO "<[email protected]>"
+#define CC "<[email protected]>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <[email protected]>\r\n",
+ "Subject: IMAP example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = payload_text[upload_ctx->lines_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ memcpy(ptr, data, len);
+ upload_ctx->lines_read++;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will create a new message 100. Note that you should perform an
+ * EXAMINE command to obtain the UID of the next message to create and a
+ * SELECT to ensure you are creating the message in the OUTBOX. */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/100");
+
+ /* In this case, we're using a callback function to specify the data. You
+ * could just use the CURLOPT_READDATA option to specify a FILE pointer to
+ * read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Perform the append */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-copy.c b/docs/examples/imap-copy.c
new file mode 100644
index 0000000..fe2d91c
--- /dev/null
+++ b/docs/examples/imap-copy.c
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to copy a mail from one mailbox folder
+ * to another using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is source mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the COPY command specifing the message ID and destination folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "COPY 1 FOLDER");
+
+ /* Note that to perform a move operation you will need to perform the copy,
+ * then mark the original mail as Deleted and EXPUNGE or CLOSE. Please see
+ * imap-store.c for more information on deleting messages. */
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-create.c b/docs/examples/imap-create.c
new file mode 100644
index 0000000..65ddede
--- /dev/null
+++ b/docs/examples/imap-create.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to create a new mailbox folder using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the CREATE command specifing the new folder name */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-delete.c b/docs/examples/imap-delete.c
new file mode 100644
index 0000000..5113be9
--- /dev/null
+++ b/docs/examples/imap-delete.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mailbox folder
+ * using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the DELETE command specifing the existing folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-examine.c b/docs/examples/imap-examine.c
new file mode 100644
index 0000000..a7b41c5
--- /dev/null
+++ b/docs/examples/imap-examine.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain information about a mailbox
+ * folder using libcurl's IMAP capabilities via the EXAMINE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the EXAMINE command specifing the mailbox folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-fetch.c b/docs/examples/imap-fetch.c
new file mode 100644
index 0000000..831d0dc
--- /dev/null
+++ b/docs/examples/imap-fetch.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-list.c b/docs/examples/imap-list.c
new file mode 100644
index 0000000..4223052
--- /dev/null
+++ b/docs/examples/imap-list.c
@@ -0,0 +1,60 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the folders within an IMAP
+ * mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list the folders within the user's mailbox. If you want to
+ * list the folders within a specific folder, for example the inbox, then
+ * specify the folder as a path in the URL such as /INBOX */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Perform the list */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-lsub.c b/docs/examples/imap-lsub.c
new file mode 100644
index 0000000..8960b62
--- /dev/null
+++ b/docs/examples/imap-lsub.c
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the subscribed folders within
+ * an IMAP mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the LSUB command. Note the syntax is very similar to that of a LIST
+ command. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LSUB \"\" *");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-multi.c b/docs/examples/imap-multi.c
new file mode 100644
index 0000000..c7dc130
--- /dev/null
+++ b/docs/examples/imap-multi.c
@@ -0,0 +1,167 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example to demonstrate how to
+ * use libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* Set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/imap-noop.c b/docs/examples/imap-noop.c
new file mode 100644
index 0000000..71a5572
--- /dev/null
+++ b/docs/examples/imap-noop.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-search.c b/docs/examples/imap-search.c
new file mode 100644
index 0000000..0c1d267
--- /dev/null
+++ b/docs/examples/imap-search.c
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to search for new messages using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the SEARCH command specifing what we want to search for. Note that
+ * this can contain a message sequence set and a number of search criteria
+ * keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW,
+ * RECENT and SEEN. For more information about the search criteria please
+ * see RFC-3501 section 6.4.4. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c
new file mode 100644
index 0000000..eec9b0e
--- /dev/null
+++ b/docs/examples/imap-ssl.c
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox. Note the use of
+ * imaps:// rather than imap:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "imaps://imap.example.com/INBOX/;UID=1");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-store.c b/docs/examples/imap-store.c
new file mode 100644
index 0000000..8f5e7d5
--- /dev/null
+++ b/docs/examples/imap-store.c
@@ -0,0 +1,76 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to modify an existing mail using
+ * libcurl's IMAP capabilities with the STORE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the STORE command with the Deleted flag for message 1. Note that
+ * you can use the STORE command to set other flags such as Seen, Answered,
+ * Flagged, Draft and Recent. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ else {
+ /* Set the EXPUNGE command, although you can use the CLOSE command if you
+ * don't want to know the result of the STORE */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE");
+
+ /* Perform the second custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/imap-tls.c b/docs/examples/imap-tls.c
new file mode 100644
index 0000000..c439864
--- /dev/null
+++ b/docs/examples/imap-tls.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/makefile.dj b/docs/examples/makefile.dj
index 8736e6e..c18ef8a 100644
--- a/docs/examples/makefile.dj
+++ b/docs/examples/makefile.dj
@@ -1,6 +1,27 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
#
# Adapted for djgpp / Watt-32 / DOS by
-# Gisle Vanem <[email protected]>
+# Gisle Vanem <[email protected]>
#
TOPDIR = ../..
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index 09b91b7..b825897 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * This is an example application source code using the multi interface.
- */
+ * 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 http://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 example application source code using the multi interface. */
#include <stdio.h>
#include <string.h>
@@ -27,7 +39,7 @@
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
#define FTP_HANDLE 1 /* Index for the FTP transfer */
-int main(int argc, char **argv)
+int main(void)
{
CURL *handles[HANDLECOUNT];
CURLM *multi_handle;
@@ -58,9 +70,10 @@
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -87,30 +100,46 @@
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially in
- case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
/* select error */
break;
- case 0:
- /* timeout, do something else */
- break;
- default:
- /* one or more of curl's file descriptors say there's data to read
- or write */
+ case 0: /* timeout */
+ default: /* action */
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
/* See how the transfers went */
while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 529c3d9..5fb86be 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -1,14 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * This is a very simple example using the multi interface and the debug
- * callback.
- */
+ * 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 http://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 example showing the multi interface and the debug callback. */
#include <stdio.h>
#include <string.h>
@@ -37,12 +48,12 @@
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
+ fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
- fprintf(stream, "%04.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
@@ -79,6 +90,7 @@
{
const char *text;
+ (void)userp;
(void)handle; /* prevent compiler warning */
switch (type) {
@@ -108,7 +120,7 @@
/*
* Simply download a HTTP file.
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURLM *multi_handle;
@@ -132,9 +144,10 @@
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -161,15 +174,35 @@
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially in
- case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
@@ -183,7 +216,7 @@
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 3ea106b..0d8d0de 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -1,14 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * This is a very simple example using the multi interface.
- */
-
+ * 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 http://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 <stdio.h>
#include <string.h>
@@ -22,7 +32,7 @@
/*
* Simply download two HTTP files!
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURL *http_handle2;
@@ -49,9 +59,10 @@
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -78,15 +89,35 @@
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially in
- case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
@@ -98,7 +129,7 @@
curl_multi_perform(multi_handle, &still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index d2daf70..5bfdcfd 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -1,21 +1,33 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * This is an example application source code using the multi interface
- * to do a multipart formpost without "blocking".
- */
+ * 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 http://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 example application source code using the multi interface
+ * to do a multipart formpost without "blocking". */
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <curl/curl.h>
-int main(int argc, char *argv[])
+int main(void)
{
CURL *curl;
@@ -52,7 +64,7 @@
curl = curl_easy_init();
multi_handle = curl_multi_init();
- /* initalize custom header list (stating that Expect: 100-continue is not
+ /* initialize custom header list (stating that Expect: 100-continue is not
wanted */
headerlist = curl_slist_append(headerlist, buf);
if(curl && multi_handle) {
@@ -68,9 +80,10 @@
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
+ do {
struct timeval timeout;
int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
fd_set fdread;
fd_set fdwrite;
@@ -97,22 +110,41 @@
}
/* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially in
- case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
switch(rc) {
case -1:
/* select error */
break;
case 0:
- printf("timeout!\n");
default:
/* timeout or readable/writable sockets */
printf("perform!\n");
@@ -120,7 +152,7 @@
printf("running: %d!\n", still_running);
break;
}
- }
+ } while(still_running);
curl_multi_cleanup(multi_handle);
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index f248afe..a43a9f5 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -1,13 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * This is a very simple example using the multi interface.
- */
+ * 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 http://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 a very simple example using the multi interface. */
#include <stdio.h>
#include <string.h>
@@ -19,15 +31,27 @@
/* curl stuff */
#include <curl/curl.h>
+#ifdef _WIN32
+#define WAITMS(x) Sleep(x)
+#else
+/* Portable sleep for platforms other than Windows. */
+#define WAITMS(x) \
+ struct timeval wait = { 0, (x) * 1000 }; \
+ (void)select(0, NULL, NULL, NULL, &wait);
+#endif
+
/*
* Simply download a HTTP file.
*/
-int main(int argc, char **argv)
+int main(void)
{
CURL *http_handle;
CURLM *multi_handle;
int still_running; /* keep number of running handles */
+ int repeats = 0;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
http_handle = curl_easy_init();
@@ -43,62 +67,43 @@
/* we start some action by calling perform right away */
curl_multi_perform(multi_handle, &still_running);
- while(still_running) {
- struct timeval timeout;
- int rc; /* select() return code */
+ do {
+ CURLMcode mc; /* curl_multi_wait() return code */
+ int numfds;
- fd_set fdread;
- fd_set fdwrite;
- fd_set fdexcep;
- int maxfd = -1;
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
- long curl_timeo = -1;
-
- FD_ZERO(&fdread);
- FD_ZERO(&fdwrite);
- FD_ZERO(&fdexcep);
-
- /* set a suitable timeout to play around with */
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
-
- curl_multi_timeout(multi_handle, &curl_timeo);
- if(curl_timeo >= 0) {
- timeout.tv_sec = curl_timeo / 1000;
- if(timeout.tv_sec > 1)
- timeout.tv_sec = 1;
- else
- timeout.tv_usec = (curl_timeo % 1000) * 1000;
- }
-
- /* get file descriptors from the transfers */
- curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
-
- /* In a real-world program you OF COURSE check the return code of the
- function calls. On success, the value of maxfd is guaranteed to be
- greater or equal than -1. We call select(maxfd + 1, ...), specially in
- case of (maxfd == -1), we call select(0, ...), which is basically equal
- to sleep. */
-
- rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
-
- switch(rc) {
- case -1:
- /* select error */
- still_running = 0;
- printf("select() returns error, this is badness\n");
- break;
- case 0:
- default:
- /* timeout or readable/writable sockets */
- curl_multi_perform(multi_handle, &still_running);
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
break;
}
- }
+
+ /* 'numfds' being zero means either a timeout or no file descriptors to
+ wait for. Try timeout on first occurrence, then assume no file
+ descriptors and no file descriptors to wait for means wait for 100
+ milliseconds. */
+
+ if(!numfds) {
+ repeats++; /* count number of repeated zero numfds */
+ if(repeats > 1) {
+ WAITMS(100); /* sleep 100 milliseconds */
+ }
+ }
+ else
+ repeats = 0;
+
+ curl_multi_perform(multi_handle, &still_running);
+ } while(still_running);
+
+ curl_multi_remove_handle(multi_handle, http_handle);
+
+ curl_easy_cleanup(http_handle);
curl_multi_cleanup(multi_handle);
- curl_easy_cleanup(http_handle);
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/multi-uv.c b/docs/examples/multi-uv.c
new file mode 100644
index 0000000..0c0f8a2
--- /dev/null
+++ b/docs/examples/multi-uv.c
@@ -0,0 +1,230 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+
+/* Example application code using the multi socket interface to download
+ multiple files at once, but instead of using curl_multi_perform and
+ curl_multi_wait, which uses select(), we use libuv.
+ It supports epoll, kqueue, etc. on unixes and fast IO completion ports on
+ Windows, which means, it should be very fast on all platforms..
+
+ Written by Clemens Gruber, based on an outdated example from uvbook and
+ some tests from libuv.
+
+ Requires libuv and (of course) libcurl.
+
+ See http://nikhilm.github.com/uvbook/ for more information on libuv.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <uv.h>
+#include <curl/curl.h>
+
+uv_loop_t *loop;
+CURLM *curl_handle;
+uv_timer_t timeout;
+
+typedef struct curl_context_s {
+ uv_poll_t poll_handle;
+ curl_socket_t sockfd;
+} curl_context_t;
+
+curl_context_t* create_curl_context(curl_socket_t sockfd)
+{
+ curl_context_t *context;
+
+ context = (curl_context_t *) malloc(sizeof *context);
+
+ context->sockfd = sockfd;
+
+ uv_poll_init_socket(loop, &context->poll_handle, sockfd);
+ context->poll_handle.data = context;
+
+ return context;
+}
+
+void curl_close_cb(uv_handle_t *handle)
+{
+ curl_context_t *context = (curl_context_t *) handle->data;
+ free(context);
+}
+
+void destroy_curl_context(curl_context_t *context)
+{
+ uv_close((uv_handle_t *) &context->poll_handle, curl_close_cb);
+}
+
+
+void add_download(const char *url, int num)
+{
+ char filename[50];
+ FILE *file;
+ CURL *handle;
+
+ sprintf(filename, "%d.download", num);
+
+ file = fopen(filename, "w");
+ if(!file) {
+ fprintf(stderr, "Error opening %s\n", filename);
+ return;
+ }
+
+ handle = curl_easy_init();
+ curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(handle, CURLOPT_PRIVATE, file);
+ curl_easy_setopt(handle, CURLOPT_URL, url);
+ curl_multi_add_handle(curl_handle, handle);
+ fprintf(stderr, "Added download %s -> %s\n", url, filename);
+}
+
+static void check_multi_info(void)
+{
+ int running_handles;
+ char *done_url;
+ CURLMsg *message;
+ int pending;
+ FILE *file;
+
+ while((message = curl_multi_info_read(curl_handle, &pending))) {
+ switch(message->msg) {
+ case CURLMSG_DONE:
+ curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL,
+ &done_url);
+ curl_easy_getinfo(message->easy_handle, CURLINFO_PRIVATE, &file);
+ printf("%s DONE\n", done_url);
+
+ curl_multi_remove_handle(curl_handle, message->easy_handle);
+ curl_easy_cleanup(message->easy_handle);
+ if(file) {
+ fclose(file);
+ }
+ break;
+
+ default:
+ fprintf(stderr, "CURLMSG default\n");
+ break;
+ }
+ }
+}
+
+void curl_perform(uv_poll_t *req, int status, int events)
+{
+ int running_handles;
+ int flags = 0;
+ curl_context_t *context;
+ char *done_url;
+ CURLMsg *message;
+ int pending;
+
+ uv_timer_stop(&timeout);
+
+ if(events & UV_READABLE)
+ flags |= CURL_CSELECT_IN;
+ if(events & UV_WRITABLE)
+ flags |= CURL_CSELECT_OUT;
+
+ context = (curl_context_t *) req;
+
+ curl_multi_socket_action(curl_handle, context->sockfd, flags,
+ &running_handles);
+
+ check_multi_info();
+}
+
+void on_timeout(uv_timer_t *req, int status)
+{
+ int running_handles;
+ curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0,
+ &running_handles);
+ check_multi_info();
+}
+
+void start_timeout(CURLM *multi, long timeout_ms, void *userp)
+{
+ if(timeout_ms <= 0)
+ timeout_ms = 1; /* 0 means directly call socket_action, but we'll do it in
+ a bit */
+ uv_timer_start(&timeout, on_timeout, timeout_ms, 0);
+}
+
+int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
+ void *socketp)
+{
+ curl_context_t *curl_context;
+ if(action == CURL_POLL_IN || action == CURL_POLL_OUT) {
+ if(socketp) {
+ curl_context = (curl_context_t *) socketp;
+ }
+ else {
+ curl_context = create_curl_context(s);
+ }
+ curl_multi_assign(curl_handle, s, (void *) curl_context);
+ }
+
+ switch(action) {
+ case CURL_POLL_IN:
+ uv_poll_start(&curl_context->poll_handle, UV_READABLE, curl_perform);
+ break;
+ case CURL_POLL_OUT:
+ uv_poll_start(&curl_context->poll_handle, UV_WRITABLE, curl_perform);
+ break;
+ case CURL_POLL_REMOVE:
+ if(socketp) {
+ uv_poll_stop(&((curl_context_t*)socketp)->poll_handle);
+ destroy_curl_context((curl_context_t*) socketp);
+ curl_multi_assign(curl_handle, s, NULL);
+ }
+ break;
+ default:
+ abort();
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ loop = uv_default_loop();
+
+ if(argc <= 1)
+ return 0;
+
+ if(curl_global_init(CURL_GLOBAL_ALL)) {
+ fprintf(stderr, "Could not init cURL\n");
+ return 1;
+ }
+
+ uv_timer_init(loop, &timeout);
+
+ curl_handle = curl_multi_init();
+ curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
+
+ while(argc-- > 1) {
+ add_download(argv[argc], argc);
+ }
+
+ uv_run(loop, UV_RUN_DEFAULT);
+ curl_multi_cleanup(curl_handle);
+
+ return 0;
+}
diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c
index 5f59a99..831a074 100644
--- a/docs/examples/multithread.c
+++ b/docs/examples/multithread.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
/* A multi-threaded example that uses pthreads extensively to fetch
* X remote files at once */
diff --git a/docs/examples/opensslthreadlock.c b/docs/examples/opensslthreadlock.c
index 706e901..ad54f08 100644
--- a/docs/examples/opensslthreadlock.c
+++ b/docs/examples/opensslthreadlock.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Example source code to show one way to set the necessary OpenSSL locking
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example source code to show one way to set the necessary OpenSSL locking
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
* libcurl built to use OpenSSL.
*
diff --git a/docs/examples/persistant.c b/docs/examples/persistant.c
index 177ada3..0917dfd 100644
--- a/docs/examples/persistant.c
+++ b/docs/examples/persistant.c
@@ -1,17 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <unistd.h>
#include <curl/curl.h>
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl;
CURLcode res;
@@ -25,12 +37,24 @@
/* get the first document */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* get another document from the same server using the same
connection */
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/pop3-dele.c b/docs/examples/pop3-dele.c
new file mode 100644
index 0000000..fab598f
--- /dev/null
+++ b/docs/examples/pop3-dele.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mail using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* You can specify the message either in the URL or DELE command */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Set the DELE command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELE");
+
+ /* Do not perform a transfer as DELE returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-list.c b/docs/examples/pop3-list.c
new file mode 100644
index 0000000..aebcea6
--- /dev/null
+++ b/docs/examples/pop3-list.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list every message of the given mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Perform the list */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-multi.c b/docs/examples/pop3-multi.c
new file mode 100644
index 0000000..6df09a2
--- /dev/null
+++ b/docs/examples/pop3-multi.c
@@ -0,0 +1,167 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example to demonstrate how to use
+ * libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* Set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/pop3-noop.c b/docs/examples/pop3-noop.c
new file mode 100644
index 0000000..4efe671
--- /dev/null
+++ b/docs/examples/pop3-noop.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Do not perform a transfer as NOOP returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-retr.c b/docs/examples/pop3-retr.c
new file mode 100644
index 0000000..b5113fa
--- /dev/null
+++ b/docs/examples/pop3-retr.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c
new file mode 100644
index 0000000..0bbec8d
--- /dev/null
+++ b/docs/examples/pop3-ssl.c
@@ -0,0 +1,85 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox. Note the use of
+ * pop3s:// rather than pop3:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-stat.c b/docs/examples/pop3-stat.c
new file mode 100644
index 0000000..7b318fc
--- /dev/null
+++ b/docs/examples/pop3-stat.c
@@ -0,0 +1,64 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain message statistics using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the STAT command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STAT");
+
+ /* Do not perform a transfer as the data is in the response */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-tls.c b/docs/examples/pop3-tls.c
new file mode 100644
index 0000000..58278a1
--- /dev/null
+++ b/docs/examples/pop3-tls.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STLS command. Be careful of
+ * using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-top.c b/docs/examples/pop3-top.c
new file mode 100644
index 0000000..21cee88
--- /dev/null
+++ b/docs/examples/pop3-top.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve only the headers of a mail
+ * using libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the TOP command for message 1 to only include the headers */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TOP 1 0");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/pop3-uidl.c b/docs/examples/pop3-uidl.c
new file mode 100644
index 0000000..debb179
--- /dev/null
+++ b/docs/examples/pop3-uidl.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox by unique ID.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the UIDL command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index ae4f4db..3e1cfb0 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -1,14 +1,26 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
*
- * An example source code that issues a HTTP POST and we provide the actual
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* An example source code that issues a HTTP POST and we provide the actual
* data through a read callback.
- *
*/
#include <stdio.h>
#include <string.h>
@@ -18,7 +30,7 @@
struct WriteThis {
const char *readptr;
- int sizeleft;
+ long sizeleft;
};
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
@@ -46,8 +58,18 @@
struct WriteThis pooh;
pooh.readptr = data;
- pooh.sizeleft = strlen(data);
+ pooh.sizeleft = (long)strlen(data);
+ /* In windows, this will init the winsock stuff */
+ res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
@@ -84,7 +106,7 @@
#else
/* Set the expected POST size. If you want to POST large amounts of data,
consider CURLOPT_POSTFIELDSIZE_LARGE */
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (curl_off_t)pooh.sizeleft);
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft);
#endif
#ifdef DISABLE_EXPECT
@@ -108,9 +130,14 @@
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}
diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c
new file mode 100644
index 0000000..3afac4b
--- /dev/null
+++ b/docs/examples/postinmemory.c
@@ -0,0 +1,110 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+static size_t
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
+
+ mem->memory = realloc(mem->memory, mem->size + realsize + 1);
+ if(mem->memory == NULL) {
+ /* out of memory! */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
+ mem->size += realsize;
+ mem->memory[mem->size] = 0;
+
+ return realsize;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct MemoryStruct chunk;
+ static const char *postthis="Field=1&Field=2&Field=3";
+
+ chunk.memory = malloc(1); /* will be grown as needed by realloc above */
+ chunk.size = 0; /* no data at this point */
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curl = curl_easy_init();
+ if(curl) {
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.org/");
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+
+ /* we pass our 'chunk' struct to the callback function */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+
+ /* some servers don't like requests that are made without a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
+
+ /* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
+ itself */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+ printf("%s\n",chunk.memory);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ free(chunk.memory);
+
+ /* we're done with libcurl, so clean it up */
+ curl_global_cleanup();
+ }
+ return 0;
+}
diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c
index a6292c5..88ea78c 100644
--- a/docs/examples/postit2.c
+++ b/docs/examples/postit2.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * Example code that uploads a file name 'foo' to a remote script that accepts
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* Example code that uploads a file name 'foo' to a remote script that accepts
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
*
* The imaginary form we'll fill in looks like:
@@ -24,8 +37,6 @@
#include <string.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
int main(int argc, char *argv[])
{
@@ -62,7 +73,7 @@
CURLFORM_END);
curl = curl_easy_init();
- /* initalize custom header list (stating that Expect: 100-continue is not
+ /* initialize custom header list (stating that Expect: 100-continue is not
wanted */
headerlist = curl_slist_append(headerlist, buf);
if(curl) {
@@ -72,7 +83,13 @@
/* only disable 100-continue header if explicitly requested */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c
new file mode 100644
index 0000000..b2635bc
--- /dev/null
+++ b/docs/examples/progressfunc.c
@@ -0,0 +1,119 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+#define STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES 6000
+#define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL 3
+
+struct myprogress {
+ double lastruntime;
+ CURL *curl;
+};
+
+/* this is how the CURLOPT_XFERINFOFUNCTION callback works */
+static int xferinfo(void *p,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
+{
+ struct myprogress *myp = (struct myprogress *)p;
+ CURL *curl = myp->curl;
+ double curtime = 0;
+
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &curtime);
+
+ /* under certain circumstances it may be desirable for certain functionality
+ to only run every N seconds, in order to do this the transaction time can
+ be used */
+ if((curtime - myp->lastruntime) >= MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL) {
+ myp->lastruntime = curtime;
+ fprintf(stderr, "TOTAL TIME: %f \r\n", curtime);
+ }
+
+ fprintf(stderr, "UP: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+ " DOWN: %" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T
+ "\r\n",
+ ulnow, ultotal, dlnow, dltotal);
+
+ if(dlnow > STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES)
+ return 1;
+ return 0;
+}
+
+/* for libcurl older than 7.32.0 (CURLOPT_PROGRESSFUNCTION) */
+static int older_progress(void *p,
+ double dltotal, double dlnow,
+ double ultotal, double ulnow)
+{
+ return xferinfo(p,
+ (curl_off_t)dltotal,
+ (curl_off_t)dlnow,
+ (curl_off_t)ultotal,
+ (curl_off_t)ulnow);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct myprogress prog;
+
+ curl = curl_easy_init();
+ if(curl) {
+ prog.lastruntime = 0;
+ prog.curl = curl;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, older_progress);
+ /* pass the struct pointer into the progress function */
+ curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &prog);
+
+#if LIBCURL_VERSION_NUM >= 0x072000
+ /* xferinfo was introduced in 7.32.0, no earlier libcurl versions will
+ compile as they won't have the symbols around.
+
+ If built with a newer libcurl, but running with an older libcurl:
+ curl_easy_setopt() will fail in run-time trying to set the new
+ callback, making the older callback get used.
+
+ New libcurls will prefer the new callback and instead use that one even
+ if both callbacks are set. */
+
+ curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfo);
+ /* pass the struct pointer into the xferinfo function, note that this is
+ an alias to CURLOPT_PROGRESSDATA */
+ curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
+#endif
+
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ res = curl_easy_perform(curl);
+
+ if(res != CURLE_OK)
+ fprintf(stderr, "%s\n", curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return (int)res;
+}
diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c
new file mode 100644
index 0000000..7b3e565
--- /dev/null
+++ b/docs/examples/resolve.c
@@ -0,0 +1,51 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *host = NULL;
+
+ /* Each single name resolve string should be written using the format
+ HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve,
+ PORT is the port number of the service where libcurl wants to connect to
+ the HOST and ADDRESS is the numerical IP address
+ */
+ host = curl_slist_append(NULL, "example.com:80:127.0.0.1");
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ curl_slist_free_all(host);
+
+ return (int)res;
+}
diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c
new file mode 100644
index 0000000..fed343d
--- /dev/null
+++ b/docs/examples/rtsp.c
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 2011, Jim Hollinger
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Jim Hollinger nor the names of its contributors
+ * may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined (WIN32)
+# include <conio.h> /* _getch() */
+#else
+# include <termios.h>
+# include <unistd.h>
+
+static int _getch(void)
+{
+ struct termios oldt, newt;
+ int ch;
+ tcgetattr( STDIN_FILENO, &oldt );
+ newt = oldt;
+ newt.c_lflag &= ~( ICANON | ECHO );
+ tcsetattr( STDIN_FILENO, TCSANOW, &newt );
+ ch = getchar();
+ tcsetattr( STDIN_FILENO, TCSANOW, &oldt );
+ return ch;
+}
+#endif
+
+#include <curl/curl.h>
+
+#define VERSION_STR "V1.0"
+
+/* error handling macros */
+#define my_curl_easy_setopt(A, B, C) \
+ if ((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) \
+ fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
+ #A, #B, #C, res);
+
+#define my_curl_easy_perform(A) \
+ if ((res = curl_easy_perform((A))) != CURLE_OK) \
+ fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
+
+
+/* send RTSP OPTIONS request */
+static void rtsp_options(CURL *curl, const char *uri)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: OPTIONS %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_OPTIONS);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP DESCRIBE request and write sdp response to a file */
+static void rtsp_describe(CURL *curl, const char *uri,
+ const char *sdp_filename)
+{
+ CURLcode res = CURLE_OK;
+ FILE *sdp_fp = fopen(sdp_filename, "wt");
+ printf("\nRTSP: DESCRIBE %s\n", uri);
+ if (sdp_fp == NULL) {
+ fprintf(stderr, "Could not open '%s' for writing\n", sdp_filename);
+ sdp_fp = stdout;
+ }
+ else {
+ printf("Writing SDP to '%s'\n", sdp_filename);
+ }
+ my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, sdp_fp);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_DESCRIBE);
+ my_curl_easy_perform(curl);
+ my_curl_easy_setopt(curl, CURLOPT_WRITEDATA, stdout);
+ if (sdp_fp != stdout) {
+ fclose(sdp_fp);
+ }
+}
+
+/* send RTSP SETUP request */
+static void rtsp_setup(CURL *curl, const char *uri, const char *transport)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: SETUP %s\n", uri);
+ printf(" TRANSPORT %s\n", transport);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, transport);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_SETUP);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP PLAY request */
+static void rtsp_play(CURL *curl, const char *uri, const char *range)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: PLAY %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI, uri);
+ my_curl_easy_setopt(curl, CURLOPT_RANGE, range);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_PLAY);
+ my_curl_easy_perform(curl);
+}
+
+
+/* send RTSP TEARDOWN request */
+static void rtsp_teardown(CURL *curl, const char *uri)
+{
+ CURLcode res = CURLE_OK;
+ printf("\nRTSP: TEARDOWN %s\n", uri);
+ my_curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_TEARDOWN);
+ my_curl_easy_perform(curl);
+}
+
+
+/* convert url into an sdp filename */
+static void get_sdp_filename(const char *url, char *sdp_filename)
+{
+ const char *s = strrchr(url, '/');
+ strcpy(sdp_filename, "video.sdp");
+ if (s != NULL) {
+ s++;
+ if (s[0] != '\0') {
+ sprintf(sdp_filename, "%s.sdp", s);
+ }
+ }
+}
+
+
+/* scan sdp file for media control attribute */
+static void get_media_control_attribute(const char *sdp_filename,
+ char *control)
+{
+ int max_len = 256;
+ char *s = malloc(max_len);
+ FILE *sdp_fp = fopen(sdp_filename, "rt");
+ control[0] = '\0';
+ if (sdp_fp != NULL) {
+ while (fgets(s, max_len - 2, sdp_fp) != NULL) {
+ sscanf(s, " a = control: %s", control);
+ }
+ fclose(sdp_fp);
+ }
+ free(s);
+}
+
+
+/* main app */
+int main(int argc, char * const argv[])
+{
+#if 1
+ const char *transport = "RTP/AVP;unicast;client_port=1234-1235"; /* UDP */
+#else
+ const char *transport = "RTP/AVP/TCP;unicast;client_port=1234-1235"; /* TCP */
+#endif
+ const char *range = "0.000-";
+ int rc = EXIT_SUCCESS;
+ char *base_name = NULL;
+
+ printf("\nRTSP request %s\n", VERSION_STR);
+ printf(" Project web site: http://code.google.com/p/rtsprequest/\n");
+ printf(" Requires cURL V7.20 or greater\n\n");
+
+ /* check command line */
+ if ((argc != 2) && (argc != 3)) {
+ base_name = strrchr(argv[0], '/');
+ if (base_name == NULL) {
+ base_name = strrchr(argv[0], '\\');
+ }
+ if (base_name == NULL) {
+ base_name = argv[0];
+ } else {
+ base_name++;
+ }
+ printf("Usage: %s url [transport]\n", base_name);
+ printf(" url of video server\n");
+ printf(" transport (optional) specifier for media stream protocol\n");
+ printf(" default transport: %s\n", transport);
+ printf("Example: %s rtsp://192.168.0.2/media/video1\n\n", base_name);
+ rc = EXIT_FAILURE;
+ } else {
+ const char *url = argv[1];
+ char *uri = malloc(strlen(url) + 32);
+ char *sdp_filename = malloc(strlen(url) + 32);
+ char *control = malloc(strlen(url) + 32);
+ CURLcode res;
+ get_sdp_filename(url, sdp_filename);
+ if (argc == 3) {
+ transport = argv[2];
+ }
+
+ /* initialize curl */
+ res = curl_global_init(CURL_GLOBAL_ALL);
+ if (res == CURLE_OK) {
+ curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+ CURL *curl;
+ fprintf(stderr, " cURL V%s loaded\n", data->version);
+
+ /* initialize this curl session */
+ curl = curl_easy_init();
+ if (curl != NULL) {
+ my_curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+ my_curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+ my_curl_easy_setopt(curl, CURLOPT_HEADERDATA, stdout);
+ my_curl_easy_setopt(curl, CURLOPT_URL, url);
+
+ /* request server options */
+ sprintf(uri, "%s", url);
+ rtsp_options(curl, uri);
+
+ /* request session description and write response to sdp file */
+ rtsp_describe(curl, uri, sdp_filename);
+
+ /* get media control attribute from sdp file */
+ get_media_control_attribute(sdp_filename, control);
+
+ /* setup media stream */
+ sprintf(uri, "%s/%s", url, control);
+ rtsp_setup(curl, uri, transport);
+
+ /* start playing media stream */
+ sprintf(uri, "%s/", url);
+ rtsp_play(curl, uri, range);
+ printf("Playing video, press any key to stop ...");
+ _getch();
+ printf("\n");
+
+ /* teardown session */
+ rtsp_teardown(curl, uri);
+
+ /* cleanup */
+ curl_easy_cleanup(curl);
+ curl = NULL;
+ } else {
+ fprintf(stderr, "curl_easy_init() failed\n");
+ }
+ curl_global_cleanup();
+ } else {
+ fprintf(stderr, "curl_global_init(%s) failed: %d\n",
+ "CURL_GLOBAL_ALL", res);
+ }
+ free(control);
+ free(sdp_filename);
+ free(uri);
+ }
+
+ return rc;
+}
diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c
index ed45851..3db3160 100644
--- a/docs/examples/sampleconv.c
+++ b/docs/examples/sampleconv.c
@@ -1,11 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 a simple example showing how a program on a non-ASCII platform
would invoke callbacks to do its own codeset conversions instead of
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index ad5ddd1..88fddf5 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -1,20 +1,32 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * An example of curl_easy_send() and curl_easy_recv() usage.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+/* An example of curl_easy_send() and curl_easy_recv() usage. */
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
/* Auxiliary function that waits on the socket. */
-static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
+static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
{
struct timeval tv;
fd_set infd, outfd, errfd;
@@ -49,8 +61,10 @@
CURLcode res;
/* Minimalistic http request */
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
- int sockfd; /* socket */
+ curl_socket_t sockfd; /* socket */
+ long sockextr;
size_t iolen;
+ curl_off_t nread;
curl = curl_easy_init();
if(curl) {
@@ -65,9 +79,11 @@
return 1;
}
- /* Extract the socket from the curl handle - we'll need it
- * for waiting */
- res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
+ /* Extract the socket from the curl handle - we'll need it for waiting.
+ * Note that this API takes a pointer to a 'long' while we use
+ * curl_socket_t for sockets otherwise.
+ */
+ res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
if(CURLE_OK != res)
{
@@ -75,6 +91,8 @@
return 1;
}
+ sockfd = sockextr;
+
/* wait for the socket to become ready for sending */
if(!wait_on_socket(sockfd, 0, 60000L))
{
@@ -105,7 +123,9 @@
if(CURLE_OK != res)
break;
- printf("Received %u bytes.\n", iolen);
+ nread = (curl_off_t)iolen;
+
+ printf("Received %" CURL_FORMAT_CURL_OFF_T " bytes.\n", nread);
}
/* always cleanup */
diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c
index e0c4cbb..7402e35 100644
--- a/docs/examples/sepheaders.c
+++ b/docs/examples/sepheaders.c
@@ -1,19 +1,29 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
{
@@ -21,7 +31,7 @@
return written;
}
-int main(int argc, char **argv)
+int main(void)
{
CURL *curl_handle;
static const char *headerfilename = "head.out";
@@ -43,24 +53,26 @@
/* send all data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
- /* open the files */
- headerfile = fopen(headerfilename,"w");
- if (headerfile == NULL) {
- curl_easy_cleanup(curl_handle);
- return -1;
- }
- bodyfile = fopen(bodyfilename,"w");
- if (bodyfile == NULL) {
+ /* open the header file */
+ headerfile = fopen(headerfilename, "wb");
+ if(!headerfile) {
curl_easy_cleanup(curl_handle);
return -1;
}
- /* we want the headers to this file handle */
- curl_easy_setopt(curl_handle, CURLOPT_WRITEHEADER, headerfile);
+ /* open the body file */
+ bodyfile = fopen(bodyfilename, "wb");
+ if(!bodyfile) {
+ curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
+ return -1;
+ }
- /*
- * Notice here that if you want the actual data sent anywhere else but
- * stdout, you should consider using the CURLOPT_WRITEDATA option. */
+ /* we want the headers be written to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
+
+ /* we want the body be written to this file handle instead of stdout */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
/* get it! */
curl_easy_perform(curl_handle);
@@ -68,6 +80,9 @@
/* close the header file */
fclose(headerfile);
+ /* close the body file */
+ fclose(bodyfile);
+
/* cleanup curl stuff */
curl_easy_cleanup(curl_handle);
diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c
new file mode 100644
index 0000000..2641c71
--- /dev/null
+++ b/docs/examples/sessioninfo.c
@@ -0,0 +1,105 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+
+/* Note that this example currently requires cURL to be linked against
+ GnuTLS (and this program must also be linked against -lgnutls). */
+
+#include <stdio.h>
+
+#include <curl/curl.h>
+#include <gnutls/gnutls.h>
+
+static CURL *curl;
+
+static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ const struct curl_tlssessioninfo *info;
+ unsigned int cert_list_size;
+ const gnutls_datum_t *chainp;
+ CURLcode res;
+
+ (void)stream;
+ (void)ptr;
+
+ res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
+
+ if(!res) {
+ switch(info->backend) {
+ case CURLSSLBACKEND_GNUTLS:
+ /* info->internals is now the gnutls_session_t */
+ chainp = gnutls_certificate_get_peers(info->internals, &cert_list_size);
+ if((chainp) && (cert_list_size)) {
+ unsigned int i;
+
+ for(i = 0; i < cert_list_size; i++) {
+ gnutls_x509_crt_t cert;
+ gnutls_datum_t dn;
+
+ if(GNUTLS_E_SUCCESS == gnutls_x509_crt_init(&cert)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
+ fprintf(stderr, "Certificate #%d: %.*s", i, dn.size, dn.data);
+
+ gnutls_free(dn.data);
+ }
+ }
+
+ gnutls_x509_crt_deinit(cert);
+ }
+ }
+ }
+ break;
+ case CURLSSLBACKEND_NONE:
+ default:
+ break;
+ }
+ }
+
+ return size * nmemb;
+}
+
+int main(void)
+{
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+
+ (void) curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c
new file mode 100644
index 0000000..434299d
--- /dev/null
+++ b/docs/examples/sftpget.c
@@ -0,0 +1,106 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+
+#include <curl/curl.h>
+
+/* define this to switch off the use of ssh-agent in this program */
+#undef DISABLE_SSH_AGENT
+
+/*
+ * This is an example showing how to get a single file from an SFTP server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it won't create an empty file in case the remote file
+ * doesn't exist or something else fails.
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out=(struct FtpFile *)stream;
+ if(out && !out->stream) {
+ /* open file for writing */
+ out->stream=fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, can't open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile={
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works!
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "sftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+#ifndef DISABLE_SSH_AGENT
+ /* We activate ssh agent. For this to work you need
+ to have ssh-agent running (type set | grep SSH_AGENT to check) or
+ pageant on Windows (there is an icon in systray if so) */
+ curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_AGENT);
+#endif
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/simple.c b/docs/examples/simple.c
index 351cf72..1912ce6 100644
--- a/docs/examples/simple.c
+++ b/docs/examples/simple.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
@@ -18,7 +30,15 @@
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c
index b8e61e0..8657771 100644
--- a/docs/examples/simplepost.c
+++ b/docs/examples/simplepost.c
@@ -1,12 +1,24 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <string.h>
#include <curl/curl.h>
@@ -27,7 +39,12 @@
itself */
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index db3acca..aefb79f 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -1,18 +1,27 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- */
-
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
#include <curl/curl.h>
-#include <curl/types.h>
-#include <curl/easy.h>
-
/* some requirements for this to work:
1. set pCertFile to the file with the client certificate
@@ -32,8 +41,9 @@
*/
-int main(int argc, char **argv)
+int main(void)
{
+ int i;
CURL *curl;
CURLcode res;
FILE *headerfile;
@@ -47,7 +57,7 @@
const char *pEngine;
-#if USE_ENGINE
+#ifdef USE_ENGINE
pKeyName = "rsa_test";
pKeyType = "ENG";
pEngine = "chil"; /* for nChiper HSM... */
@@ -65,9 +75,9 @@
if(curl) {
/* what call to write: */
curl_easy_setopt(curl, CURLOPT_URL, "HTTPS://your.favourite.ssl.site");
- curl_easy_setopt(curl, CURLOPT_WRITEHEADER, headerfile);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, headerfile);
- while(1) /* do some ugly short cut... */
+ for(i = 0; i < 1; i++) /* single-iteration loop, just to break out from */
{
if (pEngine) /* use crypto engine */
{
@@ -109,8 +119,14 @@
/* disconnect if we can't validate server's cert */
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1L);
+ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
- break; /* we are done... */
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* we are done... */
}
/* always cleanup */
curl_easy_cleanup(curl);
diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c
new file mode 100644
index 0000000..932f6e3
--- /dev/null
+++ b/docs/examples/smooth-gtk-thread.c
@@ -0,0 +1,228 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 a multi threaded application that uses a progress bar to show
+ * status. It uses Gtk+ to make a smooth pulse.
+ *
+ * Written by Jud Bishop after studying the other examples provided with
+ * libcurl.
+ *
+ * To compile (on a single line):
+ * gcc -ggdb `pkg-config --cflags --libs gtk+-2.0` -lcurl -lssl -lcrypto
+ * -lgthread-2.0 -dl smooth-gtk-thread.c -o smooth-gtk-thread
+ */
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <curl/curl.h>
+
+#define NUMT 4
+
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+int j = 0;
+gint num_urls = 9; /* Just make sure this is less than urls[]*/
+const char * const urls[]= {
+ "90022",
+ "90023",
+ "90024",
+ "90025",
+ "90026",
+ "90027",
+ "90028",
+ "90029",
+ "90030"
+};
+
+size_t write_file(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ /* printf("write_file\n"); */
+ return fwrite(ptr, size, nmemb, stream);
+}
+
+/* http://xoap.weather.com/weather/local/46214?cc=*&dayf=5&unit=i */
+void *pull_one_url(void *NaN)
+{
+ CURL *curl;
+ CURLcode res;
+ gchar *http;
+ FILE *outfile;
+
+ /* Stop threads from entering unless j is incremented */
+ pthread_mutex_lock(&lock);
+ while ( j < num_urls )
+ {
+ printf("j = %d\n", j);
+
+ http =
+ g_strdup_printf("xoap.weather.com/weather/local/%s?cc=*&dayf=5&unit=i\n",
+ urls[j]);
+
+ printf( "http %s", http );
+
+ curl = curl_easy_init();
+ if(curl)
+ {
+
+ outfile = fopen(urls[j], "w");
+ /* printf("fopen\n"); */
+
+ /* Set the URL and transfer type */
+ curl_easy_setopt(curl, CURLOPT_URL, http);
+
+ /* Write to the file */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file);
+
+ j++; /* critical line */
+ pthread_mutex_unlock(&lock);
+
+ res = curl_easy_perform(curl);
+
+ fclose(outfile);
+ printf("fclose\n");
+
+ curl_easy_cleanup(curl);
+ }
+ g_free (http);
+
+ /* Adds more latency, testing the mutex.*/
+ sleep(1);
+
+ } /* end while */
+ return NULL;
+}
+
+
+gboolean pulse_bar(gpointer data)
+{
+ gdk_threads_enter();
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (data));
+ gdk_threads_leave();
+
+ /* Return true so the function will be called again;
+ * returning false removes this timeout function.
+ */
+ return TRUE;
+}
+
+void *create_thread(void *progress_bar)
+{
+ pthread_t tid[NUMT];
+ int i;
+ int error;
+
+ /* Make sure I don't create more threads than urls. */
+ for(i=0; i < NUMT && i < num_urls ; i++) {
+ error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ NULL);
+ if(0 != error)
+ fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ else
+ fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
+ }
+
+ /* Wait for all threads to terminate. */
+ for(i=0; i < NUMT && i < num_urls; i++) {
+ error = pthread_join(tid[i], NULL);
+ fprintf(stderr, "Thread %d terminated\n", i);
+ }
+
+ /* This stops the pulsing if you have it turned on in the progress bar
+ section */
+ g_source_remove(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(progress_bar),
+ "pulse_id")));
+
+ /* This destroys the progress bar */
+ gtk_widget_destroy(progress_bar);
+
+ /* [Un]Comment this out to kill the program rather than pushing close. */
+ /* gtk_main_quit(); */
+
+
+ return NULL;
+
+}
+
+static gboolean cb_delete(GtkWidget *window, gpointer data)
+{
+ gtk_main_quit();
+ return FALSE;
+}
+
+int main(int argc, char **argv)
+{
+ GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Init thread */
+ g_thread_init(NULL);
+ gdk_threads_init ();
+ gdk_threads_enter ();
+
+ gtk_init(&argc, &argv);
+
+ /* Base window */
+ top_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+ /* Frame */
+ outside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(outside_frame), GTK_SHADOW_OUT);
+ gtk_container_add(GTK_CONTAINER(top_window), outside_frame);
+
+ /* Frame */
+ inside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(inside_frame), GTK_SHADOW_IN);
+ gtk_container_set_border_width(GTK_CONTAINER(inside_frame), 5);
+ gtk_container_add(GTK_CONTAINER(outside_frame), inside_frame);
+
+ /* Progress bar */
+ progress_bar = gtk_progress_bar_new();
+ gtk_progress_bar_pulse (GTK_PROGRESS_BAR (progress_bar));
+ /* Make uniform pulsing */
+ gint pulse_ref = g_timeout_add (300, pulse_bar, progress_bar);
+ g_object_set_data(G_OBJECT(progress_bar), "pulse_id",
+ GINT_TO_POINTER(pulse_ref));
+ gtk_container_add(GTK_CONTAINER(inside_frame), progress_bar);
+
+ gtk_widget_show_all(top_window);
+ printf("gtk_widget_show_all\n");
+
+ g_signal_connect(G_OBJECT (top_window), "delete-event",
+ G_CALLBACK(cb_delete), NULL);
+
+ if (!g_thread_create(&create_thread, progress_bar, FALSE, NULL) != 0)
+ g_warning("can't create the thread");
+
+ gtk_main();
+ gdk_threads_leave();
+ printf("gdk_threads_leave\n");
+
+ return 0;
+}
+
diff --git a/docs/examples/smtp-expn.c b/docs/examples/smtp-expn.c
new file mode 100644
index 0000000..0322d2f
--- /dev/null
+++ b/docs/examples/smtp-expn.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to expand an email mailing list.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "Friends");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Set the EXPN command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPN");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Curl won't send the QUIT command until you call cleanup, so you should
+ * be able to re-use this connection for additional requests. It may not be
+ * a good idea to keep the connection open for a very long time though
+ * (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/docs/examples/smtp-mail.c b/docs/examples/smtp-mail.c
new file mode 100644
index 0000000..eea90b8
--- /dev/null
+++ b/docs/examples/smtp-mail.c
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. For an example of using the multi interface please see
+ * smtp-multi.c.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<[email protected]>"
+#define TO "<[email protected]>"
+#define CC "<[email protected]>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <[email protected]>\r\n",
+ "Subject: SMTP example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = payload_text[upload_ctx->lines_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ memcpy(ptr, data, len);
+ upload_ctx->lines_read++;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl won't send the QUIT command until you call cleanup, so you should be
+ * able to re-use this connection for additional messages (setting
+ * CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
+ * curl_easy_perform() again. It may not be a good idea to keep the
+ * connection open for a very long time though (more than a few minutes may
+ * result in the server timing out the connection), and you do want to clean
+ * up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-multi.c b/docs/examples/smtp-multi.c
new file mode 100644
index 0000000..4098c7d
--- /dev/null
+++ b/docs/examples/smtp-multi.c
@@ -0,0 +1,237 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <string.h>
+#include <curl/curl.h>
+
+/* This is an example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to demonstrate how to use
+ * libcurl's multi interface.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<[email protected]>"
+#define TO "<[email protected]>"
+#define CC "<[email protected]>"
+
+#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <[email protected]>\r\n",
+ "Subject: SMTP multi example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = payload_text[upload_ctx->lines_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ memcpy(ptr, data, len);
+ upload_ctx->lines_read++;
+
+ return len;
+ }
+
+ return 0;
+}
+
+static struct timeval tvnow(void)
+{
+ struct timeval now;
+
+ /* time() returns the value of time in seconds since the epoch */
+ now.tv_sec = (long)time(NULL);
+ now.tv_usec = 0;
+
+ return now;
+}
+
+static long tvdiff(struct timeval newer, struct timeval older)
+{
+ return (newer.tv_sec - older.tv_sec) * 1000 +
+ (newer.tv_usec - older.tv_usec) / 1000;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct timeval mp_start;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ /* Record the start time which we can use later */
+ mp_start = tvnow();
+
+ /* We start some action by calling perform right away */
+ curl_multi_perform(mcurl, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+ int rc;
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ long curl_timeo = -1;
+
+ /* Initialise the file descriptors */
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* Set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(mcurl, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK)
+ {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
+ fprintf(stderr,
+ "ABORTING: Since it seems that we would have run forever.\n");
+ break;
+ }
+
+ switch(rc) {
+ case -1: /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(mcurl, &still_running);
+ break;
+ }
+ }
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c
new file mode 100644
index 0000000..a774403
--- /dev/null
+++ b/docs/examples/smtp-ssl.c
@@ -0,0 +1,161 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<[email protected]>"
+#define TO "<[email protected]>"
+#define CC "<[email protected]>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <[email protected]>\r\n",
+ "Subject: SMTP SSL example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = payload_text[upload_ctx->lines_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ memcpy(ptr, data, len);
+ upload_ctx->lines_read++;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of smtps:// rather
+ * than smtp:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtps://mainserver.example.net");
+
+ /* If you want to connect to a site who isn't using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you're connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-tls.c b/docs/examples/smtp-tls.c
new file mode 100644
index 0000000..4872dbd
--- /dev/null
+++ b/docs/examples/smtp-tls.c
@@ -0,0 +1,163 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM "<[email protected]>"
+#define TO "<[email protected]>"
+#define CC "<[email protected]>"
+
+static const char *payload_text[] = {
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
+ "To: " TO "\r\n",
+ "From: " FROM "(Example User)\r\n",
+ "Cc: " CC "(Another example User)\r\n",
+ "Message-ID: <[email protected]>\r\n",
+ "Subject: SMTP TLS example message\r\n",
+ "\r\n", /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n",
+ "\r\n",
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n",
+ "Check RFC5322.\r\n",
+ NULL
+};
+
+struct upload_status {
+ int lines_read;
+};
+
+static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = payload_text[upload_ctx->lines_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ memcpy(ptr, data, len);
+ upload_ctx->lines_read++;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx;
+
+ upload_ctx.lines_read = 0;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of port 587 here,
+ * instead of the normal SMTP port (25). Port 587 is commonly used for
+ * secure mail submission (see RFC4403), but you should use whatever
+ * matches your server configuration. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
+
+ /* In this example, we'll start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server doesn't have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though.
+ * Instead, you should get the issuer certificate (or the host certificate
+ * if the certificate is self-signed) and add it to the set of certificates
+ * that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
+ * docs/SSLCERTS for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Note that this option isn't strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We're using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the transfer.
+ */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/docs/examples/smtp-vrfy.c b/docs/examples/smtp-vrfy.c
new file mode 100644
index 0000000..4e44cea
--- /dev/null
+++ b/docs/examples/smtp-vrfy.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to verify an email address from an
+ * SMTP server.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command and even if your email server
+ * does support it, it may respond with a 252 response code even though the
+ * address doesn't exist.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "<[email protected]>");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Perform the VRFY */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Curl won't send the QUIT command until you call cleanup, so you should
+ * be able to re-use this connection for additional requests. It may not be
+ * a good idea to keep the connection open for a very long time though
+ * (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c
index 4ed031a..cd7d073 100644
--- a/docs/examples/synctime.c
+++ b/docs/examples/synctime.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
*
- * This example code only builds as-is on Windows.
+ * 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 http://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 example code only builds as-is on Windows.
*
* While Unix/Linux user, you do not need this software.
* You can achieve the same result as synctime using curl, awk and date.
@@ -79,6 +92,8 @@
#define MAX_STRING 256
#define MAX_STRING1 MAX_STRING+1
+#define SYNCTIME_UA "synctime/1.0"
+
typedef struct
{
char http_proxy[MAX_STRING1];
@@ -86,12 +101,11 @@
char timeserver[MAX_STRING1];
} conf_t;
-const char DefaultTimeServer[4][MAX_STRING1] =
+const char DefaultTimeServer[3][MAX_STRING1] =
{
- "http://nist.time.gov/timezone.cgi?UTC/s/0",
- "http://www.google.com/",
- "http://www.worldtimeserver.com/current_time_in_UTC.aspx",
- "http://www.worldtime.com/cgi-bin/wt.cgi"
+ "http://pool.ntp.org/",
+ "http://nist.time.gov/",
+ "http://www.google.com/"
};
const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
@@ -134,7 +148,7 @@
TmpStr1 & 2? */
AutoSyncTime = 0;
else {
- RetVal = sscanf ((char *)(ptr), "Date: %s %d %s %d %d:%d:%d",
+ RetVal = sscanf ((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
&SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond);
@@ -173,9 +187,9 @@
if (strlen(proxy_user_password) > 0)
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
- /* Trick Webserver by claiming that you are using Microsoft WinXP SP2, IE6 */
- curl_easy_setopt(curl, CURLOPT_USERAGENT,
- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
+#ifdef SYNCTIME_UA
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
+#endif
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
}
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index 284edc4..a7e9c2d 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -1,12 +1,25 @@
-/*****************************************************************************
+/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al.
*
- * A multi-threaded example that uses pthreads and fetches 4 remote files at
+ * 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 http://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.
+ *
+ ***************************************************************************/
+/* A multi-threaded example that uses pthreads and fetches 4 remote files at
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
* (libgcrypt) so far.
*
diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c
new file mode 100644
index 0000000..adf696c
--- /dev/null
+++ b/docs/examples/url2file.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://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 <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *curl_handle;
+ static const char *pagefilename = "page.out";
+ FILE *pagefile;
+
+ if(argc < 2 ) {
+ printf("Usage: %s <URL>\n", argv[0]);
+ return 1;
+ }
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* set URL to get here */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, argv[1]);
+
+ /* Switch on full protocol/debug output while testing */
+ curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+
+ /* disable progress meter, set to 0L to enable and disable debug output */
+ curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* open the file */
+ pagefile = fopen(pagefilename, "wb");
+ if (pagefile) {
+
+ /* write the page body to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
+
+ /* get it! */
+ curl_easy_perform(curl_handle);
+
+ /* close the header file */
+ fclose(pagefile);
+ }
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ return 0;
+}
diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c
new file mode 100644
index 0000000..dd56c61
--- /dev/null
+++ b/docs/examples/usercertinmem.c
@@ -0,0 +1,224 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+/* Example using an in memory PEM user certificate and RSA key to retrieve an
+ * https page.
+ * Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
+ * Note that to maintain simplicity this example does not use a CA certificate
+ * for peer verification. However, some form of peer verification
+ * must be used in real circumstances when a secure connection is required.
+ */
+
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <curl/curl.h>
+#include <stdio.h>
+
+static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ fwrite(ptr,size,nmemb,stream);
+ return(nmemb*size);
+}
+
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
+{
+ X509 *cert = NULL;
+ BIO *bio = NULL;
+ BIO *kbio = NULL;
+ RSA *rsa = NULL;
+ int ret;
+
+ const char *mypem = /* www.cacert.org */
+ "-----BEGIN CERTIFICATE-----\n"\
+ "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\
+ "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\
+ "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n"\
+ "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n"\
+ "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi\n"\
+ "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ\n"\
+ "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC\n"\
+ "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ\n"\
+ "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6\n"\
+ "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y\n"\
+ "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7\n"\
+ "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc\n"\
+ "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k\n"\
+ "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q\n"\
+ "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQ\n"\
+ "QUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivU\n"\
+ "fslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826\n"\
+ "YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4w\n"\
+ "ggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGY\n"\
+ "gBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEe\n"\
+ "MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0\n"\
+ "IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2Vy\n"\
+ "dC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRw\n"\
+ "czovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0\n"\
+ "dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYl\n"\
+ "aHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhC\n"\
+ "AQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQg\n"\
+ "b3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIB\n"\
+ "ACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCc\n"\
+ "nWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg\n"\
+ "18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/c\n"\
+ "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl\n"\
+ "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY\n"\
+ "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T\n"\
+ "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF\n"\
+ "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum\n"\
+ "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n"\
+ "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n"\
+ "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\
+ "-----END CERTIFICATE-----\n";
+
+/*replace the XXX with the actual RSA key*/
+ const char *mykey =
+ "-----BEGIN RSA PRIVATE KEY-----\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "-----END RSA PRIVATE KEY-----\n";
+
+ (void)curl; /* avoid warnings */
+ (void)parm; /* avoid warnings */
+
+ /* get a BIO */
+ bio = BIO_new_mem_buf((char *)mypem, -1);
+
+ if (bio == NULL) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /* use it to read the PEM formatted certificate from memory into an X509
+ * structure that SSL can use
+ */
+ cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
+ if (cert == NULL) {
+ printf("PEM_read_bio_X509 failed...\n");
+ }
+
+ /*tell SSL to use the X509 certificate*/
+ ret = SSL_CTX_use_certificate((SSL_CTX*)sslctx, cert);
+ if (ret != 1) {
+ printf("Use certificate failed\n");
+ }
+
+ /*create a bio for the RSA key*/
+ kbio = BIO_new_mem_buf((char *)mykey, -1);
+ if (kbio == NULL) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /*read the key bio into an RSA object*/
+ rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL);
+ if (rsa == NULL) {
+ printf("Failed to create key bio\n");
+ }
+
+ /*tell SSL to use the RSA key from memory*/
+ ret = SSL_CTX_use_RSAPrivateKey((SSL_CTX*)sslctx, rsa);
+ if (ret != 1) {
+ printf("Use Key failed\n");
+ }
+
+ /* free resources that have been allocated by openssl functions */
+ if (bio)
+ BIO_free(bio);
+
+ if (kbio)
+ BIO_free(kbio);
+
+ if (rsa)
+ RSA_free(rsa);
+
+ if (cert)
+ X509_free(cert);
+
+ /* all set to go */
+ return CURLE_OK ;
+}
+
+int main(void)
+{
+ CURL *ch;
+ CURLcode rv;
+
+ rv = curl_global_init(CURL_GLOBAL_ALL);
+ ch = curl_easy_init();
+ rv = curl_easy_setopt(ch,CURLOPT_VERBOSE, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADER, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1L);
+ rv = curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1L);
+ rv = curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
+ rv = curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
+ rv = curl_easy_setopt(ch,CURLOPT_HEADERDATA, stderr);
+ rv = curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
+
+ /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is
+ no CA certificate*/
+
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER, 0L);
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_VERIFYHOST, 0L);
+ rv = curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+ rv = curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
+
+ /* first try: retrieve page without user certificate and key -> will fail
+ */
+ rv = curl_easy_perform(ch);
+ if (rv==CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ /* second try: retrieve page using user certificate and key -> will succeed
+ * load the certificate and key by installing a function doing the necessary
+ * "modifications" to the SSL CONTEXT just before link init
+ */
+ rv = curl_easy_setopt(ch,CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
+ rv = curl_easy_perform(ch);
+ if (rv==CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ curl_easy_cleanup(ch);
+ curl_global_cleanup();
+ return rv;
+}
diff --git a/docs/examples/version-check.pl b/docs/examples/version-check.pl
new file mode 100755
index 0000000..92f0808
--- /dev/null
+++ b/docs/examples/version-check.pl
@@ -0,0 +1,105 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, 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 http://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 script accepts a source file as input on the command line.
+#
+# It first loads the 'symbols-in-versions' document and stores a lookup
+# table for all known symbols for which version they were introduced.
+#
+# It then scans the given source file to dig up all symbols starting with CURL.
+# Finally, it sorts the internal list of found symbols (using the version
+# number as sort key) and then it outputs the most recent version number and
+# the symbols from that version that are used.
+#
+# Usage:
+#
+# version-check.pl [source file]
+#
+
+open(S, "<../libcurl/symbols-in-versions") || die;
+
+my %doc;
+my %rem;
+while(<S>) {
+ if(/(^CURL[^ \n]*) *(.*)/) {
+ my ($sym, $rest)=($1, $2);
+ my @a=split(/ +/, $rest);
+
+ $doc{$sym}=$a[0]; # when it was introduced
+
+ if($a[2]) {
+ # this symbol is documented to have been present the last time
+ # in this release
+ $rem{$sym}=$a[2];
+ }
+ }
+
+}
+
+close(S);
+
+sub age {
+ my ($ver)=@_;
+
+ my @s=split(/\./, $ver);
+ return $s[0]*10000+$s[1]*100+$s[2];
+}
+
+my %used;
+open(C, "<$ARGV[0]") || die;
+
+while(<C>) {
+ if(/\W(CURL[_A-Z0-9v]+)\W/) {
+ #print "$1\n";
+ $used{$1}++;
+ }
+}
+
+close(C);
+
+sub sortversions {
+ my $r = age($doc{$a}) <=> age($doc{$b});
+ if(!$r) {
+ $r = $a cmp $b;
+ }
+ return $r;
+}
+
+my @recent = reverse sort sortversions keys %used;
+
+# the most recent symbol
+my $newsym = $recent[0];
+# the most recent version
+my $newver = $doc{$newsym};
+
+print "The scanned source uses these symbols introduced in $newver:\n";
+
+for my $w (@recent) {
+ if($doc{$w} eq $newver) {
+ printf " $w\n";
+ next;
+ }
+ last;
+}
+
+
diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c
new file mode 100644
index 0000000..8193445
--- /dev/null
+++ b/docs/examples/xmlstream.c
@@ -0,0 +1,158 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, 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 http://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.
+ *
+ ***************************************************************************/
+/* Stream-parse a document using the streaming Expat parser.
+ * Written by David Strauss
+ *
+ * Expat => http://www.libexpat.org/
+ *
+ * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <expat.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+struct ParserStruct {
+ int ok;
+ size_t tags;
+ size_t depth;
+ struct MemoryStruct characters;
+};
+
+static void startElement(void *userData, const XML_Char *name, const XML_Char **atts)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->tags++;
+ state->depth++;
+
+ /* Get a clean slate for reading in character data. */
+ free(state->characters.memory);
+ state->characters.memory = NULL;
+ state->characters.size = 0;
+}
+
+static void characterDataHandler(void *userData, const XML_Char *s, int len)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ struct MemoryStruct *mem = &state->characters;
+
+ mem->memory = realloc(mem->memory, mem->size + len + 1);
+ if(mem->memory == NULL) {
+ /* Out of memory. */
+ fprintf(stderr, "Not enough memory (realloc returned NULL).\n");
+ state->ok = 0;
+ return;
+ }
+
+ memcpy(&(mem->memory[mem->size]), s, len);
+ mem->size += len;
+ mem->memory[mem->size] = 0;
+}
+
+static void endElement(void *userData, const XML_Char *name)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->depth--;
+
+ printf("%5lu %10lu %s\n", state->depth, state->characters.size, name);
+}
+
+static size_t parseStreamCallback(void *contents, size_t length, size_t nmemb, void *userp)
+{
+ XML_Parser parser = (XML_Parser) userp;
+ size_t real_size = length * nmemb;
+ struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
+
+ /* Only parse if we're not already in a failure state. */
+ if (state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Parsing response buffer of length %lu failed with error code %d (%s).\n",
+ real_size, error_code, XML_ErrorString(error_code));
+ state->ok = 0;
+ }
+
+ return real_size;
+}
+
+int main(void)
+{
+ CURL *curl_handle;
+ CURLcode res;
+ XML_Parser parser;
+ struct ParserStruct state;
+
+ /* Initialize the state structure for parsing. */
+ memset(&state, 0, sizeof(struct ParserStruct));
+ state.ok = 1;
+
+ /* Initialize a namespace-aware parser. */
+ parser = XML_ParserCreateNS(NULL, '\0');
+ XML_SetUserData(parser, &state);
+ XML_SetElementHandler(parser, startElement, endElement);
+ XML_SetCharacterDataHandler(parser, characterDataHandler);
+
+ /* Initialize a libcurl handle. */
+ curl_global_init(CURL_GLOBAL_ALL ^ CURL_GLOBAL_SSL);
+ curl_handle = curl_easy_init();
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.w3schools.com/xml/simple.xml");
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback);
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser);
+
+ printf("Depth Characters Closing Tag\n");
+
+ /* Perform the request and any follow-up parsing. */
+ res = curl_easy_perform(curl_handle);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else if (state.ok) {
+ /* Expat requires one final call to finalize parsing. */
+ if (XML_Parse(parser, NULL, 0, 1) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
+ error_code, XML_ErrorString(error_code));
+ }
+ else {
+ printf(" --------------\n");
+ printf(" %lu tags total\n", state.tags);
+ }
+ }
+
+ /* Clean up. */
+ free(state.characters.memory);
+ XML_ParserFree(parser);
+ curl_easy_cleanup(curl_handle);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/docs/libcurl/.gitignore b/docs/libcurl/.gitignore
new file mode 100644
index 0000000..2e5b359
--- /dev/null
+++ b/docs/libcurl/.gitignore
@@ -0,0 +1,3 @@
+*.html
+*.pdf
+libcurl-symbols.3
diff --git a/docs/libcurl/ABI b/docs/libcurl/ABI
index 3ec0e04..ef0caa6 100644
--- a/docs/libcurl/ABI
+++ b/docs/libcurl/ABI
@@ -7,16 +7,16 @@
libcurl's binary interface
ABI - Application Binary Interface
+----------------------------------
- First, allow me to define the word for this context: ABI describes the
- low-level interface between an application program and a library. Calling
- conventions, function arguments, return values, struct sizes/defines and
- more.
+ "ABI" describes the low-level interface between an application program and a
+ library. Calling conventions, function arguments, return values, struct
+ sizes/defines and more.
- For a longer description, see
- http://en.wikipedia.org/wiki/Application_binary_interface
+ [Wikipedia has a longer description](http://en.wikipedia.org/wiki/Application_binary_interface)
Upgrades
+--------
In the vast majority of all cases, a typical libcurl upgrade does not break
the ABI at all. Your application can remain using libcurl just as before,
@@ -26,11 +26,13 @@
it now is defined to work.
Version Numbers
+---------------
In libcurl land, you really can't tell by the libcurl version number if that
libcurl is binary compatible or not with another libcurl version.
Soname Bumps
+------------
Whenever there are changes done to the library that will cause an ABI
breakage, that may require your application to get attention or possibly be
@@ -43,7 +45,11 @@
During the first seven years of libcurl releases, there have only been four
ABI breakages.
+ We are determined to bump the SONAME as rarely as possible. Ideally, we
+ never do it again.
+
Downgrades
+----------
Going to an older libcurl version from one you're currently using can be a
tricky thing. Mostly we add features and options to newer libcurls as that
@@ -54,6 +60,7 @@
soname, and then your application may need to adapt to the modified ABI.
History
+-------
The previous major library soname number bumps (breaking backwards
compatibility) have happened the following times:
diff --git a/docs/libcurl/Makefile.am b/docs/libcurl/Makefile.am
index 3f949d6..39272ac 100644
--- a/docs/libcurl/Makefile.am
+++ b/docs/libcurl/Makefile.am
@@ -1,8 +1,29 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
AUTOMAKE_OPTIONS = foreign no-dependencies
+SUBDIRS = opts
+
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 \
@@ -19,7 +40,7 @@
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_socket_action.3 curl_multi_wait.3 libcurl-symbols.3
HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
@@ -39,7 +60,7 @@
curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
curl_multi_timeout.html curl_formget.html curl_multi_assign.html \
curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \
- curl_multi_socket_action.html
+ curl_multi_socket_action.html curl_multi_wait.html libcurl-symbols.html
PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
@@ -58,22 +79,31 @@
curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf \
curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf \
curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf \
- curl_easy_send.pdf curl_multi_socket_action.pdf
+ curl_easy_send.pdf curl_multi_socket_action.pdf curl_multi_wait.pdf \
+ libcurl-symbols.pdf
-CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
+m4macrodir = $(datadir)/aclocal
+dist_m4macro_DATA = libcurl.m4
-EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
- symbols-in-versions
+CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) libcurl-symbols.3
+
+EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) ABI \
+ symbols-in-versions symbols.pl mksymbolsmanpage.pl
MAN2HTML= roffit --mandir=. < $< >$@
SUFFIXES = .3 .html
+libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
+ perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
+
html: $(HTMLPAGES)
+ cd opts; make html
.3.html:
$(MAN2HTML)
pdf: $(PDFPAGES)
+ cd opts; make pdf
.3.pdf:
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
@@ -81,3 +111,17 @@
ps2pdf $$foo.ps $@; \
rm $$foo.ps; \
echo "converted $< to $@")
+
+# Make sure each option man page is referenced in the main man page
+TESTS = check-easy check-multi
+LOG_COMPILER = $(PERL)
+# The test fails if the log file contains any text
+AM_LOG_FLAGS = -p -e 'die "$$_" if ($$_);'
+
+check-easy: $(srcdir)/curl_easy_setopt.3 $(srcdir)/opts/CURLOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_easy_setopt.3 >/dev/null || echo Missing $$opt; done > $@
+
+check-multi: $(srcdir)/curl_multi_setopt.3 $(srcdir)/opts/CURLMOPT*.3
+ OPTS="$$(ls $(srcdir)/opts/CURLMOPT*.3 | $(SED) -e 's,^.*/,,' -e 's,\.3$$,,')" && \
+ for opt in $$OPTS; do grep "^\.IP $$opt$$" $(srcdir)/curl_multi_setopt.3 >/dev/null || echo Missing $$opt; done > $@
diff --git a/docs/libcurl/Makefile.in b/docs/libcurl/Makefile.in
deleted file mode 100644
index 4815127..0000000
--- a/docs/libcurl/Makefile.in
+++ /dev/null
@@ -1,539 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-#
-#
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = docs/libcurl
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-depcomp =
-am__depfiles_maybe =
-SOURCES =
-DIST_SOURCES =
-man3dir = $(mandir)/man3
-am__installdirs = "$(DESTDIR)$(man3dir)"
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-AUTOMAKE_OPTIONS = foreign no-dependencies
-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_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
-
-HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
- curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
- curl_easy_duphandle.html curl_formadd.html curl_formfree.html \
- curl_getdate.html curl_getenv.html curl_slist_append.html \
- curl_slist_free_all.html curl_version.html curl_version_info.html \
- curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \
- curl_mprintf.html curl_global_init.html curl_global_cleanup.html \
- curl_multi_add_handle.html curl_multi_cleanup.html \
- curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \
- curl_multi_perform.html curl_multi_remove_handle.html \
- curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \
- libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \
- libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \
- curl_share_strerror.html curl_global_init_mem.html \
- libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html \
- curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
- curl_multi_timeout.html curl_formget.html curl_multi_assign.html \
- curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \
- curl_multi_socket_action.html
-
-PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
- curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
- curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \
- curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \
- curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \
- curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \
- curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \
- curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \
- curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \
- curl_multi_remove_handle.pdf curl_share_cleanup.pdf curl_share_init.pdf \
- curl_share_setopt.pdf libcurl.pdf libcurl-multi.pdf libcurl-easy.pdf \
- libcurl-share.pdf libcurl-errors.pdf curl_easy_strerror.pdf \
- curl_multi_strerror.pdf curl_share_strerror.pdf \
- curl_global_init_mem.pdf libcurl-tutorial.pdf curl_easy_reset.pdf \
- curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf \
- curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf \
- curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf \
- curl_easy_send.pdf curl_multi_socket_action.pdf
-
-CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
-EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
- symbols-in-versions
-
-MAN2HTML = roffit --mandir=. < $< >$@
-SUFFIXES = .3 .html
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .3 .html .pdf
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/libcurl/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign docs/libcurl/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man3: $(man3_MANS) $(man_MANS)
- @$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-uninstall-man3:
- @$(NORMAL_UNINSTALL)
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(MANS)
-installdirs:
- for dir in "$(DESTDIR)$(man3dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man: install-man3
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-man
-
-uninstall-man: uninstall-man3
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-man3 \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-info-am uninstall-man \
- uninstall-man3
-
-
-html: $(HTMLPAGES)
-
-.3.html:
- $(MAN2HTML)
-
-pdf: $(PDFPAGES)
-
-.3.pdf:
- @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
- groff -Tps -man $< >$$foo.ps; \
- ps2pdf $$foo.ps $@; \
- rm $$foo.ps; \
- echo "converted $< to $@")
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/docs/libcurl/curl_easy_cleanup.3 b/docs/libcurl/curl_easy_cleanup.3
index 75a3703..e8cd550 100644
--- a/docs/libcurl/curl_easy_cleanup.3
+++ b/docs/libcurl/curl_easy_cleanup.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -22,29 +22,47 @@
.\"
.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
.SH NAME
-curl_easy_cleanup - End a libcurl easy session
+curl_easy_cleanup - End a libcurl easy handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.BI "void curl_easy_cleanup(CURL *" handle ");"
-
.SH DESCRIPTION
This function must be the last function to call for an easy session. It is the
opposite of the \fIcurl_easy_init(3)\fP function and must be called with the
-same \fIhandle\fP as input that the curl_easy_init call returned.
+same \fIhandle\fP as input that a \fIcurl_easy_init(3)\fP call returned.
-This will effectively close all connections this handle has used and possibly
-has kept open until now. Don't call this function if you intend to transfer
-more files.
+This might close all connections this handle has used and possibly has kept
+open until now - unless it was attached to a multi handle while doing the
+transfers. Don't call this function if you intend to transfer more files,
+re-using handles is a key to good performance with libcurl.
-Any uses of the \fBhandle\fP after this function has been called are
-illegal. This kills the handle and all memory associated with it!
+Occasionally you may get your progress callback or header callback called from
+within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using
+\fIcurl_easy_setopt(3)\fP). Like if libcurl decides to shut down the
+connection and the protocol is of a kind that requires a command/response
+sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP.
-With libcurl versions prior to 7.17.: when you've called this, you can safely
-remove all the strings you've previously told libcurl to use, as it won't use
-them anymore now.
+Any use of the \fBhandle\fP after this function has been called and have
+returned, is illegal. \fIcurl_easy_cleanup(3)\fP kills the handle and all
+memory associated with it!
+
+For libcurl versions before 7.17,: after you've called this function, you can
+safely remove all the strings you've previously told libcurl to use, as it
+won't use them anymore now.
.SH RETURN VALUE
None
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ CURLcode res;
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ res = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+}
+.fi
.SH "SEE ALSO"
-.BR curl_easy_init "(3), "
-
+.BR curl_easy_init "(3), " curl_easy_duphandle "(3), "
+.BR curl_easy_reset "(3), "
+.BR curl_multi_cleanup "(3), " curl_multi_remove_handle "(3) "
diff --git a/docs/libcurl/curl_easy_cleanup.html b/docs/libcurl/curl_easy_cleanup.html
deleted file mode 100644
index bc113e6..0000000
--- a/docs/libcurl/curl_easy_cleanup.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_cleanup - End a libcurl easy session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_easy_cleanup(CURL * handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function must be the last function to call for an easy session. It is the opposite of the <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> function and must be called with the same <span Class="emphasis">handle</span> as input that the curl_easy_init call returned.
-<p class="level0">This will effectively close all connections this handle has used and possibly has kept open until now. Don't call this function if you intend to transfer more files.
-<p class="level0">Any uses of the <span Class="bold">handle</span> after this function has been called are illegal. This kills the handle and all memory associated with it!
-<p class="level0">With libcurl versions prior to 7.17.: when you've called this, you can safely remove all the strings you've previously told libcurl to use, as it won't use them anymore now. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_cleanup.pdf b/docs/libcurl/curl_easy_cleanup.pdf
deleted file mode 100644
index 404b42f..0000000
--- a/docs/libcurl/curl_easy_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3
index 3fae30e..34cba58 100644
--- a/docs/libcurl/curl_easy_duphandle.3
+++ b/docs/libcurl/curl_easy_duphandle.3
@@ -1,7 +1,25 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
-.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_duphandle 3 "19 Sep 2014" "libcurl" "libcurl Manual"
.SH NAME
curl_easy_duphandle - Clone a libcurl session handle
.SH SYNOPSIS
@@ -29,5 +47,6 @@
If this function returns NULL, something went wrong and no valid handle was
returned.
.SH "SEE ALSO"
-.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)
+.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_reset "(3),"
+.BR curl_global_init "(3)"
diff --git a/docs/libcurl/curl_easy_duphandle.html b/docs/libcurl/curl_easy_duphandle.html
deleted file mode 100644
index d072ded..0000000
--- a/docs/libcurl/curl_easy_duphandle.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_duphandle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_duphandle - Clone a libcurl session handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURL *curl_easy_duphandle(CURL *handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function will return a new curl handle, a duplicate, using all the options previously set in the input curl <span Class="emphasis">handle</span>. Both handles can subsequently be used independently and they must both be freed with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level0">All strings that the input handle has been told to point to (as opposed to copy) with previous calls to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> using char * inputs, will be pointed to by the new handle as well. You must therefore make sure to keep the data around until both handles have been cleaned up.
-<p class="level0">The new handle will <span Class="bold">not</span> inherit any state information, no connections, no SSL sessions and no cookies.
-<p class="level0"><span Class="bold">Note</span> that even in multi-threaded programs, this function must be called in a synchronous way, the input handle may not be in use when cloned. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and no valid handle was returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_duphandle.pdf b/docs/libcurl/curl_easy_duphandle.pdf
deleted file mode 100644
index 342d3bb..0000000
--- a/docs/libcurl/curl_easy_duphandle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3
index 2c09875..da2b382 100644
--- a/docs/libcurl/curl_easy_escape.3
+++ b/docs/libcurl/curl_easy_escape.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -26,21 +26,32 @@
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
-.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );"
+.BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );"
.ad
.SH DESCRIPTION
-This function converts the given input string to an URL encoded string and
-returns that as a new allocated string. All input characters that are not a-z,
-A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a
-two-digit hexadecimal number).
+This function converts the given input \fIstring\fP to a URL encoded string
+and returns that as a new allocated string. All input characters that are not
+a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped"
+version (%NN where NN is a two-digit hexadecimal number).
-If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
-uses strlen() on the input \fBurl\fP to find out the size.
+If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on
+the input \fIstring\fP to find out the size.
You must \fIcurl_free(3)\fP the returned string when you're done with it.
.SH AVAILABILITY
Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function.
.SH RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ char *output = curl_easy_escape(curl, "data to convert", 15);
+ if(output) {
+ printf("Encoded: %s\n", output);
+ curl_free(output);
+ }
+}}
+.fi
.SH "SEE ALSO"
-.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 2396
+.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986
diff --git a/docs/libcurl/curl_easy_escape.html b/docs/libcurl/curl_easy_escape.html
deleted file mode 100644
index 1ecf464..0000000
--- a/docs/libcurl/curl_easy_escape.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_escape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_escape - URL encodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_easy_escape( CURL * curl , char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function converts the given input string to an URL encoded string and returns that as a new allocated string. All input characters that are not a-z, A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number).
-<p class="level0">If the <span Class="bold">length</span> argument is set to 0 (zero), <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> uses strlen() on the input <span Class="bold">url</span> to find out the size.
-<p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_escape.html">curl_escape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_unescape.html">curl_easy_unescape (3)</a> <a class="manpage" href="./curl_free.html"> curl_free (3)</a> <span Class="manpage"> RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_escape.pdf b/docs/libcurl/curl_easy_escape.pdf
deleted file mode 100644
index 7945390..0000000
--- a/docs/libcurl/curl_easy_escape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3
index 9f298ed..d48ca04 100644
--- a/docs/libcurl/curl_easy_getinfo.3
+++ b/docs/libcurl/curl_easy_getinfo.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -44,11 +44,13 @@
.IP CURLINFO_EFFECTIVE_URL
Pass a pointer to a char pointer to receive the last used effective URL.
.IP CURLINFO_RESPONSE_CODE
-Pass a pointer to a long to receive the last received HTTP or FTP code. This
-option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This
-will be zero if no server response code has been received. Note that a proxy's
-CONNECT response should be read with \fICURLINFO_HTTP_CONNECTCODE\fP and not
-this.
+Pass a pointer to a long to receive the last received HTTP, FTP or SMTP
+response code. This option was previously known as CURLINFO_HTTP_CODE in
+libcurl 7.10.7 and earlier. The value will be zero if no server response code
+has been received. Note that a proxy's CONNECT response should be read with
+\fICURLINFO_HTTP_CONNECTCODE\fP and not this.
+
+Support for SMTP responses added in 7.25.0.
.IP CURLINFO_HTTP_CONNECTCODE
Pass a pointer to a long to receive the last received proxy response code to a
CONNECT request.
@@ -58,9 +60,9 @@
-1, it can be because of many reasons (unknown, the server hides it or the
server doesn't support the command that tells document time etc) and the time
of the document is unknown. Note that you must tell the server to collect this
-information before the transfer is made, by using the CURLOPT_FILETIME option
-to \fIcurl_easy_setopt(3)\fP or you will unconditionally get a -1 back. (Added
-in 7.5)
+information before the transfer is made, by using the
+\fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or you will
+unconditionally get a -1 back. (Added in 7.5)
.IP CURLINFO_TOTAL_TIME
Pass a pointer to a double to receive the total time in seconds for the
previous transfer, including name resolving, TCP connect etc.
@@ -74,18 +76,19 @@
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the SSL/SSH connect/handshake to the remote host was completed.
This time is most often very near to the PRETRANSFER time, except for cases
-such as HTTP pippelining where the pretransfer time can be delayed due to
-waits in line for the pipeline and more. (Added in 7.19.0)
+such as HTTP pipelining where the pretransfer time can be delayed due to waits
+in line for the pipeline and more. (Added in 7.19.0)
.IP CURLINFO_PRETRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the file transfer is just about to begin. This includes all
pre-transfer commands and negotiations that are specific to the particular
-protocol(s) involved.
+protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
+specific request that triggers a transfer.
.IP CURLINFO_STARTTRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the
-start until the first byte is just about to be transferred. This includes
-CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
-the result.
+start until the first byte is received by libcurl. This includes
+CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the
+result.
.IP CURLINFO_REDIRECT_TIME
Pass a pointer to a double to receive the total time, in seconds, it took for
all redirection steps include name lookup, connect, pretransfer and transfer
@@ -96,17 +99,19 @@
actually followed. (Added in 7.9.7)
.IP CURLINFO_REDIRECT_URL
Pass a pointer to a char pointer to receive the URL a redirect \fIwould\fP
-take you to if you would enable CURLOPT_FOLLOWLOCATION. This can come very
-handy if you think using the built-in libcurl redirect logic isn't good enough
-for you but you would still prefer to avoid implementing all the magic of
-figuring out the new URL. (Added in 7.18.2)
+take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come
+very handy if you think using the built-in libcurl redirect logic isn't good
+enough for you but you would still prefer to avoid implementing all the magic
+of figuring out the new URL. (Added in 7.18.2)
.IP CURLINFO_SIZE_UPLOAD
Pass a pointer to a double to receive the total amount of bytes that were
uploaded.
.IP CURLINFO_SIZE_DOWNLOAD
Pass a pointer to a double to receive the total amount of bytes that were
downloaded. The amount is only for the latest transfer and will be reset again
-for each new transfer.
+for each new transfer. This counts actual payload data, what's also commonly
+called body. All meta and header data are excluded and will not be counted in
+this number.
.IP CURLINFO_SPEED_DOWNLOAD
Pass a pointer to a double to receive the average download speed that curl
measured for the complete download. Measured in bytes/second.
@@ -122,8 +127,8 @@
than one request if FOLLOWLOCATION is true.
.IP CURLINFO_SSL_VERIFYRESULT
Pass a pointer to a long to receive the result of the certification
-verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to
-\fIcurl_easy_setopt(3)\fP).
+verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
+option to \fIcurl_easy_setopt(3)\fP).
.IP CURLINFO_SSL_ENGINES
Pass the address of a 'struct curl_slist *' to receive a linked-list of
OpenSSL crypto-engines supported. Note that engines are normally implemented
@@ -145,21 +150,22 @@
protocol used doesn't support this.
.IP CURLINFO_PRIVATE
Pass a pointer to a char pointer to receive the pointer to the private data
-associated with the curl handle (set with the CURLOPT_PRIVATE option to
-\fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
+associated with the curl handle (set with the \fICURLOPT_PRIVATE(3)\fP option
+to \fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
value is returned as a char pointer, although effectively being a 'void *'.
(Added in 7.10.3)
.IP CURLINFO_HTTPAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available. The meaning of the bits is explained in the
-CURLOPT_HTTPAUTH option for \fIcurl_easy_setopt(3)\fP. (Added in 7.10.8)
+\fICURLOPT_HTTPAUTH(3)\fP option for \fIcurl_easy_setopt(3)\fP. (Added in
+7.10.8)
.IP CURLINFO_PROXYAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available for your proxy authentication. (Added in 7.10.8)
.IP CURLINFO_OS_ERRNO
Pass a pointer to a long to receive the errno variable from a connect failure.
Note that the value is only set on failure, it is not reset upon a
-successfull operation. (Added in 7.12.2)
+successful operation. (Added in 7.12.2)
.IP CURLINFO_NUM_CONNECTS
Pass a pointer to a long to receive how many new connections libcurl had to
create to achieve the previous transfer (only the successful connects are
@@ -196,8 +202,8 @@
session. If the socket is no longer valid, -1 is returned. When you finish
working with the socket, you must call curl_easy_cleanup() as usual and let
libcurl close the socket and cleanup other resources associated with the
-handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
-(Added in 7.15.2)
+handle. This is typically used in combination with
+\fICURLOPT_CONNECT_ONLY(3)\fP. (Added in 7.15.2)
NOTE: this API is not really working on win64, since the SOCKET type on win64
is 64 bit large while its 'long' is only 32 bits.
@@ -206,20 +212,54 @@
path of the entry path. That is the initial path libcurl ended up in when
logging on to the remote FTP server. This stores a NULL as pointer if
something is wrong. (Added in 7.15.4)
+
+Also works for SFTP since 7.21.4
.IP CURLINFO_CERTINFO
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
struct that holds a number of linked lists with info about the certificate
-chain, assuming you had CURLOPT_CERTINFO enabled when the previous request was
-done. The struct reports how many certs it found and then you can extract info
-for each of those certs by following the linked lists. The info chain is
-provided in a series of data in the format "name:content" where the content is
-for the specific named data. See also the certinfo.c example. NOTE: this
-option is only available in libcurl built with OpenSSL support. (Added in
-7.19.1)
+chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the previous
+request was done. The struct reports how many certs it found and then you can
+extract info for each of those certs by following the linked lists. The info
+chain is provided in a series of data in the format "name:content" where the
+content is for the specific named data. See also the certinfo.c example. NOTE:
+this option is only available in libcurl built with OpenSSL, NSS or GSKit
+support. (Added in 7.19.1)
+.IP CURLINFO_TLS_SESSION
+Pass a pointer to a 'struct curl_tlssessioninfo *'. The pointer will be
+initialized to refer to a 'struct curl_tlssessioninfo *' that will contain an
+enum indicating the SSL library used for the handshake and the respective
+internal TLS session structure of this underlying SSL library.
+
+This may then be used to extract certificate information in a format
+convenient for further processing, such as manual validation. NOTE: this
+option may not be available for all SSL backends; unsupported SSL backends
+will return 'CURLSSLBACKEND_NONE' to indicate that they are not supported;
+this does not mean that no SSL backend was used. (Added in 7.34.0)
+
+.nf
+struct curl_tlssessioninfo {
+ curl_sslbackend backend;
+ void *internals;
+};
+.fi
+
+The \fIinternals\fP struct member will point to a TLS library specific pointer
+with the following underlying types:
+.RS
+.IP OpenSSL
+SSL_CTX *
+.IP GnuTLS
+gnutls_session_t
+.IP NSS
+PRFileDesc *
+.IP gskit
+gsk_handle
+.RE
+
.IP CURLINFO_CONDITION_UNMET
Pass a pointer to a long to receive the number 1 if the condition provided in
-the previous request didn't match (see \fICURLOPT_TIMECONDITION\fP). Alas, if
-this returns a 1 you know that the reason you didn't get data in return is
+the previous request didn't match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas,
+if this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met. (Added in 7.19.4)
.IP CURLINFO_RTSP_SESSION_ID
@@ -227,7 +267,7 @@
most recent RTSP Session ID.
Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CLIENT_CSEQ
Pass a pointer to a long to receive the next CSeq that will be used by the
application.
@@ -239,7 +279,7 @@
unimplemented).\fP
Applications wishing to resume an RTSP session on another connection should
-retreive this info before closing the active connection.
+retrieve this info before closing the active connection.
.IP CURLINFO_RTSP_CSEQ_RECV
Pass a pointer to a long to receive the most recently received CSeq from the
server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you
@@ -273,7 +313,7 @@
and negotiations that are specific to the particular protocol(s) involved.
.IP STARTTRANSFER
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
-first byte is just about to be transferred.
+first byte is received by libcurl.
.IP TOTAL
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
.IP REDIRECT
diff --git a/docs/libcurl/curl_easy_getinfo.html b/docs/libcurl/curl_easy_getinfo.html
deleted file mode 100644
index 5b949e9..0000000
--- a/docs/libcurl/curl_easy_getinfo.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<html><head>
-<title>curl_easy_getinfo man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_getinfo - extract information from a curl handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Request internal information from the curl session with this function. The third argument <span Class="bold">MUST</span> be a pointer to a long, a pointer to a char *, a pointer to a struct curl_slist * or a pointer to a double (as this documentation describes further down). The data pointed-to will be filled in accordingly and can be relied upon only if the function returns CURLE_OK. Use this function AFTER a performed transfer if you want to get transfer- oriented data.
-<p class="level0">You should not free the memory returned by this function unless it is explicitly mentioned below. <a name="AVAILABLE"></a><h2 class="nroffsh">AVAILABLE INFORMATION</h2>
-<p class="level0">The following information can be extracted:
-<p class="level0"><a name="CURLINFOEFFECTIVEURL"></a><span class="nroffip">CURLINFO_EFFECTIVE_URL</span>
-<p class="level1">Pass a pointer to a char pointer to receive the last used effective URL.
-<p class="level0"><a name="CURLINFORESPONSECODE"></a><span class="nroffip">CURLINFO_RESPONSE_CODE</span>
-<p class="level1">Pass a pointer to a long to receive the last received HTTP or FTP code. This option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This will be zero if no server response code has been received. Note that a proxy's CONNECT response should be read with <a class="emphasis" href="#CURLINFOHTTPCONNECTCODE">CURLINFO_HTTP_CONNECTCODE</a> and not this.
-<p class="level0"><a name="CURLINFOHTTPCONNECTCODE"></a><span class="nroffip">CURLINFO_HTTP_CONNECTCODE</span>
-<p class="level1">Pass a pointer to a long to receive the last received proxy response code to a CONNECT request.
-<p class="level0"><a name="CURLINFOFILETIME"></a><span class="nroffip">CURLINFO_FILETIME</span>
-<p class="level1">Pass a pointer to a long to receive the remote time of the retrieved document (in number of seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1, it can be because of many reasons (unknown, the server hides it or the server doesn't support the command that tells document time etc) and the time of the document is unknown. Note that you must tell the server to collect this information before the transfer is made, by using the CURLOPT_FILETIME option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> or you will unconditionally get a -1 back. (Added in 7.5)
-<p class="level0"><a name="CURLINFOTOTALTIME"></a><span class="nroffip">CURLINFO_TOTAL_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the total time in seconds for the previous transfer, including name resolving, TCP connect etc.
-<p class="level0"><a name="CURLINFONAMELOOKUPTIME"></a><span class="nroffip">CURLINFO_NAMELOOKUP_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the name resolving was completed.
-<p class="level0"><a name="CURLINFOCONNECTTIME"></a><span class="nroffip">CURLINFO_CONNECT_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the connect to the remote host (or proxy) was completed.
-<p class="level0"><a name="CURLINFOAPPCONNECTTIME"></a><span class="nroffip">CURLINFO_APPCONNECT_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the SSL/SSH connect/handshake to the remote host was completed. This time is most often very near to the PRETRANSFER time, except for cases such as HTTP pippelining where the pretransfer time can be delayed due to waits in line for the pipeline and more. (Added in 7.19.0)
-<p class="level0"><a name="CURLINFOPRETRANSFERTIME"></a><span class="nroffip">CURLINFO_PRETRANSFER_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level0"><a name="CURLINFOSTARTTRANSFERTIME"></a><span class="nroffip">CURLINFO_STARTTRANSFER_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be transferred. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result.
-<p class="level0"><a name="CURLINFOREDIRECTTIME"></a><span class="nroffip">CURLINFO_REDIRECT_TIME</span>
-<p class="level1">Pass a pointer to a double to receive the total time, in seconds, it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. CURLINFO_REDIRECT_TIME contains the complete execution time for multiple redirections. (Added in 7.9.7)
-<p class="level0"><a name="CURLINFOREDIRECTCOUNT"></a><span class="nroffip">CURLINFO_REDIRECT_COUNT</span>
-<p class="level1">Pass a pointer to a long to receive the total number of redirections that were actually followed. (Added in 7.9.7)
-<p class="level0"><a name="CURLINFOREDIRECTURL"></a><span class="nroffip">CURLINFO_REDIRECT_URL</span>
-<p class="level1">Pass a pointer to a char pointer to receive the URL a redirect <span Class="emphasis">would</span> take you to if you would enable CURLOPT_FOLLOWLOCATION. This can come very handy if you think using the built-in libcurl redirect logic isn't good enough for you but you would still prefer to avoid implementing all the magic of figuring out the new URL. (Added in 7.18.2)
-<p class="level0"><a name="CURLINFOSIZEUPLOAD"></a><span class="nroffip">CURLINFO_SIZE_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the total amount of bytes that were uploaded.
-<p class="level0"><a name="CURLINFOSIZEDOWNLOAD"></a><span class="nroffip">CURLINFO_SIZE_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the total amount of bytes that were downloaded. The amount is only for the latest transfer and will be reset again for each new transfer.
-<p class="level0"><a name="CURLINFOSPEEDDOWNLOAD"></a><span class="nroffip">CURLINFO_SPEED_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the average download speed that curl measured for the complete download. Measured in bytes/second.
-<p class="level0"><a name="CURLINFOSPEEDUPLOAD"></a><span class="nroffip">CURLINFO_SPEED_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the average upload speed that curl measured for the complete upload. Measured in bytes/second.
-<p class="level0"><a name="CURLINFOHEADERSIZE"></a><span class="nroffip">CURLINFO_HEADER_SIZE</span>
-<p class="level1">Pass a pointer to a long to receive the total size of all the headers received. Measured in number of bytes.
-<p class="level0"><a name="CURLINFOREQUESTSIZE"></a><span class="nroffip">CURLINFO_REQUEST_SIZE</span>
-<p class="level1">Pass a pointer to a long to receive the total size of the issued requests. This is so far only for HTTP requests. Note that this may be more than one request if FOLLOWLOCATION is true.
-<p class="level0"><a name="CURLINFOSSLVERIFYRESULT"></a><span class="nroffip">CURLINFO_SSL_VERIFYRESULT</span>
-<p class="level1">Pass a pointer to a long to receive the result of the certification verification that was requested (using the CURLOPT_SSL_VERIFYPEER option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>).
-<p class="level0"><a name="CURLINFOSSLENGINES"></a><span class="nroffip">CURLINFO_SSL_ENGINES</span>
-<p class="level1">Pass the address of a 'struct curl_slist *' to receive a linked-list of OpenSSL crypto-engines supported. Note that engines are normally implemented in separate dynamic libraries. Hence not all the returned engines may be available at run-time. <span Class="bold">NOTE:</span> you must call <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3)
-<p class="level0"><a name="CURLINFOCONTENTLENGTHDOWNLOAD"></a><span class="nroffip">CURLINFO_CONTENT_LENGTH_DOWNLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the content-length of the download. This is the value read from the Content-Length: field. Since 7.19.4, this returns -1 if the size isn't known.
-<p class="level0"><a name="CURLINFOCONTENTLENGTHUPLOAD"></a><span class="nroffip">CURLINFO_CONTENT_LENGTH_UPLOAD</span>
-<p class="level1">Pass a pointer to a double to receive the specified size of the upload. Since 7.19.4, this returns -1 if the size isn't known.
-<p class="level0"><a name="CURLINFOCONTENTTYPE"></a><span class="nroffip">CURLINFO_CONTENT_TYPE</span>
-<p class="level1">Pass a pointer to a char pointer to receive the content-type of the downloaded object. This is the value read from the Content-Type: field. If you get NULL, it means that the server didn't send a valid Content-Type header or that the protocol used doesn't support this.
-<p class="level0"><a name="CURLINFOPRIVATE"></a><span class="nroffip">CURLINFO_PRIVATE</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to the private data associated with the curl handle (set with the CURLOPT_PRIVATE option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>). Please note that for internal reasons, the value is returned as a char pointer, although effectively being a 'void *'. (Added in 7.10.3)
-<p class="level0"><a name="CURLINFOHTTPAUTHAVAIL"></a><span class="nroffip">CURLINFO_HTTPAUTH_AVAIL</span>
-<p class="level1">Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available. The meaning of the bits is explained in the CURLOPT_HTTPAUTH option for <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>. (Added in 7.10.8)
-<p class="level0"><a name="CURLINFOPROXYAUTHAVAIL"></a><span class="nroffip">CURLINFO_PROXYAUTH_AVAIL</span>
-<p class="level1">Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication. (Added in 7.10.8)
-<p class="level0"><a name="CURLINFOOSERRNO"></a><span class="nroffip">CURLINFO_OS_ERRNO</span>
-<p class="level1">Pass a pointer to a long to receive the errno variable from a connect failure. Note that the value is only set on failure, it is not reset upon a successfull operation. (Added in 7.12.2)
-<p class="level0"><a name="CURLINFONUMCONNECTS"></a><span class="nroffip">CURLINFO_NUM_CONNECTS</span>
-<p class="level1">Pass a pointer to a long to receive how many new connections libcurl had to create to achieve the previous transfer (only the successful connects are counted). Combined with <a class="emphasis" href="#CURLINFOREDIRECTCOUNT">CURLINFO_REDIRECT_COUNT</a> you are able to know how many times libcurl successfully reused existing connection(s) or not. See the Connection Options of <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> to see how libcurl tries to make persistent connections to save time. (Added in 7.12.3)
-<p class="level0"><a name="CURLINFOPRIMARYIP"></a><span class="nroffip">CURLINFO_PRIMARY_IP</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to a zero-terminated string holding the IP address of the most recent connection done with this <span Class="bold">curl</span> handle. This string may be IPv6 if that's enabled. Note that you get a pointer to a memory area that will be re-used at next request so you need to copy the string if you want to keep the information. (Added in 7.19.0)
-<p class="level0"><a name="CURLINFOPRIMARYPORT"></a><span class="nroffip">CURLINFO_PRIMARY_PORT</span>
-<p class="level1">Pass a pointer to a long to receive the destination port of the most recent connection done with this <span Class="bold">curl</span> handle. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOLOCALIP"></a><span class="nroffip">CURLINFO_LOCAL_IP</span>
-<p class="level1">Pass a pointer to a char pointer to receive the pointer to a zero-terminated string holding the local (source) IP address of the most recent connection done with this <span Class="bold">curl</span> handle. This string may be IPv6 if that's enabled. The same restrictions apply as to <a class="emphasis" href="#CURLINFOPRIMARYIP">CURLINFO_PRIMARY_IP</a>. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOLOCALPORT"></a><span class="nroffip">CURLINFO_LOCAL_PORT</span>
-<p class="level1">Pass a pointer to a long to receive the local (source) port of the most recent connection done with this <span Class="bold">curl</span> handle. (Added in 7.21.0)
-<p class="level0"><a name="CURLINFOCOOKIELIST"></a><span class="nroffip">CURLINFO_COOKIELIST</span>
-<p class="level1">Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all cookies cURL knows (expired ones, too). Don't forget to <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> the list after it has been used. If there are no cookies (cookies for the handle have not been enabled or simply none have been received) 'struct curl_slist *' will be set to point to NULL. (Added in 7.14.1)
-<p class="level0"><a name="CURLINFOLASTSOCKET"></a><span class="nroffip">CURLINFO_LASTSOCKET</span>
-<p class="level1">Pass a pointer to a long to receive the last socket used by this curl session. If the socket is no longer valid, -1 is returned. When you finish working with the socket, you must call curl_easy_cleanup() as usual and let libcurl close the socket and cleanup other resources associated with the handle. This is typically used in combination with <span Class="emphasis">CURLOPT_CONNECT_ONLY</span>. (Added in 7.15.2)
-<p class="level1">NOTE: this API is not really working on win64, since the SOCKET type on win64 is 64 bit large while its 'long' is only 32 bits.
-<p class="level0"><a name="CURLINFOFTPENTRYPATH"></a><span class="nroffip">CURLINFO_FTP_ENTRY_PATH</span>
-<p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the path of the entry path. That is the initial path libcurl ended up in when logging on to the remote FTP server. This stores a NULL as pointer if something is wrong. (Added in 7.15.4)
-<p class="level0"><a name="CURLINFOCERTINFO"></a><span class="nroffip">CURLINFO_CERTINFO</span>
-<p class="level1">Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to struct that holds a number of linked lists with info about the certificate chain, assuming you had CURLOPT_CERTINFO enabled when the previous request was done. The struct reports how many certs it found and then you can extract info for each of those certs by following the linked lists. The info chain is provided in a series of data in the format "name:content" where the content is for the specific named data. See also the certinfo.c example. NOTE: this option is only available in libcurl built with OpenSSL support. (Added in 7.19.1)
-<p class="level0"><a name="CURLINFOCONDITIONUNMET"></a><span class="nroffip">CURLINFO_CONDITION_UNMET</span>
-<p class="level1">Pass a pointer to a long to receive the number 1 if the condition provided in the previous request didn't match (see <span Class="emphasis">CURLOPT_TIMECONDITION</span>). Alas, if this returns a 1 you know that the reason you didn't get data in return is because it didn't fulfill the condition. The long ths argument points to will get a zero stored if the condition instead was met. (Added in 7.19.4)
-<p class="level0"><a name="CURLINFORTSPSESSIONID"></a><span class="nroffip">CURLINFO_RTSP_SESSION_ID</span>
-<p class="level1">Pass a pointer to a char pointer to receive a pointer to a string holding the most recent RTSP Session ID.
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection.
-<p class="level0"><a name="CURLINFORTSPCLIENTCSEQ"></a><span class="nroffip">CURLINFO_RTSP_CLIENT_CSEQ</span>
-<p class="level1">Pass a pointer to a long to receive the next CSeq that will be used by the application.
-<p class="level0"><a name="CURLINFORTSPSERVERCSEQ"></a><span class="nroffip">CURLINFO_RTSP_SERVER_CSEQ</span>
-<p class="level1">Pass a pointer to a long to receive the next server CSeq that will be expected by the application.
-<p class="level1"><span class="emphasis">(NOTE: listening for server initiated requests is currently unimplemented).</span>
-<p class="level1">Applications wishing to resume an RTSP session on another connection should retreive this info before closing the active connection.
-<p class="level0"><a name="CURLINFORTSPCSEQRECV"></a><span class="nroffip">CURLINFO_RTSP_CSEQ_RECV</span>
-<p class="level1">Pass a pointer to a long to receive the most recently received CSeq from the server. If your application encounters a <span Class="emphasis">CURLE_RTSP_CSEQ_ERROR</span> then you may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this value. <a name="TIMES"></a><h2 class="nroffsh">TIMES</h2>
-<p class="level0"><pre>
-<p class="level0">An overview of the six time values available from curl_easy_getinfo()
- <p class="level0">curl_easy_perform()
- |
- |--NAMELOOKUP
- |--|--CONNECT
- |--|--|--APPCONNECT
- |--|--|--|--PRETRANSFER
- |--|--|--|--|--STARTTRANSFER
- |--|--|--|--|--|--TOTAL
- |--|--|--|--|--|--REDIRECT
- </pre>
-
-<p class="level0">
-<p class="level0"><a name="NAMELOOKUP"></a><span class="nroffip">NAMELOOKUP</span>
-<p class="level1"><a class="emphasis" href="#CURLINFONAMELOOKUPTIME">CURLINFO_NAMELOOKUP_TIME</a>. The time it took from the start until the name resolving was completed.
-<p class="level0"><a name="CONNECT"></a><span class="nroffip">CONNECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOCONNECTTIME">CURLINFO_CONNECT_TIME</a>. The time it took from the start until the connect to the remote host (or proxy) was completed.
-<p class="level0"><a name="APPCONNECT"></a><span class="nroffip">APPCONNECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOAPPCONNECTTIME">CURLINFO_APPCONNECT_TIME</a>. The time it took from the start until the SSL connect/handshake with the remote host was completed. (Added in in 7.19.0)
-<p class="level0"><a name="PRETRANSFER"></a><span class="nroffip">PRETRANSFER</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOPRETRANSFERTIME">CURLINFO_PRETRANSFER_TIME</a>. The time it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
-<p class="level0"><a name="STARTTRANSFER"></a><span class="nroffip">STARTTRANSFER</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOSTARTTRANSFERTIME">CURLINFO_STARTTRANSFER_TIME</a>. The time it took from the start until the first byte is just about to be transferred.
-<p class="level0"><a name="TOTAL"></a><span class="nroffip">TOTAL</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOTOTALTIME">CURLINFO_TOTAL_TIME</a>. Total time of the previous request.
-<p class="level0"><a name="REDIRECT"></a><span class="nroffip">REDIRECT</span>
-<p class="level1"><a class="emphasis" href="#CURLINFOREDIRECTTIME">CURLINFO_REDIRECT_TIME</a>. The time it took for all redirection steps include name lookup, connect, pretransfer and transfer before final transaction was started. So, this is zero if no redirection took place. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If the operation was successful, CURLE_OK is returned. Otherwise an appropriate error code will be returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_getinfo.pdf b/docs/libcurl/curl_easy_getinfo.pdf
deleted file mode 100644
index 0a89a84..0000000
--- a/docs/libcurl/curl_easy_getinfo.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_init.3 b/docs/libcurl/curl_easy_init.3
index 478db5c..4f7f004 100644
--- a/docs/libcurl/curl_easy_init.3
+++ b/docs/libcurl/curl_easy_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
.SH NAME
curl_easy_init - Start a libcurl easy session
@@ -6,26 +26,34 @@
.B #include <curl/curl.h>
.BI "CURL *curl_easy_init( );"
-
.SH DESCRIPTION
This function must be the first function to call, and it returns a CURL easy
-handle that you must use as input to other easy-functions. curl_easy_init
-initializes curl and this call \fBMUST\fP have a corresponding call to
+handle that you must use as input to other functions in the easy
+interface. This call \fBMUST\fP have a corresponding call to
\fIcurl_easy_cleanup(3)\fP when the operation is complete.
-If you did not already call \fIcurl_global_init(3)\fP,
-\fIcurl_easy_init(3)\fP does it automatically.
-This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
-not thread-safe, and it may result in resource problems because there is
-no corresponding cleanup.
+If you did not already call \fIcurl_global_init(3)\fP, \fIcurl_easy_init(3)\fP
+does it automatically. This may be lethal in multi-threaded cases, since
+\fIcurl_global_init(3)\fP is not thread-safe, and it may result in resource
+problems because there is no corresponding cleanup.
-You are strongly advised to not allow this automatic behaviour, by
-calling \fIcurl_global_init(3)\fP yourself properly.
-See the description in \fBlibcurl\fP(3) of global environment
-requirements for details of how to use this function.
-
+You are strongly advised to not allow this automatic behaviour, by calling
+\fIcurl_global_init(3)\fP yourself properly. See the description in
+\fBlibcurl\fP(3) of global environment requirements for details of how to use
+this function.
.SH RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the
other curl functions.
+.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_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"
+.BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3), "
+.BR curl_easy_perform "(3) "
diff --git a/docs/libcurl/curl_easy_init.html b/docs/libcurl/curl_easy_init.html
deleted file mode 100644
index 7e63cbd..0000000
--- a/docs/libcurl/curl_easy_init.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_init - Start a libcurl easy session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURL *curl_easy_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function must be the first function to call, and it returns a CURL easy handle that you must use as input to other easy-functions. curl_easy_init initializes curl and this call <span Class="bold">MUST</span> have a corresponding call to <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> when the operation is complete.
-<p class="level0">If you did not already call <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a>, <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> does it automatically. This may be lethal in multi-threaded cases, since <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> is not thread-safe, and it may result in resource problems because there is no corresponding cleanup.
-<p class="level0">You are strongly advised to not allow this automatic behaviour, by calling <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> yourself properly. See the description in <span Class="bold">libcurl</span>(3) of global environment requirements for details of how to use this function.
-<p class="level0"><a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_init.pdf b/docs/libcurl/curl_easy_init.pdf
deleted file mode 100644
index 6ddd483..0000000
--- a/docs/libcurl/curl_easy_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_pause.3 b/docs/libcurl/curl_easy_pause.3
index 4d16ecf..0f6ad5a 100644
--- a/docs/libcurl/curl_easy_pause.3
+++ b/docs/libcurl/curl_easy_pause.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
.SH NAME
curl_easy_pause - pause and unpause a connection
@@ -11,15 +31,17 @@
Using this function, you can explicitly mark a running connection to get
paused, and you can unpause a connection that was previously paused.
-A connection can be paused by using this function or by letting the read
-or the write callbacks return the proper magic return code
+A connection can be paused by using this function or by letting the read or
+the write callbacks return the proper magic return code
(\fICURL_READFUNC_PAUSE\fP and \fICURL_WRITEFUNC_PAUSE\fP). A write callback
that returns pause signals to the library that it couldn't take care of any
data at all, and that data will then be delivered again to the callback when
the writing is later unpaused.
-NOTE: while it may feel tempting, take care and notice that you cannot call
-this function from another thread.
+While it may feel tempting, take care and notice that you cannot call this
+function from another thread. To unpause, you may for example call it from the
+progress callback (\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at
+least once per second, even if the connection is paused.
When this function is called to unpause reading, the chance is high that you
will get your write callback called before this function returns.
@@ -32,11 +54,11 @@
.IP CURLPAUSE_RECV
Pause receiving data. There will be no data received on this connection until
this function is called again without this bit set. Thus, the write callback
-(\fICURLOPT_WRITEFUNCTION\fP) won't be called.
+(\fICURLOPT_WRITEFUNCTION(3)\fP) won't be called.
.IP CURLPAUSE_SEND
Pause sending data. There will be no data sent on this connection until this
function is called again without this bit set. Thus, the read callback
-(\fICURLOPT_READFUNCTION\fP) won't be called.
+(\fICURLOPT_READFUNCTION(3)\fP) won't be called.
.IP CURLPAUSE_ALL
Convenience define that pauses both directions.
.IP CURLPAUSE_CONT
@@ -45,9 +67,25 @@
CURLE_OK (zero) means that the option was set properly, and a non-zero return
code means something wrong occurred after the new state was set. See the
\fIlibcurl-errors(3)\fP man page for the full list with descriptions.
+.SH LIMITATIONS
+The pausing of transfers does not work with protocols that work without
+network connectivity, like FILE://. Trying to pause such a transfer, in any
+direction, will cause problems in the worst case or an error in the best case.
.SH AVAILABILITY
This function was added in libcurl 7.18.0. Before this version, there was no
explicit support for pausing transfers.
+.SH "USAGE WITH THE MULTI-SOCKET INTERFACE"
+Before libcurl 7.32.0, when a specific handle was unpaused with this function,
+there was no particular forced rechecking or similar of the socket's state,
+which made the continuation of the transfer get delayed until next
+multi-socket call invoke or even longer. Alternatively, the user could
+forcibly call for example curl_multi_socket_all(3) - with a rather hefty
+performance penalty.
+
+Starting in libcurl 7.32.0, unpausing a transfer will schedule a timeout
+trigger for that handle 1 millisecond into the future, so that a
+curl_multi_socket_action( ... CURL_SOCKET_TIMEOUT) can be used immediately
+afterwards to get the transfer going again as desired.
.SH "MEMORY USE"
When pausing a read by returning the magic return code from a write callback,
the read data is already in libcurl's internal buffers so it'll have to keep
diff --git a/docs/libcurl/curl_easy_pause.html b/docs/libcurl/curl_easy_pause.html
deleted file mode 100644
index a82a77b..0000000
--- a/docs/libcurl/curl_easy_pause.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<html><head>
-<title>curl_easy_pause man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_pause - pause and unpause a connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_pause(CURL *handle , int bitmask );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Using this function, you can explicitly mark a running connection to get paused, and you can unpause a connection that was previously paused.
-<p class="level0">A connection can be paused by using this function or by letting the read or the write callbacks return the proper magic return code (<span Class="emphasis">CURL_READFUNC_PAUSE</span> and <span Class="emphasis">CURL_WRITEFUNC_PAUSE</span>). A write callback that returns pause signals to the library that it couldn't take care of any data at all, and that data will then be delivered again to the callback when the writing is later unpaused.
-<p class="level0">NOTE: while it may feel tempting, take care and notice that you cannot call this function from another thread.
-<p class="level0">When this function is called to unpause reading, the chance is high that you will get your write callback called before this function returns.
-<p class="level0">The <span Class="bold">handle</span> argument is of course identifying the handle that operates on the connection you want to pause or unpause.
-<p class="level0">The <span Class="bold">bitmask</span> argument is a set of bits that sets the new state of the connection. The following bits can be used:
-<p class="level0"><a name="CURLPAUSERECV"></a><span class="nroffip">CURLPAUSE_RECV</span>
-<p class="level1">Pause receiving data. There will be no data received on this connection until this function is called again without this bit set. Thus, the write callback (<span Class="emphasis">CURLOPT_WRITEFUNCTION</span>) won't be called.
-<p class="level0"><a name="CURLPAUSESEND"></a><span class="nroffip">CURLPAUSE_SEND</span>
-<p class="level1">Pause sending data. There will be no data sent on this connection until this function is called again without this bit set. Thus, the read callback (<span Class="emphasis">CURLOPT_READFUNCTION</span>) won't be called.
-<p class="level0"><a name="CURLPAUSEALL"></a><span class="nroffip">CURLPAUSE_ALL</span>
-<p class="level1">Convenience define that pauses both directions.
-<p class="level0"><a name="CURLPAUSECONT"></a><span class="nroffip">CURLPAUSE_CONT</span>
-<p class="level1">Convenience define that unpauses both directions <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLE_OK (zero) means that the option was set properly, and a non-zero return code means something wrong occurred after the new state was set. See the <span Class="emphasis">libcurl-errors(3)</span> man page for the full list with descriptions. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.18.0. Before this version, there was no explicit support for pausing transfers. <a name="MEMORY"></a><h2 class="nroffsh">MEMORY USE</h2>
-<p class="level0">When pausing a read by returning the magic return code from a write callback, the read data is already in libcurl's internal buffers so it'll have to keep it in an allocated buffer until the reading is again unpaused using this function.
-<p class="level0">If the downloaded data is compressed and is asked to get uncompressed automatically on download, libcurl will continue to uncompress the entire downloaded chunk and it will cache the data uncompressed. This has the side- effect that if you download something that is compressed a lot, it can result in a very large data amount needing to be allocated to save the data during the pause. This said, you should probably consider not using paused reading if you allow libcurl to uncompress data automatically. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_cleanup.html">curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_pause.pdf b/docs/libcurl/curl_easy_pause.pdf
deleted file mode 100644
index ddc8dfd..0000000
--- a/docs/libcurl/curl_easy_pause.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_perform.3 b/docs/libcurl/curl_easy_perform.3
index 1ed006b..fc8c59e 100644
--- a/docs/libcurl/curl_easy_perform.3
+++ b/docs/libcurl/curl_easy_perform.3
@@ -1,39 +1,75 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
-curl_easy_perform - Perform a file transfer
+curl_easy_perform - perform a blocking file transfer
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
-.BI "CURLcode curl_easy_perform(CURL *" handle ");"
+.BI "CURLcode curl_easy_perform(CURL *" easy_handle ");"
.ad
.SH DESCRIPTION
-This function is called after the init and all the \fIcurl_easy_setopt(3)\fP
-calls are made, and will perform the transfer as described in the options. It
-must be called with the same
-.I handle
-as input as the curl_easy_init call returned.
+Invoke this function after \fIcurl_easy_init(3)\fP and all the
+\fIcurl_easy_setopt(3)\fP calls are made, and will perform the transfer as
+described in the options. It must be called with the same \fBeasy_handle\fP as
+input as the \fIcurl_easy_init(3)\fP call returned.
+
+\fIcurl_easy_perform(3)\fP performs the entire request in a blocking manner
+and returns when done, or if it failed. For non-blocking behavior, see
+\fIcurl_multi_perform(3)\fP.
You can do any amount of calls to \fIcurl_easy_perform(3)\fP while using the
-same handle. If you intend to transfer more than one file, you are even
-encouraged to do so. libcurl will then attempt to re-use the same connection
-for the following transfers, thus making the operations faster, less CPU
-intense and using less network resources. Just note that you will have to use
-\fIcurl_easy_setopt(3)\fP between the invokes to set options for the following
-curl_easy_perform.
+same \fBeasy_handle\fP. If you intend to transfer more than one file, you are
+even encouraged to do so. libcurl will then attempt to re-use the same
+connection for the following transfers, thus making the operations faster,
+less CPU intense and using less network resources. Just note that you will
+have to use \fIcurl_easy_setopt(3)\fP between the invokes to set options for
+the following curl_easy_perform.
You must never call this function simultaneously from two places using the
-same handle. Let the function return first before invoking it another time. If
-you want parallel transfers, you must use several curl handles.
+same \fBeasy_handle\fP. Let the function return first before invoking it
+another time. If you want parallel transfers, you must use several curl
+easy_handles.
+
+While the \fBeasy_handle\fP is added to a multi handle, it cannot be used by
+\fIcurl_easy_perform(3)\fP.
.SH RETURN VALUE
-0 means everything was ok, non-zero means an error occurred as
+CURLE_OK (0) means everything was ok, non-zero means an error occurred as
.I <curl/curl.h>
-defines. If the CURLOPT_ERRORBUFFER was set with
-.I curl_easy_setopt
-there will be a readable error message in the error buffer when non-zero is
-returned.
+defines - see \fIlibcurl-errors(3)\fP. If the \fBCURLOPT_ERRORBUFFER(3)\fP was
+set with \fIcurl_easy_setopt(3)\fP there will be a readable error message in
+the error buffer when non-zero is returned.
+.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_setopt "(3), "
+.BR curl_multi_add_handle "(3), " curl_multi_perform "(3), "
+.BR libcurl-errors "(3), "
diff --git a/docs/libcurl/curl_easy_perform.html b/docs/libcurl/curl_easy_perform.html
deleted file mode 100644
index 8654fea..0000000
--- a/docs/libcurl/curl_easy_perform.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_perform man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_perform - Perform a file transfer <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_perform(CURL * handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function is called after the init and all the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> calls are made, and will perform the transfer as described in the options. It must be called with the same <span Class="emphasis">handle</span> as input as the curl_easy_init call returned.
-<p class="level0">You can do any amount of calls to <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> while using the same handle. If you intend to transfer more than one file, you are even encouraged to do so. libcurl will then attempt to re-use the same connection for the following transfers, thus making the operations faster, less CPU intense and using less network resources. Just note that you will have to use <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> between the invokes to set options for the following curl_easy_perform.
-<p class="level0">You must never call this function simultaneously from two places using the same handle. Let the function return first before invoking it another time. If you want parallel transfers, you must use several curl handles. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred as <span Class="emphasis"><curl/curl.h></span> defines. If the CURLOPT_ERRORBUFFER was set with <span Class="emphasis">curl_easy_setopt</span> there will be a readable error message in the error buffer when non-zero is returned. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_setopt.html"> curl_easy_setopt (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_perform.pdf b/docs/libcurl/curl_easy_perform.pdf
deleted file mode 100644
index 5b3ee66..0000000
--- a/docs/libcurl/curl_easy_perform.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_recv.3 b/docs/libcurl/curl_easy_recv.3
index 1ede589..9de6364 100644
--- a/docs/libcurl/curl_easy_recv.3
+++ b/docs/libcurl/curl_easy_recv.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -41,9 +41,10 @@
buffer. The variable \fBn\fP points to will receive the number of received
bytes.
-To establish the connection, set \fBCURLOPT_CONNECT_ONLY\fP option before
-calling \fIcurl_easy_perform(3)\fP. Note that \fIcurl_easy_recv(3)\fP does not
-work on connections that were created without this option.
+To establish the connection, set \fBCURLOPT_CONNECT_ONLY(3)\fP option before
+calling \fIcurl_easy_perform(3)\fP or \cIcurl_multi_perform(3)\fP. Note that
+\fIcurl_easy_recv(3)\fP does not work on connections that were created without
+this option.
You must ensure that the socket has data to read before calling
\fIcurl_easy_recv(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
@@ -59,8 +60,13 @@
On failure, returns the appropriate error code.
-If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use
-your operating system facilities to wait until the data is ready, and retry.
+If there is no data to read, the function returns \fBCURLE_AGAIN\fP. Use your
+operating system facilities to wait until the data is ready, and retry.
+
+Reading exactly 0 bytes would indicate a closed connection.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
.SH EXAMPLE
See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_easy_recv.html b/docs/libcurl/curl_easy_recv.html
deleted file mode 100644
index 51f77f9..0000000
--- a/docs/libcurl/curl_easy_recv.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html><head>
-<title>curl_easy_recv man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_recv - receives raw data on an "easy" connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/easy.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_recv( CURL * curl , void * buffer ,</span> <span Class="bold">size_t buflen , size_t * n );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function receives raw data from the established connection. You may use it together with <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> to implement custom protocols using libcurl. This functionality can be particularly useful if you use proxies and/or SSL encryption: libcurl will take care of proxy negotiation and connection set-up.
-<p class="level0"><span Class="bold">buffer</span> is a pointer to your buffer that will get the received data. <span Class="bold">buflen</span> is the maximum amount of data you can get in that buffer. The variable <span Class="bold">n</span> points to will receive the number of received bytes.
-<p class="level0">To establish the connection, set <span Class="bold">CURLOPT_CONNECT_ONLY</span> option before calling <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. Note that <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> does not work on connections that were created without this option.
-<p class="level0">You must ensure that the socket has data to read before calling <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a>, otherwise the call will return <span Class="bold">CURLE_AGAIN</span> - the socket is used in non-blocking mode internally. Use <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with <span Class="bold">CURLINFO_LASTSOCKET</span> to obtain the socket; use your operating system facilities like <span Class="emphasis">select(2)</span> to check if it has any data you can read. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">On success, returns <span Class="bold">CURLE_OK</span>, stores the received data into <span Class="bold">buffer</span>, and the number of bytes it actually read into <span Class="bold">*n</span>.
-<p class="level0">On failure, returns the appropriate error code.
-<p class="level0">If there is no data to read, the function returns <span Class="bold">CURLE_AGAIN</span>. Use your operating system facilities to wait until the data is ready, and retry. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html"> curl_easy_perform (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_getinfo.html">curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_send.html">curl_easy_send (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_recv.pdf b/docs/libcurl/curl_easy_recv.pdf
deleted file mode 100644
index 1ed0a94..0000000
--- a/docs/libcurl/curl_easy_recv.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_reset.3 b/docs/libcurl/curl_easy_reset.3
index 4652f7e..cb69bdd 100644
--- a/docs/libcurl/curl_easy_reset.3
+++ b/docs/libcurl/curl_easy_reset.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
.SH NAME
curl_easy_reset - reset all options of a libcurl session handle
@@ -19,5 +39,6 @@
.SH RETURN VALUE
Nothing
.SH "SEE ALSO"
-.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3)
+.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3),"
+.BR curl_easy_duphandle "(3)"
diff --git a/docs/libcurl/curl_easy_reset.html b/docs/libcurl/curl_easy_reset.html
deleted file mode 100644
index daed742..0000000
--- a/docs/libcurl/curl_easy_reset.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_reset man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_reset - reset all options of a libcurl session handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_easy_reset(CURL *handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a>.
-<p class="level0">It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.1 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Nothing <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_setopt.html"> curl_easy_setopt (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_reset.pdf b/docs/libcurl/curl_easy_reset.pdf
deleted file mode 100644
index cd44d76..0000000
--- a/docs/libcurl/curl_easy_reset.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_send.3 b/docs/libcurl/curl_easy_send.3
index 17c4c1f..6f5a6ea 100644
--- a/docs/libcurl/curl_easy_send.3
+++ b/docs/libcurl/curl_easy_send.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -39,9 +39,10 @@
\fBbuffer\fP is a pointer to the data of length \fBbuflen\fP that you want sent.
The variable \fBn\fP points to will receive the number of sent bytes.
-To establish the connection, set \fBCURLOPT_CONNECT_ONLY\fP option before
-calling \fIcurl_easy_perform(3)\fP. Note that \fIcurl_easy_send(3)\fP will not
-work on connections that were created without this option.
+To establish the connection, set \fBCURLOPT_CONNECT_ONLY(3)\fP option before
+calling \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform()\fP. Note that
+\fIcurl_easy_send(3)\fP will not work on connections that were created without
+this option.
You must ensure that the socket is writable before calling
\fIcurl_easy_send(3)\fP, otherwise the call will return \fBCURLE_AGAIN\fP -
@@ -57,6 +58,9 @@
wanted to send.
On failure, returns the appropriate error code.
+
+If there's no socket available to use from the previous transfer, this function
+returns CURLE_UNSUPPORTED_PROTOCOL.
.SH EXAMPLE
See \fBsendrecv.c\fP in \fBdocs/examples\fP directory for usage example.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_easy_send.html b/docs/libcurl/curl_easy_send.html
deleted file mode 100644
index b24a601..0000000
--- a/docs/libcurl/curl_easy_send.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_easy_send man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_send - sends raw data over an "easy" connection <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/easy.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_easy_send( CURL * curl , const void * buffer ,</span> <span Class="bold"> size_t buflen , size_t * n );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function sends arbitrary data over the established connection. You may use it together with <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> to implement custom protocols using libcurl. This functionality can be particularly useful if you use proxies and/or SSL encryption: libcurl will take care of proxy negotiation and connection set-up.
-<p class="level0"><span Class="bold">buffer</span> is a pointer to the data of length <span Class="bold">buflen</span> that you want sent. The variable <span Class="bold">n</span> points to will receive the number of sent bytes.
-<p class="level0">To establish the connection, set <span Class="bold">CURLOPT_CONNECT_ONLY</span> option before calling <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. Note that <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> will not work on connections that were created without this option.
-<p class="level0">You must ensure that the socket is writable before calling <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a>, otherwise the call will return <span Class="bold">CURLE_AGAIN</span> - the socket is used in non-blocking mode internally. Use <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with <span Class="bold">CURLINFO_LASTSOCKET</span> to obtain the socket; use your operating system facilities like <span Class="emphasis">select(2)</span> to check if it can be written to. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.18.2. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">On success, returns <span Class="bold">CURLE_OK</span> and stores the number of bytes actually sent into <span Class="bold">*n</span>. Note that this may very well be less than the amount you wanted to send.
-<p class="level0">On failure, returns the appropriate error code. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0">See <span Class="bold">sendrecv.c</span> in <span Class="bold">docs/examples</span> directory for usage example. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <a class="manpage" href="./curl_easy_perform.html"> curl_easy_perform (3)</a> <a class="manpage" href="./curl_easy_getinfo.html"> curl_easy_getinfo (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_recv.html">curl_easy_recv (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_send.pdf b/docs/libcurl/curl_easy_send.pdf
deleted file mode 100644
index dc5922c..0000000
--- a/docs/libcurl/curl_easy_send.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 9da5379..4e5b8de 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH curl_easy_setopt 3 "1 Jan 2010" "libcurl 7.20.0" "libcurl Manual"
+.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
@@ -28,14 +28,14 @@
CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
.SH DESCRIPTION
-curl_easy_setopt() is used to tell libcurl how to behave. By using the
-appropriate options to \fIcurl_easy_setopt\fP, you can change libcurl's
-behavior. All options are set with the \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 curl_easy_setopt() calls in the setup phase.
+\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
@@ -45,8 +45,10 @@
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 curl_easy_setopt() returns. Exceptions to this rule are described in
-the option details below.
+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.
Before version 7.17.0, strings were not copied. Instead the user was forced
keep them available until libcurl no longer needed them.
@@ -55,2038 +57,474 @@
\fIcurl_easy_duphandle(3)\fP call.
.SH BEHAVIOR OPTIONS
.IP CURLOPT_VERBOSE
-Set the parameter to 1 to get the library to display a lot of verbose
-information about its operations. Very useful for libcurl and/or protocol
-debugging and understanding. The verbose information will be sent to stderr,
-or the stream set with \fICURLOPT_STDERR\fP.
-
-You hardly ever want this set in production use, you will almost always want
-this when you debug/report problems. Another neat option for debugging is the
-\fICURLOPT_DEBUGFUNCTION\fP.
+Display verbose information. See \fICURLOPT_VERBOSE(3)\fP
.IP CURLOPT_HEADER
-A parameter set to 1 tells the library to include the header in the body
-output. This is only relevant for protocols that actually have headers
-preceding the data (like HTTP).
+Include the header in the body output. See \fICURLOPT_HEADER(3)\fP
.IP CURLOPT_NOPROGRESS
-A parameter set to 1 tells the library to shut off the built-in progress meter
-completely.
-
-Future versions of libcurl are likely to not have any built-in progress meter
-at all.
+Shut off the progress meter. See \fICURLOPT_NOPROGRESS(3)\fP
.IP CURLOPT_NOSIGNAL
-Pass a long. If it is 1, libcurl will not use any functions that
-install signal handlers or any functions that cause signals to be sent to the
-process. This option is mainly here to allow multi-threaded unix applications
-to still set/use all timeout options etc, without risking getting signals.
-(Added in 7.10)
-
-If this option is set and libcurl has been built with the standard name
-resolver, timeouts will not occur while the name resolve takes place.
-Consider building libcurl with c-ares support to enable asynchronous DNS
-lookups, which enables nice timeouts for name resolves without signals.
+Do not install signal handlers. See \fICURLOPT_NOSIGNAL(3)\fP
.IP CURLOPT_WILDCARDMATCH
-Set this option to 1 if you want to transfer multiple files according to a
-file name pattern. The pattern can be specified as part of the
-\fICURLOPT_URL\fP option, using an fnmatch-like pattern (Shell Pattern
-Matching) in the last part of URL (file name).
-
-By default, libcurl uses its internal wildcard matching implementation. You
-can provide your own matching function by the \fICURLOPT_FNMATCH_FUNCTION\fP
-option.
-
-This feature is only supported by the FTP download for now.
-
-A brief introduction of its syntax follows:
-.RS
-.IP "\fB*\fP - ASTERISK"
-\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
-directory)
-.RE
-.RS
-.IP "\fB?\fP - QUESTION MARK"
-Question mark matches any (exactly one) character.
-
-\&ftp://example.com/some/path/\fBphoto?.jpeg\fP
-.RE
-.RS
-.IP "\fB[\fP - BRACKET EXPRESSION"
-The left bracket opens a bracket expression. The question mark and asterisk have
-no special meaning in a bracket expression. Each bracket expression ends by the
-right bracket and matches exactly one character. Some examples follow:
-
-\fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
-
-\fB[abc]\fP - character enumeration
-
-\fB[^abc]\fP or \fB[!abc]\fP - negation
-
-\fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
-\fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
-\fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
-
-\fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
-characters have no special purpose.
-
-\fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
-
-Using the rules above, a file name pattern can be constructed:
-
-\&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
-.RE
-.PP
-(This was added in 7.21.0)
+Transfer multiple files according to a file name pattern. See \fICURLOPT_WILDCARDMATCH(3)\fP
.SH CALLBACK OPTIONS
.IP CURLOPT_WRITEFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as there is data received that needs
-to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
-multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
-of bytes actually taken care of. If that amount differs from the amount passed
-to your function, it'll signal an error to the library. This will abort the
-transfer and return \fICURLE_WRITE_ERROR\fP.
-
-From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will
-cause writing to this connection to become paused. See
-\fIcurl_easy_pause(3)\fP for further details.
-
-This function may be called with zero bytes data if the transferred file is
-empty.
-
-Set this option to NULL to get the internal default function. The internal
-default function will write the data to the FILE * given with
-\fICURLOPT_WRITEDATA\fP.
-
-Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA\fP option.
-
-The callback function will be passed as much data as possible in all invokes,
-but you cannot possibly make any assumptions. It may be one byte, it may be
-thousands. The maximum amount of data that can be passed to the write callback
-is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
+Callback for writing data. See \fICURLOPT_WRITEFUNCTION(3)\fP
.IP CURLOPT_WRITEDATA
-Data pointer to pass to the file write function. If you use the
-\fICURLOPT_WRITEFUNCTION\fP option, this is the pointer you'll get as
-input. If you don't use a callback, you must pass a 'FILE *' as libcurl will
-pass this to fwrite() when writing data.
-
-The internal \fICURLOPT_WRITEFUNCTION\fP will write the data to the FILE *
-given with this option, or to stdout if this option hasn't been set.
-
-If you're using libcurl as a win32 DLL, you \fBMUST\fP use the
-\fICURLOPT_WRITEFUNCTION\fP if you set this option or you will experience
-crashes.
-
-This option is also known with the older name \fICURLOPT_FILE\fP, the name
-\fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
+Data pointer to pass to the write callback. See \fICURLOPT_WRITEDATA(3)\fP
.IP CURLOPT_READFUNCTION
-Function pointer that should match the following prototype: \fBsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
-function gets called by libcurl as soon as it needs to read data in order to
-send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
-filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
-bytes. Your function must return the actual number of bytes that you stored in
-that memory area. Returning 0 will signal end-of-file to the library and cause
-it to stop the current transfer.
-
-If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
-server expected it, like when you've said you will upload N bytes and you
-upload less than N bytes), you may experience that the server "hangs" waiting
-for the rest of the data that won't come.
-
-The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
-operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
-code from the transfer (Added in 7.12.1)
-
-From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
-reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
-for further details.
-
-If you set this callback pointer to NULL, or don't set it at all, the default
-internal read function will be used. It is doing an fread() on the FILE *
-userdata set with \fICURLOPT_READDATA\fP.
+Callback for reading data. See \fICURLOPT_READFUNCTION(3)\fP
.IP CURLOPT_READDATA
-Data pointer to pass to the file read function. If you use the
-\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
-you don't specify a read callback but instead rely on the default internal
-read function, this data must be a valid readable FILE *.
-
-If you're using libcurl as a win32 DLL, you MUST use a
-\fICURLOPT_READFUNCTION\fP if you set this option.
-
-This option was also known by the older name \fICURLOPT_INFILE\fP, the name
-\fICURLOPT_READDATA\fP was introduced in 7.9.7.
+Data pointer to pass to the read callback. See \fICURLOPT_READDATA(3)\fP
.IP CURLOPT_IOCTLFUNCTION
-Function pointer that should match the \fIcurl_ioctl_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl when
-something special I/O-related needs to be done that the library can't do by
-itself. For now, rewinding the read data stream is the only action it can
-request. The rewinding of the read data stream may be necessary when doing a
-HTTP PUT or POST with a multi-pass authentication method. (Option added in
-7.12.3).
-
-Use \fICURLOPT_SEEKFUNCTION\fP instead to provide seeking!
+Callback for I/O operations. See \fICURLOPT_IOCTLFUNCTION(3)\fP
.IP CURLOPT_IOCTLDATA
-Pass a pointer that will be untouched by libcurl and passed as the 3rd
-argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION\fP. (Option
-added in 7.12.3)
+Data pointer to pass to the I/O callback. See \fICURLOPT_IOCTLDATA(3)\fP
.IP CURLOPT_SEEKFUNCTION
-Function pointer that should match the following prototype: \fIint
-function(void *instream, curl_off_t offset, int origin);\fP This function gets
-called by libcurl to seek to a certain position in the input stream and can be
-used to fast forward a file in a resumed upload (instead of reading all
-uploaded bytes with the normal read function/callback). It is also called to
-rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication
-method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET,
-SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl
-only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on
-success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2
-(CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is
-free to work around the problem if possible. The latter can sometimes be done
-by instead reading from the input or similar.
-
-If you forward the input arguments directly to "fseek" or "lseek", note that
-the data type for \fIoffset\fP is not the same as defined for curl_off_t on
-many systems! (Option added in 7.18.0)
+Callback for seek operations. See \fICURLOPT_SEEKFUNCTION(3)\fP
.IP CURLOPT_SEEKDATA
-Data pointer to pass to the file read function. If you use the
-\fICURLOPT_SEEKFUNCTION\fP option, this is the pointer you'll get as input. If
-you don't specify a seek callback, NULL is passed. (Option added in 7.18.0)
+Data pointer to pass to the seek callback. See \fICURLOPT_SEEKDATA(3)\fP
.IP CURLOPT_SOCKOPTFUNCTION
-Function pointer that should match the \fIcurl_sockopt_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl after the
-socket() call but before the connect() call. The callback's \fIpurpose\fP
-argument identifies the exact purpose for this particular socket, and
-currently only one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the
-primary connection (meaning the control connection in the FTP case). Future
-versions of libcurl may support more purposes. It passes the newly created
-socket descriptor so additional setsockopt() calls can be done at the user's
-discretion. Return 0 (zero) from the callback on success. Return 1 from the
-callback function to signal an unrecoverable error to the library and it will
-close the socket and return \fICURLE_COULDNT_CONNECT\fP. (Option added in
-7.15.6.)
+Callback for sockopt operations. See \fICURLOPT_SOCKOPTFUNCTION(3)\fP
.IP CURLOPT_SOCKOPTDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
-(Option added in 7.15.6.)
+Data pointer to pass to the sockopt callback. See \fICURLOPT_SOCKOPTDATA(3)\fP
.IP CURLOPT_OPENSOCKETFUNCTION
-Function pointer that should match the \fIcurl_opensocket_callback\fP
-prototype found in \fI<curl/curl.h>\fP. This function gets called by libcurl
-instead of the \fIsocket(2)\fP call. The callback's \fIpurpose\fP argument
-identifies the exact purpose for this particular socket, and currently only
-one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the primary connection
-(meaning the control connection in the FTP case). Future versions of libcurl
-may support more purposes. It passes the resolved peer address as a
-\fIaddress\fP argument so the callback can modify the address or refuse to
-connect at all. The callback function should return the socket or
-\fICURL_SOCKET_BAD\fP in case no connection should be established or any error
-detected. Any additional \fIsetsockopt(2)\fP calls can be done on the socket
-at the user's discretion. \fICURL_SOCKET_BAD\fP return value from the
-callback function will signal an unrecoverable error to the library and it
-will return \fICURLE_COULDNT_CONNECT\fP. This return code can be used for IP
-address blacklisting. The default behavior is:
-.nf
- return socket(addr->family, addr->socktype, addr->protocol);
-.fi
-(Option added in 7.17.1.)
+Callback for socket creation. See \fICURLOPT_OPENSOCKETFUNCTION(3)\fP
.IP CURLOPT_OPENSOCKETDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION\fP.
-(Option added in 7.17.1.)
+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
-Function pointer that should match the \fIcurl_progress_callback\fP prototype
-found in \fI<curl/curl.h>\fP. This function gets called by libcurl instead of
-its internal equivalent with a frequent interval during operation (roughly
-once per second or sooner) no matter if data is being transfered or not.
-Unknown/unused argument values passed to the callback will be set to zero
-(like if you only download data, the upload size will remain 0). Returning a
-non-zero value from this callback will cause libcurl to abort the transfer and
-return \fICURLE_ABORTED_BY_CALLBACK\fP.
-
-If you transfer data with the multi interface, this function will not be
-called during periods of idleness unless you call the appropriate libcurl
-function that performs transfers.
-
-\fICURLOPT_NOPROGRESS\fP must be set to 0 to make this function actually
-get called.
+OBSOLETE callback for progress meter. See \fICURLOPT_PROGRESSFUNCTION(3)\fP
.IP CURLOPT_PROGRESSDATA
-Pass a pointer that will be untouched by libcurl and passed as the first
-argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
+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
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP. This
-function gets called by libcurl as soon as it has received header data. The
-header callback will be called once for each header and only complete header
-lines are passed on to the callback. Parsing headers should be easy enough
-using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
-multiplied with \fInmemb\fP. Do not assume that the header line is zero
-terminated! The pointer named \fIuserdata\fP is the one you set with the
-\fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
-of bytes actually taken care of. If that amount differs from the amount passed
-to your function, it'll signal an error to the library. This will abort the
-transfer and return \fICURL_WRITE_ERROR\fP.
-
-If this option is not set, or if it is set to NULL, but
-\fICURLOPT_HEADERDATA\fP (\fICURLOPT_WRITEHEADER\fP) is set to anything but
-NULL, the function used to accept response data will be used instead. That is,
-it will be the function specified with \fICURLOPT_WRITEFUNCTION\fP, or if it
-is not specified or NULL - the default, stream-writing function.
-
-It's important to note that the callback will be invoked for the headers of
-all responses received after initiating a request and not just the final
-response. This includes all responses which occur during authentication
-negotiation. If you need to operate on only the headers from the final
-response, you will need to collect headers in the callback yourself and use
-HTTP status lines, for example, to delimit response boundaries.
-
-Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a
-trailer. That trailer is identical to a HTTP header and if such a trailer is
-received it is passed to the application using this callback as well. There
-are several ways to detect it being a trailer and not an ordinary header: 1)
-it comes after the response-body. 2) it comes after the final header line (CR
-LF) 3) a Trailer: header among the response-headers mention what header to
-expect in the trailer.
-.IP CURLOPT_WRITEHEADER
-(This option is also known as \fBCURLOPT_HEADERDATA\fP) Pass a pointer to be
-used to write the header part of the received data to. If you don't use your
-own callback to take care of the writing, this must be a valid FILE *. See
-also the \fICURLOPT_HEADERFUNCTION\fP option above on how to set a custom
-get-all-headers callback.
+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
-Function pointer that should match the following prototype: \fIint
-curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);\fP
-\fICURLOPT_DEBUGFUNCTION\fP replaces the standard debug function used when
-\fICURLOPT_VERBOSE \fP is in effect. This callback receives debug information,
-as specified with the \fBcurl_infotype\fP argument. This function must return
-0. The data pointed to by the char * passed to this function WILL NOT be zero
-terminated, but will be exactly of the size as told by the size_t argument.
-
-Available curl_infotype values:
-.RS
-.IP CURLINFO_TEXT
-The data is informational text.
-.IP CURLINFO_HEADER_IN
-The data is header (or header-like) data received from the peer.
-.IP CURLINFO_HEADER_OUT
-The data is header (or header-like) data sent to the peer.
-.IP CURLINFO_DATA_IN
-The data is protocol data received from the peer.
-.IP CURLINFO_DATA_OUT
-The data is protocol data sent to the peer.
-.RE
+Callback for debug information. See \fICURLOPT_DEBUGFUNCTION(3)\fP
.IP CURLOPT_DEBUGDATA
-Pass a pointer to whatever you want passed in to your
-\fICURLOPT_DEBUGFUNCTION\fP in the last void * argument. This pointer is not
-used by libcurl, it is only passed to the callback.
+Data pointer to pass to the debug callback. See \fICURLOPT_DEBUGDATA(3)\fP
.IP CURLOPT_SSL_CTX_FUNCTION
-This option does only function for libcurl powered by OpenSSL. If libcurl was
-built against another SSL library, this functionality is absent.
-
-Function pointer that should match the following prototype: \fBCURLcode
-sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function gets called
-by libcurl just before the initialization of an SSL connection after having
-processed all other SSL related options to give a last chance to an
-application to modify the behaviour of openssl's ssl initialization. The
-\fIsslctx\fP parameter is actually a pointer to an openssl \fISSL_CTX\fP. If
-an error is returned no attempt to establish a connection is made and the
-perform operation will return the error code from this callback function. Set
-the \fIparm\fP argument with the \fICURLOPT_SSL_CTX_DATA\fP option. This
-option was introduced in 7.11.0.
-
-This function will get called on all new connections made to a server, during
-the SSL negotiation. The SSL_CTX pointer will be a new one every time.
-
-To use this properly, a non-trivial amount of knowledge of the openssl
-libraries is necessary. For example, using this function allows you to use
-openssl callbacks to add additional validation code for certificates, and even
-to change the actual URI of an HTTPS request (example used in the lib509 test
-case). See also the example section for a replacement of the key, certificate
-and trust file settings.
+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 set by the option
-\fICURLOPT_SSL_CTX_FUNCTION\fP, this is the pointer you'll get as third
-parameter, otherwise \fBNULL\fP. (Added in 7.11.0)
+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
-Function pointers that should match the following prototype: CURLcode
-function(char *ptr, size_t length);
-
-These three options apply to non-ASCII platforms only. They are available
-only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built. When
-this is the case, \fIcurl_version_info(3)\fP will return the CURL_VERSION_CONV
-feature bit set.
-
-The data to be converted is in a buffer pointed to by the ptr parameter. The
-amount of data to convert is indicated by the length parameter. The converted
-data overlays the input data in the buffer pointed to by the ptr parameter.
-CURLE_OK should be returned upon successful conversion. A CURLcode return
-value defined by curl.h, such as CURLE_CONV_FAILED, should be returned if an
-error was encountered.
-
-\fBCURLOPT_CONV_TO_NETWORK_FUNCTION\fP and
-\fBCURLOPT_CONV_FROM_NETWORK_FUNCTION\fP convert between the host encoding and
-the network encoding. They are used when commands or ASCII data are
-sent/received over the network.
-
-\fBCURLOPT_CONV_FROM_UTF8_FUNCTION\fP is called to convert from UTF8 into the
-host encoding. It is required only for SSL processing.
-
-If you set a callback pointer to NULL, or don't set it at all, the built-in
-libcurl iconv functions will be used. If HAVE_ICONV was not defined when
-libcurl was built, and no callback has been established, conversion will
-return the CURLE_CONV_REQD error code.
-
-If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
-For example:
-
- \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
-
-The iconv code in libcurl will default the network and UTF8 codeset names as
-follows:
-
- \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-
- \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
-
-You will need to override these definitions if they are different on your
-system.
+Callback for code base conversion. See \fICURLOPT_CONV_FROM_UTF8_FUNCTION(3)\fP
.IP CURLOPT_INTERLEAVEFUNCTION
-Function pointer that should match the following prototype: \fIsize_t
-function( void *ptr, size_t size, size_t nmemb, void *userdata)\fP. This
-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
-\fIRFC 2326 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 challeneges 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. (Added
-in 7.20.0)
+Callback for RTSP interleaved data. See \fICURLOPT_INTERLEAVEFUNCTION(3)\fP
.IP CURLOPT_INTERLEAVEDATA
-This is the userdata pointer that will be passed to
-\fICURLOPT_INTERLEAVEFUNCTION\fP when interleaved RTP data is received. (Added
-in 7.20.0)
+Data pointer to pass to the RTSP interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP
.IP CURLOPT_CHUNK_BGN_FUNCTION
-Function pointer that should match the following prototype: \fBlong function
-(const void *transfer_info, void *ptr, int remains)\fP. This function gets
-called by libcurl before a part of the stream is going to be transferred (if
-the transfer supports chunks).
-
-This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH\fP
-option for now.
-
-The target of transfer_info parameter is a "feature depended" structure. For
-the FTP wildcard download, the target is curl_fileinfo structure (see
-\fIcurl/curl.h\fP). The parameter ptr is a pointer given by
-\fICURLOPT_CHUNK_DATA\fP. The parameter remains contains number of chunks
-remaining per the transfer. If the feature is not available, the parameter has
-zero value.
-
-Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
-\fICURL_CHUNK_BGN_FUNC_SKIP\fP if you want to skip the concrete chunk or
-\fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
-(This was added in 7.21.0)
+Callback for wildcard download start of chunk. See \fICURLOPT_CHUNK_BGN_FUNCTION(3)\fP
.IP CURLOPT_CHUNK_END_FUNCTION
-Function pointer that should match the following prototype: \fBlong
-function(void *ptr)\fP. This function gets called by libcurl as soon as a part
-of the stream has been transferred (or skipped).
-
-Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
-\fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
-(This was added in 7.21.0)
+Callback for wildcard download end of chunk. See \fICURLOPT_CHUNK_END_FUNCTION(3)\fP
.IP CURLOPT_CHUNK_DATA
-Pass a pointer that will be untouched by libcurl and passed as the ptr
-argument to the \fICURL_CHUNK_BGN_FUNTION\fP and \fICURL_CHUNK_END_FUNTION\fP.
-(This was added in 7.21.0)
+Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP
.IP CURLOPT_FNMATCH_FUNCTION
-Function pointer that should match \fBint function(void *ptr, const char
-*pattern, const char *string)\fP prototype (see \fIcurl/curl.h\fP). It is used
-internally for the wildcard matching feature.
-
-Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
-\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
-error occurred. (This was added in 7.21.0)
+Callback for wildcard matching. See \fICURLOPT_FNMATCH_FUNCTION(3)\fP
.IP CURLOPT_FNMATCH_DATA
-Pass a pointer that will be untouched by libcurl and passed as the ptr argument
-to the \fICURL_FNMATCH_FUNCTION\fP. (This was added in 7.21.0)
+Data pointer to pass to the wildcard matching callback. See \fICURLOPT_FNMATCH_DATA(3)\fP
.SH ERROR OPTIONS
.IP CURLOPT_ERRORBUFFER
-Pass a char * to a buffer that the libcurl may store human readable error
-messages in. This may be more helpful than just the return code from
-\fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
-Although this argument is a 'char *', it does not describe an input string.
-Therefore the (probably undefined) contents of the buffer is NOT copied
-by the library. You should keep the associated storage available until
-libcurl no longer needs it. Failing to do so will cause very odd behavior
-or even crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP
-or you set the same option again to use a different pointer.
-
-Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
-debug/trace why errors happen.
-
-If the library does not return an error, the buffer may not have been
-touched. Do not rely on the contents in those cases.
-
+Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP
.IP CURLOPT_STDERR
-Pass a FILE * as parameter. Tell libcurl to use this stream instead of stderr
-when showing the progress meter and displaying \fICURLOPT_VERBOSE\fP data.
+stderr replacement stream. See \fICURLOPT_STDERR(3)\fP
.IP CURLOPT_FAILONERROR
-A parameter set to 1 tells the library to fail silently if the HTTP code
-returned is equal to or larger than 400. The default action would be to return
-the page normally, ignoring that code.
-
-This method is not fail-safe and there are occasions where non-successful
-response codes will slip through, especially when authentication is involved
-(response codes 401 and 407).
-
-You might get some amounts of headers transferred before this situation is
-detected, like when a "100-continue" is received as a response to a
-POST/PUT and a 401 or 407 is received immediately afterwards.
+Fail on HTTP 4xx errors. \fICURLOPT_FAILONERROR(3)\fP
.SH NETWORK OPTIONS
.IP CURLOPT_URL
-The actual URL to deal with. The parameter should be a char * to a zero
-terminated string.
-
-If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will
-attempt to guess which protocol to use based on the given host name. If the
-given protocol of the set URL is not supported, libcurl will return on error
-(\fICURLE_UNSUPPORTED_PROTOCOL\fP) when you call \fIcurl_easy_perform(3)\fP or
-\fIcurl_multi_perform(3)\fP. Use \fIcurl_version_info(3)\fP for detailed info
-on which protocols are supported.
-
-The string given to CURLOPT_URL must be url-encoded and follow RFC 2396
-(http://curl.haxx.se/rfc/rfc2396.txt).
-
-Starting with version 7.20.0, the fragment part of the URI will not be send as
-part of the path, which was the case previously.
-
-\fICURLOPT_URL\fP is the only option that \fBmust\fP be set before
-\fIcurl_easy_perform(3)\fP is called.
-
-\fICURLOPT_PROTOCOLS\fP can be used to limit what protocols libcurl will use
-for this transfer, independent of what libcurl has been compiled to
-support. That may be useful if you accept the URL from an external source and
-want to limit the accessibility.
+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
-Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
-limits what protocols libcurl may use in the transfer. This allows you to have
-a libcurl built to support a wide range of protocols but still limit specific
-transfers to only be allowed to use a subset of them. By default libcurl will
-accept all protocols it supports. See also
-\fICURLOPT_REDIR_PROTOCOLS\fP. (Added in 7.19.4)
+Allowed protocols. See \fICURLOPT_PROTOCOLS(3)\fP
.IP CURLOPT_REDIR_PROTOCOLS
-Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
-limits what protocols libcurl may use in a transfer that it follows to in a
-redirect when \fICURLOPT_FOLLOWLOCATION\fP is enabled. This allows you to
-limit specific transfers to only be allowed to use a subset of protocols in
-redirections. By default libcurl will allow all protocols except for FILE and
-SCP. This is a difference compared to pre-7.19.4 versions which
-unconditionally would follow to all protocols supported. (Added in 7.19.4)
+Protocols to allow redirects to. See \fICURLOPT_REDIR_PROTOCOLS(3)\fP
.IP CURLOPT_PROXY
-Set HTTP proxy to use. The parameter should be a char * to a zero terminated
-string holding the host name or dotted IP address. To specify port number in
-this string, append :[port] to the end of the host name. The proxy string may
-be prefixed with [protocol]:// since any such prefix will be ignored. The
-proxy's port number may optionally be specified with the separate option. If
-not specified, libcurl will default to using port 1080 for proxies.
-\fICURLOPT_PROXYPORT\fP.
-
-When you tell the library to use an HTTP proxy, libcurl will transparently
-convert operations to HTTP even if you specify an FTP URL etc. This may have
-an impact on what other features of the library you can use, such as
-\fICURLOPT_QUOTE\fP and similar FTP specifics that don't work unless you
-tunnel through the HTTP proxy. Such tunneling is activated with
-\fICURLOPT_HTTPPROXYTUNNEL\fP.
-
-libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP,
-\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY\fP option
-does however override any possibly set environment variables.
-
-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.
-
-Since 7.14.1, the proxy host string given in environment variables can be
-specified the exact same way as the proxy can be set with \fICURLOPT_PROXY\fP,
-include protocol prefix (http://) and embedded user + password.
+Proxy to use. See \fICURLOPT_PROXY(3)\fP
.IP CURLOPT_PROXYPORT
-Pass a long with this option to set the proxy port to connect to unless it is
-specified in the proxy string \fICURLOPT_PROXY\fP.
+Proxy port to use. See \fICURLOPT_PROXYPORT(3)\fP
.IP CURLOPT_PROXYTYPE
-Pass a long with this option to set type of the proxy. Available options for
-this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.19.4),
-\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP,
-\fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP
-(added in 7.18.0). The HTTP type is default. (Added in 7.10)
+Proxy type. See \fICURLOPT_PROXYTYPE(3)\fP
.IP CURLOPT_NOPROXY
-Pass a pointer to a zero terminated string. The should be a comma- separated
-list of hosts which do not use a proxy, if one is specified. The only
-wildcard 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, local.com would
-match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
-(Added in 7.19.4)
+Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP
.IP CURLOPT_HTTPPROXYTUNNEL
-Set the parameter to 1 to make the library tunnel all operations through a
-given HTTP proxy. There is a big difference between using a proxy and to
-tunnel through it. If you don't know what this means, you probably don't want
-this tunneling option.
+Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
-Pass a char * as parameter to a string holding the name of the service. The
-default service name for a SOCKS5 server is rcmd/server-fqdn. This option
-allows you to change it. (Added in 7.19.4)
+Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_NEC
-Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
-negotiation a protection mode is negotiated. The rfc1961 says in section
-4.3/4.4 it should be protected, but the NEC reference implementation does not.
-If enabled, this option allows the unprotected exchange of the protection mode
-negotiation. (Added in 7.19.4).
+Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
+.IP CURLOPT_PROXY_SERVICE_NAME
+Proxy service name. \fICURLOPT_PROXY_SERVICE_NAME(3)\fP
+.IP CURLOPT_SERVICE_NAME
+SPNEGO service name. \fICURLOPT_SERVICE_NAME(3)\fP
.IP CURLOPT_INTERFACE
-Pass a char * as parameter. This sets the interface name to use as outgoing
-network interface. The name can be an interface name, an IP address, or a host
-name.
+Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
.IP CURLOPT_LOCALPORT
-Pass a long. This sets the local port number of the socket used for
-connection. This can be used in combination with \fICURLOPT_INTERFACE\fP and
-you are recommended to use \fICURLOPT_LOCALPORTRANGE\fP as well when this is
-set. Valid port numbers are 1 - 65535. (Added in 7.15.2)
+Bind connection locally to this port. See \fICURLOPT_LOCALPORT(3)\fP
.IP CURLOPT_LOCALPORTRANGE
-Pass a long. This is the number of attempts libcurl should make to find a
-working local port number. It starts with the given \fICURLOPT_LOCALPORT\fP
-and adds one to the number for each retry. Setting this to 1 or below will
-make libcurl do only one try for the exact port number. Port numbers by nature
-are scarce resources that will be busy at times so setting this value to
-something too low might cause unnecessary connection setup failures. (Added in
-7.15.2)
+Bind connection locally to port range. See \fICURLOPT_LOCALPORTRANGE(3)\fP
.IP CURLOPT_DNS_CACHE_TIMEOUT
-Pass a long, this sets the timeout in seconds. Name resolves will be kept in
-memory for this number of seconds. Set to zero to completely disable
-caching, or set to -1 to make the cached entries remain forever. By default,
-libcurl caches this info for 60 seconds.
-
-The name resolve functions of various libc implementations don't re-read name
-server information unless explicitly told so (for example, by calling
-\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
-if DHCP has updated the server info, and this may look like a DNS cache issue
-to the casual libcurl-app user.
+Timeout for DNS cache. See \fICURLOPT_DNS_CACHE_TIMEOUT(3)\fP
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
-Pass a long. If the value is 1, it tells curl to use a global DNS cache
-that will survive between easy handle creations and deletions. This is not
-thread-safe and this will use a global variable.
-
-\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
-to using the share interface instead! See \fICURLOPT_SHARE\fP and
-\fIcurl_share_init(3)\fP.
+OBSOLETE Enable global DNS cache. See \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP
.IP CURLOPT_BUFFERSIZE
-Pass a long specifying your preferred size (in bytes) for the receive buffer
-in libcurl. The main point of this would be that the write callback gets
-called more often and with smaller chunks. This is just treated as a request,
-not an order. You cannot be guaranteed to actually get the given size. (Added
-in 7.10)
-
-This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it
-only makes sense to use this option if you want it smaller.
+Ask for smaller buffer size. See \fICURLOPT_BUFFERSIZE(3)\fP
.IP CURLOPT_PORT
-Pass a long specifying what remote port number to connect to, instead of the
-one specified in the URL or the default port for the used protocol.
+Port number to connect to. See \fICURLOPT_PORT(3)\fP
.IP CURLOPT_TCP_NODELAY
-Pass a long specifying whether the TCP_NODELAY option should be set or
-cleared (1 = set, 0 = clear). The option is cleared by default. This
-will have no effect after the connection has been established.
-
-Setting this option will disable TCP's Nagle algorithm. The purpose of
-this algorithm is to try to minimize the number of small packets on
-the network (where "small packets" means TCP segments less than the
-Maximum Segment Size (MSS) for the network).
-
-Maximizing the amount of data sent per TCP segment is good because it
-amortizes the overhead of the send. However, in some cases (most
-notably telnet or rlogin) small segments may need to be sent
-without delay. This is less efficient than sending larger amounts of
-data at a time, and can contribute to congestion on the network if
-overdone.
+Disable the Nagle algorithm. See \fICURLOPT_TCP_NODELAY(3)\fP
.IP CURLOPT_ADDRESS_SCOPE
-Pass a long specifying the scope_id value to use when connecting to IPv6
-link-local or site-local addresses. (Added in 7.19.0)
+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
.SH NAMES and PASSWORDS OPTIONS (Authentication)
.IP CURLOPT_NETRC
-This parameter controls the preference of libcurl between using user names and
-passwords from your \fI~/.netrc\fP file, relative to user names and passwords
-in the URL supplied with \fICURLOPT_URL\fP.
-
-libcurl uses a user name (and supplied or prompted password) supplied with
-\fICURLOPT_USERPWD\fP in preference to any of the options controlled by this
-parameter.
-
-Pass a long, set to one of the values described below.
-.RS
-.IP CURL_NETRC_OPTIONAL
-The use of your \fI~/.netrc\fP file is optional, and information in the URL is
-to be preferred. The file will be scanned for the host and user name (to
-find the password only) or for the host only, to find the first user name and
-password after that \fImachine\fP, which ever information is not specified in
-the URL.
-
-Undefined values of the option will have this effect.
-.IP CURL_NETRC_IGNORED
-The library will ignore the file and use only the information in the URL.
-
-This is the default.
-.IP CURL_NETRC_REQUIRED
-This value tells the library that use of the file is required, to ignore the
-information in the URL, and to search the file for the host only.
-.RE
-Only machine name, user name and password are taken into account
-(init macros and similar things aren't supported).
-
-libcurl does not verify that the file has the correct properties set (as the
-standard Unix ftp client does). It should only be readable by user.
+Enable .netrc parsing. See \fICURLOPT_NETRC(3)\fP
.IP CURLOPT_NETRC_FILE
-Pass a char * as parameter, pointing to a zero terminated string containing
-the full path name to the file you want libcurl to use as .netrc file. If this
-option is omitted, and \fICURLOPT_NETRC\fP is set, libcurl will attempt to
-find a .netrc file in the current user's home directory. (Added in 7.10.9)
+\&.netrc file name. See \fICURLOPT_NETRC_FILE(3)\fP
.IP CURLOPT_USERPWD
-Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection. Use \fICURLOPT_HTTPAUTH\fP to decide the authentication method.
-
-When using NTLM, you can set the domain by prepending it to the user name and
-separating the domain and name with a forward (/) or backward slash (\\). Like
-this: "domain/user:password" or "domain\\user:password". Some HTTP servers (on
-Windows) support this style even for Basic authentication.
-
-When using HTTP and \fICURLOPT_FOLLOWLOCATION\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\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.
+User name and password. See \fICURLOPT_USERPWD(3)\fP
.IP CURLOPT_PROXYUSERPWD
-Pass a char * as parameter, which should be [user name]:[password] to use for
-the connection to the HTTP proxy. Use \fICURLOPT_PROXYAUTH\fP to decide
-the authentication method.
+Proxy user name and password. See \fICURLOPT_PROXYUSERPWD(3)\fP
.IP CURLOPT_USERNAME
-Pass a char * as parameter, which should be pointing to the zero terminated
-user name to use for the transfer.
-
-\fBCURLOPT_USERNAME\fP sets the user name to be used in protocol
-authentication. You should not use this option together with the (older)
-CURLOPT_USERPWD option.
-
-In order to specify the password to be used in conjunction with the user name
-use the \fICURLOPT_PASSWORD\fP option. (Added in 7.19.1)
+User name. See \fICURLOPT_USERNAME(3)\fP
.IP CURLOPT_PASSWORD
-Pass a char * as parameter, which should be pointing to the zero terminated
-password to use for the transfer.
-
-The CURLOPT_PASSWORD option should be used in conjunction with
-the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1)
+Password. See \fICURLOPT_PASSWORD(3)\fP
+.IP CURLOPT_LOGIN_OPTIONS
+Login options. See \fICURLOPT_LOGIN_OPTIONS(3)\fP
.IP CURLOPT_PROXYUSERNAME
-Pass a char * as parameter, which should be pointing to the zero terminated
-user name to use for the transfer while connecting to Proxy.
-
-The CURLOPT_PROXYUSERNAME option should be used in same way as the
-\fICURLOPT_PROXYUSERPWD\fP is used. In comparison to
-\fICURLOPT_PROXYUSERPWD\fP the CURLOPT_PROXYUSERNAME allows the username to
-contain a colon, like in the following example: "sip:[email protected]". The
-CURLOPT_PROXYUSERNAME option is an alternative way to set the user name while
-connecting to Proxy. There is no meaning to use it together with the
-\fICURLOPT_PROXYUSERPWD\fP option.
-
-In order to specify the password to be used in conjunction with the user name
-use the \fICURLOPT_PROXYPASSWORD\fP option. (Added in 7.19.1)
+Proxy user name. See \fICURLOPT_PROXYUSERNAME(3)\fP
.IP CURLOPT_PROXYPASSWORD
-Pass a char * as parameter, which should be pointing to the zero terminated
-password to use for the transfer while connecting to Proxy.
-
-The CURLOPT_PROXYPASSWORD option should be used in conjunction with
-the \fICURLOPT_PROXYUSERNAME\fP option. (Added in 7.19.1)
+Proxy password. See \fICURLOPT_PROXYPASSWORD(3)\fP
.IP CURLOPT_HTTPAUTH
-Pass a long as parameter, which is set to a bitmask, to tell libcurl which
-authentication method(s) you want it to use. The available bits are listed
-below. If more than one bit is set, libcurl will first query the site to see
-which authentication methods it supports and then pick the best one you allow
-it to use. For some methods, this will induce an extra network round-trip. Set
-the actual name and password with the \fICURLOPT_USERPWD\fP option or
-with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
-(Added in 7.10.6)
-.RS
-.IP CURLAUTH_BASIC
-HTTP Basic authentication. This is the default choice, and the only method
-that is in wide-spread use and supported virtually everywhere. This sends
-the user name and password over the network in plain text, easily captured by
-others.
-.IP CURLAUTH_DIGEST
-HTTP Digest authentication. Digest authentication is defined in RFC2617 and
-is a more secure way to do authentication over public networks than the
-regular old-fashioned Basic method.
-.IP CURLAUTH_DIGEST_IE
-HTTP Digest authentication with an IE flavor. Digest authentication is
-defined in RFC2617 and is a more secure way to do authentication over public
-networks than the regular old-fashioned Basic method. The IE flavor is simply
-that libcurl will use a special "quirk" that IE is known to have used before
-version 7 and that some servers require the client to use. (This define was
-added in 7.19.3)
-.IP CURLAUTH_GSSNEGOTIATE
-HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain
-\&"Negotiate") method was designed by Microsoft and is used in their web
-applications. It is primarily meant as a support for Kerberos5 authentication
-but may also be used along with other authentication methods. For more
-information see IETF draft draft-brezak-spnego-http-04.txt.
-
-You need to build libcurl with a suitable GSS-API library for this to work.
-.IP CURLAUTH_NTLM
-HTTP NTLM authentication. A proprietary protocol invented and used by
-Microsoft. It uses a challenge-response and hash concept similar to Digest, to
-prevent the password from being eavesdropped.
-
-You need to build libcurl with OpenSSL support for this option to work, or
-build libcurl on Windows.
-.IP CURLAUTH_ANY
-This is a convenience macro that sets all bits and thus makes libcurl pick any
-it finds suitable. libcurl will automatically select the one it finds most
-secure.
-.IP CURLAUTH_ANYSAFE
-This is a convenience macro that sets all bits except Basic and thus makes
-libcurl pick any it finds suitable. libcurl will automatically select the one
-it finds most secure.
-.RE
+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_TLSAUTH_PASSWORD
+TLS authentication password. See \fICURLOPT_TLSAUTH_PASSWORD(3)\fP
+.IP CURLOPT_TLSAUTH_TYPE
+TLS authentication methods. See \fICURLOPT_TLSAUTH_TYPE(3)\fP
.IP CURLOPT_PROXYAUTH
-Pass a long as parameter, which is set to a bitmask, to tell libcurl which
-authentication method(s) you want it to use for your proxy authentication. If
-more than one bit is set, libcurl will first query the site to see what
-authentication methods it supports and then pick the best one you allow it to
-use. For some methods, this will induce an extra network round-trip. Set the
-actual name and password with the \fICURLOPT_PROXYUSERPWD\fP option. The
-bitmask can be constructed by or'ing together the bits listed above for the
-\fICURLOPT_HTTPAUTH\fP option. As of this writing, only Basic, Digest and NTLM
-work. (Added in 7.10.7)
+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
-Pass a parameter set to 1 to enable this. When enabled, libcurl will
-automatically set the Referer: field in requests where it follows a Location:
-redirect.
-.IP CURLOPT_ENCODING
-Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
-enables decoding of a response when a Content-Encoding: header is received.
-Three encodings are supported: \fIidentity\fP, which does nothing,
-\fIdeflate\fP which requests the server to compress its response using the
-zlib algorithm, and \fIgzip\fP which requests the gzip algorithm. If a
-zero-length string is set, then an Accept-Encoding: header containing all
-supported encodings is sent.
-
-This is a request, not an order; the server may or may not do it. This option
-must be set (to any non-NULL value) or else any unsolicited encoding done by
-the server is ignored. See the special file lib/README.encoding for details.
+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
-A parameter set to 1 tells the library to follow any Location: header that the
-server sends as part of an HTTP header.
-
-This means that the library will re-send the same request on the new location
-and follow new Location: headers all the way until no more such headers are
-returned. \fICURLOPT_MAXREDIRS\fP can be used to limit the number of redirects
-libcurl will follow.
-
-Since 7.19.4, libcurl can limit what protocols it will automatically
-follow. The accepted protocols are set with \fICURLOPT_REDIR_PROTOCOLS\fP and
-it excludes the FILE protocol by default.
+Follow HTTP redirects. See \fICURLOPT_FOLLOWLOCATION(3)\fP
.IP CURLOPT_UNRESTRICTED_AUTH
-A parameter set to 1 tells the library it can continue to send authentication
-(user+password) when following locations, even when hostname changed. This
-option is meaningful only when setting \fICURLOPT_FOLLOWLOCATION\fP.
+Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
.IP CURLOPT_MAXREDIRS
-Pass a long. The set number will be the redirection limit. If that many
-redirections have been followed, the next redirect will cause an error
-(\fICURLE_TOO_MANY_REDIRECTS\fP). This option only makes sense if the
-\fICURLOPT_FOLLOWLOCATION\fP is used at the same time. Added in 7.15.1:
-Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for
-an infinite number of redirects (which is the default)
+Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
.IP CURLOPT_POSTREDIR
-Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
-301 or 302 response back. A parameter with bit 0 set (value
-\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC 2616/10.3.2 and
-not convert POST requests into GET requests when following a 301
-redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain
-the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience
-define that sets both bits.
-
-The non-RFC behaviour is ubiquitous in web browsers, so the library does the
-conversion by default to maintain consistency. However, a server may require a
-POST to remain a POST after such a redirection. This option is meaningful only
-when setting \fICURLOPT_FOLLOWLOCATION\fP. (Added in 7.17.1) (This option was
-known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before
-then)
+How to act on redirects after POST. See \fICURLOPT_POSTREDIR(3)\fP
.IP CURLOPT_PUT
-A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
-data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP.
-
-This option is deprecated and starting with version 7.12.1 you should instead
-use \fICURLOPT_UPLOAD\fP.
+Issue a HTTP PUT request. See \fICURLOPT_PUT(3)\fP
.IP CURLOPT_POST
-A parameter set to 1 tells the library to do a regular HTTP post. This will
-also make the library use a "Content-Type:
-application/x-www-form-urlencoded" header. (This is by far the most commonly
-used POST method).
-
-Use one of \fICURLOPT_POSTFIELDS\fP or \fICURLOPT_COPYPOSTFIELDS\fP options to
-specify what data to post and \fICURLOPT_POSTFIELDSIZE\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP to set the data size.
-
-Optionally, you can provide data to POST using the \fICURLOPT_READFUNCTION\fP
-and \fICURLOPT_READDATA\fP options but then you must make sure to not set
-\fICURLOPT_POSTFIELDS\fP to anything but NULL. When providing data with a
-callback, you must transmit it using chunked transfer-encoding or you must set
-the size of the data with the \fICURLOPT_POSTFIELDSIZE\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP option. To enable chunked encoding, you
-simply pass in the appropriate Transfer-Encoding header, see the
-post-callback.c example.
-
-You can override the default POST Content-Type: header by setting your own
-with \fICURLOPT_HTTPHEADER\fP.
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-If you use POST to a HTTP 1.1 server, you can send data without knowing the
-size before starting the POST if you use chunked encoding. You enable this by
-adding a header like "Transfer-Encoding: chunked" with
-\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
-specify the size in the request.
-
-When setting \fICURLOPT_POST\fP to 1, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
-
-If you issue a POST request and then want to make a HEAD or GET using the same
-re-used handle, you must explicitly set the new request type using
-\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
+Issue a HTTP POST request. See \fICURLOPT_POST(3)\fP
.IP CURLOPT_POSTFIELDS
-Pass a void * as parameter, which should be the full data to post in an HTTP
-POST operation. You must make sure that the data is formatted the way you want
-the server to receive it. libcurl will not convert or encode it for you. Most
-web servers will assume this data to be url-encoded.
-
-The pointed data are NOT copied by the library: as a consequence, they must
-be preserved by the calling application until the transfer finishes.
-
-This POST is a normal application/x-www-form-urlencoded kind (and libcurl will
-set that Content-Type by default when this option is used), which is the most
-commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
-\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
-
-If you want to do a zero-byte POST, you need to set
-\fICURLOPT_POSTFIELDSIZE\fP explicitly to zero, as simply setting
-\fICURLOPT_POSTFIELDS\fP to NULL or "" just effectively disables the sending
-of the specified string. libcurl will instead assume that you'll send the POST
-data using the read callback!
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-To make multipart/formdata posts (aka RFC2388-posts), check out the
-\fICURLOPT_HTTPPOST\fP option.
+Send a POST with this data. See \fICURLOPT_POSTFIELDS(3)\fP
.IP CURLOPT_POSTFIELDSIZE
-If you want to post data to the server without letting libcurl do a strlen()
-to measure the data size, this option must be used. When this option is used
-you can post fully binary data, which otherwise is likely to fail. If this
-size is set to -1, the library will use strlen() to get the size.
+The POST data is this big. See \fICURLOPT_POSTFIELDSIZE(3)\fP
.IP CURLOPT_POSTFIELDSIZE_LARGE
-Pass a curl_off_t as parameter. Use this to set the size of the
-\fICURLOPT_POSTFIELDS\fP data to prevent libcurl from doing strlen() on the
-data to figure out the size. This is the large file version of the
-\fICURLOPT_POSTFIELDSIZE\fP option. (Added in 7.11.1)
+The POST data is this big. See \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
.IP CURLOPT_COPYPOSTFIELDS
-Pass a char * as parameter, which should be the full data to post in an HTTP
-POST operation. It behaves as the \fICURLOPT_POSTFIELDS\fP option, but the
-original data are copied by the library, allowing the application to overwrite
-the original data after setting this option.
-
-Because data are copied, care must be taken when using this option in
-conjunction with \fICURLOPT_POSTFIELDSIZE\fP or
-\fICURLOPT_POSTFIELDSIZE_LARGE\fP: If the size has not been set prior to
-\fICURLOPT_COPYPOSTFIELDS\fP, the data are assumed to be a NUL-terminated
-string; else the stored size informs the library about the data byte count to
-copy. In any case, the size must not be changed after
-\fICURLOPT_COPYPOSTFIELDS\fP, unless another \fICURLOPT_POSTFIELDS\fP or
-\fICURLOPT_COPYPOSTFIELDS\fP option is issued.
-(Added in 7.17.1)
+Send a POST with this data - and copy it. See \fICURLOPT_COPYPOSTFIELDS(3)\fP
.IP CURLOPT_HTTPPOST
-Tells libcurl you want a multipart/formdata HTTP POST to be made and you
-instruct what data to pass on to the server. 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 until you close this curl handle again with
-\fIcurl_easy_cleanup(3)\fP.
-
-Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-When setting \fICURLOPT_HTTPPOST\fP, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
+Multipart formpost HTTP POST. See \fICURLOPT_HTTPPOST(3)\fP
.IP CURLOPT_REFERER
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set the Referer: header in the http request sent to the remote server. This
-can be used to fool servers or scripts. You can also set any custom header
-with \fICURLOPT_HTTPHEADER\fP.
+Referer: header. See \fICURLOPT_REFERER(3)\fP
.IP CURLOPT_USERAGENT
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set the User-Agent: header in the http request sent to the remote server. This
-can be used to fool servers or scripts. You can also set any custom header
-with \fICURLOPT_HTTPHEADER\fP.
+User-Agent: header. See \fICURLOPT_USERAGENT(3)\fP
.IP CURLOPT_HTTPHEADER
-Pass a pointer to a linked list of HTTP headers to pass to the server in your
-HTTP request. The linked list should be a fully valid list of \fBstruct
-curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
-create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire
-list. If you add a header that is otherwise generated and used by libcurl
-internally, your added one will be used instead. If you add a header with no
-content as in 'Accept:' (no data on the right side of the colon), the
-internally used header will get disabled. Thus, using this option you can add
-new headers, replace internal headers and remove internal headers. To add a
-header with no content, make the content be two quotes: \&"". The headers
-included in the linked list must not be CRLF-terminated, because curl adds
-CRLF after each header item. Failure to comply with this will result in
-strange bugs because the server will most likely ignore part of the headers
-you specified.
-
-The first line in a request (containing the method, usually a GET or POST) is
-not a header and cannot be replaced using this option. Only the lines
-following the request-line are headers. Adding this method line in this list
-of headers will only cause your request to send an invalid header.
-
-Pass a NULL to this to reset back to no custom headers.
-
-The most commonly replaced headers have "shortcuts" in the options
-\fICURLOPT_COOKIE\fP, \fICURLOPT_USERAGENT\fP and \fICURLOPT_REFERER\fP.
+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
-Pass a pointer to a linked list of aliases to be treated as valid HTTP 200
-responses. Some servers respond with a custom header response line. For
-example, IceCast servers respond with "ICY 200 OK". By including this string
-in your list of aliases, the response will be treated as a valid HTTP header
-line such as "HTTP/1.0 200 OK". (Added in 7.10.3)
-
-The linked list should be a fully valid list of struct curl_slist structs, and
-be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
-\fIcurl_slist_free_all(3)\fP to clean up an entire list.
-
-The alias itself is not parsed for any version strings. Before libcurl 7.16.3,
-Libcurl used the value set by option \fICURLOPT_HTTP_VERSION\fP, but starting
-with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
+Alternative versions of 200 OK. See \fICURLOPT_HTTP200ALIASES(3)\fP
.IP CURLOPT_COOKIE
-Pass a pointer to a zero terminated string as parameter. It will be used to
-set a cookie in the http request. The format of the string should be
-NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
-should contain.
-
-If you need to set multiple cookies, you need to set them all using a single
-option and thus you need to concatenate them all in one single string. Set
-multiple cookies in one string like this: "name1=content1; name2=content2;"
-etc.
-
-This option sets the cookie header explictly in the outgoing request(s). If
-multiple requests are done due to authentication, followed redirections or
-similar, they will all get this cookie passed on.
-
-Using this option multiple times will only make the latest string override the
-previous ones.
+Cookie(s) to send. See \fICURLOPT_COOKIE(3)\fP
.IP CURLOPT_COOKIEFILE
-Pass a pointer to a zero terminated string as parameter. It should contain the
-name of your file holding cookie data to read. The cookie data may be in
-Netscape / Mozilla cookie data format or just regular HTTP-style headers
-dumped to a file.
-
-Given an empty or non-existing file or by passing the empty string (""), this
-option will enable cookies for this curl handle, making it understand and
-parse received cookies and then use matching cookies in future requests.
-
-If you use this option multiple times, you just add more files to read.
-Subsequent files will add more cookies.
+File to read cookies from. See \fICURLOPT_COOKIEFILE(3)\fP
.IP CURLOPT_COOKIEJAR
-Pass a file name as char *, zero terminated. This will make libcurl write all
-internally known cookies to the specified file when \fIcurl_easy_cleanup(3)\fP
-is called. If no cookies are known, no file will be created. Specify "-" to
-instead have the cookies written to stdout. Using this option also enables
-cookies for this session, so if you for example follow a location it will make
-matching cookies get sent accordingly.
-
-If the cookie jar file can't be created or written to (when the
-\fIcurl_easy_cleanup(3)\fP is called), libcurl will not and cannot report an
-error for this. Using \fICURLOPT_VERBOSE\fP or \fICURLOPT_DEBUGFUNCTION\fP
-will get a warning to display, but that is the only visible feedback you get
-about this possibly lethal situation.
+File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP
.IP CURLOPT_COOKIESESSION
-Pass a long set to 1 to mark this as a new cookie "session". It will force
-libcurl to ignore all cookies it is about to load that are "session cookies"
-from the previous session. By default, libcurl always stores and loads all
-cookies, independent if they are session cookies or not. Session cookies are
-cookies without expiry date and they are meant to be alive and existing for
-this "session" only.
+Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP
.IP CURLOPT_COOKIELIST
-Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla
-format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL
-cookie engine was not enabled it will enable its cookie engine. Passing a
-magic string \&"ALL" will erase all cookies known by cURL. (Added in 7.14.1)
-Passing the special string \&"SESS" will only erase all session cookies known
-by cURL. (Added in 7.15.4) Passing the special string \&"FLUSH" will write
-all cookies known by cURL to the file specified by \fICURLOPT_COOKIEJAR\fP.
-(Added in 7.17.1)
+Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP
.IP CURLOPT_HTTPGET
-Pass a long. If the long is 1, this forces the HTTP request to get back
-to GET. Usable if a POST, HEAD, PUT, or a custom request has been used
-previously using the same curl handle.
-
-When setting \fICURLOPT_HTTPGET\fP to 1, it will automatically set
-\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
+Do a HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
.IP CURLOPT_HTTP_VERSION
-Pass a long, set to one of the values described below. They force libcurl to
-use the specific HTTP versions. This is not sensible to do unless you have a
-good reason.
-.RS
-.IP CURL_HTTP_VERSION_NONE
-We don't care about what version the library uses. libcurl will use whatever
-it thinks fit.
-.IP CURL_HTTP_VERSION_1_0
-Enforce HTTP 1.0 requests.
-.IP CURL_HTTP_VERSION_1_1
-Enforce HTTP 1.1 requests.
-.RE
+HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP
.IP CURLOPT_IGNORE_CONTENT_LENGTH
-Ignore the Content-Length header. This is useful for Apache 1.x (and similar
-servers) which will report incorrect content length for files over 2
-gigabytes. If this option is used, curl will not be able to accurately report
-progress, and will simply stop the download when the server ends the
-connection. (added in 7.14.1)
+Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP
.IP CURLOPT_HTTP_CONTENT_DECODING
-Pass a long to tell libcurl how to act on content decoding. If set to zero,
-content decoding will be disabled. If set to 1 it is enabled. Libcurl has no
-default content decoding but requires you to use \fICURLOPT_ENCODING\fP for
-that. (added in 7.16.2)
+Disable Content decoding. See \fICURLOPT_HTTP_CONTENT_DECODING(3)\fP
.IP CURLOPT_HTTP_TRANSFER_DECODING
-Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
-transfer decoding will be disabled, if set to 1 it is enabled
-(default). libcurl does chunked transfer decoding by default unless this
-option is set to zero. (added in 7.16.2)
+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
.SH SMTP OPTIONS
.IP CURLOPT_MAIL_FROM
-Pass a pointer to a zero terminated string as parameter. It will be used to
-specify the sender address in a mail when sending an SMTP mail with libcurl.
-
-(Added in 7.20.0)
+Address of the sender. See \fICURLOPT_MAIL_FROM(3)\fP
.IP CURLOPT_MAIL_RCPT
-Pass a pointer to a linked list of recipients to pass to the server in your
-SMTP mail request. The linked list should be a fully valid list of \fBstruct
-curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
-create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list.
-
-Each recipient in SMTP lingo is specified with angle brackets (<>), but should
-you not use an angle bracket as first letter libcurl will assume you provide a
-single email address only and enclose that with angle brackets for you.
-
-(Added in 7.20.0)
+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
-Specify block size to use for TFTP data transmission. Valid range as per RFC
-2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is
-not specified. The specified block size will only be used pending support by
-the remote server. If the server does not return an option acknowledgement or
-returns an option acknowledgement with no blksize, the default of 512 bytes
-will be used. (added in 7.19.4)
+TFTP block size. See \fICURLOPT_TFTP_BLKSIZE(3)\fP
.SH FTP OPTIONS
.IP CURLOPT_FTPPORT
-Pass a pointer to a zero terminated string as parameter. It will be used to
-get the IP address to use for the FTP PORT instruction. The PORT instruction
-tells the remote server to connect to our specified IP address. The string may
-be a plain IP address, a host name, a network interface name (under Unix) or
-just a '-' symbol to let the library use your system's default IP
-address. Default FTP operations are passive, and thus won't use PORT.
-
-The address can be followed by a ':' to specify a port, optionally followed by
-a '-' to specify a port range. If the port specified is 0, the operating
-system will pick a free port. If a range is provided and all ports in the
-range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the
-handle. Invalid port/range settings are ignored. IPv6 addresses followed by
-a port or portrange have to be in brackets. IPv6 addresses without port/range
-specifier can be in brackets. (added in 7.19.5)
-
-Examples with specified ports:
-
-.nf
- eth0:0
- 192.168.1.2:32000-33000
- curl.se:32123
- [::1]:1234-4567
-.fi
-
-You disable PORT again and go back to using the passive version by setting
-this option to NULL.
+Use active FTP. See \fICURLOPT_FTPPORT(3)\fP
.IP CURLOPT_QUOTE
-Pass a pointer to a linked list of FTP or SFTP commands to pass to
-the server prior to your FTP request. This will be done before any
-other commands are issued (even before the CWD command for FTP). The
-linked list should be a fully valid list of 'struct curl_slist' structs
-properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
-to append strings (commands) to the list, and clear the entire list
-afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation
-again by setting a NULL to this option.
-The set of valid FTP commands depends on the server (see RFC959 for a
-list of mandatory commands).
-The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd,
-rename, rm, rmdir, symlink (see
-.BR curl (1))
-(SFTP support added in 7.16.3)
+Commands to run before transfer. See \fICURLOPT_QUOTE(3)\fP
.IP CURLOPT_POSTQUOTE
-Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
-after your FTP transfer request. The commands will only be run if no error
-occurred. The linked list should be a fully valid list of struct curl_slist
-structs properly filled in as described for \fICURLOPT_QUOTE\fP. Disable this
-operation again by setting a NULL to this option.
+Commands to run after transfer. See \fICURLOPT_POSTQUOTE(3)\fP
.IP CURLOPT_PREQUOTE
-Pass a pointer to a linked list of FTP commands to pass to the server after
-the transfer type is set. The linked list should be a fully valid list of
-struct curl_slist structs properly filled in as described for
-\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
-option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP to 1, this
-option didn't work.
-.IP CURLOPT_DIRLISTONLY
-A parameter set to 1 tells the library to just list the names of files in a
-directory, instead of doing a full directory listing that would include file
-sizes, dates etc. This works for FTP and SFTP URLs.
-
-This causes an FTP NLST command to be sent on an FTP server. Beware that some
-FTP servers list only files in their response to NLST; they might not include
-subdirectories and symbolic links.
-
-Setting this option to 1 also implies a directory listing even if the URL
-doesn't end with a slash, which otherwise is necessary.
-
-Do NOT use this option if you also use \fICURLOPT_WILDCARDMATCH\fP as it will
-effectively break that feature then.
-
-(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
+Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP
.IP CURLOPT_APPEND
-A parameter set to 1 tells the library to append to the remote file instead of
-overwrite it. This is only useful when uploading to an FTP site.
-
-(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
+Append to remote file. See \fICURLOPT_APPEND(3)\fP
.IP CURLOPT_FTP_USE_EPRT
-Pass a long. If the value is 1, it tells curl to use the EPRT (and
-LPRT) command when doing active FTP downloads (which is enabled by
-\fICURLOPT_FTPPORT\fP). Using EPRT means that it will first attempt to use
-EPRT and then LPRT before using PORT, but if you pass zero to this
-option, it will not try using EPRT or LPRT, only plain PORT. (Added in 7.10.5)
-
-If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+Use EPTR. See \fICURLOPT_FTP_USE_EPRT(3)\fP
.IP CURLOPT_FTP_USE_EPSV
-Pass a long. If the value is 1, it tells curl to use the EPSV command
-when doing passive FTP downloads (which it always does by default). Using EPSV
-means that it will first attempt to use EPSV before using PASV, but if you
-pass zero to this option, it will not try using EPSV, only plain PASV.
-
-If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP
.IP CURLOPT_FTP_USE_PRET
-Pass a long. If the value is 1, it tells curl to send a PRET command before
-PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard
-command for directory listings as well as up and downloads in PASV mode. Has
-no effect when using the active FTP transfers mode. (Added in 7.20.0)
+Use PRET. See \fICURLOPT_FTP_USE_PRET(3)\fP
.IP CURLOPT_FTP_CREATE_MISSING_DIRS
-Pass a long. If the value is 1, curl will attempt to create any remote
-directory that it fails to CWD into. CWD is the command that changes working
-directory. (Added in 7.10.7)
-
-This setting also applies to SFTP-connections. curl will attempt to create
-the remote directory if it can't obtain a handle to the target-location. The
-creation will fail if a file of the same name as the directory to create
-already exists or lack of permissions prevents creation. (Added in 7.16.3)
-
-Starting with 7.19.4, you can also set this value to 2, which will make
-libcurl retry the CWD command again if the subsequent MKD command fails. This
-is especially useful if you're doing many simultanoes connections against the
-same server and they all have this option enabled, as then CWD may first fail
-but then another connection does MKD before this connection and thus MKD fails
-but trying CWD works! 7.19.4 also introduced the \fICURLFTP_CREATE_DIR\fP and
-\fICURLFTP_CREATE_DIR_RETRY\fP enum names for these arguments.
-
-Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act
-as if 1 was selected.
+Create missing directories on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
-Pass a long. Causes curl to set a timeout period (in seconds) on the amount
-of time that the server is allowed to take in order to generate a response
-message for a command before the session is considered hung. While curl is
-waiting for a response, this value overrides \fICURLOPT_TIMEOUT\fP. It is
-recommended that if used in conjunction with \fICURLOPT_TIMEOUT\fP, you set
-\fICURLOPT_FTP_RESPONSE_TIMEOUT\fP to a value smaller than
-\fICURLOPT_TIMEOUT\fP. (Added in 7.10.8)
+Timeout for FTP responses. See \fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP
.IP CURLOPT_FTP_ALTERNATIVE_TO_USER
-Pass a char * as parameter, pointing to a string which will be used to
-authenticate if the usual FTP "USER user" and "PASS password" negotiation
-fails. This is currently only known to be required when connecting to
-Tumbleweed's Secure Transport FTPS server using client certificates for
-authentication. (Added in 7.15.5)
+Alternative to USER. See \fICURLOPT_FTP_ALTERNATIVE_TO_USER(3)\fP
.IP CURLOPT_FTP_SKIP_PASV_IP
-Pass a long. If set to 1, it instructs libcurl to not use the IP address the
-server suggests in its 227-response to libcurl's PASV command when libcurl
-connects the data connection. Instead libcurl will re-use the same IP address
-it already uses for the control connection. But it will use the port number
-from the 227-response. (Added in 7.14.2)
-
-This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-.IP CURLOPT_USE_SSL
-Pass a long using one of the values from below, to make libcurl use your
-desired level of SSL for the FTP transfer. (Added in 7.11.0)
-
-(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
-were known as CURLFTPSSL_*)
-.RS
-.IP CURLUSESSL_NONE
-Don't attempt to use SSL.
-.IP CURLUSESSL_TRY
-Try using SSL, proceed as normal otherwise.
-.IP CURLUSESSL_CONTROL
-Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
-.IP CURLUSESSL_ALL
-Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
-.RE
+Ignore the IP address in the PASV response. See \fICURLOPT_FTP_SKIP_PASV_IP(3)\fP
.IP CURLOPT_FTPSSLAUTH
-Pass a long using one of the values from below, to alter how libcurl issues
-\&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see
-\fICURLOPT_USE_SSL\fP). (Added in 7.12.2)
-.RS
-.IP CURLFTPAUTH_DEFAULT
-Allow libcurl to decide.
-.IP CURLFTPAUTH_SSL
-Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
-.IP CURLFTPAUTH_TLS
-Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
-.RE
+Control how to do TLS. See \fICURLOPT_FTPSSLAUTH(3)\fP
.IP CURLOPT_FTP_SSL_CCC
-If enabled, this option makes libcurl use CCC (Clear Command Channel). It
-shuts down the SSL/TLS layer after authenticating. The rest of the
-control channel communication will be unencrypted. This allows NAT routers
-to follow the FTP transaction. Pass a long using one of the values below.
-(Added in 7.16.1)
-.RS
-.IP CURLFTPSSL_CCC_NONE
-Don't attempt to use CCC.
-.IP CURLFTPSSL_CCC_PASSIVE
-Do not initiate the shutdown, but wait for the server to do it. Do not send
-a reply.
-.IP CURLFTPSSL_CCC_ACTIVE
-Initiate the shutdown and wait for a reply.
-.RE
+Back to non-TLS again after authentication. See \fICURLOPT_FTP_SSL_CCC(3)\fP
.IP CURLOPT_FTP_ACCOUNT
-Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP
-server asks for "account data" after user name and password has been provided,
-this data is sent off using the ACCT command. (Added in 7.13.0)
+Send ACCT command. See \fICURLOPT_FTP_ACCOUNT(3)\fP
.IP CURLOPT_FTP_FILEMETHOD
-Pass a long that should have one of the following values. This option controls
-what method libcurl should use to reach a file on a FTP(S) server. The
-argument should be one of the following alternatives:
-.RS
-.IP CURLFTPMETHOD_MULTICWD
-libcurl does a single CWD operation for each path part in the given URL. For
-deep hierarchies this means many commands. This is how RFC1738 says it
-should be done. This is the default but the slowest behavior.
-.IP CURLFTPMETHOD_NOCWD
-libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
-full path to the server for all these commands. This is the fastest behavior.
-.IP CURLFTPMETHOD_SINGLECWD
-libcurl does one CWD with the full target directory and then operates on the
-file \&"normally" (like in the multicwd case). This is somewhat more standards
-compliant than 'nocwd' but without the full penalty of 'multicwd'.
-.RE
-(Added in 7.15.1)
+Specify how to reach files. See \fICURLOPT_FTP_FILEMETHOD(3)\fP
.SH RTSP OPTIONS
.IP CURLOPT_RTSP_REQUEST
-Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP
-enum values. Unless noted otherwise, commands require the Session ID to be
-initialized. (Added in 7.20.0)
-.RS
-.IP CURL_RTSPREQ_OPTIONS
-Used to retrieve the available methods of the server. The application is
-responsbile for parsing and obeying the response. \fB(The session ID is not
-needed for this method.)\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_DESCRIBE
-Used to get the low level description of a stream. The application should note
-what formats it understands in the \fI'Accept:'\fP header. Unless set
-manually, libcurl will automatically fill in \fI'Accept:
-application/sdp'\fP. Time-condition headers will be added to Describe requests
-if the \fICURLOPT_TIMECONDITION\fP option is active. \fB(The session ID is not
-needed for this method)\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_ANNOUNCE
-When sent by a client, this method changes the description of the session. For
-example, if a client is using the server to record a meeting, the client can
-use Announce to inform the server of all the meta-information about the
-session. ANNOUNCE acts like an HTTP PUT or POST just like
-\fICURL_RTSPREQ_SET_PARAMETER\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_SETUP
-Setup is used to initialize the transport layer for the session. The
-application must set the desired Transport options for a session by using the
-\fICURLOPT_RTSP_TRANSPORT\fP option prior to calling setup. If no session ID
-is currently set with \fICURLOPT_RTSP_SESSION_ID\fP, libcurl will extract and
-use the session ID in the response to this request. \fB(The session ID is not
-needed for this method).\fP (Added in 7.20.0)
-.IP CURL_RTSPREQ_PLAY
-Send a Play command to the server. Use the \fICURLOPT_RANGE\fP option to
-modify the playback time (e.g. 'npt=10-15'). (Added in 7.20.0)
-.IP CURL_RTSPREQ_PAUSE
-Send a Pause command to the server. Use the \fICURLOPT_RANGE\fP option with a
-single value to indicate when the stream should be halted. (e.g. npt='25')
-(Added in 7.20.0)
-.IP CURL_RTSPREQ_TEARDOWN
-This command terminates an RTSP session. Simply closing a connection does not
-terminate the RTSP session since it is valid to control an RTSP session over
-different connections. (Added in 7.20.0)
-.IP CURL_RTSPREQ_GET_PARAMETER
-Retrieve a parameter from the server. By default, libcurl will automatically
-include a \fIContent-Type: text/parameters\fP header on all non-empty requests
-unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST
-(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
-Applications wishing to send a heartbeat message (e.g. in the presence of a
-server-specified timeout) should send use an empty GET_PARAMETER request.
-(Added in 7.20.0)
-.IP CURL_RTSPREQ_SET_PARAMETER
-Set a parameter on the server. By default, libcurl will automatically include
-a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
-interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application
-may either use \fICURLOPT_UPLOAD\fP with \fICURLOPT_READDATA\fP like an HTTP
-PUT, or it may use \fICURLOPT_POSTFIELDS\fP like an HTTP POST. No chunked
-transfers are allowed, so the application must set the
-\fICURLOPT_INFILESIZE\fP in the former and \fICURLOPT_POSTFIELDSIZE\fP in the
-latter. Also, there is no use of multi-part POSTs within RTSP. (Added in
-7.20.0)
-.IP CURL_RTSPREQ_RECORD
-Used to tell the server to record a session. Use the \fICURLOPT_RANGE\fP
-option to modify the record time. (Added in 7.20.0)
-.IP CURL_RTSPREQ_RECEIVE
-This is a special request because it does not send any data to the server. The
-application may call this function in order to receive interleaved RTP
-data. It will return after processing one read buffer of data in order to give
-the application a chance to run. (Added in 7.20.0)
-.RE
+RTSP request. See \fICURLOPT_RTSP_REQUEST(3)\fP
.IP CURLOPT_RTSP_SESSION_ID
-Pass a char * as a parameter to set the value of the current RTSP Session ID
-for the handle. Useful for resuming an in-progress session. Once this value is
-set to any non-NULL value, libcurl will return \fICURLE_RTSP_SESSION_ERROR\fP
-if ID received from the server does not match. If unset (or set to NULL),
-libcurl will automatically set the ID the first time the server sets it in a
-response. (Added in 7.20.0)
+RTSP session-id. See \fICURLOPT_RTSP_SESSION_ID(3)\fP
.IP CURLOPT_RTSP_STREAM_URI
-Set the stream URI to operate on by passing a char * . For example, a single
-session may be controlling \fIrtsp://foo/twister/audio\fP and
-\fIrtsp://foo/twister/video\fP and the application can switch to the
-appropriate stream using this option. If unset, libcurl will default to
-operating on generic server options by passing '*' in the place of the RTSP
-Stream URI. This option is distinct from \fICURLOPT_URL\fP. When working with
-RTSP, the \fICURLOPT_STREAM_URI\fP indicates what URL to send to the server in
-the request header while the \fICURLOPT_URL\fP indicates where to make the
-connection to. (e.g. the \fICURLOPT_URL\fP for the above examples might be
-set to \fIrtsp://foo/twister\fP (Added in 7.20.0)
+RTSP stream URI. See \fICURLOPT_RTSP_STREAM_URI(3)\fP
.IP CURLOPT_RTSP_TRANSPORT
-Pass a char * to tell libcurl what to pass for the Transport: header for this
-RTSP session. This is mainly a convenience method to avoid needing to set a
-custom Transport: header for every SETUP request. The application must set a
-Transport: header before issuing a SETUP request. (Added in 7.20.0)
-.IP CURLOPT_RTSP_HEADER
-This option is simply an alias for \fICURLOPT_HTTP_HEADER\fP. Use this to
-replace the standard headers that RTSP and HTTP share. It is also valid to use
-the shortcuts such as \fICURLOPT_USERAGENT\fP. (Added in 7.20.0)
+RTSP Transport: header. See \fICURLOPT_RTSP_TRANSPORT(3)\fP
.IP CURLOPT_RTSP_CLIENT_CSEQ
-Manually set the the CSEQ number to issue for the next RTSP request. Useful if
-the application is resuming a previously broken connection. The CSEQ will
-increment from this new number henceforth. (Added in 7.20.0)
+Client CSEQ number. See \fICURLOPT_RTSP_CLIENT_CSEQ(3)\fP
.IP CURLOPT_RTSP_SERVER_CSEQ
-Manually set the CSEQ number to expect for the next RTSP Server->Client
-request. At the moment, this feature (listening for Server requests) is
-unimplemented. (Added in 7.20.0)
+CSEQ number for RTSP Server->Client request. See \fICURLOPT_RTSP_SERVER_CSEQ(3)\fP
.SH PROTOCOL OPTIONS
.IP CURLOPT_TRANSFERTEXT
-A parameter set to 1 tells the library to use ASCII mode for FTP transfers,
-instead of the default binary transfer. For win32 systems it does not set the
-stdout to binary mode. This option can be usable when transferring text data
-between systems with different views on certain characters, such as newlines
-or similar.
-
-libcurl does not do a complete ASCII conversion when doing ASCII transfers
-over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
-simply sets the mode to ASCII and performs a standard transfer.
+Use text transfer. See \fICURLOPT_TRANSFERTEXT(3)\fP
.IP CURLOPT_PROXY_TRANSFER_MODE
-Pass a long. If the value is set to 1 (one), it tells libcurl to set the
-transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by
-appending ;type=a or ;type=i to the URL. Without this setting, or it being set
-to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT\fP has no effect when doing
-FTP via a proxy. Beware that not all proxies support this feature. (Added in
-7.18.0)
+Add transfer mode to URL over proxy. See \fICURLOPT_PROXY_TRANSFER_MODE(3)\fP
.IP CURLOPT_CRLF
-Convert Unix newlines to CRLF newlines on transfers.
+Convert newlines. See \fICURLOPT_CRLF(3)\fP
.IP CURLOPT_RANGE
-Pass a char * as parameter, which should contain the specified range you
-want. It should be in the format "X-Y", where X or Y may be left out. HTTP
-transfers also support several intervals, separated with commas as in
-\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
-server to send the response document in pieces (using standard MIME separation
-techniques). For RTSP, the formatting of a range should follow RFC 2326
-Section 12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges
-should be given in npt, utc, or smpte formats.
-
-Pass a NULL to this option to disable the use of ranges.
-
-Ranges work on HTTP, FTP, FILE (since 7.18.0), and RTSP (since 7.20.0)
-transfers only.
+Range requests. See \fICURLOPT_RANGE(3)\fP
.IP CURLOPT_RESUME_FROM
-Pass a long as parameter. It contains the offset in number of bytes that you
-want the transfer to start from. Set this option to 0 to make the transfer
-start from the beginning (effectively disabling resume). For FTP, set this
-option to -1 to make the transfer start from the end of the target file
-(useful to continue an interrupted upload).
-
-When doing uploads with FTP, the resume position is where in the local/source
-file libcurl should try to resume the upload from and it will then append the
-source file to the remote target file.
+Resume a transfer. See \fICURLOPT_RESUME_FROM(3)\fP
.IP CURLOPT_RESUME_FROM_LARGE
-Pass a curl_off_t as parameter. It contains the offset in number of bytes that
-you want the transfer to start from. (Added in 7.11.0)
+Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP
.IP CURLOPT_CUSTOMREQUEST
-Pass a pointer to a zero terminated string as parameter. It will be used
-instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
-when doing a FTP directory listing. This is useful for doing DELETE or other
-more or less obscure HTTP requests. Don't do this at will, make sure your
-server supports the command first.
-
-When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST\fP to
-something, you don't actually change how libcurl behaves or acts in regards to
-the particular request method, it will only change the actual string sent in
-the request.
-
-For example: if you tell libcurl to do a HEAD request, but then change the
-request to a "GET" with \fBCURLOPT_CUSTOMREQUEST\fP you'll still see libcurl
-act as if it sent a HEAD even when it does send a GET.
-
-To switch to a proper HEAD, use \fICURLOPT_NOBODY\fP, to switch to a proper
-POST, use \fICURLOPT_POST\fP or \fICURLOPT_POSTFIELDS\fP and so on.
-
-Restore to the internal default by setting this to NULL.
-
-Many people have wrongly used this option to replace the entire request with
-their own, including multiple headers and POST contents. While that might work
-in many cases, it will cause libcurl to send invalid requests and it could
-possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and
-\fICURLOPT_POSTFIELDS\fP to set POST data. Use \fICURLOPT_HTTPHEADER\fP to
-replace or extend the set of headers sent by libcurl. Use
-\fICURLOPT_HTTP_VERSION\fP to change HTTP version.
+Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP
.IP CURLOPT_FILETIME
-Pass a long. If it is 1, libcurl will attempt to get the modification date of
-the remote document in this operation. This requires that the remote server
-sends the time or replies to a time querying command. The
-\fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument
-can be used after a transfer to extract the received time (if any).
+Request file modification date and time. See \fICURLOPT_FILETIME(3)\fP
+.IP CURLOPT_DIRLISTONLY
+List only. See \fICURLOPT_DIRLISTONLY(3)\fP
.IP CURLOPT_NOBODY
-A parameter set to 1 tells the library to not include the body-part in the
-output. This is only relevant for protocols that have separate header and body
-parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
-
-To change request to GET, you should use \fICURLOPT_HTTPGET\fP. Change request
-to POST with \fICURLOPT_POST\fP etc.
+Do not get the body contents. See \fICURLOPT_NOBODY(3)\fP
.IP CURLOPT_INFILESIZE
-When uploading a file to a remote site, this option should be used to tell
-libcurl what the expected size of the infile is. This value should be passed
-as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
-
-For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE\fP is
-mandatory.
-
-This option does not limit how much data libcurl will actually send, as that
-is controlled entirely by what the read callback returns.
+Size of file to send. \fICURLOPT_INFILESIZE(3)\fP
.IP CURLOPT_INFILESIZE_LARGE
-When uploading a file to a remote site, this option should be used to tell
-libcurl what the expected size of the infile is. This value should be passed
-as a curl_off_t. (Added in 7.11.0)
-
-For uploading using SCP, this option or \fICURLOPT_INFILESIZE\fP is mandatory.
-
-This option does not limit how much data libcurl will actually send, as that
-is controlled entirely by what the read callback returns.
+Size of file to send. \fICURLOPT_INFILESIZE_LARGE(3)\fP
.IP CURLOPT_UPLOAD
-A parameter set to 1 tells the library to prepare for an upload. The
-\fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP or
-\fICURLOPT_INFILESIZE_LARGE\fP options are also interesting for uploads. If
-the protocol is HTTP, uploading means using the PUT request unless you tell
-libcurl otherwise.
-
-Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
-You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
-
-If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
-size before starting the transfer if you use chunked encoding. You enable this
-by adding a header like "Transfer-Encoding: chunked" with
-\fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must
-specify the size.
+Upload data. See \fICURLOPT_UPLOAD(3)\fP
.IP CURLOPT_MAXFILESIZE
-Pass a long as parameter. This allows you to specify the maximum size (in
-bytes) of a file to download. If the file requested is larger than this value,
-the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
-
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+Maximum file size to get. See \fICURLOPT_MAXFILESIZE(3)\fP
.IP CURLOPT_MAXFILESIZE_LARGE
-Pass a curl_off_t as parameter. This allows you to specify the maximum size
-(in bytes) of a file to download. If the file requested is larger than this
-value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will be
-returned. (Added in 7.11.0)
-
-The file size is not always known prior to download, and for such files this
-option has no effect even if the file transfer ends up being larger than this
-given limit. This concerns both FTP and HTTP transfers.
+Maximum file size to get. See \fICURLOPT_MAXFILESIZE_LARGE(3)\fP
.IP CURLOPT_TIMECONDITION
-Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
-value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
-or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, and
-RTSP.
-
-The last modification time of a file is not always known and in such instances
-this feature will have no effect even if the given time condition would not
-have been met. \fIcurl_easy_getinfo(3)\fP with the
-\fICURLINFO_CONDITION_UNMET\fP option can be used after a transfer to learn if
-a zero-byte successful "transfer" was due to this condition not matching.
+Make a time conditional request. See \fICURLOPT_TIMECONDITION(3)\fP
.IP CURLOPT_TIMEVALUE
-Pass a long as parameter. This should be the time in seconds since 1 Jan 1970,
-and the time will be used in a condition as specified with
-\fICURLOPT_TIMECONDITION\fP.
+Time value for the time conditional request. See \fICURLOPT_TIMEVALUE(3)\fP
.SH CONNECTION OPTIONS
.IP CURLOPT_TIMEOUT
-Pass a long as parameter containing the maximum time in seconds that you allow
-the libcurl transfer operation to take. Normally, name lookups can take a
-considerable time and limiting operations to less than a few minutes risk
-aborting perfectly normal operations. This option will cause curl to use the
-SIGALRM to enable time-outing system calls.
-
-In unix-like systems, this might cause signals to be used unless
-\fICURLOPT_NOSIGNAL\fP is set.
+Timeout for the entire request. See \fICURLOPT_TIMEOUT(3)\fP
.IP CURLOPT_TIMEOUT_MS
-Like \fICURLOPT_TIMEOUT\fP but takes number of milliseconds instead. If
-libcurl is built to use the standard system name resolver, that portion
-of the transfer will still use full-second resolution for timeouts with
-a minimum timeout allowed of one second.
-(Added in 7.16.2)
+Millisecond timeout for the entire request. See \fICURLOPT_TIMEOUT_MS(3)\fP
.IP CURLOPT_LOW_SPEED_LIMIT
-Pass a long as parameter. It contains the transfer speed in bytes per second
-that the transfer should be below during \fICURLOPT_LOW_SPEED_TIME\fP seconds
-for the library to consider it too slow and abort.
+Low speed limit to abort transfer. See \fICURLOPT_LOW_SPEED_LIMIT(3)\fP
.IP CURLOPT_LOW_SPEED_TIME
-Pass a long as parameter. It contains the time in seconds that the transfer
-should be below the \fICURLOPT_LOW_SPEED_LIMIT\fP for the library to consider
-it too slow and abort.
+Time to be below the speed to trigger low speed abort. See \fICURLOPT_LOW_SPEED_TIME(3)\fP
.IP CURLOPT_MAX_SEND_SPEED_LARGE
-Pass a curl_off_t as parameter. If an upload exceeds this speed (counted in
-bytes per second) on cumulative average during the transfer, the transfer will
-pause to keep the average rate less than or equal to the parameter value.
-Defaults to unlimited speed. (Added in 7.15.5)
+Cap the upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP
.IP CURLOPT_MAX_RECV_SPEED_LARGE
-Pass a curl_off_t as parameter. If a download exceeds this speed (counted in
-bytes per second) on cumulative average during the transfer, the transfer will
-pause to keep the average rate less than or equal to the parameter
-value. Defaults to unlimited speed. (Added in 7.15.5)
+Cap the download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP
.IP CURLOPT_MAXCONNECTS
-Pass a long. The set number will be the persistent connection cache size. The
-set amount will be the maximum amount of simultaneously open connections that
-libcurl may cache in this easy handle. Default is 5, and there isn't much
-point in changing this value unless you are perfectly aware of how this works
-and changes libcurl's behaviour. This concerns connections using any of the
-protocols that support persistent connections.
-
-When reaching the maximum limit, curl closes the oldest one in the cache to
-prevent increasing the number of open connections.
-
-If you already have performed transfers with this curl handle, setting a
-smaller MAXCONNECTS than before may cause open connections to get closed
-unnecessarily.
-
-If you add this easy handle to a multi handle, this setting is not
-acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and the
-\fICURLMOPT_MAXCONNECTS\fP option.
-.IP CURLOPT_CLOSEPOLICY
-(Obsolete) This option does nothing.
+Maximum number of connections in the connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP
.IP CURLOPT_FRESH_CONNECT
-Pass a long. Set to 1 to make the next transfer use a new (fresh) connection
-by force. If the connection cache is full before this connection, one of the
-existing connections will be closed as according to the selected or default
-policy. This option should be used with caution and only if you understand
-what it does. Set this to 0 to have libcurl attempt re-using an existing
-connection (default behavior).
+Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP
.IP CURLOPT_FORBID_REUSE
-Pass a long. Set to 1 to make the next transfer explicitly close the
-connection when done. Normally, libcurl keeps all connections alive when done
-with one transfer in case a succeeding one follows that can re-use them.
-This option should be used with caution and only if you understand what it
-does. Set to 0 to have libcurl keep the connection open for possible later
-re-use (default behavior).
+Prevent subsequent connections from re-using this. See \fICURLOPT_FORBID_REUSE(3)\fP
.IP CURLOPT_CONNECTTIMEOUT
-Pass a long. It should contain the maximum time in seconds that you allow the
-connection to the server to take. This only limits the connection phase, once
-it has connected, this option is of no more use. Set to zero to disable
-connection timeout (it will then only timeout on the system's internal
-timeouts). See also the \fICURLOPT_TIMEOUT\fP option.
-
-In unix-like systems, this might cause signals to be used unless
-\fICURLOPT_NOSIGNAL\fP is set.
+Timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT(3)\fP
.IP CURLOPT_CONNECTTIMEOUT_MS
-Like \fICURLOPT_CONNECTTIMEOUT\fP but takes the number of milliseconds
-instead. If libcurl is built to use the standard system name resolver,
-that portion of the connect will still use full-second resolution for
-timeouts with a minimum timeout allowed of one second.
-(Added in 7.16.2)
+Millisecond timeout for the connection phase. See \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
.IP CURLOPT_IPRESOLVE
-Allows an application to select what kind of IP addresses to use when
-resolving host names. This is only interesting when using host names that
-resolve addresses using more than one version of IP. The allowed values are:
-.RS
-.IP CURL_IPRESOLVE_WHATEVER
-Default, resolves addresses to all IP versions that your system allows.
-.IP CURL_IPRESOLVE_V4
-Resolve to IPv4 addresses.
-.IP CURL_IPRESOLVE_V6
-Resolve to IPv6 addresses.
-.RE
+IP version to resolve to. See \fICURLOPT_IPRESOLVE(3)\fP
.IP CURLOPT_CONNECT_ONLY
-Pass a long. If the parameter equals 1, it tells the library to perform all
-the required proxy authentication and connection setup, but no data transfer.
-This option is useful only on HTTP URLs.
-
-This option is useful with the \fICURLINFO_LASTSOCKET\fP option to
-\fIcurl_easy_getinfo(3)\fP. The library can set up the connection and then the
-application can obtain the most recently used socket for special data
-transfers. (Added in 7.15.2)
+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
-Pass a pointer to a zero terminated string as parameter. The string should be
-the file name of your certificate. The default format is "PEM" and can be
-changed with \fICURLOPT_SSLCERTTYPE\fP.
-
-With NSS this is the nickname of the certificate you wish to authenticate
-with.
+Client cert. See \fICURLOPT_SSLCERT(3)\fP
.IP CURLOPT_SSLCERTTYPE
-Pass a pointer to a zero terminated string as parameter. The string should be
-the format of your certificate. Supported formats are "PEM" and "DER". (Added
-in 7.9.3)
+Client cert type. See \fICURLOPT_SSLCERTTYPE(3)\fP
.IP CURLOPT_SSLKEY
-Pass a pointer to a zero terminated string as parameter. The string should be
-the file name of your private key. The default format is "PEM" and can be
-changed with \fICURLOPT_SSLKEYTYPE\fP.
+Client key. See \fICURLOPT_SSLKEY(3)\fP
.IP CURLOPT_SSLKEYTYPE
-Pass a pointer to a zero terminated string as parameter. The string should be
-the format of your private key. Supported formats are "PEM", "DER" and "ENG".
-
-The format "ENG" enables you to load the private key from a crypto engine. In
-this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the
-engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
-\&"DER" format key file currently does not work because of a bug in OpenSSL.
+Client key type. See \fICURLOPT_SSLKEYTYPE(3)\fP
.IP CURLOPT_KEYPASSWD
-Pass a pointer to a zero terminated string as parameter. It will be used as
-the password required to use the \fICURLOPT_SSLKEY\fP or
-\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
-You never needed a pass phrase to load a certificate but you need one to
-load your private key.
-
-(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
-CURLOPT_SSLCERTPASSWD up to 7.9.2)
+Client key password. See \fICURLOPT_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
-Pass a pointer to a zero terminated string as parameter. It will be used as
-the identifier for the crypto engine you want to use for your private
-key.
-
-If the crypto device cannot be loaded, \fICURLE_SSL_ENGINE_NOTFOUND\fP is
-returned.
+Use identifier with SSL engine. See \fICURLOPT_SSLENGINE(3)\fP
.IP CURLOPT_SSLENGINE_DEFAULT
-Sets the actual crypto engine as the default for (asymmetric) crypto
-operations.
-
-If the crypto device cannot be set, \fICURLE_SSL_ENGINE_SETFAILED\fP is
-returned.
-
-Even though this option doesn't need any parameter, in some configurations
-\fIcurl_easy_setopt\fP might be defined as a macro taking exactly three
-arguments. Therefore, it's recommended to pass 1 as parameter to this option.
+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
-Pass a long as parameter to control what version of SSL/TLS to attempt to use.
-The available options are:
-.RS
-.IP CURL_SSLVERSION_DEFAULT
-The default action. This will attempt to figure out the remote SSL protocol
-version, i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled
-by default with 7.18.1).
-.IP CURL_SSLVERSION_TLSv1
-Force TLSv1
-.IP CURL_SSLVERSION_SSLv2
-Force SSLv2
-.IP CURL_SSLVERSION_SSLv3
-Force SSLv3
-.RE
-.IP CURLOPT_SSL_VERIFYPEER
-Pass a long as parameter.
-
-This option determines whether curl verifies the authenticity of the peer's
-certificate. A value of 1 means curl verifies; zero means it doesn't. The
-default is nonzero, but before 7.10, it was zero.
-
-When negotiating an SSL connection, the server sends a certificate indicating
-its identity. Curl verifies whether the certificate is authentic, i.e. that
-you can trust that the server is who the certificate says it is. This trust
-is based on a chain of digital signatures, rooted in certification authority
-(CA) certificates you supply. As of 7.10, curl installs a default bundle of
-CA certificates and you can specify alternate certificates with the
-\fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP option.
-
-When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
-prove that the certificate is authentic, the connection fails. When the
-option is zero, the connection succeeds regardless.
-
-Authenticating the certificate is not by itself very useful. You typically
-want to ensure that the server, as authentically identified by its
-certificate, is the server you mean to be talking to. Use
-\fICURLOPT_SSL_VERIFYHOST\fP to control that.
-.IP CURLOPT_CAINFO
-Pass a char * to a zero terminated string naming a file holding one or more
-certificates to verify the peer with. This makes sense only when used in
-combination with the \fICURLOPT_SSL_VERIFYPEER\fP option. If
-\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAINFO\fP need not
-even indicate an accessible file.
-
-This option is by default set to the system path where libcurl's cacert bundle
-is assumed to be stored, as established at build time.
-
-When built against NSS, this is the directory that the NSS certificate
-database resides in.
-.IP CURLOPT_ISSUERCERT
-Pass a char * to a zero terminated string naming a file holding a CA
-certificate in PEM format. If the option is set, an additional check against
-the peer certificate is performed to verify the issuer is indeed the one
-associated with the certificate provided by the option. This additional check
-is useful in multi-level PKI where one needs to enforce that the peer
-certificate is from a specific branch of the tree.
-
-This option makes sense only when used in combination with the
-\fICURLOPT_SSL_VERIFYPEER\fP option. Otherwise, the result of the check is not
-considered as failure.
-
-A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
-which is returned if the setup of the SSL/TLS session has failed due to a
-mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER\fP has
-to be set too for the check to fail). (Added in 7.19.0)
-.IP CURLOPT_CAPATH
-Pass a char * to a zero terminated string naming a directory holding multiple
-CA certificates to verify the peer with. 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\fP option. If
-\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAPATH\fP need not even
-indicate an accessible path. The \fICURLOPT_CAPATH\fP function apparently
-does not work in Windows due to some limitation in openssl. This option is
-OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
-.IP CURLOPT_CRLFILE
-Pass a char * to a zero terminated string naming a file with the concatenation
-of CRL (in PEM format) to use in the certificate validation that occurs during
-the SSL exchange.
-
-When curl is built to use NSS or GnuTLS, there is no way to influence the use
-of CRL passed to help in the verification process. When libcurl is built with
-OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both
-set, requiring CRL check against all the elements of the certificate chain if
-a CRL file is passed.
-
-This option makes sense only when used in combination with the
-\fICURLOPT_SSL_VERIFYPEER\fP option.
-
-A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It
-is returned when the SSL exchange fails because the CRL file cannot be loaded.
-A failure in certificate verification due to a revocation information found in
-the CRL does not trigger this specific error. (Added in 7.19.0)
-.IP CURLOPT_CERTINFO
-Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
-this enabled, libcurl (if built with OpenSSL) will extract lots of information
-and data about the certificates in the certificate chain used in the SSL
-connection. This data is then possible to extract after a transfer using
-\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
-7.19.1)
-.IP CURLOPT_RANDOM_FILE
-Pass a char * to a zero terminated file name. The file will be used to read
-from to seed the random engine for SSL. The more random the specified file is,
-the more secure the SSL connection will become.
-.IP CURLOPT_EGDSOCKET
-Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
-socket. It will be used to seed the random engine for SSL.
+SSL version to use. See \fICURLOPT_SSLVERSION(3)\fP
.IP CURLOPT_SSL_VERIFYHOST
-Pass a long as parameter.
-
-This option determines whether libcurl verifies that the server cert is for
-the server it is known as.
-
-When negotiating a SSL connection, the server sends a certificate indicating
-its identity.
-
-When \fICURLOPT_SSL_VERIFYHOST\fP is 2, that certificate must indicate that
-the server is the server to which you meant to connect, or the connection
-fails.
-
-Curl considers the server the intended one when the Common Name field or a
-Subject Alternate Name field in the certificate matches the host name in the
-URL to which you told Curl to connect.
-
-When the value is 1, the certificate must contain a Common Name field, but it
-doesn't matter what name it says. (This is not ordinarily a useful setting).
-
-When the value is 0, the connection succeeds regardless of the names in the
-certificate.
-
-The default, since 7.10, is 2.
-
-This option controls checking the server's claimed identity. The server could
-be lying. To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
+Verify the host name in the SSL certificate. See \fICURLOPT_SSL_VERIFYHOST(3)\fP
+.IP CURLOPT_SSL_VERIFYPEER
+Verify the SSL certificate. See \fICURLOPT_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_ISSUERCERT
+Issuer certificate. See \fICURLOPT_ISSUERCERT(3)\fP
+.IP CURLOPT_CAPATH
+Path to CA cert bundle. See \fICURLOPT_CAPATH(3)\fP
+.IP CURLOPT_CRLFILE
+Certificate Revocation List. See \fICURLOPT_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_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
-Pass a char *, pointing to a zero terminated string holding the list of
-ciphers to use for the SSL connection. The list must be syntactically correct,
-it consists of one or more cipher strings separated by colons. Commas or
-spaces are also acceptable separators but colons are normally used, \&!, \&-
-and \&+ can be used as operators.
-
-For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
-\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
-compile OpenSSL.
-
-You'll find more details about cipher lists on this URL:
-\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
-
-For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
-\'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
-this option then all known ciphers are disabled and only those passed in
-are enabled.
-
-You'll find more details about the NSS cipher lists on this URL:
-\fIhttp://directory.fedora.redhat.com/docs/mod_nss.html#Directives\fP
-
+Ciphers to use. See \fICURLOPT_SSL_CIPHER_LIST(3)\fP
.IP CURLOPT_SSL_SESSIONID_CACHE
-Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
-this to 1 to enable it. By default all transfers are done using the
-cache. While nothing ever should get hurt by attempting to reuse SSL
-session-IDs, there seem to be broken SSL implementations in the wild that may
-require you to disable this in order for you to succeed. (Added in 7.16.0)
+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_KRBLEVEL
-Pass a char * as parameter. Set the kerberos security level for FTP; this also
-enables kerberos awareness. This is a string, \&'clear', \&'safe',
-\&'confidential' or \&'private'. If the string is set but doesn't match one
-of these, 'private' will be used. Set the string to NULL to disable kerberos
-support for FTP.
-
-(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
+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
-Pass a long set to a bitmask consisting of one or more of
-CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
-CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
-(Added in 7.16.1)
+SSH authentication types. See \fICURLOPT_SSH_AUTH_TYPES(3)\fP
.IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
-Pass a char * pointing to a string containing 32 hexadecimal digits. The
-string should be the 128 bit MD5 checksum of the remote host's public key, and
-libcurl will reject the connection to the host unless the md5sums match. This
-option is only for SCP and SFTP transfers. (Added in 7.17.1)
+MD5 of host's public key. See \fICURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3)\fP
.IP CURLOPT_SSH_PUBLIC_KEYFILE
-Pass a char * pointing to a file name for your public key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
-(Added in 7.16.1)
+File name of public key. See \fICURLOPT_SSH_PUBLIC_KEYFILE(3)\fP
.IP CURLOPT_SSH_PRIVATE_KEYFILE
-Pass a char * pointing to a file name for your private key. If not used,
-libcurl defaults to using \fB~/.ssh/id_dsa\fP. If the file is
-password-protected, set the password with \fICURLOPT_KEYPASSWD\fP. (Added in
-7.16.1)
+File name of private key. See \fICURLOPT_SSH_PRIVATE_KEYFILE(3)\fP
.IP CURLOPT_SSH_KNOWNHOSTS
-Pass a pointer to a zero terminated string holding the file name of the
-known_host file to use. The known_hosts file should use the OpenSSH file
-format as supported by libssh2. If this file is specified, libcurl will only
-accept connections with hosts that are known and present in that file, with a
-matching public key. Use \fICURLOPT_SSH_KEYFUNCTION\fP to alter the default
-behavior on host and key (mis)matching. (Added in 7.19.6)
+File name with known hosts. See \fICURLOPT_SSH_KNOWNHOSTS(3)\fP
.IP CURLOPT_SSH_KEYFUNCTION
-Pass a pointer to a curl_sshkeycallback function. It gets called when the
-known_host matching has been done, to allow the application to act and decide
-for libcurl how to proceed. It gets passed the CURL handle, the key from the
-known_hosts file, the key from the remote site, info from libcurl on the
-matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
-MUST return one of the following return codes to tell libcurl how to act:
-.RS
-.IP CURLKHSTAT_FINE_ADD_TO_FILE
-The host+key is accepted and libcurl will append it to the known_hosts file
-before continuing with the connection. This will also add the host+key combo
-to the known_host pool kept in memory if it wasn't already present there. The
-adding of data to the file is done by completely replacing the file with a new
-copy, so the permissions of the file must allow this.
-.IP CURLKHSTAT_FINE
-The host+key is accepted libcurl will continue with the connection. This will
-also add the host+key combo to the known_host pool kept in memory if it wasn't
-already present there.
-.IP CURLKHSTAT_REJECT
-The host+key is rejected. libcurl will deny the connection to continue and it
-will be closed.
-.IP CURLKHSTAT_DEFER
-The host+key is rejected, but the SSH connection is asked to be kept alive.
-This feature could be used when the app wants to somehow return back and act
-on the host+key situation and then retry without needing the overhead of
-setting it up from scratch again.
-.RE
- (Added in 7.19.6)
+Callback for known hosts handling. See \fICURLOPT_SSH_KEYFUNCTION(3)\fP
.IP CURLOPT_SSH_KEYDATA
-Pass a void * as parameter. This pointer will be passed along verbatim to the
-callback set with \fICURLOPT_SSH_KEYFUNCTION\fP. (Added in 7.19.6)
+Custom pointer to pass to ssh key callback. See \fICURLOPT_SSH_KEYDATA(3)\fP
.SH OTHER OPTIONS
.IP CURLOPT_PRIVATE
-Pass a void * as parameter, pointing to data that should be associated with
-this curl handle. The pointer can subsequently be retrieved using
-\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
-does nothing with this data. (Added in 7.10.3)
+Private pointer to store. See \fICURLOPT_PRIVATE(3)\fP
.IP CURLOPT_SHARE
-Pass a share handle as a parameter. The share handle must have been created by
-a previous call to \fIcurl_share_init(3)\fP. Setting this option, will make
-this curl handle use the data from the shared handle instead of keeping the
-data to itself. This enables several curl handles to share data. If the curl
-handles are used simultaneously in multiple threads, you \fBMUST\fP use the
-locking methods in the share handle. See \fIcurl_share_setopt(3)\fP for
-details.
-
-If you add a share that is set to share cookies, your easy handle will use
-that cookie cache and get the cookie engine enabled. If you unshare an object
-that was using cookies (or change to another object that doesn't share
-cookies), the easy handle will get its cookie engine disabled.
-
-Data that the share object is not set to share will be dealt with the usual
-way, as if no share was used.
+Share object to use. See \fICURLOPT_SHARE(3)\fP
.IP CURLOPT_NEW_FILE_PERMS
-Pass a long as a parameter, containing the value of the permissions that will
-be assigned to newly created files on the remote server. The default value is
-\fI0644\fP, but any valid value can be used. The only protocols that can use
-this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP. (Added in 7.16.4)
+Mode for creating new remote files. See \fICURLOPT_NEW_FILE_PERMS(3)\fP
.IP CURLOPT_NEW_DIRECTORY_PERMS
-Pass a long as a parameter, containing the value of the permissions that will
-be assigned to newly created directories on the remote server. The default
-value is \fI0755\fP, but any valid value can be used. The only protocols that
-can use this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
-(Added in 7.16.4)
+Mode for creating new remote directories. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP
.SH TELNET OPTIONS
.IP CURLOPT_TELNETOPTIONS
-Provide a pointer to a curl_slist with variables to pass to the telnet
-negotiations. The variables should be in the format <option=value>. libcurl
-supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET
-standard for details.
+TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP
.SH RETURN VALUE
-CURLE_OK (zero) means that the option was set properly, non-zero means an
+\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_FAILED_INIT\fP.
+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_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
+.BR curl_multi_setopt "(3), "
diff --git a/docs/libcurl/curl_easy_setopt.html b/docs/libcurl/curl_easy_setopt.html
deleted file mode 100644
index 6b49b96..0000000
--- a/docs/libcurl/curl_easy_setopt.html
+++ /dev/null
@@ -1,797 +0,0 @@
-<html><head>
-<title>curl_easy_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_setopt - set options for a curl easy handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_easy_setopt() is used to tell libcurl how to behave. By using the appropriate options to <span Class="emphasis">curl_easy_setopt</span>, you can change libcurl's behavior. All options are set with the <span Class="emphasis">option</span> followed by a <span Class="emphasis">parameter</span>. That parameter can be a <span Class="bold">long</span>, a <span Class="bold">function pointer</span>, an <span Class="bold">object pointer</span> or a <span Class="bold">curl_off_t</span>, 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 curl_easy_setopt() calls in the setup phase.
-<p class="level0">Options set with this function call are valid for all forthcoming transfers performed using this <span Class="emphasis">handle</span>. 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 <a class="emphasis" href="./curl_easy_reset.html">curl_easy_reset(3)</a>.
-<p class="level0">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 curl_easy_setopt() returns. Exceptions to this rule are described in the option details below.
-<p class="level0">Before version 7.17.0, strings were not copied. Instead the user was forced keep them available until libcurl no longer needed them.
-<p class="level0">The <span Class="emphasis">handle</span> is the return code from a <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> or <a class="emphasis" href="./curl_easy_duphandle.html">curl_easy_duphandle(3)</a> call. <a name="BEHAVIOR"></a><h2 class="nroffsh">BEHAVIOR OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTVERBOSE"></a><span class="nroffip">CURLOPT_VERBOSE</span>
-<p class="level1">Set the parameter to 1 to get the library to display a lot of verbose information about its operations. Very useful for libcurl and/or protocol debugging and understanding. The verbose information will be sent to stderr, or the stream set with <a class="emphasis" href="#CURLOPTSTDERR">CURLOPT_STDERR</a>.
-<p class="level1">You hardly ever want this set in production use, you will almost always want this when you debug/report problems. Another neat option for debugging is the <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a>.
-<p class="level0"><a name="CURLOPTHEADER"></a><span class="nroffip">CURLOPT_HEADER</span>
-<p class="level1">A parameter set to 1 tells the library to include the header in the body output. This is only relevant for protocols that actually have headers preceding the data (like HTTP).
-<p class="level0"><a name="CURLOPTNOPROGRESS"></a><span class="nroffip">CURLOPT_NOPROGRESS</span>
-<p class="level1">A parameter set to 1 tells the library to shut off the built-in progress meter completely.
-<p class="level1">Future versions of libcurl are likely to not have any built-in progress meter at all.
-<p class="level0"><a name="CURLOPTNOSIGNAL"></a><span class="nroffip">CURLOPT_NOSIGNAL</span>
-<p class="level1">Pass a long. If it is 1, libcurl will not use any functions that install signal handlers or any functions that cause signals to be sent to the process. This option is mainly here to allow multi-threaded unix applications to still set/use all timeout options etc, without risking getting signals. (Added in 7.10)
-<p class="level1">If this option is set and libcurl has been built with the standard name resolver, timeouts will not occur while the name resolve takes place. Consider building libcurl with c-ares support to enable asynchronous DNS lookups, which enables nice timeouts for name resolves without signals.
-<p class="level0"><a name="CURLOPTWILDCARDMATCH"></a><span class="nroffip">CURLOPT_WILDCARDMATCH</span>
-<p class="level1">Set this option to 1 if you want to transfer multiple files according to a file name pattern. The pattern can be specified as part of the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> option, using an fnmatch-like pattern (Shell Pattern Matching) in the last part of URL (file name).
-<p class="level1">By default, libcurl uses its internal wildcard matching implementation. You can provide your own matching function by the <a class="emphasis" href="#CURLOPTFNMATCHFUNCTION">CURLOPT_FNMATCH_FUNCTION</a> option.
-<p class="level1">This feature is only supported by the FTP download for now.
-<p class="level1">A brief introduction of its syntax follows:
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB*\fP - ASTERISK</span>
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">*.txt</span> (for all txt's from the root directory)
-<p class="level1">
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB?\fP - QUESTION MARK</span>
-<p class="level2">Question mark matches any (exactly one) character.
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">photo?.jpeg</span>
-<p class="level1">
-<p class="level2">
-<p class="level1"><a name="fBfP"></a><span class="nroffip">\fB[\fP - BRACKET EXPRESSION</span>
-<p class="level2">The left bracket opens a bracket expression. The question mark and asterisk have no special meaning in a bracket expression. Each bracket expression ends by the right bracket and matches exactly one character. Some examples follow:
-<p class="level2"><span Class="bold">[a-zA-Z0-9]</span> or <span Class="bold">[f-gF-G]</span> - character interval
-<p class="level2"><span Class="bold">[abc]</span> - character enumeration
-<p class="level2"><span Class="bold">[^abc]</span> or <span Class="bold">[!abc]</span> - negation
-<p class="level2"><span Class="bold">[[:</span><span Class="emphasis">name</span><span Class="bold">:]]</span> class expression. Supported classes are <span Class="bold">alnum</span>,<span Class="bold">lower</span>, <span Class="bold">space</span>, <span Class="bold">alpha</span>, <span Class="bold">digit</span>, <span Class="bold">print</span>, <span Class="bold">upper</span>, <span Class="bold">blank</span>, <span Class="bold">graph</span>, <span Class="bold">xdigit</span>.
-<p class="level2"><span Class="bold">[][-!^]</span> - special case - matches only '-', ']', '[', '!' or '^'. These characters have no special purpose.
-<p class="level2"><span Class="bold">[\[\]\\]</span> - escape syntax. Matches '[', ']' or '´.
-<p class="level2">Using the rules above, a file name pattern can be constructed:
-<p class="level2"><a href="ftp://example.com/some/path/">ftp://example.com/some/path/</a><span Class="bold">[a-z[:upper:]\\].jpeg</span>
-<p class="level1">
-<p class="level1">(This was added in 7.21.0) <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTWRITEFUNCTION"></a><span class="nroffip">CURLOPT_WRITEFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as there is data received that needs to be saved. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>, it will not be zero terminated. Return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURLE_WRITE_ERROR</span>.
-<p class="level1">From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will cause writing to this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details.
-<p class="level1">This function may be called with zero bytes data if the transferred file is empty.
-<p class="level1">Set this option to NULL to get the internal default function. The internal default function will write the data to the FILE * given with <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a>.
-<p class="level1">Set the <span Class="emphasis">userdata</span> argument with the <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> option.
-<p class="level1">The callback function will be passed as much data as possible in all invokes, but you cannot possibly make any assumptions. It may be one byte, it may be thousands. The maximum amount of data that can be passed to the write callback is defined in the curl.h header file: CURL_MAX_WRITE_SIZE.
-<p class="level0"><a name="CURLOPTWRITEDATA"></a><span class="nroffip">CURLOPT_WRITEDATA</span>
-<p class="level1">Data pointer to pass to the file write function. If you use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> option, this is the pointer you'll get as input. If you don't use a callback, you must pass a 'FILE *' as libcurl will pass this to fwrite() when writing data.
-<p class="level1">The internal <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> will write the data to the FILE * given with this option, or to stdout if this option hasn't been set.
-<p class="level1">If you're using libcurl as a win32 DLL, you <span Class="bold">MUST</span> use the <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a> if you set this option or you will experience crashes.
-<p class="level1">This option is also known with the older name <span Class="emphasis">CURLOPT_FILE</span>, the name <a class="emphasis" href="#CURLOPTWRITEDATA">CURLOPT_WRITEDATA</a> was introduced in 7.9.7.
-<p class="level0"><a name="CURLOPTREADFUNCTION"></a><span class="nroffip">CURLOPT_READFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span> This function gets called by libcurl as soon as it needs to read data in order to send it to the peer. The data area pointed at by the pointer <span Class="emphasis">ptr</span> may be filled with at most <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span> number of bytes. Your function must return the actual number of bytes that you stored in that memory area. Returning 0 will signal end-of-file to the library and cause it to stop the current transfer.
-<p class="level1">If you stop the current transfer by returning 0 "pre-maturely" (i.e before the server expected it, like when you've said you will upload N bytes and you upload less than N bytes), you may experience that the server "hangs" waiting for the rest of the data that won't come.
-<p class="level1">The read callback may return <span Class="emphasis">CURL_READFUNC_ABORT</span> to stop the current operation immediately, resulting in a <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span> error code from the transfer (Added in 7.12.1)
-<p class="level1">From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause reading from this connection to become paused. See <a class="emphasis" href="./curl_easy_pause.html">curl_easy_pause(3)</a> for further details.
-<p class="level1">If you set this callback pointer to NULL, or don't set it at all, the default internal read function will be used. It is doing an fread() on the FILE * userdata set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a>.
-<p class="level0"><a name="CURLOPTREADDATA"></a><span class="nroffip">CURLOPT_READDATA</span>
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a read callback but instead rely on the default internal read function, this data must be a valid readable FILE *.
-<p class="level1">If you're using libcurl as a win32 DLL, you MUST use a <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> if you set this option.
-<p class="level1">This option was also known by the older name <span Class="emphasis">CURLOPT_INFILE</span>, the name <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> was introduced in 7.9.7.
-<p class="level0"><a name="CURLOPTIOCTLFUNCTION"></a><span class="nroffip">CURLOPT_IOCTLFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_ioctl_callback</span> prototype found in <span Class="emphasis"><curl/curl.h></span>. This function gets called by libcurl when something special I/O-related needs to be done that the library can't do by itself. For now, rewinding the read data stream is the only action it can request. The rewinding of the read data stream may be necessary when doing a HTTP PUT or POST with a multi-pass authentication method. (Option added in 7.12.3).
-<p class="level1">Use <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> instead to provide seeking!
-<p class="level0"><a name="CURLOPTIOCTLDATA"></a><span class="nroffip">CURLOPT_IOCTLDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the 3rd argument in the ioctl callback set with <a class="emphasis" href="#CURLOPTIOCTLFUNCTION">CURLOPT_IOCTLFUNCTION</a>. (Option added in 7.12.3)
-<p class="level0"><a name="CURLOPTSEEKFUNCTION"></a><span class="nroffip">CURLOPT_SEEKFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int function(void *instream, curl_off_t offset, int origin);</span> This function gets called by libcurl to seek to a certain position in the input stream and can be used to fast forward a file in a resumed upload (instead of reading all uploaded bytes with the normal read function/callback). It is also called to rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET, SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2 (CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is free to work around the problem if possible. The latter can sometimes be done by instead reading from the input or similar.
-<p class="level1">If you forward the input arguments directly to "fseek" or "lseek", note that the data type for <span Class="emphasis">offset</span> is not the same as defined for curl_off_t on many systems! (Option added in 7.18.0)
-<p class="level0"><a name="CURLOPTSEEKDATA"></a><span class="nroffip">CURLOPT_SEEKDATA</span>
-<p class="level1">Data pointer to pass to the file read function. If you use the <a class="emphasis" href="#CURLOPTSEEKFUNCTION">CURLOPT_SEEKFUNCTION</a> option, this is the pointer you'll get as input. If you don't specify a seek callback, NULL is passed. (Option added in 7.18.0)
-<p class="level0"><a name="CURLOPTSOCKOPTFUNCTION"></a><span class="nroffip">CURLOPT_SOCKOPTFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_sockopt_callback</span> prototype found in <span Class="emphasis"><curl/curl.h></span>. This function gets called by libcurl after the socket() call but before the connect() call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the newly created socket descriptor so additional setsockopt() calls can be done at the user's discretion. Return 0 (zero) from the callback on success. Return 1 from the callback function to signal an unrecoverable error to the library and it will close the socket and return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>. (Option added in 7.15.6.)
-<p class="level0"><a name="CURLOPTSOCKOPTDATA"></a><span class="nroffip">CURLOPT_SOCKOPTDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the sockopt callback set with <a class="emphasis" href="#CURLOPTSOCKOPTFUNCTION">CURLOPT_SOCKOPTFUNCTION</a>. (Option added in 7.15.6.)
-<p class="level0"><a name="CURLOPTOPENSOCKETFUNCTION"></a><span class="nroffip">CURLOPT_OPENSOCKETFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_opensocket_callback</span> prototype found in <span Class="emphasis"><curl/curl.h></span>. This function gets called by libcurl instead of the <span Class="emphasis">socket(2)</span> call. The callback's <span Class="emphasis">purpose</span> argument identifies the exact purpose for this particular socket, and currently only one value is supported: <span Class="emphasis">CURLSOCKTYPE_IPCXN</span> for the primary connection (meaning the control connection in the FTP case). Future versions of libcurl may support more purposes. It passes the resolved peer address as a <span Class="emphasis">address</span> argument so the callback can modify the address or refuse to connect at all. The callback function should return the socket or <span Class="emphasis">CURL_SOCKET_BAD</span> in case no connection should be established or any error detected. Any additional <span Class="emphasis">setsockopt(2)</span> calls can be done on the socket at the user's discretion. <span Class="emphasis">CURL_SOCKET_BAD</span> return value from the callback function will signal an unrecoverable error to the library and it will return <span Class="emphasis">CURLE_COULDNT_CONNECT</span>. This return code can be used for IP address blacklisting. The default behavior is: <pre>
-<p class="level1"> return socket(addr->family, addr->socktype, addr->protocol);
- </pre>
-
-<p class="level1">(Option added in 7.17.1.)
-<p class="level0"><a name="CURLOPTOPENSOCKETDATA"></a><span class="nroffip">CURLOPT_OPENSOCKETDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the opensocket callback set with <a class="emphasis" href="#CURLOPTOPENSOCKETFUNCTION">CURLOPT_OPENSOCKETFUNCTION</a>. (Option added in 7.17.1.)
-<p class="level0"><a name="CURLOPTPROGRESSFUNCTION"></a><span class="nroffip">CURLOPT_PROGRESSFUNCTION</span>
-<p class="level1">Function pointer that should match the <span Class="emphasis">curl_progress_callback</span> prototype found in <span Class="emphasis"><curl/curl.h></span>. This function gets called by libcurl instead of its internal equivalent with a frequent interval during operation (roughly once per second or sooner) no matter if data is being transfered or not. Unknown/unused argument values passed to the callback will be set to zero (like if you only download data, the upload size will remain 0). Returning a non-zero value from this callback will cause libcurl to abort the transfer and return <span Class="emphasis">CURLE_ABORTED_BY_CALLBACK</span>.
-<p class="level1">If you transfer data with the multi interface, this function will not be called during periods of idleness unless you call the appropriate libcurl function that performs transfers.
-<p class="level1"><a class="emphasis" href="#CURLOPTNOPROGRESS">CURLOPT_NOPROGRESS</a> must be set to 0 to make this function actually get called.
-<p class="level0"><a name="CURLOPTPROGRESSDATA"></a><span class="nroffip">CURLOPT_PROGRESSDATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the first argument in the progress callback set with <a class="emphasis" href="#CURLOPTPROGRESSFUNCTION">CURLOPT_PROGRESSFUNCTION</a>.
-<p class="level0"><a name="CURLOPTHEADERFUNCTION"></a><span class="nroffip">CURLOPT_HEADERFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata);</span>. This function gets called by libcurl as soon as it has received header data. The header callback will be called once for each header and only complete header lines are passed on to the callback. Parsing headers should be easy enough using this. The size of the data pointed to by <span Class="emphasis">ptr</span> is <span Class="emphasis">size</span> multiplied with <span Class="emphasis">nmemb</span>. Do not assume that the header line is zero terminated! The pointer named <span Class="emphasis">userdata</span> is the one you set with the <a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a> option. The callback function must return the number of bytes actually taken care of. If that amount differs from the amount passed to your function, it'll signal an error to the library. This will abort the transfer and return <span Class="emphasis">CURL_WRITE_ERROR</span>.
-<p class="level1">If this option is not set, or if it is set to NULL, but <span Class="emphasis">CURLOPT_HEADERDATA</span> (<a class="emphasis" href="#CURLOPTWRITEHEADER">CURLOPT_WRITEHEADER</a>) is set to anything but NULL, the function used to accept response data will be used instead. That is, it will be the function specified with <a class="emphasis" href="#CURLOPTWRITEFUNCTION">CURLOPT_WRITEFUNCTION</a>, or if it is not specified or NULL - the default, stream-writing function.
-<p class="level1">It's important to note that the callback will be invoked for the headers of all responses received after initiating a request and not just the final response. This includes all responses which occur during authentication negotiation. If you need to operate on only the headers from the final response, you will need to collect headers in the callback yourself and use HTTP status lines, for example, to delimit response boundaries.
-<p class="level1">Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a trailer. That trailer is identical to a HTTP header and if such a trailer is received it is passed to the application using this callback as well. There are several ways to detect it being a trailer and not an ordinary header: 1) it comes after the response-body. 2) it comes after the final header line (CR LF) 3) a Trailer: header among the response-headers mention what header to expect in the trailer.
-<p class="level0"><a name="CURLOPTWRITEHEADER"></a><span class="nroffip">CURLOPT_WRITEHEADER</span>
-<p class="level1">(This option is also known as <span Class="bold">CURLOPT_HEADERDATA</span>) Pass a pointer to be used to write the header part of the received data to. If you don't use your own callback to take care of the writing, this must be a valid FILE *. See also the <a class="emphasis" href="#CURLOPTHEADERFUNCTION">CURLOPT_HEADERFUNCTION</a> option above on how to set a custom get-all-headers callback.
-<p class="level0"><a name="CURLOPTDEBUGFUNCTION"></a><span class="nroffip">CURLOPT_DEBUGFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">int curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);</span> <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> replaces the standard debug function used when <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE </a> is in effect. This callback receives debug information, as specified with the <span Class="bold">curl_infotype</span> argument. This function must return 0. The data pointed to by the char * passed to this function WILL NOT be zero terminated, but will be exactly of the size as told by the size_t argument.
-<p class="level1">Available curl_infotype values:
-<p class="level2">
-<p class="level1"><a name="CURLINFOTEXT"></a><span class="nroffip">CURLINFO_TEXT</span>
-<p class="level2">The data is informational text.
-<p class="level1"><a name="CURLINFOHEADERIN"></a><span class="nroffip">CURLINFO_HEADER_IN</span>
-<p class="level2">The data is header (or header-like) data received from the peer.
-<p class="level1"><a name="CURLINFOHEADEROUT"></a><span class="nroffip">CURLINFO_HEADER_OUT</span>
-<p class="level2">The data is header (or header-like) data sent to the peer.
-<p class="level1"><a name="CURLINFODATAIN"></a><span class="nroffip">CURLINFO_DATA_IN</span>
-<p class="level2">The data is protocol data received from the peer.
-<p class="level1"><a name="CURLINFODATAOUT"></a><span class="nroffip">CURLINFO_DATA_OUT</span>
-<p class="level2">The data is protocol data sent to the peer.
-<p class="level1">
-<p class="level0"><a name="CURLOPTDEBUGDATA"></a><span class="nroffip">CURLOPT_DEBUGDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed in to your <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> in the last void * argument. This pointer is not used by libcurl, it is only passed to the callback.
-<p class="level0"><a name="CURLOPTSSLCTXFUNCTION"></a><span class="nroffip">CURLOPT_SSL_CTX_FUNCTION</span>
-<p class="level1">This option does only function for libcurl powered by OpenSSL. If libcurl was built against another SSL library, this functionality is absent.
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">CURLcode sslctxfun(CURL *curl, void *sslctx, void *parm);</span> This function gets called by libcurl just before the initialization of an SSL connection after having processed all other SSL related options to give a last chance to an application to modify the behaviour of openssl's ssl initialization. The <span Class="emphasis">sslctx</span> parameter is actually a pointer to an openssl <span Class="emphasis">SSL_CTX</span>. If an error is returned no attempt to establish a connection is made and the perform operation will return the error code from this callback function. Set the <span Class="emphasis">parm</span> argument with the <a class="emphasis" href="#CURLOPTSSLCTXDATA">CURLOPT_SSL_CTX_DATA</a> option. This option was introduced in 7.11.0.
-<p class="level1">This function will get called on all new connections made to a server, during the SSL negotiation. The SSL_CTX pointer will be a new one every time.
-<p class="level1">To use this properly, a non-trivial amount of knowledge of the openssl libraries is necessary. For example, using this function allows you to use openssl callbacks to add additional validation code for certificates, and even to change the actual URI of an HTTPS request (example used in the lib509 test case). See also the example section for a replacement of the key, certificate and trust file settings.
-<p class="level0"><a name="CURLOPTSSLCTXDATA"></a><span class="nroffip">CURLOPT_SSL_CTX_DATA</span>
-<p class="level1">Data pointer to pass to the ssl context callback set by the option <a class="emphasis" href="#CURLOPTSSLCTXFUNCTION">CURLOPT_SSL_CTX_FUNCTION</a>, this is the pointer you'll get as third parameter, otherwise <span Class="bold">NULL</span>. (Added in 7.11.0)
-<p class="level0"><a name="CURLOPTCONVTONETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_TO_NETWORK_FUNCTION</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONVFROMNETWORKFUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_NETWORK_FUNCTION</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONVFROMUTF8FUNCTION"></a><span class="nroffip">CURLOPT_CONV_FROM_UTF8_FUNCTION</span>
-<p class="level1">Function pointers that should match the following prototype: CURLcode function(char *ptr, size_t length);
-<p class="level1">These three options apply to non-ASCII platforms only. They are available only if <span Class="bold">CURL_DOES_CONVERSIONS</span> was defined when libcurl was built. When this is the case, <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> will return the CURL_VERSION_CONV feature bit set.
-<p class="level1">The data to be converted is in a buffer pointed to by the ptr parameter. The amount of data to convert is indicated by the length parameter. The converted data overlays the input data in the buffer pointed to by the ptr parameter. CURLE_OK should be returned upon successful conversion. A CURLcode return value defined by curl.h, such as CURLE_CONV_FAILED, should be returned if an error was encountered.
-<p class="level1"><a class="bold" href="#CURLOPTCONVTONETWORKFUNCTION">CURLOPT_CONV_TO_NETWORK_FUNCTION</a> and <a class="bold" href="#CURLOPTCONVFROMNETWORKFUNCTION">CURLOPT_CONV_FROM_NETWORK_FUNCTION</a> convert between the host encoding and the network encoding. They are used when commands or ASCII data are sent/received over the network.
-<p class="level1"><a class="bold" href="#CURLOPTCONVFROMUTF8FUNCTION">CURLOPT_CONV_FROM_UTF8_FUNCTION</a> is called to convert from UTF8 into the host encoding. It is required only for SSL processing.
-<p class="level1">If you set a callback pointer to NULL, or don't set it at all, the built-in libcurl iconv functions will be used. If HAVE_ICONV was not defined when libcurl was built, and no callback has been established, conversion will return the CURLE_CONV_REQD error code.
-<p class="level1">If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined. For example:
-<p class="level1"> #define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
-<p class="level1">The iconv code in libcurl will default the network and UTF8 codeset names as follows:
-<p class="level1"> #define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
-<p class="level1"> #define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
-<p class="level1">You will need to override these definitions if they are different on your system.
-<p class="level0"><a name="CURLOPTINTERLEAVEFUNCTION"></a><span class="nroffip">CURLOPT_INTERLEAVEFUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="emphasis">size_t function( void *ptr, size_t size, size_t nmemb, void *userdata)</span>. This 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 <span Class="emphasis">RFC 2326 Section 10.12</span> for more information on how RTP interleaving behaves. If unset or set to NULL, curl will use the default write function.
-<p class="level1">Interleaved RTP poses some challeneges 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 <a class="emphasis" href="#CURLRTSPREQRECEIVE">CURL_RTSPREQ_RECEIVE</a> to service RTP data when no requests are desired. If the application makes a request, (e.g. <a class="emphasis" href="#CURLRTSPREQPAUSE">CURL_RTSPREQ_PAUSE</a>) then the response handler will process any pending RTP data before marking the request as finished. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTINTERLEAVEDATA"></a><span class="nroffip">CURLOPT_INTERLEAVEDATA</span>
-<p class="level1">This is the userdata pointer that will be passed to <a class="emphasis" href="#CURLOPTINTERLEAVEFUNCTION">CURLOPT_INTERLEAVEFUNCTION</a> when interleaved RTP data is received. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTCHUNKBGNFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_BGN_FUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function (const void *transfer_info, void *ptr, int remains)</span>. This function gets called by libcurl before a part of the stream is going to be transferred (if the transfer supports chunks).
-<p class="level1">This callback makes sense only when using the <a class="emphasis" href="#CURLOPTWILDCARDMATCH">CURLOPT_WILDCARDMATCH</a> option for now.
-<p class="level1">The target of transfer_info parameter is a "feature depended" structure. For the FTP wildcard download, the target is curl_fileinfo structure (see <span Class="emphasis">curl/curl.h</span>). The parameter ptr is a pointer given by <a class="emphasis" href="#CURLOPTCHUNKDATA">CURLOPT_CHUNK_DATA</a>. The parameter remains contains number of chunks remaining per the transfer. If the feature is not available, the parameter has zero value.
-<p class="level1">Return <span Class="emphasis">CURL_CHUNK_BGN_FUNC_OK</span> if everything is fine, <span Class="emphasis">CURL_CHUNK_BGN_FUNC_SKIP</span> if you want to skip the concrete chunk or <span Class="emphasis">CURL_CHUNK_BGN_FUNC_FAIL</span> to tell libcurl to stop if some error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTCHUNKENDFUNCTION"></a><span class="nroffip">CURLOPT_CHUNK_END_FUNCTION</span>
-<p class="level1">Function pointer that should match the following prototype: <span class="bold">long function(void *ptr)</span>. This function gets called by libcurl as soon as a part of the stream has been transferred (or skipped).
-<p class="level1">Return <span Class="emphasis">CURL_CHUNK_END_FUNC_OK</span> if everything is fine or <span Class="bold">CURL_CHUNK_END_FUNC_FAIL</span> to tell the lib to stop if some error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTCHUNKDATA"></a><span class="nroffip">CURLOPT_CHUNK_DATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_CHUNK_BGN_FUNTION</span> and <span Class="emphasis">CURL_CHUNK_END_FUNTION</span>. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTFNMATCHFUNCTION"></a><span class="nroffip">CURLOPT_FNMATCH_FUNCTION</span>
-<p class="level1">Function pointer that should match <span class="bold">int function(void *ptr, const char *pattern, const char *string)</span> prototype (see <span Class="emphasis">curl/curl.h</span>). It is used internally for the wildcard matching feature.
-<p class="level1">Return <span Class="emphasis">CURL_FNMATCHFUNC_MATCH</span> if pattern matches the string, <span Class="emphasis">CURL_FNMATCHFUNC_NOMATCH</span> if not or <span Class="emphasis">CURL_FNMATCHFUNC_FAIL</span> if an error occurred. (This was added in 7.21.0)
-<p class="level0"><a name="CURLOPTFNMATCHDATA"></a><span class="nroffip">CURLOPT_FNMATCH_DATA</span>
-<p class="level1">Pass a pointer that will be untouched by libcurl and passed as the ptr argument to the <span Class="emphasis">CURL_FNMATCH_FUNCTION</span>. (This was added in 7.21.0) <a name="ERROR"></a><h2 class="nroffsh">ERROR OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTERRORBUFFER"></a><span class="nroffip">CURLOPT_ERRORBUFFER</span>
-<p class="level1">Pass a char * to a buffer that the libcurl may store human readable error messages in. This may be more helpful than just the return code from <span Class="emphasis">curl_easy_perform</span>. The buffer must be at least CURL_ERROR_SIZE big. Although this argument is a 'char *', it does not describe an input string. Therefore the (probably undefined) contents of the buffer is NOT copied by the library. You should keep the associated storage available until libcurl no longer needs it. Failing to do so will cause very odd behavior or even crashes. libcurl will need it until you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> or you set the same option again to use a different pointer.
-<p class="level1">Use <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> and <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> to better debug/trace why errors happen.
-<p class="level1">If the library does not return an error, the buffer may not have been touched. Do not rely on the contents in those cases.
-<p class="level1">
-<p class="level0"><a name="CURLOPTSTDERR"></a><span class="nroffip">CURLOPT_STDERR</span>
-<p class="level1">Pass a FILE * as parameter. Tell libcurl to use this stream instead of stderr when showing the progress meter and displaying <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> data.
-<p class="level0"><a name="CURLOPTFAILONERROR"></a><span class="nroffip">CURLOPT_FAILONERROR</span>
-<p class="level1">A parameter set to 1 tells the library to fail silently if the HTTP code returned is equal to or larger than 400. The default action would be to return the page normally, ignoring that code.
-<p class="level1">This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response codes 401 and 407).
-<p class="level1">You might get some amounts of headers transferred before this situation is detected, like when a "100-continue" is received as a response to a POST/PUT and a 401 or 407 is received immediately afterwards. <a name="NETWORK"></a><h2 class="nroffsh">NETWORK OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTURL"></a><span class="nroffip">CURLOPT_URL</span>
-<p class="level1">The actual URL to deal with. The parameter should be a char * to a zero terminated string.
-<p class="level1">If the given URL lacks the protocol part ("http://" or "ftp://" etc), it will attempt to guess which protocol to use based on the given host name. If the given protocol of the set URL is not supported, libcurl will return on error (<span Class="emphasis">CURLE_UNSUPPORTED_PROTOCOL</span>) when you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. Use <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> for detailed info on which protocols are supported.
-<p class="level1">The string given to CURLOPT_URL must be url-encoded and follow RFC 2396 (<a href="http://curl.haxx.se/rfc/rfc2396.txt">http://curl.haxx.se/rfc/rfc2396.txt</a>).
-<p class="level1">Starting with version 7.20.0, the fragment part of the URI will not be send as part of the path, which was the case previously.
-<p class="level1"><a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> is the only option that <span Class="bold">must</span> be set before <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> is called.
-<p class="level1"><a class="emphasis" href="#CURLOPTPROTOCOLS">CURLOPT_PROTOCOLS</a> can be used to limit what protocols libcurl will use for this transfer, independent of what libcurl has been compiled to support. That may be useful if you accept the URL from an external source and want to limit the accessibility.
-<p class="level0"><a name="CURLOPTPROTOCOLS"></a><span class="nroffip">CURLOPT_PROTOCOLS</span>
-<p class="level1">Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in the transfer. This allows you to have a libcurl built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default libcurl will accept all protocols it supports. See also <a class="emphasis" href="#CURLOPTREDIRPROTOCOLS">CURLOPT_REDIR_PROTOCOLS</a>. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTREDIRPROTOCOLS"></a><span class="nroffip">CURLOPT_REDIR_PROTOCOLS</span>
-<p class="level1">Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask limits what protocols libcurl may use in a transfer that it follows to in a redirect when <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> is enabled. This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections. By default libcurl will allow all protocols except for FILE and SCP. This is a difference compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTPROXY"></a><span class="nroffip">CURLOPT_PROXY</span>
-<p class="level1">Set HTTP proxy to use. The parameter should be a char * to a zero terminated string holding the host name or dotted IP address. To specify port number in this string, append :[port] to the end of the host name. The proxy string may be prefixed with [protocol]:// since any such prefix will be ignored. The proxy's port number may optionally be specified with the separate option. If not specified, libcurl will default to using port 1080 for proxies. <a class="emphasis" href="#CURLOPTPROXYPORT">CURLOPT_PROXYPORT</a>.
-<p class="level1">When you tell the library to use an HTTP proxy, libcurl will transparently convert operations to HTTP even if you specify an FTP URL etc. This may have an impact on what other features of the library you can use, such as <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a> and similar FTP specifics that don't work unless you tunnel through the HTTP proxy. Such tunneling is activated with <a class="emphasis" href="#CURLOPTHTTPPROXYTUNNEL">CURLOPT_HTTPPROXYTUNNEL</a>.
-<p class="level1">libcurl respects the environment variables <span Class="bold">http_proxy</span>, <span Class="bold">ftp_proxy</span>, <span Class="bold">all_proxy</span> etc, if any of those are set. The <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a> option does however override any possibly set environment variables.
-<p class="level1">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.
-<p class="level1">Since 7.14.1, the proxy host string given in environment variables can be specified the exact same way as the proxy can be set with <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>, include protocol prefix (http://) and embedded user + password.
-<p class="level0"><a name="CURLOPTPROXYPORT"></a><span class="nroffip">CURLOPT_PROXYPORT</span>
-<p class="level1">Pass a long with this option to set the proxy port to connect to unless it is specified in the proxy string <a class="emphasis" href="#CURLOPTPROXY">CURLOPT_PROXY</a>.
-<p class="level0"><a name="CURLOPTPROXYTYPE"></a><span class="nroffip">CURLOPT_PROXYTYPE</span>
-<p class="level1">Pass a long with this option to set type of the proxy. Available options for this are <span Class="emphasis">CURLPROXY_HTTP</span>, <span Class="emphasis">CURLPROXY_HTTP_1_0</span> (added in 7.19.4), <span Class="emphasis">CURLPROXY_SOCKS4</span> (added in 7.15.2), <span Class="emphasis">CURLPROXY_SOCKS5</span>, <span Class="emphasis">CURLPROXY_SOCKS4A</span> (added in 7.18.0) and <span Class="emphasis">CURLPROXY_SOCKS5_HOSTNAME</span> (added in 7.18.0). The HTTP type is default. (Added in 7.10)
-<p class="level0"><a name="CURLOPTNOPROXY"></a><span class="nroffip">CURLOPT_NOPROXY</span>
-<p class="level1">Pass a pointer to a zero terminated string. The should be a comma- separated list of hosts which do not use a proxy, if one is specified. The only wildcard 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, local.com would match local.com, local.com:80, and www.local.com, but not www.notlocal.com. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTHTTPPROXYTUNNEL"></a><span class="nroffip">CURLOPT_HTTPPROXYTUNNEL</span>
-<p class="level1">Set the parameter to 1 to make the library tunnel all operations through a given HTTP proxy. There is a big difference between using a proxy and to tunnel through it. If you don't know what this means, you probably don't want this tunneling option.
-<p class="level0"><a name="CURLOPTSOCKS5GSSAPISERVICE"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_SERVICE</span>
-<p class="level1">Pass a char * as parameter to a string holding the name of the service. The default service name for a SOCKS5 server is rcmd/server-fqdn. This option allows you to change it. (Added in 7.19.4)
-<p class="level0"><a name="CURLOPTSOCKS5GSSAPINEC"></a><span class="nroffip">CURLOPT_SOCKS5_GSSAPI_NEC</span>
-<p class="level1">Pass a long set to 1 to enable or 0 to disable. As part of the gssapi negotiation a protection mode is negotiated. The rfc1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementation does not. If enabled, this option allows the unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
-<p class="level0"><a name="CURLOPTINTERFACE"></a><span class="nroffip">CURLOPT_INTERFACE</span>
-<p class="level1">Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name.
-<p class="level0"><a name="CURLOPTLOCALPORT"></a><span class="nroffip">CURLOPT_LOCALPORT</span>
-<p class="level1">Pass a long. This sets the local port number of the socket used for connection. This can be used in combination with <a class="emphasis" href="#CURLOPTINTERFACE">CURLOPT_INTERFACE</a> and you are recommended to use <a class="emphasis" href="#CURLOPTLOCALPORTRANGE">CURLOPT_LOCALPORTRANGE</a> as well when this is set. Valid port numbers are 1 - 65535. (Added in 7.15.2)
-<p class="level0"><a name="CURLOPTLOCALPORTRANGE"></a><span class="nroffip">CURLOPT_LOCALPORTRANGE</span>
-<p class="level1">Pass a long. This is the number of attempts libcurl should make to find a working local port number. It starts with the given <a class="emphasis" href="#CURLOPTLOCALPORT">CURLOPT_LOCALPORT</a> and adds one to the number for each retry. Setting this to 1 or below will make libcurl do only one try for the exact port number. Port numbers by nature are scarce resources that will be busy at times so setting this value to something too low might cause unnecessary connection setup failures. (Added in 7.15.2)
-<p class="level0"><a name="CURLOPTDNSCACHETIMEOUT"></a><span class="nroffip">CURLOPT_DNS_CACHE_TIMEOUT</span>
-<p class="level1">Pass a long, this sets the timeout in seconds. Name resolves will be kept in memory for this number of seconds. Set to zero to completely disable caching, or set to -1 to make the cached entries remain forever. By default, libcurl caches this info for 60 seconds.
-<p class="level1">The name resolve functions of various libc implementations don't re-read name server information unless explicitly told so (for example, by calling <span Class="emphasis">res_init(3)</span>). This may cause libcurl to keep using the older server even if DHCP has updated the server info, and this may look like a DNS cache issue to the casual libcurl-app user.
-<p class="level0"><a name="CURLOPTDNSUSEGLOBALCACHE"></a><span class="nroffip">CURLOPT_DNS_USE_GLOBAL_CACHE</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use a global DNS cache that will survive between easy handle creations and deletions. This is not thread-safe and this will use a global variable.
-<p class="level1"><span Class="bold">WARNING:</span> this option is considered obsolete. Stop using it. Switch over to using the share interface instead! See <a class="emphasis" href="#CURLOPTSHARE">CURLOPT_SHARE</a> and <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>.
-<p class="level0"><a name="CURLOPTBUFFERSIZE"></a><span class="nroffip">CURLOPT_BUFFERSIZE</span>
-<p class="level1">Pass a long specifying your preferred size (in bytes) for the receive buffer in libcurl. The main point of this would be that the write callback gets called more often and with smaller chunks. This is just treated as a request, not an order. You cannot be guaranteed to actually get the given size. (Added in 7.10)
-<p class="level1">This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it only makes sense to use this option if you want it smaller.
-<p class="level0"><a name="CURLOPTPORT"></a><span class="nroffip">CURLOPT_PORT</span>
-<p class="level1">Pass a long specifying what remote port number to connect to, instead of the one specified in the URL or the default port for the used protocol.
-<p class="level0"><a name="CURLOPTTCPNODELAY"></a><span class="nroffip">CURLOPT_TCP_NODELAY</span>
-<p class="level1">Pass a long specifying whether the TCP_NODELAY option should be set or cleared (1 = set, 0 = clear). The option is cleared by default. This will have no effect after the connection has been established.
-<p class="level1">Setting this option will disable TCP's Nagle algorithm. The purpose of this algorithm is to try to minimize the number of small packets on the network (where "small packets" means TCP segments less than the Maximum Segment Size (MSS) for the network).
-<p class="level1">Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the send. However, in some cases (most notably telnet or rlogin) small segments may need to be sent without delay. This is less efficient than sending larger amounts of data at a time, and can contribute to congestion on the network if overdone.
-<p class="level0"><a name="CURLOPTADDRESSSCOPE"></a><span class="nroffip">CURLOPT_ADDRESS_SCOPE</span>
-<p class="level1">Pass a long specifying the scope_id value to use when connecting to IPv6 link-local or site-local addresses. (Added in 7.19.0) <a name="NAMES"></a><h2 class="nroffsh">NAMES and PASSWORDS OPTIONS (Authentication)</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTNETRC"></a><span class="nroffip">CURLOPT_NETRC</span>
-<p class="level1">This parameter controls the preference of libcurl between using user names and passwords from your <span Class="emphasis">~/.netrc</span> file, relative to user names and passwords in the URL supplied with <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a>.
-<p class="level1">libcurl uses a user name (and supplied or prompted password) supplied with <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> in preference to any of the options controlled by this parameter.
-<p class="level1">Pass a long, set to one of the values described below.
-<p class="level2">
-<p class="level1"><a name="CURLNETRCOPTIONAL"></a><span class="nroffip">CURL_NETRC_OPTIONAL</span>
-<p class="level2">The use of your <span Class="emphasis">~/.netrc</span> file is optional, and information in the URL is to be preferred. The file will be scanned for the host and user name (to find the password only) or for the host only, to find the first user name and password after that <span Class="emphasis">machine</span>, which ever information is not specified in the URL.
-<p class="level2">Undefined values of the option will have this effect.
-<p class="level1"><a name="CURLNETRCIGNORED"></a><span class="nroffip">CURL_NETRC_IGNORED</span>
-<p class="level2">The library will ignore the file and use only the information in the URL.
-<p class="level2">This is the default.
-<p class="level1"><a name="CURLNETRCREQUIRED"></a><span class="nroffip">CURL_NETRC_REQUIRED</span>
-<p class="level2">This value tells the library that use of the file is required, to ignore the information in the URL, and to search the file for the host only.
-<p class="level1">Only machine name, user name and password are taken into account (init macros and similar things aren't supported).
-<p class="level1">libcurl does not verify that the file has the correct properties set (as the standard Unix ftp client does). It should only be readable by user.
-<p class="level0"><a name="CURLOPTNETRCFILE"></a><span class="nroffip">CURLOPT_NETRC_FILE</span>
-<p class="level1">Pass a char * as parameter, pointing to a zero terminated string containing the full path name to the file you want libcurl to use as .netrc file. If this option is omitted, and <a class="emphasis" href="#CURLOPTNETRC">CURLOPT_NETRC</a> is set, libcurl will attempt to find a .netrc file in the current user's home directory. (Added in 7.10.9)
-<p class="level0"><a name="CURLOPTUSERPWD"></a><span class="nroffip">CURLOPT_USERPWD</span>
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection. Use <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> to decide the authentication method.
-<p class="level1">When using NTLM, you can set the domain by prepending it to the user name and separating the domain and name with a forward (/) or backward slash (\). Like this: "domain/user:password" or "domain\user:password". Some HTTP servers (on Windows) support this style even for Basic authentication.
-<p class="level1">When using HTTP and <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>, 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 <a class="emphasis" href="#CURLOPTUNRESTRICTEDAUTH">CURLOPT_UNRESTRICTED_AUTH</a> 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.
-<p class="level0"><a name="CURLOPTPROXYUSERPWD"></a><span class="nroffip">CURLOPT_PROXYUSERPWD</span>
-<p class="level1">Pass a char * as parameter, which should be [user name]:[password] to use for the connection to the HTTP proxy. Use <a class="emphasis" href="#CURLOPTPROXYAUTH">CURLOPT_PROXYAUTH</a> to decide the authentication method.
-<p class="level0"><a name="CURLOPTUSERNAME"></a><span class="nroffip">CURLOPT_USERNAME</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated user name to use for the transfer.
-<p class="level1"><a class="bold" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> sets the user name to be used in protocol authentication. You should not use this option together with the (older) CURLOPT_USERPWD option.
-<p class="level1">In order to specify the password to be used in conjunction with the user name use the <a class="emphasis" href="#CURLOPTPASSWORD">CURLOPT_PASSWORD</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPASSWORD"></a><span class="nroffip">CURLOPT_PASSWORD</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated password to use for the transfer.
-<p class="level1">The CURLOPT_PASSWORD option should be used in conjunction with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPROXYUSERNAME"></a><span class="nroffip">CURLOPT_PROXYUSERNAME</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated user name to use for the transfer while connecting to Proxy.
-<p class="level1">The CURLOPT_PROXYUSERNAME option should be used in same way as the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> is used. In comparison to <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> the CURLOPT_PROXYUSERNAME allows the username to contain a colon, like in the following example: "sip:[email protected]". The CURLOPT_PROXYUSERNAME option is an alternative way to set the user name while connecting to Proxy. There is no meaning to use it together with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option.
-<p class="level1">In order to specify the password to be used in conjunction with the user name use the <a class="emphasis" href="#CURLOPTPROXYPASSWORD">CURLOPT_PROXYPASSWORD</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTPROXYPASSWORD"></a><span class="nroffip">CURLOPT_PROXYPASSWORD</span>
-<p class="level1">Pass a char * as parameter, which should be pointing to the zero terminated password to use for the transfer while connecting to Proxy.
-<p class="level1">The CURLOPT_PROXYPASSWORD option should be used in conjunction with the <a class="emphasis" href="#CURLOPTPROXYUSERNAME">CURLOPT_PROXYUSERNAME</a> option. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTHTTPAUTH"></a><span class="nroffip">CURLOPT_HTTPAUTH</span>
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use. The available bits are listed below. If more than one bit is set, libcurl will first query the site to see which authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTUSERPWD">CURLOPT_USERPWD</a> option or with the <a class="emphasis" href="#CURLOPTUSERNAME">CURLOPT_USERNAME</a> and the <span Class="emphasis">CURLOPT_USERPASSWORD</span> options. (Added in 7.10.6)
-<p class="level2">
-<p class="level1"><a name="CURLAUTHBASIC"></a><span class="nroffip">CURLAUTH_BASIC</span>
-<p class="level2">HTTP Basic authentication. This is the default choice, and the only method that is in wide-spread use and supported virtually everywhere. This sends the user name and password over the network in plain text, easily captured by others.
-<p class="level1"><a name="CURLAUTHDIGEST"></a><span class="nroffip">CURLAUTH_DIGEST</span>
-<p class="level2">HTTP Digest authentication. Digest authentication is defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method.
-<p class="level1"><a name="CURLAUTHDIGESTIE"></a><span class="nroffip">CURLAUTH_DIGEST_IE</span>
-<p class="level2">HTTP Digest authentication with an IE flavor. Digest authentication is defined in RFC2617 and is a more secure way to do authentication over public networks than the regular old-fashioned Basic method. The IE flavor is simply that libcurl will use a special "quirk" that IE is known to have used before version 7 and that some servers require the client to use. (This define was added in 7.19.3)
-<p class="level1"><a name="CURLAUTHGSSNEGOTIATE"></a><span class="nroffip">CURLAUTH_GSSNEGOTIATE</span>
-<p class="level2">HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain "Negotiate") method was designed by Microsoft and is used in their web applications. It is primarily meant as a support for Kerberos5 authentication but may also be used along with other authentication methods. For more information see IETF draft draft-brezak-spnego-http-04.txt.
-<p class="level2">You need to build libcurl with a suitable GSS-API library for this to work.
-<p class="level1"><a name="CURLAUTHNTLM"></a><span class="nroffip">CURLAUTH_NTLM</span>
-<p class="level2">HTTP NTLM authentication. A proprietary protocol invented and used by Microsoft. It uses a challenge-response and hash concept similar to Digest, to prevent the password from being eavesdropped.
-<p class="level2">You need to build libcurl with OpenSSL support for this option to work, or build libcurl on Windows.
-<p class="level1"><a name="CURLAUTHANY"></a><span class="nroffip">CURLAUTH_ANY</span>
-<p class="level2">This is a convenience macro that sets all bits and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure.
-<p class="level1"><a name="CURLAUTHANYSAFE"></a><span class="nroffip">CURLAUTH_ANYSAFE</span>
-<p class="level2">This is a convenience macro that sets all bits except Basic and thus makes libcurl pick any it finds suitable. libcurl will automatically select the one it finds most secure.
-<p class="level1">
-<p class="level0"><a name="CURLOPTPROXYAUTH"></a><span class="nroffip">CURLOPT_PROXYAUTH</span>
-<p class="level1">Pass a long as parameter, which is set to a bitmask, to tell libcurl which authentication method(s) you want it to use for your proxy authentication. If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set the actual name and password with the <a class="emphasis" href="#CURLOPTPROXYUSERPWD">CURLOPT_PROXYUSERPWD</a> option. The bitmask can be constructed by or'ing together the bits listed above for the <a class="emphasis" href="#CURLOPTHTTPAUTH">CURLOPT_HTTPAUTH</a> option. As of this writing, only Basic, Digest and NTLM work. (Added in 7.10.7) <a name="HTTP"></a><h2 class="nroffsh">HTTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTAUTOREFERER"></a><span class="nroffip">CURLOPT_AUTOREFERER</span>
-<p class="level1">Pass a parameter set to 1 to enable this. When enabled, libcurl will automatically set the Referer: field in requests where it follows a Location: redirect.
-<p class="level0"><a name="CURLOPTENCODING"></a><span class="nroffip">CURLOPT_ENCODING</span>
-<p class="level1">Sets the contents of the Accept-Encoding: header sent in an HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: <span Class="emphasis">identity</span>, which does nothing, <span Class="emphasis">deflate</span> which requests the server to compress its response using the zlib algorithm, and <span Class="emphasis">gzip</span> which requests the gzip algorithm. If a zero-length string is set, then an Accept-Encoding: header containing all supported encodings is sent.
-<p class="level1">This is a request, not an order; the server may or may not do it. This option must be set (to any non-NULL value) or else any unsolicited encoding done by the server is ignored. See the special file lib/README.encoding for details.
-<p class="level0"><a name="CURLOPTFOLLOWLOCATION"></a><span class="nroffip">CURLOPT_FOLLOWLOCATION</span>
-<p class="level1">A parameter set to 1 tells the library to follow any Location: header that the server sends as part of an HTTP header.
-<p class="level1">This means that the library will re-send the same request on the new location and follow new Location: headers all the way until no more such headers are returned. <a class="emphasis" href="#CURLOPTMAXREDIRS">CURLOPT_MAXREDIRS</a> can be used to limit the number of redirects libcurl will follow.
-<p class="level1">Since 7.19.4, libcurl can limit what protocols it will automatically follow. The accepted protocols are set with <a class="emphasis" href="#CURLOPTREDIRPROTOCOLS">CURLOPT_REDIR_PROTOCOLS</a> and it excludes the FILE protocol by default.
-<p class="level0"><a name="CURLOPTUNRESTRICTEDAUTH"></a><span class="nroffip">CURLOPT_UNRESTRICTED_AUTH</span>
-<p class="level1">A parameter set to 1 tells the library it can continue to send authentication (user+password) when following locations, even when hostname changed. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>.
-<p class="level0"><a name="CURLOPTMAXREDIRS"></a><span class="nroffip">CURLOPT_MAXREDIRS</span>
-<p class="level1">Pass a long. The set number will be the redirection limit. If that many redirections have been followed, the next redirect will cause an error (<span Class="emphasis">CURLE_TOO_MANY_REDIRECTS</span>). This option only makes sense if the <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a> is used at the same time. Added in 7.15.1: Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for an infinite number of redirects (which is the default)
-<p class="level0"><a name="CURLOPTPOSTREDIR"></a><span class="nroffip">CURLOPT_POSTREDIR</span>
-<p class="level1">Pass a bitmask to control how libcurl acts on redirects after POSTs that get a 301 or 302 response back. A parameter with bit 0 set (value <span Class="bold">CURL_REDIR_POST_301</span>) tells the library to respect RFC 2616/10.3.2 and not convert POST requests into GET requests when following a 301 redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience define that sets both bits.
-<p class="level1">The non-RFC behaviour is ubiquitous in web browsers, so the library does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when setting <a class="emphasis" href="#CURLOPTFOLLOWLOCATION">CURLOPT_FOLLOWLOCATION</a>. (Added in 7.17.1) (This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before then)
-<p class="level0"><a name="CURLOPTPUT"></a><span class="nroffip">CURLOPT_PUT</span>
-<p class="level1">A parameter set to 1 tells the library to use HTTP PUT to transfer data. The data should be set with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> and <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a>.
-<p class="level1">This option is deprecated and starting with version 7.12.1 you should instead use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a>.
-<p class="level0"><a name="CURLOPTPOST"></a><span class="nroffip">CURLOPT_POST</span>
-<p class="level1">A parameter set to 1 tells the library to do a regular HTTP post. This will also make the library use a "Content-Type: application/x-www-form-urlencoded" header. (This is by far the most commonly used POST method).
-<p class="level1">Use one of <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> or <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a> options to specify what data to post and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a> to set the data size.
-<p class="level1">Optionally, you can provide data to POST using the <a class="emphasis" href="#CURLOPTREADFUNCTION">CURLOPT_READFUNCTION</a> and <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> options but then you must make sure to not set <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to anything but NULL. When providing data with a callback, you must transmit it using chunked transfer-encoding or you must set the size of the data with the <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a> option. To enable chunked encoding, you simply pass in the appropriate Transfer-Encoding header, see the post-callback.c example.
-<p class="level1">You can override the default POST Content-Type: header by setting your own with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">If you use POST to a HTTP 1.1 server, you can send data without knowing the size before starting the POST if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>. With HTTP 1.0 or without chunked transfer, you must specify the size in the request.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level1">If you issue a POST request and then want to make a HEAD or GET using the same re-used handle, you must explicitly set the new request type using <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> or <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> or similar.
-<p class="level0"><a name="CURLOPTPOSTFIELDS"></a><span class="nroffip">CURLOPT_POSTFIELDS</span>
-<p class="level1">Pass a void * as parameter, which should be the full data to post in an HTTP POST operation. You must make sure that the data is formatted the way you want the server to receive it. libcurl will not convert or encode it for you. Most web servers will assume this data to be url-encoded.
-<p class="level1">The pointed data are NOT copied by the library: as a consequence, they must be preserved by the calling application until the transfer finishes.
-<p class="level1">This POST is a normal application/x-www-form-urlencoded kind (and libcurl will set that Content-Type by default when this option is used), which is the most commonly used one by HTML forms. See also the <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>. Using <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> implies <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a>.
-<p class="level1">If you want to do a zero-byte POST, you need to set <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> explicitly to zero, as simply setting <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to NULL or "" just effectively disables the sending of the specified string. libcurl will instead assume that you'll send the POST data using the read callback!
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">To make multipart/formdata posts (aka RFC2388-posts), check out the <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a> option.
-<p class="level0"><a name="CURLOPTPOSTFIELDSIZE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE</span>
-<p class="level1">If you want to post data to the server without letting libcurl do a strlen() to measure the data size, this option must be used. When this option is used you can post fully binary data, which otherwise is likely to fail. If this size is set to -1, the library will use strlen() to get the size.
-<p class="level0"><a name="CURLOPTPOSTFIELDSIZELARGE"></a><span class="nroffip">CURLOPT_POSTFIELDSIZE_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. Use this to set the size of the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> data to prevent libcurl from doing strlen() on the data to figure out the size. This is the large file version of the <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> option. (Added in 7.11.1)
-<p class="level0"><a name="CURLOPTCOPYPOSTFIELDS"></a><span class="nroffip">CURLOPT_COPYPOSTFIELDS</span>
-<p class="level1">Pass a char * as parameter, which should be the full data to post in an HTTP POST operation. It behaves as the <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> option, but the original data are copied by the library, allowing the application to overwrite the original data after setting this option.
-<p class="level1">Because data are copied, care must be taken when using this option in conjunction with <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDSIZELARGE">CURLOPT_POSTFIELDSIZE_LARGE</a>: If the size has not been set prior to <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, the data are assumed to be a NUL-terminated string; else the stored size informs the library about the data byte count to copy. In any case, the size must not be changed after <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a>, unless another <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> or <a class="emphasis" href="#CURLOPTCOPYPOSTFIELDS">CURLOPT_COPYPOSTFIELDS</a> option is issued. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTHTTPPOST"></a><span class="nroffip">CURLOPT_HTTPPOST</span>
-<p class="level1">Tells libcurl you want a multipart/formdata HTTP POST to be made and you instruct what data to pass on to the server. Pass a pointer to a linked list of curl_httppost structs as parameter. The easiest way to create such a list, is to use <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a> as documented. The data in this list must remain intact until you close this curl handle again with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level1">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPPOST">CURLOPT_HTTPPOST</a>, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level0"><a name="CURLOPTREFERER"></a><span class="nroffip">CURLOPT_REFERER</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set the Referer: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level0"><a name="CURLOPTUSERAGENT"></a><span class="nroffip">CURLOPT_USERAGENT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set the User-Agent: header in the http request sent to the remote server. This can be used to fool servers or scripts. You can also set any custom header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>.
-<p class="level0"><a name="CURLOPTHTTPHEADER"></a><span class="nroffip">CURLOPT_HTTPHEADER</span>
-<p class="level1">Pass a pointer to a linked list of HTTP headers to pass to the server in your HTTP request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list. If you add a header that is otherwise generated and used by libcurl internally, your added one will be used instead. If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the internally used header will get disabled. Thus, using this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content, make the content be two quotes: "". The headers included in the linked list must not be CRLF-terminated, because curl adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified.
-<p class="level1">The first line in a request (containing the method, usually a GET or POST) is not a header and cannot be replaced using this option. Only the lines following the request-line are headers. Adding this method line in this list of headers will only cause your request to send an invalid header.
-<p class="level1">Pass a NULL to this to reset back to no custom headers.
-<p class="level1">The most commonly replaced headers have "shortcuts" in the options <a class="emphasis" href="#CURLOPTCOOKIE">CURLOPT_COOKIE</a>, <a class="emphasis" href="#CURLOPTUSERAGENT">CURLOPT_USERAGENT</a> and <a class="emphasis" href="#CURLOPTREFERER">CURLOPT_REFERER</a>.
-<p class="level0"><a name="CURLOPTHTTP200ALIASES"></a><span class="nroffip">CURLOPT_HTTP200ALIASES</span>
-<p class="level1">Pass a pointer to a linked list of aliases to be treated as valid HTTP 200 responses. Some servers respond with a custom header response line. For example, IceCast servers respond with "ICY 200 OK". By including this string in your list of aliases, the response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK". (Added in 7.10.3)
-<p class="level1">The linked list should be a fully valid list of struct curl_slist structs, and be properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list.
-<p class="level1">The alias itself is not parsed for any version strings. Before libcurl 7.16.3, Libcurl used the value set by option <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a>, but starting with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
-<p class="level0"><a name="CURLOPTCOOKIE"></a><span class="nroffip">CURLOPT_COOKIE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to set a cookie in the http request. The format of the string should be NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie should contain.
-<p class="level1">If you need to set multiple cookies, you need to set them all using a single option and thus you need to concatenate them all in one single string. Set multiple cookies in one string like this: "name1=content1; name2=content2;" etc.
-<p class="level1">This option sets the cookie header explictly in the outgoing request(s). If multiple requests are done due to authentication, followed redirections or similar, they will all get this cookie passed on.
-<p class="level1">Using this option multiple times will only make the latest string override the previous ones.
-<p class="level0"><a name="CURLOPTCOOKIEFILE"></a><span class="nroffip">CURLOPT_COOKIEFILE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It should contain the name of your file holding cookie data to read. The cookie data may be in Netscape / Mozilla cookie data format or just regular HTTP-style headers dumped to a file.
-<p class="level1">Given an empty or non-existing file or by passing the empty string (""), this option will enable cookies for this curl handle, making it understand and parse received cookies and then use matching cookies in future requests.
-<p class="level1">If you use this option multiple times, you just add more files to read. Subsequent files will add more cookies.
-<p class="level0"><a name="CURLOPTCOOKIEJAR"></a><span class="nroffip">CURLOPT_COOKIEJAR</span>
-<p class="level1">Pass a file name as char *, zero terminated. This will make libcurl write all internally known cookies to the specified file when <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. If no cookies are known, no file will be created. Specify "-" to instead have the cookies written to stdout. Using this option also enables cookies for this session, so if you for example follow a location it will make matching cookies get sent accordingly.
-<p class="level1">If the cookie jar file can't be created or written to (when the <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called), libcurl will not and cannot report an error for this. Using <a class="emphasis" href="#CURLOPTVERBOSE">CURLOPT_VERBOSE</a> or <a class="emphasis" href="#CURLOPTDEBUGFUNCTION">CURLOPT_DEBUGFUNCTION</a> will get a warning to display, but that is the only visible feedback you get about this possibly lethal situation.
-<p class="level0"><a name="CURLOPTCOOKIESESSION"></a><span class="nroffip">CURLOPT_COOKIESESSION</span>
-<p class="level1">Pass a long set to 1 to mark this as a new cookie "session". It will force libcurl to ignore all cookies it is about to load that are "session cookies" from the previous session. By default, libcurl always stores and loads all cookies, independent if they are session cookies or not. Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only.
-<p class="level0"><a name="CURLOPTCOOKIELIST"></a><span class="nroffip">CURLOPT_COOKIELIST</span>
-<p class="level1">Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL cookie engine was not enabled it will enable its cookie engine. Passing a magic string "ALL" will erase all cookies known by cURL. (Added in 7.14.1) Passing the special string "SESS" will only erase all session cookies known by cURL. (Added in 7.15.4) Passing the special string "FLUSH" will write all cookies known by cURL to the file specified by <a class="emphasis" href="#CURLOPTCOOKIEJAR">CURLOPT_COOKIEJAR</a>. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTHTTPGET"></a><span class="nroffip">CURLOPT_HTTPGET</span>
-<p class="level1">Pass a long. If the long is 1, this forces the HTTP request to get back to GET. Usable if a POST, HEAD, PUT, or a custom request has been used previously using the same curl handle.
-<p class="level1">When setting <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a> to 1, it will automatically set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 0 (since 7.14.1).
-<p class="level0"><a name="CURLOPTHTTPVERSION"></a><span class="nroffip">CURLOPT_HTTP_VERSION</span>
-<p class="level1">Pass a long, set to one of the values described below. They force libcurl to use the specific HTTP versions. This is not sensible to do unless you have a good reason.
-<p class="level2">
-<p class="level1"><a name="CURLHTTPVERSIONNONE"></a><span class="nroffip">CURL_HTTP_VERSION_NONE</span>
-<p class="level2">We don't care about what version the library uses. libcurl will use whatever it thinks fit.
-<p class="level1"><a name="CURLHTTPVERSION10"></a><span class="nroffip">CURL_HTTP_VERSION_1_0</span>
-<p class="level2">Enforce HTTP 1.0 requests.
-<p class="level1"><a name="CURLHTTPVERSION11"></a><span class="nroffip">CURL_HTTP_VERSION_1_1</span>
-<p class="level2">Enforce HTTP 1.1 requests.
-<p class="level1">
-<p class="level0"><a name="CURLOPTIGNORECONTENTLENGTH"></a><span class="nroffip">CURLOPT_IGNORE_CONTENT_LENGTH</span>
-<p class="level1">Ignore the Content-Length header. This is useful for Apache 1.x (and similar servers) which will report incorrect content length for files over 2 gigabytes. If this option is used, curl will not be able to accurately report progress, and will simply stop the download when the server ends the connection. (added in 7.14.1)
-<p class="level0"><a name="CURLOPTHTTPCONTENTDECODING"></a><span class="nroffip">CURLOPT_HTTP_CONTENT_DECODING</span>
-<p class="level1">Pass a long to tell libcurl how to act on content decoding. If set to zero, content decoding will be disabled. If set to 1 it is enabled. Libcurl has no default content decoding but requires you to use <a class="emphasis" href="#CURLOPTENCODING">CURLOPT_ENCODING</a> for that. (added in 7.16.2)
-<p class="level0"><a name="CURLOPTHTTPTRANSFERDECODING"></a><span class="nroffip">CURLOPT_HTTP_TRANSFER_DECODING</span>
-<p class="level1">Pass a long to tell libcurl how to act on transfer decoding. If set to zero, transfer decoding will be disabled, if set to 1 it is enabled (default). libcurl does chunked transfer decoding by default unless this option is set to zero. (added in 7.16.2) <a name="SMTP"></a><h2 class="nroffsh">SMTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTMAILFROM"></a><span class="nroffip">CURLOPT_MAIL_FROM</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to specify the sender address in a mail when sending an SMTP mail with libcurl.
-<p class="level1">(Added in 7.20.0)
-<p class="level0"><a name="CURLOPTMAILRCPT"></a><span class="nroffip">CURLOPT_MAIL_RCPT</span>
-<p class="level1">Pass a pointer to a linked list of recipients to pass to the server in your SMTP mail request. The linked list should be a fully valid list of <span class="bold">struct curl_slist</span> structs properly filled in. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to create the list and <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a> to clean up an entire list.
-<p class="level1">Each recipient in SMTP lingo is specified with angle brackets (<>), but should you not use an angle bracket as first letter libcurl will assume you provide a single email address only and enclose that with angle brackets for you.
-<p class="level1">(Added in 7.20.0) <a name="TFTP"></a><h2 class="nroffsh">TFTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTFTPBLKSIZE"></a><span class="nroffip">CURLOPT_TFTP_BLKSIZE</span>
-<p class="level1">Specify block size to use for TFTP data transmission. Valid range as per RFC 2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is not specified. The specified block size will only be used pending support by the remote server. If the server does not return an option acknowledgement or returns an option acknowledgement with no blksize, the default of 512 bytes will be used. (added in 7.19.4) <a name="FTP"></a><h2 class="nroffsh">FTP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTFTPPORT"></a><span class="nroffip">CURLOPT_FTPPORT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used to get the IP address to use for the FTP PORT instruction. The PORT instruction tells the remote server to connect to our specified IP address. The string may be a plain IP address, a host name, a network interface name (under Unix) or just a '-' symbol to let the library use your system's default IP address. Default FTP operations are passive, and thus won't use PORT.
-<p class="level1">The address can be followed by a ':' to specify a port, optionally followed by a '-' to specify a port range. If the port specified is 0, the operating system will pick a free port. If a range is provided and all ports in the range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the handle. Invalid port/range settings are ignored. IPv6 addresses followed by a port or portrange have to be in brackets. IPv6 addresses without port/range specifier can be in brackets. (added in 7.19.5)
-<p class="level1">Examples with specified ports:
-<p class="level1"><pre>
-<p class="level1"> eth0:0
- 192.168.1.2:32000-33000
- curl.se:32123
- [::1]:1234-4567
- </pre>
-
-<p class="level1">
-<p class="level1">You disable PORT again and go back to using the passive version by setting this option to NULL.
-<p class="level0"><a name="CURLOPTQUOTE"></a><span class="nroffip">CURLOPT_QUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server prior to your FTP request. This will be done before any other commands are issued (even before the CWD command for FTP). The linked list should be a fully valid list of 'struct curl_slist' structs properly filled in with text strings. Use <a class="emphasis" href="./curl_slist_append.html">curl_slist_append(3)</a> to append strings (commands) to the list, and clear the entire list afterwards with <a class="emphasis" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. Disable this operation again by setting a NULL to this option. The set of valid FTP commands depends on the server (see RFC959 for a list of mandatory commands). The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, rename, rm, rmdir, symlink (see <span Class="manpage">curl (1))</span> (SFTP support added in 7.16.3)
-<p class="level0"><a name="CURLOPTPOSTQUOTE"></a><span class="nroffip">CURLOPT_POSTQUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP or SFTP commands to pass to the server after your FTP transfer request. The commands will only be run if no error occurred. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option.
-<p class="level0"><a name="CURLOPTPREQUOTE"></a><span class="nroffip">CURLOPT_PREQUOTE</span>
-<p class="level1">Pass a pointer to a linked list of FTP commands to pass to the server after the transfer type is set. The linked list should be a fully valid list of struct curl_slist structs properly filled in as described for <a class="emphasis" href="#CURLOPTQUOTE">CURLOPT_QUOTE</a>. Disable this operation again by setting a NULL to this option. Before version 7.15.6, if you also set <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a> to 1, this option didn't work.
-<p class="level0"><a name="CURLOPTDIRLISTONLY"></a><span class="nroffip">CURLOPT_DIRLISTONLY</span>
-<p class="level1">A parameter set to 1 tells the library to just list the names of files in a directory, instead of doing a full directory listing that would include file sizes, dates etc. This works for FTP and SFTP URLs.
-<p class="level1">This causes an FTP NLST command to be sent on an FTP server. Beware that some FTP servers list only files in their response to NLST; they might not include subdirectories and symbolic links.
-<p class="level1">Setting this option to 1 also implies a directory listing even if the URL doesn't end with a slash, which otherwise is necessary.
-<p class="level1">Do NOT use this option if you also use <a class="emphasis" href="#CURLOPTWILDCARDMATCH">CURLOPT_WILDCARDMATCH</a> as it will effectively break that feature then.
-<p class="level1">(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
-<p class="level0"><a name="CURLOPTAPPEND"></a><span class="nroffip">CURLOPT_APPEND</span>
-<p class="level1">A parameter set to 1 tells the library to append to the remote file instead of overwrite it. This is only useful when uploading to an FTP site.
-<p class="level1">(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
-<p class="level0"><a name="CURLOPTFTPUSEEPRT"></a><span class="nroffip">CURLOPT_FTP_USE_EPRT</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use the EPRT (and LPRT) command when doing active FTP downloads (which is enabled by <a class="emphasis" href="#CURLOPTFTPPORT">CURLOPT_FTPPORT</a>). Using EPRT means that it will first attempt to use EPRT and then LPRT before using PORT, but if you pass zero to this option, it will not try using EPRT or LPRT, only plain PORT. (Added in 7.10.5)
-<p class="level1">If the server is an IPv6 host, this option will have no effect as of 7.12.3.
-<p class="level0"><a name="CURLOPTFTPUSEEPSV"></a><span class="nroffip">CURLOPT_FTP_USE_EPSV</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to use the EPSV command when doing passive FTP downloads (which it always does by default). Using EPSV means that it will first attempt to use EPSV before using PASV, but if you pass zero to this option, it will not try using EPSV, only plain PASV.
-<p class="level1">If the server is an IPv6 host, this option will have no effect as of 7.12.3.
-<p class="level0"><a name="CURLOPTFTPUSEPRET"></a><span class="nroffip">CURLOPT_FTP_USE_PRET</span>
-<p class="level1">Pass a long. If the value is 1, it tells curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as well as up and downloads in PASV mode. Has no effect when using the active FTP transfers mode. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTFTPCREATEMISSINGDIRS"></a><span class="nroffip">CURLOPT_FTP_CREATE_MISSING_DIRS</span>
-<p class="level1">Pass a long. If the value is 1, curl will attempt to create any remote directory that it fails to CWD into. CWD is the command that changes working directory. (Added in 7.10.7)
-<p class="level1">This setting also applies to SFTP-connections. curl will attempt to create the remote directory if it can't obtain a handle to the target-location. The creation will fail if a file of the same name as the directory to create already exists or lack of permissions prevents creation. (Added in 7.16.3)
-<p class="level1">Starting with 7.19.4, you can also set this value to 2, which will make libcurl retry the CWD command again if the subsequent MKD command fails. This is especially useful if you're doing many simultanoes connections against the same server and they all have this option enabled, as then CWD may first fail but then another connection does MKD before this connection and thus MKD fails but trying CWD works! 7.19.4 also introduced the <span Class="emphasis">CURLFTP_CREATE_DIR</span> and <span Class="emphasis">CURLFTP_CREATE_DIR_RETRY</span> enum names for these arguments.
-<p class="level1">Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act as if 1 was selected.
-<p class="level0"><a name="CURLOPTFTPRESPONSETIMEOUT"></a><span class="nroffip">CURLOPT_FTP_RESPONSE_TIMEOUT</span>
-<p class="level1">Pass a long. Causes curl to set a timeout period (in seconds) on the amount of time that the server is allowed to take in order to generate a response message for a command before the session is considered hung. While curl is waiting for a response, this value overrides <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>. It is recommended that if used in conjunction with <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>, you set <a class="emphasis" href="#CURLOPTFTPRESPONSETIMEOUT">CURLOPT_FTP_RESPONSE_TIMEOUT</a> to a value smaller than <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a>. (Added in 7.10.8)
-<p class="level0"><a name="CURLOPTFTPALTERNATIVETOUSER"></a><span class="nroffip">CURLOPT_FTP_ALTERNATIVE_TO_USER</span>
-<p class="level1">Pass a char * as parameter, pointing to a string which will be used to authenticate if the usual FTP "USER user" and "PASS password" negotiation fails. This is currently only known to be required when connecting to Tumbleweed's Secure Transport FTPS server using client certificates for authentication. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTFTPSKIPPASVIP"></a><span class="nroffip">CURLOPT_FTP_SKIP_PASV_IP</span>
-<p class="level1">Pass a long. If set to 1, it instructs libcurl to not use the IP address the server suggests in its 227-response to libcurl's PASV command when libcurl connects the data connection. Instead libcurl will re-use the same IP address it already uses for the control connection. But it will use the port number from the 227-response. (Added in 7.14.2)
-<p class="level1">This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
-<p class="level0"><a name="CURLOPTUSESSL"></a><span class="nroffip">CURLOPT_USE_SSL</span>
-<p class="level1">Pass a long using one of the values from below, to make libcurl use your desired level of SSL for the FTP transfer. (Added in 7.11.0)
-<p class="level1">(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants were known as CURLFTPSSL_*)
-<p class="level2">
-<p class="level1"><a name="CURLUSESSLNONE"></a><span class="nroffip">CURLUSESSL_NONE</span>
-<p class="level2">Don't attempt to use SSL.
-<p class="level1"><a name="CURLUSESSLTRY"></a><span class="nroffip">CURLUSESSL_TRY</span>
-<p class="level2">Try using SSL, proceed as normal otherwise.
-<p class="level1"><a name="CURLUSESSLCONTROL"></a><span class="nroffip">CURLUSESSL_CONTROL</span>
-<p class="level2">Require SSL for the control connection or fail with <span Class="emphasis">CURLE_USE_SSL_FAILED</span>.
-<p class="level1"><a name="CURLUSESSLALL"></a><span class="nroffip">CURLUSESSL_ALL</span>
-<p class="level2">Require SSL for all communication or fail with <span Class="emphasis">CURLE_USE_SSL_FAILED</span>.
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPSSLAUTH"></a><span class="nroffip">CURLOPT_FTPSSLAUTH</span>
-<p class="level1">Pass a long using one of the values from below, to alter how libcurl issues "AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see <a class="emphasis" href="#CURLOPTUSESSL">CURLOPT_USE_SSL</a>). (Added in 7.12.2)
-<p class="level2">
-<p class="level1"><a name="CURLFTPAUTHDEFAULT"></a><span class="nroffip">CURLFTPAUTH_DEFAULT</span>
-<p class="level2">Allow libcurl to decide.
-<p class="level1"><a name="CURLFTPAUTHSSL"></a><span class="nroffip">CURLFTPAUTH_SSL</span>
-<p class="level2">Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
-<p class="level1"><a name="CURLFTPAUTHTLS"></a><span class="nroffip">CURLFTPAUTH_TLS</span>
-<p class="level2">Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPSSLCCC"></a><span class="nroffip">CURLOPT_FTP_SSL_CCC</span>
-<p class="level1">If enabled, this option makes libcurl use CCC (Clear Command Channel). It shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This allows NAT routers to follow the FTP transaction. Pass a long using one of the values below. (Added in 7.16.1)
-<p class="level2">
-<p class="level1"><a name="CURLFTPSSLCCCNONE"></a><span class="nroffip">CURLFTPSSL_CCC_NONE</span>
-<p class="level2">Don't attempt to use CCC.
-<p class="level1"><a name="CURLFTPSSLCCCPASSIVE"></a><span class="nroffip">CURLFTPSSL_CCC_PASSIVE</span>
-<p class="level2">Do not initiate the shutdown, but wait for the server to do it. Do not send a reply.
-<p class="level1"><a name="CURLFTPSSLCCCACTIVE"></a><span class="nroffip">CURLFTPSSL_CCC_ACTIVE</span>
-<p class="level2">Initiate the shutdown and wait for a reply.
-<p class="level1">
-<p class="level0"><a name="CURLOPTFTPACCOUNT"></a><span class="nroffip">CURLOPT_FTP_ACCOUNT</span>
-<p class="level1">Pass a pointer to a zero-terminated string (or NULL to disable). When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command. (Added in 7.13.0)
-<p class="level0"><a name="CURLOPTFTPFILEMETHOD"></a><span class="nroffip">CURLOPT_FTP_FILEMETHOD</span>
-<p class="level1">Pass a long that should have one of the following values. This option controls what method libcurl should use to reach a file on a FTP(S) server. The argument should be one of the following alternatives:
-<p class="level2">
-<p class="level1"><a name="CURLFTPMETHODMULTICWD"></a><span class="nroffip">CURLFTPMETHOD_MULTICWD</span>
-<p class="level2">libcurl does a single CWD operation for each path part in the given URL. For deep hierarchies this means many commands. This is how RFC1738 says it should be done. This is the default but the slowest behavior.
-<p class="level1"><a name="CURLFTPMETHODNOCWD"></a><span class="nroffip">CURLFTPMETHOD_NOCWD</span>
-<p class="level2">libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
-<p class="level1"><a name="CURLFTPMETHODSINGLECWD"></a><span class="nroffip">CURLFTPMETHOD_SINGLECWD</span>
-<p class="level2">libcurl does one CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards compliant than 'nocwd' but without the full penalty of 'multicwd'.
-<p class="level1">(Added in 7.15.1) <a name="RTSP"></a><h2 class="nroffsh">RTSP OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTRTSPREQUEST"></a><span class="nroffip">CURLOPT_RTSP_REQUEST</span>
-<p class="level1">Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP enum values. Unless noted otherwise, commands require the Session ID to be initialized. (Added in 7.20.0)
-<p class="level2">
-<p class="level1"><a name="CURLRTSPREQOPTIONS"></a><span class="nroffip">CURL_RTSPREQ_OPTIONS</span>
-<p class="level2">Used to retrieve the available methods of the server. The application is responsbile for parsing and obeying the response. <span class="bold">(The session ID is not needed for this method.)</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQDESCRIBE"></a><span class="nroffip">CURL_RTSPREQ_DESCRIBE</span>
-<p class="level2">Used to get the low level description of a stream. The application should note what formats it understands in the <span Class="emphasis">'Accept:'</span> header. Unless set manually, libcurl will automatically fill in <span class="emphasis">'Accept: application/sdp'</span>. Time-condition headers will be added to Describe requests if the <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a> option is active. <span class="bold">(The session ID is not needed for this method)</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQANNOUNCE"></a><span class="nroffip">CURL_RTSPREQ_ANNOUNCE</span>
-<p class="level2">When sent by a client, this method changes the description of the session. For example, if a client is using the server to record a meeting, the client can use Announce to inform the server of all the meta-information about the session. ANNOUNCE acts like an HTTP PUT or POST just like <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQSETUP"></a><span class="nroffip">CURL_RTSPREQ_SETUP</span>
-<p class="level2">Setup is used to initialize the transport layer for the session. The application must set the desired Transport options for a session by using the <a class="emphasis" href="#CURLOPTRTSPTRANSPORT">CURLOPT_RTSP_TRANSPORT</a> option prior to calling setup. If no session ID is currently set with <a class="emphasis" href="#CURLOPTRTSPSESSIONID">CURLOPT_RTSP_SESSION_ID</a>, libcurl will extract and use the session ID in the response to this request. <span class="bold">(The session ID is not needed for this method).</span> (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQPLAY"></a><span class="nroffip">CURL_RTSPREQ_PLAY</span>
-<p class="level2">Send a Play command to the server. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option to modify the playback time (e.g. 'npt=10-15'). (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQPAUSE"></a><span class="nroffip">CURL_RTSPREQ_PAUSE</span>
-<p class="level2">Send a Pause command to the server. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option with a single value to indicate when the stream should be halted. (e.g. npt='25') (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQTEARDOWN"></a><span class="nroffip">CURL_RTSPREQ_TEARDOWN</span>
-<p class="level2">This command terminates an RTSP session. Simply closing a connection does not terminate the RTSP session since it is valid to control an RTSP session over different connections. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQGETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_GET_PARAMETER</span>
-<p class="level2">Retrieve a parameter from the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header on all non-empty requests unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST (see <a class="emphasis" href="#CURLRTSPREQSETPARAMETER">CURL_RTSPREQ_SET_PARAMETER</a>). Applications wishing to send a heartbeat message (e.g. in the presence of a server-specified timeout) should send use an empty GET_PARAMETER request. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQSETPARAMETER"></a><span class="nroffip">CURL_RTSPREQ_SET_PARAMETER</span>
-<p class="level2">Set a parameter on the server. By default, libcurl will automatically include a <span Class="emphasis">Content-Type: text/parameters</span> header unless a custom one is set. The interaction with SET_PARAMTER is much like an HTTP PUT or POST. An application may either use <a class="emphasis" href="#CURLOPTUPLOAD">CURLOPT_UPLOAD</a> with <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> like an HTTP PUT, or it may use <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> like an HTTP POST. No chunked transfers are allowed, so the application must set the <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> in the former and <a class="emphasis" href="#CURLOPTPOSTFIELDSIZE">CURLOPT_POSTFIELDSIZE</a> in the latter. Also, there is no use of multi-part POSTs within RTSP. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQRECORD"></a><span class="nroffip">CURL_RTSPREQ_RECORD</span>
-<p class="level2">Used to tell the server to record a session. Use the <a class="emphasis" href="#CURLOPTRANGE">CURLOPT_RANGE</a> option to modify the record time. (Added in 7.20.0)
-<p class="level1"><a name="CURLRTSPREQRECEIVE"></a><span class="nroffip">CURL_RTSPREQ_RECEIVE</span>
-<p class="level2">This is a special request because it does not send any data to the server. The application may call this function in order to receive interleaved RTP data. It will return after processing one read buffer of data in order to give the application a chance to run. (Added in 7.20.0)
-<p class="level1">
-<p class="level0"><a name="CURLOPTRTSPSESSIONID"></a><span class="nroffip">CURLOPT_RTSP_SESSION_ID</span>
-<p class="level1">Pass a char * as a parameter to set the value of the current RTSP Session ID for the handle. Useful for resuming an in-progress session. Once this value is set to any non-NULL value, libcurl will return <span Class="emphasis">CURLE_RTSP_SESSION_ERROR</span> if ID received from the server does not match. If unset (or set to NULL), libcurl will automatically set the ID the first time the server sets it in a response. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPSTREAMURI"></a><span class="nroffip">CURLOPT_RTSP_STREAM_URI</span>
-<p class="level1">Set the stream URI to operate on by passing a char * . For example, a single session may be controlling <span Class="emphasis">rtsp://foo/twister/audio</span> and <span Class="emphasis">rtsp://foo/twister/video</span> and the application can switch to the appropriate stream using this option. If unset, libcurl will default to operating on generic server options by passing '*' in the place of the RTSP Stream URI. This option is distinct from <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a>. When working with RTSP, the <span Class="emphasis">CURLOPT_STREAM_URI</span> indicates what URL to send to the server in the request header while the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> indicates where to make the connection to. (e.g. the <a class="emphasis" href="#CURLOPTURL">CURLOPT_URL</a> for the above examples might be set to <span Class="emphasis">rtsp://foo/twister</span> (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPTRANSPORT"></a><span class="nroffip">CURLOPT_RTSP_TRANSPORT</span>
-<p class="level1">Pass a char * to tell libcurl what to pass for the Transport: header for this RTSP session. This is mainly a convenience method to avoid needing to set a custom Transport: header for every SETUP request. The application must set a Transport: header before issuing a SETUP request. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPHEADER"></a><span class="nroffip">CURLOPT_RTSP_HEADER</span>
-<p class="level1">This option is simply an alias for <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTP_HEADER</a>. Use this to replace the standard headers that RTSP and HTTP share. It is also valid to use the shortcuts such as <a class="emphasis" href="#CURLOPTUSERAGENT">CURLOPT_USERAGENT</a>. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPCLIENTCSEQ"></a><span class="nroffip">CURLOPT_RTSP_CLIENT_CSEQ</span>
-<p class="level1">Manually set the the CSEQ number to issue for the next RTSP request. Useful if the application is resuming a previously broken connection. The CSEQ will increment from this new number henceforth. (Added in 7.20.0)
-<p class="level0"><a name="CURLOPTRTSPSERVERCSEQ"></a><span class="nroffip">CURLOPT_RTSP_SERVER_CSEQ</span>
-<p class="level1">Manually set the CSEQ number to expect for the next RTSP Server->Client request. At the moment, this feature (listening for Server requests) is unimplemented. (Added in 7.20.0) <a name="PROTOCOL"></a><h2 class="nroffsh">PROTOCOL OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTRANSFERTEXT"></a><span class="nroffip">CURLOPT_TRANSFERTEXT</span>
-<p class="level1">A parameter set to 1 tells the library to use ASCII mode for FTP transfers, instead of the default binary transfer. For win32 systems it does not set the stdout to binary mode. This option can be usable when transferring text data between systems with different views on certain characters, such as newlines or similar.
-<p class="level1">libcurl does not do a complete ASCII conversion when doing ASCII transfers over FTP. This is a known limitation/flaw that nobody has rectified. libcurl simply sets the mode to ASCII and performs a standard transfer.
-<p class="level0"><a name="CURLOPTPROXYTRANSFERMODE"></a><span class="nroffip">CURLOPT_PROXY_TRANSFER_MODE</span>
-<p class="level1">Pass a long. If the value is set to 1 (one), it tells libcurl to set the transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by appending ;type=a or ;type=i to the URL. Without this setting, or it being set to 0 (zero, the default), <a class="emphasis" href="#CURLOPTTRANSFERTEXT">CURLOPT_TRANSFERTEXT</a> has no effect when doing FTP via a proxy. Beware that not all proxies support this feature. (Added in 7.18.0)
-<p class="level0"><a name="CURLOPTCRLF"></a><span class="nroffip">CURLOPT_CRLF</span>
-<p class="level1">Convert Unix newlines to CRLF newlines on transfers.
-<p class="level0"><a name="CURLOPTRANGE"></a><span class="nroffip">CURLOPT_RANGE</span>
-<p class="level1">Pass a char * as parameter, which should contain the specified range you want. It should be in the format "X-Y", where X or Y may be left out. HTTP transfers also support several intervals, separated with commas as in <span Class="emphasis">"X-Y,N-M"</span>. Using this kind of multiple intervals will cause the HTTP server to send the response document in pieces (using standard MIME separation techniques). For RTSP, the formatting of a range should follow RFC 2326 Section 12.29. For RTSP, byte ranges are <span Class="bold">not</span> permitted. Instead, ranges should be given in npt, utc, or smpte formats.
-<p class="level1">Pass a NULL to this option to disable the use of ranges.
-<p class="level1">Ranges work on HTTP, FTP, FILE (since 7.18.0), and RTSP (since 7.20.0) transfers only.
-<p class="level0"><a name="CURLOPTRESUMEFROM"></a><span class="nroffip">CURLOPT_RESUME_FROM</span>
-<p class="level1">Pass a long as parameter. It contains the offset in number of bytes that you want the transfer to start from. Set this option to 0 to make the transfer start from the beginning (effectively disabling resume). For FTP, set this option to -1 to make the transfer start from the end of the target file (useful to continue an interrupted upload).
-<p class="level1">When doing uploads with FTP, the resume position is where in the local/source file libcurl should try to resume the upload from and it will then append the source file to the remote target file.
-<p class="level0"><a name="CURLOPTRESUMEFROMLARGE"></a><span class="nroffip">CURLOPT_RESUME_FROM_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. It contains the offset in number of bytes that you want the transfer to start from. (Added in 7.11.0)
-<p class="level0"><a name="CURLOPTCUSTOMREQUEST"></a><span class="nroffip">CURLOPT_CUSTOMREQUEST</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST when doing a FTP directory listing. This is useful for doing DELETE or other more or less obscure HTTP requests. Don't do this at will, make sure your server supports the command first.
-<p class="level1">When you change the request method by setting <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> to something, you don't actually change how libcurl behaves or acts in regards to the particular request method, it will only change the actual string sent in the request.
-<p class="level1">For example: if you tell libcurl to do a HEAD request, but then change the request to a "GET" with <a class="bold" href="#CURLOPTCUSTOMREQUEST">CURLOPT_CUSTOMREQUEST</a> you'll still see libcurl act as if it sent a HEAD even when it does send a GET.
-<p class="level1">To switch to a proper HEAD, use <a class="emphasis" href="#CURLOPTNOBODY">CURLOPT_NOBODY</a>, to switch to a proper POST, use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> or <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> and so on.
-<p class="level1">Restore to the internal default by setting this to NULL.
-<p class="level1">Many people have wrongly used this option to replace the entire request with their own, including multiple headers and POST contents. While that might work in many cases, it will cause libcurl to send invalid requests and it could possibly confuse the remote server badly. Use <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> and <a class="emphasis" href="#CURLOPTPOSTFIELDS">CURLOPT_POSTFIELDS</a> to set POST data. Use <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> to replace or extend the set of headers sent by libcurl. Use <a class="emphasis" href="#CURLOPTHTTPVERSION">CURLOPT_HTTP_VERSION</a> to change HTTP version.
-<p class="level0"><a name="CURLOPTFILETIME"></a><span class="nroffip">CURLOPT_FILETIME</span>
-<p class="level1">Pass a long. If it is 1, libcurl will attempt to get the modification date of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> function with the <span Class="emphasis">CURLINFO_FILETIME</span> argument can be used after a transfer to extract the received time (if any).
-<p class="level0"><a name="CURLOPTNOBODY"></a><span class="nroffip">CURLOPT_NOBODY</span>
-<p class="level1">A parameter set to 1 tells the library to not include the body-part in the output. This is only relevant for protocols that have separate header and body parts. On HTTP(S) servers, this will make libcurl do a HEAD request.
-<p class="level1">To change request to GET, you should use <a class="emphasis" href="#CURLOPTHTTPGET">CURLOPT_HTTPGET</a>. Change request to POST with <a class="emphasis" href="#CURLOPTPOST">CURLOPT_POST</a> etc.
-<p class="level0"><a name="CURLOPTINFILESIZE"></a><span class="nroffip">CURLOPT_INFILESIZE</span>
-<p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a long. See also <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a>.
-<p class="level1">For uploading using SCP, this option or <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a> is mandatory.
-<p class="level1">This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns.
-<p class="level0"><a name="CURLOPTINFILESIZELARGE"></a><span class="nroffip">CURLOPT_INFILESIZE_LARGE</span>
-<p class="level1">When uploading a file to a remote site, this option should be used to tell libcurl what the expected size of the infile is. This value should be passed as a curl_off_t. (Added in 7.11.0)
-<p class="level1">For uploading using SCP, this option or <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> is mandatory.
-<p class="level1">This option does not limit how much data libcurl will actually send, as that is controlled entirely by what the read callback returns.
-<p class="level0"><a name="CURLOPTUPLOAD"></a><span class="nroffip">CURLOPT_UPLOAD</span>
-<p class="level1">A parameter set to 1 tells the library to prepare for an upload. The <a class="emphasis" href="#CURLOPTREADDATA">CURLOPT_READDATA</a> and <a class="emphasis" href="#CURLOPTINFILESIZE">CURLOPT_INFILESIZE</a> or <a class="emphasis" href="#CURLOPTINFILESIZELARGE">CURLOPT_INFILESIZE_LARGE</a> options are also interesting for uploads. If the protocol is HTTP, uploading means using the PUT request unless you tell libcurl otherwise.
-<p class="level1">Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a> as usual.
-<p class="level1">If you use PUT to a HTTP 1.1 server, you can upload data without knowing the size before starting the transfer if you use chunked encoding. You enable this by adding a header like "Transfer-Encoding: chunked" with <a class="emphasis" href="#CURLOPTHTTPHEADER">CURLOPT_HTTPHEADER</a>. With HTTP 1.0 or without chunked transfer, you must specify the size.
-<p class="level0"><a name="CURLOPTMAXFILESIZE"></a><span class="nroffip">CURLOPT_MAXFILESIZE</span>
-<p class="level1">Pass a long as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
-<p class="level1">The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="CURLOPTMAXFILESIZELARGE"></a><span class="nroffip">CURLOPT_MAXFILESIZE_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. This allows you to specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and <span Class="emphasis">CURLE_FILESIZE_EXCEEDED</span> will be returned. (Added in 7.11.0)
-<p class="level1">The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this given limit. This concerns both FTP and HTTP transfers.
-<p class="level0"><a name="CURLOPTTIMECONDITION"></a><span class="nroffip">CURLOPT_TIMECONDITION</span>
-<p class="level1">Pass a long as parameter. This defines how the <a class="emphasis" href="#CURLOPTTIMEVALUE">CURLOPT_TIMEVALUE</a> time value is treated. You can set this parameter to <span Class="emphasis">CURL_TIMECOND_IFMODSINCE</span> or <span Class="emphasis">CURL_TIMECOND_IFUNMODSINCE</span>. This feature applies to HTTP, FTP, and RTSP.
-<p class="level1">The last modification time of a file is not always known and in such instances this feature will have no effect even if the given time condition would not have been met. <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with the <span Class="emphasis">CURLINFO_CONDITION_UNMET</span> option can be used after a transfer to learn if a zero-byte successful "transfer" was due to this condition not matching.
-<p class="level0"><a name="CURLOPTTIMEVALUE"></a><span class="nroffip">CURLOPT_TIMEVALUE</span>
-<p class="level1">Pass a long as parameter. This should be the time in seconds since 1 Jan 1970, and the time will be used in a condition as specified with <a class="emphasis" href="#CURLOPTTIMECONDITION">CURLOPT_TIMECONDITION</a>. <a name="CONNECTION"></a><h2 class="nroffsh">CONNECTION OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTIMEOUT"></a><span class="nroffip">CURLOPT_TIMEOUT</span>
-<p class="level1">Pass a long as parameter containing the maximum time in seconds that you allow the libcurl transfer operation to take. Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. This option will cause curl to use the SIGALRM to enable time-outing system calls.
-<p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set.
-<p class="level0"><a name="CURLOPTTIMEOUTMS"></a><span class="nroffip">CURLOPT_TIMEOUT_MS</span>
-<p class="level1">Like <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> but takes number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the transfer will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2)
-<p class="level0"><a name="CURLOPTLOWSPEEDLIMIT"></a><span class="nroffip">CURLOPT_LOW_SPEED_LIMIT</span>
-<p class="level1">Pass a long as parameter. It contains the transfer speed in bytes per second that the transfer should be below during <a class="emphasis" href="#CURLOPTLOWSPEEDTIME">CURLOPT_LOW_SPEED_TIME</a> seconds for the library to consider it too slow and abort.
-<p class="level0"><a name="CURLOPTLOWSPEEDTIME"></a><span class="nroffip">CURLOPT_LOW_SPEED_TIME</span>
-<p class="level1">Pass a long as parameter. It contains the time in seconds that the transfer should be below the <a class="emphasis" href="#CURLOPTLOWSPEEDLIMIT">CURLOPT_LOW_SPEED_LIMIT</a> for the library to consider it too slow and abort.
-<p class="level0"><a name="CURLOPTMAXSENDSPEEDLARGE"></a><span class="nroffip">CURLOPT_MAX_SEND_SPEED_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. If an upload exceeds this speed (counted in bytes per second) on cumulative average during the transfer, the transfer will pause to keep the average rate less than or equal to the parameter value. Defaults to unlimited speed. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTMAXRECVSPEEDLARGE"></a><span class="nroffip">CURLOPT_MAX_RECV_SPEED_LARGE</span>
-<p class="level1">Pass a curl_off_t as parameter. If a download exceeds this speed (counted in bytes per second) on cumulative average during the transfer, the transfer will pause to keep the average rate less than or equal to the parameter value. Defaults to unlimited speed. (Added in 7.15.5)
-<p class="level0"><a name="CURLOPTMAXCONNECTS"></a><span class="nroffip">CURLOPT_MAXCONNECTS</span>
-<p class="level1">Pass a long. The set number will be the persistent connection cache size. The set amount will be the maximum amount of simultaneously open connections that libcurl may cache in this easy handle. Default is 5, and there isn't much point in changing this value unless you are perfectly aware of how this works and changes libcurl's behaviour. This concerns connections using any of the protocols that support persistent connections.
-<p class="level1">When reaching the maximum limit, curl closes the oldest one in the cache to prevent increasing the number of open connections.
-<p class="level1">If you already have performed transfers with this curl handle, setting a smaller MAXCONNECTS than before may cause open connections to get closed unnecessarily.
-<p class="level1">If you add this easy handle to a multi handle, this setting is not acknowledged, and you must instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the <span Class="emphasis">CURLMOPT_MAXCONNECTS</span> option.
-<p class="level0"><a name="CURLOPTCLOSEPOLICY"></a><span class="nroffip">CURLOPT_CLOSEPOLICY</span>
-<p class="level1">(Obsolete) This option does nothing.
-<p class="level0"><a name="CURLOPTFRESHCONNECT"></a><span class="nroffip">CURLOPT_FRESH_CONNECT</span>
-<p class="level1">Pass a long. Set to 1 to make the next transfer use a new (fresh) connection by force. If the connection cache is full before this connection, one of the existing connections will be closed as according to the selected or default policy. This option should be used with caution and only if you understand what it does. Set this to 0 to have libcurl attempt re-using an existing connection (default behavior).
-<p class="level0"><a name="CURLOPTFORBIDREUSE"></a><span class="nroffip">CURLOPT_FORBID_REUSE</span>
-<p class="level1">Pass a long. Set to 1 to make the next transfer explicitly close the connection when done. Normally, libcurl keeps all connections alive when done with one transfer in case a succeeding one follows that can re-use them. This option should be used with caution and only if you understand what it does. Set to 0 to have libcurl keep the connection open for possible later re-use (default behavior).
-<p class="level0"><a name="CURLOPTCONNECTTIMEOUT"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT</span>
-<p class="level1">Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to disable connection timeout (it will then only timeout on the system's internal timeouts). See also the <a class="emphasis" href="#CURLOPTTIMEOUT">CURLOPT_TIMEOUT</a> option.
-<p class="level1">In unix-like systems, this might cause signals to be used unless <a class="emphasis" href="#CURLOPTNOSIGNAL">CURLOPT_NOSIGNAL</a> is set.
-<p class="level0"><a name="CURLOPTCONNECTTIMEOUTMS"></a><span class="nroffip">CURLOPT_CONNECTTIMEOUT_MS</span>
-<p class="level1">Like <a class="emphasis" href="#CURLOPTCONNECTTIMEOUT">CURLOPT_CONNECTTIMEOUT</a> but takes the number of milliseconds instead. If libcurl is built to use the standard system name resolver, that portion of the connect will still use full-second resolution for timeouts with a minimum timeout allowed of one second. (Added in 7.16.2)
-<p class="level0"><a name="CURLOPTIPRESOLVE"></a><span class="nroffip">CURLOPT_IPRESOLVE</span>
-<p class="level1">Allows an application to select what kind of IP addresses to use when resolving host names. This is only interesting when using host names that resolve addresses using more than one version of IP. The allowed values are:
-<p class="level2">
-<p class="level1"><a name="CURLIPRESOLVEWHATEVER"></a><span class="nroffip">CURL_IPRESOLVE_WHATEVER</span>
-<p class="level2">Default, resolves addresses to all IP versions that your system allows.
-<p class="level1"><a name="CURLIPRESOLVEV4"></a><span class="nroffip">CURL_IPRESOLVE_V4</span>
-<p class="level2">Resolve to IPv4 addresses.
-<p class="level1"><a name="CURLIPRESOLVEV6"></a><span class="nroffip">CURL_IPRESOLVE_V6</span>
-<p class="level2">Resolve to IPv6 addresses.
-<p class="level1">
-<p class="level0"><a name="CURLOPTCONNECTONLY"></a><span class="nroffip">CURLOPT_CONNECT_ONLY</span>
-<p class="level1">Pass a long. If the parameter equals 1, it tells the library to perform all the required proxy authentication and connection setup, but no data transfer. This option is useful only on HTTP URLs.
-<p class="level1">This option is useful with the <span Class="emphasis">CURLINFO_LASTSOCKET</span> option to <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a>. The library can set up the connection and then the application can obtain the most recently used socket for special data transfers. (Added in 7.15.2) <a name="SSL"></a><h2 class="nroffsh">SSL and SECURITY OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTSSLCERT"></a><span class="nroffip">CURLOPT_SSLCERT</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your certificate. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLCERTTYPE">CURLOPT_SSLCERTTYPE</a>.
-<p class="level1">With NSS this is the nickname of the certificate you wish to authenticate with.
-<p class="level0"><a name="CURLOPTSSLCERTTYPE"></a><span class="nroffip">CURLOPT_SSLCERTTYPE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your certificate. Supported formats are "PEM" and "DER". (Added in 7.9.3)
-<p class="level0"><a name="CURLOPTSSLKEY"></a><span class="nroffip">CURLOPT_SSLKEY</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the file name of your private key. The default format is "PEM" and can be changed with <a class="emphasis" href="#CURLOPTSSLKEYTYPE">CURLOPT_SSLKEYTYPE</a>.
-<p class="level0"><a name="CURLOPTSSLKEYTYPE"></a><span class="nroffip">CURLOPT_SSLKEYTYPE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG".
-<p class="level1">The format "ENG" enables you to load the private key from a crypto engine. In this case <a class="emphasis" href="#CURLOPTSSLKEY">CURLOPT_SSLKEY</a> is used as an identifier passed to the engine. You have to set the crypto engine with <a class="emphasis" href="#CURLOPTSSLENGINE">CURLOPT_SSLENGINE</a>. "DER" format key file currently does not work because of a bug in OpenSSL.
-<p class="level0"><a name="CURLOPTKEYPASSWD"></a><span class="nroffip">CURLOPT_KEYPASSWD</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used as the password required to use the <a class="emphasis" href="#CURLOPTSSLKEY">CURLOPT_SSLKEY</a> or <a class="emphasis" href="#CURLOPTSSHPRIVATEKEYFILE">CURLOPT_SSH_PRIVATE_KEYFILE</a> private key. You never needed a pass phrase to load a certificate but you need one to load your private key.
-<p class="level1">(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and CURLOPT_SSLCERTPASSWD up to 7.9.2)
-<p class="level0"><a name="CURLOPTSSLENGINE"></a><span class="nroffip">CURLOPT_SSLENGINE</span>
-<p class="level1">Pass a pointer to a zero terminated string as parameter. It will be used as the identifier for the crypto engine you want to use for your private key.
-<p class="level1">If the crypto device cannot be loaded, <span Class="emphasis">CURLE_SSL_ENGINE_NOTFOUND</span> is returned.
-<p class="level0"><a name="CURLOPTSSLENGINEDEFAULT"></a><span class="nroffip">CURLOPT_SSLENGINE_DEFAULT</span>
-<p class="level1">Sets the actual crypto engine as the default for (asymmetric) crypto operations.
-<p class="level1">If the crypto device cannot be set, <span Class="emphasis">CURLE_SSL_ENGINE_SETFAILED</span> is returned.
-<p class="level1">Even though this option doesn't need any parameter, in some configurations <span Class="emphasis">curl_easy_setopt</span> might be defined as a macro taking exactly three arguments. Therefore, it's recommended to pass 1 as parameter to this option.
-<p class="level0"><a name="CURLOPTSSLVERSION"></a><span class="nroffip">CURLOPT_SSLVERSION</span>
-<p class="level1">Pass a long as parameter to control what version of SSL/TLS to attempt to use. The available options are:
-<p class="level2">
-<p class="level1"><a name="CURLSSLVERSIONDEFAULT"></a><span class="nroffip">CURL_SSLVERSION_DEFAULT</span>
-<p class="level2">The default action. This will attempt to figure out the remote SSL protocol version, i.e. either SSLv3 or TLSv1 (but not SSLv2, which became disabled by default with 7.18.1).
-<p class="level1"><a name="CURLSSLVERSIONTLSv1"></a><span class="nroffip">CURL_SSLVERSION_TLSv1</span>
-<p class="level2">Force TLSv1
-<p class="level1"><a name="CURLSSLVERSIONSSLv2"></a><span class="nroffip">CURL_SSLVERSION_SSLv2</span>
-<p class="level2">Force SSLv2
-<p class="level1"><a name="CURLSSLVERSIONSSLv3"></a><span class="nroffip">CURL_SSLVERSION_SSLv3</span>
-<p class="level2">Force SSLv3
-<p class="level1">
-<p class="level0"><a name="CURLOPTSSLVERIFYPEER"></a><span class="nroffip">CURLOPT_SSL_VERIFYPEER</span>
-<p class="level1">Pass a long as parameter.
-<p class="level1">This option determines whether curl verifies the authenticity of the peer's certificate. A value of 1 means curl verifies; zero means it doesn't. The default is nonzero, but before 7.10, it was zero.
-<p class="level1">When negotiating an SSL connection, the server sends a certificate indicating its identity. Curl verifies whether the certificate is authentic, i.e. that you can trust that the server is who the certificate says it is. This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates you supply. As of 7.10, curl installs a default bundle of CA certificates and you can specify alternate certificates with the <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> option or the <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> option.
-<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is nonzero, and the verification fails to prove that the certificate is authentic, the connection fails. When the option is zero, the connection succeeds regardless.
-<p class="level1">Authenticating the certificate is not by itself very useful. You typically want to ensure that the server, as authentically identified by its certificate, is the server you mean to be talking to. Use <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> to control that.
-<p class="level0"><a name="CURLOPTCAINFO"></a><span class="nroffip">CURLOPT_CAINFO</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file holding one or more certificates to verify the peer with. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAINFO">CURLOPT_CAINFO</a> need not even indicate an accessible file.
-<p class="level1">This option is by default set to the system path where libcurl's cacert bundle is assumed to be stored, as established at build time.
-<p class="level1">When built against NSS, this is the directory that the NSS certificate database resides in.
-<p class="level0"><a name="CURLOPTISSUERCERT"></a><span class="nroffip">CURLOPT_ISSUERCERT</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file holding a CA certificate in PEM format. If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree.
-<p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. Otherwise, the result of the check is not considered as failure.
-<p class="level1">A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (<a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> has to be set too for the check to fail). (Added in 7.19.0)
-<p class="level0"><a name="CURLOPTCAPATH"></a><span class="nroffip">CURLOPT_CAPATH</span>
-<p class="level1">Pass a char * to a zero terminated string naming a directory holding multiple CA certificates to verify the peer with. The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option. If <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> need not even indicate an accessible path. The <a class="emphasis" href="#CURLOPTCAPATH">CURLOPT_CAPATH</a> function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
-<p class="level0"><a name="CURLOPTCRLFILE"></a><span class="nroffip">CURLOPT_CRLFILE</span>
-<p class="level1">Pass a char * to a zero terminated string naming a file with the concatenation of CRL (in PEM format) to use in the certificate validation that occurs during the SSL exchange.
-<p class="level1">When curl is built to use NSS or GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. When libcurl is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed.
-<p class="level1">This option makes sense only when used in combination with the <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> option.
-<p class="level1">A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. A failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. (Added in 7.19.0)
-<p class="level0"><a name="CURLOPTCERTINFO"></a><span class="nroffip">CURLOPT_CERTINFO</span>
-<p class="level1">Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With this enabled, libcurl (if built with OpenSSL) will extract lots of information and data about the certificates in the certificate chain used in the SSL connection. This data is then possible to extract after a transfer using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> and its option <span Class="emphasis">CURLINFO_CERTINFO</span>. (Added in 7.19.1)
-<p class="level0"><a name="CURLOPTRANDOMFILE"></a><span class="nroffip">CURLOPT_RANDOM_FILE</span>
-<p class="level1">Pass a char * to a zero terminated file name. The file will be used to read from to seed the random engine for SSL. The more random the specified file is, the more secure the SSL connection will become.
-<p class="level0"><a name="CURLOPTEGDSOCKET"></a><span class="nroffip">CURLOPT_EGDSOCKET</span>
-<p class="level1">Pass a char * to the zero terminated path name to the Entropy Gathering Daemon socket. It will be used to seed the random engine for SSL.
-<p class="level0"><a name="CURLOPTSSLVERIFYHOST"></a><span class="nroffip">CURLOPT_SSL_VERIFYHOST</span>
-<p class="level1">Pass a long as parameter.
-<p class="level1">This option determines whether libcurl verifies that the server cert is for the server it is known as.
-<p class="level1">When negotiating a SSL connection, the server sends a certificate indicating its identity.
-<p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails.
-<p class="level1">Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect.
-<p class="level1">When the value is 1, the certificate must contain a Common Name field, but it doesn't matter what name it says. (This is not ordinarily a useful setting).
-<p class="level1">When the value is 0, the connection succeeds regardless of the names in the certificate.
-<p class="level1">The default, since 7.10, is 2.
-<p class="level1">This option controls checking the server's claimed identity. The server could be lying. To control lying, see <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a>.
-<p class="level0"><a name="CURLOPTSSLCIPHERLIST"></a><span class="nroffip">CURLOPT_SSL_CIPHER_LIST</span>
-<p class="level1">Pass a char *, pointing to a zero terminated string holding the list of ciphers to use for the SSL connection. The list must be syntactically correct, it consists of one or more cipher strings separated by colons. Commas or spaces are also acceptable separators but colons are normally used, !, - and + can be used as operators.
-<p class="level1">For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA', ´SHA1+DES´, 'TLSv1' and 'DEFAULT'. The default list is normally set when you compile OpenSSL.
-<p class="level1">You'll find more details about cipher lists on this URL: <span Class="emphasis"><a href="http://www.openssl.org/docs/apps/ciphers.html">http://www.openssl.org/docs/apps/ciphers.html</a></span>
-<p class="level1">For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5', ´rsa_aes_128_sha´, etc. With NSS you don't add/remove ciphers. If one uses this option then all known ciphers are disabled and only those passed in are enabled.
-<p class="level1">You'll find more details about the NSS cipher lists on this URL: <span Class="emphasis"><a href="http://directory.fedora.redhat.com/docs/mod_nss.html">http://directory.fedora.redhat.com/docs/mod_nss.html</a>#Directives</span>
-<p class="level1">
-<p class="level0"><a name="CURLOPTSSLSESSIONIDCACHE"></a><span class="nroffip">CURLOPT_SSL_SESSIONID_CACHE</span>
-<p class="level1">Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set this to 1 to enable it. By default all transfers are done using the cache. While nothing ever should get hurt by attempting to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed. (Added in 7.16.0)
-<p class="level0"><a name="CURLOPTKRBLEVEL"></a><span class="nroffip">CURLOPT_KRBLEVEL</span>
-<p class="level1">Pass a char * as parameter. Set the kerberos security level for FTP; this also enables kerberos awareness. This is a string, 'clear', 'safe', 'confidential' or 'private'. If the string is set but doesn't match one of these, 'private' will be used. Set the string to NULL to disable kerberos support for FTP.
-<p class="level1">(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3) <a name="SSH"></a><h2 class="nroffsh">SSH OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTSSHAUTHTYPES"></a><span class="nroffip">CURLOPT_SSH_AUTH_TYPES</span>
-<p class="level1">Pass a long set to a bitmask consisting of one or more of CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHHOSTPUBLICKEYMD5"></a><span class="nroffip">CURLOPT_SSH_HOST_PUBLIC_KEY_MD5</span>
-<p class="level1">Pass a char * pointing to a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, and libcurl will reject the connection to the host unless the md5sums match. This option is only for SCP and SFTP transfers. (Added in 7.17.1)
-<p class="level0"><a name="CURLOPTSSHPUBLICKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PUBLIC_KEYFILE</span>
-<p class="level1">Pass a char * pointing to a file name for your public key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa.pub</span>. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHPRIVATEKEYFILE"></a><span class="nroffip">CURLOPT_SSH_PRIVATE_KEYFILE</span>
-<p class="level1">Pass a char * pointing to a file name for your private key. If not used, libcurl defaults to using <span Class="bold">~/.ssh/id_dsa</span>. If the file is password-protected, set the password with <a class="emphasis" href="#CURLOPTKEYPASSWD">CURLOPT_KEYPASSWD</a>. (Added in 7.16.1)
-<p class="level0"><a name="CURLOPTSSHKNOWNHOSTS"></a><span class="nroffip">CURLOPT_SSH_KNOWNHOSTS</span>
-<p class="level1">Pass a pointer to a zero terminated string holding the file name of the known_host file to use. The known_hosts file should use the OpenSSH file format as supported by libssh2. If this file is specified, libcurl will only accept connections with hosts that are known and present in that file, with a matching public key. Use <a class="emphasis" href="#CURLOPTSSHKEYFUNCTION">CURLOPT_SSH_KEYFUNCTION</a> to alter the default behavior on host and key (mis)matching. (Added in 7.19.6)
-<p class="level0"><a name="CURLOPTSSHKEYFUNCTION"></a><span class="nroffip">CURLOPT_SSH_KEYFUNCTION</span>
-<p class="level1">Pass a pointer to a curl_sshkeycallback function. It gets called when the known_host matching has been done, to allow the application to act and decide for libcurl how to proceed. It gets passed the CURL handle, the key from the known_hosts file, the key from the remote site, info from libcurl on the matching status and a custom pointer (set with <a class="emphasis" href="#CURLOPTSSHKEYDATA">CURLOPT_SSH_KEYDATA</a>). It MUST return one of the following return codes to tell libcurl how to act:
-<p class="level2">
-<p class="level1"><a name="CURLKHSTATFINEADDTOFILE"></a><span class="nroffip">CURLKHSTAT_FINE_ADD_TO_FILE</span>
-<p class="level2">The host+key is accepted and libcurl will append it to the known_hosts file before continuing with the connection. This will also add the host+key combo to the known_host pool kept in memory if it wasn't already present there. The adding of data to the file is done by completely replacing the file with a new copy, so the permissions of the file must allow this.
-<p class="level1"><a name="CURLKHSTATFINE"></a><span class="nroffip">CURLKHSTAT_FINE</span>
-<p class="level2">The host+key is accepted libcurl will continue with the connection. This will also add the host+key combo to the known_host pool kept in memory if it wasn't already present there.
-<p class="level1"><a name="CURLKHSTATREJECT"></a><span class="nroffip">CURLKHSTAT_REJECT</span>
-<p class="level2">The host+key is rejected. libcurl will deny the connection to continue and it will be closed.
-<p class="level1"><a name="CURLKHSTATDEFER"></a><span class="nroffip">CURLKHSTAT_DEFER</span>
-<p class="level2">The host+key is rejected, but the SSH connection is asked to be kept alive. This feature could be used when the app wants to somehow return back and act on the host+key situation and then retry without needing the overhead of setting it up from scratch again.
-<p class="level1"> (Added in 7.19.6)
-<p class="level0"><a name="CURLOPTSSHKEYDATA"></a><span class="nroffip">CURLOPT_SSH_KEYDATA</span>
-<p class="level1">Pass a void * as parameter. This pointer will be passed along verbatim to the callback set with <a class="emphasis" href="#CURLOPTSSHKEYFUNCTION">CURLOPT_SSH_KEYFUNCTION</a>. (Added in 7.19.6) <a name="OTHER"></a><h2 class="nroffsh">OTHER OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTPRIVATE"></a><span class="nroffip">CURLOPT_PRIVATE</span>
-<p class="level1">Pass a void * as parameter, pointing to data that should be associated with this curl handle. The pointer can subsequently be retrieved using <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> with the CURLINFO_PRIVATE option. libcurl itself does nothing with this data. (Added in 7.10.3)
-<p class="level0"><a name="CURLOPTSHARE"></a><span class="nroffip">CURLOPT_SHARE</span>
-<p class="level1">Pass a share handle as a parameter. The share handle must have been created by a previous call to <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>. Setting this option, will make this curl handle use the data from the shared handle instead of keeping the data to itself. This enables several curl handles to share data. If the curl handles are used simultaneously in multiple threads, you <span Class="bold">MUST</span> use the locking methods in the share handle. See <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a> for details.
-<p class="level1">If you add a share that is set to share cookies, your easy handle will use that cookie cache and get the cookie engine enabled. If you unshare an object that was using cookies (or change to another object that doesn't share cookies), the easy handle will get its cookie engine disabled.
-<p class="level1">Data that the share object is not set to share will be dealt with the usual way, as if no share was used.
-<p class="level0"><a name="CURLOPTNEWFILEPERMS"></a><span class="nroffip">CURLOPT_NEW_FILE_PERMS</span>
-<p class="level1">Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created files on the remote server. The default value is <span Class="emphasis">0644</span>, but any valid value can be used. The only protocols that can use this are <span Class="emphasis">sftp://</span>, <span Class="emphasis">scp://</span>, and <span Class="emphasis">file://</span>. (Added in 7.16.4)
-<p class="level0"><a name="CURLOPTNEWDIRECTORYPERMS"></a><span class="nroffip">CURLOPT_NEW_DIRECTORY_PERMS</span>
-<p class="level1">Pass a long as a parameter, containing the value of the permissions that will be assigned to newly created directories on the remote server. The default value is <span Class="emphasis">0755</span>, but any valid value can be used. The only protocols that can use this are <span Class="emphasis">sftp://</span>, <span Class="emphasis">scp://</span>, and <span Class="emphasis">file://</span>. (Added in 7.16.4) <a name="TELNET"></a><h2 class="nroffsh">TELNET OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLOPTTELNETOPTIONS"></a><span class="nroffip">CURLOPT_TELNETOPTIONS</span>
-<p class="level1">Provide a pointer to a curl_slist with variables to pass to the telnet negotiations. The variables should be in the format <option=value>. libcurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET standard for details. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis"><curl/curl.h></span> defines. See the <span Class="emphasis">libcurl-errors(3)</span> man page for the full list with descriptions.
-<p class="level0">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 <span Class="emphasis">CURLE_FAILED_INIT</span>. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_init.html">curl_easy_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_reset.html"> curl_easy_reset (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_setopt.pdf b/docs/libcurl/curl_easy_setopt.pdf
deleted file mode 100644
index 9723fb1..0000000
--- a/docs/libcurl/curl_easy_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_strerror.3 b/docs/libcurl/curl_easy_strerror.3
index 1afbd12..557d467 100644
--- a/docs/libcurl/curl_easy_strerror.3
+++ b/docs/libcurl/curl_easy_strerror.3
@@ -1,16 +1,37 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_easy_strerror - return string describing error code
.SH SYNOPSIS
-.nf
-.B #include <curl/curl.h>
-.BI "const char *curl_easy_strerror(CURLcode " errornum ");"
+#include <curl/curl.h>
+
+const char *curl_easy_strerror(CURLcode errornum);
.SH DESCRIPTION
-The curl_easy_strerror() function returns a string describing the CURLcode
-error code passed in the argument \fIerrornum\fP.
+The \fIcurl_easy_strerror(3)\fP function returns a string describing the
+CURLcode error code passed in the argument \fIerrornum\fP.
+
+Typically applications also appreciate \fICURLOPT_ERRORBUFFER(3)\fP for more
+specific error descriptions generated at run-time.
.SH AVAILABILITY
This function was added in libcurl 7.12.0
.SH RETURN VALUE
diff --git a/docs/libcurl/curl_easy_strerror.html b/docs/libcurl/curl_easy_strerror.html
deleted file mode 100644
index 1dcca6c..0000000
--- a/docs/libcurl/curl_easy_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_easy_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<span Class="bold">const char *curl_easy_strerror(CURLcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_easy_strerror() function returns a string describing the CURLcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_multi_strerror.html"> curl_multi_strerror (3)</a> <a class="manpage" href="./curl_share_strerror.html"> curl_share_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_strerror.pdf b/docs/libcurl/curl_easy_strerror.pdf
deleted file mode 100644
index ae50e6e..0000000
--- a/docs/libcurl/curl_easy_strerror.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3
index 9b03fd0..23ce9c3 100644
--- a/docs/libcurl/curl_easy_unescape.3
+++ b/docs/libcurl/curl_easy_unescape.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -48,4 +48,4 @@
.SH RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
.SH "SEE ALSO"
-.I curl_easy_escape(3), curl_free(3), RFC 2396
+.BR curl_easy_escape "(3), " curl_free "(3)," RFC 3986
diff --git a/docs/libcurl/curl_easy_unescape.html b/docs/libcurl/curl_easy_unescape.html
deleted file mode 100644
index 3844862..0000000
--- a/docs/libcurl/curl_easy_unescape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_easy_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_easy_unescape - URL decodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_easy_unescape( CURL * curl , char * url , int inlength</span> <span Class="bold">, int * outlength );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function converts the given URL encoded input string to a "plain string" and returns that in an allocated memory area. All input characters that are URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to their binary versions.
-<p class="level0">If the <span Class="bold">length</span> argument is set to 0 (zero), <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> will use strlen() on the input <span Class="emphasis">url</span> string to find out the size.
-<p class="level0">If <span Class="bold">outlength</span> is non-NULL, the function will write the length of the returned string in the integer it points to. This allows an escaped string containing %00 to still get used properly after unescaping.
-<p class="level0">You must <a class="emphasis" href="./curl_free.html">curl_free(3)</a> the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Added in 7.15.4 and replaces the old <a class="emphasis" href="./curl_unescape.html">curl_unescape(3)</a> function. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_free(3), RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_easy_unescape.pdf b/docs/libcurl/curl_easy_unescape.pdf
deleted file mode 100644
index 9c06ecd..0000000
--- a/docs/libcurl/curl_easy_unescape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_escape.3 b/docs/libcurl/curl_escape.3
index 5990615..75fd51f 100644
--- a/docs/libcurl/curl_escape.3
+++ b/docs/libcurl/curl_escape.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
.SH NAME
curl_escape - URL encodes the given string
diff --git a/docs/libcurl/curl_escape.html b/docs/libcurl/curl_escape.html
deleted file mode 100644
index 4e1c6ff..0000000
--- a/docs/libcurl/curl_escape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_escape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_escape - URL encodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_escape( char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Obsolete function. Use <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> instead!
-<p class="level0">This function will convert the given input string to an URL encoded string and return that as a new allocated string. All input characters that are not a-z, A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a two-digit hexadecimal number).
-<p class="level0">If the 'length' argument is set to 0, curl_escape() will use strlen() on the input 'url' string to find out the size.
-<p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_escape.html">curl_easy_escape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_unescape.html">curl_unescape (3)</a> <a class="manpage" href="./curl_free.html"> curl_free (3)</a> <span Class="manpage"> RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_escape.pdf b/docs/libcurl/curl_escape.pdf
deleted file mode 100644
index f8b8613..0000000
--- a/docs/libcurl/curl_escape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formadd.3 b/docs/libcurl/curl_formadd.3
index 06757ed..3e48149 100644
--- a/docs/libcurl/curl_formadd.3
+++ b/docs/libcurl/curl_formadd.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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
@@ -12,21 +30,22 @@
.ad
.SH DESCRIPTION
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 \fBCURLOPT_HTTPPOST\fP.
-\fIlastitem\fP is set after each call and on repeated invokes it should be
-left as set to allow repeated invokes to find the end of the list faster.
+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 \fBCURLOPT_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 \fI*firstitem\fP and \fI*lastitem\fP should both be pointing to
+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 after the form post
-has been done to free the resources.
+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\fP as usual.
+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
@@ -67,6 +86,10 @@
.IP CURLFORM_CONTENTSLENGTH
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
@@ -102,12 +125,13 @@
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\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. (Option added in libcurl 7.18.2)
+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. (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
@@ -123,7 +147,7 @@
problems.
When you've passed the HttpPost pointer to \fIcurl_easy_setopt(3)\fP (using
-the \fICURLOPT_HTTPPOST\fP option), you must not free the list until after
+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.
diff --git a/docs/libcurl/curl_formadd.html b/docs/libcurl/curl_formadd.html
deleted file mode 100644
index f6557db..0000000
--- a/docs/libcurl/curl_formadd.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<html><head>
-<title>curl_formadd man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formadd - add a section to a multipart/formdata HTTP POST <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLFORMcode curl_formadd(struct curl_httppost ** firstitem,</span> <span Class="bold">struct curl_httppost ** lastitem, ...);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">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 <span Class="emphasis">firstitem</span> pointer as parameter to <span Class="bold">CURLOPT_HTTPPOST</span>. <span Class="emphasis">lastitem</span> is set after each call and on repeated invokes it should be left as set to allow repeated invokes to find the end of the list faster.
-<p class="level0">After the <span Class="emphasis">lastitem</span> pointer follow the real arguments.
-<p class="level0">The pointers <span Class="emphasis">*firstitem</span> and <span Class="emphasis">*lastitem</span> 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 <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a> after the form post has been done to free the resources.
-<p class="level0">Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. You can disable this header with <span Class="emphasis">CURLOPT_HTTPHEADER</span> as usual.
-<p class="level0">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.
-<p class="level0">The options listed first are for making normal parts. The options from <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a> through <a class="emphasis" href="#CURLFORMBUFFERLENGTH">CURLFORM_BUFFERLENGTH</a> are for file upload parts. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLFORMCOPYNAME"></a><span class="nroffip">CURLFORM_COPYNAME</span>
-<p class="level1">followed by a string which provides the <span Class="emphasis">name</span> 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 <span Class="bold">CURLFORM_NAMELENGTH</span>. The copied data will be freed by <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a>.
-<p class="level0"><a name="CURLFORMPTRNAME"></a><span class="nroffip">CURLFORM_PTRNAME</span>
-<p class="level1">followed by a string which provides the <span Class="emphasis">name</span> 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 <span Class="bold">CURLFORM_NAMELENGTH</span>.
-<p class="level0"><a name="CURLFORMCOPYCONTENTS"></a><span class="nroffip">CURLFORM_COPYCONTENTS</span>
-<p class="level1">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 <a class="bold" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a>. The copied data will be freed by <a class="emphasis" href="./curl_formfree.html">curl_formfree(3)</a>.
-<p class="level0"><a name="CURLFORMPTRCONTENTS"></a><span class="nroffip">CURLFORM_PTRCONTENTS</span>
-<p class="level1">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 <a class="bold" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a>.
-<p class="level0"><a name="CURLFORMCONTENTSLENGTH"></a><span class="nroffip">CURLFORM_CONTENTSLENGTH</span>
-<p class="level1">followed by a long giving the length of the contents. Note that for <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a> contents, this option is mandatory.
-<p class="level0"><a name="CURLFORMFILECONTENT"></a><span class="nroffip">CURLFORM_FILECONTENT</span>
-<p class="level1">followed by a filename, causes that file to be read and its contents used as data in this part. This part does <span Class="emphasis">not</span> automatically become a file upload part simply because its data was read from a file.
-<p class="level0"><a name="CURLFORMFILE"></a><span class="nroffip">CURLFORM_FILE</span>
-<p class="level1">followed by a filename, makes this part a file upload part. It sets the <span Class="emphasis">filename</span> 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 <a class="bold" href="#CURLFORMFILE">CURLFORM_FILE</a> the user may send one or more files in one part by providing multiple <a class="bold" href="#CURLFORMFILE">CURLFORM_FILE</a> arguments each followed by the filename (and each <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a> is allowed to have a <a class="emphasis" href="#CURLFORMCONTENTTYPE">CURLFORM_CONTENTTYPE</a>).
-<p class="level0"><a name="CURLFORMCONTENTTYPE"></a><span class="nroffip">CURLFORM_CONTENTTYPE</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. Followed by a pointer to a string which provides the content-type for this part, possibly instead of an internally chosen one.
-<p class="level0"><a name="CURLFORMFILENAME"></a><span class="nroffip">CURLFORM_FILENAME</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. Followed by a pointer to a string, it tells libcurl to use the given string as the <span Class="emphasis">filename</span> in the file upload part instead of the actual file name.
-<p class="level0"><a name="CURLFORMBUFFER"></a><span class="nroffip">CURLFORM_BUFFER</span>
-<p class="level1">is used for custom file upload parts without use of <a class="emphasis" href="#CURLFORMFILE">CURLFORM_FILE</a>. It tells libcurl that the file contents are already present in a buffer. The parameter is a string which provides the <span Class="emphasis">filename</span> field in the content header.
-<p class="level0"><a name="CURLFORMBUFFERPTR"></a><span class="nroffip">CURLFORM_BUFFERPTR</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMBUFFER">CURLFORM_BUFFER</a>. The parameter is a pointer to the buffer to be uploaded. This buffer must not be freed until after <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. You must also use <a class="emphasis" href="#CURLFORMBUFFERLENGTH">CURLFORM_BUFFERLENGTH</a> to set the number of bytes in the buffer.
-<p class="level0"><a name="CURLFORMBUFFERLENGTH"></a><span class="nroffip">CURLFORM_BUFFERLENGTH</span>
-<p class="level1">is used in combination with <a class="emphasis" href="#CURLFORMBUFFER">CURLFORM_BUFFER</a>. The parameter is a long which gives the length of the buffer.
-<p class="level0"><a name="CURLFORMSTREAM"></a><span class="nroffip">CURLFORM_STREAM</span>
-<p class="level1">Tells libcurl to use the <span Class="emphasis">CURLOPT_READFUNCTION</span> callback to get data. The parameter you pass to <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a> 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 <a class="emphasis" href="#CURLFORMFILENAME">CURLFORM_FILENAME</a> parameter as well. Note that when using <a class="emphasis" href="#CURLFORMSTREAM">CURLFORM_STREAM</a>, <a class="emphasis" href="#CURLFORMCONTENTSLENGTH">CURLFORM_CONTENTSLENGTH</a> must also be set with the total expected length of the part. (Option added in libcurl 7.18.2)
-<p class="level0"><a name="CURLFORMARRAY"></a><span class="nroffip">CURLFORM_ARRAY</span>
-<p class="level1">Another possibility to send options to curl_formadd() is the <a class="bold" href="#CURLFORMARRAY">CURLFORM_ARRAY</a> 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 <span Class="bold">CURLFORM_END</span>.
-<p class="level0"><a name="CURLFORMCONTENTHEADER"></a><span class="nroffip">CURLFORM_CONTENTHEADER</span>
-<p class="level1">specifies extra headers for the form POST section. This takes a curl_slist prepared in the usual way using <span Class="bold">curl_slist_append</span> 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.
-<p class="level1">When you've passed the HttpPost pointer to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> (using the <span Class="emphasis">CURLOPT_HTTPPOST</span> option), you must not free the list until after you've called <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> for the curl handle.
-<p class="level1">See example below. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred corresponding to a CURL_FORMADD_* constant defined in <span Class="emphasis"><curl/curl.h></span> <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0"><p class="level0"> 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';
- <p class="level0"> /* Add simple name/content section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
- CURLFORM_COPYCONTENTS, "content", CURLFORM_END);
- <p class="level0"> /* Add simple name/content/contenttype section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "htmlcode",
- CURLFORM_COPYCONTENTS, "<HTML></HTML>",
- CURLFORM_CONTENTTYPE, "text/html", CURLFORM_END);
- <p class="level0"> /* Add name/ptrcontent section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "name_for_ptrcontent",
- CURLFORM_PTRCONTENTS, buffer, CURLFORM_END);
- <p class="level0"> /* Add ptrname/ptrcontent section */
- curl_formadd(&post, &last, CURLFORM_PTRNAME, namebuffer,
- CURLFORM_PTRCONTENTS, buffer, CURLFORM_NAMELENGTH,
- namelength, CURLFORM_END);
- <p class="level0"> /* 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);
- <p class="level0"> /* Add simple file section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
- CURLFORM_FILE, "my-face.jpg", CURLFORM_END);
- <p class="level0"> /* Add file/contenttype section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "picture",
- CURLFORM_FILE, "my-face.jpg",
- CURLFORM_CONTENTTYPE, "image/jpeg", CURLFORM_END);
- <p class="level0"> /* Add two file section */
- curl_formadd(&post, &last, CURLFORM_COPYNAME, "pictures",
- CURLFORM_FILE, "my-face.jpg",
- CURLFORM_FILE, "your-face.jpg", CURLFORM_END);
- <p class="level0"> /* 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;
- <p class="level0"> /* Add a buffer to upload */
- curl_formadd(&post, &last,
- CURLFORM_COPYNAME, "name",
- CURLFORM_BUFFER, "data",
- CURLFORM_BUFFERPTR, record,
- CURLFORM_BUFFERLENGTH, record_length,
- CURLFORM_END);
- <p class="level0"> /* 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);
- <p class="level0"></pre>
-<a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_easy_setopt.html">curl_easy_setopt (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_formfree.html">curl_formfree (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formadd.pdf b/docs/libcurl/curl_formadd.pdf
deleted file mode 100644
index b5b31a8..0000000
--- a/docs/libcurl/curl_formadd.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formfree.3 b/docs/libcurl/curl_formfree.3
index 2fba295..fd19491 100644
--- a/docs/libcurl/curl_formfree.3
+++ b/docs/libcurl/curl_formfree.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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
@@ -13,6 +31,13 @@
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
+\fBCURLOPT_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 RETURN VALUE
None
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_formfree.html b/docs/libcurl/curl_formfree.html
deleted file mode 100644
index 73837b0..0000000
--- a/docs/libcurl/curl_formfree.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head>
-<title>curl_formfree man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formfree - free a previously build multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_formfree(struct curl_httppost * form);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formfree() is used to clean up data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. This must be called when the data has been used, which typically means after <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> has been called. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">None <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formfree.pdf b/docs/libcurl/curl_formfree.pdf
deleted file mode 100644
index f03fae9..0000000
--- a/docs/libcurl/curl_formfree.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_formget.3 b/docs/libcurl/curl_formget.3
index b0dd8fe..b526221 100644
--- a/docs/libcurl/curl_formget.3
+++ b/docs/libcurl/curl_formget.3
@@ -1,28 +1,49 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/curl.h>
-.sp
-.BI "void curl_formget(struct curl_httppost *" form, " void *" arg,
-.BI " curl_formget_callback " append ");"
-.ad
+
+void 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 which will be
-passed to the curl_formget_callback function.
+\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 *" arg, " const char *" buf,
+.BI "typedef size_t (*curl_formget_callback)(void *" userp, " const char *" buf,
.BI " size_t " len ");"
-.nf
The curl_formget_callback will be executed for each part of the HTTP POST
-chain. The void *arg pointer will be the one passed as second argument to
-curl_formget(). The character buffer passed to it must not be freed. The
+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
@@ -34,6 +55,7 @@
(*(size_t *) arg) += len;
return len;
}
+
size_t print_httppost(struct curl_httppost *post)
{
size_t total_size = 0;
diff --git a/docs/libcurl/curl_formget.html b/docs/libcurl/curl_formget.html
deleted file mode 100644
index 0564f61..0000000
--- a/docs/libcurl/curl_formget.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html><head>
-<title>curl_formget man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_formget - serialize a previously built multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_formget(struct curl_httppost * form, void * arg,</span> <span Class="bold"> curl_formget_callback append );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_formget() is used to serialize data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Accepts a void pointer as second argument which will be passed to the curl_formget_callback function.
-<p class="level0"><span Class="bold">typedef size_t (*curl_formget_callback)(void * arg, const char * buf,</span> <span Class="bold"> size_t len );</span> <pre>
-<p class="level0"><p class="level0">The curl_formget_callback will be executed for each part of the HTTP POST
- chain. The void *arg pointer will be the one passed as second argument to
- curl_formget(). The character buffer passed to it must not be freed. The
- callback should return the buffer length passed to it on success.
- </pre>
-<a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">0 means everything was ok, non-zero means an error occurred <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0"><p class="level0"> 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;
- }
- </pre>
-<a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.5 <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_formget.pdf b/docs/libcurl/curl_formget.pdf
deleted file mode 100644
index 2012031..0000000
--- a/docs/libcurl/curl_formget.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_free.3 b/docs/libcurl/curl_free.3
index f854693..9e5570f 100644
--- a/docs/libcurl/curl_free.3
+++ b/docs/libcurl/curl_free.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
.SH NAME
curl_free - reclaim memory that has been obtained through a libcurl call
@@ -11,7 +29,7 @@
.ad
.SH DESCRIPTION
curl_free reclaims memory that has been obtained through a libcurl call. Use
-curl_free() instead of free() to avoid anomalies that can result from
+\fIcurl_free(3)\fP instead of free() to avoid anomalies that can result from
differences in memory management between your application and libcurl.
.SH "SEE ALSO"
-.I curl_unescape(3)
+.BR curl_easy_unescape "(3), " curl_easy_escape "(3) "
diff --git a/docs/libcurl/curl_free.html b/docs/libcurl/curl_free.html
deleted file mode 100644
index 4bffdc1..0000000
--- a/docs/libcurl/curl_free.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head>
-<title>curl_free man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_free - reclaim memory that has been obtained through a libcurl call <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_free( char * ptr );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_free reclaims memory that has been obtained through a libcurl call. Use curl_free() instead of free() to avoid anomalies that can result from differences in memory management between your application and libcurl. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="emphasis" href="./curl_unescape.html">curl_unescape(3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_free.pdf b/docs/libcurl/curl_free.pdf
deleted file mode 100644
index 202b34a..0000000
--- a/docs/libcurl/curl_free.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_getdate.3 b/docs/libcurl/curl_getdate.3
index 73cd3ef..2e7d7aa 100644
--- a/docs/libcurl/curl_getdate.3
+++ b/docs/libcurl/curl_getdate.3
@@ -1,24 +1,37 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
.SH NAME
-curl_getdate - Convert a date string to number of seconds since January 1,
-1970
+curl_getdate - Convert a date string to number of seconds
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "time_t curl_getdate(char *" datestring ", time_t *"now " );"
.ad
.SH DESCRIPTION
-This function returns the number of seconds since January 1st 1970 in the UTC
-time zone, for the date and time that the \fIdatestring\fP parameter
-specifies. The \fInow\fP parameter is not used, pass a NULL there.
-
-\fBNOTE:\fP This function was rewritten for the 7.12.2 release and this
-documentation covers the functionality of the new one. The new one is not
-feature-complete with the old one, but most of the formats supported by the
-new one was supported by the old too.
+\fIcurl_getdate(3)\fP returns the number of seconds since the Epoch, January
+1st 1970 00:00:00 in the UTC time zone, for the date and time that the
+\fIdatestring\fP parameter specifies. The \fInow\fP parameter is not used,
+pass a NULL there.
.SH PARSING DATES AND TIMES
A "date" is a string containing several items separated by whitespace. The
order of the items is immaterial. A date string may contain many flavors of
@@ -78,7 +91,7 @@
This parser was written to handle date formats specified in RFC 822 (including
the update in RFC 1123) using time zone name or time zone delta and RFC 850
(obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the
-only ones RFC2616 says HTTP applications may use.
+only ones RFC 7231 says HTTP applications may use.
.SH RETURN VALUE
This function returns -1 when it fails to parse the date string. Otherwise it
returns the number of seconds as described.
@@ -89,11 +102,7 @@
Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC,
January 19, 2038 will work fine. On systems with a 64 bit time_t but with a
-crippled mktime(), \fIcurl_getdate\fP will return -1 in this case.
-.SH REWRITE
-The former version of this function was built with yacc and was not only very
-large, it was also never quite understood and it wasn't possible to build with
-non-GNU tools since only GNU Bison could make it thread-safe!
-
-The rewrite was done for 7.12.2. The new one is much smaller and uses simpler
-code.
+crippled mktime(), \fIcurl_getdate(3)\fP will return -1 in this case.
+.SH "SEE ALSO"
+.BR curl_easy_escape "(3), " curl_easy_unescape "(3), "
+.BR CURLOPT_TIMECONDITION "(3), " CURLOPT_TIMEVALUE "(3) "
diff --git a/docs/libcurl/curl_getdate.html b/docs/libcurl/curl_getdate.html
deleted file mode 100644
index cd1612d..0000000
--- a/docs/libcurl/curl_getdate.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<html><head>
-<title>curl_getdate man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_getdate - Convert a date string to number of seconds since January 1, 1970 <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">time_t curl_getdate(char * datestring , time_t *now );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns the number of seconds since January 1st 1970 in the UTC time zone, for the date and time that the <span Class="emphasis">datestring</span> parameter specifies. The <span Class="emphasis">now</span> parameter is not used, pass a NULL there.
-<p class="level0"><span Class="bold">NOTE:</span> This function was rewritten for the 7.12.2 release and this documentation covers the functionality of the new one. The new one is not feature-complete with the old one, but most of the formats supported by the new one was supported by the old too. <a name="PARSING"></a><h2 class="nroffsh">PARSING DATES AND TIMES</h2>
-<p class="level0">A "date" is a string containing several items separated by whitespace. The order of the items is immaterial. A date string may contain many flavors of items:
-<p class="level0"><span Class="bold">calendar date items</span> Can be specified several ways. Month names can only be three-letter english abbreviations, numbers can be zero-prefixed and the year may use 2 or 4 digits. Examples: 06 Nov 1994, 06-Nov-94 and Nov-94 6.
-<p class="level0"><span Class="bold">time of the day items</span> This string specifies the time on a given day. You must specify it with 6 digits with two colons: HH:MM:SS. To not include the time in a date string, will make the function assume 00:00:00. Example: 18:19:21.
-<p class="level0"><span Class="bold">time zone items</span> Specifies international time zone. There are a few acronyms supported, but in general you should instead use the specific relative time compared to UTC. Supported formats include: -1200, MST, +0100.
-<p class="level0"><span Class="bold">day of the week items</span> Specifies a day of the week. Days of the week may be spelled out in full (using english): `Sunday', `Monday', etc or they may be abbreviated to their first three letters. This is usually not info that adds anything.
-<p class="level0"><span Class="bold">pure numbers</span> If a decimal number of the form YYYYMMDD appears, then YYYY is read as the year, MM as the month number and DD as the day of the month, for the specified calendar date.
-<p class="level0"><a name="EXAMPLES"></a><h2 class="nroffsh">EXAMPLES</h2>
-<p class="level0"><pre>
-<p class="level0">Sun, 06 Nov 1994 08:49:37 GMT
- Sunday, 06-Nov-94 08:49:37 GMT
- Sun Nov 6 08:49:37 1994
- 06 Nov 1994 08:49:37 GMT
- 06-Nov-94 08:49:37 GMT
- Nov 6 08:49:37 1994
- 06 Nov 1994 08:49:37
- 06-Nov-94 08:49:37
- 1994 Nov 6 08:49:37
- GMT 08:49:37 06-Nov-94 Sunday
- 94 6 Nov 08:49:37
- 1994 Nov 6
- 06-Nov-94
- Sun Nov 6 94
- 1994.Nov.6
- Sun/Nov/6/94/GMT
- Sun, 06 Nov 1994 08:49:37 CET
- 06 Nov 1994 08:49:37 EST
- Sun, 12 Sep 2004 15:05:58 -0700
- Sat, 11 Sep 2004 21:32:11 +0200
- 20040912 15:05:58 -0700
- 20040911 +0200
- </pre>
-
-<p class="level0"><a name="STANDARDS"></a><h2 class="nroffsh">STANDARDS</h2>
-<p class="level0">This parser was written to handle date formats specified in RFC 822 (including the update in RFC 1123) using time zone name or time zone delta and RFC 850 (obsoleted by RFC 1036) and ANSI C's asctime() format. These formats are the only ones RFC2616 says HTTP applications may use. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">This function returns -1 when it fails to parse the date string. Otherwise it returns the number of seconds as described.
-<p class="level0">If the year is larger than 2037 on systems with 32 bit time_t, this function will return 0x7fffffff (since that is the largest possible signed 32 bit number).
-<p class="level0">Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC, January 19, 2038 will work fine. On systems with a 64 bit time_t but with a crippled mktime(), <span Class="emphasis">curl_getdate</span> will return -1 in this case. <a name="REWRITE"></a><h2 class="nroffsh">REWRITE</h2>
-<p class="level0">The former version of this function was built with yacc and was not only very large, it was also never quite understood and it wasn't possible to build with non-GNU tools since only GNU Bison could make it thread-safe!
-<p class="level0">The rewrite was done for 7.12.2. The new one is much smaller and uses simpler code. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_getdate.pdf b/docs/libcurl/curl_getdate.pdf
deleted file mode 100644
index 4499afe..0000000
--- a/docs/libcurl/curl_getdate.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3
index 7413292..3355447 100644
--- a/docs/libcurl/curl_getenv.3
+++ b/docs/libcurl/curl_getenv.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_getenv - return value for environment name
diff --git a/docs/libcurl/curl_getenv.html b/docs/libcurl/curl_getenv.html
deleted file mode 100644
index be1a007..0000000
--- a/docs/libcurl/curl_getenv.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_getenv man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_getenv - return value for environment name <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_getenv(const char * name );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_getenv() is a portable wrapper for the getenv() function, meant to emulate its behaviour and provide an identical interface for all operating systems libcurl builds on (including win32). <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function will be removed from the public libcurl API in a near future. It will instead be made "available" by source code access only, and then as curlx_getenv(). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If successful, curl_getenv() returns a pointer to the value of the specified environment. The memory it refers to is malloc()ed so the application must free() this when the data is no longer needed. When <a class="emphasis" href="./curl_getenv.html">curl_getenv(3)</a> fails to find the specified name, it returns a null pointer. <a name="NOTE"></a><h2 class="nroffsh">NOTE</h2>
-<p class="level0">Under unix operating systems, there isn't any point in returning an allocated memory, although other systems won't work properly if this isn't done. The unix implementation thus has to suffer slightly from the drawbacks of other systems. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">getenv (3C)</span> <span Class="manpage"> </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_getenv.pdf b/docs/libcurl/curl_getenv.pdf
deleted file mode 100644
index 2c371ff..0000000
--- a/docs/libcurl/curl_getenv.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_cleanup.3 b/docs/libcurl/curl_global_cleanup.3
index 9ca11d6..83a54e4 100644
--- a/docs/libcurl/curl_global_cleanup.3
+++ b/docs/libcurl/curl_global_cleanup.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
.SH NAME
curl_global_cleanup - global libcurl cleanup
diff --git a/docs/libcurl/curl_global_cleanup.html b/docs/libcurl/curl_global_cleanup.html
deleted file mode 100644
index ac8cad8..0000000
--- a/docs/libcurl/curl_global_cleanup.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_global_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_cleanup - global libcurl cleanup <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_global_cleanup(void);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function releases resources acquired by <a class="bold" href="./curl_global_init.html">curl_global_init(3)</a>.
-<p class="level0">You should call <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> once for each call you make to <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a>, after you are done using libcurl.
-<p class="level0"><span Class="bold">This function is not thread safe.</span> 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 <a class="bold" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> calls functions of other libraries that are similarly thread unsafe, it could conflict with any other thread that uses these other libraries.
-<p class="level0">See the description in <a class="bold" href="./libcurl.html">libcurl(3)</a> of global environment requirements for details of how to use this function.
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./libcurl.html">libcurl (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_cleanup.pdf b/docs/libcurl/curl_global_cleanup.pdf
deleted file mode 100644
index aae973a..0000000
--- a/docs/libcurl/curl_global_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3
index e732911..77172be 100644
--- a/docs/libcurl/curl_global_init.3
+++ b/docs/libcurl/curl_global_init.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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
@@ -28,17 +46,18 @@
\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()\fP calls functions of other libraries that are similarly
-thread unsafe, it could conflict with any other thread that uses these other
-libraries.
+\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.
-See the description in \fBlibcurl\fP(3) of global environment requirements for
+See the description in \fBlibcurl(3)\fP of global environment requirements for
details of how to use this function.
.SH FLAGS
.TP 5
.B CURL_GLOBAL_ALL
-Initialize everything possible. This sets all known bits.
+Initialize everything possible. This sets all known bits except
+\fBCURL_GLOBAL_ACK_EINTR\fP.
.TP
.B CURL_GLOBAL_SSL
Initialize SSL
@@ -48,6 +67,15 @@
.TP
.B CURL_GLOBAL_NOTHING
Initialise nothing extra. This sets no bit.
+.TP
+.B 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.
+.TP
+.B 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.
diff --git a/docs/libcurl/curl_global_init.html b/docs/libcurl/curl_global_init.html
deleted file mode 100644
index e54ced3..0000000
--- a/docs/libcurl/curl_global_init.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html><head>
-<title>curl_global_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_init - Global libcurl initialisation <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLcode curl_global_init(long flags );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function sets up the program environment that libcurl needs. Think of it as an extension of the library loader.
-<p class="level0">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.
-<p class="level0">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.
-<p class="level0"><span Class="bold">This function is not thread safe.</span> 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 <span Class="emphasis">curl_global_init()</span> calls functions of other libraries that are similarly thread unsafe, it could conflict with any other thread that uses these other libraries.
-<p class="level0">See the description in <span Class="bold">libcurl</span>(3) of global environment requirements for details of how to use this function.
-<p class="level0"><a name="FLAGS"></a><h2 class="nroffsh">FLAGS</h2>
-<p class="level0">
-<p class="level0"><span Class="bold">CURL_GLOBAL_ALL</span> Initialize everything possible. This sets all known bits.
-<p class="level0"><span Class="bold">CURL_GLOBAL_SSL</span> Initialize SSL
-<p class="level0"><span Class="bold">CURL_GLOBAL_WIN32</span> Initialize the Win32 socket libraries.
-<p class="level0"><span Class="bold">CURL_GLOBAL_NOTHING</span> Initialise nothing extra. This sets no bit. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns non-zero, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init_mem.html">curl_global_init_mem (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_easy_init.html">curl_easy_init (3) </a> <a class="manpage" href="./libcurl.html">libcurl (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_init.pdf b/docs/libcurl/curl_global_init.pdf
deleted file mode 100644
index 9e5af52..0000000
--- a/docs/libcurl/curl_global_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_global_init_mem.3 b/docs/libcurl/curl_global_init_mem.3
index 57ae6ae..9cddef7 100644
--- a/docs/libcurl/curl_global_init_mem.3
+++ b/docs/libcurl/curl_global_init_mem.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
.SH NAME
curl_global_init_mem - Global libcurl initialisation with memory callbacks
@@ -34,7 +52,7 @@
.IP "void *calloc_callback(size_t nmemb, size_t size);"
To replace calloc()
.SH "CAUTION"
-Manipulating these gives considerable powers to the application to severly
+Manipulating these gives considerable powers to the application to severely
screw things up for libcurl. Take care!
.SH "SEE ALSO"
.BR curl_global_init "(3), "
diff --git a/docs/libcurl/curl_global_init_mem.html b/docs/libcurl/curl_global_init_mem.html
deleted file mode 100644
index 055d9db..0000000
--- a/docs/libcurl/curl_global_init_mem.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<html><head>
-<title>curl_global_init_mem man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_global_init_mem - Global libcurl initialisation with memory callbacks <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span> <pre>
-<p class="level0"><span Class="bold">CURLcode curl_global_init_mem(long flags,</span>
-<span Class="bold"> curl_malloc_callback m,</span>
-<span Class="bold"> curl_free_callback f,</span>
-<span Class="bold"> curl_realloc_callback r,</span>
-<span Class="bold"> curl_strdup_callback s,</span>
-<span Class="bold"> curl_calloc_callback c );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function works exactly as <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> with one addition: it allows the application to set callbacks to replace the otherwise used internal memory functions.
-<p class="level0">This man page only adds documentation for the callbacks, see the <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> man page for all the rest. When you use this function, all callback arguments must be set to valid function pointers.
-<p class="level0">The prototypes for the given callbacks should match these:
-<p class="level0"><a name="void"></a><span class="nroffip">void *malloc_callback(size_t size);</span>
-<p class="level1">To replace malloc()
-<p class="level0"><a name="void"></a><span class="nroffip">void free_callback(void *ptr);</span>
-<p class="level1">To replace free()
-<p class="level0"><a name="void"></a><span class="nroffip">void *realloc_callback(void *ptr, size_t size);</span>
-<p class="level1">To replace realloc()
-<p class="level0"><a name="char"></a><span class="nroffip">char *strdup_callback(const char *str);</span>
-<p class="level1">To replace strdup()
-<p class="level0"><a name="void"></a><span class="nroffip">void *calloc_callback(size_t nmemb, size_t size);</span>
-<p class="level1">To replace calloc() <a name="CAUTION"></a><h2 class="nroffsh">CAUTION</h2>
-<p class="level0">Manipulating these gives considerable powers to the application to severly screw things up for libcurl. Take care! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_global_init.html">curl_global_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_global_cleanup.html">curl_global_cleanup (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_global_init_mem.pdf b/docs/libcurl/curl_global_init_mem.pdf
deleted file mode 100644
index 79f78a7..0000000
--- a/docs/libcurl/curl_global_init_mem.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_mprintf.3 b/docs/libcurl/curl_mprintf.3
index ade7f65..cbf10e1 100644
--- a/docs/libcurl/curl_mprintf.3
+++ b/docs/libcurl/curl_mprintf.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
diff --git a/docs/libcurl/curl_mprintf.html b/docs/libcurl/curl_mprintf.html
deleted file mode 100644
index 5a16d57..0000000
--- a/docs/libcurl/curl_mprintf.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<html><head>
-<title>curl_printf man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf, curl_mvsprintf - formatted output conversion <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/mprintf.h></span>
-<p class="level0"><span Class="bold">int curl_mprintf(const char * format , ...);</span> <br><span Class="bold">int curl_mfprintf(FILE * fd , const char * format , ...);</span> <br><span Class="bold">int curl_msprintf(char * buffer , const char * format , ...);</span> <br><span Class="bold">int curl_msnprintf(char * buffer , size_t maxlength , const char * format , ...);</span> <br><span Class="bold">int curl_mvprintf(const char * format , va_list args );</span> <br><span Class="bold">int curl_mvfprintf(FILE * fd , const char * format , va_list args );</span> <br><span Class="bold">int curl_mvsprintf(char * buffer , const char * format , va_list args );</span> <br><span Class="bold">int curl_mvsnprintf(char * buffer , size_t maxlength , const char * format , va_list args );</span> <br><span Class="bold">char *curl_maprintf(const char * format , ...);</span> <br><span Class="bold">char *curl_mvaprintf(const char * format , va_list args );</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">These are all functions that produce output according to a format string and given arguments. These are mostly clones of the well-known C-style functions and there will be no detailed explanation of all available formatting rules and usage here.
-<p class="level0">See this table for notable exceptions.
-<p class="level1">
-<p class="level1"><span Class="bold">curl_mprintf()</span> Normal printf() clone.
-<p class="level1"><span Class="bold">curl_mfprintf()</span> Normal fprintf() clone.
-<p class="level1"><span Class="bold">curl_msprintf()</span> Normal sprintf() clone.
-<p class="level1"><span Class="bold">curl_msnprintf()</span> snprintf() clone. Many systems don't have this. It is just like <span Class="bold">sprintf</span> but with an extra argument after the buffer that specifies the length of the target buffer.
-<p class="level1"><span Class="bold">curl_mvprintf()</span> Normal vprintf() clone.
-<p class="level1"><span Class="bold">curl_mvfprintf()</span> Normal vfprintf() clone.
-<p class="level1"><span Class="bold">curl_mvsprintf()</span> Normal vsprintf() clone.
-<p class="level1"><span Class="bold">curl_mvsnprintf()</span> vsnprintf() clone. Many systems don't have this. It is just like <span Class="bold">vsprintf</span> but with an extra argument after the buffer that specifies the length of the target buffer.
-<p class="level1"><span Class="bold">curl_maprintf()</span> Like printf() but returns the output string as a malloc()ed string. The returned string must be free()ed by the receiver.
-<p class="level1"><span Class="bold">curl_mvaprintf()</span> Like curl_maprintf() but takes a va_list pointer argument instead of a variable amount of arguments.
-<p class="level0">
-<p class="level0">To easily use all these cloned functions instead of the normal ones, #define _MPRINTF_REPLACE before you include the <curl/mprintf.h> file. Then all the normal names like printf, fprintf, sprintf etc will use the curl-functions instead. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">These function will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_-prefixed functions. See lib/README.curlx for further details. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The <span Class="bold">curl_maprintf</span> and <span Class="bold">curl_mvaprintf</span> functions return a pointer to a newly allocated string, or NULL if it failed.
-<p class="level0">All other functions return the number of characters they actually outputted. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">printf (3)</span> <span Class="manpage"> sprintf (3)</span> <span Class="manpage"> fprintf (3)</span> <span Class="manpage"> vprintf (3) </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_mprintf.pdf b/docs/libcurl/curl_mprintf.pdf
deleted file mode 100644
index 544b5c1..0000000
--- a/docs/libcurl/curl_mprintf.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_add_handle.3 b/docs/libcurl/curl_multi_add_handle.3
index 85f199e..253b864 100644
--- a/docs/libcurl/curl_multi_add_handle.3
+++ b/docs/libcurl/curl_multi_add_handle.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_add_handle - add an easy handle to a multi session
@@ -10,21 +30,34 @@
.SH DESCRIPTION
Adds a standard easy handle to the multi stack. This function call will make
this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
-Furthermore, libcurl now initiates the connection associated with the
-specified \fIeasy_handle\fP.
-When an easy handle has been added to a multi stack, you can not and you must
-not use \fIcurl_easy_perform(3)\fP on that handle!
+While an easy handle is added to a multi stack, you can not and you must not
+use \fIcurl_easy_perform(3)\fP on that handle. After having removed the easy
+handle from the multi stack again, it is perfectly fine to use it with the
+easy interface again.
-If the easy handle is not set to use a shared (CURLOPT_SHARE) or global DNS
-cache (CURLOPT_DNS_USE_GLOBAL_CACHE), it will be made to use the DNS cache
-that is shared between all easy handles within the multi handle when
-\fIcurl_multi_add_handle(3)\fP is called.
+If the easy handle is not set to use a shared (\fICURLOPT_SHARE(3)\fP) or
+global DNS cache (\fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP), it will be made to
+use the DNS cache that is shared between all easy handles within the multi
+handle when \fIcurl_multi_add_handle(3)\fP is called.
-The easy handle will remain added until you remove it again with
-\fIcurl_multi_remove_handle(3)\fP. You should remove the easy handle from the
-multi stack before you terminate first the easy handle and then the multi
-handle:
+When an easy interface is added to a multi handle, it will use a shared
+connection cache owned by the multi handle. Removing and adding new easy
+handles will not affect the pool of connections or the ability to do
+connection re-use.
+
+If you have CURLMOPT_TIMERFUNCTION set in the multi handle (and you really
+should if you're working event-based with \fIcurl_multi_socket_action(3)\fP
+and friends), that callback will be called from within this function to ask
+for an updated timer so that your main event loop will get the activity on
+this handle to get started.
+
+The easy handle will remain added to the multi handle until you remove it
+again with \fIcurl_multi_remove_handle(3)\fP - even when a transfer with that
+specific easy handle is completed.
+
+You should remove the easy handle from the multi stack before you terminate
+first the easy handle and then the multi handle:
1 - \fIcurl_multi_remove_handle(3)\fP
@@ -34,4 +67,5 @@
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
-.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
+.BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
+.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) "
diff --git a/docs/libcurl/curl_multi_add_handle.html b/docs/libcurl/curl_multi_add_handle.html
deleted file mode 100644
index 75ca271..0000000
--- a/docs/libcurl/curl_multi_add_handle.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_multi_add_handle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_add_handle - add an easy handle to a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Adds a standard easy handle to the multi stack. This function call will make this <span Class="emphasis">multi_handle</span> control the specified <span Class="emphasis">easy_handle</span>. Furthermore, libcurl now initiates the connection associated with the specified <span Class="emphasis">easy_handle</span>.
-<p class="level0">When an easy handle has been added to a multi stack, you can not and you must not use <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on that handle!
-<p class="level0">If the easy handle is not set to use a shared (CURLOPT_SHARE) or global DNS cache (CURLOPT_DNS_USE_GLOBAL_CACHE), it will be made to use the DNS cache that is shared between all easy handles within the multi handle when <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> is called.
-<p class="level0">The easy handle will remain added until you remove it again with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. You should remove the easy handle from the multi stack before you terminate first the easy handle and then the multi handle:
-<p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>
-<p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>
-<p class="level0">3 - <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_add_handle.pdf b/docs/libcurl/curl_multi_add_handle.pdf
deleted file mode 100644
index 9fd8fd4..0000000
--- a/docs/libcurl/curl_multi_add_handle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_assign.3 b/docs/libcurl/curl_multi_assign.3
index 3e15d73..0a2378d 100644
--- a/docs/libcurl/curl_multi_assign.3
+++ b/docs/libcurl/curl_multi_assign.3
@@ -1,16 +1,36 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
-curl_multi_assign \- set data to association with an internal socket
+curl_multi_assign \- set data to associate with an internal socket
.SH SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd,
void *sockptr);
.SH DESCRIPTION
-This function assigns an association in the multi handle between the given
-socket and a private pointer of the application. This is (only) useful for
-\fIcurl_multi_socket(3)\fP uses.
+This function creates an association in the multi handle between the given
+socket and a private pointer of the application. This is designed for
+\fIcurl_multi_socket_action(3)\fP uses.
When set, the \fIsockptr\fP pointer will be passed to all future socket
callbacks for the specific \fIsockfd\fP socket.
@@ -31,13 +51,13 @@
.SH "TYPICAL USAGE"
In a typical application you allocate a struct or at least use some kind of
semi-dynamic data for each socket that we must wait for action on when using
-the \fIcurl_multi_socket(3)\fP approach.
+the \fIcurl_multi_socket_action(3)\fP approach.
When our socket-callback gets called by libcurl and we get to know about yet
another socket to wait for, we can use \fIcurl_multi_assign(3)\fP to point out
the particular data so that when we get updates about this same socket again,
we don't have to find the struct associated with this socket by ourselves.
.SH AVAILABILITY
-This function was added in libcurl 7.15.5, although not deemed stable yet.
+This function was added in libcurl 7.15.5.
.SH "SEE ALSO"
-.BR curl_multi_setopt "(3), " curl_multi_socket "(3) "
+.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) "
diff --git a/docs/libcurl/curl_multi_assign.html b/docs/libcurl/curl_multi_assign.html
deleted file mode 100644
index e560218..0000000
--- a/docs/libcurl/curl_multi_assign.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>curl_multi_assign man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_assign - set data to association with an internal socket <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd, void *sockptr); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function assigns an association in the multi handle between the given socket and a private pointer of the application. This is (only) useful for <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> uses.
-<p class="level0">When set, the <span Class="emphasis">sockptr</span> pointer will be passed to all future socket callbacks for the specific <span Class="emphasis">sockfd</span> socket.
-<p class="level0">If the given <span Class="emphasis">sockfd</span> isn't already in use by libcurl, this function will return an error.
-<p class="level0">libcurl only keeps one single pointer associated with a socket, so calling this function several times for the same socket will make the last set pointer get used.
-<p class="level0">The idea here being that this association (socket to private pointer) is something that just about every application that uses this API will need and then libcurl can just as well do it since it already has an internal hash table lookup for this. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">In a typical application you allocate a struct or at least use some kind of semi-dynamic data for each socket that we must wait for action on when using the <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> approach.
-<p class="level0">When our socket-callback gets called by libcurl and we get to know about yet another socket to wait for, we can use <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to point out the particular data so that when we get updates about this same socket again, we don't have to find the struct associated with this socket by ourselves. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.5, although not deemed stable yet. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_setopt.html">curl_multi_setopt (3)</a> <a class="manpage" href="./curl_multi_socket.html"> curl_multi_socket (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_assign.pdf b/docs/libcurl/curl_multi_assign.pdf
deleted file mode 100644
index 06d204a..0000000
--- a/docs/libcurl/curl_multi_assign.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_cleanup.3 b/docs/libcurl/curl_multi_cleanup.3
index d40173c..50bc8ad 100644
--- a/docs/libcurl/curl_multi_cleanup.3
+++ b/docs/libcurl/curl_multi_cleanup.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_cleanup - close down a multi session
@@ -21,6 +41,7 @@
3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
removed
.SH RETURN VALUE
-CURLMcode type, general libcurl multi interface error code.
+CURLMcode type, general libcurl multi interface error code. On success,
+CURLM_OK is returned.
.SH "SEE ALSO"
.BR curl_multi_init "(3)," curl_easy_cleanup "(3)," curl_easy_init "(3)"
diff --git a/docs/libcurl/curl_multi_cleanup.html b/docs/libcurl/curl_multi_cleanup.html
deleted file mode 100644
index 40381fd..0000000
--- a/docs/libcurl/curl_multi_cleanup.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_multi_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_cleanup - close down a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLMcode curl_multi_cleanup( CURLM *multi_handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Cleans up and removes a whole multi stack. It does not free or touch any individual easy handles in any way - they still need to be closed individually, using the usual <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> way. The order of cleaning up should be:
-<p class="level0">1 - <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> before any easy handles are cleaned up
-<p class="level0">2 - <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> can now be called independently since the easy handle is no longer connected to the multi handle
-<p class="level0">3 - <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> should be called when all easy handles are removed <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_init.html">curl_multi_init (3)</a> <a class="manpage" href="./curl_easy_cleanup.html"> curl_easy_cleanup (3)</a> <a class="manpage" href="./curl_easy_init.html"> curl_easy_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_cleanup.pdf b/docs/libcurl/curl_multi_cleanup.pdf
deleted file mode 100644
index 2d55d43..0000000
--- a/docs/libcurl/curl_multi_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_fdset.3 b/docs/libcurl/curl_multi_fdset.3
index 7928105..908ef55 100644
--- a/docs/libcurl/curl_multi_fdset.3
+++ b/docs/libcurl/curl_multi_fdset.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_fdset - extracts file descriptor information from a multi handle
@@ -17,25 +37,47 @@
libcurl returns its fd_set sets. The application can use these to select() on,
but be sure to FD_ZERO them before calling this function as
\fIcurl_multi_fdset(3)\fP only adds its own descriptors, it doesn't zero or
-otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be
-called as soon as one of them is ready to be read from or written to.
+otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should
+be called as soon as one of them is ready to be read from or written to.
-To be sure to have up-to-date results, you should call
-\fIcurl_multi_perform\fP until it does not return CURLM_CALL_MULTI_PERFORM
-prior to calling \fIcurl_multi_fdset\fP. This will make sure that libcurl has
-updated the handles' socket states.
+If the \fIread_fd_set\fP argument is not a null pointer, it points to an
+object of type fd_set that on returns specifies the file descriptors to be
+checked for being ready to read.
+
+If the \fIwrite_fd_set\fP argument is not a null pointer, it points to an
+object of type fd_set that on return specifies the file descriptors to be
+checked for being ready to write.
+
+If the \fIexc_fd_set\fP argument is not a null pointer, it points to an object
+of type fd_set that on return specifies the file descriptors to be checked for
+error conditions pending.
If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
-this function returns. Otherwise it will contain the higher descriptor number
-libcurl set.
+this function returns. Otherwise it will contain the highest descriptor number
+libcurl set. When libcurl returns -1 in \fImax_fd\fP, it is because libcurl
+currently does something that isn't possible for your application to monitor
+with a socket and unfortunately you can then not know exactly when the current
+action is completed using select(). You then need to wait a while before you
+proceed and call \fIcurl_multi_perform(3)\fP anyway. How long to wait? We
+suggest 100 milliseconds at least, but you may want to test it out in your own
+particular conditions to find a suitable value.
-When doing select(), you should use \fBcurl_multi_timeout\fP to figure out how
-long to wait for action. Call \fIcurl_multi_perform\fP even if no activity has
-been seen on the fd_sets after the timeout expires as otherwise internal
-retries and timeouts may not work as you'd think and want.
+When doing select(), you should use \fIcurl_multi_timeout(3)\fP to figure out
+how long to wait for action. Call \fIcurl_multi_perform(3)\fP even if no
+activity has been seen on the fd_sets after the timeout expires as otherwise
+internal retries and timeouts may not work as you'd think and want.
+
+If one of the sockets used by libcurl happens to be larger than what can be
+set in an fd_set, which on POSIX systems means that the file descriptor is
+larger than FD_SETSIZE, then libcurl will try to not set it. Setting a too
+large file descriptor in an fd_set implies an out of bounds write which can
+cause crashes, or worse. The effect of NOT storing it will possibly save you
+from the crash, but will make your program NOT wait for sockets it should wait
+for...
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See
\fIlibcurl-errors(3)\fP
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
-.BR curl_multi_timeout "(3), " curl_multi_perform "(3) "
+.BR curl_multi_wait "(3), "
+.BR curl_multi_timeout "(3), " curl_multi_perform "(3), " select "(2) "
diff --git a/docs/libcurl/curl_multi_fdset.html b/docs/libcurl/curl_multi_fdset.html
deleted file mode 100644
index 51e444c..0000000
--- a/docs/libcurl/curl_multi_fdset.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<html><head>
-<title>curl_multi_fdset man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_fdset - extracts file descriptor information from a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include <curl/curl.h>
- <p class="level0">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);
- <p class="level0"></pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function extracts file descriptor information from a given multi_handle. libcurl returns its fd_set sets. The application can use these to select() on, but be sure to FD_ZERO them before calling this function as <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> only adds its own descriptors, it doesn't zero or otherwise remove any others. The <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> function should be called as soon as one of them is ready to be read from or written to.
-<p class="level0">To be sure to have up-to-date results, you should call <span Class="emphasis">curl_multi_perform</span> until it does not return CURLM_CALL_MULTI_PERFORM prior to calling <span Class="emphasis">curl_multi_fdset</span>. This will make sure that libcurl has updated the handles' socket states.
-<p class="level0">If no file descriptors are set by libcurl, <span Class="emphasis">max_fd</span> will contain -1 when this function returns. Otherwise it will contain the higher descriptor number libcurl set.
-<p class="level0">When doing select(), you should use <span Class="bold">curl_multi_timeout</span> to figure out how long to wait for action. Call <span Class="emphasis">curl_multi_perform</span> even if no activity has been seen on the fd_sets after the timeout expires as otherwise internal retries and timeouts may not work as you'd think and want. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. See <span Class="emphasis">libcurl-errors(3)</span> <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_timeout.html">curl_multi_timeout (3)</a> <a class="manpage" href="./curl_multi_perform.html"> curl_multi_perform (3) </a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_fdset.pdf b/docs/libcurl/curl_multi_fdset.pdf
deleted file mode 100644
index 86fa5eb..0000000
--- a/docs/libcurl/curl_multi_fdset.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_info_read.3 b/docs/libcurl/curl_multi_info_read.3
index 9ff08e7..03be341 100644
--- a/docs/libcurl/curl_multi_info_read.3
+++ b/docs/libcurl/curl_multi_info_read.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
.SH NAME
curl_multi_info_read - read multi stack informationals
@@ -29,8 +49,8 @@
\fIcurl_easy_cleanup(3)\fP.
The 'CURLMsg' struct is very simple and only contains very basic information.
-If more involved information is wanted, the particular "easy handle" in
-present in that struct and can thus be used in subsequent regular
+If more involved information is wanted, the particular "easy handle" is
+present in that struct and can be used in subsequent regular
\fIcurl_easy_getinfo(3)\fP calls (or similar):
.nf
@@ -48,6 +68,24 @@
that just completed.
At this point, there are no other \fBmsg\fP types defined.
+.SH EXAMPLE
+.nf
+struct CURLMsg *m;
+
+/* call curl_multi_perform or curl_multi_socket_action first, then loop
+ through and check if there are any transfers that have completed */
+
+do {
+ int msgq = 0;
+ m = curl_multi_info_read(multi_handle, &msgq);
+ if(m && (m->msg == CURLMSG_DONE)) {
+ CURL *e = m->easy_handle;
+ transfers--;
+ curl_multi_remove_handle(multi_handle, e);
+ curl_easy_cleanup(e);
+ }
+} while(m);
+.fi
.SH "RETURN VALUE"
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
diff --git a/docs/libcurl/curl_multi_info_read.html b/docs/libcurl/curl_multi_info_read.html
deleted file mode 100644
index 2f53e6d..0000000
--- a/docs/libcurl/curl_multi_info_read.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<html><head>
-<title>curl_multi_info_read man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_info_read - read multi stack informationals <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMsg *curl_multi_info_read( CURLM *multi_handle, int *msgs_in_queue);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Ask the multi handle if there are any messages/informationals from the individual transfers. Messages may include informationals such as an error code from the transfer or just the fact that a transfer is completed. More details on these should be written down as well.
-<p class="level0">Repeated calls to this function will return a new struct each time, until a NULL is returned as a signal that there is no more to get at this point. The integer pointed to with <span Class="emphasis">msgs_in_queue</span> will contain the number of remaining messages after this function was called.
-<p class="level0">When you fetch a message using this function, it is removed from the internal queue so calling this function again will not return the same message again. It will instead return new messages at each new invoke until the queue is emptied.
-<p class="level0"><span Class="bold">WARNING:</span> The data the returned pointer points to will not survive calling <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a>, <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> or <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>.
-<p class="level0">The 'CURLMsg' struct is very simple and only contains very basic information. If more involved information is wanted, the particular "easy handle" in present in that struct and can thus be used in subsequent regular <a class="emphasis" href="./curl_easy_getinfo.html">curl_easy_getinfo(3)</a> calls (or similar):
-<p class="level0"><pre>
-<p class="level0"> 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;
- };
- </pre>
-
-<p class="level0">When <span Class="bold">msg</span> is <span Class="emphasis">CURLMSG_DONE</span>, the message identifies a transfer that is done, and then <span Class="bold">result</span> contains the return code for the easy handle that just completed.
-<p class="level0">At this point, there are no other <span Class="bold">msg</span> types defined. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">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. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <a class="manpage" href="./curl_multi_perform.html"> curl_multi_perform (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_info_read.pdf b/docs/libcurl/curl_multi_info_read.pdf
deleted file mode 100644
index 0a14599..0000000
--- a/docs/libcurl/curl_multi_info_read.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_init.3 b/docs/libcurl/curl_multi_init.3
index 0ac298e..ca9374e 100644
--- a/docs/libcurl/curl_multi_init.3
+++ b/docs/libcurl/curl_multi_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_init - create a multi handle
diff --git a/docs/libcurl/curl_multi_init.html b/docs/libcurl/curl_multi_init.html
deleted file mode 100644
index cf9b304..0000000
--- a/docs/libcurl/curl_multi_init.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_multi_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_init - create a multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLM *curl_multi_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns a CURLM handle to be used as input to all the other multi-functions, sometimes referred to as a multi handle in some places in the documentation. This init call MUST have a corresponding call to <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a> when the operation is complete. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong and you cannot use the other curl functions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_global_init.html"> curl_global_init (3)</a> <a class="manpage" href="./curl_easy_init.html"> curl_easy_init (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_init.pdf b/docs/libcurl/curl_multi_init.pdf
deleted file mode 100644
index 67f10ed..0000000
--- a/docs/libcurl/curl_multi_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_perform.3 b/docs/libcurl/curl_multi_perform.3
index ede2390..3ec1fad 100644
--- a/docs/libcurl/curl_multi_perform.3
+++ b/docs/libcurl/curl_multi_perform.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_perform - reads/writes available data from each easy handle
@@ -8,29 +28,81 @@
CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
.ad
.SH DESCRIPTION
-When the app thinks there's data available for the multi_handle, it should
-call this function to read/write whatever there is to read or write right
-now. curl_multi_perform() returns as soon as the reads/writes are done. This
+This function handles transfers on all the added handles that need attention
+in an non-blocking fashion.
+
+When an application has found out there's data available for the multi_handle
+or a timeout has elapsed, the application should call this function to
+read/write whatever there is to read or write right now etc.
+\fIcurl_multi_perform(3)\fP returns as soon as the reads/writes are done. This
function does not require that there actually is any data available for
reading or that data can be written, it can be called just in case. It will
write the number of handles that still transfer data in the second argument's
integer-pointer.
-When you call curl_multi_perform() and the amount of \fIrunning_handles\fP is
-changed from the previous call (or is less than the amount of easy handles
-you've added to the multi handle), you know that there is one or more
-transfers less "running". You can then call \fIcurl_multi_info_read(3)\fP to
-get information about each individual completed transfer, and that returned
-info includes CURLcode and more. If an added handle fails very quickly, it may
-never be counted as a running_handle.
+If the amount of \fIrunning_handles\fP is changed from the previous call (or
+is less than the amount of easy handles you've added to the multi handle), you
+know that there is one or more transfers less "running". You can then call
+\fIcurl_multi_info_read(3)\fP to get information about each individual
+completed transfer, and that returned info includes CURLcode and more. If an
+added handle fails very quickly, it may never be counted as a running_handle.
When \fIrunning_handles\fP is set to zero (0) on the return of this function,
there is no longer any transfers in progress.
+.SH EXAMPLE
+.nf
+#ifdef _WIN32
+#define SHORT_SLEEP Sleep(100)
+#else
+#define SHORT_SLEEP usleep(100000)
+#endif
+
+fd_set fdread;
+fd_set fdwrite;
+fd_set fdexcep;
+int maxfd = -1;
+
+long curl_timeo;
+
+curl_multi_timeout(multi_handle, &curl_timeo);
+if(curl_timeo < 0)
+ curl_timeo = 1000;
+
+timeout.tv_sec = curl_timeo / 1000;
+timeout.tv_usec = (curl_timeo % 1000) * 1000;
+
+FD_ZERO(&fdread);
+FD_ZERO(&fdwrite);
+FD_ZERO(&fdexcep);
+
+/* get file descriptors from the transfers */
+mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+if(maxfd == -1) {
+ SHORT_SLEEP;
+ rc = 0;
+}
+else
+ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+switch(rc) {
+case -1:
+ /* select error */
+ break;
+case 0:
+default:
+ /* timeout or readable/writable sockets */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+}
+
+/* if there are still transfers, loop! */
+.fi
.SH "RETURN VALUE"
CURLMcode type, general libcurl multi interface error code.
Before version 7.20.0: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this
-basically means that you should call \fIcurl_multi_perform\fP again, before
+basically means that you should call \fIcurl_multi_perform(3)\fP again, before
you select() on more actions. You don't have to do it immediately, but the
return code means that libcurl may have more data available to return or that
there may be more data to send off before it is "satisfied". Do note that
@@ -41,13 +113,16 @@
This function only returns errors etc regarding the whole multi stack.
Problems still might have occurred on individual transfers even when this
-function returns \fICURLM_OK\fP.
+function returns \fICURLM_OK\fP. Use \fIcurl_multi_info_read(3)\fP to figure
+out how individual transfers did.
.SH "TYPICAL USAGE"
Most applications will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
-file descriptors, then it'll wait for action on them using \fBselect(3)\fP and
-as soon as one or more of them are ready, \fIcurl_multi_perform(3)\fP gets
-called.
+file descriptors, and \fIcurl_multi_timeout(3)\fP to get a suitable timeout
+period, then it'll wait for action on the file descriptors using
+\fBselect(3)\fP. As soon as one or more file descriptor is ready,
+\fIcurl_multi_perform(3)\fP gets called.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
+.BR curl_multi_wait "(3), "
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
.BR libcurl-errors "(3)"
diff --git a/docs/libcurl/curl_multi_perform.html b/docs/libcurl/curl_multi_perform.html
deleted file mode 100644
index 46fc226..0000000
--- a/docs/libcurl/curl_multi_perform.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<html><head>
-<title>curl_multi_perform man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_perform - reads/writes available data from each easy handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the app thinks there's data available for the multi_handle, it should call this function to read/write whatever there is to read or write right now. curl_multi_perform() returns as soon as the reads/writes are done. This function does not require that there actually is any data available for reading or that data can be written, it can be called just in case. It will write the number of handles that still transfer data in the second argument's integer-pointer.
-<p class="level0">When you call curl_multi_perform() and the amount of <span Class="emphasis">running_handles</span> is changed from the previous call (or is less than the amount of easy handles you've added to the multi handle), you know that there is one or more transfers less "running". You can then call <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to get information about each individual completed transfer, and that returned info includes CURLcode and more. If an added handle fails very quickly, it may never be counted as a running_handle.
-<p class="level0">When <span Class="emphasis">running_handles</span> is set to zero (0) on the return of this function, there is no longer any transfers in progress. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Before version 7.20.0: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <span Class="emphasis">curl_multi_perform</span> again, before you select() on more actions. You don't have to do it immediately, but the return code means that libcurl may have more data available to return or that there may be more data to send off before it is "satisfied". Do note that <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> will return <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span> only when it wants to be called again <span Class="bold">immediately</span>. When things are fine and there is nothing immediate it wants done, it'll return <span Class="emphasis">CURLM_OK</span> and you need to wait for "action" and then call this function again.
-<p class="level0">This function only returns errors etc regarding the whole multi stack. Problems still might have occurred on individual transfers even when this function returns <span Class="emphasis">CURLM_OK</span>. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">Most applications will use <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> to get the multi_handle's file descriptors, then it'll wait for action on them using <span Class="bold">select(3)</span> and as soon as one or more of them are ready, <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> gets called. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">libcurl-errors (3)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_perform.pdf b/docs/libcurl/curl_multi_perform.pdf
deleted file mode 100644
index 70f138b..0000000
--- a/docs/libcurl/curl_multi_perform.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_remove_handle.3 b/docs/libcurl/curl_multi_remove_handle.3
index efecb10..1c2165b 100644
--- a/docs/libcurl/curl_multi_remove_handle.3
+++ b/docs/libcurl/curl_multi_remove_handle.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl Manual"
.SH NAME
curl_multi_remove_handle - remove an easy handle from a multi session
@@ -8,16 +28,17 @@
CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
.ad
.SH DESCRIPTION
-Removes a given easy_handle from the multi_handle. This will make the
-specified easy handle be removed from this multi handle's control.
+Removes a given \fIeasy_handle\fI from the \fImulti_handle\fI. This will make
+the specified easy handle be removed from this multi handle's control.
When the easy handle has been removed from a multi stack, it is again
-perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle.
+perfectly legal to invoke \fIcurl_easy_perform(3)\fP on this easy handle.
-Removing an easy handle while being used, will effectively halt the transfer
-in progress involving that easy handle. All other easy handles and transfers
-will remain unaffected.
+Removing an easy handle while being used is perfectly legal and will
+effectively halt the transfer in progress involving that easy handle. All
+other easy handles and transfers will remain unaffected.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"
-.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
+.BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
+.BR curl_multi_add_handle "(3) "
diff --git a/docs/libcurl/curl_multi_remove_handle.html b/docs/libcurl/curl_multi_remove_handle.html
deleted file mode 100644
index 15bd02b..0000000
--- a/docs/libcurl/curl_multi_remove_handle.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_multi_remove_handle man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_remove_handle - remove an easy handle from a multi session <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Removes a given easy_handle from the multi_handle. This will make the specified easy handle be removed from this multi handle's control.
-<p class="level0">When the easy handle has been removed from a multi stack, it is again perfectly legal to invoke <span Class="emphasis">curl_easy_perform()</span> on this easy handle.
-<p class="level0">Removing an easy handle while being used, will effectively halt the transfer in progress involving that easy handle. All other easy handles and transfers will remain unaffected. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_remove_handle.pdf b/docs/libcurl/curl_multi_remove_handle.pdf
deleted file mode 100644
index 5a54941..0000000
--- a/docs/libcurl/curl_multi_remove_handle.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_setopt.3 b/docs/libcurl/curl_multi_setopt.3
index a1cbb70..951349f 100644
--- a/docs/libcurl/curl_multi_setopt.3
+++ b/docs/libcurl/curl_multi_setopt.3
@@ -1,5 +1,25 @@
-.\"
-.TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.TH curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual"
.SH NAME
curl_multi_setopt \- set options for a curl multi handle
.SH SYNOPSIS
@@ -7,71 +27,42 @@
CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
.SH DESCRIPTION
-curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By
-using the appropriate options to \fIcurl_multi_setopt(3)\fP, you can change
-libcurl's behaviour when using that multi handle. All options are set with
-the \fIoption\fP followed by the parameter \fIparam\fP. That parameter can be
-a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject pointer\fP or a
-\fBcurl_off_t\fP type, depending on what the specific option expects. Read
-this manual carefully as bad input values may cause libcurl to behave badly!
-You can only set one option in each function call.
+\fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
+behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
+can change libcurl's behaviour when using that multi handle. All options are
+set with the \fIoption\fP followed by the parameter \fIparam\fP. That
+parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
+pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
+expects. Read this manual carefully as bad input values may cause libcurl to
+behave badly! You can only set one option in each function call.
.SH OPTIONS
.IP CURLMOPT_SOCKETFUNCTION
-Pass a pointer to a function matching the \fBcurl_socket_callback\fP
-prototype. The \fIcurl_multi_socket_action(3)\fP function informs the
-application about updates in the socket (file descriptor) status by doing
-none, one, or multiple calls to the curl_socket_callback given in the
-\fBparam\fP argument. They update the status with changes since the previous
-time a \fIcurl_multi_socket(3)\fP function was called. If the given callback
-pointer is NULL, no callback will be called. Set the callback's \fBuserp\fP
-argument with \fICURLMOPT_SOCKETDATA\fP. See \fIcurl_multi_socket(3)\fP for
-more callback details.
+See \fICURLMOPT_SOCKETFUNCTION(3)\fP
.IP CURLMOPT_SOCKETDATA
-Pass a pointer to whatever you want passed to the \fBcurl_socket_callback\fP's
-forth argument, the userp pointer. This is not used by libcurl but only
-passed-thru as-is. Set the callback pointer with
-\fICURLMOPT_SOCKETFUNCTION\fP.
+See \fICURLMOPT_SOCKETDATA(3)\fP
.IP CURLMOPT_PIPELINING
-Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi
-handle will make it attempt to perform HTTP Pipelining as far as possible for
-transfers using this handle. This means that if you add a second request that
-can use an already existing connection, the second request will be \&"piped"
-on the same connection rather than being executed in parallel. (Added in
-7.16.0)
+See \fICURLMOPT_PIPELINING(3)\fP
.IP CURLMOPT_TIMERFUNCTION
-Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP
-prototype. This function will then be called when the timeout value
-changes. The timeout value is at what latest time the application should call
-one of the \&"performing" functions of the multi interface
-(\fIcurl_multi_socket_action(3)\fP and \fIcurl_multi_perform(3)\fP) - to allow
-libcurl to keep timeouts and retries etc to work. A timeout value of -1 means
-that there is no timeout at all, and 0 means that the timeout is already
-reached. Libcurl attempts to limit calling this only when the fixed future
-timeout time actually changes. See also \fICURLMOPT_TIMERDATA\fP. This
-callback can be used instead of, or in addition to,
-\fIcurl_multi_timeout(3)\fP. (Added in 7.16.0)
+See \fICURLMOPT_TIMERFUNCTION(3)\fP
.IP CURLMOPT_TIMERDATA
-Pass a pointer to whatever you want passed to the
-\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is
-not used by libcurl but only passed-thru as-is. Set the callback pointer with
-\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0)
+See \fICURLMOPT_TIMERDATA(3)\fP
.IP CURLMOPT_MAXCONNECTS
-Pass a long. The set number will be used as the maximum amount of
-simultaneously open connections that libcurl may cache. Default is 10, and
-libcurl will enlarge the size for each added easy handle to make it fit 4
-times the number of added easy handles.
-
-By setting this option, you can prevent the cache size from growing beyond the
-limit set by you.
-
-When the cache is full, curl closes the oldest one in the cache to prevent the
-number of open connections from increasing.
-
-This option is for the multi handle's use only, when using the easy interface
-you should instead use the \fICURLOPT_MAXCONNECTS\fP option.
-
-(Added in 7.16.3)
+See \fICURLMOPT_MAXCONNECTS(3)\fP
+.IP CURLMOPT_MAX_HOST_CONNECTIONS
+See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
+.IP CURLMOPT_MAX_PIPELINE_LENGTH
+See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
+.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
+See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
+.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
+See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
+.IP CURLMOPT_PIPELINING_SITE_BL
+See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
+.IP CURLMOPT_PIPELINING_SERVER_BL
+See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
+.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
+See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
.SH RETURNS
The standard CURLMcode for multi interface error codes. Note that it returns a
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
diff --git a/docs/libcurl/curl_multi_setopt.html b/docs/libcurl/curl_multi_setopt.html
deleted file mode 100644
index 1e67582..0000000
--- a/docs/libcurl/curl_multi_setopt.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<html><head>
-<title>curl_multi_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_setopt - set options for a curl multi handle <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By using the appropriate options to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>, you can change libcurl's behaviour when using that multi handle. All options are set with the <span Class="emphasis">option</span> followed by the parameter <span Class="emphasis">param</span>. That parameter can be a <span Class="bold">long</span>, a <span Class="bold">function pointer</span>, an <span Class="bold">object pointer</span> or a <span Class="bold">curl_off_t</span> type, depending on what the specific option expects. Read this manual carefully as bad input values may cause libcurl to behave badly! You can only set one option in each function call.
-<p class="level0"><a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLMOPTSOCKETFUNCTION"></a><span class="nroffip">CURLMOPT_SOCKETFUNCTION</span>
-<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_socket_callback</span> prototype. The <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function informs the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the curl_socket_callback given in the <span Class="bold">param</span> argument. They update the status with changes since the previous time a <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> function was called. If the given callback pointer is NULL, no callback will be called. Set the callback's <span Class="bold">userp</span> argument with <a class="emphasis" href="#CURLMOPTSOCKETDATA">CURLMOPT_SOCKETDATA</a>. See <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> for more callback details.
-<p class="level0"><a name="CURLMOPTSOCKETDATA"></a><span class="nroffip">CURLMOPT_SOCKETDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_socket_callback</span>'s forth argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTSOCKETFUNCTION">CURLMOPT_SOCKETFUNCTION</a>.
-<p class="level0"><a name="CURLMOPTPIPELINING"></a><span class="nroffip">CURLMOPT_PIPELINING</span>
-<p class="level1">Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi handle will make it attempt to perform HTTP Pipelining as far as possible for transfers using this handle. This means that if you add a second request that can use an already existing connection, the second request will be "piped" on the same connection rather than being executed in parallel. (Added in 7.16.0)
-<p class="level0"><a name="CURLMOPTTIMERFUNCTION"></a><span class="nroffip">CURLMOPT_TIMERFUNCTION</span>
-<p class="level1">Pass a pointer to a function matching the <span Class="bold">curl_multi_timer_callback</span> prototype. This function will then be called when the timeout value changes. The timeout value is at what latest time the application should call one of the "performing" functions of the multi interface (<a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> and <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) - to allow libcurl to keep timeouts and retries etc to work. A timeout value of -1 means that there is no timeout at all, and 0 means that the timeout is already reached. Libcurl attempts to limit calling this only when the fixed future timeout time actually changes. See also <a class="emphasis" href="#CURLMOPTTIMERDATA">CURLMOPT_TIMERDATA</a>. This callback can be used instead of, or in addition to, <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>. (Added in 7.16.0)
-<p class="level0"><a name="CURLMOPTTIMERDATA"></a><span class="nroffip">CURLMOPT_TIMERDATA</span>
-<p class="level1">Pass a pointer to whatever you want passed to the <span Class="bold">curl_multi_timer_callback</span>'s third argument, the userp pointer. This is not used by libcurl but only passed-thru as-is. Set the callback pointer with <a class="emphasis" href="#CURLMOPTTIMERFUNCTION">CURLMOPT_TIMERFUNCTION</a>. (Added in 7.16.0)
-<p class="level0"><a name="CURLMOPTMAXCONNECTS"></a><span class="nroffip">CURLMOPT_MAXCONNECTS</span>
-<p class="level1">Pass a long. The set number will be used as the maximum amount of simultaneously open connections that libcurl may cache. Default is 10, and libcurl will enlarge the size for each added easy handle to make it fit 4 times the number of added easy handles.
-<p class="level1">By setting this option, you can prevent the cache size from growing beyond the limit set by you.
-<p class="level1">When the cache is full, curl closes the oldest one in the cache to prevent the number of open connections from increasing.
-<p class="level1">This option is for the multi handle's use only, when using the easy interface you should instead use the <span Class="emphasis">CURLOPT_MAXCONNECTS</span> option.
-<p class="level1">(Added in 7.16.3) <a name="RETURNS"></a><h2 class="nroffsh">RETURNS</h2>
-<p class="level0">The standard CURLMcode for multi interface error codes. Note that it returns a CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl doesn't know of. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_socket.html">curl_multi_socket (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_setopt.pdf b/docs/libcurl/curl_multi_setopt.pdf
deleted file mode 100644
index 53ce952..0000000
--- a/docs/libcurl/curl_multi_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket.3 b/docs/libcurl/curl_multi_socket.3
index 18b571c..6b262f2 100644
--- a/docs/libcurl/curl_multi_socket.3
+++ b/docs/libcurl/curl_multi_socket.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_socket 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_socket \- reads/writes available data
diff --git a/docs/libcurl/curl_multi_socket.html b/docs/libcurl/curl_multi_socket.html
deleted file mode 100644
index 72d803f..0000000
--- a/docs/libcurl/curl_multi_socket.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<html><head>
-<title>curl_multi_socket man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_socket - reads/writes available data <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include <curl/curl.h>
- CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
- int *running_handles);
- <p class="level0">CURLMcode curl_multi_socket_all(CURLM *multi_handle,
- int *running_handles);
- </pre>
-
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">These functions are deprecated. Do not use! See <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> instead!
-<p class="level0">At return, the integer <span Class="bold">running_handles</span> points to will contain the number of still running easy handles within the multi handle. When this number reaches zero, all transfers are complete/done. Note that when you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> on a specific socket and the counter decreases by one, it DOES NOT necessarily mean that this exact socket/transfer is the one that completed. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out which easy handle that completed.
-<p class="level0">The <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> functions inform the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION option to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. They update the status with changes since the previous time the callback was called.
-<p class="level0">Get the timeout time by setting the <span Class="emphasis">CURLMOPT_TIMERFUNCTION</span> option with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. Your application will then get called with information on how long to wait for socket actions at most before doing the timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT. You can also use the <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value.
-<p class="level0">Usage of <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> is deprecated, whereas the function is equivalent to <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="bold">ev_bitmask</span> set to 0.
-<p class="level0">Force libcurl to (re-)check all its internal sockets and transfers instead of just a single one by calling <a class="bold" href="./curl_multi_socket_all.html">curl_multi_socket_all(3)</a>. Note that there should not be any reason to use this function! <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK DETAILS</h2>
-<p class="level0">
-<p class="level0">The socket <span Class="bold">callback</span> function uses a prototype like this <pre>
-<p class="level0"><p class="level0"> int curl_socket_callback(CURL *easy, /* easy handle */
- curl_socket_t s, /* socket */
- int action, /* see values below */
- void *userp, /* private callback pointer */
- void *socketp); /* private socket pointer */
- <p class="level0"></pre>
-
-<p class="level0">The callback MUST return 0.
-<p class="level0">The <span Class="emphasis">easy</span> argument is a pointer to the easy handle that deals with this particular socket. Note that a single handle may work with several sockets simultaneously.
-<p class="level0">The <span Class="emphasis">s</span> argument is the actual socket value as you use it within your system.
-<p class="level0">The <span Class="emphasis">action</span> argument to the callback has one of five values:
-<p class="level1">
-<p class="level0"><a name="CURLPOLLNONE"></a><span class="nroffip">CURL_POLL_NONE (0)</span>
-<p class="level1">register, not interested in readiness (yet)
-<p class="level0"><a name="CURLPOLLIN"></a><span class="nroffip">CURL_POLL_IN (1)</span>
-<p class="level1">register, interested in read readiness
-<p class="level0"><a name="CURLPOLLOUT"></a><span class="nroffip">CURL_POLL_OUT (2)</span>
-<p class="level1">register, interested in write readiness
-<p class="level0"><a name="CURLPOLLINOUT"></a><span class="nroffip">CURL_POLL_INOUT (3)</span>
-<p class="level1">register, interested in both read and write readiness
-<p class="level0"><a name="CURLPOLLREMOVE"></a><span class="nroffip">CURL_POLL_REMOVE (4)</span>
-<p class="level1">unregister
-<p class="level0">
-<p class="level0">The <span Class="emphasis">socketp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to be associated with the <span Class="emphasis">s</span> socket. If no pointer has been set, socketp will be NULL. This argument is of course a service to applications that want to keep certain data or structs that are strictly associated to the given socket.
-<p class="level0">The <span Class="emphasis">userp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the CURLMOPT_SOCKETDATA option. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Legacy: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> again, before you wait for more actions on libcurl's sockets. You don't have to do it immediately, but the return code means that libcurl may have more data available to return or that there may be more data to send off before it is "satisfied".
-<p class="level0">In modern libcurls, <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span> or <span Class="emphasis">CURLM_CALL_MULTI_SOKCET</span> should not be returned and no application needs to care about them.
-<p class="level0">NOTE that the return code is for the whole multi stack. Problems still might have occurred on individual transfers even when one of these functions return OK. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">1. Create a multi handle
-<p class="level0">2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
-<p class="level0">3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what timeout value to use when waiting for socket activities.
-<p class="level0">4. Add easy handles with curl_multi_add_handle()
-<p class="level0">5. Provide some means to manage the sockets libcurl is using, so you can check them for activity. This can be done through your application code, or by way of an external library such as libevent or glib.
-<p class="level0">6. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told
-<p class="level0">7, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span>
-<p class="level0">8. Go back to step 6. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
-<p class="level0"><a class="emphasis" href="./curl_multi_socket.html">curl_multi_socket(3)</a> is deprecated, use <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> instead! <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">the hiperfifo.c example</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_socket.pdf b/docs/libcurl/curl_multi_socket.pdf
deleted file mode 100644
index edbe43c..0000000
--- a/docs/libcurl/curl_multi_socket.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket_action.3 b/docs/libcurl/curl_multi_socket_action.3
index 94e6f10..45b6105 100644
--- a/docs/libcurl/curl_multi_socket_action.3
+++ b/docs/libcurl/curl_multi_socket_action.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_socket_action \- reads/writes available data given an action
@@ -18,7 +38,9 @@
\fBev_bitmask\fP to 0, and then adding using bitwise OR (|) any combination of
events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or
CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and
-libcurl will test the descriptor internally.
+libcurl will test the descriptor internally. It is also permissible to pass
+CURL_SOCKET_TIMEOUT to the \fBsockfd\fP parameter in order to initiate the
+whole process or when a timeout occurs.
At return, the integer \fBrunning_handles\fP points to will contain the number
of running easy handles within the multi handle. When this number reaches
@@ -51,7 +73,10 @@
curl_socket_t s, /* socket */
int action, /* see values below */
void *userp, /* private callback pointer */
- void *socketp); /* private socket pointer */
+ void *socketp); /* private socket pointer,
+ \fBNULL\fP if not
+ previously assigned with
+ \fBcurl_multi_assign(3)\fP */
.fi
The callback MUST return 0.
@@ -112,15 +137,15 @@
them for activity. This can be done through your application code, or by way
of an external library such as libevent or glib.
-6. Call curl_multi_socket_action() to kickstart everything. To get one or more
-callbacks called.
+6. Call curl_multi_socket_action(..., CURL_SOCKET_TIMEOUT, 0, ...)
+to kickstart everything. To get one or more callbacks called.
7. Wait for activity on any of libcurl's sockets, use the timeout value your
-callback has been told
+callback has been told.
8, When activity is detected, call curl_multi_socket_action() for the
socket(s) that got action. If no activity is detected and the timeout expires,
-call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
+call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP.
.SH AVAILABILITY
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
.SH "SEE ALSO"
diff --git a/docs/libcurl/curl_multi_socket_action.html b/docs/libcurl/curl_multi_socket_action.html
deleted file mode 100644
index eee2bde..0000000
--- a/docs/libcurl/curl_multi_socket_action.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<html><head>
-<title>curl_multi_socket_action man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_socket_action - reads/writes available data given an action <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0">#include <curl/curl.h>
- <p class="level0">CURLMcode curl_multi_socket_action(CURLM * multi_handle,
- curl_socket_t sockfd, int ev_bitmask,
- int *running_handles);
- </pre>
-
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When the application has detected action on a socket handled by libcurl, it should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with the <span Class="bold">sockfd</span> argument set to the socket with the action. When the events on a socket are known, they can be passed as an events bitmask <span Class="bold">ev_bitmask</span> by first setting <span Class="bold">ev_bitmask</span> to 0, and then adding using bitwise OR (|) any combination of events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and libcurl will test the descriptor internally.
-<p class="level0">At return, the integer <span Class="bold">running_handles</span> points to will contain the number of running easy handles within the multi handle. When this number reaches zero, all transfers are complete/done. When you call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> on a specific socket and the counter decreases by one, it DOES NOT necessarily mean that this exact socket/transfer is the one that completed. Use <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> to figure out which easy handle that completed.
-<p class="level0">The <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> functions inform the application about updates in the socket (file descriptor) status by doing none, one, or multiple calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION option to <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. They update the status with changes since the previous time the callback was called.
-<p class="level0">Get the timeout time by setting the <span Class="emphasis">CURLMOPT_TIMERFUNCTION</span> option with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a>. Your application will then get called with information on how long to wait for socket actions at most before doing the timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT. You can also use the <a class="emphasis" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> function to poll the value at any given time, but for an event-based system using the callback is far better than relying on polling the timeout value. <a name="CALLBACK"></a><h2 class="nroffsh">CALLBACK DETAILS</h2>
-<p class="level0">
-<p class="level0">The socket <span Class="bold">callback</span> function uses a prototype like this <pre>
-<p class="level0"><p class="level0"> int curl_socket_callback(CURL *easy, /* easy handle */
- curl_socket_t s, /* socket */
- int action, /* see values below */
- void *userp, /* private callback pointer */
- void *socketp); /* private socket pointer */
- <p class="level0"></pre>
-
-<p class="level0">The callback MUST return 0.
-<p class="level0">The <span Class="emphasis">easy</span> argument is a pointer to the easy handle that deals with this particular socket. Note that a single handle may work with several sockets simultaneously.
-<p class="level0">The <span Class="emphasis">s</span> argument is the actual socket value as you use it within your system.
-<p class="level0">The <span Class="emphasis">action</span> argument to the callback has one of five values:
-<p class="level1">
-<p class="level0"><a name="CURLPOLLNONE"></a><span class="nroffip">CURL_POLL_NONE (0)</span>
-<p class="level1">register, not interested in readiness (yet)
-<p class="level0"><a name="CURLPOLLIN"></a><span class="nroffip">CURL_POLL_IN (1)</span>
-<p class="level1">register, interested in read readiness
-<p class="level0"><a name="CURLPOLLOUT"></a><span class="nroffip">CURL_POLL_OUT (2)</span>
-<p class="level1">register, interested in write readiness
-<p class="level0"><a name="CURLPOLLINOUT"></a><span class="nroffip">CURL_POLL_INOUT (3)</span>
-<p class="level1">register, interested in both read and write readiness
-<p class="level0"><a name="CURLPOLLREMOVE"></a><span class="nroffip">CURL_POLL_REMOVE (4)</span>
-<p class="level1">unregister
-<p class="level0">
-<p class="level0">The <span Class="emphasis">socketp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_assign.html">curl_multi_assign(3)</a> to be associated with the <span Class="emphasis">s</span> socket. If no pointer has been set, socketp will be NULL. This argument is of course a service to applications that want to keep certain data or structs that are strictly associated to the given socket.
-<p class="level0">The <span Class="emphasis">userp</span> argument is a private pointer you have previously set with <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and the CURLMOPT_SOCKETDATA option. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLMcode type, general libcurl multi interface error code.
-<p class="level0">Before version 7.20.0: If you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> again before you wait for more actions on libcurl's sockets. You don't have to do it immediately, but the return code means that libcurl may have more data available to return or that there may be more data to send off before it is "satisfied".
-<p class="level0">The return code from this function is for the whole multi stack. Problems still might have occurred on individual transfers even when one of these functions return OK. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">1. Create a multi handle
-<p class="level0">2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
-<p class="level0">3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what timeout value to use when waiting for socket activities.
-<p class="level0">4. Add easy handles with curl_multi_add_handle()
-<p class="level0">5. Provide some means to manage the sockets libcurl is using, so you can check them for activity. This can be done through your application code, or by way of an external library such as libevent or glib.
-<p class="level0">6. Call curl_multi_socket_action() to kickstart everything. To get one or more callbacks called.
-<p class="level0">7. Wait for activity on any of libcurl's sockets, use the timeout value your callback has been told
-<p class="level0">8, When activity is detected, call curl_multi_socket_action() for the socket(s) that got action. If no activity is detected and the timeout expires, call <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> with <span Class="emphasis">CURL_SOCKET_TIMEOUT</span> <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_cleanup.html">curl_multi_cleanup (3)</a> <a class="manpage" href="./curl_multi_init.html"> curl_multi_init (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <span Class="manpage">the hiperfifo.c example</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_socket_action.pdf b/docs/libcurl/curl_multi_socket_action.pdf
deleted file mode 100644
index c40e8d6..0000000
--- a/docs/libcurl/curl_multi_socket_action.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_socket_all.3 b/docs/libcurl/curl_multi_socket_all.3
new file mode 100644
index 0000000..428dd06
--- /dev/null
+++ b/docs/libcurl/curl_multi_socket_all.3
@@ -0,0 +1 @@
+.so man3/curl_multi_socket.3
diff --git a/docs/libcurl/curl_multi_strerror.3 b/docs/libcurl/curl_multi_strerror.3
index 2d9801d..40d0974 100644
--- a/docs/libcurl/curl_multi_strerror.3
+++ b/docs/libcurl/curl_multi_strerror.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_multi_strerror - return string describing error code
diff --git a/docs/libcurl/curl_multi_strerror.html b/docs/libcurl/curl_multi_strerror.html
deleted file mode 100644
index ac885aa..0000000
--- a/docs/libcurl/curl_multi_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_multi_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<span Class="bold">const char *curl_multi_strerror(CURLMcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_multi_strerror() function returns a string describing the CURLMcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_easy_strerror.html"> curl_easy_strerror (3)</a> <a class="manpage" href="./curl_share_strerror.html"> curl_share_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_strerror.pdf b/docs/libcurl/curl_multi_strerror.pdf
deleted file mode 100644
index 12a9cf7..0000000
--- a/docs/libcurl/curl_multi_strerror.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_timeout.3 b/docs/libcurl/curl_multi_timeout.3
index 9e53d0b..f0c9079 100644
--- a/docs/libcurl/curl_multi_timeout.3
+++ b/docs/libcurl/curl_multi_timeout.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_multi_timeout 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_timeout \- how long to wait for action before proceeding
@@ -22,13 +42,29 @@
immediately without waiting for anything. If it returns -1, there's no timeout
at all set.
-An application that uses the multi_socket API SHOULD not use this function, but
+An application that uses the multi_socket API SHOULD NOT use this function, but
SHOULD instead use \fIcurl_multi_setopt(3)\fP and its
\fPCURLMOPT_TIMERFUNCTION\fP option for proper and desired behavior.
Note: if libcurl returns a -1 timeout here, it just means that libcurl
currently has no stored timeout value. You must not wait too long (more than a
few seconds perhaps) before you call curl_multi_perform() again.
+.SH EXAMPLE
+.nf
+struct timeval timeout;
+long timeo;
+
+curl_multi_timeout(multi_handle, &timeo);
+if(timeo < 0)
+ /* no set timeout, use a default */
+ timeo = 980;
+
+timeout.tv_sec = timeo / 1000;
+timeout.tv_usec = (timeo % 1000) * 1000;
+
+/* wait for activities no longer than the set timeout */
+select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+.fi
.SH "RETURN VALUE"
The standard CURLMcode for multi interface error codes.
.SH "TYPICAL USAGE"
diff --git a/docs/libcurl/curl_multi_timeout.html b/docs/libcurl/curl_multi_timeout.html
deleted file mode 100644
index 78a383f..0000000
--- a/docs/libcurl/curl_multi_timeout.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<html><head>
-<title>curl_multi_timeout man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_multi_timeout - how long to wait for action before proceeding <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0">#include <curl/curl.h>
-<p class="level0">CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout); <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">
-<p class="level0">An application using the libcurl multi interface should call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a> to figure out how long it should wait for socket actions - at most - before proceeding.
-<p class="level0">Proceeding means either doing the socket-style timeout action: call the <a class="bold" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function with the <span Class="bold">sockfd</span> argument set to CURL_SOCKET_TIMEOUT, or call <a class="bold" href="./curl_multi_perform.html">curl_multi_perform(3)</a> if you're using the simpler and older multi interface approach.
-<p class="level0">The timeout value returned in the long <span Class="bold">timeout</span> points to, is in number of milliseconds at this very moment. If 0, it means you should proceed immediately without waiting for anything. If it returns -1, there's no timeout at all set.
-<p class="level0">An application that uses the multi_socket API SHOULD not use this function, but SHOULD instead use <a class="emphasis" href="./curl_multi_setopt.html">curl_multi_setopt(3)</a> and its </span>CURLMOPT_TIMERFUNCTION</span> option for proper and desired behavior.
-<p class="level0">Note: if libcurl returns a -1 timeout here, it just means that libcurl currently has no stored timeout value. You must not wait too long (more than a few seconds perhaps) before you call curl_multi_perform() again. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">The standard CURLMcode for multi interface error codes. <a name="TYPICAL"></a><h2 class="nroffsh">TYPICAL USAGE</h2>
-<p class="level0">Call <a class="bold" href="./curl_multi_timeout.html">curl_multi_timeout(3)</a>, then wait for action on the sockets. You figure out which sockets to wait for by calling <a class="bold" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> or by a previous call to <a class="bold" href="./curl_multi_socket.html">curl_multi_socket(3)</a>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.15.4. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_multi_fdset.html">curl_multi_fdset (3)</a> <a class="manpage" href="./curl_multi_info_read.html"> curl_multi_info_read (3)</a> <span Class="manpage"> </span> <a class="manpage" href="./curl_multi_socket.html">curl_multi_socket (3)</a> <a class="manpage" href="./curl_multi_setopt.html"> curl_multi_setopt (3) </a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_multi_timeout.pdf b/docs/libcurl/curl_multi_timeout.pdf
deleted file mode 100644
index 90d744c..0000000
--- a/docs/libcurl/curl_multi_timeout.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_multi_wait.3 b/docs/libcurl/curl_multi_wait.3
new file mode 100644
index 0000000..45c2e8c
--- /dev/null
+++ b/docs/libcurl/curl_multi_wait.3
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.TH curl_multi_wait 3 "12 Jul 2012" "libcurl 7.28.0" "libcurl Manual"
+.SH NAME
+curl_multi_wait - polls on all easy handles in a multi handle
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLMcode curl_multi_wait(CURLM *multi_handle,
+ struct curl_waitfd extra_fds[],
+ unsigned int extra_nfds,
+ int timeout_ms,
+ int *numfds);
+.ad
+.SH DESCRIPTION
+\fIcurl_multi_wait(3)\fP polls all file descriptors used by the curl easy
+handles contained in the given multi handle set. It will block until activity
+is detected on at least one of the handles or \fItimeout_ms\fP has passed.
+Alternatively, if the multi handle has a pending internal timeout that has a
+shorter expiry time than \fItimeout_ms\fP, that shorter time will be used
+instead to make sure timeout accuracy is reasonably kept.
+
+The calling application may pass additional curl_waitfd structures which are
+similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call.
+
+On completion, if \fInumfds\fP is non-NULL, it will be populated with the
+total number of file descriptors on which interesting events occurred. This
+number can include both libcurl internal descriptors as well as descriptors
+provided in \fIextra_fds\fP.
+
+If no extra file descriptors are provided and libcurl has no file descriptor
+to offer to wait for, this function will return immediately.
+
+This function is encouraged to be used instead of select(3) when using the
+multi interface to allow applications to easier circumvent the common problem
+with 1024 maximum file descriptors.
+.SH curl_waitfd
+.nf
+struct curl_waitfd {
+ curl_socket_t fd;
+ short events;
+ short revents;
+};
+.fi
+.IP CURL_WAIT_POLLIN
+Bit flag to curl_waitfd.events indicating the socket should poll on read
+events such as new data received.
+.IP CURL_WAIT_POLLPRI
+Bit flag to curl_waitfd.events indicating the socket should poll on high
+priority read events such as out of band data.
+.IP CURL_WAIT_POLLOUT
+Bit flag to curl_waitfd.events indicating the socket should poll on write
+events such as the socket being clear to write without blocking.
+.SH RETURN VALUE
+CURLMcode type, general libcurl multi interface error code. See
+\fIlibcurl-errors(3)\fP
+.SH AVAILABILITY
+This function was added in libcurl 7.28.0.
+.SH "SEE ALSO"
+.BR curl_multi_fdset "(3), " curl_multi_perform "(3)"
diff --git a/docs/libcurl/curl_share_cleanup.3 b/docs/libcurl/curl_share_cleanup.3
index 222197c..3af1707 100644
--- a/docs/libcurl/curl_share_cleanup.3
+++ b/docs/libcurl/curl_share_cleanup.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_cleanup - Clean up a shared object
diff --git a/docs/libcurl/curl_share_cleanup.html b/docs/libcurl/curl_share_cleanup.html
deleted file mode 100644
index 758f1e9..0000000
--- a/docs/libcurl/curl_share_cleanup.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_share_cleanup man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_cleanup - Clean up a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLSHcode curl_share_cleanup(CURLSH * share_handle );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function deletes a shared object. The share handle cannot be used anymore when this function has been called.
-<p class="level0"><a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis"><curl/curl.h></span> defines. See the <span Class="emphasis">libcurl-errors.3</span> man page for the full list with descriptions. If an error occurs, then the share object will not be deleted. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_init.html">curl_share_init (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_cleanup.pdf b/docs/libcurl/curl_share_cleanup.pdf
deleted file mode 100644
index 74cab9c..0000000
--- a/docs/libcurl/curl_share_cleanup.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3
index 871519c..4833a8a 100644
--- a/docs/libcurl/curl_share_init.3
+++ b/docs/libcurl/curl_share_init.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_share_init 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_init - Create a shared object
@@ -13,9 +33,9 @@
documentation. This init call MUST have a corresponding call to
\fIcurl_share_cleanup\fP when all operations using the share are complete.
-This \fIshare handle\fP is what you pass to curl using the \fICURLOPT_SHARE\fP
-option with \fIcurl_easy_setopt(3)\fP, to make that specific curl handle use
-the data in this share.
+This \fIshare handle\fP is what you pass to curl using the
+\fICURLOPT_SHARE(3)\fP option with \fIcurl_easy_setopt(3)\fP, to make that
+specific curl handle use the data in this share.
.SH RETURN VALUE
If this function returns NULL, something went wrong (out of memory, etc.)
and therefore the share object was not created.
diff --git a/docs/libcurl/curl_share_init.html b/docs/libcurl/curl_share_init.html
deleted file mode 100644
index cbc8231..0000000
--- a/docs/libcurl/curl_share_init.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html><head>
-<title>curl_share_init man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_init - Create a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">CURLSH *curl_share_init( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This function returns a CURLSH handle to be used as input to all the other share-functions, sometimes referred to as a share handle in some places in the documentation. This init call MUST have a corresponding call to <span Class="emphasis">curl_share_cleanup</span> when all operations using the share are complete.
-<p class="level0">This <span Class="emphasis">share handle</span> is what you pass to curl using the <span Class="emphasis">CURLOPT_SHARE</span> option with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, to make that specific curl handle use the data in this share. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">If this function returns NULL, something went wrong (out of memory, etc.) and therefore the share object was not created. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_cleanup.html">curl_share_cleanup (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_init.pdf b/docs/libcurl/curl_share_init.pdf
deleted file mode 100644
index 02bf1c6..0000000
--- a/docs/libcurl/curl_share_init.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_setopt.3 b/docs/libcurl/curl_share_setopt.3
index 351360d..c196743 100644
--- a/docs/libcurl/curl_share_setopt.3
+++ b/docs/libcurl/curl_share_setopt.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
.SH NAME
curl_share_setopt - Set options for a shared object
@@ -44,6 +64,11 @@
object. Note that when you use the multi interface, all easy handles added to
the same multi handle will share DNS cache by default without this having to
be used!
+.IP CURL_LOCK_DATA_SSL_SESSION
+SSL session IDs will be shared across the easy handles using this shared
+object. This will reduce the time spent in the SSL handshake when reconnecting
+to the same server. Note SSL session IDs are reused within the same easy handle
+by default.
.RE
.IP CURLSHOPT_UNSHARE
This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
diff --git a/docs/libcurl/curl_share_setopt.html b/docs/libcurl/curl_share_setopt.html
deleted file mode 100644
index 4392387..0000000
--- a/docs/libcurl/curl_share_setopt.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<html><head>
-<title>curl_share_setopt man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_setopt - Set options for a shared object <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0">CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Set the <span Class="emphasis">option</span> to <span Class="emphasis">parameter</span> for the given <span Class="emphasis">share</span>. <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2>
-<p class="level0">
-<p class="level0"><a name="CURLSHOPTLOCKFUNC"></a><span class="nroffip">CURLSHOPT_LOCKFUNC</span>
-<p class="level1">The <span Class="emphasis">parameter</span> must be a pointer to a function matching the following prototype:
-<p class="level1">void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access, void *userptr);
-<p class="level1"><span Class="emphasis">data</span> defines what data libcurl wants to lock, and you must make sure that only one lock is given at any time for each kind of data.
-<p class="level1"><span Class="emphasis">access</span> defines what access type libcurl wants, shared or single.
-<p class="level1"><span Class="emphasis">userptr</span> is the pointer you set with <a class="emphasis" href="#CURLSHOPTUSERDATA">CURLSHOPT_USERDATA</a>.
-<p class="level0"><a name="CURLSHOPTUNLOCKFUNC"></a><span class="nroffip">CURLSHOPT_UNLOCKFUNC</span>
-<p class="level1">The <span Class="emphasis">parameter</span> must be a pointer to a function matching the following prototype:
-<p class="level1">void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
-<p class="level1"><span Class="emphasis">data</span> defines what data libcurl wants to unlock, and you must make sure that only one lock is given at any time for each kind of data.
-<p class="level1"><span Class="emphasis">userptr</span> is the pointer you set with <a class="emphasis" href="#CURLSHOPTUSERDATA">CURLSHOPT_USERDATA</a>.
-<p class="level0"><a name="CURLSHOPTSHARE"></a><span class="nroffip">CURLSHOPT_SHARE</span>
-<p class="level1">The <span Class="emphasis">parameter</span> specifies a type of data that should be shared. This may be set to one of the values described below.
-<p class="level2">
-<p class="level1"><a name="CURLLOCKDATACOOKIE"></a><span class="nroffip">CURL_LOCK_DATA_COOKIE</span>
-<p class="level2">Cookie data will be shared across the easy handles using this shared object.
-<p class="level1"><a name="CURLLOCKDATADNS"></a><span class="nroffip">CURL_LOCK_DATA_DNS</span>
-<p class="level2">Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to the same multi handle will share DNS cache by default without this having to be used!
-<p class="level1">
-<p class="level0"><a name="CURLSHOPTUNSHARE"></a><span class="nroffip">CURLSHOPT_UNSHARE</span>
-<p class="level1">This option does the opposite of <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>. It specifies that the specified <span Class="emphasis">parameter</span> will no longer be shared. Valid values are the same as those for <a class="emphasis" href="#CURLSHOPTSHARE">CURLSHOPT_SHARE</a>.
-<p class="level0"><a name="CURLSHOPTUSERDATA"></a><span class="nroffip">CURLSHOPT_USERDATA</span>
-<p class="level1">The <span Class="emphasis">parameter</span> allows you to specify a pointer to data that will be passed to the lock_function and unlock_function each time it is called. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <span Class="emphasis"><curl/curl.h></span> defines. See the <span Class="emphasis">libcurl-errors.3</span> man page for the full list with descriptions. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_cleanup.html">curl_share_cleanup (3)</a> <a class="manpage" href="./curl_share_init.html"> curl_share_init (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_setopt.pdf b/docs/libcurl/curl_share_setopt.pdf
deleted file mode 100644
index 5cf8958..0000000
--- a/docs/libcurl/curl_share_setopt.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_share_strerror.3 b/docs/libcurl/curl_share_strerror.3
index 69087db..f1bc398 100644
--- a/docs/libcurl/curl_share_strerror.3
+++ b/docs/libcurl/curl_share_strerror.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_share_strerror - return string describing error code
diff --git a/docs/libcurl/curl_share_strerror.html b/docs/libcurl/curl_share_strerror.html
deleted file mode 100644
index 0b5b050..0000000
--- a/docs/libcurl/curl_share_strerror.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_share_strerror man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_share_strerror - return string describing error code <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><pre>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<span Class="bold">const char *curl_share_strerror(CURLSHcode errornum );</span>
-</pre>
-<a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The curl_share_strerror() function returns a string describing the CURLSHcode error code passed in the argument <span Class="emphasis">errornum</span>. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">This function was added in libcurl 7.12.0 <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">libcurl-errors (3)</span> <a class="manpage" href="./curl_multi_strerror.html"> curl_multi_strerror (3)</a> <a class="manpage" href="./curl_easy_strerror.html"> curl_easy_strerror (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_share_strerror.pdf b/docs/libcurl/curl_share_strerror.pdf
deleted file mode 100644
index 9ee7798..0000000
--- a/docs/libcurl/curl_share_strerror.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_slist_append.3 b/docs/libcurl/curl_slist_append.3
index 5cca9b7..529560e 100644
--- a/docs/libcurl/curl_slist_append.3
+++ b/docs/libcurl/curl_slist_append.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
.SH NAME
curl_slist_append - add a string to an slist
diff --git a/docs/libcurl/curl_slist_append.html b/docs/libcurl/curl_slist_append.html
deleted file mode 100644
index 50436e8..0000000
--- a/docs/libcurl/curl_slist_append.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<html><head>
-<title>curl_slist_append man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_slist_append - add a string to an slist <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">struct curl_slist *curl_slist_append(struct curl_slist * list,</span> <span Class="bold">const char * string );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_slist_append() appends a specified string to a linked list of strings. The existing <span Class="emphasis">list</span> should be passed as the first argument while the new list is returned from this function. The specified <span Class="emphasis">string</span> has been appended when this function returns. curl_slist_append() copies the string.
-<p class="level0">The list should be freed again (after usage) with <a class="bold" href="./curl_slist_free_all.html">curl_slist_free_all(3)</a>. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A null pointer is returned if anything went wrong, otherwise the new list pointer is returned. <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
-<p class="level0"><pre>
-<p class="level0"> CURL handle;
- struct curl_slist *slist=NULL;
- <p class="level0"> slist = curl_slist_append(slist, "pragma:");
- curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
- <p class="level0"> curl_easy_perform(handle);
- <p class="level0"> curl_slist_free_all(slist); /* free the list again */
- </pre>
-
-<p class="level0"><a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_slist_free_all.html">curl_slist_free_all (3)</a> <span Class="manpage"> </span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_slist_append.pdf b/docs/libcurl/curl_slist_append.pdf
deleted file mode 100644
index 9aa31a6..0000000
--- a/docs/libcurl/curl_slist_append.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_slist_free_all.3 b/docs/libcurl/curl_slist_free_all.3
index ec1b360..fab3d60 100644
--- a/docs/libcurl/curl_slist_free_all.3
+++ b/docs/libcurl/curl_slist_free_all.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
.SH NAME
curl_slist_free_all - free an entire curl_slist list
diff --git a/docs/libcurl/curl_slist_free_all.html b/docs/libcurl/curl_slist_free_all.html
deleted file mode 100644
index 76a0a9d..0000000
--- a/docs/libcurl/curl_slist_free_all.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<html><head>
-<title>curl_slist_free_all man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_slist_free_all - free an entire curl_slist list <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">void curl_slist_free_all(struct curl_slist * list);</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">curl_slist_free_all() removes all traces of a previously built curl_slist linked list. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Nothing. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_slist_append.html">curl_slist_append (3)</a> <span Class="manpage"> </span>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_slist_free_all.pdf b/docs/libcurl/curl_slist_free_all.pdf
deleted file mode 100644
index a48fb6f..0000000
--- a/docs/libcurl/curl_slist_free_all.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_strequal.3 b/docs/libcurl/curl_strequal.3
index 8ab4234..ce575d7 100644
--- a/docs/libcurl/curl_strequal.3
+++ b/docs/libcurl/curl_strequal.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, 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 http://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_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
.SH NAME
curl_strequal, curl_strnequal - case insensitive string comparisons
diff --git a/docs/libcurl/curl_strequal.html b/docs/libcurl/curl_strequal.html
deleted file mode 100644
index eefdf10..0000000
--- a/docs/libcurl/curl_strequal.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html><head>
-<title>curl_strequal man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_strequal, curl_strnequal - case insensitive string comparisons <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">int curl_strequal(char * str1 , char * str2 );</span>
-<p class="level0"><span Class="bold">int curl_strenqual(char * str1 , char * str2 , size_t len );</span> <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">The <span Class="bold">curl_strequal()</span> function compares the two strings <span Class="emphasis">str1</span> and <span Class="emphasis">str2</span>, ignoring the case of the characters. It returns a non-zero (TRUE) integer if the strings are identical.
-<p class="level0">The <span Class="bold">curl_strnequal()</span> function is similar, except it only compares the first <span Class="emphasis">len</span> characters of <span Class="emphasis">str1</span>.
-<p class="level0">These functions are provided by libcurl to enable applications to compare strings in a truly portable manner. There are no standard portable case insensitive string comparison functions. These two work on all platforms. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">These functions will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_strequal() and curlx_strenqual(). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">Non-zero if the strings are identical. Zero if they're not. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="manpage">strcmp (3)</span> <span Class="manpage"> strcasecmp (3)</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_strequal.pdf b/docs/libcurl/curl_strequal.pdf
deleted file mode 100644
index e48fc08..0000000
--- a/docs/libcurl/curl_strequal.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_strnequal.3 b/docs/libcurl/curl_strnequal.3
new file mode 100644
index 0000000..ce41d3e
--- /dev/null
+++ b/docs/libcurl/curl_strnequal.3
@@ -0,0 +1 @@
+.so man3/curl_strequal.3
diff --git a/docs/libcurl/curl_unescape.3 b/docs/libcurl/curl_unescape.3
index 9bb470f..8d16852 100644
--- a/docs/libcurl/curl_unescape.3
+++ b/docs/libcurl/curl_unescape.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
.SH NAME
curl_unescape - URL decodes the given string
@@ -20,11 +38,11 @@
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
input 'url' string to find out the size.
-You must curl_free() the returned string when you're done with it.
+You must \fIcurl_free(3)\fP the returned string when you're done with it.
.SH AVAILABILITY
Since 7.15.4, \fIcurl_easy_unescape(3)\fP should be used. This function will
be removed in a future release.
.SH RETURN VALUE
A pointer to a zero terminated string or NULL if it failed.
.SH "SEE ALSO"
-.I curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396
+.br curl_easy_escape "(3)," curl_easy_unescape "(3)," curl_free "(3)," RFC 2396
diff --git a/docs/libcurl/curl_unescape.html b/docs/libcurl/curl_unescape.html
deleted file mode 100644
index 5e34606..0000000
--- a/docs/libcurl/curl_unescape.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head>
-<title>curl_unescape man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_unescape - URL decodes the given string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_unescape( char * url , int length );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Obsolete function. Use <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> instead!
-<p class="level0">This function will convert the given URL encoded input string to a "plain string" and return that as a new allocated string. All input characters that are URL encoded (%XX where XX is a two-digit hexadecimal number) will be converted to their plain text versions.
-<p class="level0">If the 'length' argument is set to 0, curl_unescape() will use strlen() on the input 'url' string to find out the size.
-<p class="level0">You must curl_free() the returned string when you're done with it. <a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
-<p class="level0">Since 7.15.4, <a class="emphasis" href="./curl_easy_unescape.html">curl_easy_unescape(3)</a> should be used. This function will be removed in a future release. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string or NULL if it failed. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><span Class="emphasis">curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396</span> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_unescape.pdf b/docs/libcurl/curl_unescape.pdf
deleted file mode 100644
index ebce79b..0000000
--- a/docs/libcurl/curl_unescape.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_version.3 b/docs/libcurl/curl_version.3
index 24793ca..03922c9 100644
--- a/docs/libcurl/curl_version.3
+++ b/docs/libcurl/curl_version.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
.SH NAME
curl_version - returns the libcurl version string
@@ -12,7 +30,10 @@
.SH DESCRIPTION
Returns a human readable string with the version number of libcurl and some of
its important components (like OpenSSL version).
+
+We recommend using \fIcurl_version_info(3)\fP instead!
.SH RETURN VALUE
-A pointer to a zero terminated string.
+A pointer to a zero terminated string. The string resides in a statically
+allocated buffer and must not be freed by the caller.
.SH "SEE ALSO"
.BR curl_version_info "(3)"
diff --git a/docs/libcurl/curl_version.html b/docs/libcurl/curl_version.html
deleted file mode 100644
index d2f1032..0000000
--- a/docs/libcurl/curl_version.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<html><head>
-<title>curl_version man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_version - returns the libcurl version string <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">char *curl_version( );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Returns a human readable string with the version number of libcurl and some of its important components (like OpenSSL version). <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a zero terminated string. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_version_info.html">curl_version_info (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_version.pdf b/docs/libcurl/curl_version.pdf
deleted file mode 100644
index ba9bc8c..0000000
--- a/docs/libcurl/curl_version.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/curl_version_info.3 b/docs/libcurl/curl_version_info.3
index 4481830..e9d5ab7 100644
--- a/docs/libcurl/curl_version_info.3
+++ b/docs/libcurl/curl_version_info.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH curl_version_info 3 "10 June 2009" "libcurl 7.19.6" "libcurl Manual"
+.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
@@ -29,12 +29,13 @@
.BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
.ad
.SH DESCRIPTION
-Returns a pointer to a filled in struct with information about various
-run-time features in 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. CURLVERSION_NOW will be the most
-recent one for the library you have installed:
+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);
@@ -56,7 +57,7 @@
char *ssl_version; /* human readable string */
long ssl_version_num; /* not used, always zero */
const char *libz_version; /* human readable string */
- const char **protocols; /* list of protocols */
+ const char * const *protocols; /* protocols */
/* when 'age' is 1 or higher, the members below also exist: */
const char *ares; /* human readable string */
@@ -65,7 +66,8 @@
/* when 'age' is 2 or higher, the member below also exists: */
const char *libidn; /* human readable string */
- /* when 'age' is 3 or higher, the members below also exist: */
+ /* 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 */
@@ -94,7 +96,10 @@
.IP CURL_VERSION_IPV6
supports IPv6
.IP CURL_VERSION_KERBEROS4
-supports kerberos4 (when using FTP)
+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
@@ -122,18 +127,33 @@
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 NTLM authentication. It also
-allows libcurl to use the current user and the current user's password without
-the app having to pass them on. (Added in 7.13.2)
+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)
.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 the numerical OpenSSL version value as defined by the
-OpenSSL project. If libcurl has no SSL support, this is 0.
+\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.
diff --git a/docs/libcurl/curl_version_info.html b/docs/libcurl/curl_version_info.html
deleted file mode 100644
index b6602bf..0000000
--- a/docs/libcurl/curl_version_info.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<html><head>
-<title>curl_version_info man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">curl_version_info - returns run-time libcurl version info <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
-<p class="level0"><span Class="bold">#include <curl/curl.h></span>
-<p class="level0"><span Class="bold">curl_version_info_data *curl_version_info( CURLversion type );</span>
-<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">Returns a pointer to a filled in struct with information about various run-time features in libcurl. <span Class="emphasis">type</span> 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. CURLVERSION_NOW will be the most recent one for the library you have installed:
-<p class="level0"> data = curl_version_info(CURLVERSION_NOW);
-<p class="level0">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.
-<p class="level0">The curl_version_info_data struct looks like this
-<p class="level0"><pre>
-<p class="level0">typedef struct {
- CURLversion age; /* see description below */
- <p class="level0"> /* 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 **protocols; /* list of protocols */
- <p class="level0"> /* when 'age' is 1 or higher, the members below also exist: */
- const char *ares; /* human readable string */
- int ares_num; /* number */
- <p class="level0"> /* when 'age' is 2 or higher, the member below also exists: */
- const char *libidn; /* human readable string */
- <p class="level0"> /* when 'age' is 3 or higher, the members below also exist: */
- int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
- <p class="level0"> const char *libssh_version; /* human readable string */
- <p class="level0">} curl_version_info_data;
- </pre>
-
-<p class="level0">
-<p class="level0"><span Class="emphasis">age</span> 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.
-<p class="level0"><span Class="emphasis">version</span> is just an ascii string for the libcurl version.
-<p class="level0"><span Class="emphasis">version_num</span> 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.
-<p class="level0"><span Class="emphasis">host</span> 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.
-<p class="level0"><span Class="emphasis">features</span> can have none, one or more bits set, and the currently defined bits are:
-<p class="level1">
-<p class="level0"><a name="CURLVERSIONIPV6"></a><span class="nroffip">CURL_VERSION_IPV6</span>
-<p class="level1">supports IPv6
-<p class="level0"><a name="CURLVERSIONKERBEROS4"></a><span class="nroffip">CURL_VERSION_KERBEROS4</span>
-<p class="level1">supports kerberos4 (when using FTP)
-<p class="level0"><a name="CURLVERSIONSSL"></a><span class="nroffip">CURL_VERSION_SSL</span>
-<p class="level1">supports SSL (HTTPS/FTPS) (Added in 7.10)
-<p class="level0"><a name="CURLVERSIONLIBZ"></a><span class="nroffip">CURL_VERSION_LIBZ</span>
-<p class="level1">supports HTTP deflate using libz (Added in 7.10)
-<p class="level0"><a name="CURLVERSIONNTLM"></a><span class="nroffip">CURL_VERSION_NTLM</span>
-<p class="level1">supports HTTP NTLM (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONGSSNEGOTIATE"></a><span class="nroffip">CURL_VERSION_GSSNEGOTIATE</span>
-<p class="level1">supports HTTP GSS-Negotiate (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONDEBUG"></a><span class="nroffip">CURL_VERSION_DEBUG</span>
-<p class="level1">libcurl was built with debug capabilities (added in 7.10.6)
-<p class="level0"><a name="CURLVERSIONCURLDEBUG"></a><span class="nroffip">CURL_VERSION_CURLDEBUG</span>
-<p class="level1">libcurl was built with memory tracking debug capabilities. This is mainly of interest for libcurl hackers. (added in 7.19.6)
-<p class="level0"><a name="CURLVERSIONASYNCHDNS"></a><span class="nroffip">CURL_VERSION_ASYNCHDNS</span>
-<p class="level1">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)
-<p class="level0"><a name="CURLVERSIONSPNEGO"></a><span class="nroffip">CURL_VERSION_SPNEGO</span>
-<p class="level1">libcurl was built with support for SPNEGO authentication (Simple and Protected GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
-<p class="level0"><a name="CURLVERSIONLARGEFILE"></a><span class="nroffip">CURL_VERSION_LARGEFILE</span>
-<p class="level1">libcurl was built with support for large files. (Added in 7.11.1)
-<p class="level0"><a name="CURLVERSIONIDN"></a><span class="nroffip">CURL_VERSION_IDN</span>
-<p class="level1">libcurl was built with support for IDNA, domain names with international letters. (Added in 7.12.0)
-<p class="level0"><a name="CURLVERSIONSSPI"></a><span class="nroffip">CURL_VERSION_SSPI</span>
-<p class="level1">libcurl was built with support for SSPI. This is only available on Windows and makes libcurl use Windows-provided functions for NTLM authentication. It also allows libcurl to use the current user and the current user's password without the app having to pass them on. (Added in 7.13.2)
-<p class="level0"><a name="CURLVERSIONCONV"></a><span class="nroffip">CURL_VERSION_CONV</span>
-<p class="level1">libcurl was built with support for character conversions, as provided by the CURLOPT_CONV_* callbacks. (Added in 7.15.4)
-<p class="level0"><span Class="emphasis">ssl_version</span> is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL.
-<p class="level0"><span Class="emphasis">ssl_version_num</span> is the numerical OpenSSL version value as defined by the OpenSSL project. If libcurl has no SSL support, this is 0.
-<p class="level0"><span Class="emphasis">libz_version</span> is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL.
-<p class="level0"><span Class="emphasis">protocols</span> 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. <a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
-<p class="level0">A pointer to a curl_version_info_data struct. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="emphasis" href="./curl_version.html">curl_version(3)</a>
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/curl_version_info.pdf b/docs/libcurl/curl_version_info.pdf
deleted file mode 100644
index 356a0b4..0000000
--- a/docs/libcurl/curl_version_info.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/getinfo-times b/docs/libcurl/getinfo-times
new file mode 100644
index 0000000..bb0fdcb
--- /dev/null
+++ b/docs/libcurl/getinfo-times
@@ -0,0 +1,27 @@
+An overview of the six time values available from curl_easy_getinfo()
+
+curl_easy_perform()
+ |
+ |--NT
+ |--|--CT
+ |--|--|--PT
+ |--|--|--|--ST
+ |--|--|--TT
+ |--|--|--|--|--RT
+
+NT = CURLINFO_NAMELOOKUP_TIME. The time it took from the start until the name
+ resolving was completed.
+CT = CURLINFO_CONNECT_TIME. The time it took from the start until the connect
+ to the remote host (or proxy) was completed.
+PT = CURLINFO_PRETRANSFER_TIME. The time it took from the start until the file
+ transfer is just about to begin. This includes all pre-transfer commands
+ and negotiations that are specific to the particular protocol(s)
+ involved.
+ST = CURLINFO_STARTTRANSFER_TIME. The time it took from the start until the
+ first byte is just about to be transferred.
+TT = CURLINFO_TOTAL_TIME. Time of the previous transfer. This time does not
+ include the connect time (CT), so if you want the complete operation
+ time, you should add that.
+RT = CURLINFO_REDIRECT_TIME. The time it took for all redirection steps
+ include name lookup, connect, pretransfer and transfer before final
+ transaction was started. So, this is zero if no redirection took place.
diff --git a/docs/libcurl/index.html b/docs/libcurl/index.html
index 287a2dd..ca77313 100644
--- a/docs/libcurl/index.html
+++ b/docs/libcurl/index.html
@@ -21,40 +21,49 @@
<H2>Library Functions (A-Z)</H2>
<a href="curl_easy_cleanup.html">curl_easy_cleanup</A>
<br><a href="curl_easy_duphandle.html">curl_easy_duphandle</A>
+<br><a href="curl_easy_escape.html">curl_easy_escape</A>
<br><a href="curl_easy_getinfo.html">curl_easy_getinfo</A>
<br><a href="curl_easy_init.html">curl_easy_init</A>
+<br><a href="curl_easy_pause.html">curl_easy_pause</A>
<br><a href="curl_easy_perform.html">curl_easy_perform</A>
<br><a href="curl_easy_recv.html">curl_easy_recv</A>
<br><a href="curl_easy_reset.html">curl_easy_reset</A>
<br><a href="curl_easy_send.html">curl_easy_send</A>
<br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
<br><a href="curl_easy_strerror.html">curl_easy_strerror</A>
-<br><a href="curl_escape.html">curl_escape</A>
+<br><a href="curl_easy_unescape.html">curl_easy_unescape</A>
+<br><a href="curl_escape.html">curl_escape</A> (deprecated)
<br><a href="curl_formadd.html">curl_formadd</A>
<br><a href="curl_formfree.html">curl_formfree</A>
+<br><a href="curl_formget.html">curl_formget</A>
<br><a href="curl_free.html">curl_free</A>
<br><a href="curl_getdate.html">curl_getdate</A>
-<br><a href="curl_getenv.html">curl_getenv</A>
+<br><a href="curl_getenv.html">curl_getenv</A> (deprecated)
<br><a href="curl_global_cleanup.html">curl_global_cleanup</A>
<br><a href="curl_global_init.html">curl_global_init</A>
<br><a href="curl_global_init_mem.html">curl_global_init_mem</A>
-<br><a href="curl_mprintf.html">curl_mprintf</A>
+<br><a href="curl_mprintf.html">curl_mprintf</A> (deprecated)
<br><a href="curl_multi_add_handle.html">curl_multi_add_handle</a>
+<br><a href="curl_multi_assign.html">curl_multi_assign</a>
<br><a href="curl_multi_cleanup.html">curl_multi_cleanup</a>
<br><a href="curl_multi_fdset.html">curl_multi_fdset</a>
<br><a href="curl_multi_info_read.html">curl_multi_info_read</a>
<br><a href="curl_multi_init.html">curl_multi_init</a>
<br><a href="curl_multi_perform.html">curl_multi_perform</a>
<br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
-<br><a href="curl_multi_strerror.html">curl_multi_strerror.html</a>
+<br><a href="curl_multi_setopt.html">curl_multi_setopt</a>
+<br><a href="curl_multi_socket.html">curl_multi_socket</a> (deprecated)
+<br><a href="curl_multi_socket_action.html">curl_multi_socket_action</a>
+<br><a href="curl_multi_strerror.html">curl_multi_strerror</a>
+<br><a href="curl_multi_timeout.html">curl_multi_timeout</a> (deprecated)
<br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
<br><a href="curl_share_init.html">curl_share_init</A>
<br><a href="curl_share_setopt.html">curl_share_setopt</A>
-<br><a href="curl_share_strerror.html">curl_share_strerror.html</a>
+<br><a href="curl_share_strerror.html">curl_share_strerror</a>
<br><a href="curl_slist_append.html">curl_slist_append</A>
<br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
<br><a href="curl_strequal.html">curl_strequal and curl_strnequal</A>
-<br><a href="curl_unescape.html">curl_unescape</A>
+<br><a href="curl_unescape.html">curl_unescape</A> (deprecated)
<br><a href="curl_version.html">curl_version</A>
<br><a href="curl_version_info.html">curl_version_info</A>
diff --git a/docs/libcurl/libcurl-easy.3 b/docs/libcurl/libcurl-easy.3
index 803e542..f8506a2 100644
--- a/docs/libcurl/libcurl-easy.3
+++ b/docs/libcurl/libcurl-easy.3
@@ -1,7 +1,25 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
-.TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 libcurl 3 "19 Sep 2014" "libcurl" "libcurl easy interface"
.SH NAME
libcurl-easy \- easy interface overview
.SH DESCRIPTION
@@ -15,6 +33,17 @@
to set some callbacks as well that will be called from the library when data
is available etc. \fIcurl_easy_setopt(3)\fP is used for all this.
+\fICURLOPT_URL(3)\fP is only option you really must set, as otherwise there
+can be no transfer. Another commonly used option is \fICURLOPT_VERBOSE(3)\fP
+that will help you see what libcurl is doing under the hood, very useful when
+debugging for example. The \fIcurl_easy_setopt(3)\fP man page has a full index
+of the over 200 available options.
+
+If you at any point would like to blank all previously set options for a
+single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also
+make a clone of an easy handle (with all its set options) using
+\fIcurl_easy_duphandle(3)\fP.
+
When all is setup, you tell libcurl to perform the transfer using
\fIcurl_easy_perform(3)\fP. It will then do the entire operation and won't
return until it is done (successfully or not).
@@ -24,4 +53,6 @@
\fIcurl_easy_cleanup(3)\fP. If you want persistent connections, you don't
cleanup immediately, but instead run ahead and perform other transfers using
the same easy handle.
-
+.SH "SEE ALSO"
+.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3), "
+.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl "(3) "
diff --git a/docs/libcurl/libcurl-easy.html b/docs/libcurl/libcurl-easy.html
deleted file mode 100644
index 8c9f5e5..0000000
--- a/docs/libcurl/libcurl-easy.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html><head>
-<title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-easy - easy interface overview <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">When using libcurl's "easy" interface you init your session and get a handle (often referred to as an "easy handle"), which you use as input to the easy interface functions you use. Use <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a> to get the handle.
-<p class="level0">You continue by setting all the options you want in the upcoming transfer, the most important among them is the URL itself (you can't transfer anything without a specified URL as you may have figured out yourself). You might want to set some callbacks as well that will be called from the library when data is available etc. <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> is used for all this.
-<p class="level0">When all is setup, you tell libcurl to perform the transfer using <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>. It will then do the entire operation and won't return until it is done (successfully or not).
-<p class="level0">After the transfer has been made, you can set new options and make another transfer, or if you're done, cleanup the session by calling <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>. If you want persistent connections, you don't cleanup immediately, but instead run ahead and perform other transfers using the same easy handle.
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-easy.pdf b/docs/libcurl/libcurl-easy.pdf
deleted file mode 100644
index b26357e..0000000
--- a/docs/libcurl/libcurl-easy.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-errors.3 b/docs/libcurl/libcurl-errors.3
index c3c854e..07091b5 100644
--- a/docs/libcurl/libcurl-errors.3
+++ b/docs/libcurl/libcurl-errors.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -28,11 +28,11 @@
Why they occur and possibly what you can do to fix the problem are also included.
.SH "CURLcode"
Almost all "easy" interface functions return a CURLcode error code. No matter
-what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
-a good idea as it will give you a human readable error string that may offer
-more details about the cause of the error than just the error code.
-\fIcurl_easy_strerror(3)\fP can be called to get an error string from a
-given CURLcode number.
+what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER(3)\fP
+is a good idea as it will give you a human readable error string that may
+offer more details about the cause of the error than just the error code.
+\fIcurl_easy_strerror(3)\fP can be called to get an error string from a given
+CURLcode number.
CURLcode is one of the following:
.IP "CURLE_OK (0)"
@@ -44,9 +44,15 @@
for.
.IP "CURLE_FAILED_INIT (2)"
Very early initialization code failed. This is likely to be an internal error
-or problem.
+or problem, or a resource problem where something fundamental couldn't get
+done at init time.
.IP "CURLE_URL_MALFORMAT (3)"
The URL was not properly formatted.
+.IP "CURLE_NOT_BUILT_IN (4)"
+A requested feature, protocol or option was not found built-in in this libcurl
+due to a build-time decision. This means that a feature or option was not
+enabled or explicitly disabled when libcurl was built and in order to get it
+to function you have to get a rebuilt libcurl.
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP "CURLE_COULDNT_RESOLVE_HOST (6)"
@@ -60,22 +66,26 @@
.IP "CURLE_REMOTE_ACCESS_DENIED (9)"
We were denied access to the resource given in the URL. For FTP, this occurs
while trying to change to the remote directory.
+.IP "CURLE_FTP_ACCEPT_FAILED (10)"
+While waiting for the server to connect back when an active FTP session is
+used, an error code was sent over the control connection or similar.
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
After having sent the FTP password to the server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned.
+.IP "CURLE_FTP_ACCEPT_TIMEOUT (12)"
+During an active FTP session while waiting for the server to connect, the
+\fICURLOPT_ACCEPTTIMOUT_MS(3)\fP (or the internal default) timeout expired.
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
libcurl failed to get a sensible result back from the server as a response to
either a PASV or a EPSV command. The server is flawed.
.IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
FTP servers return a 227-line as a response to a PASV command. If libcurl
fails to parse that line, this return code is passed back.
-.IP "CURLE_FTP_PRET_FAILED (84)"
-The FTP server does not understand the PRET command at all or does not support
-the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST\fP, a
-custom LIST command will be sent with PRET CMD before PASV as well. (Added in
-7.20.0)
.IP "CURLE_FTP_CANT_GET_HOST (15)"
An internal failure to lookup the host used for the new connection.
+.IP "CURLE_HTTP2 (16)"
+A problem was detected in the HTTP2 framing layer. This is somewhat generic
+and can be one out of several problems, see the error buffer for details.
.IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
Received an error when trying to set the transfer mode to binary or ASCII.
.IP "CURLE_PARTIAL_FILE (18)"
@@ -90,8 +100,8 @@
returned an error code that was 400 or higher (for FTP) or otherwise
indicated unsuccessful completion of the command.
.IP "CURLE_HTTP_RETURNED_ERROR (22)"
-This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
-returns an error code that is >= 400.
+This is returned if \fICURLOPT_FAILONERROR(3)\fP is set TRUE and the HTTP
+server returns an error code that is >= 400.
.IP "CURLE_WRITE_ERROR (23)"
An error occurred when writing received data to a local file, or an error was
returned to libcurl from a write callback.
@@ -109,7 +119,8 @@
conditions.
.IP "CURLE_FTP_PORT_FAILED (30)"
The FTP PORT command returned error. This mostly happens when you haven't
-specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
+specified a good enough address for libcurl to use. See
+\fICURLOPT_FTPPORT(3)\fP.
.IP "CURLE_FTP_COULDNT_USE_REST (31)"
The FTP REST command returned error. This should never happen if the server is
sane.
@@ -141,13 +152,15 @@
.IP "CURLE_INTERFACE_FAILED (45)"
Interface error. A specified outgoing interface could not be used. Set which
interface to use for outgoing connections' source IP address with
-CURLOPT_INTERFACE.
+\fICURLOPT_INTERFACE(3)\fP.
.IP "CURLE_TOO_MANY_REDIRECTS (47)"
Too many redirects. When following redirects, libcurl hit the maximum amount.
-Set your limit with CURLOPT_MAXREDIRS.
-.IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
-An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
-the appropriate documentation.
+Set your limit with \fICURLOPT_MAXREDIRS(3)\fP.
+.IP "CURLE_UNKNOWN_OPTION (48)"
+An option passed to libcurl is not recognized/known. Refer to the appropriate
+documentation. This is most likely a problem in the program that uses
+libcurl. The error buffer might contain more specific information about which
+exact option it concerns.
.IP "CURLE_TELNET_OPTION_SYNTAX (49)"
A telnet option string was Illegally formatted.
.IP "CURLE_PEER_FAILED_VERIFICATION (51)"
@@ -219,7 +232,10 @@
.IP "CURLE_SSL_ISSUER_ERROR (83)"
Issuer check failed (Added in 7.19.0)
.IP "CURLE_FTP_PRET_FAILED (84)"
-PRET command failed
+The FTP server does not understand the PRET command at all or does not support
+the given argument. Be careful when using \fICURLOPT_CUSTOMREQUEST(3)\fP, a
+custom LIST command will be sent with PRET CMD before PASV as well. (Added in
+7.20.0)
.IP "CURLE_RTSP_CSEQ_ERROR (85)"
Mismatch of RTSP CSeq numbers.
.IP "CURLE_RTSP_SESSION_ERROR (86)"
@@ -228,6 +244,9 @@
Unable to parse FTP file list (during FTP wildcard downloading).
.IP "CURLE_CHUNK_FAILED (88)"
Chunk callback reported error.
+.IP "CURLE_NO_CONNECTION_AVAILABLE (89)"
+(For internal use only, will never be returned by libcurl) No connection
+available, the session will be queued. (added in 7.30.0)
.IP "CURLE_OBSOLETE*"
These error codes will never be returned. They were used in an old libcurl
version and are currently unused.
@@ -236,7 +255,10 @@
interface. Also consider \fIcurl_multi_strerror(3)\fP.
.IP "CURLM_CALL_MULTI_PERFORM (-1)"
This is not really an error. It means you should call
-\fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
+\fIcurl_multi_perform(3)\fP again without doing select() or similar in
+between. Before version 7.20.0 this could be returned by
+\fIcurl_multi_perform(3)\fP, but in later versions this return code is never
+used.
.IP "CURLM_OK (0)"
Things are fine.
.IP "CURLM_BAD_HANDLE (1)"
@@ -255,6 +277,9 @@
.IP "CURLM_UNKNOWN_OPTION (6)"
curl_multi_setopt() with unsupported option
(Added in 7.15.4)
+.IP "CURLM_ADDED_ALREADY (7)"
+An easy handle already added to a multi handle was attempted to get added a
+second time. (Added in 7.32.1)
.SH "CURLSHcode"
The "share" interface will return a CURLSHcode to indicate when an error has
occurred. Also consider \fIcurl_share_strerror(3)\fP.
@@ -269,3 +294,10 @@
.IP "CURLSHE_NOMEM (4)"
Not enough memory was available.
(Added in 7.12.0)
+.IP "CURLSHE_NOT_BUILT_IN (5)"
+The requested sharing could not be done because the library you use don't have
+that particular feature enabled. (Added in 7.23.0)
+.SH "SEE ALSO"
+.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), "
+.BR curl_share_strerror "(3), " CURLOPT_ERRORBUFFER "(3), "
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_DEBUGFUNCTION "(3) "
diff --git a/docs/libcurl/libcurl-errors.html b/docs/libcurl/libcurl-errors.html
deleted file mode 100644
index 0a2cf70..0000000
--- a/docs/libcurl/libcurl-errors.html
+++ /dev/null
@@ -1,236 +0,0 @@
-<html><head>
-<title>libcurl-errors man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-errors - error codes in libcurl <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This man page includes most, if not all, available error codes in libcurl. Why they occur and possibly what you can do to fix the problem are also included. <a name="CURLcode"></a><h2 class="nroffsh">CURLcode</h2>
-<p class="level0">Almost all "easy" interface functions return a CURLcode error code. No matter what, using the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> option <span Class="emphasis">CURLOPT_ERRORBUFFER</span> is a good idea as it will give you a human readable error string that may offer more details about the cause of the error than just the error code. <a class="emphasis" href="./curl_easy_strerror.html">curl_easy_strerror(3)</a> can be called to get an error string from a given CURLcode number.
-<p class="level0">CURLcode is one of the following:
-<p class="level0"><a name="CURLEOK"></a><span class="nroffip">CURLE_OK (0)</span>
-<p class="level1">All fine. Proceed as usual.
-<p class="level0"><a name="CURLEUNSUPPORTEDPROTOCOL"></a><span class="nroffip">CURLE_UNSUPPORTED_PROTOCOL (1)</span>
-<p class="level1">The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for.
-<p class="level0"><a name="CURLEFAILEDINIT"></a><span class="nroffip">CURLE_FAILED_INIT (2)</span>
-<p class="level1">Very early initialization code failed. This is likely to be an internal error or problem.
-<p class="level0"><a name="CURLEURLMALFORMAT"></a><span class="nroffip">CURLE_URL_MALFORMAT (3)</span>
-<p class="level1">The URL was not properly formatted.
-<p class="level0"><a name="CURLECOULDNTRESOLVEPROXY"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_PROXY (5)</span>
-<p class="level1">Couldn't resolve proxy. The given proxy host could not be resolved.
-<p class="level0"><a name="CURLECOULDNTRESOLVEHOST"></a><span class="nroffip">CURLE_COULDNT_RESOLVE_HOST (6)</span>
-<p class="level1">Couldn't resolve host. The given remote host was not resolved.
-<p class="level0"><a name="CURLECOULDNTCONNECT"></a><span class="nroffip">CURLE_COULDNT_CONNECT (7)</span>
-<p class="level1">Failed to connect() to host or proxy.
-<p class="level0"><a name="CURLEFTPWEIRDSERVERREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_SERVER_REPLY (8)</span>
-<p class="level1">After connecting to a FTP server, libcurl expects to get a certain reply back. This error code implies that it got a strange or bad reply. The given remote server is probably not an OK FTP server.
-<p class="level0"><a name="CURLEREMOTEACCESSDENIED"></a><span class="nroffip">CURLE_REMOTE_ACCESS_DENIED (9)</span>
-<p class="level1">We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.
-<p class="level0"><a name="CURLEFTPWEIRDPASSREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASS_REPLY (11)</span>
-<p class="level1">After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.
-<p class="level0"><a name="CURLEFTPWEIRDPASVREPLY"></a><span class="nroffip">CURLE_FTP_WEIRD_PASV_REPLY (13)</span>
-<p class="level1">libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.
-<p class="level0"><a name="CURLEFTPWEIRD227FORMAT"></a><span class="nroffip">CURLE_FTP_WEIRD_227_FORMAT (14)</span>
-<p class="level1">FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back.
-<p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span>
-<p class="level1">The FTP server does not understand the PRET command at all or does not support the given argument. Be careful when using <span Class="emphasis">CURLOPT_CUSTOMREQUEST</span>, a custom LIST command will be sent with PRET CMD before PASV as well. (Added in 7.20.0)
-<p class="level0"><a name="CURLEFTPCANTGETHOST"></a><span class="nroffip">CURLE_FTP_CANT_GET_HOST (15)</span>
-<p class="level1">An internal failure to lookup the host used for the new connection.
-<p class="level0"><a name="CURLEFTPCOULDNTSETTYPE"></a><span class="nroffip">CURLE_FTP_COULDNT_SET_TYPE (17)</span>
-<p class="level1">Received an error when trying to set the transfer mode to binary or ASCII.
-<p class="level0"><a name="CURLEPARTIALFILE"></a><span class="nroffip">CURLE_PARTIAL_FILE (18)</span>
-<p class="level1">A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.
-<p class="level0"><a name="CURLEFTPCOULDNTRETRFILE"></a><span class="nroffip">CURLE_FTP_COULDNT_RETR_FILE (19)</span>
-<p class="level1">This was either a weird reply to a 'RETR' command or a zero byte transfer complete.
-<p class="level0"><a name="CURLEQUOTEERROR"></a><span class="nroffip">CURLE_QUOTE_ERROR (21)</span>
-<p class="level1">When sending custom "QUOTE" commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.
-<p class="level0"><a name="CURLEHTTPRETURNEDERROR"></a><span class="nroffip">CURLE_HTTP_RETURNED_ERROR (22)</span>
-<p class="level1">This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400.
-<p class="level0"><a name="CURLEWRITEERROR"></a><span class="nroffip">CURLE_WRITE_ERROR (23)</span>
-<p class="level1">An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.
-<p class="level0"><a name="CURLEUPLOADFAILED"></a><span class="nroffip">CURLE_UPLOAD_FAILED (25)</span>
-<p class="level1">Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.
-<p class="level0"><a name="CURLEREADERROR"></a><span class="nroffip">CURLE_READ_ERROR (26)</span>
-<p class="level1">There was a problem reading a local file or an error returned by the read callback.
-<p class="level0"><a name="CURLEOUTOFMEMORY"></a><span class="nroffip">CURLE_OUT_OF_MEMORY (27)</span>
-<p class="level1">A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.
-<p class="level0"><a name="CURLEOPERATIONTIMEDOUT"></a><span class="nroffip">CURLE_OPERATION_TIMEDOUT (28)</span>
-<p class="level1">Operation timeout. The specified time-out period was reached according to the conditions.
-<p class="level0"><a name="CURLEFTPPORTFAILED"></a><span class="nroffip">CURLE_FTP_PORT_FAILED (30)</span>
-<p class="level1">The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See <span Class="emphasis">CURLOPT_FTPPORT</span>.
-<p class="level0"><a name="CURLEFTPCOULDNTUSEREST"></a><span class="nroffip">CURLE_FTP_COULDNT_USE_REST (31)</span>
-<p class="level1">The FTP REST command returned error. This should never happen if the server is sane.
-<p class="level0"><a name="CURLERANGEERROR"></a><span class="nroffip">CURLE_RANGE_ERROR (33)</span>
-<p class="level1">The server does not support or accept range requests.
-<p class="level0"><a name="CURLEHTTPPOSTERROR"></a><span class="nroffip">CURLE_HTTP_POST_ERROR (34)</span>
-<p class="level1">This is an odd error that mainly occurs due to internal confusion.
-<p class="level0"><a name="CURLESSLCONNECTERROR"></a><span class="nroffip">CURLE_SSL_CONNECT_ERROR (35)</span>
-<p class="level1">A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.
-<p class="level0"><a name="CURLEBADDOWNLOADRESUME"></a><span class="nroffip">CURLE_BAD_DOWNLOAD_RESUME (36)</span>
-<p class="level1">The download could not be resumed because the specified offset was out of the file boundary.
-<p class="level0"><a name="CURLEFILECOULDNTREADFILE"></a><span class="nroffip">CURLE_FILE_COULDNT_READ_FILE (37)</span>
-<p class="level1">A file given with FILE:// couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions?
-<p class="level0"><a name="CURLELDAPCANNOTBIND"></a><span class="nroffip">CURLE_LDAP_CANNOT_BIND (38)</span>
-<p class="level1">LDAP cannot bind. LDAP bind operation failed.
-<p class="level0"><a name="CURLELDAPSEARCHFAILED"></a><span class="nroffip">CURLE_LDAP_SEARCH_FAILED (39)</span>
-<p class="level1">LDAP search failed.
-<p class="level0"><a name="CURLEFUNCTIONNOTFOUND"></a><span class="nroffip">CURLE_FUNCTION_NOT_FOUND (41)</span>
-<p class="level1">Function not found. A required zlib function was not found.
-<p class="level0"><a name="CURLEABORTEDBYCALLBACK"></a><span class="nroffip">CURLE_ABORTED_BY_CALLBACK (42)</span>
-<p class="level1">Aborted by callback. A callback returned "abort" to libcurl.
-<p class="level0"><a name="CURLEBADFUNCTIONARGUMENT"></a><span class="nroffip">CURLE_BAD_FUNCTION_ARGUMENT (43)</span>
-<p class="level1">Internal error. A function was called with a bad parameter.
-<p class="level0"><a name="CURLEINTERFACEFAILED"></a><span class="nroffip">CURLE_INTERFACE_FAILED (45)</span>
-<p class="level1">Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE.
-<p class="level0"><a name="CURLETOOMANYREDIRECTS"></a><span class="nroffip">CURLE_TOO_MANY_REDIRECTS (47)</span>
-<p class="level1">Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS.
-<p class="level0"><a name="CURLEUNKNOWNTELNETOPTION"></a><span class="nroffip">CURLE_UNKNOWN_TELNET_OPTION (48)</span>
-<p class="level1">An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to the appropriate documentation.
-<p class="level0"><a name="CURLETELNETOPTIONSYNTAX"></a><span class="nroffip">CURLE_TELNET_OPTION_SYNTAX (49)</span>
-<p class="level1">A telnet option string was Illegally formatted.
-<p class="level0"><a name="CURLEPEERFAILEDVERIFICATION"></a><span class="nroffip">CURLE_PEER_FAILED_VERIFICATION (51)</span>
-<p class="level1">The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
-<p class="level0"><a name="CURLEGOTNOTHING"></a><span class="nroffip">CURLE_GOT_NOTHING (52)</span>
-<p class="level1">Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.
-<p class="level0"><a name="CURLESSLENGINENOTFOUND"></a><span class="nroffip">CURLE_SSL_ENGINE_NOTFOUND (53)</span>
-<p class="level1">The specified crypto engine wasn't found.
-<p class="level0"><a name="CURLESSLENGINESETFAILED"></a><span class="nroffip">CURLE_SSL_ENGINE_SETFAILED (54)</span>
-<p class="level1">Failed setting the selected SSL crypto engine as default!
-<p class="level0"><a name="CURLESENDERROR"></a><span class="nroffip">CURLE_SEND_ERROR (55)</span>
-<p class="level1">Failed sending network data.
-<p class="level0"><a name="CURLERECVERROR"></a><span class="nroffip">CURLE_RECV_ERROR (56)</span>
-<p class="level1">Failure with receiving network data.
-<p class="level0"><a name="CURLESSLCERTPROBLEM"></a><span class="nroffip">CURLE_SSL_CERTPROBLEM (58)</span>
-<p class="level1">problem with the local client certificate.
-<p class="level0"><a name="CURLESSLCIPHER"></a><span class="nroffip">CURLE_SSL_CIPHER (59)</span>
-<p class="level1">Couldn't use specified cipher.
-<p class="level0"><a name="CURLESSLCACERT"></a><span class="nroffip">CURLE_SSL_CACERT (60)</span>
-<p class="level1">Peer certificate cannot be authenticated with known CA certificates.
-<p class="level0"><a name="CURLEBADCONTENTENCODING"></a><span class="nroffip">CURLE_BAD_CONTENT_ENCODING (61)</span>
-<p class="level1">Unrecognized transfer encoding.
-<p class="level0"><a name="CURLELDAPINVALIDURL"></a><span class="nroffip">CURLE_LDAP_INVALID_URL (62)</span>
-<p class="level1">Invalid LDAP URL.
-<p class="level0"><a name="CURLEFILESIZEEXCEEDED"></a><span class="nroffip">CURLE_FILESIZE_EXCEEDED (63)</span>
-<p class="level1">Maximum file size exceeded.
-<p class="level0"><a name="CURLEUSESSLFAILED"></a><span class="nroffip">CURLE_USE_SSL_FAILED (64)</span>
-<p class="level1">Requested FTP SSL level failed.
-<p class="level0"><a name="CURLESENDFAILREWIND"></a><span class="nroffip">CURLE_SEND_FAIL_REWIND (65)</span>
-<p class="level1">When doing a send operation curl had to rewind the data to retransmit, but the rewinding operation failed.
-<p class="level0"><a name="CURLESSLENGINEINITFAILED"></a><span class="nroffip">CURLE_SSL_ENGINE_INITFAILED (66)</span>
-<p class="level1">Initiating the SSL Engine failed.
-<p class="level0"><a name="CURLELOGINDENIED"></a><span class="nroffip">CURLE_LOGIN_DENIED (67)</span>
-<p class="level1">The remote server denied curl to login (Added in 7.13.1)
-<p class="level0"><a name="CURLETFTPNOTFOUND"></a><span class="nroffip">CURLE_TFTP_NOTFOUND (68)</span>
-<p class="level1">File not found on TFTP server.
-<p class="level0"><a name="CURLETFTPPERM"></a><span class="nroffip">CURLE_TFTP_PERM (69)</span>
-<p class="level1">Permission problem on TFTP server.
-<p class="level0"><a name="CURLEREMOTEDISKFULL"></a><span class="nroffip">CURLE_REMOTE_DISK_FULL (70)</span>
-<p class="level1">Out of disk space on the server.
-<p class="level0"><a name="CURLETFTPILLEGAL"></a><span class="nroffip">CURLE_TFTP_ILLEGAL (71)</span>
-<p class="level1">Illegal TFTP operation.
-<p class="level0"><a name="CURLETFTPUNKNOWNID"></a><span class="nroffip">CURLE_TFTP_UNKNOWNID (72)</span>
-<p class="level1">Unknown TFTP transfer ID.
-<p class="level0"><a name="CURLEREMOTEFILEEXISTS"></a><span class="nroffip">CURLE_REMOTE_FILE_EXISTS (73)</span>
-<p class="level1">File already exists and will not be overwritten.
-<p class="level0"><a name="CURLETFTPNOSUCHUSER"></a><span class="nroffip">CURLE_TFTP_NOSUCHUSER (74)</span>
-<p class="level1">This error should never be returned by a properly functioning TFTP server.
-<p class="level0"><a name="CURLECONVFAILED"></a><span class="nroffip">CURLE_CONV_FAILED (75)</span>
-<p class="level1">Character conversion failed.
-<p class="level0"><a name="CURLECONVREQD"></a><span class="nroffip">CURLE_CONV_REQD (76)</span>
-<p class="level1">Caller must register conversion callbacks.
-<p class="level0"><a name="CURLESSLCACERTBADFILE"></a><span class="nroffip">CURLE_SSL_CACERT_BADFILE (77)</span>
-<p class="level1">Problem with reading the SSL CA cert (path? access rights?)
-<p class="level0"><a name="CURLEREMOTEFILENOTFOUND"></a><span class="nroffip">CURLE_REMOTE_FILE_NOT_FOUND (78)</span>
-<p class="level1">The resource referenced in the URL does not exist.
-<p class="level0"><a name="CURLESSH"></a><span class="nroffip">CURLE_SSH (79)</span>
-<p class="level1">An unspecified error occurred during the SSH session.
-<p class="level0"><a name="CURLESSLSHUTDOWNFAILED"></a><span class="nroffip">CURLE_SSL_SHUTDOWN_FAILED (80)</span>
-<p class="level1">Failed to shut down the SSL connection.
-<p class="level0"><a name="CURLEAGAIN"></a><span class="nroffip">CURLE_AGAIN (81)</span>
-<p class="level1">Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned from <a class="emphasis" href="./curl_easy_recv.html">curl_easy_recv(3)</a> and <a class="emphasis" href="./curl_easy_send.html">curl_easy_send(3)</a> (Added in 7.18.2)
-<p class="level0"><a name="CURLESSLCRLBADFILE"></a><span class="nroffip">CURLE_SSL_CRL_BADFILE (82)</span>
-<p class="level1">Failed to load CRL file (Added in 7.19.0)
-<p class="level0"><a name="CURLESSLISSUERERROR"></a><span class="nroffip">CURLE_SSL_ISSUER_ERROR (83)</span>
-<p class="level1">Issuer check failed (Added in 7.19.0)
-<p class="level0"><a name="CURLEFTPPRETFAILED"></a><span class="nroffip">CURLE_FTP_PRET_FAILED (84)</span>
-<p class="level1">PRET command failed
-<p class="level0"><a name="CURLERTSPCSEQERROR"></a><span class="nroffip">CURLE_RTSP_CSEQ_ERROR (85)</span>
-<p class="level1">Mismatch of RTSP CSeq numbers.
-<p class="level0"><a name="CURLERTSPSESSIONERROR"></a><span class="nroffip">CURLE_RTSP_SESSION_ERROR (86)</span>
-<p class="level1">Mismatch of RTSP Session Identifiers.
-<p class="level0"><a name="CURLEFTPBADFILELIST"></a><span class="nroffip">CURLE_FTP_BAD_FILE_LIST (87)</span>
-<p class="level1">Unable to parse FTP file list (during FTP wildcard downloading).
-<p class="level0"><a name="CURLECHUNKFAILED"></a><span class="nroffip">CURLE_CHUNK_FAILED (88)</span>
-<p class="level1">Chunk callback reported error.
-<p class="level0"><a name="CURLEOBSOLETE"></a><span class="nroffip">CURLE_OBSOLETE*</span>
-<p class="level1">These error codes will never be returned. They were used in an old libcurl version and are currently unused. <a name="CURLMcode"></a><h2 class="nroffsh">CURLMcode</h2>
-<p class="level0">This is the generic return code used by functions in the libcurl multi interface. Also consider <a class="emphasis" href="./curl_multi_strerror.html">curl_multi_strerror(3)</a>.
-<p class="level0"><a name="CURLMCALLMULTIPERFORM"></a><span class="nroffip">CURLM_CALL_MULTI_PERFORM (-1)</span>
-<p class="level1">This is not really an error. It means you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> again without doing select() or similar in between.
-<p class="level0"><a name="CURLMOK"></a><span class="nroffip">CURLM_OK (0)</span>
-<p class="level1">Things are fine.
-<p class="level0"><a name="CURLMBADHANDLE"></a><span class="nroffip">CURLM_BAD_HANDLE (1)</span>
-<p class="level1">The passed-in handle is not a valid CURLM handle.
-<p class="level0"><a name="CURLMBADEASYHANDLE"></a><span class="nroffip">CURLM_BAD_EASY_HANDLE (2)</span>
-<p class="level1">An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.
-<p class="level0"><a name="CURLMOUTOFMEMORY"></a><span class="nroffip">CURLM_OUT_OF_MEMORY (3)</span>
-<p class="level1">You are doomed.
-<p class="level0"><a name="CURLMINTERNALERROR"></a><span class="nroffip">CURLM_INTERNAL_ERROR (4)</span>
-<p class="level1">This can only be returned if libcurl bugs. Please report it to us!
-<p class="level0"><a name="CURLMBADSOCKET"></a><span class="nroffip">CURLM_BAD_SOCKET (5)</span>
-<p class="level1">The passed-in socket is not a valid one that libcurl already knows about. (Added in 7.15.4)
-<p class="level0"><a name="CURLMUNKNOWNOPTION"></a><span class="nroffip">CURLM_UNKNOWN_OPTION (6)</span>
-<p class="level1">curl_multi_setopt() with unsupported option (Added in 7.15.4) <a name="CURLSHcode"></a><h2 class="nroffsh">CURLSHcode</h2>
-<p class="level0">The "share" interface will return a CURLSHcode to indicate when an error has occurred. Also consider <a class="emphasis" href="./curl_share_strerror.html">curl_share_strerror(3)</a>.
-<p class="level0"><a name="CURLSHEOK"></a><span class="nroffip">CURLSHE_OK (0)</span>
-<p class="level1">All fine. Proceed as usual.
-<p class="level0"><a name="CURLSHEBADOPTION"></a><span class="nroffip">CURLSHE_BAD_OPTION (1)</span>
-<p class="level1">An invalid option was passed to the function.
-<p class="level0"><a name="CURLSHEINUSE"></a><span class="nroffip">CURLSHE_IN_USE (2)</span>
-<p class="level1">The share object is currently in use.
-<p class="level0"><a name="CURLSHEINVALID"></a><span class="nroffip">CURLSHE_INVALID (3)</span>
-<p class="level1">An invalid share object was passed to the function.
-<p class="level0"><a name="CURLSHENOMEM"></a><span class="nroffip">CURLSHE_NOMEM (4)</span>
-<p class="level1">Not enough memory was available. (Added in 7.12.0) <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-errors.pdf b/docs/libcurl/libcurl-errors.pdf
deleted file mode 100644
index bcd53f2..0000000
--- a/docs/libcurl/libcurl-errors.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-multi.3 b/docs/libcurl/libcurl-multi.3
index d84bafc..f77c366 100644
--- a/docs/libcurl/libcurl-multi.3
+++ b/docs/libcurl/libcurl-multi.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH libcurl-multi 3 "3 Feb 2007" "libcurl 7.16.0" "libcurl multi interface"
+.TH libcurl-multi 3 "19 Sep 2014" "libcurl" "libcurl multi interface"
.SH NAME
libcurl-multi \- how to use the multi interface
.SH DESCRIPTION
@@ -43,18 +43,28 @@
3. Enable the application to wait for action on its own file descriptors and
curl's file descriptors simultaneous easily.
+
+4. Enable event-based handling and scaling transfers up to and beyond
+thousands of parallel connections.
.SH "ONE MULTI HANDLE MANY EASY HANDLES"
To use the multi interface, you must first create a 'multi handle' with
\fIcurl_multi_init(3)\fP. This handle is then used as input to all further
curl_multi_* functions.
-Each single transfer is built up with an easy handle. You must create them,
-and setup the appropriate options for each easy handle, as outlined in the
-\fIlibcurl(3)\fP man page, using \fIcurl_easy_setopt(3)\fP.
+With a multi handle and the multi interface you can do any amount of
+simultaneous transfers in parallel. Each single transfer is built up around an
+easy handle. You must create the easy handles you need, and setup the
+appropriate options for each easy handle, as outlined in the \fIlibcurl(3)\fP
+man page, using \fIcurl_easy_setopt(3)\fP.
-When the easy handle is setup for a transfer, then instead of using
-\fIcurl_easy_perform(3)\fP (as when using the easy interface for transfers),
-you should instead add the easy handle to the multi handle using
+There are two flavours of the multi interface, the select() oriented one and
+the event based one we called multi_socket. You will benefit from reading
+through the description of both versions to full understand how they work and
+differentiate. We start out with the select() oriented version.
+
+When an easy handle is setup for a transfer, then instead of using
+\fIcurl_easy_perform(3)\fP like when using the easy interface for transfers,
+you should add the easy handle to the multi handle with
\fIcurl_multi_add_handle(3)\fP. The multi handle is sometimes referred to as a
\'multi stack\' because of the fact that it may hold a large amount of easy
handles.
@@ -71,7 +81,8 @@
anything available to transfer. It'll use the callbacks and everything else
you have setup in the individual easy handles. It'll transfer data on all
current transfers in the multi stack that are ready to transfer anything. It
-may be all, it may be none.
+may be all, it may be none. When there's nothing more to do for now, it
+returns back to the calling application.
Your application can acquire knowledge from libcurl when it would like to get
invoked to transfer data, so that you don't have to busy-loop and call that
@@ -80,15 +91,9 @@
or poll() calls in order to get to know when the transfers in the multi stack
might need attention. This also makes it very easy for your program to wait
for input on your own private file descriptors at the same time or perhaps
-timeout every now and then, should you want that.
-
-A little note here about the return codes from the multi functions, and
-especially the \fIcurl_multi_perform(3)\fP: if you receive
-\fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you should call
-\fIcurl_multi_perform(3)\fP again, before you select() on more actions. You
-don't have to do it immediately, but the return code means that libcurl may
-have more data available to return or that there may be more data to send off
-before it is "satisfied".
+timeout every now and then, should you want that. \fIcurl_multi_timeout(3)\fP
+also helps you with providing a suitable timeout period for your select()
+call.
\fIcurl_multi_perform(3)\fP stores the number of still running transfers in
one of its input arguments, and by reading that you can figure out when all
@@ -118,25 +123,62 @@
transfer, you must first remove it from the multi stack and then re-add it
again (possibly after having altered some options at your own choice).
.SH "MULTI_SOCKET"
-Since 7.16.0, the \fIcurl_multi_socket_action(3)\fP function offers a way for
-applications to not only avoid being forced to use select(), but it also
-offers a much more high-performance API that will make a significant
-difference for applications using large numbers of simultaneous connections.
+\fIcurl_multi_socket_action(3)\fP function offers a way for applications to
+not only avoid being forced to use select(), but it also offers a much more
+high-performance API that will make a significant difference for applications
+using large numbers of simultaneous connections.
-\fIcurl_multi_socket_action(3)\fP is then used
-instead of \fIcurl_multi_perform(3)\fP.
+\fIcurl_multi_socket_action(3)\fP is then used instead of
+\fIcurl_multi_perform(3)\fP.
+
+When using this API, you add easy handles to the multi handle just as with the
+normal multi interface. Then you also set two callbacks with the
+CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to
+\fIcurl_multi_setopt(3)\fP. They are two callback functions that libcurl will
+call with information about what sockets to wait for, and for what activity,
+and what the current timeout time is - if that expires libcurl should be
+notified.
+
+The multi_socket API is designed to inform your application about which
+sockets libcurl is currently using and for what activities (read and/or write)
+on those sockets your application is expected to wait for.
+
+Your application must make sure to receive all sockets informed about in the
+CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given activity
+on them. When a socket has the given activity, you call
+\fIcurl_multi_socket_action(3)\fP specifying which socket and action there
+are.
+
+The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that
+timeout expires, your application should call the
+\fIcurl_multi_socket_action(3)\fP function saying it was due to a timeout.
+
+This API is typically used with an event-driven underlying functionality (like
+libevent, libev, kqueue, epoll or similar) which which the application
+"subscribes" on socket changes. This allows applications and libcurl to much
+better scale upward and beyond thousands of simultaneous transfers without
+losing performance.
+
+When you've added your initial set of handles, you call
+\fIcurl_multi_socket_action(3)\fP with CURL_SOCKET_TIMEOUT set in the sockfd
+argument, and you'll get callbacks call that sets you up and you then continue
+to call \fIcurl_multi_socket_action(3)\fP accordingly when you get activity on
+the sockets you've been asked to wait on, or if the timeout timer expires.
+
+You can poll \fIcurl_multi_info_read(3)\fP to see if any transfer has
+completed, as it then has a message saying so.
.SH "BLOCKING"
A few areas in the code are still using blocking code, even when used from the
multi interface. While we certainly want and intend for these to get fixed in
the future, you should be aware of the following current restrictions:
.nf
- - Name resolves on non-windows unless c-ares is used
- - GnuTLS SSL connections
+ - Name resolves unless the c-ares or threaded-resolver backends are used
- NSS SSL connections
- - Active FTP connections
- HTTP proxy CONNECT operations
- SOCKS proxy handshakes
- file:// transfers
- TELNET transfers
.fi
+.SH "SEE ALSO"
+.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl "(3) "
diff --git a/docs/libcurl/libcurl-multi.html b/docs/libcurl/libcurl-multi.html
deleted file mode 100644
index 70601d1..0000000
--- a/docs/libcurl/libcurl-multi.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<html><head>
-<title>libcurl-multi man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-multi - how to use the multi interface <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is an overview on how to use the libcurl multi interface in your C programs. There are specific man pages for each function mentioned in here. There's also the <span Class="emphasis">libcurl-tutorial(3)</span> man page for a complete tutorial to programming with libcurl and the <span Class="emphasis">libcurl-easy(3)</span> man page for an overview of the libcurl easy interface.
-<p class="level0">All functions in the multi interface are prefixed with curl_multi. <a name="OBJECTIVES"></a><h2 class="nroffsh">OBJECTIVES</h2>
-<p class="level0">The multi interface offers several abilities that the easy interface doesn't. They are mainly:
-<p class="level0">1. Enable a "pull" interface. The application that uses libcurl decides where and when to ask libcurl to get/send data.
-<p class="level0">2. Enable multiple simultaneous transfers in the same thread without making it complicated for the application.
-<p class="level0">3. Enable the application to wait for action on its own file descriptors and curl's file descriptors simultaneous easily. <a name="ONE"></a><h2 class="nroffsh">ONE MULTI HANDLE MANY EASY HANDLES</h2>
-<p class="level0">To use the multi interface, you must first create a 'multi handle' with <a class="emphasis" href="./curl_multi_init.html">curl_multi_init(3)</a>. This handle is then used as input to all further curl_multi_* functions.
-<p class="level0">Each single transfer is built up with an easy handle. You must create them, and setup the appropriate options for each easy handle, as outlined in the <a class="emphasis" href="./libcurl.html">libcurl(3)</a> man page, using <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>.
-<p class="level0">When the easy handle is setup for a transfer, then instead of using <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> (as when using the easy interface for transfers), you should instead add the easy handle to the multi handle using <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a>. The multi handle is sometimes referred to as a ´multi stack´ because of the fact that it may hold a large amount of easy handles.
-<p class="level0">Should you change your mind, the easy handle is again removed from the multi stack using <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a>. Once removed from the multi handle, you can again use other easy interface functions like <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> on the handle or whatever you think is necessary.
-<p class="level0">Adding the easy handle to the multi handle does not start the transfer. Remember that one of the main ideas with this interface is to let your application drive. You drive the transfers by invoking <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. libcurl will then transfer data if there is anything available to transfer. It'll use the callbacks and everything else you have setup in the individual easy handles. It'll transfer data on all current transfers in the multi stack that are ready to transfer anything. It may be all, it may be none.
-<p class="level0">Your application can acquire knowledge from libcurl when it would like to get invoked to transfer data, so that you don't have to busy-loop and call that <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> like crazy. <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> offers an interface using which you can extract fd_sets from libcurl to use in select() or poll() calls in order to get to know when the transfers in the multi stack might need attention. This also makes it very easy for your program to wait for input on your own private file descriptors at the same time or perhaps timeout every now and then, should you want that.
-<p class="level0">A little note here about the return codes from the multi functions, and especially the <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>: if you receive <span Class="emphasis">CURLM_CALL_MULTI_PERFORM</span>, this basically means that you should call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> again, before you select() on more actions. You don't have to do it immediately, but the return code means that libcurl may have more data available to return or that there may be more data to send off before it is "satisfied".
-<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> stores the number of still running transfers in one of its input arguments, and by reading that you can figure out when all the transfers in the multi handles are done. 'done' does not mean successful. One or more of the transfers may have failed. Tracking when this number changes, you know when one or more transfers are done.
-<p class="level0">To get information about completed transfers, to figure out success or not and similar, <a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> should be called. It can return a message about a current or previous transfer. Repeated invokes of the function get more messages until the message queue is empty. The information you receive there includes an easy handle pointer which you may use to identify which easy handle the information regards.
-<p class="level0">When a single transfer is completed, the easy handle is still left added to the multi stack. You need to first remove the easy handle with <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> and then close it with <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>, or possibly set new options to it and add it again with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a> to start another transfer.
-<p class="level0">When all transfers in the multi stack are done, cleanup the multi handle with <a class="emphasis" href="./curl_multi_cleanup.html">curl_multi_cleanup(3)</a>. Be careful and please note that you <span Class="bold">MUST</span> invoke separate <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> calls on every single easy handle to clean them up properly.
-<p class="level0">If you want to re-use an easy handle that was added to the multi handle for transfer, you must first remove it from the multi stack and then re-add it again (possibly after having altered some options at your own choice). <a name="MULTISOCKET"></a><h2 class="nroffsh">MULTI_SOCKET</h2>
-<p class="level0">Since 7.16.0, the <a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> function offers a way for applications to not only avoid being forced to use select(), but it also offers a much more high-performance API that will make a significant difference for applications using large numbers of simultaneous connections.
-<p class="level0"><a class="emphasis" href="./curl_multi_socket_action.html">curl_multi_socket_action(3)</a> is then used instead of <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>. <a name="BLOCKING"></a><h2 class="nroffsh">BLOCKING</h2>
-<p class="level0">A few areas in the code are still using blocking code, even when used from the multi interface. While we certainly want and intend for these to get fixed in the future, you should be aware of the following current restrictions:
-<p class="level0"><pre>
-<p class="level0"> - Name resolves on non-windows unless c-ares is used
- - GnuTLS SSL connections
- - NSS SSL connections
- - Active FTP connections
- - HTTP proxy CONNECT operations
- - SOCKS proxy handshakes
- - file:// transfers
- - TELNET transfers
- </pre>
-
-<p class="level0"><p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-multi.pdf b/docs/libcurl/libcurl-multi.pdf
deleted file mode 100644
index 1fd4af6..0000000
--- a/docs/libcurl/libcurl-multi.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3
index 2e58c0b..b46eeda 100644
--- a/docs/libcurl/libcurl-share.3
+++ b/docs/libcurl/libcurl-share.3
@@ -1,6 +1,24 @@
-.\" You can view this file with:
-.\" nroff -man [file]
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface"
.SH NAME
libcurl-share \- how to use the share interface
@@ -16,15 +34,16 @@
\&"handles".
.SH "ONE SET OF DATA - MANY TRANSFERS"
You can have multiple easy handles share data between them. Have them update
-and use the \fBsame\fP cookie database or DNS cache! This way, each single
-transfer will take advantage from data updates made by the other transfer(s).
+and use the \fBsame\fP cookie database, DNS cache, TLS session cache! This
+way, each single transfer will take advantage from data updates made by the
+other transfer(s). The sharing interface, however, does not share active or
+persistent connections between different easy handles.
.SH "SHARE OBJECT"
You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle
for a newly created one.
You tell the shared object what data you want it to share by using
-\fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE
-data.
+\fIcurl_share_setopt(3)\fP.
Since you can use this share from multiple threads, and libcurl has no
internal thread synchronization, you must provide mutex callbacks if you're
@@ -32,14 +51,16 @@
\fIcurl_share_setopt(3)\fP too.
Then, you make an easy handle to use this share, you set the
-\fICURLOPT_SHARE\fP option with \fIcurl_easy_setopt(3)\fP, and pass in share
-handle. You can make any number of easy handles share the same share handle.
+\fICURLOPT_SHARE(3)\fP option with \fIcurl_easy_setopt(3)\fP, and pass in
+share handle. You can make any number of easy handles share the same share
+handle.
To make an easy handle stop using that particular share, you set
-\fICURLOPT_SHARE\fP to NULL for that easy handle. To make a handle stop
+\fICURLOPT_SHARE(3)\fP to NULL for that easy handle. To make a handle stop
sharing a particular data, you can \fICURLSHOPT_UNSHARE\fP it.
When you're done using the share, make sure that no easy handle is still using
it, and call \fIcurl_share_cleanup(3)\fP on the handle.
.SH "SEE ALSO"
.BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)"
+.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl-multi "(3) "
diff --git a/docs/libcurl/libcurl-share.html b/docs/libcurl/libcurl-share.html
deleted file mode 100644
index 6a66f32..0000000
--- a/docs/libcurl/libcurl-share.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html><head>
-<title>libcurl-share man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-share - how to use the share interface <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is an overview on how to use the libcurl share interface in your C programs. There are specific man pages for each function mentioned in here.
-<p class="level0">All functions in the share interface are prefixed with curl_share.
-<p class="level0"><a name="OBJECTIVES"></a><h2 class="nroffsh">OBJECTIVES</h2>
-<p class="level0">The share interface was added to enable sharing of data between curl "handles". <a name="ONE"></a><h2 class="nroffsh">ONE SET OF DATA - MANY TRANSFERS</h2>
-<p class="level0">You can have multiple easy handles share data between them. Have them update and use the <span Class="bold">same</span> cookie database or DNS cache! This way, each single transfer will take advantage from data updates made by the other transfer(s). <a name="SHARE"></a><h2 class="nroffsh">SHARE OBJECT</h2>
-<p class="level0">You create a shared object with <a class="emphasis" href="./curl_share_init.html">curl_share_init(3)</a>. It returns a handle for a newly created one.
-<p class="level0">You tell the shared object what data you want it to share by using <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a>. Currently you can only share DNS and/or COOKIE data.
-<p class="level0">Since you can use this share from multiple threads, and libcurl has no internal thread synchronization, you must provide mutex callbacks if you're using this multi-threaded. You set lock and unlock functions with <a class="emphasis" href="./curl_share_setopt.html">curl_share_setopt(3)</a> too.
-<p class="level0">Then, you make an easy handle to use this share, you set the <span Class="emphasis">CURLOPT_SHARE</span> option with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, and pass in share handle. You can make any number of easy handles share the same share handle.
-<p class="level0">To make an easy handle stop using that particular share, you set <span Class="emphasis">CURLOPT_SHARE</span> to NULL for that easy handle. To make a handle stop sharing a particular data, you can <span Class="emphasis">CURLSHOPT_UNSHARE</span> it.
-<p class="level0">When you're done using the share, make sure that no easy handle is still using it, and call <a class="emphasis" href="./curl_share_cleanup.html">curl_share_cleanup(3)</a> on the handle. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
-<p class="level0"><a class="manpage" href="./curl_share_init.html">curl_share_init (3)</a> <a class="manpage" href="./curl_share_setopt.html"> curl_share_setopt (3)</a> <a class="manpage" href="./curl_share_cleanup.html"> curl_share_cleanup (3)</a> <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-share.pdf b/docs/libcurl/libcurl-share.pdf
deleted file mode 100644
index a4ba4cb..0000000
--- a/docs/libcurl/libcurl-share.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl-tutorial.3 b/docs/libcurl/libcurl-tutorial.3
index 72f0029..11b0190 100644
--- a/docs/libcurl/libcurl-tutorial.3
+++ b/docs/libcurl/libcurl-tutorial.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al.
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
.\" *
.\" **************************************************************************
.\"
-.TH libcurl-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming"
+.TH libcurl-tutorial 3 "19 Sep 2014" "libcurl" "libcurl programming"
.SH NAME
libcurl-tutorial \- libcurl programming tutorial
.SH "Objective"
@@ -40,7 +40,7 @@
.SH "Building"
There are many different ways to build C programs. This chapter will assume a
-UNIX-style build process. If you use a different build system, you can still
+Unix style build process. If you use a different build system, you can still
read this to get general information that may apply to your environment as
well.
.IP "Compiling the Program"
@@ -137,15 +137,17 @@
struct, your program can figure out exactly what the currently running libcurl
supports.
-.SH "Handle the Easy libcurl"
+.SH "Two Interfaces"
libcurl first introduced the so called easy interface. All operations in the
-easy interface are prefixed with 'curl_easy'.
+easy interface are prefixed with 'curl_easy'. The easy interface lets you do
+single transfers with a synchronous and blocking function call.
-Recent libcurl versions also offer the multi interface. More about that
-interface, what it is targeted for and how to use it is detailed in a separate
-chapter further down. You still need to understand the easy interface first,
-so please continue reading for better understanding.
-
+libcurl also offers another interface that allows multiple simultaneous
+transfers in a single thread, the so called multi interface. More about that
+interface is detailed in a separate chapter further down. You still need to
+understand the easy interface first, so please continue reading for better
+understanding.
+.SH "Handle the Easy libcurl"
To use the easy interface, you must first create yourself an easy handle. You
need one handle for each easy session you want to perform. Basically, you
should use one handle for every thread you plan to use for transferring. You
@@ -162,16 +164,21 @@
You set properties and options for this handle using
\fIcurl_easy_setopt(3)\fP. They control how the subsequent transfer or
transfers will be made. Options remain set in the handle until set again to
-something different. Alas, multiple requests using the same handle will use
-the same options.
+something different. They are sticky. Multiple requests using the same handle
+will use the same options.
+
+If you at any point would like to blank all previously set options for a
+single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also
+make a clone of an easy handle (with all its set options) using
+\fIcurl_easy_duphandle(3)\fP.
Many of the options you set in libcurl are "strings", pointers to data
terminated with a zero byte. When you set strings with
-\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't
-need to be kept around in your application after being set[4].
+\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't need
+to be kept around in your application after being set[4].
-One of the most basic properties to set in the handle is the URL. You set
-your preferred URL to transfer with CURLOPT_URL in a manner similar to:
+One of the most basic properties to set in the handle is the URL. You set your
+preferred URL to transfer with \fICURLOPT_URL(3)\fP in a manner similar to:
.nf
curl_easy_setopt(handle, CURLOPT_URL, "http://domain.com/");
@@ -197,27 +204,27 @@
Using that property, you can easily pass local data between your application
and the function that gets invoked by libcurl. libcurl itself won't touch the
-data you pass with \fICURLOPT_WRITEDATA\fP.
+data you pass with \fICURLOPT_WRITEDATA(3)\fP.
-libcurl offers its own default internal callback that will take care of the data
-if you don't set the callback with \fICURLOPT_WRITEFUNCTION\fP. It will then
-simply output the received data to stdout. You can have the default callback
-write the data to a different file handle by passing a 'FILE *' to a file
-opened for writing with the \fICURLOPT_WRITEDATA\fP option.
+libcurl offers its own default internal callback that will take care of the
+data if you don't set the callback with \fICURLOPT_WRITEFUNCTION(3)\fP. It
+will then simply output the received data to stdout. You can have the default
+callback write the data to a different file handle by passing a 'FILE *' to a
+file opened for writing with the \fICURLOPT_WRITEDATA(3)\fP option.
Now, we need to take a step back and have a deep breath. Here's one of those
rare platform-dependent nitpicks. Did you spot it? On some platforms[2],
libcurl won't be able to operate on files opened by the program. Thus, if you
use the default callback and pass in an open file with
-\fICURLOPT_WRITEDATA\fP, it will crash. You should therefore avoid this to
+\fICURLOPT_WRITEDATA(3)\fP, it will crash. You should therefore avoid this to
make your program run fine virtually everywhere.
-(\fICURLOPT_WRITEDATA\fP was formerly known as \fICURLOPT_FILE\fP. Both names
-still work and do the same thing).
+(\fICURLOPT_WRITEDATA(3)\fP was formerly known as \fICURLOPT_FILE\fP. Both
+names still work and do the same thing).
If you're using libcurl as a win32 DLL, you MUST use the
-\fICURLOPT_WRITEFUNCTION\fP if you set \fICURLOPT_WRITEDATA\fP - or you will
-experience crashes.
+\fICURLOPT_WRITEFUNCTION(3)\fP if you set \fICURLOPT_WRITEDATA(3)\fP - or you
+will experience crashes.
There are of course many more options you can set, and we'll get back to a few
of them later. Let's instead continue to the actual transfer:
@@ -234,8 +241,8 @@
When the transfer is complete, the function returns a return code that informs
you if it succeeded in its mission or not. If a return code isn't enough for
-you, you can use the CURLOPT_ERRORBUFFER to point libcurl to a buffer of yours
-where it'll store a human readable error message as well.
+you, you can use the \fICURLOPT_ERRORBUFFER(3)\fP to point libcurl to a buffer
+of yours where it'll store a human readable error message as well.
If you then want to transfer another file, the handle is ready to be used
again. Mind you, it is even preferred that you re-use an existing handle if
@@ -249,13 +256,15 @@
of all the details needed to get the file moved from one machine to another.
.SH "Multi-threading Issues"
-The first basic rule is that you must \fBnever\fP share a libcurl handle (be
-it easy or multi or whatever) between multiple threads. Only use one handle in
-one thread at a time.
+The first basic rule is that you must \fBnever\fP simultaneously share a
+libcurl handle (be it easy or multi or whatever) between multiple
+threads. Only use one handle in one thread at any time. You can pass the
+handles around among threads, but you must never use a single handle from more
+than one thread at any given time.
libcurl is completely thread safe, except for two issues: signals and SSL/TLS
handlers. Signals are used for timing out name resolves (during DNS lookup) -
-when built without c-ares support and not on Windows.
+when built without using either the c-ares or threaded resolver backends.
If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are
then of course using the underlying SSL library multi-threaded and those libs
@@ -269,7 +278,7 @@
GnuTLS
- http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
+ http://gnutls.org/manual/html_node/Thread-safety.html
NSS
@@ -283,14 +292,22 @@
Required actions unknown.
-When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1
-for all handles. Everything will or might work fine except that timeouts are
-not honored during the DNS lookup - which you can work around by building
-libcurl with c-ares support. c-ares is a library that provides asynchronous
-name resolves. On some platforms, libcurl simply will not function properly
-multi-threaded unless this option is set.
+axTLS
-Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe.
+ Required actions unknown.
+
+Secure Transport
+
+ The engine is fully thread-safe, and no additional steps are required.
+
+When using multiple threads you should set the \fICURLOPT_NOSIGNAL(3)\fP
+option to 1 for all handles. Everything will or might work fine except that
+timeouts are not honored during the DNS lookup - which you can work around by
+building libcurl with c-ares support. c-ares is a library that provides
+asynchronous name resolves. On some platforms, libcurl simply will not
+function properly multi-threaded unless this option is set.
+
+Also, note that \fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP is not thread-safe.
.SH "When It Doesn't Work"
There will always be times when the transfer fails for some reason. You might
@@ -298,23 +315,23 @@
actually does, or the remote server might return non-standard replies that
confuse the library which then confuses your program.
-There's one golden rule when these things occur: set the CURLOPT_VERBOSE
-option to 1. It'll cause the library to spew out the entire protocol
-details it sends, some internal info and some received protocol data as well
-(especially when using FTP). If you're using HTTP, adding the headers in the
-received output to study is also a clever way to get a better understanding
-why the server behaves the way it does. Include headers in the normal body
-output with CURLOPT_HEADER set 1.
+There's one golden rule when these things occur: set the
+\fICURLOPT_VERBOSE(3)\fP option to 1. It'll cause the library to spew out the
+entire protocol details it sends, some internal info and some received
+protocol data as well (especially when using FTP). If you're using HTTP,
+adding the headers in the received output to study is also a clever way to get
+a better understanding why the server behaves the way it does. Include headers
+in the normal body output with \fICURLOPT_HEADER(3)\fP set 1.
-Of course, there are bugs left. We need to know about them to be able
-to fix them, so we're quite dependent on your bug reports! When you do report
-suspected bugs in libcurl, please include as many details as you possibly can: a
-protocol dump that CURLOPT_VERBOSE produces, library version, as much as
-possible of your code that uses libcurl, operating system name and version,
-compiler name and version etc.
+Of course, there are bugs left. We need to know about them to be able to fix
+them, so we're quite dependent on your bug reports! When you do report
+suspected bugs in libcurl, please include as many details as you possibly can:
+a protocol dump that \fICURLOPT_VERBOSE(3)\fP produces, library version, as
+much as possible of your code that uses libcurl, operating system name and
+version, compiler name and version etc.
-If CURLOPT_VERBOSE is not enough, you increase the level of debug data your
-application receive by using the CURLOPT_DEBUGFUNCTION.
+If \fICURLOPT_VERBOSE(3)\fP is not enough, you increase the level of debug
+data your application receive by using the \fICURLOPT_DEBUGFUNCTION(3)\fP.
Getting some in-depth knowledge about the protocols involved is never wrong,
and if you're trying to do funny things, you might very well understand
@@ -353,7 +370,7 @@
A few protocols won't behave properly when uploads are done without any prior
knowledge of the expected file size. So, set the upload file size using the
-CURLOPT_INFILESIZE_LARGE for all known file sizes like this[1]:
+\fICURLOPT_INFILESIZE_LARGE(3)\fP for all known file sizes like this[1]:
.nf
/* in this example, file_size must be an curl_off_t variable */
@@ -383,26 +400,26 @@
libcurl also provides options to set various passwords. The user name and
password as shown embedded in the URL can instead get set with the
-CURLOPT_USERPWD option. The argument passed to libcurl should be a char * to
-a string in the format "user:password". In a manner like this:
+\fICURLOPT_USERPWD(3)\fP option. The argument passed to libcurl should be a
+char * to a string in the format "user:password". In a manner like this:
curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");
Another case where name and password might be needed at times, is for those
users who need to authenticate themselves to a proxy they use. libcurl offers
-another option for this, the CURLOPT_PROXYUSERPWD. It is used quite similar
-to the CURLOPT_USERPWD option like this:
+another option for this, the \fICURLOPT_PROXYUSERPWD(3)\fP. It is used quite
+similar to the \fICURLOPT_USERPWD(3)\fP option like this:
curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret");
-There's a long time UNIX "standard" way of storing ftp user names and
+There's a long time Unix "standard" way of storing FTP user names and
passwords, namely in the $HOME/.netrc file. The file should be made private
so that only the user may read it (see also the "Security Considerations"
chapter), as it might contain the password in plain text. libcurl has the
ability to use this file to figure out what set of user name and password to
use for a particular host. As an extension to the normal functionality,
libcurl also supports this file for non-FTP protocols such as HTTP. To make
-curl use this file, use the CURLOPT_NETRC option:
+curl use this file, use the \fICURLOPT_NETRC(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_NETRC, 1L);
@@ -432,13 +449,13 @@
password in clear-text in the HTTP request, base64-encoded. This is insecure.
At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM,
-Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use
-with CURLOPT_HTTPAUTH as in:
+Negotiate (SPNEGO). You can tell libcurl which one to use
+with \fICURLOPT_HTTPAUTH(3)\fP as in:
curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
And when you send authentication to a proxy, you can also set authentication
-type the same way but instead with CURLOPT_PROXYAUTH:
+type the same way but instead with \fICURLOPT_PROXYAUTH(3)\fP:
curl_easy_setopt(easyhandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
@@ -474,8 +491,8 @@
.fi
Simple enough, huh? Since you set the POST options with the
-CURLOPT_POSTFIELDS, this automatically switches the handle to use POST in the
-upcoming request.
+\fICURLOPT_POSTFIELDS(3)\fP, this automatically switches the handle to use
+POST in the upcoming request.
Ok, so what if you want to post binary data that also requires you to set the
Content-Type: header of the post? Well, binary posts prevent libcurl from
@@ -566,14 +583,14 @@
Since all options on an easyhandle are "sticky", they remain the same until
changed even if you do call \fIcurl_easy_perform(3)\fP, you may need to tell
-curl to go back to a plain GET request if you intend to do one as your
-next request. You force an easyhandle to go back to GET by using the
-CURLOPT_HTTPGET option:
+curl to go back to a plain GET request if you intend to do one as your next
+request. You force an easyhandle to go back to GET by using the
+\fICURLOPT_HTTPGET(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
-Just setting CURLOPT_POSTFIELDS to "" or NULL will *not* stop libcurl from
-doing a POST. It will just make it POST without any data to send!
+Just setting \fICURLOPT_POSTFIELDS(3)\fP to "" or NULL will *not* stop libcurl
+from doing a POST. It will just make it POST without any data to send!
.SH "Showing Progress"
@@ -581,16 +598,16 @@
that can be switched on and then makes it present a progress meter in your
terminal.
-Switch on the progress meter by, oddly enough, setting CURLOPT_NOPROGRESS to
-zero. This option is set to 1 by default.
+Switch on the progress meter by, oddly enough, setting
+\fICURLOPT_NOPROGRESS(3)\fP to zero. This option is set to 1 by default.
For most applications however, the built-in progress meter is useless and
what instead is interesting is the ability to specify a progress
callback. The function pointer you pass to libcurl will then be called on
irregular intervals with information about the current transfer.
-Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a
-pointer to a function that matches this prototype:
+Set the progress callback by using \fICURLOPT_PROGRESSFUNCTION(3)\fP. And pass
+a pointer to a function that matches this prototype:
.nf
int progress_callback(void *clientp,
@@ -602,7 +619,7 @@
If any of the input arguments is unknown, a 0 will be passed. The first
argument, the 'clientp' is the pointer you pass to libcurl with
-CURLOPT_PROGRESSDATA. libcurl won't touch it.
+\fICURLOPT_PROGRESSDATA(3)\fP. libcurl won't touch it.
.SH "libcurl with C++"
@@ -661,11 +678,12 @@
curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");
-If you want to, you can specify the host name only in the CURLOPT_PROXY
-option, and set the port number separately with CURLOPT_PROXYPORT.
+If you want to, you can specify the host name only in the
+\fICURLOPT_PROXY(3)\fP option, and set the port number separately with
+\fICURLOPT_PROXYPORT(3)\fP.
-Tell libcurl what kind of proxy it is with CURLOPT_PROXYTYPE (if not, it will
-default to assume a HTTP proxy):
+Tell libcurl what kind of proxy it is with \fICURLOPT_PROXYTYPE(3)\fP (if not,
+it will default to assume a HTTP proxy):
curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
@@ -694,7 +712,8 @@
hosts.
To explicitly disable libcurl's checking for and using the proxy environment
-variables, set the proxy name to "" - an empty string - with CURLOPT_PROXY.
+variables, set the proxy name to "" - an empty string - with
+\fICURLOPT_PROXY(3)\fP.
.IP "SSL and Proxies"
SSL is for secure point-to-point connections. This involves strong encryption
@@ -790,31 +809,27 @@
Each easy handle will attempt to keep the last few connections alive for a
while in case they are to be used again. You can set the size of this "cache"
-with the CURLOPT_MAXCONNECTS option. Default is 5. There is very seldom any
-point in changing this value, and if you think of changing this it is often
-just a matter of thinking again.
+with the \fICURLOPT_MAXCONNECTS(3)\fP option. Default is 5. There is very
+seldom any point in changing this value, and if you think of changing this it
+is often just a matter of thinking again.
To force your upcoming request to not use an already existing connection (it
will even close one first if there happens to be one alive to the same host
-you're about to operate on), you can do that by setting CURLOPT_FRESH_CONNECT
-to 1. In a similar spirit, you can also forbid the upcoming request to be
-"lying" around and possibly get re-used after the request by setting
-CURLOPT_FORBID_REUSE to 1.
+you're about to operate on), you can do that by setting
+\fICURLOPT_FRESH_CONNECT(3)\fP to 1. In a similar spirit, you can also forbid
+the upcoming request to be "lying" around and possibly get re-used after the
+request by setting \fICURLOPT_FORBID_REUSE(3)\fP to 1.
.SH "HTTP Headers Used by libcurl"
When you use libcurl to do HTTP requests, it'll pass along a series of headers
automatically. It might be good for you to know and understand these. You
-can replace or remove them by using the CURLOPT_HTTPHEADER option.
+can replace or remove them by using the \fICURLOPT_HTTPHEADER(3)\fP option.
.IP "Host"
This header is required by HTTP 1.1 and even many 1.0 servers and should be
the name of the server we want to talk to. This includes the port number if
anything but default.
-.IP "Pragma"
-\&"no-cache". Tells a possible proxy to not grab a copy from the cache but to
-fetch a fresh one.
-
.IP "Accept"
\&"*/*".
@@ -837,8 +852,8 @@
.IP CUSTOMREQUEST
If just changing the actual HTTP request keyword is what you want, like when
-GET, HEAD or POST is not good enough for you, CURLOPT_CUSTOMREQUEST is there
-for you. It is very simple to use:
+GET, HEAD or POST is not good enough for you, \fICURLOPT_CUSTOMREQUEST(3)\fP
+is there for you. It is very simple to use:
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
@@ -933,28 +948,29 @@
If you would instead want this operation (or chain of operations) to happen
_after_ the data transfer took place the option to \fIcurl_easy_setopt(3)\fP
-would instead be called CURLOPT_POSTQUOTE and used the exact same way.
+would instead be called \fICURLOPT_POSTQUOTE(3)\fP and used the exact same
+way.
The custom FTP command will be issued to the server in the same order they are
added to the list, and if a command gets an error code returned back from the
server, no more commands will be issued and libcurl will bail out with an
-error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
-commands before a transfer, no transfer will actually take place when a quote
-command has failed.
+error code (CURLE_QUOTE_ERROR). Note that if you use \fICURLOPT_QUOTE(3)\fP to
+send commands before a transfer, no transfer will actually take place when a
+quote command has failed.
-If you set the CURLOPT_HEADER to 1, you will tell libcurl to get
+If you set the \fICURLOPT_HEADER(3)\fP to 1, you will tell libcurl to get
information about the target file and output "headers" about it. The headers
will be in "HTTP-style", looking like they do in HTTP.
The option to enable headers or to run custom FTP commands may be useful to
-combine with CURLOPT_NOBODY. If this option is set, no actual file content
-transfer will be performed.
+combine with \fICURLOPT_NOBODY(3)\fP. If this option is set, no actual file
+content transfer will be performed.
.IP "FTP Custom CUSTOMREQUEST"
-If you do want to list the contents of a FTP directory using your own defined FTP
-command, CURLOPT_CUSTOMREQUEST will do just that. "NLST" is the default one
-for listing directories but you're free to pass in your idea of a good
-alternative.
+If you do want to list the contents of a FTP directory using your own defined
+FTP command, \fICURLOPT_CUSTOMREQUEST(3)\fP will do just that. "NLST" is the
+default one for listing directories but you're free to pass in your idea of a
+good alternative.
.SH "Cookies Without Chocolate Chips"
In the HTTP sense, a cookie is a name with an associated value. A server sends
@@ -969,8 +985,8 @@
Cookies are sent from server to clients with the header Set-Cookie: and
they're sent from clients to servers with the Cookie: header.
-To just send whatever cookie you want to a server, you can use CURLOPT_COOKIE
-to set a cookie string like this:
+To just send whatever cookie you want to a server, you can use
+\fICURLOPT_COOKIE(3)\fP to set a cookie string like this:
curl_easy_setopt(easyhandle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
@@ -981,29 +997,30 @@
One way to do this, is to save all headers you receive in a plain file and
when you make a request, you tell libcurl to read the previous headers to
figure out which cookies to use. Set the header file to read cookies from with
-CURLOPT_COOKIEFILE.
+\fICURLOPT_COOKIEFILE(3)\fP.
-The CURLOPT_COOKIEFILE option also automatically enables the cookie parser in
-libcurl. Until the cookie parser is enabled, libcurl will not parse or
-understand incoming cookies and they will just be ignored. However, when the
-parser is enabled the cookies will be understood and the cookies will be kept
-in memory and used properly in subsequent requests when the same handle is
-used. Many times this is enough, and you may not have to save the cookies to
-disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't have
-to exist to enable the parser, so a common way to just enable the parser and
-not read any cookies is to use the name of a file you know doesn't exist.
+The \fICURLOPT_COOKIEFILE(3)\fP option also automatically enables the cookie
+parser in libcurl. Until the cookie parser is enabled, libcurl will not parse
+or understand incoming cookies and they will just be ignored. However, when
+the parser is enabled the cookies will be understood and the cookies will be
+kept in memory and used properly in subsequent requests when the same handle
+is used. Many times this is enough, and you may not have to save the cookies
+to disk at all. Note that the file you specify to \ICURLOPT_COOKIEFILE(3)\fP
+doesn't have to exist to enable the parser, so a common way to just enable the
+parser and not read any cookies is to use the name of a file you know doesn't
+exist.
If you would rather use existing cookies that you've previously received with
your Netscape or Mozilla browsers, you can make libcurl use that cookie file
-as input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will
-automatically find out what kind of file it is and act accordingly.
+as input. The \fICURLOPT_COOKIEFILE(3)\fP is used for that too, as libcurl
+will automatically find out what kind of file it is and act accordingly.
Perhaps the most advanced cookie operation libcurl offers, is saving the
entire internal cookie state back into a Netscape/Mozilla formatted cookie
file. We call that the cookie-jar. When you set a file name with
-CURLOPT_COOKIEJAR, that file name will be created and all received cookies
-will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This enables
-cookies to get passed on properly between multiple handles without any
+\fICURLOPT_COOKIEJAR(3)\fP, that file name will be created and all received
+cookies will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This
+enables cookies to get passed on properly between multiple handles without any
information getting lost.
.SH "FTP Peculiarities We Need"
@@ -1022,36 +1039,36 @@
and does not exist nor work on all FTP servers.)
You can prevent libcurl from first trying the EPSV command by setting
-CURLOPT_FTP_USE_EPSV to zero.
+\fICURLOPT_FTP_USE_EPSV(3)\fP to zero.
In some cases, you will prefer to have the server connect back to you for the
second connection. This might be when the server is perhaps behind a firewall
or something and only allows connections on a single port. libcurl then
informs the remote server which IP address and port number to connect to.
-This is made with the CURLOPT_FTPPORT option. If you set it to "-", libcurl
-will use your system's "default IP address". If you want to use a particular
-IP, you can set the full IP address, a host name to resolve to an IP address
-or even a local network interface name that libcurl will get the IP address
-from.
+This is made with the \fICURLOPT_FTPPORT(3)\fP option. If you set it to "-",
+libcurl will use your system's "default IP address". If you want to use a
+particular IP, you can set the full IP address, a host name to resolve to an
+IP address or even a local network interface name that libcurl will get the IP
+address from.
When doing the "PORT" approach, libcurl will attempt to use the EPRT and the
LPRT before trying PORT, as they work with more protocols. You can disable
-this behavior by setting CURLOPT_FTP_USE_EPRT to zero.
+this behavior by setting \fICURLOPT_FTP_USE_EPRT(3)\fP to zero.
.SH "Headers Equal Fun"
Some protocols provide "headers", meta-data separated from the normal
-data. These headers are by default not included in the normal data stream,
-but you can make them appear in the data stream by setting CURLOPT_HEADER to
-1.
+data. These headers are by default not included in the normal data stream, but
+you can make them appear in the data stream by setting \fICURLOPT_HEADER(3)\fP
+to 1.
What might be even more useful, is libcurl's ability to separate the headers
from the data and thus make the callbacks differ. You can for example set a
different pointer to pass to the ordinary write callback by setting
-CURLOPT_WRITEHEADER.
+\fICURLOPT_HEADERDATA(3)\fP.
-Or, you can set an entirely separate function to receive the headers, by
-using CURLOPT_HEADERFUNCTION.
+Or, you can set an entirely separate function to receive the headers, by using
+\fICURLOPT_HEADERFUNCTION(3)\fP.
The headers are passed to the callback function one by one, and you can
depend on that fact. It makes it easier for you to add custom header parsers
@@ -1112,18 +1129,18 @@
Basic uses base64 encoded passwords fool you. They may not look readable at a
first glance, but they very easily "deciphered" by anyone within seconds.
-To avoid this problem, use HTTP authentication methods or other protocols that
-don't let snoopers see your password: HTTP with Digest, NTLM or GSS
-authentication, HTTPS, FTPS, SCP, SFTP and FTP-Kerberos are a few examples.
+To avoid this problem, use an authentication mechanism or other protocol that
+doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
+NTLM authentication, HTTPS, FTPS, SCP and SFTP are a few examples.
.IP "Redirects"
-The CURLOPT_FOLLOWLOCATION option automatically follows HTTP redirects sent
-by a remote server. These redirects can refer to any kind of URL, not just
-HTTP. A redirect to a file: URL would cause the libcurl to read (or write)
-arbitrary files from the local filesystem. If the application returns
-the data back to the user (as would happen in some kinds of CGI scripts),
-an attacker could leverage this to read otherwise forbidden data (e.g.
-file://localhost/etc/passwd).
+The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP
+redirects sent by a remote server. These redirects can refer to any kind of
+URL, not just HTTP. A redirect to a file: URL would cause the libcurl to read
+(or write) arbitrary files from the local filesystem. If the application
+returns the data back to the user (as would happen in some kinds of CGI
+scripts), an attacker could leverage this to read otherwise forbidden data
+(e.g. file://localhost/etc/passwd).
If authentication credentials are stored in the ~/.netrc file, or Kerberos
is in use, any other URL type (not just file:) that requires
@@ -1136,63 +1153,77 @@
password or private-key protected resources,
e.g. sftp://user@some-internal-server/etc/passwd
-The CURLOPT_REDIR_PROTOCOLS and CURLOPT_NETRC options can be used to
-mitigate against this kind of attack.
+The \fICURLOPT_REDIR_PROTOCOLS(3)\fP and \fICURLOPT_NETRC(3)\fP options can be
+used to mitigate against this kind of attack.
A redirect can also specify a location available only on the machine running
libcurl, including servers hidden behind a firewall from the attacker.
e.g. http://127.0.0.1/ or http://intranet/delete-stuff.cgi?delete=all or
tftp://bootp-server/pc-config-data
-Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and
-handling redirects itself, sanitizing URLs as necessary. Alternately, an
-app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS
-and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses
-are sanitized before use.
+Apps can mitigate against this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP
+and handling redirects itself, sanitizing URLs as necessary. Alternately, an
+app could leave \fICURLOPT_FOLLOWLOCATION(3)\fP enabled but set
+\fICURLOPT_REDIR_PROTOCOLS(3)\fP and install a
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP callback function in which addresses are
+sanitized before use.
.IP "Private Resources"
-A user who can control the DNS server of a domain being passed in within
-a URL can change the address of the host to a local, private address
-which the libcurl application will then use. e.g. The innocuous URL
-http://fuzzybunnies.example.com/ could actually resolve to the IP address
-of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3
-Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION
-and checking the address before a connection.
+A user who can control the DNS server of a domain being passed in within a URL
+can change the address of the host to a local, private address which a
+server-side libcurl-using application could then use. e.g. the innocuous URL
+http://fuzzybunnies.example.com/ could actually resolve to the IP address of a
+server behind a firewall, such as 127.0.0.1 or 10.1.2.3. Apps can mitigate
+against this by setting a \fICURLOPT_OPENSOCKETFUNCTION(3)\fP and checking the
+address before a connection.
-All the malicious scenarios regarding redirected URLs apply just as well
-to non-redirected URLs, if the user is allowed to specify an arbitrary URL
-that could point to a private resource. For example, a web app providing
-a translation service might happily translate file://localhost/etc/passwd
-and display the result. Apps can mitigate against this with the
-CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for
-redirections.
+All the malicious scenarios regarding redirected URLs apply just as well to
+non-redirected URLs, if the user is allowed to specify an arbitrary URL that
+could point to a private resource. For example, a web app providing a
+translation service might happily translate file://localhost/etc/passwd and
+display the result. Apps can mitigate against this with the
+\fICURLOPT_PROTOCOLS(3)\fP option as well as by similar mitigation techniques
+for redirections.
-A malicious FTP server could in response to the PASV command return an
-IP address and port number for a server local to the app running libcurl
-but behind a firewall. Apps can mitigate against this by using the
-CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
+A malicious FTP server could in response to the PASV command return an IP
+address and port number for a server local to the app running libcurl but
+behind a firewall. Apps can mitigate against this by using the
+\fICURLOPT_FTP_SKIP_PASV_IP(3)\fP option or \fICURLOPT_FTPPORT(3)\fP.
+
+.IP "IPv6 Addresses"
+libcurl will normally handle IPv6 addresses transparently and just as easily
+as IPv4 addresses. That means that a sanitizing function that filters out
+addressses like 127.0.0.1 isn't sufficient--the equivalent IPv6 addresses ::1,
+::, 0:00::0:1, ::127.0.0.1 and ::ffff:7f00:1 supplied somehow by an attacker
+would all bypass a naive filter and could allow access to undesired local
+resources. IPv6 also has special address blocks like link-local and site-local
+that generally shouldn't be accessed by a server-side libcurl-using
+application. A poorly-configured firewall installed in a data center,
+organization or server may also be configured to limit IPv4 connections but
+leave IPv6 connections wide open. In some cases, the CURL_IPRESOLVE_V4 option
+can be used to limit resolved addresses to IPv4 only and bypass these issues.
.IP Uploads
When uploading, a redirect can cause a local (or remote) file to be
-overwritten. Apps must not allow any unsanitized URL to be passed in
-for uploads. Also, CURLOPT_FOLLOWLOCATION should not be used on uploads.
+overwritten. Apps must not allow any unsanitized URL to be passed in for
+uploads. Also, \fICURLOPT_FOLLOWLOCATION(3)\fP should not be used on uploads.
Instead, the app should handle redirects itself, sanitizing each URL first.
.IP Authentication
-Use of CURLOPT_UNRESTRICTED_AUTH could cause authentication information to
-be sent to an unknown second server. Apps can mitigate against this
-by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself,
-sanitizing where necessary.
+Use of \fICURLOPT_UNRESTRICTED_AUTH(3)\fP could cause authentication
+information to be sent to an unknown second server. Apps can mitigate against
+this by disabling \fICURLOPT_FOLLOWLOCATION(3)\fP and handling redirects
+itself, sanitizing where necessary.
-Use of the CURLAUTH_ANY option to CURLOPT_HTTPAUTH could result in user
-name and password being sent in clear text to an HTTP server. Instead,
-use CURLAUTH_ANYSAFE which ensures that the password is encrypted over
-the network, or else fail the request.
+Use of the CURLAUTH_ANY option to \fICURLOPT_HTTPAUTH(3)\fP could result in
+user name and password being sent in clear text to an HTTP server. Instead,
+use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the
+network, or else fail the request.
-Use of the CURLUSESSL_TRY option to CURLOPT_USE_SSL could result in user
-name and password being sent in clear text to an FTP server. Instead,
-use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or
-else fail the request.
+Use of the CURLUSESSL_TRY option to \fICURLOPT_USE_SSL(3)\fP could result in
+user name and password being sent in clear text to an FTP server. Instead,
+use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else
+fail the request.
.IP Cookies
If cookies are enabled and cached, then a user could craft a URL which
@@ -1208,34 +1239,35 @@
Apps must not allow unsanitized SCP: URLs to be passed in for downloads.
.IP "Denial of Service"
-A malicious server could cause libcurl to effectively hang by sending
-a trickle of data through, or even no data at all but just keeping the TCP
+A malicious server could cause libcurl to effectively hang by sending a
+trickle of data through, or even no data at all but just keeping the TCP
connection open. This could result in a denial-of-service attack. The
-CURLOPT_TIMEOUT and/or CURLOPT_LOW_SPEED_LIMIT options can be used to
-mitigate against this.
+\fICURLOPT_TIMEOUT(3)\fP and/or \fICURLOPT_LOW_SPEED_LIMIT(3)\fP options can
+be used to mitigate against this.
-A malicious server could cause libcurl to effectively hang by starting to
-send data, then severing the connection without cleanly closing the
-TCP connection. The app could install a CURLOPT_SOCKOPTFUNCTION callback
-function and set the TCP SO_KEEPALIVE option to mitigate against this.
-Setting one of the timeout options would also work against this attack.
+A malicious server could cause libcurl to effectively hang by starting to send
+data, then severing the connection without cleanly closing the TCP connection.
+The app could install a \fICURLOPT_SOCKOPTFUNCTION(3)\fP callback function and
+set the TCP SO_KEEPALIVE option to mitigate against this. Setting one of the
+timeout options would also work against this attack.
-A malicious server could cause libcurl to download an infinite amount of
-data, potentially causing all of memory or disk to be filled. Setting
-the CURLOPT_MAXFILESIZE_LARGE option is not sufficient to guard against this.
-Instead, the app should monitor the amount of data received within the
+A malicious server could cause libcurl to download an infinite amount of data,
+potentially causing all of memory or disk to be filled. Setting the
+\fICURLOPT_MAXFILESIZE_LARGE(3)\fP option is not sufficient to guard against
+this. Instead, the app should monitor the amount of data received within the
write or progress callback and abort once the limit is reached.
A malicious HTTP server could cause an infinite redirection loop, causing a
-denial-of-service. This can be mitigated by using the CURLOPT_MAXREDIRS
-option.
+denial-of-service. This can be mitigated by using the
+\fICURLOPT_MAXREDIRS(3)\fP option.
.IP "Arbitrary Headers"
User-supplied data must be sanitized when used in options like
-CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that
-are used to generate structured data. Characters like embedded carriage
-returns or ampersands could allow the user to create additional headers or
-fields that could cause malicious transactions.
+\fICURLOPT_USERAGENT(3)\fP, \fICURLOPT_HTTPHEADER(3)\fP,
+\fICURLOPT_POSTFIELDS(3)\fP and others that are used to generate structured
+data. Characters like embedded carriage returns or ampersands could allow the
+user to create additional headers or fields that could cause malicious
+transactions.
.IP "Server-supplied Names"
A server can supply data which the application may, in some cases, use as
@@ -1244,12 +1276,12 @@
could also use CURLINFO_EFFECTIVE_URL to generate a file name from a
server-supplied redirect URL. Special care must be taken to sanitize such
names to avoid the possibility of a malicious server supplying one like
-"/etc/passwd", "\autoexec.bat" or even ".bashrc".
+"/etc/passwd", "\\autoexec.bat", "prn:" or even ".bashrc".
.IP "Server Certificates"
-A secure application should never use the CURLOPT_SSL_VERIFYPEER option to
-disable certificate validation. There are numerous attacks that are enabled
-by apps that fail to properly validate server TLS/SSL certificates,
+A secure application should never use the \fICURLOPT_SSL_VERIFYPEER(3)\fP
+option to disable certificate validation. There are numerous attacks that are
+enabled by apps that fail to properly validate server TLS/SSL certificates,
thus enabling a malicious server to spoof a legitimate one. HTTPS without
validated certificates is potentially as insecure as a plain HTTP connection.
@@ -1257,49 +1289,57 @@
On a related issue, be aware that even in situations like when you have
problems with libcurl and ask someone for help, everything you reveal in order
to get best possible help might also impose certain security related
-risks. Host names, user names, paths, operating system specifics, etc (not to
+risks. Host names, user names, paths, operating system specifics, etc. (not to
mention passwords of course) may in fact be used by intruders to gain
additional information of a potential target.
+Be sure to limit access to application logs if they could hold private or
+security-related data. Besides the obvious candidates like user names and
+passwords, things like URLs, cookies or even file names could also hold
+sensitive data.
+
To avoid this problem, you must of course use your common sense. Often, you
can just edit out the sensitive data or just search/replace your true
information with faked data.
-.SH "Multiple Transfers Using the multi Interface"
-
+.SH "The multi Interface"
The easy interface as described in detail in this document is a synchronous
interface that transfers one file at a time and doesn't return until it is
done.
The multi interface, on the other hand, allows your program to transfer
-multiple files in both directions at the same time, without forcing you
-to use multiple threads. The name might make it seem that the multi
-interface is for multi-threaded programs, but the truth is almost the
-reverse. The multi interface can allow a single-threaded application
-to perform the same kinds of multiple, simultaneous transfers that
-multi-threaded programs can perform. It allows many of the benefits
-of multi-threaded transfers without the complexity of managing and
-synchronizing many threads.
+multiple files in both directions at the same time, without forcing you to use
+multiple threads. The name might make it seem that the multi interface is for
+multi-threaded programs, but the truth is almost the reverse. The multi
+interface allows a single-threaded application to perform the same kinds of
+multiple, simultaneous transfers that multi-threaded programs can perform. It
+allows many of the benefits of multi-threaded transfers without the complexity
+of managing and synchronizing many threads.
+
+To complicate matters somewhat more, there are even two versions of the multi
+interface. The event based one, also called multi_socket and the "normal one"
+designed for using with select(). See the libcurl-multi.3 man page for details
+on the multi_socket event based API, this description here is for the select()
+oriented one.
To use this interface, you are better off if you first understand the basics
of how to use the easy interface. The multi interface is simply a way to make
multiple transfers at the same time by adding up multiple easy handles into
a "multi stack".
-You create the easy handles you want and you set all the options just like you
-have been told above, and then you create a multi handle with
-\fIcurl_multi_init(3)\fP and add all those easy handles to that multi handle
-with \fIcurl_multi_add_handle(3)\fP.
+You create the easy handles you want, one for each concurrent transfer, and
+you set all the options just like you learned above, and then you create a
+multi handle with \fIcurl_multi_init(3)\fP and add all those easy handles to
+that multi handle with \fIcurl_multi_add_handle(3)\fP.
When you've added the handles you have for the moment (you can still add new
ones at any time), you start the transfers by calling
\fIcurl_multi_perform(3)\fP.
-\fIcurl_multi_perform(3)\fP is asynchronous. It will only execute as little as
-possible and then return back control to your program. It is designed to never
-block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon,
-as that is a signal that it still has local data to send or remote data to
-receive.
+\fIcurl_multi_perform(3)\fP is asynchronous. It will only perform what can be
+done now and then return back control to your program. It is designed to never
+block. You need to keep calling the function until all transfers are
+completed.
The best usage of this interface is when you do a select() on all possible
file descriptors or sockets to know when to call libcurl again. This also
@@ -1312,11 +1352,12 @@
action and you then call \fIcurl_multi_perform(3)\fP to allow libcurl to do
what it wants to do. Take note that libcurl does also feature some time-out
code so we advise you to never use very long timeouts on select() before you
-call \fIcurl_multi_perform(3)\fP, which thus should be called unconditionally
-every now and then even if none of its file descriptors have signaled
-ready. Another precaution you should use: always call
-\fIcurl_multi_fdset(3)\fP immediately before the select() call since the
-current set of file descriptors may change when calling a curl function.
+call \fIcurl_multi_perform(3)\fP again. \fIcurl_multi_timeout(3)\fP is
+provided to help you get a suitable timeout period.
+
+Another precaution you should use: always call \fIcurl_multi_fdset(3)\fP
+immediately before the select() call since the current set of file descriptors
+may change in any curl function invoke.
If you want to stop the transfer of one of the easy handles in the stack, you
can use \fIcurl_multi_remove_handle(3)\fP to remove individual easy
@@ -1335,9 +1376,21 @@
[ seeding, passwords, keys, certificates, ENGINE, ca certs ]
.SH "Sharing Data Between Easy Handles"
+You can share some data between easy handles when the easy interface is used,
+and some data is share automatically when you use the multi interface.
- [ fill in ]
+When you add easy handles to a multi handle, these easy handles will
+automatically share a lot of the data that otherwise would be kept on a
+per-easy handle basis when the easy interface is used.
+The DNS cache is shared between handles within a multi handle, making
+subsequent name resolving faster, and the connection pool that is kept to
+better allow persistent connections and connection re-use is also shared. If
+you're using the easy interface, you can still share these between specific
+easy handles by using the share interface, see \fIlibcurl-share(3)\fP.
+
+Some things are never shared automatically, not within multi handles, like for
+example cookies so the only way to share that is with the share interface.
.SH "Footnotes"
.IP "[1]"
@@ -1349,9 +1402,11 @@
DLL. However, you can still do this on Windows if you link with a static
library.
.IP "[3]"
-The curl-config tool is generated at build-time (on UNIX-like systems) and
+The curl-config tool is generated at build-time (on Unix-like systems) and
should be installed with the 'make install' or similar instruction that
installs the library, header files, man pages etc.
.IP "[4]"
This behavior was different in versions before 7.17.0, where strings had to
remain valid past the end of the \fIcurl_easy_setopt(3)\fP call.
+.SH "SEE ALSO"
+.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl-easy "(3) "
diff --git a/docs/libcurl/libcurl-tutorial.html b/docs/libcurl/libcurl-tutorial.html
deleted file mode 100644
index 593d191..0000000
--- a/docs/libcurl/libcurl-tutorial.html
+++ /dev/null
@@ -1,547 +0,0 @@
-<html><head>
-<title>libcurl-tutorial man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl-tutorial - libcurl programming tutorial <a name="Objective"></a><h2 class="nroffsh">Objective</h2>
-<p class="level0">This document attempts to describe the general principles and some basic approaches to consider when programming with libcurl. The text will focus mainly on the C interface but might apply fairly well on other interfaces as well as they usually follow the C one pretty closely.
-<p class="level0">This document will refer to 'the user' as the person writing the source code that uses libcurl. That would probably be you or someone in your position. What will be generally referred to as 'the program' will be the collected source code that you write that is using libcurl for transfers. The program is outside libcurl and libcurl is outside of the program.
-<p class="level0">To get more details on all options and functions described herein, please refer to their respective man pages.
-<p class="level0"><a name="Building"></a><h2 class="nroffsh">Building</h2>
-<p class="level0">There are many different ways to build C programs. This chapter will assume a UNIX-style build process. If you use a different build system, you can still read this to get general information that may apply to your environment as well.
-<p class="level0"><a name="Compiling"></a><span class="nroffip">Compiling the Program</span>
-<p class="level1">Your compiler needs to know where the libcurl headers are located. Therefore you must set your compiler's include path to point to the directory where you installed them. The 'curl-config'[3] tool can be used to get this information:
-<p class="level1">$ curl-config --cflags
-<p class="level1">
-<p class="level0"><a name="Linking"></a><span class="nroffip">Linking the Program with libcurl</span>
-<p class="level1">When having compiled the program, you need to link your object files to create a single executable. For that to succeed, you need to link with libcurl and possibly also with other libraries that libcurl itself depends on. Like the OpenSSL libraries, but even some standard OS libraries may be needed on the command line. To figure out which flags to use, once again the 'curl-config' tool comes to the rescue:
-<p class="level1">$ curl-config --libs
-<p class="level1">
-<p class="level0"><a name="SSL"></a><span class="nroffip">SSL or Not</span>
-<p class="level1">libcurl can be built and customized in many ways. One of the things that varies from different libraries and builds is the support for SSL-based transfers, like HTTPS and FTPS. If a supported SSL library was detected properly at build-time, libcurl will be built with SSL support. To figure out if an installed libcurl has been built with SSL support enabled, use 'curl-config' like this:
-<p class="level1">$ curl-config --feature
-<p class="level1">And if SSL is supported, the keyword 'SSL' will be written to stdout, possibly together with a few other features that could be either on or off on for different libcurls.
-<p class="level1">See also the "Features libcurl Provides" further down.
-<p class="level0"><a name="autoconf"></a><span class="nroffip">autoconf macro</span>
-<p class="level1">When you write your configure script to detect libcurl and setup variables accordingly, we offer a prewritten macro that probably does everything you need in this area. See docs/libcurl/libcurl.m4 file - it includes docs on how to use it.
-<p class="level1"><a name="Portable"></a><h2 class="nroffsh">Portable Code in a Portable World</h2>
-<p class="level0">The people behind libcurl have put a considerable effort to make libcurl work on a large amount of different operating systems and environments.
-<p class="level0">You program libcurl the same way on all platforms that libcurl runs on. There are only very few minor considerations that differ. If you just make sure to write your code portable enough, you may very well create yourself a very portable program. libcurl shouldn't stop you from that.
-<p class="level0"><a name="Global"></a><h2 class="nroffsh">Global Preparation</h2>
-<p class="level0">The program must initialize some of the libcurl functionality globally. That means it should be done exactly once, no matter how many times you intend to use the library. Once for your program's entire life time. This is done using
-<p class="level0"> curl_global_init()
-<p class="level0">and it takes one parameter which is a bit pattern that tells libcurl what to initialize. Using <span Class="emphasis">CURL_GLOBAL_ALL</span> will make it initialize all known internal sub modules, and might be a good default option. The current two bits that are specified are:
-<p class="level1">
-<p class="level0"><a name="CURLGLOBALWIN32"></a><span class="nroffip">CURL_GLOBAL_WIN32</span>
-<p class="level1">which only does anything on Windows machines. When used on a Windows machine, it'll make libcurl initialize the win32 socket stuff. Without having that initialized properly, your program cannot use sockets properly. You should only do this once for each application, so if your program already does this or of another library in use does it, you should not tell libcurl to do this as well.
-<p class="level0"><a name="CURLGLOBALSSL"></a><span class="nroffip">CURL_GLOBAL_SSL</span>
-<p class="level1">which only does anything on libcurls compiled and built SSL-enabled. On these systems, this will make libcurl initialize the SSL library properly for this application. This only needs to be done once for each application so if your program or another library already does this, this bit should not be needed.
-<p class="level0">
-<p class="level0">libcurl has a default protection mechanism that detects if <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> hasn't been called by the time <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> is called and if that is the case, libcurl runs the function itself with a guessed bit pattern. Please note that depending solely on this is not considered nice nor very good.
-<p class="level0">When the program no longer uses libcurl, it should call <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a>, which is the opposite of the init call. It will then do the reversed operations to cleanup the resources the <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> call initialized.
-<p class="level0">Repeated calls to <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> and <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> should be avoided. They should only be called once each.
-<p class="level0"><a name="Features"></a><h2 class="nroffsh">Features libcurl Provides</h2>
-<p class="level0">It is considered best-practice to determine libcurl features at run-time rather than at build-time (if possible of course). By calling <a class="emphasis" href="./curl_version_info.html">curl_version_info(3)</a> and checking out the details of the returned struct, your program can figure out exactly what the currently running libcurl supports.
-<p class="level0"><a name="Handle"></a><h2 class="nroffsh">Handle the Easy libcurl</h2>
-<p class="level0">libcurl first introduced the so called easy interface. All operations in the easy interface are prefixed with 'curl_easy'.
-<p class="level0">Recent libcurl versions also offer the multi interface. More about that interface, what it is targeted for and how to use it is detailed in a separate chapter further down. You still need to understand the easy interface first, so please continue reading for better understanding.
-<p class="level0">To use the easy interface, you must first create yourself an easy handle. You need one handle for each easy session you want to perform. Basically, you should use one handle for every thread you plan to use for transferring. You must never share the same handle in multiple threads.
-<p class="level0">Get an easy handle with
-<p class="level0"> easyhandle = curl_easy_init();
-<p class="level0">It returns an easy handle. Using that you proceed to the next step: setting up your preferred actions. A handle is just a logic entity for the upcoming transfer or series of transfers.
-<p class="level0">You set properties and options for this handle using <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>. They control how the subsequent transfer or transfers will be made. Options remain set in the handle until set again to something different. Alas, multiple requests using the same handle will use the same options.
-<p class="level0">Many of the options you set in libcurl are "strings", pointers to data terminated with a zero byte. When you set strings with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a>, libcurl makes its own copy so that they don't need to be kept around in your application after being set[4].
-<p class="level0">One of the most basic properties to set in the handle is the URL. You set your preferred URL to transfer with CURLOPT_URL in a manner similar to:
-<p class="level0"><pre>
-<p class="level0"> curl_easy_setopt(handle, CURLOPT_URL, "<a href="http://domain.com/">http://domain.com/</a>");
- </pre>
-
-<p class="level0">
-<p class="level0">Let's assume for a while that you want to receive data as the URL identifies a remote resource you want to get here. Since you write a sort of application that needs this transfer, I assume that you would like to get the data passed to you directly instead of simply getting it passed to stdout. So, you write your own function that matches this prototype:
-<p class="level0"> size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
-<p class="level0">You tell libcurl to pass all data to this function by issuing a function similar to this:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, write_data);
-<p class="level0">You can control what data your callback function gets in the fourth argument by setting another property:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, &internal_struct);
-<p class="level0">Using that property, you can easily pass local data between your application and the function that gets invoked by libcurl. libcurl itself won't touch the data you pass with <span Class="emphasis">CURLOPT_WRITEDATA</span>.
-<p class="level0">libcurl offers its own default internal callback that will take care of the data if you don't set the callback with <span Class="emphasis">CURLOPT_WRITEFUNCTION</span>. It will then simply output the received data to stdout. You can have the default callback write the data to a different file handle by passing a 'FILE *' to a file opened for writing with the <span Class="emphasis">CURLOPT_WRITEDATA</span> option.
-<p class="level0">Now, we need to take a step back and have a deep breath. Here's one of those rare platform-dependent nitpicks. Did you spot it? On some platforms[2], libcurl won't be able to operate on files opened by the program. Thus, if you use the default callback and pass in an open file with <span Class="emphasis">CURLOPT_WRITEDATA</span>, it will crash. You should therefore avoid this to make your program run fine virtually everywhere.
-<p class="level0">(<span Class="emphasis">CURLOPT_WRITEDATA</span> was formerly known as <span Class="emphasis">CURLOPT_FILE</span>. Both names still work and do the same thing).
-<p class="level0">If you're using libcurl as a win32 DLL, you MUST use the <span Class="emphasis">CURLOPT_WRITEFUNCTION</span> if you set <span Class="emphasis">CURLOPT_WRITEDATA</span> - or you will experience crashes.
-<p class="level0">There are of course many more options you can set, and we'll get back to a few of them later. Let's instead continue to the actual transfer:
-<p class="level0"> success = curl_easy_perform(easyhandle);
-<p class="level0"><a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> will connect to the remote site, do the necessary commands and receive the transfer. Whenever it receives data, it calls the callback function we previously set. The function may get one byte at a time, or it may get many kilobytes at once. libcurl delivers as much as possible as often as possible. Your callback function should return the number of bytes it "took care of". If that is not the exact same amount of bytes that was passed to it, libcurl will abort the operation and return with an error code.
-<p class="level0">When the transfer is complete, the function returns a return code that informs you if it succeeded in its mission or not. If a return code isn't enough for you, you can use the CURLOPT_ERRORBUFFER to point libcurl to a buffer of yours where it'll store a human readable error message as well.
-<p class="level0">If you then want to transfer another file, the handle is ready to be used again. Mind you, it is even preferred that you re-use an existing handle if you intend to make another transfer. libcurl will then attempt to re-use the previous connection.
-<p class="level0">For some protocols, downloading a file can involve a complicated process of logging in, setting the transfer mode, changing the current directory and finally transferring the file data. libcurl takes care of all that complication for you. Given simply the URL to a file, libcurl will take care of all the details needed to get the file moved from one machine to another.
-<p class="level0"><a name="Multi-threading"></a><h2 class="nroffsh">Multi-threading Issues</h2>
-<p class="level0">The first basic rule is that you must <span Class="bold">never</span> share a libcurl handle (be it easy or multi or whatever) between multiple threads. Only use one handle in one thread at a time.
-<p class="level0">libcurl is completely thread safe, except for two issues: signals and SSL/TLS handlers. Signals are used for timing out name resolves (during DNS lookup) - when built without c-ares support and not on Windows.
-<p class="level0">If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are then of course using the underlying SSL library multi-threaded and those libs might have their own requirements on this issue. Basically, you need to provide one or two functions to allow it to function properly. For all details, see this:
-<p class="level0">OpenSSL
-<p class="level0"> <a href="http://www.openssl.org/docs/crypto/threads.html">http://www.openssl.org/docs/crypto/threads.html</a>#DESCRIPTION
-<p class="level0">GnuTLS
-<p class="level0"> <a href="http://www.gnu.org/software/gnutls/manual/html_node/">http://www.gnu.org/software/gnutls/manual/html_node/</a>Multi_002dthreaded-applications.html
-<p class="level0">NSS
-<p class="level0"> is claimed to be thread-safe already without anything required.
-<p class="level0">PolarSSL
-<p class="level0"> Required actions unknown.
-<p class="level0">yassl
-<p class="level0"> Required actions unknown.
-<p class="level0">When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1 for all handles. Everything will or might work fine except that timeouts are not honored during the DNS lookup - which you can work around by building libcurl with c-ares support. c-ares is a library that provides asynchronous name resolves. On some platforms, libcurl simply will not function properly multi-threaded unless this option is set.
-<p class="level0">Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe.
-<p class="level0"><a name="When"></a><h2 class="nroffsh">When It Doesn't Work</h2>
-<p class="level0">There will always be times when the transfer fails for some reason. You might have set the wrong libcurl option or misunderstood what the libcurl option actually does, or the remote server might return non-standard replies that confuse the library which then confuses your program.
-<p class="level0">There's one golden rule when these things occur: set the CURLOPT_VERBOSE option to 1. It'll cause the library to spew out the entire protocol details it sends, some internal info and some received protocol data as well (especially when using FTP). If you're using HTTP, adding the headers in the received output to study is also a clever way to get a better understanding why the server behaves the way it does. Include headers in the normal body output with CURLOPT_HEADER set 1.
-<p class="level0">Of course, there are bugs left. We need to know about them to be able to fix them, so we're quite dependent on your bug reports! When you do report suspected bugs in libcurl, please include as many details as you possibly can: a protocol dump that CURLOPT_VERBOSE produces, library version, as much as possible of your code that uses libcurl, operating system name and version, compiler name and version etc.
-<p class="level0">If CURLOPT_VERBOSE is not enough, you increase the level of debug data your application receive by using the CURLOPT_DEBUGFUNCTION.
-<p class="level0">Getting some in-depth knowledge about the protocols involved is never wrong, and if you're trying to do funny things, you might very well understand libcurl and how to use it better if you study the appropriate RFC documents at least briefly.
-<p class="level0"><a name="Upload"></a><h2 class="nroffsh">Upload Data to a Remote Site</h2>
-<p class="level0">libcurl tries to keep a protocol independent approach to most transfers, thus uploading to a remote FTP site is very similar to uploading data to a HTTP server with a PUT request.
-<p class="level0">Of course, first you either create an easy handle or you re-use one existing one. Then you set the URL to operate on just like before. This is the remote URL, that we now will upload.
-<p class="level0">Since we write an application, we most likely want libcurl to get the upload data by asking us for it. To make it do that, we set the read callback and the custom pointer libcurl will pass to our read callback. The read callback should have a prototype similar to:
-<p class="level0"> size_t function(char *bufptr, size_t size, size_t nitems, void *userp);
-<p class="level0">Where bufptr is the pointer to a buffer we fill in with data to upload and size*nitems is the size of the buffer and therefore also the maximum amount of data we can return to libcurl in this call. The 'userp' pointer is the custom pointer we set to point to a struct of ours to pass private data between the application and the callback.
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, read_function);
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_READDATA, &filedata);
-<p class="level0">Tell libcurl that we want to upload:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_UPLOAD, 1L);
-<p class="level0">A few protocols won't behave properly when uploads are done without any prior knowledge of the expected file size. So, set the upload file size using the CURLOPT_INFILESIZE_LARGE for all known file sizes like this[1]:
-<p class="level0"><pre>
-<p class="level0"> /* in this example, file_size must be an curl_off_t variable */
- curl_easy_setopt(easyhandle, CURLOPT_INFILESIZE_LARGE, file_size);
- </pre>
-
-<p class="level0">
-<p class="level0">When you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> this time, it'll perform all the necessary operations and when it has invoked the upload it'll call your supplied callback to get the data to upload. The program should return as much data as possible in every invoke, as that is likely to make the upload perform as fast as possible. The callback should return the number of bytes it wrote in the buffer. Returning 0 will signal the end of the upload.
-<p class="level0"><a name="Passwords"></a><h2 class="nroffsh">Passwords</h2>
-<p class="level0">Many protocols use or even require that user name and password are provided to be able to download or upload the data of your choice. libcurl offers several ways to specify them.
-<p class="level0">Most protocols support that you specify the name and password in the URL itself. libcurl will detect this and use them accordingly. This is written like this:
-<p class="level0"> protocol://user:[email protected]/path/
-<p class="level0">If you need any odd letters in your user name or password, you should enter them URL encoded, as %XX where XX is a two-digit hexadecimal number.
-<p class="level0">libcurl also provides options to set various passwords. The user name and password as shown embedded in the URL can instead get set with the CURLOPT_USERPWD option. The argument passed to libcurl should be a char * to a string in the format "user:password". In a manner like this:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");
-<p class="level0">Another case where name and password might be needed at times, is for those users who need to authenticate themselves to a proxy they use. libcurl offers another option for this, the CURLOPT_PROXYUSERPWD. It is used quite similar to the CURLOPT_USERPWD option like this:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret");
-<p class="level0">There's a long time UNIX "standard" way of storing ftp user names and passwords, namely in the $HOME/.netrc file. The file should be made private so that only the user may read it (see also the "Security Considerations" chapter), as it might contain the password in plain text. libcurl has the ability to use this file to figure out what set of user name and password to use for a particular host. As an extension to the normal functionality, libcurl also supports this file for non-FTP protocols such as HTTP. To make curl use this file, use the CURLOPT_NETRC option:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_NETRC, 1L);
-<p class="level0">And a very basic example of how such a .netrc file may look like:
-<p class="level0"><pre>
-<p class="level0"> machine myhost.mydomain.com
- login userlogin
- password secretword
- </pre>
-
-<p class="level0">
-<p class="level0">All these examples have been cases where the password has been optional, or at least you could leave it out and have libcurl attempt to do its job without it. There are times when the password isn't optional, like when you're using an SSL private key for secure transfers.
-<p class="level0">To pass the known private key password to libcurl:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP Authentication</h2>
-<p class="level0">The previous chapter showed how to set user name and password for getting URLs that require authentication. When using the HTTP protocol, there are many different ways a client can provide those credentials to the server and you can control which way libcurl will (attempt to) use them. The default HTTP authentication method is called 'Basic', which is sending the name and password in clear-text in the HTTP request, base64-encoded. This is insecure.
-<p class="level0">At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM, Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use with CURLOPT_HTTPAUTH as in:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
-<p class="level0">And when you send authentication to a proxy, you can also set authentication type the same way but instead with CURLOPT_PROXYAUTH:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
-<p class="level0">Both these options allow you to set multiple types (by ORing them together), to make libcurl pick the most secure one out of the types the server/proxy claims to support. This method does however add a round-trip since libcurl must first ask the server what it supports:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST|CURLAUTH_BASIC);
-<p class="level0">For convenience, you can use the 'CURLAUTH_ANY' define (instead of a list with specific types) which allows libcurl to use whatever method it wants.
-<p class="level0">When asking for multiple types, libcurl will pick the available one it considers "best" in its own internal order of preference.
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP POSTing</h2>
-<p class="level0">We get many questions regarding how to issue HTTP POSTs with libcurl the proper way. This chapter will thus include examples using both different versions of HTTP POST that libcurl supports.
-<p class="level0">The first version is the simple POST, the most common version, that most HTML pages using the <form> tag uses. We provide a pointer to the data and tell libcurl to post it all to the remote site:
-<p class="level0"><pre>
-<p class="level0"> char *data="name=daniel&project=curl";
- curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, data);
- curl_easy_setopt(easyhandle, CURLOPT_URL, "<a href="http://posthere.com/">http://posthere.com/</a>");
- <p class="level0"> curl_easy_perform(easyhandle); /* post away! */
- </pre>
-
-<p class="level0">
-<p class="level0">Simple enough, huh? Since you set the POST options with the CURLOPT_POSTFIELDS, this automatically switches the handle to use POST in the upcoming request.
-<p class="level0">Ok, so what if you want to post binary data that also requires you to set the Content-Type: header of the post? Well, binary posts prevent libcurl from being able to do strlen() on the data to figure out the size, so therefore we must tell libcurl the size of the post data. Setting headers in libcurl requests are done in a generic way, by building a list of our own headers and then passing that list to libcurl.
-<p class="level0"><pre>
-<p class="level0"> struct curl_slist *headers=NULL;
- headers = curl_slist_append(headers, "Content-Type: text/xml");
- <p class="level0"> /* post binary data */
- curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, binaryptr);
- <p class="level0"> /* set the size of the postfields data */
- curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDSIZE, 23L);
- <p class="level0"> /* pass our list of custom made headers */
- curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
- <p class="level0"> curl_easy_perform(easyhandle); /* post away! */
- <p class="level0"> curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level0">
-<p class="level0">While the simple examples above cover the majority of all cases where HTTP POST operations are required, they don't do multi-part formposts. Multi-part formposts were introduced as a better way to post (possibly large) binary data and were first documented in the RFC1867 (updated in RFC2388). They're called multi-part because they're built by a chain of parts, each part being a single unit of data. Each part has its own name and contents. You can in fact create and post a multi-part formpost with the regular libcurl POST support described above, but that would require that you build a formpost yourself and provide to libcurl. To make that easier, libcurl provides <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Using this function, you add parts to the form. When you're done adding parts, you post the whole form.
-<p class="level0">The following example sets two simple text parts with plain textual contents, and then a file with binary contents and uploads the whole thing.
-<p class="level0"><pre>
-<p class="level0"> struct curl_httppost *post=NULL;
- struct curl_httppost *last=NULL;
- curl_formadd(&post, &last,
- CURLFORM_COPYNAME, "name",
- CURLFORM_COPYCONTENTS, "daniel", CURLFORM_END);
- curl_formadd(&post, &last,
- CURLFORM_COPYNAME, "project",
- CURLFORM_COPYCONTENTS, "curl", CURLFORM_END);
- curl_formadd(&post, &last,
- CURLFORM_COPYNAME, "logotype-image",
- CURLFORM_FILECONTENT, "curl.png", CURLFORM_END);
- <p class="level0"> /* Set the form info */
- curl_easy_setopt(easyhandle, CURLOPT_HTTPPOST, post);
- <p class="level0"> curl_easy_perform(easyhandle); /* post away! */
- <p class="level0"> /* free the post data again */
- curl_formfree(post);
- </pre>
-
-<p class="level0">
-<p class="level0">Multipart formposts are chains of parts using MIME-style separators and headers. It means that each one of these separate parts get a few headers set that describe the individual content-type, size etc. To enable your application to handicraft this formpost even more, libcurl allows you to supply your own set of custom headers to such an individual form part. You can of course supply headers to as many parts as you like, but this little example will show how you set headers to one specific part when you add that to the post handle:
-<p class="level0"><pre>
-<p class="level0"> struct curl_slist *headers=NULL;
- headers = curl_slist_append(headers, "Content-Type: text/xml");
- <p class="level0"> curl_formadd(&post, &last,
- CURLFORM_COPYNAME, "logotype-image",
- CURLFORM_FILECONTENT, "curl.xml",
- CURLFORM_CONTENTHEADER, headers,
- CURLFORM_END);
- <p class="level0"> curl_easy_perform(easyhandle); /* post away! */
- <p class="level0"> curl_formfree(post); /* free post */
- curl_slist_free_all(headers); /* free custom header list */
- </pre>
-
-<p class="level0">
-<p class="level0">Since all options on an easyhandle are "sticky", they remain the same until changed even if you do call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a>, you may need to tell curl to go back to a plain GET request if you intend to do one as your next request. You force an easyhandle to go back to GET by using the CURLOPT_HTTPGET option:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
-<p class="level0">Just setting CURLOPT_POSTFIELDS to "" or NULL will *not* stop libcurl from doing a POST. It will just make it POST without any data to send!
-<p class="level0"><a name="Showing"></a><h2 class="nroffsh">Showing Progress</h2>
-<p class="level0">
-<p class="level0">For historical and traditional reasons, libcurl has a built-in progress meter that can be switched on and then makes it present a progress meter in your terminal.
-<p class="level0">Switch on the progress meter by, oddly enough, setting CURLOPT_NOPROGRESS to zero. This option is set to 1 by default.
-<p class="level0">For most applications however, the built-in progress meter is useless and what instead is interesting is the ability to specify a progress callback. The function pointer you pass to libcurl will then be called on irregular intervals with information about the current transfer.
-<p class="level0">Set the progress callback by using CURLOPT_PROGRESSFUNCTION. And pass a pointer to a function that matches this prototype:
-<p class="level0"><pre>
-<p class="level0"> int progress_callback(void *clientp,
- double dltotal,
- double dlnow,
- double ultotal,
- double ulnow);
- </pre>
-
-<p class="level0">
-<p class="level0">If any of the input arguments is unknown, a 0 will be passed. The first argument, the 'clientp' is the pointer you pass to libcurl with CURLOPT_PROGRESSDATA. libcurl won't touch it.
-<p class="level0"><a name="libcurl"></a><h2 class="nroffsh">libcurl with C++</h2>
-<p class="level0">
-<p class="level0">There's basically only one thing to keep in mind when using C++ instead of C when interfacing libcurl:
-<p class="level0">The callbacks CANNOT be non-static class member functions
-<p class="level0">Example C++ code:
-<p class="level0"><pre>
-<p class="level0">class AClass {
- static size_t write_data(void *ptr, size_t size, size_t nmemb,
- void *ourpointer)
- {
- /* do what you want with the data */
- }
- }
- </pre>
-
-<p class="level0">
-<p class="level0"><a name="Proxies"></a><h2 class="nroffsh">Proxies</h2>
-<p class="level0">
-<p class="level0">What "proxy" means according to Merriam-Webster: "a person authorized to act for another" but also "the agency, function, or office of a deputy who acts as a substitute for another".
-<p class="level0">Proxies are exceedingly common these days. Companies often only offer Internet access to employees through their proxies. Network clients or user-agents ask the proxy for documents, the proxy does the actual request and then it returns them.
-<p class="level0">libcurl supports SOCKS and HTTP proxies. When a given URL is wanted, libcurl will ask the proxy for it instead of trying to connect to the actual host identified in the URL.
-<p class="level0">If you're using a SOCKS proxy, you may find that libcurl doesn't quite support all operations through it.
-<p class="level0">For HTTP proxies: the fact that the proxy is a HTTP proxy puts certain restrictions on what can actually happen. A requested URL that might not be a HTTP URL will be still be passed to the HTTP proxy to deliver back to libcurl. This happens transparently, and an application may not need to know. I say "may", because at times it is very important to understand that all operations over a HTTP proxy use the HTTP protocol. For example, you can't invoke your own custom FTP commands or even proper FTP directory listings.
-<p class="level0">
-<p class="level0"><a name="Proxy"></a><span class="nroffip">Proxy Options</span>
-<p class="level1">
-<p class="level1">To tell libcurl to use a proxy at a given port number:
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_PROXY, "proxy-host.com:8080");
-<p class="level1">Some proxies require user authentication before allowing a request, and you pass that information similar to this:
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");
-<p class="level1">If you want to, you can specify the host name only in the CURLOPT_PROXY option, and set the port number separately with CURLOPT_PROXYPORT.
-<p class="level1">Tell libcurl what kind of proxy it is with CURLOPT_PROXYTYPE (if not, it will default to assume a HTTP proxy):
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
-<p class="level1">
-<p class="level0"><a name="Environment"></a><span class="nroffip">Environment Variables</span>
-<p class="level1">
-<p class="level1">libcurl automatically checks and uses a set of environment variables to know what proxies to use for certain protocols. The names of the variables are following an ancient de facto standard and are built up as "[protocol]_proxy" (note the lower casing). Which makes the variable 'http_proxy' checked for a name of a proxy to use when the input URL is HTTP. Following the same rule, the variable named 'ftp_proxy' is checked for FTP URLs. Again, the proxies are always HTTP proxies, the different names of the variables simply allows different HTTP proxies to be used.
-<p class="level1">The proxy environment variable contents should be in the format "[protocol://][user:password@]machine[:port]". Where the protocol:// part is simply ignored if present (so <a href="http://proxy">http://proxy</a> and bluerk://proxy will do the same) and the optional port number specifies on which port the proxy operates on the host. If not specified, the internal default port number will be used and that is most likely *not* the one you would like it to be.
-<p class="level1">There are two special environment variables. 'all_proxy' is what sets proxy for any URL in case the protocol specific variable wasn't set, and 'no_proxy' defines a list of hosts that should not use a proxy even though a variable may say so. If 'no_proxy' is a plain asterisk ("*") it matches all hosts.
-<p class="level1">To explicitly disable libcurl's checking for and using the proxy environment variables, set the proxy name to "" - an empty string - with CURLOPT_PROXY.
-<p class="level0"><a name="SSL"></a><span class="nroffip">SSL and Proxies</span>
-<p class="level1">
-<p class="level1">SSL is for secure point-to-point connections. This involves strong encryption and similar things, which effectively makes it impossible for a proxy to operate as a "man in between" which the proxy's task is, as previously discussed. Instead, the only way to have SSL work over a HTTP proxy is to ask the proxy to tunnel trough everything without being able to check or fiddle with the traffic.
-<p class="level1">Opening an SSL connection over a HTTP proxy is therefor a matter of asking the proxy for a straight connection to the target host on a specified port. This is made with the HTTP request CONNECT. ("please mr proxy, connect me to that remote host").
-<p class="level1">Because of the nature of this operation, where the proxy has no idea what kind of data that is passed in and out through this tunnel, this breaks some of the very few advantages that come from using a proxy, such as caching. Many organizations prevent this kind of tunneling to other destination port numbers than 443 (which is the default HTTPS port number).
-<p class="level1">
-<p class="level0"><a name="Tunneling"></a><span class="nroffip">Tunneling Through Proxy</span>
-<p class="level1">As explained above, tunneling is required for SSL to work and often even restricted to the operation intended for SSL; HTTPS.
-<p class="level1">This is however not the only time proxy-tunneling might offer benefits to you or your application.
-<p class="level1">As tunneling opens a direct connection from your application to the remote machine, it suddenly also re-introduces the ability to do non-HTTP operations over a HTTP proxy. You can in fact use things such as FTP upload or FTP custom commands this way.
-<p class="level1">Again, this is often prevented by the administrators of proxies and is rarely allowed.
-<p class="level1">Tell libcurl to use proxy tunneling like this:
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_HTTPPROXYTUNNEL, 1L);
-<p class="level1">In fact, there might even be times when you want to do plain HTTP operations using a tunnel like this, as it then enables you to operate on the remote server instead of asking the proxy to do so. libcurl will not stand in the way for such innovative actions either!
-<p class="level1">
-<p class="level0"><a name="Proxy"></a><span class="nroffip">Proxy Auto-Config</span>
-<p class="level1">
-<p class="level1">Netscape first came up with this. It is basically a web page (usually using a .pac extension) with a Javascript that when executed by the browser with the requested URL as input, returns information to the browser on how to connect to the URL. The returned information might be "DIRECT" (which means no proxy should be used), "PROXY host:port" (to tell the browser where the proxy for this particular URL is) or "SOCKS host:port" (to direct the browser to a SOCKS proxy).
-<p class="level1">libcurl has no means to interpret or evaluate Javascript and thus it doesn't support this. If you get yourself in a position where you face this nasty invention, the following advice have been mentioned and used in the past:
-<p class="level1">- Depending on the Javascript complexity, write up a script that translates it to another language and execute that.
-<p class="level1">- Read the Javascript code and rewrite the same logic in another language.
-<p class="level1">- Implement a Javascript interpreter; people have successfully used the Mozilla Javascript engine in the past.
-<p class="level1">- Ask your admins to stop this, for a static proxy setup or similar.
-<p class="level1"><a name="Persistence"></a><h2 class="nroffsh">Persistence Is The Way to Happiness</h2>
-<p class="level0">
-<p class="level0">Re-cycling the same easy handle several times when doing multiple requests is the way to go.
-<p class="level0">After each single <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> operation, libcurl will keep the connection alive and open. A subsequent request using the same easy handle to the same host might just be able to use the already open connection! This reduces network impact a lot.
-<p class="level0">Even if the connection is dropped, all connections involving SSL to the same host again, will benefit from libcurl's session ID cache that drastically reduces re-connection time.
-<p class="level0">FTP connections that are kept alive save a lot of time, as the command- response round-trips are skipped, and also you don't risk getting blocked without permission to login again like on many FTP servers only allowing N persons to be logged in at the same time.
-<p class="level0">libcurl caches DNS name resolving results, to make lookups of a previously looked up name a lot faster.
-<p class="level0">Other interesting details that improve performance for subsequent requests may also be added in the future.
-<p class="level0">Each easy handle will attempt to keep the last few connections alive for a while in case they are to be used again. You can set the size of this "cache" with the CURLOPT_MAXCONNECTS option. Default is 5. There is very seldom any point in changing this value, and if you think of changing this it is often just a matter of thinking again.
-<p class="level0">To force your upcoming request to not use an already existing connection (it will even close one first if there happens to be one alive to the same host you're about to operate on), you can do that by setting CURLOPT_FRESH_CONNECT to 1. In a similar spirit, you can also forbid the upcoming request to be "lying" around and possibly get re-used after the request by setting CURLOPT_FORBID_REUSE to 1.
-<p class="level0"><a name="HTTP"></a><h2 class="nroffsh">HTTP Headers Used by libcurl</h2>
-<p class="level0">When you use libcurl to do HTTP requests, it'll pass along a series of headers automatically. It might be good for you to know and understand these. You can replace or remove them by using the CURLOPT_HTTPHEADER option.
-<p class="level0">
-<p class="level0"><a name="Host"></a><span class="nroffip">Host</span>
-<p class="level1">This header is required by HTTP 1.1 and even many 1.0 servers and should be the name of the server we want to talk to. This includes the port number if anything but default.
-<p class="level1">
-<p class="level0"><a name="Pragma"></a><span class="nroffip">Pragma</span>
-<p class="level1">"no-cache". Tells a possible proxy to not grab a copy from the cache but to fetch a fresh one.
-<p class="level1">
-<p class="level0"><a name="Accept"></a><span class="nroffip">Accept</span>
-<p class="level1">"*/*".
-<p class="level1">
-<p class="level0"><a name="Expect"></a><span class="nroffip">Expect</span>
-<p class="level1">When doing POST requests, libcurl sets this header to "100-continue" to ask the server for an "OK" message before it proceeds with sending the data part of the post. If the POSTed data amount is deemed "small", libcurl will not use this header.
-<p class="level1"><a name="Customizing"></a><h2 class="nroffsh">Customizing Operations</h2>
-<p class="level0">There is an ongoing development today where more and more protocols are built upon HTTP for transport. This has obvious benefits as HTTP is a tested and reliable protocol that is widely deployed and has excellent proxy-support.
-<p class="level0">When you use one of these protocols, and even when doing other kinds of programming you may need to change the traditional HTTP (or FTP or...) manners. You may need to change words, headers or various data.
-<p class="level0">libcurl is your friend here too.
-<p class="level0">
-<p class="level0"><a name="CUSTOMREQUEST"></a><span class="nroffip">CUSTOMREQUEST</span>
-<p class="level1">If just changing the actual HTTP request keyword is what you want, like when GET, HEAD or POST is not good enough for you, CURLOPT_CUSTOMREQUEST is there for you. It is very simple to use:
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
-<p class="level1">When using the custom request, you change the request keyword of the actual request you are performing. Thus, by default you make a GET request but you can also make a POST operation (as described before) and then replace the POST keyword if you want to. You're the boss.
-<p class="level1">
-<p class="level0"><a name="Modify"></a><span class="nroffip">Modify Headers</span>
-<p class="level1">HTTP-like protocols pass a series of headers to the server when doing the request, and you're free to pass any amount of extra headers that you think fit. Adding headers is this easy:
-<p class="level1"><pre>
-<p class="level1"> struct curl_slist *headers=NULL; /* init to NULL is important */
- <p class="level1"> headers = curl_slist_append(headers, "Hey-server-hey: how are you?");
- headers = curl_slist_append(headers, "X-silly-content: yes");
- <p class="level1"> /* pass our list of custom made headers */
- curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
- <p class="level1"> curl_easy_perform(easyhandle); /* transfer http */
- <p class="level1"> curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level1">
-<p class="level1">... and if you think some of the internally generated headers, such as Accept: or Host: don't contain the data you want them to contain, you can replace them by simply setting them too:
-<p class="level1"><pre>
-<p class="level1"> headers = curl_slist_append(headers, "Accept: Agent-007");
- headers = curl_slist_append(headers, "Host: munged.host.line");
- </pre>
-
-<p class="level1">
-<p class="level1">
-<p class="level0"><a name="Delete"></a><span class="nroffip">Delete Headers</span>
-<p class="level1">If you replace an existing header with one with no contents, you will prevent the header from being sent. For instance, if you want to completely prevent the "Accept:" header from being sent, you can disable it with code similar to this:
-<p class="level1"> headers = curl_slist_append(headers, "Accept:");
-<p class="level1">Both replacing and canceling internal headers should be done with careful consideration and you should be aware that you may violate the HTTP protocol when doing so.
-<p class="level1">
-<p class="level0"><a name="Enforcing"></a><span class="nroffip">Enforcing chunked transfer-encoding</span>
-<p class="level1">
-<p class="level1">By making sure a request uses the custom header "Transfer-Encoding: chunked" when doing a non-GET HTTP operation, libcurl will switch over to "chunked" upload, even though the size of the data to upload might be known. By default, libcurl usually switches over to chunked upload automatically if the upload data size is unknown.
-<p class="level1">
-<p class="level0"><a name="HTTP"></a><span class="nroffip">HTTP Version</span>
-<p class="level1">
-<p class="level1">All HTTP requests includes the version number to tell the server which version we support. libcurl speaks HTTP 1.1 by default. Some very old servers don't like getting 1.1-requests and when dealing with stubborn old things like that, you can tell libcurl to use 1.0 instead by doing something like this:
-<p class="level1"> curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
-<p class="level1">
-<p class="level0"><a name="FTP"></a><span class="nroffip">FTP Custom Commands</span>
-<p class="level1">
-<p class="level1">Not all protocols are HTTP-like, and thus the above may not help you when you want to make, for example, your FTP transfers to behave differently.
-<p class="level1">Sending custom commands to a FTP server means that you need to send the commands exactly as the FTP server expects them (RFC959 is a good guide here), and you can only use commands that work on the control-connection alone. All kinds of commands that require data interchange and thus need a data-connection must be left to libcurl's own judgement. Also be aware that libcurl will do its very best to change directory to the target directory before doing any transfer, so if you change directory (with CWD or similar) you might confuse libcurl and then it might not attempt to transfer the file in the correct remote directory.
-<p class="level1">A little example that deletes a given file before an operation:
-<p class="level1"><pre>
-<p class="level1"> headers = curl_slist_append(headers, "DELE file-to-remove");
- <p class="level1"> /* pass the list of custom commands to the handle */
- curl_easy_setopt(easyhandle, CURLOPT_QUOTE, headers);
- <p class="level1"> curl_easy_perform(easyhandle); /* transfer ftp data! */
- <p class="level1"> curl_slist_free_all(headers); /* free the header list */
- </pre>
-
-<p class="level1">
-<p class="level1">If you would instead want this operation (or chain of operations) to happen _after_ the data transfer took place the option to <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> would instead be called CURLOPT_POSTQUOTE and used the exact same way.
-<p class="level1">The custom FTP command will be issued to the server in the same order they are added to the list, and if a command gets an error code returned back from the server, no more commands will be issued and libcurl will bail out with an error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send commands before a transfer, no transfer will actually take place when a quote command has failed.
-<p class="level1">If you set the CURLOPT_HEADER to 1, you will tell libcurl to get information about the target file and output "headers" about it. The headers will be in "HTTP-style", looking like they do in HTTP.
-<p class="level1">The option to enable headers or to run custom FTP commands may be useful to combine with CURLOPT_NOBODY. If this option is set, no actual file content transfer will be performed.
-<p class="level1">
-<p class="level0"><a name="FTP"></a><span class="nroffip">FTP Custom CUSTOMREQUEST</span>
-<p class="level1">If you do want to list the contents of a FTP directory using your own defined FTP command, CURLOPT_CUSTOMREQUEST will do just that. "NLST" is the default one for listing directories but you're free to pass in your idea of a good alternative.
-<p class="level1"><a name="Cookies"></a><h2 class="nroffsh">Cookies Without Chocolate Chips</h2>
-<p class="level0">In the HTTP sense, a cookie is a name with an associated value. A server sends the name and value to the client, and expects it to get sent back on every subsequent request to the server that matches the particular conditions set. The conditions include that the domain name and path match and that the cookie hasn't become too old.
-<p class="level0">In real-world cases, servers send new cookies to replace existing ones to update them. Server use cookies to "track" users and to keep "sessions".
-<p class="level0">Cookies are sent from server to clients with the header Set-Cookie: and they're sent from clients to servers with the Cookie: header.
-<p class="level0">To just send whatever cookie you want to a server, you can use CURLOPT_COOKIE to set a cookie string like this:
-<p class="level0"> curl_easy_setopt(easyhandle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
-<p class="level0">In many cases, that is not enough. You might want to dynamically save whatever cookies the remote server passes to you, and make sure those cookies are then used accordingly on later requests.
-<p class="level0">One way to do this, is to save all headers you receive in a plain file and when you make a request, you tell libcurl to read the previous headers to figure out which cookies to use. Set the header file to read cookies from with CURLOPT_COOKIEFILE.
-<p class="level0">The CURLOPT_COOKIEFILE option also automatically enables the cookie parser in libcurl. Until the cookie parser is enabled, libcurl will not parse or understand incoming cookies and they will just be ignored. However, when the parser is enabled the cookies will be understood and the cookies will be kept in memory and used properly in subsequent requests when the same handle is used. Many times this is enough, and you may not have to save the cookies to disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't have to exist to enable the parser, so a common way to just enable the parser and not read any cookies is to use the name of a file you know doesn't exist.
-<p class="level0">If you would rather use existing cookies that you've previously received with your Netscape or Mozilla browsers, you can make libcurl use that cookie file as input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will automatically find out what kind of file it is and act accordingly.
-<p class="level0">Perhaps the most advanced cookie operation libcurl offers, is saving the entire internal cookie state back into a Netscape/Mozilla formatted cookie file. We call that the cookie-jar. When you set a file name with CURLOPT_COOKIEJAR, that file name will be created and all received cookies will be stored in it when <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a> is called. This enables cookies to get passed on properly between multiple handles without any information getting lost.
-<p class="level0"><a name="FTP"></a><h2 class="nroffsh">FTP Peculiarities We Need</h2>
-<p class="level0">
-<p class="level0">FTP transfers use a second TCP/IP connection for the data transfer. This is usually a fact you can forget and ignore but at times this fact will come back to haunt you. libcurl offers several different ways to customize how the second connection is being made.
-<p class="level0">libcurl can either connect to the server a second time or tell the server to connect back to it. The first option is the default and it is also what works best for all the people behind firewalls, NATs or IP-masquerading setups. libcurl then tells the server to open up a new port and wait for a second connection. This is by default attempted with EPSV first, and if that doesn't work it tries PASV instead. (EPSV is an extension to the original FTP spec and does not exist nor work on all FTP servers.)
-<p class="level0">You can prevent libcurl from first trying the EPSV command by setting CURLOPT_FTP_USE_EPSV to zero.
-<p class="level0">In some cases, you will prefer to have the server connect back to you for the second connection. This might be when the server is perhaps behind a firewall or something and only allows connections on a single port. libcurl then informs the remote server which IP address and port number to connect to. This is made with the CURLOPT_FTPPORT option. If you set it to "-", libcurl will use your system's "default IP address". If you want to use a particular IP, you can set the full IP address, a host name to resolve to an IP address or even a local network interface name that libcurl will get the IP address from.
-<p class="level0">When doing the "PORT" approach, libcurl will attempt to use the EPRT and the LPRT before trying PORT, as they work with more protocols. You can disable this behavior by setting CURLOPT_FTP_USE_EPRT to zero.
-<p class="level0"><a name="Headers"></a><h2 class="nroffsh">Headers Equal Fun</h2>
-<p class="level0">
-<p class="level0">Some protocols provide "headers", meta-data separated from the normal data. These headers are by default not included in the normal data stream, but you can make them appear in the data stream by setting CURLOPT_HEADER to 1.
-<p class="level0">What might be even more useful, is libcurl's ability to separate the headers from the data and thus make the callbacks differ. You can for example set a different pointer to pass to the ordinary write callback by setting CURLOPT_WRITEHEADER.
-<p class="level0">Or, you can set an entirely separate function to receive the headers, by using CURLOPT_HEADERFUNCTION.
-<p class="level0">The headers are passed to the callback function one by one, and you can depend on that fact. It makes it easier for you to add custom header parsers etc.
-<p class="level0">"Headers" for FTP transfers equal all the FTP server responses. They aren't actually true headers, but in this case we pretend they are! ;-)
-<p class="level0"><a name="Post"></a><h2 class="nroffsh">Post Transfer Information</h2>
-<p class="level0">
-<p class="level0"> [ curl_easy_getinfo ]
-<p class="level0"><a name="Security"></a><h2 class="nroffsh">Security Considerations</h2>
-<p class="level0">
-<p class="level0">The libcurl project takes security seriously. The library is written with caution and precautions are taken to mitigate many kinds of risks encountered while operating with potentially malicious servers on the Internet. It is a powerful library, however, which allows application writers to make trade offs between ease of writing and exposure to potential risky operations. If used the right way, you can use libcurl to transfer data pretty safely.
-<p class="level0">Many applications are used in closed networks where users and servers can be trusted, but many others are used on arbitrary servers and are fed input from potentially untrusted users. Following is a discussion about some risks in the ways in which applications commonly use libcurl and potential mitigations of those risks. It is by no means comprehensive, but shows classes of attacks that robust applications should consider. The Common Weakness Enumeration project at <a href="http://cwe.mitre.org/">http://cwe.mitre.org/</a> is a good reference for many of these and similar types of weaknesses of which application writers should be aware.
-<p class="level0">
-<p class="level0"><a name="Command"></a><span class="nroffip">Command Lines</span>
-<p class="level1">If you use a command line tool (such as curl) that uses libcurl, and you give options to the tool on the command line those options can very likely get read by other users of your system when they use 'ps' or other tools to list currently running processes.
-<p class="level1">To avoid this problem, never feed sensitive things to programs using command line options. Write them to a protected file and use the -K option to avoid this.
-<p class="level1">
-<p class="level0"><a name="netrc"></a><span class="nroffip">.netrc</span>
-<p class="level1">.netrc is a pretty handy file/feature that allows you to login quickly and automatically to frequently visited sites. The file contains passwords in clear text and is a real security risk. In some cases, your .netrc is also stored in a home directory that is NFS mounted or used on another network based file system, so the clear text password will fly through your network every time anyone reads that file!
-<p class="level1">To avoid this problem, don't use .netrc files and never store passwords in plain text anywhere.
-<p class="level1">
-<p class="level0"><a name="Clear"></a><span class="nroffip">Clear Text Passwords</span>
-<p class="level1">Many of the protocols libcurl supports send name and password unencrypted as clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for anyone on your network or a network nearby yours to just fire up a network analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP Basic uses base64 encoded passwords fool you. They may not look readable at a first glance, but they very easily "deciphered" by anyone within seconds.
-<p class="level1">To avoid this problem, use HTTP authentication methods or other protocols that don't let snoopers see your password: HTTP with Digest, NTLM or GSS authentication, HTTPS, FTPS, SCP, SFTP and FTP-Kerberos are a few examples.
-<p class="level1">
-<p class="level0"><a name="Redirects"></a><span class="nroffip">Redirects</span>
-<p class="level1">The CURLOPT_FOLLOWLOCATION option automatically follows HTTP redirects sent by a remote server. These redirects can refer to any kind of URL, not just HTTP. A redirect to a file: URL would cause the libcurl to read (or write) arbitrary files from the local filesystem. If the application returns the data back to the user (as would happen in some kinds of CGI scripts), an attacker could leverage this to read otherwise forbidden data (e.g. file://localhost/etc/passwd).
-<p class="level1">If authentication credentials are stored in the ~/.netrc file, or Kerberos is in use, any other URL type (not just file:) that requires authentication is also at risk. A redirect such as <a href="ftp://some-internal-server/private-file">ftp://some-internal-server/private-file</a> would then return data even when the server is password protected.
-<p class="level1">In the same way, if an unencrypted SSH private key has been configured for the user running the libcurl application, SCP: or SFTP: URLs could access password or private-key protected resources, e.g. s<a href="ftp://user">ftp://user</a>@some-internal-server/etc/passwd
-<p class="level1">The CURLOPT_REDIR_PROTOCOLS and CURLOPT_NETRC options can be used to mitigate against this kind of attack.
-<p class="level1">A redirect can also specify a location available only on the machine running libcurl, including servers hidden behind a firewall from the attacker. e.g. <a href="http://127.0.0.1/">http://127.0.0.1/</a> or <a href="http://intranet/delete-stuff.cgi">http://intranet/delete-stuff.cgi</a>?delete=all or t<a href="ftp://bootp-server/pc-config-data">ftp://bootp-server/pc-config-data</a>
-<p class="level1">Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself, sanitizing URLs as necessary. Alternately, an app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses are sanitized before use.
-<p class="level1">
-<p class="level0"><a name="Private"></a><span class="nroffip">Private Resources</span>
-<p class="level1">A user who can control the DNS server of a domain being passed in within a URL can change the address of the host to a local, private address which the libcurl application will then use. e.g. The innocuous URL <a href="http://fuzzybunnies.example.com/">http://fuzzybunnies.example.com/</a> could actually resolve to the IP address of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3 Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION and checking the address before a connection.
-<p class="level1">All the malicious scenarios regarding redirected URLs apply just as well to non-redirected URLs, if the user is allowed to specify an arbitrary URL that could point to a private resource. For example, a web app providing a translation service might happily translate file://localhost/etc/passwd and display the result. Apps can mitigate against this with the CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for redirections.
-<p class="level1">A malicious FTP server could in response to the PASV command return an IP address and port number for a server local to the app running libcurl but behind a firewall. Apps can mitigate against this by using the CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
-<p class="level1">
-<p class="level0"><a name="Uploads"></a><span class="nroffip">Uploads</span>
-<p class="level1">When uploading, a redirect can cause a local (or remote) file to be overwritten. Apps must not allow any unsanitized URL to be passed in for uploads. Also, CURLOPT_FOLLOWLOCATION should not be used on uploads. Instead, the app should handle redirects itself, sanitizing each URL first.
-<p class="level1">
-<p class="level0"><a name="Authentication"></a><span class="nroffip">Authentication</span>
-<p class="level1">Use of CURLOPT_UNRESTRICTED_AUTH could cause authentication information to be sent to an unknown second server. Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself, sanitizing where necessary.
-<p class="level1">Use of the CURLAUTH_ANY option to CURLOPT_HTTPAUTH could result in user name and password being sent in clear text to an HTTP server. Instead, use CURLAUTH_ANYSAFE which ensures that the password is encrypted over the network, or else fail the request.
-<p class="level1">Use of the CURLUSESSL_TRY option to CURLOPT_USE_SSL could result in user name and password being sent in clear text to an FTP server. Instead, use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or else fail the request.
-<p class="level1">
-<p class="level0"><a name="Cookies"></a><span class="nroffip">Cookies</span>
-<p class="level1">If cookies are enabled and cached, then a user could craft a URL which performs some malicious action to a site whose authentication is already stored in a cookie. e.g. <a href="http://mail.example.com/delete-stuff.cgi">http://mail.example.com/delete-stuff.cgi</a>?delete=all Apps can mitigate against this by disabling cookies or clearing them between requests.
-<p class="level1">
-<p class="level0"><a name="Dangerous"></a><span class="nroffip">Dangerous URLs</span>
-<p class="level1">SCP URLs can contain raw commands within the scp: URL, which is a side effect of how the SCP protocol is designed. e.g. scp://user:pass@host/a;date >/tmp/test; Apps must not allow unsanitized SCP: URLs to be passed in for downloads.
-<p class="level1">
-<p class="level0"><a name="Denial"></a><span class="nroffip">Denial of Service</span>
-<p class="level1">A malicious server could cause libcurl to effectively hang by sending a trickle of data through, or even no data at all but just keeping the TCP connection open. This could result in a denial-of-service attack. The CURLOPT_TIMEOUT and/or CURLOPT_LOW_SPEED_LIMIT options can be used to mitigate against this.
-<p class="level1">A malicious server could cause libcurl to effectively hang by starting to send data, then severing the connection without cleanly closing the TCP connection. The app could install a CURLOPT_SOCKOPTFUNCTION callback function and set the TCP SO_KEEPALIVE option to mitigate against this. Setting one of the timeout options would also work against this attack.
-<p class="level1">A malicious server could cause libcurl to download an infinite amount of data, potentially causing all of memory or disk to be filled. Setting the CURLOPT_MAXFILESIZE_LARGE option is not sufficient to guard against this. Instead, the app should monitor the amount of data received within the write or progress callback and abort once the limit is reached.
-<p class="level1">A malicious HTTP server could cause an infinite redirection loop, causing a denial-of-service. This can be mitigated by using the CURLOPT_MAXREDIRS option.
-<p class="level1">
-<p class="level0"><a name="Arbitrary"></a><span class="nroffip">Arbitrary Headers</span>
-<p class="level1">User-supplied data must be sanitized when used in options like CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that are used to generate structured data. Characters like embedded carriage returns or ampersands could allow the user to create additional headers or fields that could cause malicious transactions.
-<p class="level1">
-<p class="level0"><a name="Server-supplied"></a><span class="nroffip">Server-supplied Names</span>
-<p class="level1">A server can supply data which the application may, in some cases, use as a file name. The curl command-line tool does this with --remote-header-name, using the Content-disposition: header to generate a file name. An application could also use CURLINFO_EFFECTIVE_URL to generate a file name from a server-supplied redirect URL. Special care must be taken to sanitize such names to avoid the possibility of a malicious server supplying one like "/etc/passwd", "autoexec.bat" or even ".bashrc".
-<p class="level1">
-<p class="level0"><a name="Server"></a><span class="nroffip">Server Certificates</span>
-<p class="level1">A secure application should never use the CURLOPT_SSL_VERIFYPEER option to disable certificate validation. There are numerous attacks that are enabled by apps that fail to properly validate server TLS/SSL certificates, thus enabling a malicious server to spoof a legitimate one. HTTPS without validated certificates is potentially as insecure as a plain HTTP connection.
-<p class="level1">
-<p class="level0"><a name="Showing"></a><span class="nroffip">Showing What You Do</span>
-<p class="level1">On a related issue, be aware that even in situations like when you have problems with libcurl and ask someone for help, everything you reveal in order to get best possible help might also impose certain security related risks. Host names, user names, paths, operating system specifics, etc (not to mention passwords of course) may in fact be used by intruders to gain additional information of a potential target.
-<p class="level1">To avoid this problem, you must of course use your common sense. Often, you can just edit out the sensitive data or just search/replace your true information with faked data.
-<p class="level1"><a name="Multiple"></a><h2 class="nroffsh">Multiple Transfers Using the multi Interface</h2>
-<p class="level0">
-<p class="level0">The easy interface as described in detail in this document is a synchronous interface that transfers one file at a time and doesn't return until it is done.
-<p class="level0">The multi interface, on the other hand, allows your program to transfer multiple files in both directions at the same time, without forcing you to use multiple threads. The name might make it seem that the multi interface is for multi-threaded programs, but the truth is almost the reverse. The multi interface can allow a single-threaded application to perform the same kinds of multiple, simultaneous transfers that multi-threaded programs can perform. It allows many of the benefits of multi-threaded transfers without the complexity of managing and synchronizing many threads.
-<p class="level0">To use this interface, you are better off if you first understand the basics of how to use the easy interface. The multi interface is simply a way to make multiple transfers at the same time by adding up multiple easy handles into a "multi stack".
-<p class="level0">You create the easy handles you want and you set all the options just like you have been told above, and then you create a multi handle with <a class="emphasis" href="./curl_multi_init.html">curl_multi_init(3)</a> and add all those easy handles to that multi handle with <a class="emphasis" href="./curl_multi_add_handle.html">curl_multi_add_handle(3)</a>.
-<p class="level0">When you've added the handles you have for the moment (you can still add new ones at any time), you start the transfers by calling <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>.
-<p class="level0"><a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> is asynchronous. It will only execute as little as possible and then return back control to your program. It is designed to never block. If it returns CURLM_CALL_MULTI_PERFORM you better call it again soon, as that is a signal that it still has local data to send or remote data to receive.
-<p class="level0">The best usage of this interface is when you do a select() on all possible file descriptors or sockets to know when to call libcurl again. This also makes it easy for you to wait and respond to actions on your own application's sockets/handles. You figure out what to select() for by using <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a>, that fills in a set of fd_set variables for you with the particular file descriptors libcurl uses for the moment.
-<p class="level0">When you then call select(), it'll return when one of the file handles signal action and you then call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a> to allow libcurl to do what it wants to do. Take note that libcurl does also feature some time-out code so we advise you to never use very long timeouts on select() before you call <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, which thus should be called unconditionally every now and then even if none of its file descriptors have signaled ready. Another precaution you should use: always call <a class="emphasis" href="./curl_multi_fdset.html">curl_multi_fdset(3)</a> immediately before the select() call since the current set of file descriptors may change when calling a curl function.
-<p class="level0">If you want to stop the transfer of one of the easy handles in the stack, you can use <a class="emphasis" href="./curl_multi_remove_handle.html">curl_multi_remove_handle(3)</a> to remove individual easy handles. Remember that easy handles should be <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>ed.
-<p class="level0">When a transfer within the multi stack has finished, the counter of running transfers (as filled in by <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>) will decrease. When the number reaches zero, all transfers are done.
-<p class="level0"><a class="emphasis" href="./curl_multi_info_read.html">curl_multi_info_read(3)</a> can be used to get information about completed transfers. It then returns the CURLcode for each easy transfer, to allow you to figure out success on each individual transfer.
-<p class="level0"><a name="SSL"></a><h2 class="nroffsh">SSL, Certificates and Other Tricks</h2>
-<p class="level0">
-<p class="level0"> [ seeding, passwords, keys, certificates, ENGINE, ca certs ]
-<p class="level0"><a name="Sharing"></a><h2 class="nroffsh">Sharing Data Between Easy Handles</h2>
-<p class="level0">
-<p class="level0"> [ fill in ]
-<p class="level0"><a name="Footnotes"></a><h2 class="nroffsh">Footnotes</h2>
-<p class="level0">
-<p class="level0">
-<p class="level0"><a name="1"></a><span class="nroffip">[1]</span>
-<p class="level1">libcurl 7.10.3 and later have the ability to switch over to chunked Transfer-Encoding in cases where HTTP uploads are done with data of an unknown size.
-<p class="level0"><a name="2"></a><span class="nroffip">[2]</span>
-<p class="level1">This happens on Windows machines when libcurl is built and used as a DLL. However, you can still do this on Windows if you link with a static library.
-<p class="level0"><a name="3"></a><span class="nroffip">[3]</span>
-<p class="level1">The curl-config tool is generated at build-time (on UNIX-like systems) and should be installed with the 'make install' or similar instruction that installs the library, header files, man pages etc.
-<p class="level0"><a name="4"></a><span class="nroffip">[4]</span>
-<p class="level1">This behavior was different in versions before 7.17.0, where strings had to remain valid past the end of the <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> call. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl-tutorial.pdf b/docs/libcurl/libcurl-tutorial.pdf
deleted file mode 100644
index 9ed755e..0000000
--- a/docs/libcurl/libcurl-tutorial.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/libcurl.3 b/docs/libcurl/libcurl.3
index c0b221f..39bcccd 100644
--- a/docs/libcurl/libcurl.3
+++ b/docs/libcurl/libcurl.3
@@ -1,4 +1,24 @@
-.\"
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 libcurl 3 "19 March 2002" "libcurl 7.9.6" "libcurl overview"
.SH NAME
libcurl \- client-side URL transfers
@@ -9,18 +29,24 @@
\fIlibcurl-share(3)\fP man page and the \fIlibcurl-tutorial(3)\fP man page for
in-depth understanding on how to program with libcurl.
-There are more than thirty custom bindings available that bring libcurl access
-to your favourite language. Look elsewhere for documentation on those.
+There are many bindings available that bring libcurl access to your favourite
+language. Look elsewhere for documentation on those.
-libcurl has a global constant environment that you must set up and
-maintain while using libcurl. This essentially means you call
+libcurl has a global constant environment that you must set up and maintain
+while using libcurl. This essentially means you call
\fIcurl_global_init(3)\fP at the start of your program and
-\fIcurl_global_cleanup(3)\fP at the end. See GLOBAL CONSTANTS below
-for details.
+\fIcurl_global_cleanup(3)\fP at the end. See \fBGLOBAL CONSTANTS\fP below for
+details.
-To transfer files, you always set up an "easy handle" using
-\fIcurl_easy_init(3)\fP, but when you want the file(s) transferred you have
-the option of using the "easy" interface, or the "multi" interface.
+To transfer files, you create an "easy handle" using \fIcurl_easy_init(3)\fP
+for a single individual transfer (in either direction). You then set your
+desired set of options in that handle with \fIcurl_easy_setopt(3)\fP. Options
+you set with \fIcurl_easy_setopt(3)\fP stick. They will be used on every
+repeated use of this handle until you either change the option, or you reset
+them all with \fIcurl_easy_reset(3)\fP.
+
+To actually transfer data you have the option of using the "easy" interface,
+or the "multi" interface.
The easy interface is a synchronous interface with which you call
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
@@ -31,7 +57,8 @@
call and that performs only a little piece of the transfer on each invoke. It
is perfect if you want to do things while the transfer is in progress, or
similar. The multi interface allows you to select() on libcurl action, and
-even to easily download multiple files simultaneously using a single thread. See further details in the \fIlibcurl-multi(3)\fP man page.
+even to easily download multiple files simultaneously using a single
+thread. See further details in the \fIlibcurl-multi(3)\fP man page.
You can have multiple easy handles share certain data, even if they are used
in different threads. This magic is setup using the share interface, as
@@ -70,6 +97,8 @@
often don't provide the curl-config tool, but simply install the library and
headers in the common path for this purpose.
+Many Linux and similar sytems use pkg-config to provide build and link options
+about libraries and libcurl supports that as well.
.SH "LIBCURL SYMBOL NAMES"
All public functions in the libcurl interface are prefixed with 'curl_' (with
a lowercase c). You can find other functions in the library source code, but
@@ -87,27 +116,29 @@
threads, but you must use separate curl handles if you want to use libcurl in
more than one thread simultaneously.
-The global environment functions are not thread-safe. See GLOBAL CONSTANTS
-below for details.
+The global environment functions are not thread-safe. See \fBGLOBAL
+CONSTANTS\fP below for details.
.SH "PERSISTENT CONNECTIONS"
Persistent connections means that libcurl can re-use the same connection for
several transfers, if the conditions are right.
libcurl will \fBalways\fP attempt to use persistent connections. Whenever you
-use \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP, libcurl will
-attempt to use an existing connection to do the transfer, and if none exists
-it'll open a new one that will be subject for re-use on a possible following
-call to \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP.
+use \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP etc, libcurl
+will attempt to use an existing connection to do the transfer, and if none
+exists it'll open a new one that will be subject for re-use on a possible
+following call to \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP.
To allow libcurl to take full advantage of persistent connections, you should
-do as many of your file transfers as possible using the same curl handle. When
-you call \fIcurl_easy_cleanup(3)\fP, all the possibly open connections held by
-libcurl will be closed and forgotten.
+do as many of your file transfers as possible using the same handle.
-Note that the options set with \fIcurl_easy_setopt(3)\fP will be used on
-every repeated \fIcurl_easy_perform(3)\fP call.
+If you use the easy interface, and you call \fIcurl_easy_cleanup(3)\fP, all
+the possibly open connections held by libcurl will be closed and forgotten.
+When you've created a multi handle and are using the multi interface, the
+connection pool is instead kept in the multi handle so closing and creating
+new easy handles to do transfers will not affect them. Instead all added easy
+handles can take advantage of the single shared pool.
.SH "GLOBAL CONSTANTS"
There are a variety of constants that libcurl uses, mainly through its
internal use of other libraries, which are too complicated for the
@@ -117,18 +148,16 @@
capability via the GNU TLS library, there is an elaborate tree inside
that library that describes the SSL protocol.
-\fIcurl_global_init()\fP is the function that you must call. This may
-allocate resources (e.g. the memory for the GNU TLS tree mentioned
-above), so the companion function \fIcurl_global_cleanup()\fP releases
-them.
+\fIcurl_global_init(3)\fP is the function that you must call. This may
+allocate resources (e.g. the memory for the GNU TLS tree mentioned above), so
+the companion function \fIcurl_global_cleanup(3)\fP releases them.
-The basic rule for constructing a program that uses libcurl is this:
-Call \fIcurl_global_init()\fP, with a \fICURL_GLOBAL_ALL\fP argument,
-immediately after the program starts, while it is still only one
-thread and before it uses libcurl at all. Call
-\fIcurl_global_cleanup()\fP immediately before the program exits, when
-the program is again only one thread and after its last use of
-libcurl.
+The basic rule for constructing a program that uses libcurl is this: Call
+\fIcurl_global_init(3)\fP, with a \fICURL_GLOBAL_ALL\fP argument, immediately
+after the program starts, while it is still only one thread and before it uses
+libcurl at all. Call \fIcurl_global_cleanup(3)\fP immediately before the
+program exits, when the program is again only one thread and after its last
+use of libcurl.
You can call both of these multiple times, as long as all calls meet
these requirements and the number of calls to each is the same.
@@ -153,48 +182,42 @@
know whether they use libcurl or not. And its code doesn't necessarily
run at the start and end of the whole program.
-A module like this must have global constant functions of its own,
-just like \fIcurl_global_init()\fP and \fIcurl_global_cleanup()\fP.
-The module thus has control at the beginning and end of the program
-and has a place to call the libcurl functions. Note that if multiple
-modules in the program use libcurl, they all will separately call the
-libcurl functions, and that's OK because only the first
-\fIcurl_global_init()\fP and the last \fIcurl_global_cleanup()\fP in a
-program change anything. (libcurl uses a reference count in static
-memory).
+A module like this must have global constant functions of its own, just like
+\fIcurl_global_init(3)\fP and \fIcurl_global_cleanup(3)\fP. The module thus
+has control at the beginning and end of the program and has a place to call
+the libcurl functions. Note that if multiple modules in the program use
+libcurl, they all will separately call the libcurl functions, and that's OK
+because only the first \fIcurl_global_init(3)\fP and the last
+\fIcurl_global_cleanup(3)\fP in a program change anything. (libcurl uses a
+reference count in static memory).
-In a C++ module, it is common to deal with the global constant
-situation by defining a special class that represents the global
-constant environment of the module. A program always has exactly one
-object of the class, in static storage. That way, the program
-automatically calls the constructor of the object as the program
-starts up and the destructor as it terminates. As the author of this
-libcurl-using module, you can make the constructor call
-\fIcurl_global_init()\fP and the destructor call
-\fIcurl_global_cleanup()\fP and satisfy libcurl's requirements without
-your user having to think about it.
+In a C++ module, it is common to deal with the global constant situation by
+defining a special class that represents the global constant environment of
+the module. A program always has exactly one object of the class, in static
+storage. That way, the program automatically calls the constructor of the
+object as the program starts up and the destructor as it terminates. As the
+author of this libcurl-using module, you can make the constructor call
+\fIcurl_global_init(3)\fP and the destructor call \fIcurl_global_cleanup(3)\fP
+and satisfy libcurl's requirements without your user having to think about it.
-\fIcurl_global_init()\fP has an argument that tells what particular
-parts of the global constant environment to set up. In order to
-successfully use any value except \fICURL_GLOBAL_ALL\fP (which says to
-set up the whole thing), you must have specific knowledge of internal
-workings of libcurl and all other parts of the program of which it is
-part.
+\fIcurl_global_init(3)\fP has an argument that tells what particular parts of
+the global constant environment to set up. In order to successfully use any
+value except \fICURL_GLOBAL_ALL\fP (which says to set up the whole thing), you
+must have specific knowledge of internal workings of libcurl and all other
+parts of the program of which it is part.
-A special part of the global constant environment is the identity of
-the memory allocator. \fIcurl_global_init()\fP selects the system
-default memory allocator, but you can use \fIcurl_global_init_mem()\fP
-to supply one of your own. However, there is no way to use
-\fIcurl_global_init_mem()\fP in a modular program -- all modules in
-the program that might use libcurl would have to agree on one
-allocator.
+A special part of the global constant environment is the identity of the
+memory allocator. \fIcurl_global_init(3)\fP selects the system default memory
+allocator, but you can use \fIcurl_global_init_mem(3)\fP to supply one of your
+own. However, there is no way to use \fIcurl_global_init_mem(3)\fP in a
+modular program -- all modules in the program that might use libcurl would
+have to agree on one allocator.
-There is a failsafe in libcurl that makes it usable in simple
-situations without you having to worry about the global constant
-environment at all: \fIcurl_easy_init()\fP sets up the environment
-itself if it hasn't been done yet. The resources it acquires to do so
-get released by the operating system automatically when the program
-exits.
+There is a failsafe in libcurl that makes it usable in simple situations
+without you having to worry about the global constant environment at all:
+\fIcurl_easy_init(3)\fP sets up the environment itself if it hasn't been done
+yet. The resources it acquires to do so get released by the operating system
+automatically when the program exits.
This failsafe feature exists mainly for backward compatibility because
there was a time when the global functions didn't exist. Because it
diff --git a/docs/libcurl/libcurl.html b/docs/libcurl/libcurl.html
deleted file mode 100644
index 43b9bdd..0000000
--- a/docs/libcurl/libcurl.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html><head>
-<title>libcurl man page</title>
-<meta name="generator" content="roffit 0.7">
-<STYLE type="text/css">
-P.level0 {
- padding-left: 2em;
-}
-
-P.level1 {
- padding-left: 4em;
-}
-
-P.level2 {
- padding-left: 6em;
-}
-
-span.emphasis {
- font-style: italic;
-}
-
-span.bold {
- font-weight: bold;
-}
-
-span.manpage {
- font-weight: bold;
-}
-
-h2.nroffsh {
- background-color: #e0e0e0;
-}
-
-span.nroffip {
- font-weight: bold;
- font-size: 120%;
- font-family: monospace;
-}
-
-p.roffit {
- text-align: center;
- font-size: 80%;
-}
-</STYLE>
-</head><body>
-
-<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
-<p class="level0">libcurl - client-side URL transfers <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
-<p class="level0">This is a short overview on how to use libcurl in your C programs. There are specific man pages for each function mentioned in here. There are also the <span Class="emphasis">libcurl-easy(3)</span> man page, the <span Class="emphasis">libcurl-multi(3)</span> man page, the <span Class="emphasis">libcurl-share(3)</span> man page and the <span Class="emphasis">libcurl-tutorial(3)</span> man page for in-depth understanding on how to program with libcurl.
-<p class="level0">There are more than thirty custom bindings available that bring libcurl access to your favourite language. Look elsewhere for documentation on those.
-<p class="level0">libcurl has a global constant environment that you must set up and maintain while using libcurl. This essentially means you call <a class="emphasis" href="./curl_global_init.html">curl_global_init(3)</a> at the start of your program and <a class="emphasis" href="./curl_global_cleanup.html">curl_global_cleanup(3)</a> at the end. See GLOBAL CONSTANTS below for details.
-<p class="level0">To transfer files, you always set up an "easy handle" using <a class="emphasis" href="./curl_easy_init.html">curl_easy_init(3)</a>, but when you want the file(s) transferred you have the option of using the "easy" interface, or the "multi" interface.
-<p class="level0">The easy interface is a synchronous interface with which you call <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> and let it perform the transfer. When it is completed, the function returns and you can continue. More details are found in the <span Class="emphasis">libcurl-easy(3)</span> man page.
-<p class="level0">The multi interface on the other hand is an asynchronous interface, that you call and that performs only a little piece of the transfer on each invoke. It is perfect if you want to do things while the transfer is in progress, or similar. The multi interface allows you to select() on libcurl action, and even to easily download multiple files simultaneously using a single thread. See further details in the <span Class="emphasis">libcurl-multi(3)</span> man page.
-<p class="level0">You can have multiple easy handles share certain data, even if they are used in different threads. This magic is setup using the share interface, as described in the <span Class="emphasis">libcurl-share(3)</span> man page.
-<p class="level0">There is also a series of other helpful functions to use, including these:
-<p class="level1">
-<p class="level0"><a name="curlversioninfo"></a><span class="nroffip">curl_version_info()</span>
-<p class="level1">gets detailed libcurl (and other used libraries) version info
-<p class="level0"><a name="curlgetdate"></a><span class="nroffip">curl_getdate()</span>
-<p class="level1">converts a date string to time_t
-<p class="level0"><a name="curleasygetinfo"></a><span class="nroffip">curl_easy_getinfo()</span>
-<p class="level1">get information about a performed transfer
-<p class="level0"><a name="curlformadd"></a><span class="nroffip">curl_formadd()</span>
-<p class="level1">helps building an HTTP form POST
-<p class="level0"><a name="curlformfree"></a><span class="nroffip">curl_formfree()</span>
-<p class="level1">free a list built with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>
-<p class="level0"><a name="curlslistappend"></a><span class="nroffip">curl_slist_append()</span>
-<p class="level1">builds a linked list
-<p class="level0"><a name="curlslistfreeall"></a><span class="nroffip">curl_slist_free_all()</span>
-<p class="level1">frees a whole curl_slist
-<p class="level0">
-<p class="level0"><a name="LINKING"></a><h2 class="nroffsh">LINKING WITH LIBCURL</h2>
-<p class="level0">On unix-like machines, there's a tool named curl-config that gets installed with the rest of the curl stuff when 'make install' is performed.
-<p class="level0">curl-config is added to make it easier for applications to link with libcurl and developers to learn about libcurl and how to use it.
-<p class="level0">Run 'curl-config --libs' to get the (additional) linker options you need to link with the particular version of libcurl you've installed. See the <span Class="emphasis">curl-config(1)</span> man page for further details.
-<p class="level0">Unix-like operating system that ship libcurl as part of their distributions often don't provide the curl-config tool, but simply install the library and headers in the common path for this purpose.
-<p class="level0"><a name="LIBCURL"></a><h2 class="nroffsh">LIBCURL SYMBOL NAMES</h2>
-<p class="level0">All public functions in the libcurl interface are prefixed with 'curl_' (with a lowercase c). You can find other functions in the library source code, but other prefixes indicate that the functions are private and may change without further notice in the next release.
-<p class="level0">Only use documented functions and functionality! <a name="PORTABILITY"></a><h2 class="nroffsh">PORTABILITY</h2>
-<p class="level0">libcurl works <span Class="bold">exactly</span> the same, on any of the platforms it compiles and builds on. <a name="THREADS"></a><h2 class="nroffsh">THREADS</h2>
-<p class="level0">Never ever call curl-functions simultaneously using the same handle from several threads. libcurl is thread-safe and can be used in any number of threads, but you must use separate curl handles if you want to use libcurl in more than one thread simultaneously.
-<p class="level0">The global environment functions are not thread-safe. See GLOBAL CONSTANTS below for details.
-<p class="level0"><a name="PERSISTENT"></a><h2 class="nroffsh">PERSISTENT CONNECTIONS</h2>
-<p class="level0">Persistent connections means that libcurl can re-use the same connection for several transfers, if the conditions are right.
-<p class="level0">libcurl will <span Class="bold">always</span> attempt to use persistent connections. Whenever you use <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>, libcurl will attempt to use an existing connection to do the transfer, and if none exists it'll open a new one that will be subject for re-use on a possible following call to <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> or <a class="emphasis" href="./curl_multi_perform.html">curl_multi_perform(3)</a>.
-<p class="level0">To allow libcurl to take full advantage of persistent connections, you should do as many of your file transfers as possible using the same curl handle. When you call <a class="emphasis" href="./curl_easy_cleanup.html">curl_easy_cleanup(3)</a>, all the possibly open connections held by libcurl will be closed and forgotten.
-<p class="level0">Note that the options set with <a class="emphasis" href="./curl_easy_setopt.html">curl_easy_setopt(3)</a> will be used on every repeated <a class="emphasis" href="./curl_easy_perform.html">curl_easy_perform(3)</a> call.
-<p class="level0"><a name="GLOBAL"></a><h2 class="nroffsh">GLOBAL CONSTANTS</h2>
-<p class="level0">There are a variety of constants that libcurl uses, mainly through its internal use of other libraries, which are too complicated for the library loader to set up. Therefore, a program must call a library function after the program is loaded and running to finish setting up the library code. For example, when libcurl is built for SSL capability via the GNU TLS library, there is an elaborate tree inside that library that describes the SSL protocol.
-<p class="level0"><span Class="emphasis">curl_global_init()</span> is the function that you must call. This may allocate resources (e.g. the memory for the GNU TLS tree mentioned above), so the companion function <span Class="emphasis">curl_global_cleanup()</span> releases them.
-<p class="level0">The basic rule for constructing a program that uses libcurl is this: Call <span Class="emphasis">curl_global_init()</span>, with a <span Class="emphasis">CURL_GLOBAL_ALL</span> argument, immediately after the program starts, while it is still only one thread and before it uses libcurl at all. Call <span Class="emphasis">curl_global_cleanup()</span> immediately before the program exits, when the program is again only one thread and after its last use of libcurl.
-<p class="level0">You can call both of these multiple times, as long as all calls meet these requirements and the number of calls to each is the same.
-<p class="level0">It isn't actually required that the functions be called at the beginning and end of the program -- that's just usually the easiest way to do it. It <span Class="emphasis">is</span> required that the functions be called when no other thread in the program is running.
-<p class="level0">These global constant functions are <span Class="emphasis">not thread safe</span>, so you must not call them when any other thread in the program is running. It isn't good enough that no other thread is using libcurl at the time, because these functions internally call similar functions of other libraries, and those functions are similarly thread-unsafe. You can't generally know what these libraries are, or whether other threads are using them.
-<p class="level0">The global constant situation merits special consideration when the code you are writing to use libcurl is not the main program, but rather a modular piece of a program, e.g. another library. As a module, your code doesn't know about other parts of the program -- it doesn't know whether they use libcurl or not. And its code doesn't necessarily run at the start and end of the whole program.
-<p class="level0">A module like this must have global constant functions of its own, just like <span Class="emphasis">curl_global_init()</span> and <span Class="emphasis">curl_global_cleanup()</span>. The module thus has control at the beginning and end of the program and has a place to call the libcurl functions. Note that if multiple modules in the program use libcurl, they all will separately call the libcurl functions, and that's OK because only the first <span Class="emphasis">curl_global_init()</span> and the last <span Class="emphasis">curl_global_cleanup()</span> in a program change anything. (libcurl uses a reference count in static memory).
-<p class="level0">In a C++ module, it is common to deal with the global constant situation by defining a special class that represents the global constant environment of the module. A program always has exactly one object of the class, in static storage. That way, the program automatically calls the constructor of the object as the program starts up and the destructor as it terminates. As the author of this libcurl-using module, you can make the constructor call <span Class="emphasis">curl_global_init()</span> and the destructor call <span Class="emphasis">curl_global_cleanup()</span> and satisfy libcurl's requirements without your user having to think about it.
-<p class="level0"><span Class="emphasis">curl_global_init()</span> has an argument that tells what particular parts of the global constant environment to set up. In order to successfully use any value except <span Class="emphasis">CURL_GLOBAL_ALL</span> (which says to set up the whole thing), you must have specific knowledge of internal workings of libcurl and all other parts of the program of which it is part.
-<p class="level0">A special part of the global constant environment is the identity of the memory allocator. <span Class="emphasis">curl_global_init()</span> selects the system default memory allocator, but you can use <span Class="emphasis">curl_global_init_mem()</span> to supply one of your own. However, there is no way to use <span Class="emphasis">curl_global_init_mem()</span> in a modular program -- all modules in the program that might use libcurl would have to agree on one allocator.
-<p class="level0">There is a failsafe in libcurl that makes it usable in simple situations without you having to worry about the global constant environment at all: <span Class="emphasis">curl_easy_init()</span> sets up the environment itself if it hasn't been done yet. The resources it acquires to do so get released by the operating system automatically when the program exits.
-<p class="level0">This failsafe feature exists mainly for backward compatibility because there was a time when the global functions didn't exist. Because it is sufficient only in the simplest of programs, it is not recommended for any program to rely on it. <p class="roffit">
- This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
-</body></html>
diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4
index 952b79f..2cf3edd 100644
--- a/docs/libcurl/libcurl.m4
+++ b/docs/libcurl/libcurl.m4
@@ -1,3 +1,24 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2006, David Shaw <[email protected]>
+#
+# 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 http://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.
+#
+###########################################################################
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
@@ -146,18 +167,19 @@
_libcurl_save_libs=$LIBS
LIBS="$LIBCURL $LIBS"
- AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
/* Try and use a few common options to force a failure if we are
missing symbols or can't link. */
int x;
curl_easy_setopt(NULL,CURLOPT_URL,NULL);
x=CURL_ERROR_SIZE;
x=CURLOPT_WRITEFUNCTION;
-x=CURLOPT_FILE;
+x=CURLOPT_WRITEDATA;
x=CURLOPT_ERRORBUFFER;
x=CURLOPT_STDERR;
x=CURLOPT_VERBOSE;
-]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+if (x) ;
+]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
CPPFLAGS=$_libcurl_save_cppflags
LIBS=$_libcurl_save_libs
diff --git a/docs/libcurl/libcurl.pdf b/docs/libcurl/libcurl.pdf
deleted file mode 100644
index 6974679..0000000
--- a/docs/libcurl/libcurl.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/libcurl/mksymbolsmanpage.pl b/docs/libcurl/mksymbolsmanpage.pl
new file mode 100644
index 0000000..1bca4d0
--- /dev/null
+++ b/docs/libcurl/mksymbolsmanpage.pl
@@ -0,0 +1,93 @@
+#!/usr/bin/perl
+# ***************************************************************************
+# * _ _ ____ _
+# * Project ___| | | | _ \| |
+# * / __| | | | |_) | |
+# * | (__| |_| | _ <| |___
+# * \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+# *
+# ***************************************************************************
+
+my $version="7.41.0";
+
+use POSIX qw(strftime);
+my $date = strftime "%b %e, %Y", localtime;
+my $year = strftime "%Y", localtime;
+
+print <<HEADER
+.\\" **************************************************************************
+.\\" * _ _ ____ _
+.\\" * Project ___| | | | _ \\| |
+.\\" * / __| | | | |_) | |
+.\\" * | (__| |_| | _ <| |___
+.\\" * \\___|\\___/|_| \\_\\_____|
+.\\" *
+.\\" * Copyright (C) 1998 - $year, Daniel Stenberg, <daniel\@haxx.se>, et al.
+.\\" *
+.\\" * This software is licensed as described in the file COPYING, which
+.\\" * you should have received as part of this distribution. The terms
+.\\" * are also available at http://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 libcurl-symbols 3 "$date" "libcurl $version" "libcurl symbols"
+.SH NAME
+libcurl-symbols \\- libcurl symbol version information
+.SH "libcurl symbols"
+This man page details version information for public symbols provided in the
+libcurl header files. This lists the first version in which the symbol was
+introduced and for some symbols two additional information pieces:
+
+The first version in which the symbol is marked "deprecated" - meaning that
+since that version no new code should be written to use the symbol as it is
+marked for getting removed in a future.
+
+The last version that featured the specific symbol. Using the symbol in source
+code will make it no longer compile error-free after that specified version.
+
+This man page is automatically generated from the symbols-in-versions file.
+HEADER
+ ;
+
+while(<STDIN>) {
+ if($_ =~ /^(CURL[A-Z0-9_.]*) *(.*)/) {
+ my ($symbol, $rest)=($1,$2);
+ my ($intro, $dep, $rem);
+ if($rest =~ s/^([0-9.]*) *//) {
+ $intro = $1;
+ }
+ if($rest =~ s/^([0-9.]*) *//) {
+ $dep = $1;
+ }
+ if($rest =~ s/^([0-9.]*) *//) {
+ $rem = $1;
+ }
+ print ".IP $symbol\nIntroduced in $intro\n";
+ if($dep) {
+ print "Deprecated since $dep\n";
+ }
+ if($rem) {
+ print "Last used in $dep\n";
+ }
+ }
+
+}
diff --git a/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
new file mode 100644
index 0000000..66ceab8
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size);
+.SH DESCRIPTION
+Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently
+processing a chunked (Transfer-encoding: chunked) request with a current chunk
+length larger than \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP, that pipeline
+will not be considered for additional requests, even if it is shorter than
+\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
+.SH DEFAULT
+The default value is 0, which means that the penalization is inactive.
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), "
+.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3 b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
new file mode 100644
index 0000000..203b6ac
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size);
+.SH DESCRIPTION
+Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently
+processing a request with a Content-Length larger than this
+\fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP, that pipeline will then not be
+considered for additional requests, even if it is shorter than
+\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
+.SH DEFAULT
+The default value is 0, which means that the size penalization is inactive.
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
new file mode 100644
index 0000000..759ce08
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_MAXCONNECTS \- set size of connection cache
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max);
+.SH DESCRIPTION
+Pass a long indicating the \fBmax\fP. The set number will be used as the
+maximum amount of simultaneously open connections that libcurl may keep in its
+connection cache after completed use. By default libcurl will enlarge the size
+for each added easy handle to make it fit 4 times the number of added easy
+handles.
+
+By setting this option, you can prevent the cache size from growing beyond the
+limit set by you.
+
+When the cache is full, curl closes the oldest one in the cache to prevent the
+number of open connections from increasing.
+
+This option is for the multi handle's use only, when using the easy interface
+you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option.
+
+See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP for limiting the number of active
+connections.
+
+.SH DEFAULT
+See DESCRIPTION
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.3
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
+.BR CURLOPT_MAXCONNECTS "(3), "
+
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
new file mode 100644
index 0000000..7522d43
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_MAX_HOST_CONNECTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS, long max);
+.SH DESCRIPTION
+Pass a long to indicate \fBmax\fP. The set number will be used as the maximum
+amount of simultaneously open connections to a single host (a host being the
+same as a host name + port number pair). For each new session to a host,
+libcurl will open a new connection up to the limit set by
+\fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP. When the limit is reached, the
+sessions will be pending until a connection becomes available. If
+\fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to pipeline if the
+host is capable of it.
+
+The default \fBmax\fP value is 0, unlimited. However, for backwards
+compatibility, setting it to 0 when \fICURLMOPT_PIPELINING(3)\fP is 1 will not
+be treated as unlimited. Instead it will open only 1 connection and try to
+pipeline on it.
+
+This set limit is also used for proxy connections, and then the proxy is
+considered to be the host for which this limit counts.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_TOTAL_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3 b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
new file mode 100644
index 0000000..c2adb45
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_MAX_PIPELINE_LENGTH 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max);
+.SH DESCRIPTION
+Pass a long. The set \fBmax\fP number will be used as the maximum amount of
+outstanding requests in a pipelined connection. Only used if pipelining is
+enabled.
+
+When this limit is reached, libcurl will use another connection to the same
+host (see \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP), or queue the request until
+one of the pipelines to the host is ready to accept a request. Thus, the
+total number of requests in-flight is \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP *
+\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
+.SH DEFAULT
+5
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3 b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
new file mode 100644
index 0000000..2783a7d
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount);
+.SH DESCRIPTION
+Pass a long for the \fBamount\fP. The set number will be used as the maximum
+number of simultaneously open connections in total using this multi
+handle. For each new session, libcurl will open a new connection up to the
+limit set by \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is
+reached, the sessions will be pending until there are available
+connections. If \fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to
+pipeline if the host is capable of it.
+.SH DEFAULT
+The default value is 0, which means that there is no limit. It is then simply
+controlled by the number of easy handles added.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING.3
new file mode 100644
index 0000000..c795c48
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING.3
@@ -0,0 +1,68 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_PIPELINING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_PIPELINING \- enable/disable HTTP pipelining
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bits);
+.SH DESCRIPTION
+Set the \fBbits\fP parameter to 1 to make libcurl use HTTP pipelining for
+HTTP/1.1 transfers done using this multi handle, as far as possible. This
+means that if you add a second request that can use an already existing
+connection, the second request will be \&"piped" on the same connection rather
+than being executed in parallel.
+
+When using pipelining, there are also several other related options that are
+interesting to tweak and adjust to alter how libcurl spreads out requests on
+different connections or not etc.
+
+Starting in 7.43.0, the \fBbits\fP parameter's bit 1 also has a meaning and
+libcurl is now offering symbol names for the bits:
+.IP CURLPIPE_NOTHING (0)
+Default, which means doing no attempts at pipelining or multiplexing.
+.IP CURLPIPE_HTTP1 (1)
+If this bit is set, libcurl will try to pipeline HTTP/1.1 requests on
+connections that are already established and in use to hosts.
+.IP CURLPIPE_MULTIPLEX (2)
+If this bit is set, libcurl will try to multiplex the new transfer over an
+existing connection if possible. This requires HTTP/2.
+.SH DEFAULT
+0 (off)
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0. Multiplex support bit added in 7.43.0.
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), "
+.BR CURLMOPT_PIPELINING_SITE_BL "(3), "
+.BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), "
+.BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), "
+.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
+.BR CURLMOPT_MAXCONNECTS "(3), "
+.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
new file mode 100644
index 0000000..e3ea4b1
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_PIPELINING_SERVER_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers);
+.SH DESCRIPTION
+Pass a \fBservers\fP array of char *, ending with a NULL entry. This is a list
+of server types prefixes (in the Server: HTTP header) that are blacklisted
+from pipelining, i.e server types that are known to not support HTTP
+pipelining. The array is copied by libcurl.
+
+Note that the comparison matches if the Server: header begins with the string
+in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can
+both be blacklisted by having "Ninja" in the backlist.
+
+Pass a NULL pointer to clear the blacklist.
+.SH DEFAULT
+The default value is NULL, which means that there is no blacklist.
+.SH PROTOCOLS
+.SH EXAMPLE
+.nf
+ server_blacklist[] =
+ {
+ "Microsoft-IIS/6.0",
+ "nginx/0.8.54",
+ NULL
+ };
+
+ curl_multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_blacklist);
+.fi
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_PIPELINING_SITE_BL "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3 b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
new file mode 100644
index 0000000..cf6e6e7
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_PIPELINING_SITE_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL, char **hosts);
+.SH DESCRIPTION
+Pass a \fBhosts\fP array of char *, ending with a NULL entry. This is a list
+of sites that are blacklisted from pipelining, i.e sites that are known to not
+support HTTP pipelining. The array is copied by libcurl.
+
+Pass a NULL pointer to clear the blacklist.
+.SH DEFAULT
+The default value is NULL, which means that there is no blacklist.
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+ site_blacklist[] =
+ {
+ "www.haxx.se",
+ "www.example.com:1234",
+ NULL
+ };
+
+ curl_multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_blacklist);
+.fi
+.SH AVAILABILITY
+Added in 7.30.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_PIPELINING_SERVER_BL "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3 b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
new file mode 100644
index 0000000..bf7e6a7
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_SOCKETDATA 3 "3 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETDATA, void *pointer);
+.SH DESCRIPTION
+A data \fIpointer\fP to pass to the socket callback set with the
+\fICURLMOPT_SOCKETFUNCTION(3)\fP option.
+
+This pointer will not be touched by libcurl but will only be passed in to the
+socket callbacks's \fBuserp\fP argument.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.4
+.SH RETURN VALUE
+Returns CURLM_OK.
+.SH "SEE ALSO"
+.BR CURLMOPT_SOCKETFUNCTION "(3), " curl_multi_socket_action "(3), "
+.BR CURLMOPT_TIMERFUNCTION "(3) "
diff --git a/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
new file mode 100644
index 0000000..d64fe11
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_SOCKETFUNCTION 3 "3 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+int 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 */
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+When the \fIcurl_multi_socket_action(3)\fP function runs, it informs the
+application about updates in the socket (file descriptor) status by doing
+none, one, or multiple calls to the \fBsocket_callback\fP. The callback gets
+status updates with changes since the previous time the callback was called.
+If the given callback pointer is NULL, no callback will be called. Set the
+callback's \fBuserp\fP argument with \fICURLMOPT_SOCKETDATA(3)\fP. See
+\fIcurl_multi_socket_action(3)\fP for more details on how the callback is used
+and should work.
+.SH DEFAULT
+NULL (no callback)
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.4
+.SH RETURN VALUE
+Returns CURLM_OK.
+.SH "SEE ALSO"
+.BR CURLMOPT_SOCKETDATA "(3), " curl_multi_socket_action "(3), "
+.BR CURLMOPT_TIMERFUNCTION "(3) "
+
diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.3 b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
new file mode 100644
index 0000000..41627da
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_TIMERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERDATA, void *pointer);
+.SH DESCRIPTION
+A data \fBpointer\fP to pass to the timer callback set with the
+\fICURLMOPT_TIMERFUNCTION(3)\fP option.
+
+This pointer will not be touched by libcurl but will only be passed in to the
+timer callbacks's \fBuserp\fP argument.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_TIMERFUNCTION "(3), " CURLMOPT_SOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3 b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
new file mode 100644
index 0000000..f509b45
--- /dev/null
+++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
@@ -0,0 +1,101 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 CURLMOPT_TIMERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
+.SH NAME
+CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+int timer_callback(CURLM *multi, /* multi handle */
+ long timeout_ms, /* see above */
+ void *userp); /* private callback pointer */
+
+CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERFUNCTION, timer_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Certain features, such as timeouts and retries, require you to call libcurl
+even when there is no activity on the file descriptors.
+
+Your callback function \fBtimer_callback\fP should install a non-repeating
+timer with an interval of \fBtimeout_ms\fP. Each time that timer fires, call
+either \fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP,
+depending on which interface you use.
+
+A \fBtimeout_ms\fP value of -1 means you should delete your timer.
+
+A \fBtimeout_ms\fP value of 0 means you should call
+\fIcurl_multi_socket_action(3)\fP or \fIcurl_multi_perform(3)\fP (once) as soon
+as possible.
+
+\fBtimer_callback\fP will only be called when the \fBtimeout_ms\fP changes.
+
+The \fBuserp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP.
+
+The timer callback should return 0 on success, and -1 on error. This callback
+can be used instead of, or in addition to, \fIcurl_multi_timeout(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+static gboolean timeout_cb(gpointer user_data) {
+ if (user_data) {
+ g_free(user_data);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERDATA, NULL);
+ }
+ int running;
+ curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running);
+ return G_SOURCE_REMOVE;
+}
+
+static int timerfunc(CURLM *multi, long timeout_ms, void *userp) {
+ guint *id = userp;
+
+ if (id)
+ g_source_remove(*id);
+
+ // -1 means we should just delete our timer.
+ if (timeout_ms == -1) {
+ g_free(id);
+ id = NULL;
+ } else {
+ if (!id)
+ id = g_new(guint, 1);
+ *id = g_timeout_add(timeout_ms, timeout_cb, id);
+ }
+ curl_multi_setopt(multi, CURLMOPT_TIMERDATA, id);
+ return 0;
+}
+
+curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc);
+.fi
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLMOPT_TIMERDATA "(3), " CURLMOPT_SOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
new file mode 100644
index 0000000..a51c86a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_ACCEPTTIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
+.SH DESCRIPTION
+Pass a long telling libcurl the maximum number of milliseconds to wait for a
+server to connect back to libcurl when an active FTP connection is used.
+.SH DEFAULT
+If no timeout is set, the internal default of 60000 (one minute) will be used.
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3 b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
new file mode 100644
index 0000000..376799a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_ACCEPT_ENCODING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
+.SH DESCRIPTION
+Pass a char * argument specifying what encoding you'd like.
+
+Sets the contents of the Accept-Encoding: header sent in a HTTP request, and
+enables decoding of a response when a Content-Encoding: header is received.
+Three encodings are supported: \fIidentity\fP, which does nothing,
+\fIdeflate\fP which requests the server to compress its response using the
+zlib algorithm, and \fIgzip\fP which requests the gzip algorithm.
+
+If a zero-length string is set like "", then an Accept-Encoding: header
+containing all built-in supported encodings is sent.
+
+You can also opt to just include the Accept-Encoding: header in your request
+with \fICURLOPT_HTTPHEADER(3)\fP but then there will be no automatic
+decompressing when receiving data.
+
+This is a request, not an order; the server may or may not do it. This option
+must be set (to any non-NULL value) or else any unsolicited encoding done by
+the server is ignored. See the special file lib/README.encoding for further
+details.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was called CURLOPT_ENCODING before 7.21.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_TRANSFER_ENCODING "(3), " CURLOPT_HTTPHEADER "(3), "
+.BR CURLOPT_HTTP_CONTENT_DECODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3 b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
new file mode 100644
index 0000000..510e3b3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_ADDRESS_SCOPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope);
+.SH DESCRIPTION
+Pass a long specifying the scope_id value to use when connecting to IPv6
+link-local or site-local addresses.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All, when using IPv6
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_APPEND.3 b/docs/libcurl/opts/CURLOPT_APPEND.3
new file mode 100644
index 0000000..0352296
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_APPEND.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_APPEND 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_APPEND \- enable appending to the remote file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to append to the remote file instead of
+overwrite it. This is only useful when uploading to an FTP site.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_FTPAPPEND up to 7.16.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_DIRLISTONLY "(3), " CURLOPT_RESUME_FROM "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_AUTOREFERER.3 b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
new file mode 100644
index 0000000..f8d5668
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_AUTOREFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_AUTOREFERER \- automatically update the referer header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);
+.SH DESCRIPTION
+Pass a parameter set to 1 to enable this. When enabled, libcurl will
+automatically set the Referer: header field in HTTP requests where it follows
+a Location: redirect.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_REFERER "(3), " CURLOPT_FOLLOWLOCATION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3 b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
new file mode 100644
index 0000000..9e31ae9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_BUFFERSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_BUFFERSIZE \- set preferred receive buffer size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);
+.SH DESCRIPTION
+Pass a long specifying your preferred \fIsize\fP (in bytes) for the receive
+buffer in libcurl. The main point of this would be that the write callback
+gets called more often and with smaller chunks. This is just treated as a
+request, not an order. You cannot be guaranteed to actually get the given
+size.
+
+This size is by default set as big as possible (\fICURL_MAX_WRITE_SIZE\fP), so
+it only makes sense to use this option if you want it smaller.
+.SH DEFAULT
+CURL_MAX_WRITE_SIZE
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_RECV_SPEED "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CAINFO.3 b/docs/libcurl/opts/CURLOPT_CAINFO.3
new file mode 100644
index 0000000..85c9ba3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CAINFO.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CAINFO 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO, char *path);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a file holding one or more
+certificates to verify the peer with.
+
+If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
+server's certificate, \fICURLOPT_CAINFO(3)\fP need not even indicate an
+accessible file.
+
+This option is by default set to the system path where libcurl's cacert bundle
+is assumed to be stored, as established at build time.
+
+If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module
+(libnsspem.so) needs to be available for this option to work properly.
+.SH DEFAULT
+Built-in system specific
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+For SSL engines that don't support certificate files the CURLOPT_CAINFO option
+is ignored. Refer to http://curl.haxx.se/docs/ssl-compared.html
+.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_CAPATH "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3
new file mode 100644
index 0000000..6695f9f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CAPATH.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS
+backend provides the option only for backward compatibility.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS enabled, and CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_CAINFO "(3), "
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CERTINFO.3 b/docs/libcurl/opts/CURLOPT_CERTINFO.3
new file mode 100644
index 0000000..a508b86
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CERTINFO.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_CERTINFO 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CERTINFO \- request SSL certificate information
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CERTINFO, long certinfo);
+.SH DESCRIPTION
+Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
+this enabled, libcurl will extract lots of information and data about the
+certificates in the certificate chain used in the SSL connection. This data may
+then be retrieved after a transfer using \fIcurl_easy_getinfo(3)\fP and its
+option \fICURLINFO_CERTINFO\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS-based
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option is supported by the OpenSSL, GnuTLS, NSS and GSKit backends.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CAINFO "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
new file mode 100644
index 0000000..4dd7907
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3
@@ -0,0 +1,69 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CHUNK_BGN_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+long chunk_bgn_callback(const void *transfer_info, void *ptr,
+ int remains);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_BGN_FUNCTION,
+ chunk_bgn_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl before a part of the stream is
+going to be transferred (if the transfer supports chunks).
+
+The \fItransfer_info\fP pointer will point to a struct curl_fileinfo with
+details about the file that is about to get transferred.
+
+This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH(3)\fP
+option for now.
+
+The target of transfer_info parameter is a "feature depended" structure. For
+the FTP wildcard download, the target is curl_fileinfo structure (see
+\fIcurl/curl.h\fP). The parameter \fIptr\fP is a pointer given by
+\fICURLOPT_CHUNK_DATA(3)\fP. The parameter remains contains number of chunks
+remaining per the transfer. If the feature is not available, the parameter has
+zero value.
+
+Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
+\fICURL_CHUNK_BGN_FUNC_SKIP\fP if you want to skip the concrete chunk or
+\fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This was added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CHUNK_END_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3 b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
new file mode 100644
index 0000000..4d0ff3d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CHUNK_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_DATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the ptr
+argument to the \fICURL_CHUNK_BGN_FUNCTION(3)\fP and
+\fICURL_CHUNK_END_FUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CHUNK_BGN_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
new file mode 100644
index 0000000..64f829c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CHUNK_END_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+long chunk_end_callback(void *ptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_END_FUNCTION,
+ chunk_end_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl as soon as a part of the stream has been
+transferred (or skipped).
+
+Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
+\fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_WILDCARDMATCH "(3), " CURLOPT_CHUNK_BGN_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
new file mode 100644
index 0000000..b8af353
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CLOSESOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the closesocket callback set with
+\fICURLOPT_CLOSESOCKETFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All except file:
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CLOSESOCKETFUNCTION "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
new file mode 100644
index 0000000..2594b16
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CLOSESOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int closesocket_callback(void *clientp, curl_socket_t item);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETFUNCTION, closesocket_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl instead of the \fIclose(3)\fP or
+\fIclosesocket(3)\fP call when sockets are closed (not for any other file
+descriptors). This is pretty much the reverse to the
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP option. Return 0 to signal success and 1
+if there was an error.
+
+The \fIclientp\fP pointer is set with
+\fICURLOPT_CLOSESOCKETDATA(3)\fP. \fIitem\fP is the socket libcurl wants to be
+closed.
+.SH DEFAULT
+By default libcurl uses the standard socket close function.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CLOSESOCKETDATA "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
new file mode 100644
index 0000000..7f28e63
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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.
+.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_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
new file mode 100644
index 0000000..d81118e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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.
+.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, 10000L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3 b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
new file mode 100644
index 0000000..afb3cfd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CONNECT_ONLY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONNECT_ONLY \- stop when connected to target server
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_ONLY, long only);
+.SH DESCRIPTION
+Pass a long. If the parameter equals 1, it tells the library to perform all
+the required proxy authentication and connection setup, but no data transfer,
+and then return.
+
+The option can be used to simply test a connection to a server, but is more
+useful when used with the \fICURLINFO_LASTSOCKET\fP option to
+\fIcurl_easy_getinfo(3)\fP as the library can set up the connection and then
+the application can obtain the most recently used socket for special data
+transfers.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, SMTP, POP3 and IMAP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
new file mode 100644
index 0000000..ebc4d77
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CONV_FROM_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_FROM_NETWORK_FUNCTION\fP converts to host encoding from the
+network encoding. It is used when commands or ASCII data are received over
+the network.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP, SMTP, IMAP, POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), " CURLOPT_CONV_FROM_UTF8_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
new file mode 100644
index 0000000..682e1c5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CONV_FROM_UTF8_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_UTF8_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_FROM_UTF8_FUNCTION\fP converts to host encoding from UTF8
+encoding. It is required only for SSL processing.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+TLS-based protocols.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), " CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
new file mode 100644
index 0000000..e8817f8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CONV_TO_NETWORK_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode conv_callback(char *ptr, size_t length);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_TO_NETWORK_FUNCTION,
+ conv_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+Applies to non-ASCII platforms. \fIcurl_version_info(3)\fP will return the
+CURL_VERSION_CONV feature bit set if this option is provided.
+
+The data to be converted is in a buffer pointed to by the \fIptr\fP parameter.
+The amount of data to convert is indicated by the \fIlength\fP parameter. The
+converted data overlays the input data in the buffer pointed to by the ptr
+parameter. \fICURLE_OK\fP must be returned upon successful conversion. A
+CURLcode return value defined by curl.h, such as \fICURLE_CONV_FAILED\fP,
+should be returned if an error was encountered.
+
+\fBCURLOPT_CONV_TO_NETWORK_FUNCTION\fP converts from host encoding to the
+network encoding. It is used when commands or ASCII data are sent over the
+network.
+
+If you set a callback pointer to NULL, or don't set it at all, the built-in
+libcurl iconv functions will be used. If HAVE_ICONV was not defined when
+libcurl was built, and no callback has been established, conversion will
+return the CURLE_CONV_REQD error code.
+
+If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
+For example:
+
+ \&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
+
+The iconv code in libcurl will default the network and UTF8 codeset names as
+follows:
+
+ \&#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
+
+ \&#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
+
+You will need to override these definitions if they are different on your
+system.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP, SMTP, IMAP, POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Available only if \fBCURL_DOES_CONVERSIONS\fP was defined when libcurl was built.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), " CURLOPT_CONV_TO_UTF8_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIE.3 b/docs/libcurl/opts/CURLOPT_COOKIE.3
new file mode 100644
index 0000000..a390135
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIE.3
@@ -0,0 +1,80 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_COOKIE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIE \- set contents of HTTP Cookie header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set a cookie in the HTTP request. The format of the string should be
+NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
+should contain.
+
+If you need to set multiple cookies, set them all using a single option
+concatenated like this: "name1=content1; name2=content2;" etc.
+
+This option sets the cookie header explicitly in the outgoing request(s). If
+multiple requests are done due to authentication, followed redirections or
+similar, they will all get this cookie passed on.
+
+The cookies set by this option are separate from the internal cookie storage
+held by the cookie engine and will not be modified by it. If you enable the
+cookie engine and either you've imported a cookie of the same name (e.g. 'foo')
+or the server has set one, it will have no effect on the cookies you set here.
+A request to the server will send both the 'foo' held by the cookie engine and
+the 'foo' held by this option. To set a cookie that is instead held by the
+cookie engine and can be modified by the server use
+\fICURLOPT_COOKIELIST(3)\fP.
+
+Using this option multiple times will only make the latest string override the
+previous ones.
+
+This option will not enable the cookie engine. Use \fICURLOPT_COOKIEFILE(3)\fP
+or \fICURLOPT_COOKIEJAR(3)\fP to enable parsing and sending cookies
+automatically.
+.SH DEFAULT
+NULL, no cookies
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_COOKIE, "tool=curl; fun=yes;");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If HTTP is enabled
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIELIST "(3), "
+.BR CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEFILE.3 b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
new file mode 100644
index 0000000..a4c3b02
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIEFILE.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_COOKIEFILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIEFILE \- file name to read cookies from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEFILE, char *filename);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It should point to
+the file name of your file holding cookie data to read. The cookie data can be
+in either the old Netscape / Mozilla cookie data format or just regular
+HTTP-style headers dumped to a file.
+
+It also enables the cookie engine, making libcurl parse and send cookies on
+subsequent requests with this handle.
+
+Given an empty or non-existing file or by passing the empty string ("") to
+this option, you can enable the cookie engine without reading any initial
+cookies.
+
+This option only \fBreads\fP cookies. To make libcurl write cookies to file,
+see \fICURLOPT_COOKIEJAR(3)\fP.
+
+If you use this option multiple times, you just add more files to read.
+Subsequent files will add more cookies.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+As long as HTTP is supported
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIE "(3), " CURLOPT_COOKIEJAR "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIEJAR.3 b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
new file mode 100644
index 0000000..936d4d8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIEJAR.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_COOKIEJAR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIEJAR \- file name to store cookies to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEJAR, char *filename);
+.SH DESCRIPTION
+Pass a \fIfilename\fP as char *, zero terminated. This will make libcurl write
+all internally known cookies to the specified file when
+\fIcurl_easy_cleanup(3)\fP is called. If no cookies are known, no file will be
+created. Specify "-" as filename to instead have the cookies written to
+stdout. Using this option also enables cookies for this session, so if you for
+example follow a location it will make matching cookies get sent accordingly.
+
+Note that libcurl doesn't read any cookies from the cookie jar. If you want to
+read cookies from a file, use \fICURLOPT_COOKIEFILE(3)\fP.
+
+If the cookie jar file can't be created or written to (when the
+\fIcurl_easy_cleanup(3)\fP is called), libcurl will not and cannot report an
+error for this. Using \fICURLOPT_VERBOSE(3)\fP or
+\fICURLOPT_DEBUGFUNCTION(3)\fP will get a warning to display, but that is the
+only visible feedback you get about this possibly lethal situation.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), " CURLOPT_COOKIELIST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
new file mode 100644
index 0000000..937c79d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
@@ -0,0 +1,120 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_COOKIELIST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIELIST,
+ char *cookie);
+.SH DESCRIPTION
+Pass a char * to a \fIcookie\fP string.
+
+Such a cookie can be either a single line in Netscape / Mozilla format or just
+regular HTTP-style header (Set-Cookie: ...) format. This will also enable the
+cookie engine. This adds that single cookie to the internal cookie store.
+
+If you use the Set-Cookie format and don't specify a domain then the cookie
+is sent for any domain and will not be modified. If a server sets a cookie of
+the same name (or maybe you've imported one) then both will be sent on a future
+transfer to that server, likely not what you intended. Either set a domain in
+Set-Cookie (doing that will include sub domains) or use the Netscape format as
+shown in EXAMPLE.
+
+Starting in 7.43.0 the aforementioned any-domain cookies will not appear in the
+lists exported by \fICURLINFO_COOKIELIST(3)\fP and \fICURLOPT_COOKIEJAR(3)\fP.
+
+Additionally, there are commands available that perform actions if you pass in
+these exact strings:
+.IP ALL
+erases all cookies held in memory
+
+.IP SESS
+erases all session cookies held in memory
+
+.IP FLUSH
+writes all known cookies to the file specified by \fICURLOPT_COOKIEJAR(3)\fP
+
+.IP RELOAD
+loads all cookies from the files specified by \fICURLOPT_COOKIEFILE(3)\fP
+
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+/* This example shows an inline import of a cookie in Netscape format.
+You can set the cookie as HttpOnly to prevent XSS attacks by prepending
+#HttpOnly_ to the hostname. That may be useful if the cookie will later
+be imported by a browser.
+*/
+
+#define SEP "\\t" /* Tab separates the fields */
+
+char *my_cookie =
+ "example.com" /* Hostname */
+ SEP "FALSE" /* Include subdomains */
+ SEP "/" /* Path */
+ SEP "FALSE" /* Secure */
+ SEP "0" /* Expiry in epoch time format. 0 == Session */
+ SEP "foo" /* Name */
+ SEP "bar"; /* Value */
+
+/* my_cookie is imported immediately via CURLOPT_COOKIELIST.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIELIST, my_cookie);
+
+/* The list of cookies in cookies.txt will not be imported until right
+before a transfer is performed. Cookies in the list that have the same
+hostname, path and name as in my_cookie are skipped. That is because
+libcurl has already imported my_cookie and it's considered a "live"
+cookie. A live cookie won't be replaced by one read from a file.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt"); /* import */
+
+/* Cookies are exported after curl_easy_cleanup is called. The server
+may have added, deleted or modified cookies by then. The cookies that
+were skipped on import are not exported.
+*/
+curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt"); /* export */
+
+res = curl_easy_perform(curl); /* cookies imported from cookies.txt */
+
+curl_easy_cleanup(curl); /* cookies exported to cookies.txt */
+.fi
+.SH AVAILABILITY
+ALL was added in 7.14.1
+
+SESS was added in 7.15.4
+
+FLUSH was added in 7.17.1
+
+RELOAD was added in 7.39.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIEJAR "(3), " CURLOPT_COOKIE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COOKIESESSION.3 b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
new file mode 100644
index 0000000..0d56076
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COOKIESESSION.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_COOKIESESSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COOKIESESSION \- start a new cookie session
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init);
+.SH DESCRIPTION
+Pass a long set to 1 to mark this as a new cookie "session". It will force
+libcurl to ignore all cookies it is about to load that are "session cookies"
+from the previous session. By default, libcurl always stores and loads all
+cookies, independent if they are session cookies or not. Session cookies are
+cookies without expiry date and they are meant to be alive and existing for
+this "session" only.
+
+A "session" is usually defined in browser land for as long as you have your
+browser up, more or less.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIEFILE "(3), " CURLOPT_COOKIE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
new file mode 100644
index 0000000..d35aebd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_COPYPOSTFIELDS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COPYPOSTFIELDS, char *data);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be the full \fIdata\fP to post in a
+HTTP POST operation. It behaves as the \fICURLOPT_POSTFIELDS(3)\fP option, but
+the original data is instead copied by the library, allowing the application
+to overwrite the original data after setting this option.
+
+Because data are copied, care must be taken when using this option in
+conjunction with \fICURLOPT_POSTFIELDSIZE(3)\fP or
+\fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP: If the size has not been set prior to
+\fICURLOPT_COPYPOSTFIELDS(3)\fP, the data is assumed to be a zero terminated
+string; else the stored size informs the library about the byte count to
+copy. In any case, the size must not be changed after
+\fICURLOPT_COPYPOSTFIELDS(3)\fP, unless another \fICURLOPT_POSTFIELDS(3)\fP or
+\fICURLOPT_COPYPOSTFIELDS(3)\fP option is issued.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ char local_buffer[1024]="data to send";
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* size of the data to copy from the buffer and send in the request */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 12L);
+
+ /* send data from the local stack */
+ curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, local_buffer);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.17.1
+.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_POSTFIELDS "(3), " CURLOPT_POSTFIELDSIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CRLF.3 b/docs/libcurl/opts/CURLOPT_CRLF.3
new file mode 100644
index 0000000..32d8b79
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CRLF.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CRLF 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CRLF \- enable/disable CRLF conversion
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
+.SH DESCRIPTION
+Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
+CRLF newlines on transfers. Disable this option again by setting the value to
+0 (zero).
+
+This is a legacy option of questionable use.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+SMTP since 7.40.0, other protocols since they were introduced
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_CONV_FROM_NETWORK_FUNCTION "(3), " CURLOPT_CONV_TO_NETWORK_FUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CRLFILE.3 b/docs/libcurl/opts/CURLOPT_CRLFILE.3
new file mode 100644
index 0000000..adc0e99
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CRLFILE.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CRLFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CRLFILE \- specify a Certificate Revocation List file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLFILE, char *file);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a \fIfile\fP with the
+concatenation of CRL (in PEM format) to use in the certificate validation that
+occurs during the SSL exchange.
+
+When curl is built to use NSS or GnuTLS, there is no way to influence the use
+of CRL passed to help in the verification process. When libcurl is built with
+OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both
+set, requiring CRL check against all the elements of the certificate chain if
+a CRL file is passed.
+
+This option makes sense only when used in combination with the
+\fICURLOPT_SSL_VERIFYPEER(3)\fP option.
+
+A specific error code (\fICURLE_SSL_CRL_BADFILE\fP) is defined with the
+option. It is returned when the SSL exchange fails because the CRL file cannot
+be loaded. A failure in certificate verification due to a revocation
+information found in the CRL does not trigger this specific error.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3 b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
new file mode 100644
index 0000000..fd33118
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3
@@ -0,0 +1,95 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_CUSTOMREQUEST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_CUSTOMREQUEST \- custom string for request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CUSTOMREQUEST, char *request);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter.
+
+When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST(3)\fP
+to something, you don't actually change how libcurl behaves or acts in regards
+to the particular request method, it will only change the actual string sent
+in the request.
+
+Restore to the internal default by setting this to NULL.
+
+This option can be used to specify the request:
+.IP HTTP
+Instead of GET or HEAD when performing HTTP based requests. This is
+particularly useful, for example, for performing a HTTP DELETE request.
+
+For example:
+
+When you tell libcurl to do a HEAD request, but then specify a GET though a
+custom request libcurl will still act as if it sent a HEAD. To switch to a
+proper HEAD use \fICURLOPT_NOBODY(3)\fP, to switch to a proper POST use
+\fICURLOPT_POST(3)\fP or \fICURLOPT_POSTFIELDS(3)\fP and to switch to a proper
+GET use \fICURLOPT_HTTPGET(3)\fP.
+
+Many people have wrongly used this option to replace the entire request with
+their own, including multiple headers and POST contents. While that might work
+in many cases, it will cause libcurl to send invalid requests and it could
+possibly confuse the remote server badly. Use \fICURLOPT_POST(3)\fP and
+\fICURLOPT_POSTFIELDS(3)\fP to set POST data. Use \fICURLOPT_HTTPHEADER(3)\fP
+to replace or extend the set of headers sent by libcurl. Use
+\fICURLOPT_HTTP_VERSION(3)\fP to change HTTP version.
+
+.IP FTP
+Instead of LIST and NLST when performing FTP directory listings.
+.IP IMAP
+Instead of LIST when issuing IMAP based requests.
+.IP POP3
+Instead of LIST and RETR when issuing POP3 based requests.
+
+For example:
+
+When you tell libcurl to use a custom request it will behave like a LIST or
+RETR command was sent where it expects data to be returned by the server. As
+such \fICURLOPT_NOBODY(3)\fP should be used when specifying commands such as
+DELE and NOOP for example.
+.IP SMTP
+Instead of a HELP or VRFY when issuing SMTP based requests.
+
+For example:
+
+Normally a multiline response is returned which can be used, in conjunction
+with \fICURLOPT_MAIL_RCPT(3)\fP, to specify an EXPN request. If the
+\fICURLOPT_NOBODY(3)\fP option is specified then the request can be used to
+issue NOOP and RSET commands.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP, FTP, IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+IMAP is supported since 7.30.0, POP3 since 7.26.0 and SMTP since 7.34.0.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_NOBODY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGDATA.3 b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
new file mode 100644
index 0000000..ebdb0c5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DEBUGDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DEBUGDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DEBUGDATA \- custom pointer for debug callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP to whatever you want passed in to your
+\fICURLOPT_DEBUGFUNCTION(3)\fP in the last void * argument. This pointer is
+not used by libcurl, it is only passed to the callback.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/debug.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3 b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
new file mode 100644
index 0000000..6c4721b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3
@@ -0,0 +1,184 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DEBUGFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DEBUGFUNCTION \- debug callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLINFO_TEXT = 0,
+ CURLINFO_HEADER_IN, /* 1 */
+ CURLINFO_HEADER_OUT, /* 2 */
+ CURLINFO_DATA_IN, /* 3 */
+ CURLINFO_DATA_OUT, /* 4 */
+ CURLINFO_SSL_DATA_IN, /* 5 */
+ CURLINFO_SSL_DATA_OUT, /* 6 */
+ CURLINFO_END
+} curl_infotype;
+
+int debug_callback(CURL *handle,
+ curl_infotype type,
+ char *data,
+ size_t size,
+ void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGFUNCTION,
+ debug_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+\fICURLOPT_DEBUGFUNCTION(3)\fP replaces the standard debug function used when
+\fICURLOPT_VERBOSE(3)\fP is in effect. This callback receives debug
+information, as specified in the \fItype\fP argument. This function must
+return 0. The \fIdata\fP pointed to by the char * passed to this function WILL
+NOT be zero terminated, but will be exactly of the \fIsize\fP as told by the
+\fIsize\fP argument.
+
+The \fIuserptr\fP argument is the pointer set with \fICURLOPT_DEBUGDATA(3)\fP.
+
+Available curl_infotype values:
+.IP CURLINFO_TEXT
+The data is informational text.
+.IP CURLINFO_HEADER_IN
+The data is header (or header-like) data received from the peer.
+.IP CURLINFO_HEADER_OUT
+The data is header (or header-like) data sent to the peer.
+.IP CURLINFO_DATA_IN
+The data is protocol data received from the peer.
+.IP CURLINFO_DATA_OUT
+The data is protocol data sent to the peer.
+.IP CURLINFO_SSL_DATA_OUT
+The data is SSL/TLS (binary) data sent to the peer.
+.IP CURLINFO_SSL_DATA_IN
+The data is SSL/TLS (binary) data received from the peer.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+static
+void dump(const char *text,
+ FILE *stream, unsigned char *ptr, size_t size)
+{
+ size_t i;
+ size_t c;
+ unsigned int width=0x10;
+
+ fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
+ text, (long)size, (long)size);
+
+ for(i=0; i<size; i+= width) {
+ fprintf(stream, "%4.4lx: ", (long)i);
+
+ /* show hex to the left */
+ for(c = 0; c < width; c++) {
+ if(i+c < size)
+ fprintf(stream, "%02x ", ptr[i+c]);
+ else
+ fputs(" ", stream);
+ }
+
+ /* show data on the right */
+ for(c = 0; (c < width) && (i+c < size); c++)
+ fputc(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.', stream);
+
+ fputc('\n', stream); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+ (void)handle; /* prevent compiler warning */
+
+ switch (type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== Info: %s", data);
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, stderr, (unsigned char *)data, size);
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_DEBUGDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3 b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
new file mode 100644
index 0000000..a81f907
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DIRLISTONLY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DIRLISTONLY \- ask for names only in a directory listing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DIRLISTONLY, long listonly);
+.SH DESCRIPTION
+For FTP and SFTP based URLs a parameter set to 1 tells the library to list the
+names of files in a directory, rather than performing a full directory listing
+that would normally include file sizes, dates etc.
+
+For POP3 a parameter of 1 tells the library to list the email message or
+messages on the POP3 server. This can be used to change the default behaviour
+of libcurl, when combined with a URL that contains a message ID, to perform a
+"scan listing" which can then be used to determine the size of an email.
+
+Note: For FTP this causes a NLST command to be sent to the FTP server. Beware
+that some FTP servers list only files in their response to NLST; they might not
+include subdirectories and symbolic links.
+
+Setting this option to 1 also implies a directory listing even if the URL
+doesn't end with a slash, which otherwise is necessary.
+
+Do NOT use this option if you also use \fICURLOPT_WILDCARDMATCH(3)\fP as it
+will effectively break that feature then.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP, SFTP and POP3
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_FTPLISTONLY up to 7.16.4. POP3 is supported
+since 7.21.5.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CUSTOMREQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
new file mode 100644
index 0000000..9332780
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_CACHE_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_CACHE_TIMEOUT, long age);
+.SH DESCRIPTION
+Pass a long, this sets the timeout in seconds. Name resolves will be kept in
+memory and used for this number of seconds. Set to zero to completely disable
+caching, or set to -1 to make the cached entries remain forever. By default,
+libcurl caches this info for 60 seconds.
+
+The name resolve functions of various libc implementations don't re-read name
+server information unless explicitly told so (for example, by calling
+\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
+if DHCP has updated the server info, and this may look like a DNS cache issue
+to the casual libcurl-app user.
+
+Note that DNS entries have a "TTL" property but libcurl doesn't use that. This
+DNS cache timeout is entirely speculative that a name will resolve to the same
+address for a certain small amount of time into the future.
+.SH DEFAULT
+60
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_USE_GLOBAL_CACHE "(3), " CURLOPT_DNS_SERVERS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
new file mode 100644
index 0000000..c33d791
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_INTERFACE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_INTERFACE \- set interface to speak DNS over
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_INTERFACE, char *ifname);
+.SH DESCRIPTION
+Pass a char * as parameter. Set the name of the network interface that the DNS
+resolver should bind to. This must be an interface name (not an address). Set
+this option to NULL to use the default setting (don't bind to a specific
+interface).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.33.0. This option also requires that libcurl was built with a
+resolver backend that supports this operation. The c-ares backend is the only
+such one.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+or CURLE_NOT_BUILT_IN if support was disabled at compile-time.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_SERVERS "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
new file mode 100644
index 0000000..f5db645
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_LOCAL_IP4 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP4, char *address);
+.SH DESCRIPTION
+Set the local IPv4 \fIaddress\fP that the resolver should bind to. The
+argument should be of type char * and contain a single numerical IPv4 address
+as a string. Set this option to NULL to use the default setting (don't bind
+to a specific IP address).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
+CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3 b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
new file mode 100644
index 0000000..56865bb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_LOCAL_IP6 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);
+.SH DESCRIPTION
+Set the local IPv6 \fIaddress\fP that the resolver should bind to. The
+argument should be of type char * and contain a single IPv6 address as a
+string. Set this option to NULL to use the default setting (don't bind to a
+specific IP address).
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
+CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3 b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
new file mode 100644
index 0000000..9f51788
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_SERVERS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_SERVERS \- set preferred DNS servers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SERVERS, char *servers);
+.SH DESCRIPTION
+Pass a char * that is the list of DNS servers to be used instead of the system
+default. The format of the dns servers option is:
+
+host[:port][,host[:port]]...
+
+For example:
+
+192.168.1.100,192.168.1.101,3.4.5.6
+.SH DEFAULT
+NULL - use system default
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time,
+CURLE_BAD_FUNCTION_ARGUMENT when given an invalid server list, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_LOCAL_IP4 "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3 b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
new file mode 100644
index 0000000..db53c0b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_DNS_USE_GLOBAL_CACHE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE,
+ long enable);
+.SH DESCRIPTION
+Pass a long. If the \fIenable\fP value is 1, it tells curl to use a global DNS
+cache that will survive between easy handle creations and deletions. This is
+not thread-safe and this will use a global variable.
+
+\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
+to using the share interface instead! See \fICURLOPT_SHARE(3)\fP and
+\fIcurl_share_init(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Subject for removal in the future. Do not use!
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SHARE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_EGDSOCKET.3 b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
new file mode 100644
index 0000000..2e72ecc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_EGDSOCKET.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_EGDSOCKET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_EGDSOCKET \- set EGD socket path
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
+.SH DESCRIPTION
+Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
+socket. It will be used to seed the random engine for SSL.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled. Only the OpenSSL and GnuTLS backends will use this.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RANDOM_FILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3 b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
new file mode 100644
index 0000000..577202c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_ERRORBUFFER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ERRORBUFFER \- set error buffer for error messages
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ERRORBUFFER, char *buf);
+.SH DESCRIPTION
+Pass a char * to a buffer that the libcurl may store human readable error
+messages in on failures or problems. This may be more helpful than just the
+return code from \fIcurl_easy_perform(3)\fP and related functions. The buffer
+\fBmust be at least CURL_ERROR_SIZE bytes big\fP.
+
+You must keep the associated buffer available until libcurl no longer needs
+it. Failing to do so will cause very odd behavior or even crashes. libcurl
+will need it until you call \fIcurl_easy_cleanup(3)\fP or you set the same
+option again to use a different pointer.
+
+Consider \fICURLOPT_VERBOSE(3)\fP and \fICURLOPT_DEBUGFUNCTION(3)\fP to better
+debug and trace why errors happen.
+
+If the library does not return an error, the buffer may not have been
+touched. Do not rely on the contents in those cases.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ char error[CURL_ERROR_SIZE]
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* provide a buffer to store errors in */
+ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_DEBUGFUNCTION "(3), " CURLOPT_VERBOSE "(3), "
+.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), "
+.BR curl_share_strerror "(3) "
diff --git a/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
new file mode 100644
index 0000000..81f4571
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_EXPECT_100_TIMEOUT_MS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS,
+ long milliseconds);
+.SH DESCRIPTION
+Pass a long to tell libcurl the number of \fImilliseconds\fP to wait for a
+server response with the HTTP status 100 (Continue), 417 (Expectation Failed)
+or similar after sending a HTTP request containing an Expect: 100-continue
+header. If this times out before a response is received, the request body is
+sent anyway.
+.SH DEFAULT
+1000 milliseconds
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POST "(3), " CURLOPT_HTTPPOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FAILONERROR.3 b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
new file mode 100644
index 0000000..a8267fd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FAILONERROR.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FAILONERROR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FAILONERROR \- request failure on HTTP response >= 400
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);
+.SH DESCRIPTION
+A long parameter set to 1 tells the library to fail the request if the HTTP
+code returned is equal to or larger than 400. The default action would be to
+return the page normally, ignoring that code.
+
+This method is not fail-safe and there are occasions where non-successful
+response codes will slip through, especially when authentication is involved
+(response codes 401 and 407).
+
+You might get some amounts of headers transferred before this situation is
+detected, like when a "100-continue" is received as a response to a POST/PUT
+and a 401 or 407 is received immediately afterwards.
+.SH DEFAULT
+0, do not fail on error
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP200ALIASES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FILETIME.3 b/docs/libcurl/opts/CURLOPT_FILETIME.3
new file mode 100644
index 0000000..7c57aff
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FILETIME.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FILETIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FILETIME \- get the modification time of the remote resource
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime);
+.SH DESCRIPTION
+Pass a long. If it is 1, libcurl will attempt to get the modification time of
+the remote document in this operation. This requires that the remote server
+sends the time or replies to a time querying command. The
+\fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument
+can be used after a transfer to extract the received time (if any).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, FTP, SFTP, FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR curl_easy_getinfo "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
new file mode 100644
index 0000000..a0466fe
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FNMATCH_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_DATA,
+ void *pointer);
+.SH DESCRIPTION
+Pass a pointer that will be untouched by libcurl and passed as the ptr
+argument to the \fICURL_FNMATCH_FUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_FUNCTION "(3), " CURLOPT_WILDCARDMATCH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
new file mode 100644
index 0000000..fc119a9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FNMATCH_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+int fnmatch_callback(void *ptr,
+ const char *pattern,
+ const char *string);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FNMATCH_FUNCTION,
+ fnmatch_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback s used for wildcard matching.
+
+Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
+\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
+error occurred.
+.SH DEFAULT
+NULL == an internal function for wildcard matching.
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_DATA "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3 b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
new file mode 100644
index 0000000..3a32cae
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FOLLOWLOCATION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to follow any Location: header that the
+server sends as part of a HTTP header in a 3xx response.
+
+This means that libcurl will re-send the same request on the new location and
+follow new Location: headers all the way until no more such headers are
+returned. \fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of
+redirects libcurl will follow.
+
+libcurl can limit to what protocols it will automatically follow. The accepted
+protocols are set with \fICURLOPT_REDIR_PROTOCOLS(3)\fP and it excludes the
+FILE protocol by default.
+
+For users who think the existing location following is too naive, too simple
+or just lacks features, it is very easy to instead implement your own redirect
+follow logic with the use of \fIcurl_easy_getinfo(3)\fP's
+\fICURLINFO_REDIRECT_URL\fP option instead of using
+\fICURLOPT_FOLLOWLOCATION(3)\fP.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), "
+.BR CURLOPT_POSTREDIR "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3 b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
new file mode 100644
index 0000000..c588ca5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FORBID_REUSE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FORBID_REUSE \- make connection get closed at once after use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FORBID_REUSE, long close);
+.SH DESCRIPTION
+Pass a long. Set \fIclose\fP to 1 to make libcurl explicitly close the
+connection when done with the transfer. Normally, libcurl keeps all
+connections alive when done with one transfer in case a succeeding one follows
+that can re-use them. This option should be used with caution and only if you
+understand what it does as it can seriously impact performance.
+
+Set to 0 to have libcurl keep the connection open for possible later re-use
+(default behavior).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FRESH_CONNECT "(3), " CURLOPT_MAXCONNECTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3 b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
new file mode 100644
index 0000000..1caaf61
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FRESH_CONNECT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FRESH_CONNECT \- force a new connection to be used
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FRESH_CONNECT, long fresh);
+.SH DESCRIPTION
+Pass a long. Set to 1 to make the next transfer use a new (fresh) connection
+by force instead of trying to re-use an existing one. This option should be
+used with caution and only if you understand what it does as it may seriously
+impact performance.
+
+Related functionality is \fICURLOPT_FORBID_REUSE(3)\fP which makes sure the
+connection is closed after use so that it won't be re-used.
+
+Set \fIfresh\fP to 0 to have libcurl attempt re-using an existing connection
+(default behavior).
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FORBID_REUSE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTPPORT.3 b/docs/libcurl/opts/CURLOPT_FTPPORT.3
new file mode 100644
index 0000000..fd87bb2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTPPORT.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FTPPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTPPORT \- make FTP transfer active
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPPORT, char *spec);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It specifies that the
+FTP transfer will be made actively and the given string will be used to get
+the IP address to use for the FTP PORT instruction.
+
+The PORT instruction tells the remote server to connect to our specified IP
+address. The string may be a plain IP address, a host name, a network
+interface name (under Unix) or just a '-' symbol to let the library use your
+system's default IP address. Default FTP operations are passive, and thus
+won't use PORT.
+
+The address can be followed by a ':' to specify a port, optionally followed by
+a '-' to specify a port range. If the port specified is 0, the operating
+system will pick a free port. If a range is provided and all ports in the
+range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the
+handle. Invalid port/range settings are ignored. IPv6 addresses followed by
+a port or portrange have to be in brackets. IPv6 addresses without port/range
+specifier can be in brackets.
+
+Examples with specified ports:
+
+.nf
+ eth0:0
+ 192.168.1.2:32000-33000
+ curl.se:32123
+ [::1]:1234-4567
+.fi
+
+You disable PORT again and go back to using the passive version by setting
+this option to NULL.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Port range support was added in 7.19.5
+.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_FTP_USE_EPRT "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3 b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
new file mode 100644
index 0000000..bfbea9c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_FTPSSLAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
+.SH DESCRIPTION
+Pass a long using one of the values from below, to alter how libcurl issues
+\&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated. This is only
+interesting if \fICURLOPT_USE_SSL(3)\fP is also set.
+
+Possible \fIorder\fP values:
+.IP CURLFTPAUTH_DEFAULT
+Allow libcurl to decide.
+.IP CURLFTPAUTH_SSL
+Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
+.IP CURLFTPAUTH_TLS
+Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
+.SH DEFAULT
+CURLFTPAUTH_DEFAULT
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_USE_SSL "(3), " CURLOPT_FTP_SSL_CCC "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3 b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
new file mode 100644
index 0000000..3c34247
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_ACCOUNT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_ACCOUNT \- set account info for FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string (or NULL to disable). When an FTP
+server asks for "account data" after user name and password has been provided,
+this data is sent off using the ACCT command.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.13.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3 b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
new file mode 100644
index 0000000..b51e4dd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER,
+ char *cmd);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to a string which will be used to
+authenticate if the usual FTP "USER user" and "PASS password" negotiation
+fails. This is currently only known to be required when connecting to
+Tumbleweed's Secure Transport FTPS server using client certificates for
+authentication.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.5
+.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_FTP_SKIP_PASV_IP "(3), " CURLOPT_FTP_RESPONSE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3 b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
new file mode 100644
index 0000000..a52863e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLFTP_CREATE_DIR_NONE,
+ CURLFTP_CREATE_DIR,
+ CURLFTP_CREATE_DIR_RETRY
+} curl_ftpcreatedir;
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_CREATE_MISSING_DIRS,
+ long create);
+.SH DESCRIPTION
+Pass a long telling libcurl to \fIcreate\fP the dir. If the value is
+\fICURLFTP_CREATE_DIR\fP (1), libcurl will attempt to create any remote
+directory that it fails to "move" into.
+
+For FTP requests, that means a CWD command fails. CWD being the command that
+changes working directory.
+
+For SFTP requests, libcurl will attempt to create the remote directory if it
+can't obtain a handle to the target-location. The creation will fail if a file
+of the same name as the directory to create already exists or lack of
+permissions prevents creation.
+
+Setting \fIcreate\fP to \fICURLFTP_CREATE_DIR_RETRY\fP (2), tells libcurl to
+retry the CWD command again if the subsequent MKD command fails. This is
+especially useful if you're doing many simultaneous connections against the
+same server and they all have this option enabled, as then CWD may first fail
+but then another connection does MKD before this connection and thus MKD fails
+but trying CWD works!
+.SH DEFAULT
+CURLFTP_CREATE_DIR_NONE (0)
+.SH PROTOCOLS
+FTP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.7. SFTP support added in 7.16.3. The retry option was added in
+7.19.4.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the
+create value is not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_FILEMETHOD "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3 b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
new file mode 100644
index 0000000..62396b9
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_FILEMETHOD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_FILEMETHOD,
+ long method);
+.SH DESCRIPTION
+Pass a long telling libcurl which \fImethod\fP to use to reach a file on a
+FTP(S) server.
+
+This option exists because some server implementations aren't compliant to
+what the standards say should work.
+
+The argument should be one of the following alternatives:
+.IP CURLFTPMETHOD_MULTICWD
+libcurl does a single CWD operation for each path part in the given URL. For
+deep hierarchies this means many commands. This is how RFC1738 says it should
+be done. This is the default but the slowest behavior.
+.IP CURLFTPMETHOD_NOCWD
+libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
+full path to the server for all these commands. This is the fastest behavior.
+.IP CURLFTPMETHOD_SINGLECWD
+libcurl does one CWD with the full target directory and then operates on the
+file \&"normally" (like in the multicwd case). This is somewhat more standards
+compliant than 'nocwd' but without the full penalty of 'multicwd'.
+.SH DEFAULT
+CURLFTPMETHOD_MULTICWD
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTPLISTONLY "(3), " CURLOPT_FTP_SKIP_PASV_IP "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
new file mode 100644
index 0000000..18dbc2f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long. Causes libcurl to set a \fItimeout\fP period (in seconds) on the
+amount of time that the server is allowed to take in order to send a response
+message for a command before the session is considered dead. While libcurl is
+waiting for a response, this value overrides \fICURLOPT_TIMEOUT(3)\fP. It is
+recommended that if used in conjunction with \fICURLOPT_TIMEOUT(3)\fP, you set
+\fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP to a value smaller than
+\fICURLOPT_TIMEOUT(3)\fP.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.8
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), " CURLOPT_CONNECTTIMEOUT "(3), "
+.BR CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
new file mode 100644
index 0000000..b1803fd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_SKIP_PASV_IP 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SKIP_PASV_IP, long skip);
+.SH DESCRIPTION
+Pass a long. If \fIskip\fP is set to 1, it instructs libcurl to not use the IP
+address the server suggests in its 227-response to libcurl's PASV command when
+libcurl connects the data connection. Instead libcurl will re-use the same IP
+address it already uses for the control connection. But it will use the port
+number from the 227-response.
+
+This option thus allows libcurl to work around broken server installations
+that due to NATs, firewalls or incompetence report the wrong IP address back.
+
+This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.14.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTPPORT "(3), " CURLOPT_FTP_USE_EPRT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3 b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
new file mode 100644
index 0000000..5391285
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_SSL_CCC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,
+ long how);
+.SH DESCRIPTION
+If enabled, this option makes libcurl use CCC (Clear Command Channel). It
+shuts down the SSL/TLS layer after authenticating. The rest of the control
+channel communication will be unencrypted. This allows NAT routers to follow
+the FTP transaction. Pass a long using one of the values below
+.IP CURLFTPSSL_CCC_NONE
+Don't attempt to use CCC.
+.IP CURLFTPSSL_CCC_PASSIVE
+Do not initiate the shutdown, but wait for the server to do it. Do not send a
+reply.
+.IP CURLFTPSSL_CCC_ACTIVE
+Initiate the shutdown and wait for a reply.
+.SH DEFAULT
+CURLFTPSSL_CCC_NONE
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_USE_SSL "(3), " CURLOPT_FTPSSLAUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
new file mode 100644
index 0000000..d26af0c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_USE_EPRT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPRT, long enabled);
+.SH DESCRIPTION
+Pass a long. If the value is 1, it tells curl to use the EPRT command when
+doing active FTP downloads (which is enabled by
+\fICURLOPT_FTPPORT(3)\fP). Using EPRT means that it will first attempt to use
+EPRT before using PORT, but if you pass zero to this option, it will not try
+using EPRT, only plain PORT.
+
+If the server is an IPv6 host, this option will have no effect as EPRT is
+necessary then.
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.10.5
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_USE_EPSV "(3), " CURLOPT_FTPPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
new file mode 100644
index 0000000..172985a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_USE_EPSV 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);
+.SH DESCRIPTION
+Pass \fIepsv\fP as a long. If the value is 1, it tells curl to use the EPSV
+command when doing passive FTP downloads (which it does by default). Using
+EPSV means that it will first attempt to use EPSV before using PASV, but if
+you pass zero to this option, it will not try using EPSV, only plain PASV.
+
+If the server is an IPv6 host, this option will have no effect as of 7.12.3.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with FTP
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FTP_USE_EPRT "(3), " CURLOPT_FTPPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3 b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
new file mode 100644
index 0000000..b20f3fb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_FTP_USE_PRET 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_FTP_USE_PRET \- enable the PRET command
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_PRET, long enable);
+.SH DESCRIPTION
+Pass a long. If the value is 1, it tells curl to send a PRET command before
+PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard
+command for directory listings as well as up and downloads in PASV mode. Has
+no effect when using the active FTP transfers mode.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.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_FTP_USE_EPRT "(3), " CURLOPT_FTP_USE_EPSV "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3 b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
new file mode 100644
index 0000000..13f3cec
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_GSSAPI_DELEGATION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);
+.SH DESCRIPTION
+Set the long parameter \fIlevel\fP to CURLGSSAPI_DELEGATION_FLAG to allow
+unconditional GSSAPI credential delegation. The delegation is disabled by
+default since 7.21.7. Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG
+to delegate only if the OK-AS-DELEGATE flag is set in the service ticket in
+case this feature is supported by the GSS-API implementation and the definition
+of GSS_C_DELEG_POLICY_FLAG was available at compile-time.
+.SH DEFAULT
+CURLGSSAPI_DELEGATION_NONE
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.22.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADER.3 b/docs/libcurl/opts/CURLOPT_HEADER.3
new file mode 100644
index 0000000..f5a4be8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADER.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_HEADER 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADER \- pass headers to the data stream
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff);
+.SH DESCRIPTION
+Pass in \fIonoff\fP set to 1 to tell the library to include the header in the
+body output for requests with this \fIhandle\fP. This option is relevant for
+protocols that actually have headers or other meta-data (like HTTP and FTP).
+
+When asking to get the header info passed to the same callback as the body, it
+is not possible to accurately separate them again without detailed knowledge
+about the protocol in use.
+
+It is often better to use \fICURLOPT_HEADERFUNCTION(3)\fP to get the header
+data separately.
+
+While named confusingly similar, \fICURLOPT_HTTPHEADER(3)\fP is used to set
+custom HTTP headers!
+.SH DEFAULT
+0
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERFUNCTION "(3), "
+.BR CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADERDATA.3 b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
new file mode 100644
index 0000000..c0a45f2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADERDATA.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HEADERDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADERDATA \- pointer to pass to header callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP to be used to write the header part of the received data
+to.
+
+If \fICURLOPT_WRITEFUNCTION(3)\fP or \fICURLOPT_HEADERFUNCTION(3)\fP is used,
+\fIpointer\fP will be passed in to the respective callback.
+
+If neither of those options are set, \fIpointer\fP must be a valid FILE * and
+it will be used by a plain fwrite() to write headers to.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERFUNCTION "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3 b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
new file mode 100644
index 0000000..f8ed0ab
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3
@@ -0,0 +1,106 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_HEADERFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADERFUNCTION \- callback that receives header data
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+size_t header_callback(char *buffer,
+ size_t size,
+ size_t nitems,
+ void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERFUNCTION, header_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl as soon as it has received header
+data. The header callback will be called once for each header and only
+complete header lines are passed on to the callback. Parsing headers is very
+easy using this. The size of the data pointed to by \fIbuffer\fP is \fIsize\fP
+multiplied with \fInmemb\fP. Do not assume that the header line is zero
+terminated! The pointer named \fIuserdata\fP is the one you set with the
+\fICURLOPT_HEADERDATA(3)\fP option. This callback function must return the
+number of bytes actually taken care of. If that amount differs from the amount
+passed in to your function, it'll signal an error to the library. This will
+cause the transfer to get aborted and the libcurl function in progress will
+return \fICURLE_WRITE_ERROR\fP.
+
+A complete HTTP header that is passed to this function can be up to
+\fICURL_MAX_HTTP_HEADER\fP (100K) bytes.
+
+If this option is not set, or if it is set to NULL, but
+\fICURLOPT_HEADERDATA(3)\fP is set to anything but NULL, the function used to
+accept response data will be used instead. That is, it will be the function
+specified with \fICURLOPT_WRITEFUNCTION(3)\fP, or if it is not specified or
+NULL - the default, stream-writing function.
+
+It's important to note that the callback will be invoked for the headers of
+all responses received after initiating a request and not just the final
+response. This includes all responses which occur during authentication
+negotiation. If you need to operate on only the headers from the final
+response, you will need to collect headers in the callback yourself and use
+HTTP status lines, for example, to delimit response boundaries.
+
+When a server sends a chunked encoded transfer, it may contain a trailer. That
+trailer is identical to a HTTP header and if such a trailer is received it is
+passed to the application using this callback as well. There are several ways
+to detect it being a trailer and not an ordinary header: 1) it comes after the
+response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
+header among the regular response-headers mention what header(s) to expect in
+the trailer.
+
+For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get
+called with the server responses to the commands that libcurl sends.
+.SH DEFAULT
+Nothing.
+.SH PROTOCOLS
+Used for all protocols with headers or meta-data concept: HTTP, FTP, POP3,
+IMAP, SMTP and more.
+.SH EXAMPLE
+.nf
+static size_t header_callback(char *buffer, size_t size,
+ size_t nitems, void *userdata)
+{
+ /* received header is nitems * size long in 'buffer' NOT ZERO TERMINATED */
+ /* 'userdata' is set with CURLOPT_WRITEDATA */
+ return nitems * size;
+}
+
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HEADERDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HEADEROPT.3 b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
new file mode 100644
index 0000000..7776b92
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HEADEROPT.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_HEADEROPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HEADEROPT \- set how to send HTTP headers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask);
+.SH DESCRIPTION
+Pass a long that is a bitmask of options of how to deal with headers. The two
+mutually exclusive options are:
+
+\fBCURLHEADER_UNIFIED\fP - the headers specified in
+\fICURLOPT_HTTPHEADER(3)\fP will be used in requests both to servers and
+proxies. With this option enabled, \fICURLOPT_PROXYHEADER(3)\fP will not have
+any effect.
+
+\fBCURLHEADER_SEPARATE\fP - makes \fICURLOPT_HTTPHEADER(3)\fP headers only get
+sent to a server and not to a proxy. Proxy headers must be set with
+\fICURLOPT_PROXYHEADER(3)\fP to get used. Note that if a non-CONNECT request
+is sent to a proxy, libcurl will send both server headers and proxy
+headers. When doing CONNECT, libcurl will send \fICURLOPT_PROXYHEADER(3)\fP
+headers only to the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to
+the server.
+.SH DEFAULT
+CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then)
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.37.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_PROXYHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3 b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
new file mode 100644
index 0000000..b87db46
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HTTP200ALIASES 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP200ALIASES,
+ struct curl_slist *aliases);
+.SH DESCRIPTION
+Pass a pointer to a linked list of \fIaliases\fP to be treated as valid HTTP
+200 responses. Some servers respond with a custom header response line. For
+example, SHOUTcast servers respond with "ICY 200 OK". Also some very old
+Icecast 1.3.x servers will respond like that for certain user agent headers or
+in absence of such. By including this string in your list of aliases,
+the response will be treated as a valid HTTP header line such as
+"HTTP/1.0 200 OK".
+
+The linked list should be a fully valid list of struct curl_slist structs, and
+be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
+\fIcurl_slist_free_all(3)\fP to clean up an entire list.
+
+The alias itself is not parsed for any version strings. The protocol is
+assumed to match HTTP 1.0 when an alias match.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.3
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPAUTH.3 b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
new file mode 100644
index 0000000..35d75aa
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPAUTH.3
@@ -0,0 +1,116 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HTTPAUTH 3 "2 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPAUTH, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+authentication method(s) you want it to use speaking to the remote server.
+
+The available bits are listed below. If more than one bit is set, libcurl will
+first query the site to see which authentication methods it supports and then
+pick the best one you allow it to use. For some methods, this will induce an
+extra network round-trip. Set the actual name and password with the
+\fICURLOPT_USERPWD(3)\fP option or with the \fICURLOPT_USERNAME(3)\fP and the
+\fICURLOPT_PASSWORD(3)\fP options.
+
+For authentication with a proxy, see \fICURLOPT_PROXYAUTH(3)\fP.
+
+.IP CURLAUTH_BASIC
+HTTP Basic authentication. This is the default choice, and the only method
+that is in wide-spread use and supported virtually everywhere. This sends
+the user name and password over the network in plain text, easily captured by
+others.
+.IP CURLAUTH_DIGEST
+HTTP Digest authentication. Digest authentication is defined in RFC2617 and
+is a more secure way to do authentication over public networks than the
+regular old-fashioned Basic method.
+.IP CURLAUTH_DIGEST_IE
+HTTP Digest authentication with an IE flavor. Digest authentication is
+defined in RFC2617 and is a more secure way to do authentication over public
+networks than the regular old-fashioned Basic method. The IE flavor is simply
+that libcurl will use a special "quirk" that IE is known to have used before
+version 7 and that some servers require the client to use.
+.IP CURLAUTH_NEGOTIATE
+HTTP Negotiate (SPNEGO) authentication. Negotiate authentication is defined
+in RFC 4559 and is the most secure way to perform authentication over HTTP.
+
+You need to build libcurl with a suitable GSS-API library or SSPI on Windows
+for this to work.
+.IP CURLAUTH_NTLM
+HTTP NTLM authentication. A proprietary protocol invented and used by
+Microsoft. It uses a challenge-response and hash concept similar to Digest, to
+prevent the password from being eavesdropped.
+
+You need to build libcurl with either OpenSSL, GnuTLS or NSS support for this
+option to work, or build libcurl on Windows with SSPI support.
+.IP CURLAUTH_NTLM_WB
+NTLM delegating to winbind helper. Authentication is performed by a separate
+binary application that is executed when needed. The name of the application
+is specified at compile time but is typically /usr/bin/ntlm_auth
+
+Note that libcurl will fork when necessary to run the winbind application and
+kill it when complete, calling waitpid() to await its exit when done. On POSIX
+operating systems, killing the process will cause a SIGCHLD signal to be
+raised (regardless of whether \fICURLOPT_NOSIGNAL(3)\fP is set), which must be
+handled intelligently by the application. In particular, the application must
+not unconditionally call wait() in its SIGCHLD signal handler to avoid being
+subject to a race condition. This behavior is subject to change in future
+versions of libcurl.
+.IP CURLAUTH_ANY
+This is a convenience macro that sets all bits and thus makes libcurl pick any
+it finds suitable. libcurl will automatically select the one it finds most
+secure.
+.IP CURLAUTH_ANYSAFE
+This is a convenience macro that sets all bits except Basic and thus makes
+libcurl pick any it finds suitable. libcurl will automatically select the one
+it finds most secure.
+.IP CURLAUTH_ONLY
+This is a meta symbol. OR this value together with a single specific auth
+value to force libcurl to probe for un-restricted auth and if not, only that
+single auth algorithm is acceptable.
+.SH DEFAULT
+CURLAUTH_BASIC
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Option Added in 7.10.6.
+
+CURLAUTH_DIGEST_IE was added added in 7.19.3
+
+CURLAUTH_ONLY was added in 7.21.3
+
+CURLAUTH_NTLM_WB was added in 7.22.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
+methods.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXYAUTH "(3), " CURLOPT_USERPWD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3
new file mode 100644
index 0000000..c14c387
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HTTPGET 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPGET \- ask for a HTTP GET request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPGET, long useget);
+.SH DESCRIPTION
+Pass a long. If \fIuseget\fP is 1, this forces the HTTP request to get back to
+using GET. Usable if a POST, HEAD, PUT, etc has been used previously using the
+same curl \fIhandle\fP.
+
+When setting \fICURLOPT_HTTPGET(3)\fP to 1, it will automatically set
+\fICURLOPT_NOBODY(3)\fP to 0 and \fICURLOPT_UPLOAD(3)\fP to 0.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* use a GET to fetch this */
+ curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_NOBODY "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
new file mode 100644
index 0000000..cd50431
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
@@ -0,0 +1,110 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_HTTPHEADER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPHEADER \- set custom HTTP headers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers);
+.SH DESCRIPTION
+Pass a pointer to a linked list of HTTP headers to pass to the server and/or
+proxy in your HTTP request. The same list can be used for both host and proxy
+requests!
+
+The linked list should be a fully valid list of \fBstruct curl_slist\fP
+structs properly filled in. Use \fIcurl_slist_append(3)\fP to create the list
+and \fIcurl_slist_free_all(3)\fP to clean up an entire list. If you add a
+header that is otherwise generated and used by libcurl internally, your added
+one will be used instead. If you add a header with no content as in 'Accept:'
+(no data on the right side of the colon), the internally used header will get
+disabled. With this option you can add new headers, replace internal headers
+and remove internal headers. To add a header with no content (nothing to the
+right side of the colon), use the form 'MyHeader;' (note the ending
+semicolon).
+
+The headers included in the linked list \fBmust not\fP be CRLF-terminated,
+because libcurl adds CRLF after each header item. Failure to comply with this
+will result in strange bugs because the server will most likely ignore part of
+the headers you specified.
+
+The first line in a request (containing the method, usually a GET or POST) is
+not a header and cannot be replaced using this option. Only the lines
+following the request-line are headers. Adding this method line in this list
+of headers will only cause your request to send an invalid header. Use
+\fICURLOPT_CUSTOMREQUEST(3)\fP to change the method.
+
+When this option is passed to \fIcurl_easy_setopt(3)\fP, libcurl will not copy
+the entire list so you \fBmust\fP keep it around until you no longer use this
+\fIhandle\fP for a transfer before you call \fIcurl_slist_free_all(3)\fP on
+the list.
+
+Pass a NULL to this option to reset back to no custom headers.
+
+The most commonly replaced headers have "shortcuts" in the options
+\fICURLOPT_COOKIE(3)\fP, \fICURLOPT_USERAGENT(3)\fP and
+\fICURLOPT_REFERER(3)\fP. We recommend using those.
+
+There's an alternative option that sets or replaces headers only for requests
+that are sent with CONNECT to a proxy: \fICURLOPT_PROXYHEADER(3)\fP. Use
+\fICURLOPT_HEADEROPT(3)\fP to control the behavior.
+.SH SECURITY CONCERNS
+By default, this option makes libcurl send the given headers in all HTTP
+requests done by this handle. You should therefore use this option with
+caution if you for example connect to the remote site using a proxy and a
+CONNECT request, you should to consider if that proxy is supposed to also get
+the headers. They may be private or otherwise sensitive to leak.
+
+Use \fICURLOPT_HEADEROPT(3)\fP to make the headers only get sent to where you
+intend them to get sent.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+
+struct curl_slist *list = NULL;
+
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ list = curl_slist_append(list, "Shoesize: 10");
+ list = curl_slist_append(list, "Accept:");
+
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);
+
+ curl_easy_perform(curl);
+
+ curl_slist_free_all(list); /* free the list again */
+}
+.fi
+
+.SH AVAILABILITY
+As long as HTTP is enabled
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CUSTOMREQUEST "(3), " CURLOPT_HEADEROPT "(3), "
+.BR CURLOPT_PROXYHEADER "(3), " CURLOPT_HEADER "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPOST.3 b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
new file mode 100644
index 0000000..0f35b63
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPPOST.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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 until you close this curl
+handle again with \fIcurl_easy_cleanup(3)\fP.
+
+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.
+.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
+.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), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3 b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
new file mode 100644
index 0000000..f861afb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_HTTPPROXYTUNNEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel);
+.SH DESCRIPTION
+Set the parameter to 1 to make libcurl tunnel all operations through the HTTP
+proxy. There is a big difference between using a proxy and to tunnel through
+it. If you don't know what this means, you probably don't want this tunneling
+option.
+
+Tunneling essentially means that a CONNECT is sent to the proxy, asking it to
+connect to a remote host on a specific port number and then the traffic is
+just passed through the proxy. Proxies tend to whitelist specific port numbers
+it allows CONNECT requests to and often only port 80 and 443 are allowed.
+
+When using this, it only makes sense to use \fICURLOPT_PROXYTYPE(3)\fP set to
+a HTTP proxy.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All network protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
new file mode 100644
index 0000000..65472ec
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HTTP_CONTENT_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_CONTENT_DECODING,
+ long enabled);
+.SH DESCRIPTION
+Pass a long to tell libcurl how to act on content decoding. If set to zero,
+content decoding will be disabled. If set to 1 it is enabled. Libcurl has no
+default content decoding but requires you to use
+\fICURLOPT_ACCEPT_ENCODING(3)\fP for that.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
+.BR CURLOPT_ACCEPT_ENCODING "(3) "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3 b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
new file mode 100644
index 0000000..26662db
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_HTTP_TRANSFER_DECODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_TRANSFER_DECODING,
+ long enabled);
+.SH DESCRIPTION
+Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
+transfer decoding will be disabled, if set to 1 it is enabled
+(default). libcurl does chunked transfer decoding by default unless this
+option is set to zero.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_CONTENT_DECODING "(3), " CURLOPT_ACCEPT_ENCODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3 b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
new file mode 100644
index 0000000..c85d144
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_HTTP_VERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
+.SH DESCRIPTION
+Pass \fIversion\fP a long, set to one of the values described below. They
+force libcurl to use the specific HTTP versions. This is not sensible to do
+unless you have a good reason. You have to set this option if you want to use
+libcurl's HTTP/2 support.
+
+.IP CURL_HTTP_VERSION_NONE
+We don't care about what version the library uses. libcurl will use whatever
+it thinks fit.
+.IP CURL_HTTP_VERSION_1_0
+Enforce HTTP 1.0 requests.
+.IP CURL_HTTP_VERSION_1_1
+Enforce HTTP 1.1 requests.
+.IP CURL_HTTP_VERSION_2_0
+Attempt HTTP 2 requests. libcurl will fall back to HTTP 1.x if HTTP 2 can't be
+negotiated with the server. (Added in 7.33.0)
+.SH DEFAULT
+CURL_HTTP_VERSION_NONE
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3 b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
new file mode 100644
index 0000000..51fd6b0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_IGNORE_CONTENT_LENGTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IGNORE_CONTENT_LENGTH \- ignore Content-Length in HTTP response
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IGNORE_CONTENT_LENGTH,
+ long ignore);
+.SH DESCRIPTION
+If \fIignore\fP is set to 1, ignore the Content-Length header in the HTTP
+response. This is useful for Apache 1.x (and similar servers) which will
+report incorrect content length for files over 2 gigabytes. If this option is
+used, curl will not be able to accurately report progress, and will simply
+stop the download when the server ends the connection.
+
+Only use this option if strictly necessary.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* we know the server is silly, ignore content-length */
+ curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.14.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), " CURLOPT_MAXFILESIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
new file mode 100644
index 0000000..fd49e21
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_INFILESIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INFILESIZE \- set size of the input file to send off
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE, long filesize);
+.SH DESCRIPTION
+When uploading a file to a remote site, \fIfilesize\fP should be used to tell
+libcurl what the expected size of the input file is. This value must be passed
+as a long. See also \fICURLOPT_INFILESIZE_LARGE(3)\fP for sending files larger
+than 2GB.
+
+For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE(3)\fP is
+mandatory.
+
+To unset this value again, set it to -1.
+
+When sending emails using SMTP, this command can be used to specify the
+optional SIZE parameter for the MAIL FROM command.
+
+This option does not limit how much data libcurl will actually send, as that
+is controlled entirely by what the read callback returns, but telling one
+value and sending a different amount may lead to errors.
+.SH DEFAULT
+Unset
+.SH PROTOCOLS
+Many
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ long uploadsize = FILE_SIZE;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
+
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, uploadsize);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SMTP support added in 7.23.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INFILESIZE_LARGE "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
new file mode 100644
index 0000000..114676d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_INFILESIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE_LARGE,
+ curl_off_t filesize);
+.SH DESCRIPTION
+When uploading a file to a remote site, \fIfilesize\fP should be used to tell
+libcurl what the expected size of the input file is. This value must be passed
+as a \fBcurl_off_t\fP.
+
+For uploading using SCP, this option or \fICURLOPT_INFILESIZE(3)\fP is
+mandatory.
+
+To unset this value again, set it to -1.
+
+When sending emails using SMTP, this command can be used to specify the
+optional SIZE parameter for the MAIL FROM command.
+
+This option does not limit how much data libcurl will actually send, as that
+is controlled entirely by what the read callback returns, but telling one
+value and sending a different amount may lead to errors.
+.SH DEFAULT
+Unset
+.SH PROTOCOLS
+Many
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_off_t uploadsize = FILE_SIZE;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/destination.tar.gz");
+
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadsize);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SMTP support added in 7.23.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_INFILESIZE "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INTERFACE.3 b/docs/libcurl/opts/CURLOPT_INTERFACE.3
new file mode 100644
index 0000000..0890eb6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERFACE.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_INTERFACE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_INTERFACE \- source interface for outgoing traffic
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERFACE, char *interface);
+.SH DESCRIPTION
+Pass a char * as parameter. This sets the \fIinterface\fP name to use as
+outgoing network interface. The name can be an interface name, an IP address,
+or a host name.
+
+If the parameter starts with "if!" then it is treated as only as interface
+name and no attempt will ever be named to do treat it as an IP address or to
+do name resolution on it. If the parameter starts with \&"host!" it is
+treated as either an IP address or a hostname. Hostnames are resolved
+synchronously. Using the if! format is highly recommended when using the
+multi interfaces to avoid allowing the code to block. If "if!" is specified
+but the parameter does not match an existing interface, CURLE_INTERFACE_FAILED
+is returned from the libcurl function used to perform the transfer.
+.SH DEFAULT
+NULL, use whatever the TCP stack finds suitable
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+The "if!" and "host!" syntax was added in 7.24.0.
+.SH RETURN VALUE
+Returns CURLE_OK on success or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_TCP_NODELAY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
new file mode 100644
index 0000000..836dfac
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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
+.SH SYNOPSIS
+#include <curl/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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.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 --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
new file mode 100644
index 0000000..b965529
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3
@@ -0,0 +1,68 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.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 --git a/docs/libcurl/opts/CURLOPT_IOCTLDATA.3 b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
new file mode 100644
index 0000000..456080c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IOCTLDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_IOCTLDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLDATA, void *pointer);
+.SH DESCRIPTION
+Pass the \fIpointer\fP that will be untouched by libcurl and passed as the 3rd
+argument in the ioctl callback set with \fICURLOPT_IOCTLFUNCTION(3)\fP.
+.SH DEFAULT
+By default, the value of this parameter is NULL.
+.SH PROTOCOLS
+Used with HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IOCTLFUNCTION "(3), " CURLOPT_SEEKFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3 b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
new file mode 100644
index 0000000..ebfe8df
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_IOCTLFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IOCTLFUNCTION \- callback for I/O operations
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLIOE_OK, /* I/O operation successful */
+ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
+ CURLIOE_FAILRESTART, /* failed to restart the read */
+ CURLIOE_LAST /* never use */
+} curlioerr;
+
+typedef enum {
+ CURLIOCMD_NOP, /* no operation */
+ CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
+ CURLIOCMD_LAST /* never use */
+} curliocmd;
+
+curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLFUNCTION, ioctl_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl when something special
+I/O-related needs to be done that the library can't do by itself. For now,
+rewinding the read data stream is the only action it can request. The
+rewinding of the read data stream may be necessary when doing a HTTP PUT or
+POST with a multi-pass authentication method.
+
+The callback MUST return \fICURLIOE_UNKNOWNCMD\fP if the input \fIcmd\fP is
+not \fICURLIOCMD_RESTARTREAD\fP.
+
+The \fIclientp\fP argument to the callback is set with the
+\fICURLOPT_IOCTLDATA(3)\fP option.
+
+This option is deprecated! Do not use it. Use \fICURLOPT_SEEKFUNCTION(3)\fP
+instead to provide seeking! If \fICURLOPT_SEEKFUNCTION(3)\fP is set, this
+parameter will be ignored when seeking.
+.SH DEFAULT
+By default, this parameter is set to NULL. Not used.
+.SH PROTOCOLS
+Used with HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.12.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IOCTLDATA "(3), " CURLOPT_SEEKFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_IPRESOLVE.3 b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
new file mode 100644
index 0000000..ad9827a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_IPRESOLVE.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_IPRESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_IPRESOLVE \- specify which IP protocol version to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);
+.SH DESCRIPTION
+Allows an application to select what kind of IP addresses to use when
+resolving host names. This is only interesting when using host names that
+resolve addresses using more than one version of IP. The allowed values are:
+.IP CURL_IPRESOLVE_WHATEVER
+Default, resolves addresses to all IP versions that your system allows.
+.IP CURL_IPRESOLVE_V4
+Resolve to IPv4 addresses.
+.IP CURL_IPRESOLVE_V6
+Resolve to IPv6 addresses.
+.SH DEFAULT
+CURL_IPRESOLVE_WHATEVER
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HTTP_VERSION "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_ISSUERCERT.3 b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
new file mode 100644
index 0000000..08afb29
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_ISSUERCERT.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_ISSUERCERT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_ISSUERCERT \- issuer SSL certificate filename
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ISSUERCERT, char *file);
+.SH DESCRIPTION
+Pass a char * to a zero terminated string naming a \fIfile\fP holding a CA
+certificate in PEM format. If the option is set, an additional check against
+the peer certificate is performed to verify the issuer is indeed the one
+associated with the certificate provided by the option. This additional check
+is useful in multi-level PKI where one needs to enforce that the peer
+certificate is from a specific branch of the tree.
+
+This option makes sense only when used in combination with the
+\fICURLOPT_SSL_VERIFYPEER(3)\fP option. Otherwise, the result of the check is
+not considered as failure.
+
+A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
+which is returned if the setup of the SSL/TLS session has failed due to a
+mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER(3)\fP
+has to be set too for the check to fail). (Added in 7.19.0)
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled
+.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_CRLFILE "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_KEYPASSWD.3 b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
new file mode 100644
index 0000000..0ed0c87
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_KEYPASSWD.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_KEYPASSWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_KEYPASSWD \- set passphrase to private key
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEYPASSWD, char *pwd);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used as
+the password required to use the \fICURLOPT_SSLKEY(3)\fP or
+\fICURLOPT_SSH_PRIVATE_KEYFILE(3)\fP private key. You never needed a pass
+phrase to load a certificate but you need one to load your private key.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
+CURLOPT_SSLCERTPASSWD up to 7.9.2.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLKEY "(3), " CURLOPT_SSH_PRIVATE_KEYFILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_KRBLEVEL.3 b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
new file mode 100644
index 0000000..571eba3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_KRBLEVEL.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_KRBLEVEL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_KRBLEVEL \- set FTP kerberos security level
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KRBLEVEL, char *level);
+.SH DESCRIPTION
+Pass a char * as parameter. Set the kerberos security level for FTP; this also
+enables kerberos awareness. This is a string that should match one of the
+following: \&'clear', \&'safe', \&'confidential' or \&'private'. If the
+string is set but doesn't match one of these, 'private' will be used. Set the
+string to NULL to disable kerberos support for FTP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+This option was known as CURLOPT_KRB4LEVEL up to 7.16.3
+.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_KRBLEVEL "(3), " CURLOPT_FTP_SSL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORT.3 b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
new file mode 100644
index 0000000..88ca1f8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_LOCALPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOCALPORT \- set local port number to use for socket
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORT, long port);
+.SH DESCRIPTION
+Pass a long. This sets the local port number of the socket used for the
+connection. This can be used in combination with \fICURLOPT_INTERFACE(3)\fP
+and you are recommended to use \fICURLOPT_LOCALPORTRANGE(3)\fP as well when
+this option is set. Valid port numbers are 1 - 65535.
+.SH DEFAULT
+0, disabled - use whatever the system thinks is fine
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOCALPORTRANGE "(3), " CURLOPT_INTERFACE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3 b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
new file mode 100644
index 0000000..3a7c701
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_LOCALPORTRANGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORTRANGE,
+ long range);
+.SH DESCRIPTION
+Pass a long. The \fIrange\fP argument is the number of attempts libcurl will
+make to find a working local port number. It starts with the given
+\fICURLOPT_LOCALPORT(3)\fP and adds one to the number for each retry. Setting
+this option to 1 or below will make libcurl do only one try for the exact port
+number. Port numbers by nature are scarce resources that will be busy at times
+so setting this value to something too low might cause unnecessary connection
+setup failures.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.2
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_LOCALPORT "(3), " CURLOPT_INTERFACE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
new file mode 100644
index 0000000..dde3c6e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_LOGIN_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOGIN_OPTIONS \- set login options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+\fIoptions\fP string to use for the transfer.
+
+For more information about the login options please see RFC2384, RFC5092 and
+IETF draft draft-earhart-url-smtp-00.txt
+
+\fBCURLOPT_LOGIN_OPTIONS(3)\fP can be used to set protocol specific login
+options, such as the preferred authentication mechanism via "AUTH=NTLM" or
+"AUTH=*", and should be used in conjunction with the \fICURLOPT_USERNAME(3)\fP
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Only IMAP, POP3 and SMTP support login options.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.34.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_USERNAME "(3), " CURLOPT_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
new file mode 100644
index 0000000..893c1b1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_LOW_SPEED_LIMIT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_LIMIT, long speedlimit);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the average transfer speed in bytes per
+second that the transfer should be below during
+\fICURLOPT_LOW_SPEED_TIME(3)\fP seconds for libcurl to consider it to be too
+slow and abort.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOW_SPEED_TIME "(3), " CURLOPT_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3 b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
new file mode 100644
index 0000000..90b19f2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_LOW_SPEED_TIME 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_LOW_SPEED_TIME \- set low speed limit time period
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME, long speedtime);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the time in number seconds that the
+transfer speed should be below the \fICURLOPT_LOW_SPEED_LIMIT(3)\fP for the
+library to consider it too slow and abort.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_LOW_SPEED_LIMIT "(3), " CURLOPT_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3 b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
new file mode 100644
index 0000000..4591a01
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3
@@ -0,0 +1,58 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAIL_AUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_AUTH \- SMTP authentication address
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_AUTH, char *auth);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. This will be used to
+specify the authentication address (identity) of a submitted message that is
+being relayed to another server.
+
+This optional parameter allows co-operating agents in a trusted environment to
+communicate the authentication of individual messages and should only be used
+by the application program, using libcurl, if the application is itself a mail
+server acting in such an environment. If the application is operating as such
+and the AUTH address is not known or is invalid, then an empty string should
+be used for this parameter.
+
+Unlike \fICURLOPT_MAIL_FROM(3)\fP and \fICURLOPT_MAIL_RCPT(3)\fP, the address
+should not be specified within a pair of angled brackets (<>). However, if an
+empty string is used then a pair of brackets will be sent by libcurl as
+required by RFC2554.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_FROM "(3), " CURLOPT_MAIL_RCPT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_FROM.3 b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
new file mode 100644
index 0000000..bf7160e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_FROM.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAIL_FROM 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_FROM \- SMTP sender address
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_FROM, char *from);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. This should be used
+to specify the sender's email address when sending SMTP mail with libcurl.
+
+An originator email address should be specified with angled brackets (<>)
+around it, which if not specified will be added automatically.
+
+If this parameter is not specified then an empty address will be sent to the
+mail server which may cause the email to be rejected.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_RCPT "(3), " CURLOPT_MAIL_AUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3 b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
new file mode 100644
index 0000000..95665e7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAIL_RCPT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT,
+ struct curl_slist *rcpts);
+.SH DESCRIPTION
+Pass a pointer to a linked list of recipients to pass to the server in your
+SMTP mail request. The linked list should be a fully valid list of \fBstruct
+curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
+create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire list.
+
+When performing a mail transfer, each recipient should be specified within a
+pair of angled brackets (<>), however, should you not use an angled bracket as
+the first character libcurl will assume you provided a single email address
+and enclose that address within brackets for you.
+
+When performing an address verification (VRFY command), each recipient should
+be specified as the user name or user name and domain (as per Section 3.5 of
+RFC5321).
+
+When performing a mailing list expand (EXPN command), each recipient should be
+specified using the mailing list name, such as "Friends" or "London-Office".
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0. The VRFY and EXPN logic was added in 7.34.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_FROM "(3), " CURLOPT_MAIL_AUTH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3 b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
new file mode 100644
index 0000000..2a41b37
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXCONNECTS \- maximum connection cache size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXCONNECTS, long amount);
+.SH DESCRIPTION
+Pass a long. The set \fIamount\fP will be the maximum number of simultaneously
+open persistent connections that libcurl may cache in the pool associated with
+this handle. The default is 5, and there isn't much point in changing this
+value unless you are perfectly aware of how this works and changes libcurl's
+behaviour. This concerns connections using any of the protocols that support
+persistent connections.
+
+When reaching the maximum limit, curl closes the oldest one in the cache to
+prevent increasing the number of open connections.
+
+If you already have performed transfers with this curl handle, setting a
+smaller \fICURLOPT_MAXCONNECTS(3)\fP than before may cause open connections to
+get closed unnecessarily.
+
+If you add this easy handle to a multi handle, this setting is not
+acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and the
+\fICURLMOPT_MAXCONNECTS\fP option.
+.SH DEFAULT
+5
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLMOPT_MAXCONNECTS "(3), " CURLOPT_MAXREDIRS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
new file mode 100644
index 0000000..e0ce066
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAXFILESIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXFILESIZE \- maximum file size allowed to download
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE, long size);
+.SH DESCRIPTION
+Pass a long as parameter. This allows you to specify the maximum \fIsize\fP
+(in bytes) of a file to download. If the file requested is found larger than
+this value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will
+be returned.
+
+The file size is not always known prior to download, and for such files this
+option has no effect even if the file transfer ends up being larger than this
+given limit. This concerns both FTP and HTTP transfers.
+
+If you want a limit above 2GB, use \fICURLOPT_MAXFILESIZE_LARGE(3)\fP.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP and HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_MAXFILESIZE_LARGE "(3), " CURLOPT_MAX_RECV_SPEED_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
new file mode 100644
index 0000000..b313001
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAXFILESIZE_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE_LARGE,
+ curl_off_t size);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. This allows you to specify the maximum
+\fIsize\fP (in bytes) of a file to download. If the file requested is found
+larger than this value, the transfer will not start and
+\fICURLE_FILESIZE_EXCEEDED\fP will be returned.
+
+The file size is not always known prior to download, and for such files this
+option has no effect even if the file transfer ends up being larger than this
+given limit. This concerns both FTP and HTTP transfers.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+FTP and HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.11.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAXFILESIZE "(3), " CURLOPT_MAX_RECV_SPEED_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAXREDIRS.3 b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
new file mode 100644
index 0000000..34608c3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAXREDIRS.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAXREDIRS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAXREDIRS \- maximum number of redirects allowed
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXREDIRS, long amount);
+.SH DESCRIPTION
+Pass a long. The set number will be the redirection limit \fIamount\fP. If
+that many redirections have been followed, the next redirect will cause an
+error (\fICURLE_TOO_MANY_REDIRECTS\fP). This option only makes sense if the
+\fICURLOPT_FOLLOWLOCATION(3)\fP is used at the same time.
+
+Setting the limit to 0 will make libcurl refuse any redirect.
+
+Set it to -1 for an infinite number of redirects.
+.SH DEFAULT
+-1, unlimited
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
+
+ /* enable redirect following */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ /* allow three redirects */
+ curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FOLLOWLOCATION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
new file mode 100644
index 0000000..e73ad22
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAX_RECV_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_RECV_SPEED_LARGE,
+ curl_off_t speed);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. If a download exceeds this \fIspeed\fP
+(counted in bytes per second) on cumulative average during the transfer, the
+transfer will pause to keep the average rate less than or equal to the
+parameter value. Defaults to unlimited speed.
+
+This option doesn't affect transfer speeds done with FILE:// URLs.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All but file://
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.15.5
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_SEND_SPEED_LARGE "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3 b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
new file mode 100644
index 0000000..4893b39
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_MAX_SEND_SPEED_LARGE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAX_SEND_SPEED_LARGE,
+ curl_off_t maxspeed);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter with the \fImaxspeed\fP. If an upload exceeds
+this speed (counted in bytes per second) on cumulative average during the
+transfer, the transfer will pause to keep the average rate less than or equal
+to the parameter value. Defaults to unlimited speed.
+
+This option doesn't affect transfer speeds done with FILE:// URLs.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+All except file://
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.15.5
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAX_RECV_SPEED_LARGE "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NETRC.3 b/docs/libcurl/opts/CURLOPT_NETRC.3
new file mode 100644
index 0000000..9fb13b3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NETRC.3
@@ -0,0 +1,73 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NETRC 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NETRC \- request that .netrc is used
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC, long level);
+.SH DESCRIPTION
+This parameter controls the preference \fIlevel\fP of libcurl between using
+user names and passwords from your \fI~/.netrc\fP file, relative to user names
+and passwords in the URL supplied with \fICURLOPT_URL(3)\fP.
+
+libcurl uses a user name (and supplied or prompted password) supplied with
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP in preference to any of
+the options controlled by this parameter.
+
+Only machine name, user name and password are taken into account (init macros
+and similar things aren't supported).
+
+libcurl does not verify that the file has the correct properties set (as the
+standard Unix ftp client does). It should only be readable by user.
+
+\fIlevel\fP should be set to one of the values described below.
+
+.IP CURL_NETRC_OPTIONAL
+The use of your \fI~/.netrc\fP file is optional, and information in the URL is
+to be preferred. The file will be scanned for the host and user name (to
+find the password only) or for the host only, to find the first user name and
+password after that \fImachine\fP, which ever information is not specified in
+the URL.
+
+Undefined values of the option will have this effect.
+.IP CURL_NETRC_IGNORED
+The library will ignore the file and use only the information in the URL.
+
+This is the default.
+.IP CURL_NETRC_REQUIRED
+This value tells the library that use of the file is required, to ignore the
+information in the URL, and to search the file for the host only.
+.SH DEFAULT
+CURL_NETRC_IGNORED
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NETRC_FILE.3 b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
new file mode 100644
index 0000000..7291999
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NETRC_FILE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NETRC_FILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NETRC_FILE \- file name to read .netrc info from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC_FILE, char *file);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to a zero terminated string containing
+the full path name to the \fIfile\fP you want libcurl to use as .netrc
+file. If this option is omitted, and \fICURLOPT_NETRC(3)\fP is set, libcurl
+will attempt to find a .netrc file in the current user's home
+directory.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.9
+.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_NETRC "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
new file mode 100644
index 0000000..2d22595
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NEW_DIRECTORY_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NEW_DIRECTORY_PERMS,
+ long mode);
+.SH DESCRIPTION
+Pass a long as a parameter, containing the value of the permissions that will
+be assigned to newly created directories on the remote server. The default value is
+\fI0755\fP, but any valid value can be used. The only protocols that can use
+this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
+.SH DEFAULT
+0755
+.SH PROTOCOLS
+SFTP, SCP and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_NEW_FILE_PERMS "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3 b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
new file mode 100644
index 0000000..eb51f46
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NEW_FILE_PERMS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NEW_FILE_PERMS,
+ long mode);
+.SH DESCRIPTION
+Pass a long as a parameter, containing the value of the permissions that will
+be assigned to newly created files on the remote server. The default value is
+\fI0644\fP, but any valid value can be used. The only protocols that can use
+this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
+.SH DEFAULT
+0644
+.SH PROTOCOLS
+SFTP, SCP and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_NEW_DIRECTORY_PERMS "(3), " CURLOPT_UPLOAD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOBODY.3 b/docs/libcurl/opts/CURLOPT_NOBODY.3
new file mode 100644
index 0000000..b303b95
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOBODY.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NOBODY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOBODY \- do the download request without getting the body
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOBODY, long opt);
+.SH DESCRIPTION
+A long parameter set to 1 tells libcurl to not include the body-part in the
+output when doing what would otherwise be a download. For HTTP(S), this makes
+libcurl do a HEAD request. For most other protocols it means just not asking
+to transfer the body data.
+
+Enabling this option means asking for a download but without a body.
+.SH DEFAULT
+0, the body is transferred
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* get us the resource without a body! */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPGET "(3), " CURLOPT_POST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOPROGRESS.3 b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
new file mode 100644
index 0000000..ebdecb0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOPROGRESS.3
@@ -0,0 +1,42 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_NOPROGRESS 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOPROGRESS \- switch off the progress meter
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff);
+.SH DESCRIPTION
+If \fIonoff\fP is to 1, it tells the library to shut off the progress meter
+completely for requests done with this \fIhandle\fP. It will also prevent the
+\fICURLOPT_PROGRESSFUNCTION(3)\fP from getting called.
+
+Future versions of libcurl are likely to not have any built-in progress meter
+at all.
+.SH DEFAULT
+1, meaning it normally runs without a progress meter.
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_PROGRESSFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_NOPROXY.3 b/docs/libcurl/opts/CURLOPT_NOPROXY.3
new file mode 100644
index 0000000..7e2e719
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOPROXY.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.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), "
diff --git a/docs/libcurl/opts/CURLOPT_NOSIGNAL.3 b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
new file mode 100644
index 0000000..27fe158
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_NOSIGNAL.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_NOSIGNAL 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_NOSIGNAL \- skip all signal handling
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
+.SH DESCRIPTION
+If \fIonoff\fP is 1, libcurl will not use any functions that install signal
+handlers or any functions that cause signals to be sent to the process. This
+option is here to allow multi-threaded unix applications to still set/use all
+timeout options etc, without risking getting signals.
+
+If this option is set and libcurl has been built with the standard name
+resolver, timeouts will not occur while the name resolve takes place.
+Consider building libcurl with the c-ares or threaded resolver backends to
+enable asynchronous DNS lookups, to enable timeouts for name resolves without
+the use of signals.
+
+Setting \fICURLOPT_NOSIGNAL(3)\fP to 1 makes libcurl NOT ask the system to
+ignore SIGPIPE signals, which otherwise are sent by the system when trying to
+send data to a socket which is closed in the other end. libcurl makes an
+effort to never cause such SIGPIPEs to trigger, but some operating systems
+have no way to avoid them and even on those that have there are some corner
+cases when they may still happen, contrary to our desire. In addition, using
+\fICURLAUTH_NTLM_WB\fP authentication could cause a SIGCHLD signal to be
+raised.
+.SH DEFAULT
+0
+.SH AVAILABILITY
+Added in 7.10
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
new file mode 100644
index 0000000..a397c3e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_OPENSOCKETDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.17.1
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_OPENSOCKETFUNCTION "(3), " CURLOPT_SOCKOPTFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3 b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
new file mode 100644
index 0000000..d5f461d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3
@@ -0,0 +1,90 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_OPENSOCKETFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
+ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+ CURLSOCKTYPE_LAST /* never use */
+} curlsocktype;
+
+struct curl_sockaddr {
+ int family;
+ int socktype;
+ int protocol;
+ unsigned int addrlen;
+ struct sockaddr addr;
+};
+
+curl_socket_t opensocket_callback(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETFUNCTION, opensocket_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl instead of the \fIsocket(2)\fP
+call. The callback's \fIpurpose\fP argument identifies the exact purpose for
+this particular socket: \fICURLSOCKTYPE_IPCXN\fP is for IP based connections
+and \fICURLSOCKTYPE_ACCEPT\fP is for sockets created after accept() - such as
+when doing active FTP. Future versions of libcurl may support more
+purposes.
+
+The \fIclientp\fP pointer contains whatever user-defined value set using the
+\fICURLOPT_OPENSOCKETDATA(3)\fP function.
+
+The callback gets the resolved peer address as the \fIaddress\fP argument and
+is allowed to modify the address or refuse to connect completely. The callback
+function should return the newly created socket or \fICURL_SOCKET_BAD\fP in
+case no connection could be established or another error was detected. Any
+additional \fIsetsockopt(2)\fP calls can of course be done on the socket at
+the user's discretion. A \fICURL_SOCKET_BAD\fP return value from the callback
+function will signal an unrecoverable error to libcurl and it will return
+\fICURLE_COULDNT_CONNECT\fP from the function that triggered this callback.
+This return code can be used for IP address blacklisting.
+
+If you want to pass in a socket with an already established connection, pass
+the socket back with this callback and then use
+\fICURLOPT_SOCKOPTFUNCTION(3)\fP to signal that it already is connected.
+.SH DEFAULT
+The default behavior is the equivalent of this:
+.nf
+ return socket(addr->family, addr->socktype, addr->protocol);
+.fi
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.17.1.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_OPENSOCKETDATA "(3), " CURLOPT_SOCKOPTFUNCTION "(3), "
+.BR CURLOPT_CLOSESOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_PASSWORD.3
new file mode 100644
index 0000000..b460658
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PASSWORD.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PASSWORD \- password to use in authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PASSWORD, char *pwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+password to use for the transfer.
+
+The \fICURLOPT_PASSWORD(3)\fP option should be used in conjunction with the
+\fICURLOPT_USERNAME(3)\fP option.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_USERPWD "(3), " CURLOPT_USERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
+
diff --git a/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
new file mode 100644
index 0000000..490aca0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_PATH_AS_IS 3 "17 Jun 2014" "libcurl 7.42.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PATH_AS_IS \- do not handle dot dot sequences
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PATH_AS_IS, long leaveit);
+.SH DESCRIPTION
+By setting the long \fIleavit\fP to 1, to explicitly tell libcurl to not alter
+the given path before passing it on to the server.
+
+This tells libcurl to NOT squash sequences of "/../" or "/./" that may exist
+in the URL's path part and that is supposed to be removed according to RFC
+3986 section 5.2.4.
+
+Some server implementations are known to (erroneously) require the dot dot
+sequences to remain in the path and some clients want to pass these on in
+order to try out server implementations.
+
+By default libcurl will merge such sequences before using the path.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/../../etc/password");
+
+ curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Aded in 7.42.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3 b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
new file mode 100644
index 0000000..94cad31
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PINNEDPUBLICKEY 3 "27 Aug 2014" "libcurl 7.38.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PINNEDPUBLICKEY \- set pinned public key
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PINNEDPUBLICKEY, char *pinnedpubkey);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the file name of your pinned public key. The format expected is "PEM" or "DER".
+
+When negotiating a TLS or SSL connection, the server sends a certificate
+indicating its identity. A public key is extracted from this certificate and
+if it does not exactly match the public key provided to this option, curl will
+abort the connection before sending or receiving any data.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, 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_PINNEDPUBLICKEY, "/etc/publickey.der");
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH PUBLIC KEY EXTRACTION
+If you do not have the server's public key file you can extract it from the
+server's certificate.
+.nf
+openssl x509 -in www.test.com.pem -pubkey -noout > www.test.com.pubkey.pem
+.fi
+The public key is output in PEM format and contains a header, base64 data and a
+footer:
+.nf
+-----BEGIN PUBLIC KEY-----
+[BASE 64 DATA]
+-----END PUBLIC KEY-----
+.fi
+.SH AVAILABILITY
+Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for
+NSS and wolfSSL/CyaSSL. Other SSL backends not supported.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_CAINFO "(3), "
+.BR CURLOPT_CAPATH "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PIPEWAIT.3 b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
new file mode 100644
index 0000000..5f64195
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PIPEWAIT.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_PIPEWAIT 3 "12 May 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PIPEWAIT, long wait);
+.SH DESCRIPTION
+Set \fIwait\fP to 1L to tell libcurl to prefer to wait for a connection to
+confirm or deny that it can do pipelining or multiplexing before continuing.
+
+When about to perform a new transfer that allows pipelining or multiplexing,
+libcurl will check for existing connections to re-use and pipeline on. If no
+such connection exists it will immediately continue and create a fresh new
+connection to use.
+
+By setting this option to 1 - and having \fICURLMOPT_PIPELINE\fP enabled for
+the multi handle this transfer is associated with - libcurl will instead wait
+for the connection to reveal if it is possible to pipeline/multiplex on before
+it continues. This enables libcurl to much better keep the number of
+connections to a minimum when using pipelining or multiplexing protocols.
+
+The effect thus becomes that with this option set, libcurl prefers to wait and
+re-use an existing connection for pipelining rather than the opposite: prefer
+to open a new connection rather than waiting.
+
+The waiting time is as long as it takes for the connection to get up and for
+libcurl to get the necessary response back that informs it about its protocol
+and support level.
+.SH DEFAULT
+0 (off)
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.43.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
+.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PORT.3 b/docs/libcurl/opts/CURLOPT_PORT.3
new file mode 100644
index 0000000..5fd19c7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PORT.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PORT \- set remote port number to work with
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PORT, long number);
+.SH DESCRIPTION
+This option sets \fInumber\fP to be the remote port number to connect to,
+instead of the one specified in the URL or the default port for the used
+protocol.
+
+Usually, you just let the URL decide which port to use but this allows the
+application to override that.
+
+While this option accepts a 'long', a port number is usually a 16 bit number
+and therefore using a port number over 65535 will cause a run-time error.
+.SH DEFAULT
+By default this is 0 which makes it not used.
+.SH PROTOCOLS
+Used for all protocols that speak to a port number.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POST.3 b/docs/libcurl/opts/CURLOPT_POST.3
new file mode 100644
index 0000000..cd6b6d4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POST.3
@@ -0,0 +1,77 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POST \- request a HTTP POST
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POST, long post);
+.SH DESCRIPTION
+A parameter set to 1 tells libcurl to do a regular HTTP post. This will also
+make the library use a "Content-Type: application/x-www-form-urlencoded"
+header. (This is by far the most commonly used POST method).
+
+Use one of \fICURLOPT_POSTFIELDS(3)\fP or \fICURLOPT_COPYPOSTFIELDS(3)\fP
+options to specify what data to post and \fICURLOPT_POSTFIELDSIZE(3)\fP or
+\fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP to set the data size.
+
+Optionally, you can provide data to POST using the
+\fICURLOPT_READFUNCTION(3)\fP and \fICURLOPT_READDATA(3)\fP options but then
+you must make sure to not set \fICURLOPT_POSTFIELDS(3)\fP to anything but
+NULL. When providing data with a callback, you must transmit it using chunked
+transfer-encoding or you must set the size of the data with the
+\fICURLOPT_POSTFIELDSIZE(3)\fP or \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
+options. To enable chunked encoding, you simply pass in the appropriate
+Transfer-Encoding header, see the post-callback.c example.
+
+You can override the default POST Content-Type: header by setting your own
+with \fICURLOPT_HTTPHEADER(3)\fP.
+
+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.
+
+If you use POST to a HTTP 1.1 server, you can send data without knowing the
+size before starting the POST if you use chunked encoding. You enable this by
+adding a header like "Transfer-Encoding: chunked" with
+\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
+must specify the size in the request.
+
+When setting \fICURLOPT_POST(3)\fP to 1, it will automatically set
+\fICURLOPT_NOBODY(3)\fP to 0.
+
+If you issue a POST request and then want to make a HEAD or GET using the same
+re-used handle, you must explicitly set the new request type using
+\fICURLOPT_NOBODY(3)\fP or \fICURLOPT_HTTPGET(3)\fP or similar.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_HTTPPOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDS.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
new file mode 100644
index 0000000..27e4510
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDS.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POSTFIELDS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDS \- specify data to POST to server
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDS, char *postdata);
+.SH DESCRIPTION
+Pass a char * as parameter, pointing to the full data to send in a HTTP POST
+operation. You must make sure that the data is formatted the way you want the
+server to receive it. libcurl will not convert or encode it for you in any
+way. For example, the web server may assume that this data is url-encoded.
+
+The data pointed to is NOT copied by the library: as a consequence, it must be
+preserved by the calling application until the associated transfer finishes.
+This behaviour can be changed (so libcurl does copy the data) by setting the
+\fICURLOPT_COPYPOSTFIELDS(3)\fP option.
+
+This POST is a normal application/x-www-form-urlencoded kind (and libcurl will
+set that Content-Type by default when this option is used), which is commonly
+used by HTML forms. Change Content-Type with \fICURLOPT_HTTPHEADER(3)\fP.
+
+Using \fICURLOPT_POSTFIELDS(3)\fP implies \fICURLOPT_POST(3)\fP.
+
+You can use \fIcurl_easy_escape(3)\fP to url-encode your data, if necessary. It
+returns a pointer to an encoded string that can be passed as \fIpostdata\fP.
+
+If you want to do a zero-byte POST, you need to set
+\fICURLOPT_POSTFIELDSIZE(3)\fP explicitly to zero, as simply setting
+\fICURLOPT_POSTFIELDS(3)\fP to NULL or "" just effectively disables the
+sending of the specified string. libcurl will instead assume that you'll send
+the POST data using the read callback!
+
+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.
+
+To make multipart/formdata posts (aka RFC2388-posts), check out the
+\fICURLOPT_HTTPPOST(3)\fP option combined with \fIcurl_formadd(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ const char *data = "data to send";
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* size of the POST data */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 12L);
+
+ /* pass in a pointer to the data - libcurl will not copy */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDSIZE "(3), " CURLOPT_READFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
new file mode 100644
index 0000000..0166805
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3
@@ -0,0 +1,62 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POSTFIELDSIZE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDSIZE \- size of POST data pointed to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size);
+.SH DESCRIPTION
+If you want to post data to the server without having libcurl do a strlen() to
+measure the data size, this option must be used. When this option is used you
+can post fully binary data, which otherwise is likely to fail. If this size is
+set to -1, the library will use strlen() to get the size.
+
+If you post more than 2GB, use \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP.
+.SH DEFAULT
+-1
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ const char *data = "data to send";
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* size of the POST data */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) strlen(data));
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_POSTFIELDSIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
new file mode 100644
index 0000000..50fc351
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POSTFIELDSIZE_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE,
+ curl_off_t size);
+.SH DESCRIPTION
+If you want to post data to the server without having libcurl do a strlen() to
+measure the data size, this option must be used. When this option is used you
+can post fully binary data, which otherwise is likely to fail. If this size is
+set to -1, the library will use strlen() to get the size.
+.SH DEFAULT
+-1
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ const char *data = large_chunk;
+ curl_off_t length_of_data; /* set somehow */
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* size of the POST data */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, length_of_data);
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_COPYPOSTFIELDS "(3), "
+.BR CURLOPT_POSTFIELDSIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTQUOTE.3 b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
new file mode 100644
index 0000000..72692fd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTQUOTE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POSTQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTQUOTE, struct curl_slist *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+after your FTP transfer request. The commands will only be run if no error
+occurred. The linked list should be a fully valid list of struct curl_slist
+structs properly filled in as described for \fICURLOPT_QUOTE(3)\fP.
+
+Disable this operation again by setting a NULL to this option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If support for the protocols are built-in.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_QUOTE "(3), " CURLOPT_PREQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_POSTREDIR.3 b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
new file mode 100644
index 0000000..aa36bd0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_POSTREDIR.3
@@ -0,0 +1,73 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_POSTREDIR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_POSTREDIR \- how to act on a HTTP POST redirect
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTREDIR,
+ long bitmask);
+.SH DESCRIPTION
+Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
+301, 302 or 303 response back. A parameter with bit 0 set (value
+\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC2616/10.3.2 and not
+convert POST requests into GET requests when following a 301 redirection.
+Setting bit 1 (value \fBCURL_REDIR_POST_302\fP) makes libcurl maintain the
+request method after a 302 redirect whilst setting bit 2 (value
+\fBCURL_REDIR_POST_303\fP) makes libcurl maintain the request method after a
+303 redirect. The value \fBCURL_REDIR_POST_ALL\fP is a convenience define that
+sets all three bits.
+
+The non-RFC behaviour is ubiquitous in web browsers, so the library does the
+conversion by default to maintain consistency. However, a server may require a
+POST to remain a POST after such a redirection. This option is meaningful only
+when setting \fICURLOPT_FOLLOWLOCATION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP(S)
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* a silly POST example */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data=true");
+
+ /* example.com is redirected, so we tell libcurl to send POST on 301, 302 and
+ 303 HTTP response codes */
+ curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.17.1. This option was known as CURLOPT_POST301 up to 7.19.0 as it
+only supported the 301 then. CURL_REDIR_POST_303 was added in 7.26.0.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FOLLOWLOCATION "(3), " CURLOPT_POSTFIELDS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PREQUOTE.3 b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
new file mode 100644
index 0000000..e4163e8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PREQUOTE.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PREQUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PREQUOTE \- commands to run before FTP or SFTP transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE, char *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+after the transfer type is set. The linked list should be a fully valid list
+of struct curl_slist structs properly filled in as described for
+\fICURLOPT_QUOTE(3)\fP. Disable this operation again by setting a NULL to this
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+FTP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with the protocol support
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_QUOTE "(3), " CURLOPT_POSTQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PRIVATE.3 b/docs/libcurl/opts/CURLOPT_PRIVATE.3
new file mode 100644
index 0000000..9907f97
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PRIVATE.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_PRIVATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PRIVATE \- store a private pointer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer);
+.SH DESCRIPTION
+Pass a void * as parameter, pointing to data that should be associated with
+this curl handle. The pointer can subsequently be retrieved using
+\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
+never does nothing with this data.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct private secrets;
+if(curl) {
+ struct private *extracted;
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* store a pointer to our private struct */
+ curl_easy_setopt(curl, CURLOPT_PRIVATE, &secrets);
+
+ curl_easy_perform(curl);
+
+ /* we can extract the private pointer again too */
+ curl_easy_getinfo(curl, CURLINFO_PRIVATE, &extracted);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.10.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_STDERR "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3 b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
new file mode 100644
index 0000000..c4785dc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROGRESSDATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROGRESSFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3 b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
new file mode 100644
index 0000000..d8e7a66
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3
@@ -0,0 +1,84 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROGRESSFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROGRESSFUNCTION \- callback to progress meter function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int progress_callback(void *clientp,
+ double dltotal,
+ double dlnow,
+ double ultotal,
+ double ulnow);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSFUNCTION, progress_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+We encourage users to use the newer \fICURLOPT_XFERINFOFUNCTION(3)\fP instead,
+if you can.
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_PROGRESSDATA(3)\fP, it is not
+used by libcurl but is only passed along from the application to the callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
+Unknown/unused argument values passed to the callback will be set to zero
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
+
+If you transfer data with the multi interface, this function will not be
+called during periods of idleness unless you call the appropriate libcurl
+function that performs transfers.
+
+\fICURLOPT_NOPROGRESS(3)\fP must be set to 0 to make this function actually
+get called.
+.SH DEFAULT
+By default, libcurl has an internal progress meter. That's rarely wanted by
+users.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
new file mode 100644
index 0000000..958eeeb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROTOCOLS.3
@@ -0,0 +1,92 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROTOCOLS \- set allowed protocols
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROTOCOLS, long bitmask);
+.SH DESCRIPTION
+Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
+limits what protocols libcurl may use in the transfer. This allows you to have
+a libcurl built to support a wide range of protocols but still limit specific
+transfers to only be allowed to use a subset of them. By default libcurl will
+accept all protocols it supports (\fICURLPROTO_ALL\fP). See also
+\fICURLOPT_REDIR_PROTOCOLS(3)\fP.
+
+These are the available protocol defines:
+.nf
+CURLPROTO_DICT
+CURLPROTO_FILE
+CURLPROTO_FTP
+CURLPROTO_FTPS
+CURLPROTO_GOPHER
+CURLPROTO_HTTP
+CURLPROTO_HTTPS
+CURLPROTO_IMAP
+CURLPROTO_IMAPS
+CURLPROTO_LDAP
+CURLPROTO_LDAPS
+CURLPROTO_POP3
+CURLPROTO_POP3S
+CURLPROTO_RTMP
+CURLPROTO_RTMPE
+CURLPROTO_RTMPS
+CURLPROTO_RTMPT
+CURLPROTO_RTMPTE
+CURLPROTO_RTMPTS
+CURLPROTO_RTSP
+CURLPROTO_SCP
+CURLPROTO_SFTP
+CURLPROTO_SMB
+CURLPROTO_SMTP
+CURLPROTO_SMTPS
+CURLPROTO_TELNET
+CURLPROTO_TFTP
+.fi
+.SH DEFAULT
+All protocols built-in
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ /* pass in the URL from an external source */
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+
+ /* only allow HTTP, TFTP and SFTP */
+ curl_easy_setopt(curl, CURLOPT_PROTOCOLS,
+ CURLPROTO_HTTP | CURLPROTO_TFTP | CURLPROTO_SFTP);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.19.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_URL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY.3 b/docs/libcurl/opts/CURLOPT_PROXY.3
new file mode 100644
index 0000000..b419e51
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY.3
@@ -0,0 +1,85 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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 IP
+address.
+
+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. Use socks4://, socks4a://, socks5:// or socks5h:// (the last
+one to enable socks5 and asking the proxy to do the resolving, also known as
+\fICURLPROXY_SOCKS5_HOSTNAME\fP type) to request the specific SOCKS version to
+be used. No protocol specified, http:// and all others will be treated as HTTP
+proxies.
+
+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.
+
+libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP,
+\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY(3)\fP
+option does however override any possibly set environment variables.
+
+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 given in an environment variable can also include protocol
+scheme (http://) and embedded user + password.
+.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
+TODO
+.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".
+.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 --git a/docs/libcurl/opts/CURLOPT_PROXYAUTH.3 b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
new file mode 100644
index 0000000..fe742c0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYAUTH.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYAUTH 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYAUTH, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+HTTP authentication method(s) you want it to use for your proxy
+authentication. If more than one bit is set, libcurl will first query the
+site to see what authentication methods it supports and then pick the best one
+you allow it to use. For some methods, this will induce an extra network
+round-trip. Set the actual name and password with the
+\fICURLOPT_PROXYUSERPWD(3)\fP option.
+
+The bitmask can be constructed by or'ing together the bits fully listed and
+described in the \fICURLOPT_HTTPAUTH(3)\fP man page.
+.SH DEFAULT
+CURLAUTH_BASIC
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.10.7
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
+methods.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
+.BR CURLOPT_PROXYUSERPWD "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYHEADER.3 b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
new file mode 100644
index 0000000..bfa7a7a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYHEADER.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYHEADER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYHEADER,
+ struct curl_slist *headers);
+.SH DESCRIPTION
+Pass a pointer to a linked list of HTTP headers to pass in your HTTP request
+sent to a proxy. The rules for this list is identical to the
+\fICURLOPT_HTTPHEADER(3)\fP option's.
+
+The headers set with this option is only ever used in requests sent to a proxy
+- when there's also a request sent to a host.
+
+The first line in a request (containing the method, usually a GET or POST) is
+NOT a header and cannot be replaced using this option. Only the lines
+following the request-line are headers. Adding this method line in this list
+of headers will only cause your request to send an invalid header.
+
+Pass a NULL to this to reset back to no custom headers.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.37.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HEADEROPT "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3 b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
new file mode 100644
index 0000000..43536ca
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYPASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYPASSWORD \- password to use with proxy authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+password to use for authentication with the proxy.
+
+The \fICURLOPT_PROXYPASSWORD(3)\fP option should be used in conjunction with
+the \fICURLOPT_PROXYUSERNAME(3)\fP option.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_PASSWORD "(3), " CURLOPT_PROXYUSERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_PROXYPORT.3 b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
new file mode 100644
index 0000000..d8a1bb1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYPORT.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYPORT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYPORT \- port number the proxy listens on
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPORT, long port);
+.SH DESCRIPTION
+Pass a long with this option to set the proxy port to connect to unless it is
+specified in the proxy string \fICURLOPT_PROXY(3)\fP or uses the default one.
+
+While this accepts a 'long', the port number is 16 bit so it can't be larger
+than 65535.
+.SH DEFAULT
+0, not specified which makes it use the default port
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYTYPE.3 b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
new file mode 100644
index 0000000..2ce0cc0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYTYPE.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYTYPE \- proxy protocol type
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);
+.SH DESCRIPTION
+Pass a long with this option to set type of the proxy. Available options for
+this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP
+\fICURLPROXY_SOCKS4\fP, \fICURLPROXY_SOCKS5\fP, \fICURLPROXY_SOCKS4A\fP and
+\fICURLPROXY_SOCKS5_HOSTNAME\fP. The HTTP type is default.
+
+If you set \fBCURLOPT_PROXYTYPE(3)\fP to \fICURLPROXY_HTTP_1_0\fP, it will
+only affect how libcurl speaks to a proxy when CONNECT is used. The HTTP
+version used for "regular" HTTP requests is instead controlled with
+\fICURLOPT_HTTP_VERSION(3)\fP.
+
+Often it is more convenient to specify the proxy type with the scheme part of
+the \fICURLOPT_PROXY(3)\fP string.
+.SH DEFAULT
+CURLPROXY_HTTP
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
new file mode 100644
index 0000000..c342ec4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYUSERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERNAME,
+ char *username);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+user name to use for the transfer.
+
+\fBCURLOPT_PROXYUSERNAME(3)\fP sets the user name to be used in protocol
+authentication with the proxy.
+
+To specify the proxy password use the \fICURLOPT_PROXYPASSWORD(3)\fP.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_PROXYPASSWORD "(3), " CURLOPT_USERNAME "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3 b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
new file mode 100644
index 0000000..bbf0da5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PROXYUSERPWD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERPWD, char *userpwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be [user name]:[password] to use for
+the connection to the HTTP proxy. Both the name and the password will be URL
+decoded before use, so to include for example a colon in the user name you
+should encode it as %3A. (This is different to how \fICURLOPT_USERPWD(3)\fP is
+used - beware.)
+
+Use \fICURLOPT_PROXYAUTH(3)\fP to specify the authentication method.
+.SH DEFAULT
+This is NULL by default.
+.SH PROTOCOLS
+Used with all protocols that can use a proxy
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.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_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
new file mode 100644
index 0000000..a6224fb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY_SERVICE_NAME \- proxy service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name is "HTTP". This option allows you to change it.
+..SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.43.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3 b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
new file mode 100644
index 0000000..ae5ede7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TRANSFER_MODE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TRANSFER_MODE, long enabled);
+.SH DESCRIPTION
+Pass a long. If the value is set to 1 (one), it tells libcurl to set the
+transfer mode (binary or ASCII) for FTP transfers done via a HTTP proxy, by
+appending ;type=a or ;type=i to the URL. Without this setting, or it being set
+to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT(3)\fP has no effect when
+doing FTP via a proxy. Beware that not all proxies support this feature.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP over proxy
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if the
+enabled value is not supported.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_HTTPPROXYTUNNEL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_PUT.3 b/docs/libcurl/opts/CURLOPT_PUT.3
new file mode 100644
index 0000000..bd40b7f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_PUT.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_PUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_PUT \- make a HTTP PUT request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PUT, long put);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
+data should be set with \fICURLOPT_READDATA(3)\fP and
+\fICURLOPT_INFILESIZE(3)\fP.
+
+This option is \fBdeprecated\fP since version 7.12.1. Use
+\fICURLOPT_UPLOAD(3)\fP!
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Deprecated since 7.12.1. Do not use.
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_UPLOAD "(3), " CURLOPT_HTTPGET "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_QUOTE.3 b/docs/libcurl/opts/CURLOPT_QUOTE.3
new file mode 100644
index 0000000..8bf3c14
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_QUOTE.3
@@ -0,0 +1,86 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_QUOTE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_QUOTE \- (S)FTP commands to run before transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_QUOTE, struct curl_slist *cmds);
+.SH DESCRIPTION
+Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
+prior to your request. This will be done before any other commands are issued
+(even before the CWD command for FTP). The linked list should be a fully valid
+list of 'struct curl_slist' structs properly filled in with text strings. Use
+\fIcurl_slist_append(3)\fP to append strings (commands) to the list, and clear
+the entire list afterwards with \fIcurl_slist_free_all(3)\fP. Disable this
+operation again by setting a NULL to this option. When speaking to a FTP
+server, prefix the command with an asterisk (*) to make libcurl continue even
+if the command fails as by default libcurl will stop at first failure.
+
+The set of valid FTP commands depends on the server (see RFC959 for a list of
+mandatory commands).
+
+The valid SFTP commands are:
+.RS
+.IP "chgrp group file"
+The chgrp command sets the group ID of the file named by the file operand to
+the group ID specified by the group operand. The group operand is a decimal
+integer group ID.
+.IP "chmod mode file"
+The chmod command modifies the file mode bits of the specified file. The
+mode operand is an octal integer mode number.
+.IP "chown user file"
+The chown command sets the owner of the file named by the file operand to the
+user ID specified by the user operand. The user operand is a decimal
+integer user ID.
+.IP "ln source_file target_file"
+The ln and symlink commands create a symbolic link at the target_file location
+pointing to the source_file location.
+.IP "mkdir directory_name"
+The mkdir command creates the directory named by the directory_name operand.
+.IP "pwd"
+The pwd command returns the absolute pathname of the current working directory.
+.IP "rename source target"
+The rename command renames the file or directory named by the source
+operand to the destination path named by the target operand.
+.IP "rm file"
+The rm command removes the file specified by the file operand.
+.IP "rmdir directory"
+The rmdir command removes the directory entry specified by the directory
+operand, provided it is empty.
+.IP "symlink source_file target_file"
+See ln.
+.RE
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+SFTP support added in 7.16.3. *-prefix for SFTP added in 7.24.0
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_POSTQUOTE "(3), " CURLOPT_PREQUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3 b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
new file mode 100644
index 0000000..0c2d688
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RANDOM_FILE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RANDOM_FILE \- specify a source for random data
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);
+.SH DESCRIPTION
+Pass a char * to a zero terminated file name. The file will be used to read
+from to seed the random engine for SSL and more.
+.SH DEFAULT
+NULL, not used
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.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_EGDSOCKET "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3
new file mode 100644
index 0000000..f5dd555
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RANGE.3
@@ -0,0 +1,66 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RANGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RANGE \- set byte range to request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);
+.SH DESCRIPTION
+Pass a char * as parameter, which should contain the specified range you want
+to retrieve. It should be in the format "X-Y", where either X or Y may be left
+out and X and Y are byte indexes.
+
+HTTP transfers also support several intervals, separated with commas as in
+\fI"X-Y,N-M"\fP. Using this kind of multiple intervals will cause the HTTP
+server to send the response document in pieces (using standard MIME separation
+techniques). For RTSP, the formatting of a range should follow RFC2326 Section
+12.29. For RTSP, byte ranges are \fBnot\fP permitted. Instead, ranges should
+be given in npt, utc, or smpte formats.
+
+Pass a NULL to this option to disable the use of ranges.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP, FTP, FILE, RTSP and SFTP.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* get the first 200 bytes */
+ curl_easy_setopt(curl, CURLOPT_RANGE, "0-199");
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+FILE since 7.18.0, RTSP since 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK on success or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RESUME_FROM "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_READDATA.3 b/docs/libcurl/opts/CURLOPT_READDATA.3
new file mode 100644
index 0000000..a67f415
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_READDATA.3
@@ -0,0 +1,64 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_READDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_READDATA \- custom pointer passed to the read callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READDATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the file read function. If you use the
+\fICURLOPT_READFUNCTION(3)\fP option, this is the pointer you'll get as
+input in the 4th argument to the callback.
+
+If you don't specify a read callback but instead rely on the default internal
+read function, this data must be a valid readable FILE * (cast to 'void *').
+
+If you're using libcurl as a win32 DLL, you MUST use a
+\fICURLOPT_READFUNCTION(3)\fP if you set this option.
+.SH DEFAULT
+By default, this is a FILE * to stdin.
+.SH PROTOCOLS
+This is used for all protocols when sending data.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct MyData this;
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* pass pointer that gets passed in to the
+ CURLOPT_READFUNCTION callback */
+ curl_easy_setopt(curl, CURLOPT_READDATA, &this);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+This option was once known by the older name \fICURLOPT_INFILE\fP, the name
+\fICURLOPT_READDATA\fP was introduced in 7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READFUNCTION "(3), " CURLOPT_WRITEDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_READFUNCTION.3 b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
new file mode 100644
index 0000000..edd9bdb
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_READFUNCTION.3
@@ -0,0 +1,79 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_READFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_READFUNCTION \- read callback for data uploads
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+size_t read_callback(char *buffer, size_t size, size_t nitems, void *instream);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READFUNCTION, read_callback);
+
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl as soon as it needs to read data
+in order to send it to the peer - like if you ask it to upload or post data to
+the server. The data area pointed at by the pointer \fIbuffer\fP should be
+filled up with at most \fIsize\fP multiplied with \fInmemb\fP number of bytes
+by your function.
+
+Your function must then return the actual number of bytes that it stored in
+that memory area. Returning 0 will signal end-of-file to the library and cause
+it to stop the current transfer.
+
+If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
+server expected it, like when you've said you will upload N bytes and you
+upload less than N bytes), you may experience that the server "hangs" waiting
+for the rest of the data that won't come.
+
+The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
+operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
+code from the transfer.
+
+The callback can return \fICURL_READFUNC_PAUSE\fP to cause reading from this
+connection to pause. See \fIcurl_easy_pause(3)\fP for further details.
+
+\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
+that the callback wants, or it will be considered the final packet by the
+server end and the transfer will end there.
+
+If you set this callback pointer to NULL, or don't set it at all, the default
+internal read function will be used. It is doing an fread() on the FILE *
+userdata set with \fICURLOPT_READDATA(3)\fP.
+.SH DEFAULT
+The default internal read callback is fread().
+.SH PROTOCOLS
+This is used for all protocols when doing uploads.
+.SH EXAMPLE
+Here's an example setting a read callback for reading that to upload to an FTP
+site: http://curl.haxx.se/libcurl/c/ftpupload.html
+.SH AVAILABILITY
+CURL_READFUNC_PAUSE return code was added in 7.18.0 and CURL_READFUNC_ABORT
+was added in 7.12.1.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
+.BR CURLOPT_SEEKFUNCTION "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3 b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
new file mode 100644
index 0000000..fbec9f5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3
@@ -0,0 +1,92 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_REDIR_PROTOCOLS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long bitmask);
+.SH DESCRIPTION
+Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
+limits what protocols libcurl may use in a transfer that it follows to in a
+redirect when \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. This allows you to
+limit specific transfers to only be allowed to use a subset of protocols in
+redirections. By default libcurl will allow all protocols except for FILE and
+SCP.
+
+These are the available protocol defines:
+.nf
+CURLPROTO_DICT
+CURLPROTO_FILE
+CURLPROTO_FTP
+CURLPROTO_FTPS
+CURLPROTO_GOPHER
+CURLPROTO_HTTP
+CURLPROTO_HTTPS
+CURLPROTO_IMAP
+CURLPROTO_IMAPS
+CURLPROTO_LDAP
+CURLPROTO_LDAPS
+CURLPROTO_POP3
+CURLPROTO_POP3S
+CURLPROTO_RTMP
+CURLPROTO_RTMPE
+CURLPROTO_RTMPS
+CURLPROTO_RTMPT
+CURLPROTO_RTMPTE
+CURLPROTO_RTMPTS
+CURLPROTO_RTSP
+CURLPROTO_SCP
+CURLPROTO_SFTP
+CURLPROTO_SMB
+CURLPROTO_SMTP
+CURLPROTO_SMTPS
+CURLPROTO_TELNET
+CURLPROTO_TFTP
+.fi
+.SH DEFAULT
+All protocols except for FILE, SCP and SMB.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+curl = curl_easy_init();
+if(curl) {
+ /* pass in the URL from an external source */
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+
+ /* only allow redirects to HTTP and HTTPS URLs */
+ curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS,
+ CURLPROTO_HTTP | CURLPROTO_HTTPS);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.19.4, before then it would follow all protocols.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_PROTOCOLS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_REFERER.3 b/docs/libcurl/opts/CURLOPT_REFERER.3
new file mode 100644
index 0000000..bcb1625
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_REFERER.3
@@ -0,0 +1,57 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_REFERER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_REFERER \- set the HTTP referer header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set the Referer: header in the http request sent to the remote server. This
+can be used to fool servers or scripts. You can also set any custom header
+with \fICURLOPT_HTTPHEADER(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* tell it where we found the link to this place */
+ curl_easy_setopt(curl, CURLOPT_REFERER, "http://example.com/aboutme.html");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built with HTTP support
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP support is enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_USERAGENT "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3
new file mode 100644
index 0000000..06a393a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3
@@ -0,0 +1,82 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RESOLVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESOLVE \- provide custom host name to IP address resolves
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVE,
+ struct curl_slist *hosts);
+.SH DESCRIPTION
+Pass a pointer to a linked list of strings with host name resolve information
+to use for requests with this handle. The linked list should be a fully valid
+list of \fBstruct curl_slist\fP structs properly filled in. Use
+\fIcurl_slist_append(3)\fP to create the list and \fIcurl_slist_free_all(3)\fP
+to clean up an entire list.
+
+Each single name resolve string should be written using the format
+HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is
+the port number of the service where libcurl wants to connect to the HOST and
+ADDRESS is the numerical IP address. If libcurl is built to support IPv6,
+ADDRESS can of course be either IPv4 or IPv6 style addressing.
+
+This option effectively pre-populates the DNS cache with entries for the
+host+port pair so redirects and everything that operations against the
+HOST+PORT will instead use your provided ADDRESS. Addresses to set with
+\fICURL_RESOLVE\fP will not time-out from the DNS cache like ordinary
+entries.
+
+You can remove names from the DNS cache again, to stop providing these fake
+resolves, by including a string in the linked list that uses the format
+\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
+and port number must exactly match what was already added previously.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl;
+struct curl_slist *host = NULL;
+host = curl_slist_append(NULL, "example.com:80:127.0.0.1");
+
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+}
+
+curl_slist_free_all(host);
+.fi
+.SH AVAILABILITY
+Added in 7.21.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_IPRESOLVE "(3), " CURLOPT_DNS_CACHE_TIMEOUT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
new file mode 100644
index 0000000..c25c646
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM.3
@@ -0,0 +1,72 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RESUME_FROM 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESUME_FROM \- set a point to resume transfer from
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM, long from);
+.SH DESCRIPTION
+Pass a long as parameter. It contains the offset in number of bytes that you
+want the transfer to start from. Set this option to 0 to make the transfer
+start from the beginning (effectively disabling resume). For FTP, set this
+option to -1 to make the transfer start from the end of the target file
+(useful to continue an interrupted upload).
+
+When doing uploads with FTP, the resume position is where in the local/source
+file libcurl should try to resume the upload from and it will then append the
+source file to the remote target file.
+
+If you need to resume a transfer beyond the 2GB limit, use
+\fICURLOPT_RESUME_FROM_LARGE(3)\fP instead.
+.SH DEFAULT
+0, not used
+.SH PROTOCOLS
+HTTP, FTP, SFTP, FILE
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
+
+ /* resume upload at byte index 200 */
+ curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 200L);
+
+ /* ask for upload */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* set total data amount to expect */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, size_of_file);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_RESUME_FROM_LARGE "(3), " CURLOPT_RANGE "(3), "
+.BR CURLOPT_INFILESIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3 b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
new file mode 100644
index 0000000..bcb30af
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3
@@ -0,0 +1,74 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RESUME_FROM_LARGE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM_LARGE,
+ curl_off_t from);
+.SH DESCRIPTION
+Pass a curl_off_t as parameter. It contains the offset in number of bytes that
+you want the transfer to start from. Set this option to 0 to make the transfer
+start from the beginning (effectively disabling resume). For FTP, set this
+option to -1 to make the transfer start from the end of the target file
+(useful to continue an interrupted upload).
+
+When doing uploads with FTP, the resume position is where in the local/source
+file libcurl should try to resume the upload from and it will then append the
+source file to the remote target file.
+.SH DEFAULT
+0, not used
+.SH PROTOCOLS
+HTTP, FTP, SFTP, FILE
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_off_t resume_position = GET_IT_SOMEHOW;
+ curl_off_t file_size = GET_IT_SOMEHOW_AS_WELL;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
+
+ /* resuming upload at this position, possibly beyond 2GB */
+ curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, resume_position);
+
+ /* ask for upload */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* set total data amount to expect */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_size);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.11.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_RESUME_FROM "(3), " CURLOPT_RANGE "(3), "
+.BR CURLOPT_INFILESIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
new file mode 100644
index 0000000..c951016
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_CLIENT_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_CLIENT_CSEQ, long cseq);
+.SH DESCRIPTION
+Pass a long to set the the CSEQ number to issue for the next RTSP
+request. Useful if the application is resuming a previously broken
+connection. The CSEQ will increment from this new number henceforth.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.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_RTSP_SERVER_CSEQ "(3), " CURLOPT_RTSP_REQUEST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3 b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
new file mode 100644
index 0000000..9ab175d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3
@@ -0,0 +1,101 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_REQUEST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_REQUEST \- specify RTSP request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request);
+.SH DESCRIPTION
+Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP
+enum values as a long in the \fIrequest\fP argument. Unless noted otherwise,
+commands require the Session ID to be initialized.
+.IP CURL_RTSPREQ_OPTIONS
+Used to retrieve the available methods of the server. The application is
+responsible for parsing and obeying the response. \fB(The session ID is not
+needed for this method.)\fP
+.IP CURL_RTSPREQ_DESCRIBE
+Used to get the low level description of a stream. The application should note
+what formats it understands in the \fI'Accept:'\fP header. Unless set
+manually, libcurl will automatically fill in \fI'Accept:
+application/sdp'\fP. Time-condition headers will be added to Describe requests
+if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is
+not needed for this method)\fP
+.IP CURL_RTSPREQ_ANNOUNCE
+When sent by a client, this method changes the description of the session. For
+example, if a client is using the server to record a meeting, the client can
+use Announce to inform the server of all the meta-information about the
+session. ANNOUNCE acts like a HTTP PUT or POST just like
+\fICURL_RTSPREQ_SET_PARAMETER\fP
+.IP CURL_RTSPREQ_SETUP
+Setup is used to initialize the transport layer for the session. The
+application must set the desired Transport options for a session by using the
+\fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session
+ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will
+extract and use the session ID in the response to this request. \fB(The
+session ID is not needed for this method).\fP
+.IP CURL_RTSPREQ_PLAY
+Send a Play command to the server. Use the \fICURLOPT_RANGE(3)\fP option to
+modify the playback time (e.g. 'npt=10-15').
+.IP CURL_RTSPREQ_PAUSE
+Send a Pause command to the server. Use the \fICURLOPT_RANGE(3)\fP option with
+a single value to indicate when the stream should be halted. (e.g. npt='25')
+.IP CURL_RTSPREQ_TEARDOWN
+This command terminates an RTSP session. Simply closing a connection does not
+terminate the RTSP session since it is valid to control an RTSP session over
+different connections.
+.IP CURL_RTSPREQ_GET_PARAMETER
+Retrieve a parameter from the server. By default, libcurl will automatically
+include a \fIContent-Type: text/parameters\fP header on all non-empty requests
+unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST
+(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
+Applications wishing to send a heartbeat message (e.g. in the presence of a
+server-specified timeout) should send use an empty GET_PARAMETER request.
+.IP CURL_RTSPREQ_SET_PARAMETER
+Set a parameter on the server. By default, libcurl will automatically include
+a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
+interaction with SET_PARAMETER is much like a HTTP PUT or POST. An application
+may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a
+HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like a HTTP POST. No
+chunked transfers are allowed, so the application must set the
+\fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP
+in the latter. Also, there is no use of multi-part POSTs within RTSP.
+.IP CURL_RTSPREQ_RECORD
+Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP
+option to modify the record time.
+.IP CURL_RTSPREQ_RECEIVE
+This is a special request because it does not send any data to the server. The
+application may call this function in order to receive interleaved RTP
+data. It will return after processing one read buffer of data in order to give
+the application a chance to run.
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+TODO
+.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_RTSP_SESSION_ID "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3 b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
new file mode 100644
index 0000000..9e7cf3a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_SERVER_CSEQ 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SERVER_CSEQ, long cseq);
+.SH DESCRIPTION
+Pass a long to set the CSEQ number to expect for the next RTSP Server->Client
+request. \fBNOTE\fP: this feature (listening for Server requests) is
+unimplemented.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.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_RTSP_CLIENT_CSEQ "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3 b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
new file mode 100644
index 0000000..ec3d387
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_SESSION_ID 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_SESSION_ID \- set RTSP session ID
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
+.SH DESCRIPTION
+Pass a char * as a parameter to set the value of the current RTSP Session ID
+for the handle. Useful for resuming an in-progress session. Once this value is
+set to any non-NULL value, libcurl will return \fICURLE_RTSP_SESSION_ERROR\fP
+if ID received from the server does not match. If unset (or set to NULL),
+libcurl will automatically set the ID the first time the server sets it in a
+response.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_REQUEST "(3), " CURLOPT_RTSP_STREAM_URI "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3 b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
new file mode 100644
index 0000000..6a10ea0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_STREAM_URI 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);
+.SH DESCRIPTION
+Set the stream \fIURI\fP to operate on by passing a char * . For example, a
+single session may be controlling \fIrtsp://foo/twister/audio\fP and
+\fIrtsp://foo/twister/video\fP and the application can switch to the
+appropriate stream using this option. If unset, libcurl will default to
+operating on generic server options by passing '*' in the place of the RTSP
+Stream URI. This option is distinct from \fICURLOPT_URL(3)\fP. When working
+with RTSP, the \fICURLOPT_STREAM_URI(3)\fP indicates what URL to send to the
+server in the request header while the \fICURLOPT_URL(3)\fP indicates where to
+make the connection to. (e.g. the \fICURLOPT_URL(3)\fP for the above examples
+might be set to \fIrtsp://foo/twister\fP
+.SH DEFAULT
+'*'
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_REQUEST "(3), " CURLOPT_RTSP_TRANSPORT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3 b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
new file mode 100644
index 0000000..4d0a4c0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_RTSP_TRANSPORT 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT,
+ char *transport);
+.SH DESCRIPTION
+Pass a char * to tell libcurl what to pass for the Transport: header for this
+RTSP session. This is mainly a convenience method to avoid needing to set a
+custom Transport: header for every SETUP request. The application must set a
+Transport: header before issuing a SETUP request.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+RTSP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.20.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_RTSP_REQUEST "(3), " CURLOPT_RTSP_SESSION_ID "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SASL_IR.3 b/docs/libcurl/opts/CURLOPT_SASL_IR.3
new file mode 100644
index 0000000..7714217
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SASL_IR.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SASL_IR 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SASL_IR \- enable sending initial response in first packet
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);
+.SH DESCRIPTION
+Pass a long. If the value is 1, curl will send the initial response to the
+server in the first authentication packet in order to reduce the number of
+ping pong requests. Only applicable to the following supporting SASL
+authentication mechanisms:
+
+* Login
+* Plain
+* GSSAPI
+* NTLM
+* OAuth 2.0
+
+Note: Whilst IMAP supports this option there is no need to explicitly set it,
+as libcurl can determine the feature itself when the server supports the
+SASL-IR CAPABILITY.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.31.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_AUTH "(3), " CURLOPT_MAIL_FROM "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SEEKDATA.3 b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
new file mode 100644
index 0000000..830f099
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SEEKDATA.3
@@ -0,0 +1,43 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SEEKDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the seek callback function. If you use the
+\fICURLOPT_SEEKFUNCTION(3)\fP option, this is the pointer you'll get as
+input.
+.SH DEFAULT
+If you don't set this, NULL is passed to the callback.
+.SH PROTOCOLS
+HTTP, FTP, SFTP
+.SH EXAMPLE
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
new file mode 100644
index 0000000..bf7e304
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_SEEKFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+/* These are the return codes for the seek callbacks */
+#define CURL_SEEKFUNC_OK 0
+#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
+#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
+ libcurl might try other means instead */
+
+int seek_callback(void *userp, curl_off_t offset, int origin);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKFUNCTION, seek_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl to seek to a certain position in the
+input stream and can be used to fast forward a file in a resumed upload
+(instead of reading all uploaded bytes with the normal read
+function/callback). It is also called to rewind a stream when data has already
+been sent to the server and needs to be sent again. This may happen when doing
+a HTTP PUT or POST with a multi-pass authentication method, or when an
+existing HTTP connection is reused too late and the server closes the
+connection. The function shall work like fseek(3) or lseek(3) and it gets
+SEEK_SET, SEEK_CUR or SEEK_END as argument for \fIorigin\fP, although libcurl
+currently only passes SEEK_SET.
+
+\fIuserp\fP is the pointer you set with \fICURLOPT_SEEKDATA(3)\fP.
+
+The callback function must return \fICURL_SEEKFUNC_OK\fP on success,
+\fICURL_SEEKFUNC_FAIL\fP to cause the upload operation to fail or
+\fICURL_SEEKFUNC_CANTSEEK\fP to indicate that while the seek failed, libcurl
+is free to work around the problem if possible. The latter can sometimes be
+done by instead reading from the input or similar.
+
+If you forward the input arguments directly to fseek(3) or lseek(3), note that
+the data type for \fIoffset\fP is not the same as defined for curl_off_t on
+many systems!
+.SH DEFAULT
+By default, this is NULL and unused.
+.SH PROTOCOLS
+HTTP, FTP, SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.18.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SEEKDATA "(3), " CURLOPT_IOCTLFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3 b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
new file mode 100644
index 0000000..116fdbe
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_SERVICE_NAME 3 "17 Jun 2015" "libcurl 7.43.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SERVICE_NAME \- SPNEGO service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name is "HTTP". This option allows you to
+change it.
+..SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.43.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_PROXY "(3), " CURLOPT_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SHARE.3 b/docs/libcurl/opts/CURLOPT_SHARE.3
new file mode 100644
index 0000000..a483540
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SHARE.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SHARE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SHARE \- specify share handle to use
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);
+.SH DESCRIPTION
+Pass a \fIshare\fP handle as a parameter. The share handle must have been
+created by a previous call to \fIcurl_share_init(3)\fP. Setting this option,
+will make this curl handle use the data from the shared handle instead of
+keeping the data to itself. This enables several curl handles to share
+data. If the curl handles are used simultaneously in multiple threads, you
+\fBMUST\fP use the locking methods in the share handle. See
+\fIcurl_share_setopt(3)\fP for details.
+
+If you add a share that is set to share cookies, your easy handle will use
+that cookie cache and get the cookie engine enabled. If you unshare an object
+that was using cookies (or change to another object that doesn't share
+cookies), the easy handle will get its cookie engine disabled.
+
+Data that the share object is not set to share will be dealt with the usual
+way, as if no share was used.
+
+Set this option to NULL again to stop using that share object.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_COOKIE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
new file mode 100644
index 0000000..61c2b5e
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SOCKOPTDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTDATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns \fICURLE_OK\fP if the option is supported, and \fICURLE_UNKNOWN_OPTION\fP if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
new file mode 100644
index 0000000..e99fb79
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3
@@ -0,0 +1,88 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SOCKOPTFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+typedef enum {
+ CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
+ CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+ CURLSOCKTYPE_LAST /* never use */
+} curlsocktype;
+
+#define CURL_SOCKOPT_OK 0
+#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
+ CURLE_ABORTED_BY_CALLBACK */
+#define CURL_SOCKOPT_ALREADY_CONNECTED 2
+
+int sockopt_callback(void *clientp,
+ curl_socket_t curlfd,
+ curlsocktype purpose);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+When set, this callback function gets called by libcurl when the socket has
+been created, but before the connect call to allow applications to change
+specific socket options. The callback's \fIpurpose\fP argument identifies the
+exact purpose for this particular socket:
+
+\fICURLSOCKTYPE_IPCXN\fP for actively created connections or since 7.28.0
+\fICURLSOCKTYPE_ACCEPT\fP for FTP when the connection was setup with PORT/EPSV
+(in earlier versions these sockets weren't passed to this callback).
+
+Future versions of libcurl may support more purposes. libcurl passes the newly
+created socket descriptor to the callback in the \fIcurlfd\fP parameter so
+additional setsockopt() calls can be done at the user's discretion.
+
+The \fIclientp\fP pointer contains whatever user-defined value set using the
+\fICURLOPT_SOCKOPTDATA(3)\fP function.
+
+Return \fICURL_SOCKOPT_OK\fP from the callback on success. Return
+\fICURL_SOCKOPT_ERROR\fP from the callback function to signal an unrecoverable
+error to the library and it will close the socket and return
+\fICURLE_COULDNT_CONNECT\fP.
+Alternatively, the callback function can return
+\fICURL_SOCKOPT_ALREADY_CONNECTED\fP, to tell libcurl that the socket is
+already connected and then libcurl will not attempt to connect it. This allows
+an application to pass in an already connected socket with
+\fICURLOPT_OPENSOCKETFUNCTION(3)\fP and then have this function make libcurl
+not attempt to connect (again).
+.SH DEFAULT
+By default, this callback is NULL and unused.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0. The \fICURL_SOCKOPT_ALREADY_CONNECTED\fP return code was
+added in 7.21.5.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTDATA "(3), " CURLOPT_OPENSOCKETFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
new file mode 100644
index 0000000..cb318fc
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SOCKS5_GSSAPI_NEC 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec);
+.SH DESCRIPTION
+Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
+negotiation a protection mode is negotiated. The RFC1961 says in section
+4.3/4.4 it should be protected, but the NEC reference implementation does not.
+If enabled, this option allows the unprotected exchange of the protection mode
+negotiation.
+.SH DEFAULT
+?
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKS5_GSSAPI_SERVICE "(3), " CURLOPT_PROXY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3 b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
new file mode 100644
index 0000000..d18ea9f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SOCKS5_GSSAPI_SERVICE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SOCKS5_GSSAPI_SERVICE \- proxy socks gssapi service name
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_SERVICE, char *name);
+.SH DESCRIPTION
+Pass a char * as parameter to a string holding the \fIname\fP of the
+service. The default service name for a SOCKS5 server is
+rcmd/server-fqdn. This option allows you to change it.
+.SH DEFAULT
+See above
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.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_PROXYTYPE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3 b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
new file mode 100644
index 0000000..966f746
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_AUTH_TYPES 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_AUTH_TYPES, long bitmask);
+.SH DESCRIPTION
+Pass a long set to a bitmask consisting of one or more of
+CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
+CURLSSH_AUTH_KEYBOARD and CURLSSH_AUTH_AGENT.
+
+Set \fICURLSSH_AUTH_ANY\fP to let libcurl pick a suitable one. Currently
+CURLSSH_AUTH_HOST has no effect. If CURLSSH_AUTH_AGENT is used, libcurl
+attempts to connect to ssh-agent or pageant and let the agent attempt the
+authentication.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+CURLSSH_AUTH_HOST was added in 7.16.1, CURLSSH_AUTH_AGENT was added in 7.28.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 "(3), " CURLOPT_SSH_PUBLIC_KEYFILE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3 b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
new file mode 100644
index 0000000..12e7720
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5,
+ char *md5);
+.SH DESCRIPTION
+Pass a char * pointing to a string containing 32 hexadecimal digits. The
+string should be the 128 bit MD5 checksum of the remote host's public key, and
+libcurl will reject the connection to the host unless the md5sums match.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SCP and SFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.17.1
+.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_SSH_PUBLIC_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
new file mode 100644
index 0000000..45e7d7a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3
@@ -0,0 +1,44 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_KEYDATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYDATA, void *pointer);
+.SH DESCRIPTION
+Pass a void * as parameter. This \fIpointer\fP will be passed along verbatim
+to the callback set with \fICURLOPT_SSH_KEYFUNCTION(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_KEYDATA "(3), " CURLOPT_SSH_KNOWNHOSTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
new file mode 100644
index 0000000..4af9a3b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3
@@ -0,0 +1,105 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_KEYFUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+enum curl_khstat {
+ CURLKHSTAT_FINE_ADD_TO_FILE,
+ CURLKHSTAT_FINE,
+ CURLKHSTAT_REJECT, /* reject the connection, return an error */
+ CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right
+ now so this causes a CURLE_DEFER error but
+ otherwise the connection will be left intact
+ etc */
+};
+
+enum curl_khmatch {
+ CURLKHMATCH_OK, /* match */
+ CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
+ CURLKHMATCH_MISSING, /* no matching host/key found */
+};
+
+struct curl_khkey {
+ const char *key; /* points to a zero-terminated string encoded with
+ base64 if len is zero, otherwise to the "raw"
+ data */
+ size_t len;
+ enum curl_khtype keytype;
+};
+
+int ssh_keycallback(CURL *easy,
+ const struct curl_khkey *knownkey,
+ const struct curl_khkey *foundkey,
+ enum curl_khmatch,
+ void *clientp);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYFUNCTION,
+ ssh_keycallback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+It gets called when the known_host matching has been done, to allow the
+application to act and decide for libcurl how to proceed. The callback will
+only be called if \fICURLOPT_SSH_KNOWNHOSTS(3)\fP is also set.
+
+This callback function gets passed the CURL handle, the key from the
+known_hosts file \fIknownkey\fP, the key from the remote site \fIfoundkey\fP,
+info from libcurl on the matching status and a custom pointer (set with
+\fICURLOPT_SSH_KEYDATA(3)\fP). It MUST return one of the following return
+codes to tell libcurl how to act:
+
+.IP CURLKHSTAT_FINE_ADD_TO_FILE
+The host+key is accepted and libcurl will append it to the known_hosts file
+before continuing with the connection. This will also add the host+key combo
+to the known_host pool kept in memory if it wasn't already present there. The
+adding of data to the file is done by completely replacing the file with a new
+copy, so the permissions of the file must allow this.
+.IP CURLKHSTAT_FINE
+The host+key is accepted libcurl will continue with the connection. This will
+also add the host+key combo to the known_host pool kept in memory if it wasn't
+already present there.
+.IP CURLKHSTAT_REJECT
+The host+key is rejected. libcurl will deny the connection to continue and it
+will be closed.
+.IP CURLKHSTAT_DEFER
+The host+key is rejected, but the SSH connection is asked to be kept alive.
+This feature could be used when the app wants to somehow return back and act
+on the host+key situation and then retry without needing the overhead of
+setting it up from scratch again.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_KEYDATA "(3), " CURLOPT_SSH_KNOWNHOSTS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3 b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
new file mode 100644
index 0000000..85574ce
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_KNOWNHOSTS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KNOWNHOSTS, char *fname);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string holding the file name of the
+known_host file to use. The known_hosts file should use the OpenSSH file
+format as supported by libssh2. If this file is specified, libcurl will only
+accept connections with hosts that are known and present in that file, with a
+matching public key. Use \fICURLOPT_SSH_KEYFUNCTION(3)\fP to alter the default
+behavior on host and key (mis)matching.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.6
+.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_SSH_AUTH_TYPES "(3), " CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
new file mode 100644
index 0000000..f357f2c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_PRIVATE_KEYFILE,
+ char *filename);
+.SH DESCRIPTION
+Pass a char * pointing to a \fIfilename\fP for your private key. If not used,
+libcurl defaults to \fB$HOME/.ssh/id_dsa\fP if the HOME environment variable
+is set, and just "id_dsa" in the current directory if HOME is not set.
+
+If the file is password-protected, set the password with
+\fICURLOPT_KEYPASSWD(3)\fP.
+.SH DEFAULT
+As explained above
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.1
+.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_SSH_PUBLIC_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3 b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
new file mode 100644
index 0000000..35f2a19
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_PUBLIC_KEYFILE,
+ char *filename);
+.SH DESCRIPTION
+Pass a char * pointing to a \fIfilename\fP for your public key. If not used,
+libcurl defaults to \fB$HOME/.ssh/id_dsa.pub\fP if the HOME environment
+variable is set, and just "id_dsa.pub" in the current directory if HOME is not
+set.
+
+If an empty string is passed, libcurl will pass no public key to libssh2 which
+then tries to compute it from the private key, this is known to work when
+libssh2 1.4.0+ is linked against OpenSSL.
+.SH DEFAULT
+As explained above
+.SH PROTOCOLS
+SFTP and SCP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+The "" trick was added in 7.26.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSH_PRIVATE_KEYFILE "(3), " CURLOPT_SSH_AUTH_TYPES "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERT.3 b/docs/libcurl/opts/CURLOPT_SSLCERT.3
new file mode 100644
index 0000000..7ae54f1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLCERT.3
@@ -0,0 +1,55 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLCERT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLCERT \- set SSL client certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the file name of your client certificate. The default format is "P12" on
+Secure Transport and "PEM" on other engines, and can be changed with
+\fICURLOPT_SSLCERTTYPE(3)\fP.
+
+With NSS or Secure Transport, this can also be the nickname of the certificate
+you wish to authenticate with as it is named in the security database. If you
+want to use a file from the current directory, please precede it with "./"
+prefix, in order to avoid confusion with a nickname.
+
+When using a client certificate, you most likely also need to provide a
+private key with \fICURLOPT_SSLKEY(3)\fP.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLCERTTYPE "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
new file mode 100644
index 0000000..b19d517
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLCERTTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char *type);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the format of your certificate. Supported formats are "PEM" and "DER", except
+with Secure Transport. OpenSSL (versions 0.9.3 and later) and Secure Transport
+(on iOS 5 or later, or OS X 10.7 or later) also support "P12" for
+PKCS#12-encoded files.
+.SH DEFAULT
+"PEM"
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled. Added in 7.9.3
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLCERT "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
new file mode 100644
index 0000000..a88a5a7
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLENGINE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLENGINE \- set SSL engine identifier
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used as
+the identifier for the crypto engine you want to use for your private key.
+
+If the crypto device cannot be loaded, \fICURLE_SSL_ENGINE_NOTFOUND\fP is
+returned.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLENGINE_DEFAULT "(3), " CURLOPT_SSLKEY "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3 b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
new file mode 100644
index 0000000..6570df1
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLENGINE_DEFAULT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val);
+.SH DESCRIPTION
+Pass a long set to 1 as parameter. Sets the actual crypto engine as the
+default for (asymmetric) crypto operations.
+
+If the crypto device cannot be set, \fICURLE_SSL_ENGINE_SETFAILED\fP is
+returned.
+.SH DEFAULT
+None
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLENGINE "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEY.3 b/docs/libcurl/opts/CURLOPT_SSLKEY.3
new file mode 100644
index 0000000..add69d8
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLKEY.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLKEY 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEY, char *keyfile);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the file name of your private key. The default format is "PEM" and can be
+changed with \fICURLOPT_SSLKEYTYPE(3)\fP.
+
+(iOS and Mac OS X only) This option is ignored if curl was built against
+Secure Transport. Secure Transport expects the private key to be already
+present in the keychain or PKCS#12 file containing the certificate.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLKEYTYPE "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3 b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
new file mode 100644
index 0000000..d491634
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3
@@ -0,0 +1,50 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLKEYTYPE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLKEYTYPE \- set type of the private key file
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEYTYPE, char *type);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. The string should be
+the format of your private key. Supported formats are "PEM", "DER" and "ENG".
+
+The format "ENG" enables you to load the private key from a crypto engine. In
+this case \fICURLOPT_SSLKEY(3)\fP is used as an identifier passed to the
+engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE(3)\fP.
+\&"DER" format key file currently does not work because of a bug in OpenSSL.
+.SH DEFAULT
+"PEM"
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLKEY "(3), " CURLOPT_SSLCERT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSLVERSION.3 b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
new file mode 100644
index 0000000..a10dabd
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSLVERSION.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSLVERSION \- set preferred TLS/SSL version
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
+.SH DESCRIPTION
+Pass a long as parameter to control which version of SSL/TLS to attempt to
+use.
+
+Use one of the available defines for this purpose. The available options are:
+.RS
+.IP CURL_SSLVERSION_DEFAULT
+The default action. This will attempt to figure out the remote SSL protocol
+version.
+.IP CURL_SSLVERSION_TLSv1
+TLSv1.x
+.IP CURL_SSLVERSION_SSLv2
+SSLv2
+.IP CURL_SSLVERSION_SSLv3
+SSLv3
+.IP CURL_SSLVERSION_TLSv1_0
+TLSv1.0 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_1
+TLSv1.1 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_2
+TLSv1.2 (Added in 7.34.0)
+.RE
+.SH DEFAULT
+CURL_SSLVERSION_DEFAULT
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* ask libcurl to use TLS version 1.0 or later */
+ curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may
+vary depending on which backend libcurl has been built to use.
+
+SSLv3 is disabled by default since 7.39.0.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
+.BR CURLOPT_IPRESOLVE "(3) "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3 b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
new file mode 100644
index 0000000..7e05a59
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3
@@ -0,0 +1,65 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_CIPHER_LIST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CIPHER_LIST, char *list);
+.SH DESCRIPTION
+Pass a char *, pointing to a zero terminated string holding the list of
+ciphers to use for the SSL connection. The list must be syntactically correct,
+it consists of one or more cipher strings separated by colons. Commas or
+spaces are also acceptable separators but colons are normally used, \&!, \&-
+and \&+ can be used as operators.
+
+For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
+\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
+compile OpenSSL.
+
+You'll find more details about cipher lists on this URL:
+
+ http://www.openssl.org/docs/apps/ciphers.html
+
+For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
+\'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
+this option then all known ciphers are disabled and only those passed in are
+enabled.
+
+You'll find more details about the NSS cipher lists on this URL:
+
+ http://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives
+.SH DEFAULT
+NULL, use internal default
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_USE_SSL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
new file mode 100644
index 0000000..977cc12
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_CTX_DATA 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_DATA, void *pointer);
+.SH DESCRIPTION
+Data \fIpointer\fP to pass to the ssl context callback set by the option
+\fICURLOPT_SSL_CTX_FUNCTION(3)\fP, this is the pointer you'll get as third
+parameter.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL
+backends not supported.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_FUNCTION "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3 b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
new file mode 100644
index 0000000..e3e0170
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_CTX_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL or wolfSSL/CyaSSL
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION,
+ ssl_ctx_callback);
+.SH DESCRIPTION
+This option only works for libcurl powered by OpenSSL or wolfSSL/CyaSSL. If
+libcurl was built against another SSL library this functionality is absent.
+
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl just before the initialization
+of an SSL connection after having processed all other SSL related options to
+give a last chance to an application to modify the behaviour of the SSL
+initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL
+library's \fISSL_CTX\fP. If an error is returned from the callback no attempt
+to establish a connection is made and the perform operation will return the
+callback's error code. Set the \fIuserptr\fP argument with the
+\fICURLOPT_SSL_CTX_DATA(3)\fP option.
+
+This function will get called on all new connections made to a server, during
+the SSL negotiation. The SSL_CTX pointer will be a new one every time.
+
+To use this properly, a non-trivial amount of knowledge of your SSL library
+is necessary. For example, you can use this function to call library-specific
+callbacks to add additional validation code for certificates, and even to
+change the actual URI of a HTTPS request (example used in the lib509 test
+case). See also the example section for a replacement of the key, certificate
+and trust file settings.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Other SSL
+backends not supported.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_DATA "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
new file mode 100644
index 0000000..6716f72
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_ENABLE_ALPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_ENABLE_ALPN \- enable ALPN
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_ALPN, long npn);
+.SH DESCRIPTION
+Pass a long as parameter, 0 or 1 where 1 is for enable and 0 for disable. This
+option enables/disables ALPN in the SSL handshake (if the SSL backend libcurl
+is built to use supports it), which can be used to negotiate http2.
+.SH DEFAULT
+1, enabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_ENABLE_NPN "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3 b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
new file mode 100644
index 0000000..5db9b51
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_ENABLE_NPN 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_ENABLE_NPN \- enable NPN
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);
+.SH DESCRIPTION
+Pass a long as parameter, 0 or 1 where 1 is for enable and 0 for disable. This
+option enables/disables NPN in the SSL handshake (if the SSL backend libcurl
+is built to use supports it), which can be used to negotiate http2.
+.SH DEFAULT
+1, enabled
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.36.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_ENABLE_ALPN "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3 b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
new file mode 100644
index 0000000..31a05e6
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_FALSESTART 3 "14 Feb 2015" "libcurl 7.41.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_FALSESTART \- enable TLS false start
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable);
+.SH DESCRIPTION
+Pass a long as parameter set to 1 to enable or 0 to disable.
+
+This option determines whether libcurl should use false start during the TLS
+handshake. False start is a mode where a TLS client will start sending
+application data before verifying the server's Finished message, thus saving a
+round trip when performing a full handshake.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.42.0. This option is currently only supported by the NSS and
+Secure Transport (on iOS 7.0 or later, or OS X 10.9 or later) TLS backends.
+.SH RETURN VALUE
+Returns CURLE_OK if false start is supported by the SSL backend, otherwise
+returns CURLE_NOT_BUILT_IN.
diff --git a/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3 b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
new file mode 100644
index 0000000..09bcb96
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_OPTIONS 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_OPTIONS \- set SSL behavior options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);
+.SH DESCRIPTION
+Pass a long with a bitmask to tell libcurl about specific SSL behaviors.
+
+\fICURLSSLOPT_ALLOW_BEAST\fP is the only supported bit and by setting this the
+user will tell libcurl to not attempt to use any workarounds for a security
+flaw in the SSL3 and TLS1.0 protocols. If this option isn't used or this bit
+is set to 0, the SSL layer libcurl uses may use a work-around for this flaw
+although it might cause interoperability problems with some (older) SSL
+implementations. WARNING: avoiding this work-around lessens the security, and
+by setting this option to 1 you ask for exactly that.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_SSL_CIPHER_LIST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3 b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
new file mode 100644
index 0000000..4baa061
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_SESSIONID_CACHE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_SESSIONID_CACHE,
+ long enabled);
+.SH DESCRIPTION
+Pass a long set to 0 to disable libcurl's use of SSL session-ID caching. Set
+this to 1 to enable it. By default all transfers are done using the cache
+enabled. While nothing ever should get hurt by attempting to reuse SSL
+session-IDs, there seem to be or have been broken SSL implementations in the
+wild that may require you to disable this in order for you to succeed.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+All TLS-based
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.16.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_CACHE_TIMEOUT "(3), " CURLOPT_SSLVERSION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
new file mode 100644
index 0000000..fbf2042
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_VERIFYHOST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYHOST, long verify);
+.SH DESCRIPTION
+Pass a long as parameter specifying what to \fIverify\fP.
+
+This option determines whether libcurl verifies that the server cert is for
+the server it is known as.
+
+When negotiating TLS and SSL connections, the server sends a certificate
+indicating its identity.
+
+When \fICURLOPT_SSL_VERIFYHOST(3)\fP is 2, that certificate must indicate that
+the server is the server to which you meant to connect, or the connection
+fails. Simply put, it means it has to have the same name in the certificate as
+is in the URL you operate against.
+
+Curl considers the server the intended one when the Common Name field or a
+Subject Alternate Name field in the certificate matches the host name in the
+URL to which you told Curl to connect.
+
+When the \fIverify\fP value is 1, \fIcurl_easy_setopt\fP will return an error
+and the option value will not be changed. It was previously (in 7.28.0 and
+earlier) a debug option of some sorts, but it is no longer supported due to
+frequently leading to programmer mistakes. Future versions will stop returning
+an error for 1 and just treat 1 and 2 the same.
+
+When the \fIverify\fP value is 0, the connection succeeds regardless of the
+names in the certificate. Use that ability with caution!
+
+The default value for this option is 2.
+
+This option controls checking the server's certificate's claimed identity.
+The server could be lying. To control lying, see
+\fICURLOPT_SSL_VERIFYPEER(3)\fP. If libcurl is built against NSS and
+\fICURLOPT_SSL_VERIFYPEER(3)\fP is zero, \fICURLOPT_SSL_VERIFYHOST(3)\fP is
+also set to zero and cannot be overridden.
+.SH DEFAULT
+2
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* Set the default value: strict name check please */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.
+
+If 1 is set as argument, \fICURLE_BAD_FUNCTION_ARGUMENT\fP is returned.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_CAINFO "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
new file mode 100644
index 0000000..81bb593
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_VERIFYPEER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);
+.SH DESCRIPTION
+Pass a long as parameter to enable or disable.
+
+This option determines whether curl verifies the authenticity of the peer's
+certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
+
+When negotiating a TLS or SSL connection, the server sends a certificate
+indicating its identity. Curl verifies whether the certificate is authentic,
+i.e. that you can trust that the server is who the certificate says it is.
+This trust is based on a chain of digital signatures, rooted in certification
+authority (CA) certificates you supply. curl uses a default bundle of CA
+certificates (the path for that is determined at build time) and you can
+specify alternate certificates with the \fICURLOPT_CAINFO(3)\fP option or the
+\fICURLOPT_CAPATH(3)\fP option.
+
+When \fICURLOPT_SSL_VERIFYPEER(3)\fP is enabled, and the verification fails to
+prove that the certificate is authentic, the connection fails. When the
+option is zero, the peer certificate verification succeeds regardless.
+
+Authenticating the certificate is not enough to be sure about the server. You
+typically also want to ensure that the server is the server you mean to be
+talking to. Use \fICURLOPT_SSL_VERIFYHOST(3)\fP for that. The check that the
+host name in the certificate is valid for the host name you're connecting to
+is done independently of the \fICURLOPT_SSL_VERIFYPEER(3)\fP option.
+
+WARNING: disabling verification of the certificate allows bad guys to
+man-in-the-middle the communication without you knowing it. Disabling
+verification makes the communication insecure. Just having encryption on a
+transfer is not enough as you cannot be sure that you are communicating with
+the correct end-point.
+.SH DEFAULT
+By default, curl assumes a value of 1.
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* Set the default value: strict certificate check please */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+If built TLS enabled.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3 b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
new file mode 100644
index 0000000..d7f011a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3
@@ -0,0 +1,53 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_VERIFYSTATUS 3 "04 Dec 2014" "libcurl 7.40.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);
+.SH DESCRIPTION
+Pass a long as parameter set to 1 to enable or 0 to disable.
+
+This option determines whether libcurl verifies the status of the server cert
+using the "Certificate Status Request" TLS extension (aka. OCSP stapling).
+
+Note that if this option is enabled but the server does not support the TLS
+extension, the verification will fail.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.41.0. This option is currently only supported by the OpenSSL, GnuTLS
+and NSS TLS backends.
+.SH RETURN VALUE
+Returns CURLE_OK if OCSP stapling is supported by the SSL backend, otherwise
+returns CURLE_NOT_BUILT_IN.
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_VERIFYHOST "(3), "
+.BR CURLOPT_SSL_VERIFYPEER "(3), "
+.BR CURLOPT_CAINFO "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_STDERR.3 b/docs/libcurl/opts/CURLOPT_STDERR.3
new file mode 100644
index 0000000..8ef1a32
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_STDERR.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_STDERR 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_STDERR \- redirect stderr to another stream
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
+.SH DESCRIPTION
+Pass a FILE * as parameter. Tell libcurl to use this \fIstream\fP instead of
+stderr when showing the progress meter and displaying \fICURLOPT_VERBOSE(3)\fP
+data.
+.SH DEFAULT
+stderr
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+FILE *filep = fopen("dump", "wb");
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ curl_easy_setopt(curl, CURLOPT_STDERR, filep);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
new file mode 100644
index 0000000..941cc48
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_TCP_KEEPALIVE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPALIVE, long probe);
+.SH DESCRIPTION
+Pass a long. If set to 1, TCP keepalive probes will be sent. The delay and
+frequency of these probes can be controlled by the
+\fICURLOPT_TCP_KEEPIDLE(3)\fP and \fICURLOPT_TCP_KEEPINTVL(3)\fP options,
+provided the operating system supports them. Set to 0 (default behavior) to
+disable keepalive probes
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPIDLE "(3), " CURLOPT_TCP_KEEPINTVL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
new file mode 100644
index 0000000..d60a3df
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3
@@ -0,0 +1,61 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_TCP_KEEPIDLE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPIDLE, long delay);
+.SH DESCRIPTION
+Pass a long. Sets the \fIdelay\fP, in seconds, that the operating system will
+wait while the connection is idle before sending keepalive probes. Not all
+operating systems support this option.
+.SH DEFAULT
+?
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* set keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.25.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPALIVE "(3), " CURLOPT_TCP_KEEPINTVL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3 b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
new file mode 100644
index 0000000..42bc0b4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3
@@ -0,0 +1,59 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_TCP_KEEPINTVL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPINTVL, long interval);
+.SH DESCRIPTION
+Pass a long. Sets the interval, in seconds, that the operating system will
+wait between sending keepalive probes. Not all operating systems support this
+option. (Added in 7.25.0)
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* enable TCP keep-alive for this transfer */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
+
+ /* keep-alive idle time to 120 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
+
+ /* interval time between keep-alive probes: 60 seconds */
+ curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TCP_KEEPALIVE "(3), " CURLOPT_TCP_KEEPIDLE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3 b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
new file mode 100644
index 0000000..bd13516
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TCP_NODELAY 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay);
+.SH DESCRIPTION
+Pass a long specifying whether the TCP_NODELAY option is to be set or cleared
+(1 = set, 0 = clear). The option is cleared by default. This will have no
+effect after the connection has been established.
+
+Setting this option will disable TCP's Nagle algorithm. The purpose of this
+algorithm is to try to minimize the number of small packets on the network
+(where "small packets" means TCP segments less than the Maximum Segment Size
+(MSS) for the network).
+
+Maximizing the amount of data sent per TCP segment is good because it
+amortizes the overhead of the send. However, in some cases small segments may
+need to be sent without delay. This is less efficient than sending larger
+amounts of data at a time, and can contribute to congestion on the network if
+overdone.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_TCP_KEEPALIVE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3 b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
new file mode 100644
index 0000000..f5a9bc5
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TELNETOPTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TELNETOPTIONS \- custom telnet options
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,
+ struct curl_slist *cmds);
+.SH DESCRIPTION
+Provide a pointer to a curl_slist with variables to pass to the telnet
+negotiations. The variables should be in the format <option=value>. libcurl
+supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET
+standard for details.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+TELNET
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with TELNET
+.SH RETURN VALUE
+Returns CURLE_OK if TELNET is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_HTTPHEADER "(3), " CURLOPT_QUOTE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3 b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
new file mode 100644
index 0000000..05bc639
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TFTP_BLKSIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TFTP_BLKSIZE \- TFTP block size
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);
+.SH DESCRIPTION
+Specify \fIblocksize\fP to use for TFTP data transmission. Valid range as per
+RFC2348 is 8-65464 bytes. The default of 512 bytes will be used if this option
+is not specified. The specified block size will only be used pending support
+by the remote server. If the server does not return an option acknowledgement
+or returns an option acknowledgement with no blksize, the default of 512 bytes
+will be used.
+.SH DEFAULT
+512
+.SH PROTOCOLS
+TFTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_MAXFILESIZE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMECONDITION.3 b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
new file mode 100644
index 0000000..66c34ff
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMECONDITION.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TIMECONDITION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMECONDITION \- select condition for a time request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMECONDITION, long cond);
+.SH DESCRIPTION
+Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE(3)\fP time
+value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
+or \fICURL_TIMECOND_IFUNMODSINCE\fP.
+
+The last modification time of a file is not always known and in such instances
+this feature will have no effect even if the given time condition would not
+have been met. \fIcurl_easy_getinfo(3)\fP with the
+\fICURLINFO_CONDITION_UNMET\fP option can be used after a transfer to learn if
+a zero-byte successful "transfer" was due to this condition not matching.
+.SH DEFAULT
+CURL_TIMECOND_NONE (0)
+.SH PROTOCOLS
+HTTP, FTP, RTSP, and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEVALUE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
new file mode 100644
index 0000000..6440ffe
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT.3
@@ -0,0 +1,70 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
+.SH DESCRIPTION
+Pass a long as parameter containing \fItimeout\fP - the maximum time in
+seconds that you allow the libcurl transfer operation to take. Normally, name
+lookups can take a considerable time and limiting operations to less than a
+few minutes risk aborting perfectly normal operations. This option may cause
+libcurl to use the SIGALRM signal to timeout system calls.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+
+If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the
+value set last will be used.
+
+Since this puts a hard limit for how long time a request is allowed to take,
+it has limited use in dynamic use cases with varying transfer times. You are
+then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP,
+\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
+implement your own timeout logic.
+.SH DEFAULT
+Default timeout is 0 (zero) which means it never times out during transfer.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete within 20 seconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT_MS "(3), "
+.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3 b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
new file mode 100644
index 0000000..3727133
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3
@@ -0,0 +1,74 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_TIMEOUT_MS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT_MS, long timeout);
+.SH DESCRIPTION
+Pass a long as parameter containing \fItimeout\fP - the maximum time in
+milliseconds that you allow the libcurl transfer operation to take. Normally,
+name lookups can take a considerable time and limiting operations to less than
+a few minutes risk aborting perfectly normal operations. This option may cause
+libcurl to use the SIGALRM signal to timeout system calls.
+
+If libcurl is built to use the standard system name resolver, that portion of
+the transfer will still use full-second resolution for timeouts with a minimum
+timeout allowed of one second.
+
+In unix-like systems, this might cause signals to be used unless
+\fICURLOPT_NOSIGNAL(3)\fP is set.
+
+If both \fICURLOPT_TIMEOUT(3)\fP and \fICURLOPT_TIMEOUT_MS(3)\fP are set, the
+value set last will be used.
+
+Since this puts a hard limit for how long time a request is allowed to take,
+it has limited use in dynamic use cases with varying transfer times. You are
+then advised to explore \fICURLOPT_LOW_SPEED_LIMIT(3)\fP,
+\fICURLOPT_LOW_SPEED_TIME(3)\fP or using \fICURLOPT_PROGRESSFUNCTION(3)\fP to
+implement your own timeout logic.
+.SH DEFAULT
+Default timeout is 0 (zero) which means it never times out during transfer.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* complete within 20000 milliseconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 20000L);
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMEOUT "(3), "
+.BR CURLOPT_CONNECTTIMEOUT "(3), " CURLOPT_LOW_SPEED_LIMIT "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TIMEVALUE.3 b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
new file mode 100644
index 0000000..43a3871
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TIMEVALUE.3
@@ -0,0 +1,45 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TIMEVALUE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TIMEVALUE \- set time value for conditional
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val);
+.SH DESCRIPTION
+Pass a long \fIval\fP as parameter. This should be the time counted as seconds
+since 1 Jan 1970, and the time will be used in a condition as specified with
+\fICURLOPT_TIMECONDITION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP, FTP, RTSP, and FILE
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_TIMECONDITION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
new file mode 100644
index 0000000..1c8697f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TLSAUTH_PASSWORD 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);
+.SH DESCRIPTION
+Pass a char * as parameter, which should point to the zero terminated password
+to use for the TLS authentication method specified with the
+\fICURLOPT_TLSAUTH_TYPE(3)\fP option. Requires that the
+\fICURLOPT_TLSAUTH_USERNAME(3)\fP option also be set.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.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_TLSAUTH_TYPE "(3), " CURLOPT_TLSAUTH_USERNAME "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
new file mode 100644
index 0000000..b5cdd5b
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3
@@ -0,0 +1,52 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TLSAUTH_TYPE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, long bitmask);
+.SH DESCRIPTION
+Pass a long as parameter, which is set to a bitmask, to tell libcurl which
+authentication method(s) you want it to use for TLS authentication.
+
+.IP CURL_TLSAUTH_SRP
+TLS-SRP authentication. Secure Remote Password authentication for TLS is
+defined in RFC5054 and provides mutual authentication if both sides have a
+shared secret. To use TLS-SRP, you must also set the
+\fICURLOPT_TLSAUTH_USERNAME(3)\fP and \fICURLOPT_TLSAUTH_PASSWORD(3)\fP
+options.
+.SH DEFAULT
+CURL_TLSAUTH_NONE (0)
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+You need to build libcurl with GnuTLS or OpenSSL with TLS-SRP support for this
+to work. Added in 7.21.4
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_TLSAUTH_USERNAME "(3), " CURLOPT_TLSAUTH_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3 b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
new file mode 100644
index 0000000..c5bb2df
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3
@@ -0,0 +1,47 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TLSAUTH_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char *user);
+.SH DESCRIPTION
+Pass a char * as parameter, which should point to the zero terminated username
+to use for the TLS authentication method specified with the
+\fICURLOPT_TLSAUTH_TYPE(3)\fP option. Requires that the
+\fICURLOPT_TLSAUTH_PASSWORD(3)\fP option also be set.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS-based protocols
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.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_TLSAUTH_TYPE "(3), " CURLOPT_TLSAUTH_PASSWORD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3 b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
new file mode 100644
index 0000000..6e62413
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3
@@ -0,0 +1,51 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TRANSFERTEXT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFERTEXT, long text);
+.SH DESCRIPTION
+A parameter set to 1 tells the library to use ASCII mode for FTP transfers,
+instead of the default binary transfer. For win32 systems it does not set the
+stdout to binary mode. This option can be usable when transferring text data
+between systems with different views on certain characters, such as newlines
+or similar.
+
+libcurl does not do a complete ASCII conversion when doing ASCII transfers
+over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
+simply sets the mode to ASCII and performs a standard transfer.
+.SH DEFAULT
+0, disabled
+.SH PROTOCOLS
+FTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with FTP
+.SH RETURN VALUE
+Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_CRLF "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3 b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
new file mode 100644
index 0000000..7f2a11c
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3
@@ -0,0 +1,54 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TRANSFER_ENCODING 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFER_ENCODING, long enable);
+.SH DESCRIPTION
+Pass a long set to 1 to \fIenable\fP or 0 to disable.
+
+Adds a request for compressed Transfer Encoding in the outgoing HTTP
+request. If the server supports this and so desires, it can respond with the
+HTTP response sent using a compressed Transfer-Encoding that will be
+automatically uncompressed by libcurl on reception.
+
+Transfer-Encoding differs slightly from the Content-Encoding you ask for with
+\fBCURLOPT_ACCEPT_ENCODING(3)\fP in that a Transfer-Encoding is strictly meant
+to be for the transfer and thus MUST be decoded before the data arrives in the
+client. Traditionally, Transfer-Encoding has been much less used and supported
+by both HTTP clients and HTTP servers.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.21.6
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_ACCEPT_ENCODING "(3), " CURLOPT_HTTP_TRANSFER_DECODING "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3 b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
new file mode 100644
index 0000000..a659cd2
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_UNIX_SOCKET_PATH 3 "09 Oct 2014" "libcurl 7.40.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNIX_SOCKET_PATH, char *path);
+.SH DESCRIPTION
+Enables the use of Unix domain sockets as connection endpoint and sets the path
+to \fIpath\fP. If \fIpath\fP is NULL, then Unix domain sockets are disabled. An
+empty string will result in an error at some point, it will not disable use of
+Unix domain sockets.
+
+When enabled, cURL will connect to the Unix domain socket instead of
+establishing a TCP connection to a host. Since no TCP connection is created,
+cURL does not need to resolve the DNS hostname in the URL.
+
+The maximum path length on Cygwin, Linux and Solaris is 107. On other platforms
+it might be even less.
+
+Proxy and TCP options such as
+.BR CURLOPT_TCP_NODELAY "(3)
+are not supported. Proxy options such as
+.BR CURLOPT_PROXY "(3)
+have no effect either as these are TCP-oriented, and asking a proxy server to
+connect to a certain Unix domain socket is not possible.
+.SH DEFAULT
+Default is NULL, meaning that no Unix domain sockets are used.
+.SH PROTOCOLS
+All protocols except for file:// and FTP are supported in theory. HTTP, IMAP,
+POP3 and SMTP should in particular work (including their SSL/TLS variants).
+.SH EXAMPLE
+Given that you have an nginx server running, listening on /tmp/nginx.sock, you
+can request a HTTP resource with:
+
+.nf
+ curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, "/tmp/nginx.sock");
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
+.fi
+
+If you are on Linux and somehow have a need for paths larger than 107 bytes, you
+could use the proc filesystem to bypass the limitation:
+
+.nf
+ int dirfd = open(long_directory_path_to_socket, O_DIRECTORY | O_RDONLY);
+ char path[108];
+ snprintf(path, sizeof(path), "/proc/self/fd/%d/nginx.sock", dirfd);
+ curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, path);
+ /* Be sure to keep dirfd valid until you discard the handle */
+.fi
+.SH AVAILABILITY
+Since 7.40.0.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_OPENSOCKETFUNCTION "(3), " unix "(7), "
diff --git a/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3 b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
new file mode 100644
index 0000000..68c3860
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3
@@ -0,0 +1,48 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_UNRESTRICTED_AUTH 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNRESTRICTED_AUTH,
+ long goahead);
+.SH DESCRIPTION
+A long parameter set to 1 tells libcurl it can continue to send authentication
+(user+password) credentials when following locations, even when hostname
+changed. This option is meaningful only when setting
+\fICURLOPT_FOLLOWLOCATION(3)\fP.
+.SH DEFAULT
+0
+.SH PROTOCOLS
+HTTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Along with HTTP
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FOLLOWLOCATION "(3), " CURLOPT_USERPWD "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_UPLOAD.3 b/docs/libcurl/opts/CURLOPT_UPLOAD.3
new file mode 100644
index 0000000..d24bd28
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_UPLOAD.3
@@ -0,0 +1,78 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_UPLOAD 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_UPLOAD \- enable data upload
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UPLOAD, long upload);
+.SH DESCRIPTION
+The long parameter \fIupload\fP set to 1 tells the library to prepare for and
+perform an upload. The \fICURLOPT_READDATA(3)\fP and
+\fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP options are
+also interesting for uploads. If the protocol is HTTP, uploading means using
+the PUT request unless you tell libcurl otherwise.
+
+Using PUT 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.
+
+If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
+size before starting the transfer if you use chunked encoding. You enable this
+by adding a header like "Transfer-Encoding: chunked" with
+\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
+must specify the size.
+.SH DEFAULT
+0, default is download
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* enable uploading */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* specify target */
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile");
+
+ /* now specify which pointer to pass to our callback */
+ curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
+
+ /* Set the size of the file to upload */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)fsize);
+
+ /* Now run off and do what you've been told! */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_PUT "(3), " CURLOPT_READFUNCTION "(3), "
+.BR CURLOPT_INFILESIZE_LARGE "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_URL.3 b/docs/libcurl/opts/CURLOPT_URL.3
new file mode 100644
index 0000000..6e4824a
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_URL.3
@@ -0,0 +1,333 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_URL 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_URL \- provide the URL to use in the request
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_URL, char *URL);
+.SH DESCRIPTION
+Pass in a pointer to the \fIURL\fP to work with. The parameter should be a
+char * to a zero terminated string which must be URL-encoded in the following
+format:
+
+scheme://host:port/path
+
+For a greater explanation of the format please see RFC3986.
+
+libcurl doesn't validate the syntax or use this variable until the transfer is
+issued. Even if you set a crazy value here, \fIcurl_easy_setopt(3)\fP will
+still return \fICURLE_OK\fP.
+
+If the given URL lacks the scheme (such as "http://" or "ftp://" etc) then
+libcurl will attempt to resolve the protocol based on one of the following
+given host names: HTTP, FTP, DICT, LDAP, IMAP, POP3 or SMTP
+
+Should the protocol, either that specified by the scheme or deduced by libcurl
+from the host name, not be supported by libcurl then
+\fICURLE_UNSUPPORTED_PROTOCOL\fP will be returned from either the
+\fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP functions when you
+call them. Use \fIcurl_version_info(3)\fP for detailed information of which
+protocols are supported by the build of libcurl you are using.
+
+\fICURLOPT_PROTOCOLS(3)\fP can be used to limit what protocols libcurl will
+use for this transfer, independent of what libcurl has been compiled to
+support. That may be useful if you accept the URL from an external source and
+want to limit the accessibility.
+
+\fICURLOPT_URL(3)\fP is the only option that \fBmust\fP be set before a
+transfer is started.
+
+The host part of the URL contains the address of the server that you want to
+connect to. This can be the fully qualified domain name of the server, the
+local network name of the machine on your network or the IP address of the
+server or machine represented by either an IPv4 or IPv6 address. For example:
+
+http://www.example.com/
+
+http://hostname/
+
+http://192.168.0.1/
+
+http://[2001:1890:1112:1::20]/
+
+It is also possible to specify the user name, password and any supported login
+options as part of the host, for the following protocols, when connecting to
+servers that require authentication:
+
+http://user:[email protected]
+
+ftp://user:[email protected]
+
+smb://domain%2fuser:[email protected]
+
+imap://user:password;[email protected]
+
+pop3://user:password;[email protected]
+
+smtp://user:password;[email protected]
+
+At present only IMAP, POP3 and SMTP support login options as part of the host.
+For more information about the login options in URL syntax please see RFC2384,
+RFC5092 and IETF draft draft-earhart-url-smtp-00.txt (Added in 7.31.0).
+
+The port is optional and when not specified libcurl will use the default port
+based on the determined or specified protocol: 80 for HTTP, 21 for FTP and 25
+for SMTP, etc. The following examples show how to specify the port:
+
+http://www.example.com:8080/ - This will connect to a web server using port
+8080 rather than 80.
+
+smtp://mail.example.com:587/ - This will connect to a SMTP server on the
+alternative mail port.
+
+The path part of the URL is protocol specific and whilst some examples are
+given below this list is not conclusive:
+
+.IP HTTP
+The path part of a HTTP request specifies the file to retrieve and from what
+directory. If the directory is not specified then the web server's root
+directory is used. If the file is omitted then the default document will be
+retrieved for either the directory specified or the root directory. The exact
+resource returned for each URL is entirely dependent on the server's
+configuration.
+
+http://www.example.com - This gets the main page from the web server.
+
+http://www.example.com/index.html - This returns the main page by explicitly
+requesting it.
+
+http://www.example.com/contactus/ - This returns the default document from
+the contactus directory.
+
+.IP FTP
+The path part of an FTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the directory is omitted then
+the directory listing for the root / home directory will be returned.
+
+ftp://ftp.example.com - This retrieves the directory listing for the root
+directory.
+
+ftp://ftp.example.com/readme.txt - This downloads the file readme.txt from the
+root directory.
+
+ftp://ftp.example.com/libcurl/readme.txt - This downloads readme.txt from the
+libcurl directory.
+
+ftp://user:[email protected]/readme.txt - This retrieves the readme.txt
+file from the user's home directory. When a username and password is
+specified, everything that is specified in the path part is relative to the
+user's home directory. To retrieve files from the root directory or a
+directory underneath the root directory then the absolute path must be
+specified by prepending an additional forward slash to the beginning of the
+path.
+
+ftp://user:[email protected]//readme.txt - This retrieves the readme.txt
+from the root directory when logging in as a specified user.
+
+.IP SMTP
+The path part of a SMTP request specifies the host name to present during
+communication with the mail server. If the path is omitted then libcurl will
+attempt to resolve the local computer's host name. However, this may not
+return the fully qualified domain name that is required by some mail servers
+and specifying this path allows you to set an alternative name, such as
+your machine's fully qualified domain name, which you might have obtained
+from an external function such as gethostname or getaddrinfo.
+
+smtp://mail.example.com - This connects to the mail server at example.com and
+sends your local computer's host name in the HELO / EHLO command.
+
+smtp://mail.example.com/client.example.com - This will send client.example.com in
+the HELO / EHLO command to the mail server at example.com.
+
+.IP POP3
+The path part of a POP3 request specifies the message ID to retrieve. If the
+ID is not specified then a list of waiting messages is returned instead.
+
+pop3://user:[email protected] - This lists the available messages for
+the user
+
+pop3://user:[email protected]/1 - This retrieves the first message for
+the user
+
+.IP IMAP
+The path part of an IMAP request not only specifies the mailbox to list (Added
+in 7.30.0) or select, but can also be used to check the UIDVALIDITY of the
+mailbox, to specify the UID, SECTION (Added in 7.30.0) and PARTIAL octets
+(Added in 7.37.0) of the message to fetch and to specify what messages to
+search for (Added in 7.37.0).
+
+imap://user:[email protected] - Performs a top level folder list
+
+imap://user:[email protected]/INBOX - Performs a folder list on the
+user's inbox
+
+imap://user:[email protected]/INBOX/;UID=1 - Selects the user's inbox
+and fetches message 1
+
+imap://user:[email protected]/INBOX;UIDVALIDITY=50/;UID=2 - Selects
+the user's inbox, checks the UIDVALIDITY of the mailbox is 50 and fetches
+message 2 if it is
+
+imap://user:[email protected]/INBOX/;UID=3/;SECTION=TEXT - Selects the
+user's inbox and fetches the text portion of message 3
+
+imap://user:[email protected]/INBOX/;UID=4/;PARTIAL=0.1024 - Selects
+the user's inbox and fetches the first 1024 octets of message 4
+
+imap://user:[email protected]/INBOX?NEW - Selects the user's inbox and
+checks for NEW messages
+
+imap://user:[email protected]/INBOX?SUBJECT%20shadows - Selects the
+user's inbox and searches for messages containing "shadows" in the subject
+line
+
+For more information about the individual components of an IMAP URL please
+see RFC5092.
+
+.IP SCP
+The path part of a SCP request specifies the file to retrieve and from what
+directory. The file part may not be omitted. The file is taken as an absolute
+path from the root directory on the server. To specify a path relative to the
+user's home directory on the server, prepend ~/ to the path portion. If the
+user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
+
+scp://[email protected]/etc/issue - This specifies the file /etc/issue
+
+scp://example.com/~/my-file - This specifies the file my-file in the
+user's home directory on the server
+
+.IP SFTP
+The path part of a SFTP request specifies the file to retrieve and from what
+directory. If the file part is omitted then libcurl downloads the directory
+listing for the directory specified. If the path ends in a / then a directory
+listing is returned instead of a file. If the path is omitted entirely then
+the directory listing for the root / home directory will be returned. If the
+user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option.
+
+sftp://user:[email protected]/etc/issue - This specifies the file
+/etc/issue
+
+sftp://[email protected]/~/my-file - This specifies the file my-file in the
+user's home directory
+
+sftp://ssh.example.com/~/Documents/ - This requests a directory listing
+of the Documents directory under the user's home directory
+
+.IP SMB
+The path part of a SMB request specifies the file to retrieve and from what
+share and directory or the share to upload to and as such, may not be omitted.
+If the user name is not embedded in the URL, it can be set with the
+\fICURLOPT_USERPWD(3)\fP or \fICURLOPT_USERNAME(3)\fP option. If the user name
+is embedded in the URL then it must contain the domain name and as such, the
+backslash must be URL encoded as %2f.
+
+smb://server.example.com/files/issue - This specifies the file "issue" located
+in the root of the "files" share
+
+smb://server.example.com/files/ -T issue - This specifies the file "issue" will
+be uploaded to the root of the "files" share.
+
+.IP LDAP
+The path part of a LDAP request can be used to specify the: Distinguished
+Name, Attributes, Scope, Filter and Extension for a LDAP search. Each field
+is separated by a question mark and when that field is not required an empty
+string with the question mark separator should be included.
+
+ldap://ldap.example.com/o=My%20Organisation - This will perform a LDAP search
+with the DN as My Organisation.
+
+ldap://ldap.example.com/o=My%20Organisation?postalAddress - This will perform
+the same search but will only return postalAddress attributes.
+
+ldap://ldap.example.com/?rootDomainNamingContext - This specifies an empty DN
+and requests information about the rootDomainNamingContext attribute for an
+Active Directory server.
+
+For more information about the individual components of a LDAP URL please
+see RFC4516.
+.IP RTMP
+There's no official URL spec for RTMP so libcurl uses the URL syntax supported
+by the underlying librtmp library. It has a syntax where it wants a
+traditional URL, followed by a space and a series of space-separated
+name=value pairs.
+
+While space is not typically a "legal" letter, libcurl accepts them. When a
+user wants to pass in a '#' (hash) character it will be treated as a fragment
+and get cut off by libcurl if provided literally. You will instead have to
+escape it by providing it as backslash and its ASCII value in hexadecimal:
+"\\23".
+.SH DEFAULT
+There is no default URL. If this option isn't set, no transfer can be
+performed.
+.SH SECURITY CONCERNS
+Applications may at times find it convenient to allow users to specify URLs
+for various purposes and that string would then end up fed to this option.
+
+Getting a URL from an external untrusted party will bring reasons for several
+security concerns:
+
+If you have an application that runs as or in a server application, getting an
+unfiltered URL can easily trick your application to access a local resource
+instead of a remote. Protecting yourself against localhost accesses is very
+hard when accepting user provided URLs.
+
+Such custom URLs can also access other ports than you planned as port numbers
+are part of the regular URL format. The combination of a local host and a
+custom port number can allow external users to play tricks with your local
+services.
+
+Accepting external URLs may also use other protocols than http:// or other
+common ones. Restrict what accept with \fICURLOPT_PROTOCOLS(3)\fP.
+
+User provided URLs can also be made to point to sites that redirect further on
+(possibly to other protocols too). Consider your
+\fICURLOPT_FOLLOWLOCATION(3)\fP and \fICURLOPT_REDIR_PROTOCOLS(3)\fP settings.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+POP3 and SMTP were added in 7.31.0
+.SH RETURN VALUE
+Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient
+heap space.
+
+Note that \fIcurl_easy_setopt(3)\fP won't actually parse the given string so
+given a bad URL, it will not be detected until \fIcurl_easy_perform(3)\fP or
+similar is called.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_PROTOCOLS "(3), "
+.BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
+.BR curl_easy_perform "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_USERAGENT.3 b/docs/libcurl/opts/CURLOPT_USERAGENT.3
new file mode 100644
index 0000000..4d7036d
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERAGENT.3
@@ -0,0 +1,56 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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_USERAGENT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USERAGENT \- set HTTP user-agent header
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERAGENT, char *ua);
+.SH DESCRIPTION
+Pass a pointer to a zero terminated string as parameter. It will be used to
+set the User-Agent: header in the HTTP request sent to the remote server. This
+can be used to fool servers or scripts. You can also set any custom header
+with \fICURLOPT_HTTPHEADER(3)\fP.
+.SH DEFAULT
+NULL, no User-Agent: header is used by default.
+.SH PROTOCOLS
+HTTP, HTTPS
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "Dark Secret Ninja/1.0");
+
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+As long as HTTP is supported
+.SH RETURN VALUE
+Returns CURLE_OK if HTTP is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_REFERER "(3), " CURLOPT_HTTPHEADER "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_USERNAME.3 b/docs/libcurl/opts/CURLOPT_USERNAME.3
new file mode 100644
index 0000000..7546f74
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERNAME.3
@@ -0,0 +1,71 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_USERNAME 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USERNAME \- user name to use in authentication
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERNAME,
+ char *username);
+.SH DESCRIPTION
+Pass a char * as parameter, which should be pointing to the zero terminated
+user name to use for the transfer.
+
+\fBCURLOPT_USERNAME(3)\fP sets the user name to be used in protocol
+authentication. You should not use this option together with the (older)
+\fICURLOPT_USERPWD(3)\fP option.
+
+When using Kerberos V5 authentication with a Windows based server, you should
+include 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 include the domain name use either Down-Level Logon Name or UPN (User
+Principal Name) formats. For example, EXAMPLE\\user and [email protected]
+respectively.
+
+Some HTTP servers (on Windows) support inclusion of the domain for Basic
+authentication as well.
+
+To specify the password and login options, along with the user name, use the
+\fICURLOPT_PASSWORD(3)\fP and \fICURLOPT_LOGIN_OPTIONS(3)\fP options.
+.SH DEFAULT
+blank
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.19.1
+.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_USERPWD "(3), " CURLOPT_PASSWORD "(3), "
+.BR CURLOPT_HTTPAUTH "(3), " CURLOPT_PROXYAUTH "(3)"
diff --git a/docs/libcurl/opts/CURLOPT_USERPWD.3 b/docs/libcurl/opts/CURLOPT_USERPWD.3
new file mode 100644
index 0000000..22e920f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USERPWD.3
@@ -0,0 +1,76 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 <curl/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 [email protected]
+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.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+Most
+.SH EXAMPLE
+TODO
+.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), "
diff --git a/docs/libcurl/opts/CURLOPT_USE_SSL.3 b/docs/libcurl/opts/CURLOPT_USE_SSL.3
new file mode 100644
index 0000000..348f1b0
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_USE_SSL.3
@@ -0,0 +1,69 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_USE_SSL 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_USE_SSL \- request using SSL / TLS for the transfer
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USE_SSL, long level);
+.SH DESCRIPTION
+Pass a long using one of the values from below, to make libcurl use your
+desired \fIlevel\fP of SSL for the transfer.
+
+These are all protocols that start out plain text and get "upgraded" to SSL
+using the STARTTLS command.
+
+This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc.
+.IP CURLUSESSL_NONE
+Don't attempt to use SSL.
+.IP CURLUSESSL_TRY
+Try using SSL, proceed as normal otherwise.
+.IP CURLUSESSL_CONTROL
+Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
+.IP CURLUSESSL_ALL
+Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
+.SH DEFAULT
+CURLUSESSL_NONE
+.SH PROTOCOLS
+FTP, SMTP, POP3, IMAP
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/file.ext");
+
+ /* require use of SSL for this, or fail */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.11.0. This option was known as CURLOPT_FTP_SSL up to 7.16.4, and
+the constants were known as CURLFTPSSL_*
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_SSLVERSION "(3), " CURLOPT_SSL_OPTIONS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_VERBOSE.3 b/docs/libcurl/opts/CURLOPT_VERBOSE.3
new file mode 100644
index 0000000..732b8c4
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_VERBOSE.3
@@ -0,0 +1,63 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_VERBOSE 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_VERBOSE \- set verbose mode on/off
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff);
+.SH DESCRIPTION
+Set the \fIonoff\fP parameter to 1 to make the library display a lot of
+verbose information about its operations on this \fIhandle\fP. Very useful for
+libcurl and/or protocol debugging and understanding. The verbose information
+will be sent to stderr, or the stream set with \fICURLOPT_STDERR(3)\fP.
+
+You hardly ever want this set in production use, you will almost always want
+this when you debug/report problems.
+
+To also get all the protocol data sent and received, consider using the
+\fICURLOPT_DEBUGFUNCTION(3)\fP.
+.SH DEFAULT
+0, meaning disabled.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* ask libcurl to show us the verbose output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
new file mode 100644
index 0000000..b567045
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
@@ -0,0 +1,87 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_WILDCARDMATCH 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WILDCARDMATCH, long onoff);
+.SH DESCRIPTION
+Set \fIonoff\fP to 1 if you want to transfer multiple files according to a
+file name pattern. The pattern can be specified as part of the
+\fICURLOPT_URL(3)\fP option, using an fnmatch-like pattern (Shell Pattern
+Matching) in the last part of URL (file name).
+
+By default, libcurl uses its internal wildcard matching implementation. You
+can provide your own matching function by the
+\fICURLOPT_FNMATCH_FUNCTION(3)\fP option.
+
+A brief introduction of its syntax follows:
+.RS
+.IP "* - ASTERISK"
+\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
+directory)
+.RE
+.RS
+.IP "? - QUESTION MARK"
+Question mark matches any (exactly one) character.
+
+\&ftp://example.com/some/path/\fBphoto?.jpeg\fP
+.RE
+.RS
+.IP "[ - BRACKET EXPRESSION"
+The left bracket opens a bracket expression. The question mark and asterisk have
+no special meaning in a bracket expression. Each bracket expression ends by the
+right bracket and matches exactly one character. Some examples follow:
+
+\fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
+
+\fB[abc]\fP - character enumeration
+
+\fB[^abc]\fP or \fB[!abc]\fP - negation
+
+\fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
+\fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
+\fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
+
+\fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
+characters have no special purpose.
+
+\fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
+
+Using the rules above, a file name pattern can be constructed:
+
+\&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
+.RE
+.PP
+.SH PROTOCOLS
+This feature is only supported for FTP download.
+.SH EXAMPLE
+See http://curl.haxx.se/libcurl/c/ftp-wildcard.html
+.SH AVAILABILITY
+Added in 7.21.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_FNMATCH_FUNCTION "(3), " CURLOPT_URL "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WRITEDATA.3 b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
new file mode 100644
index 0000000..0b7a502
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WRITEDATA.3
@@ -0,0 +1,60 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_WRITEDATA 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WRITEDATA \- custom pointer passed to the write callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEDATA, void *pointer);
+.SH DESCRIPTION
+A data \fIpointer\fP to pass to the write callback. If you use the
+\fICURLOPT_WRITEFUNCTION(3)\fP option, this is the pointer you'll get in that
+callback's 4th argument. If you don't use a write callback, you must make
+\fIpointer\fP a 'FILE *' (cast to 'void *') as libcurl will pass this to
+\fIfwrite(3)\fP when writing data.
+
+The internal \fICURLOPT_WRITEFUNCTION(3)\fP will write the data to the FILE *
+given with this option, or to stdout if this option hasn't been set.
+
+If you're using libcurl as a win32 DLL, you \fBMUST\fP use the
+\fICURLOPT_WRITEFUNCTION(3)\fP if you set this option or you will experience
+crashes.
+.SH DEFAULT
+By default, this is a FILE * to stdout.
+.SH PROTOCOLS
+Used for all protocols.
+.SH EXAMPLE
+A common technique is to use the write callback to store the incoming data
+into a dynamically growing allocated buffer, and then this
+\fICURLOPT_WRITEDATA(3)\fP is used to point to a struct or the buffer to store
+data in. Like in the getinmemory example:
+http://curl.haxx.se/libcurl/c/getinmemory.html
+.SH AVAILABILITY
+Available in all libcurl versions. This option was formerly known as
+\fICURLOPT_FILE\fP, the name \fICURLOPT_WRITEDATA(3)\fP was introduced in
+7.9.7.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEFUNCTION "(3), " CURLOPT_READDATA "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
new file mode 100644
index 0000000..f5a45a3
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_WRITEFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_WRITEFUNCTION \- set callback for writing received data
+.SH SYNOPSIS
+.nf
+#include <curl/curl.h>
+
+size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEFUNCTION, write_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl as soon as there is data
+received that needs to be saved. \fIptr\fP points to the delivered data, and
+the size of that data is \fIsize\fP multiplied with \fInmemb\fP.
+
+The callback function will be passed as much data as possible in all invokes,
+but you must not make any assumptions. It may be one byte, it may be
+thousands. The maximum amount of body data that will be passed to the write
+callback is defined in the curl.h header file: \fICURL_MAX_WRITE_SIZE\fP (the
+usual default is 16K). If \fICURLOPT_HEADER(3)\fP is enabled, which makes
+header data get passed to the write callback, you can get up to
+\fICURL_MAX_HTTP_HEADER\fP bytes of header data passed into it. This usually
+means 100K.
+
+This function may be called with zero bytes data if the transferred file is
+empty.
+
+The data passed to this function will not be zero terminated!
+
+Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA(3)\fP option.
+
+Your callback should return the number of bytes actually taken care of. If
+that amount differs from the amount passed to your callback function, it'll
+signal an error condition to the library. This will cause the transfer to get
+aborted and the libcurl function used will return \fICURLE_WRITE_ERROR\fP.
+
+If your callback function returns CURL_WRITEFUNC_PAUSE it will cause this
+transfer to become paused. See \fIcurl_easy_pause(3)\fP for further details.
+
+Set this option to NULL to get the internal default function used instead of
+your callback. The internal default function will write the data to the FILE *
+given with \fICURLOPT_WRITEDATA(3)\fP.
+.SH DEFAULT
+libcurl will use 'fwrite' as a callback by default.
+.SH PROTOCOLS
+For all protocols
+.SH AVAILABILITY
+Support for the CURL_WRITEFUNC_PAUSE return code was added in version 7.18.0.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH EXAMPLE
+A common technique is to use this callback to store the incoming data into a
+dynamically growing allocated buffer. Like in the getinmemory example:
+http://curl.haxx.se/libcurl/c/getinmemory.html
+.SH "SEE ALSO"
+.BR CURLOPT_WRITEDATA "(3), " CURLOPT_READFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFODATA.3 b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
new file mode 100644
index 0000000..b2c170f
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XFERINFODATA.3
@@ -0,0 +1,46 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_XFERINFODATA 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFODATA, void *pointer);
+.SH DESCRIPTION
+Pass a \fIpointer\fP that will be untouched by libcurl and passed as the first
+argument in the progress callback set with \fICURLOPT_XFERINFOFUNCTION(3)\fP.
+
+This is an alias for \fICURLOPT_PROGRESSDATA(3)\fP.
+.SH DEFAULT
+The default value of this parameter is NULL.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Added in 7.32.0
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_XFERINFOFUNCTION "(3), " CURLOPT_XFERINFOFUNCTION "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3 b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
new file mode 100644
index 0000000..cad8118
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3
@@ -0,0 +1,81 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_XFERINFOFUNCTION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_XFERINFOFUNCTION \- callback to progress meter function
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+int progress_callback(void *clientp,
+ curl_off_t dltotal,
+ curl_off_t dlnow,
+ curl_off_t ultotal,
+ curl_off_t ulnow);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFOFUNCTION, progress_callback);
+.SH DESCRIPTION
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This function gets called by libcurl instead of its internal equivalent with a
+frequent interval. While data is being transferred it will be called very
+frequently, and during slow periods like when nothing is being transferred it
+can slow down to about one call per second.
+
+\fIclientp\fP is the pointer set with \fICURLOPT_XFERINFODATA(3)\fP, it is not
+used by libcurl but is only passed along from the application to the callback.
+
+The callback gets told how much data libcurl will transfer and has
+transferred, in number of bytes. \fIdltotal\fP is the total number of bytes
+libcurl expects to download in this transfer. \fIdlnow\fP is the number of
+bytes downloaded so far. \fIultotal\fP is the total number of bytes libcurl
+expects to upload in this transfer. \fIulnow\fP is the number of bytes
+uploaded so far.
+
+Unknown/unused argument values passed to the callback will be set to zero
+(like if you only download data, the upload size will remain 0). Many times
+the callback will be called one or more times first, before it knows the data
+sizes so a program must be made to handle that.
+
+Returning a non-zero value from this callback will cause libcurl to abort the
+transfer and return \fICURLE_ABORTED_BY_CALLBACK\fP.
+
+If you transfer data with the multi interface, this function will not be
+called during periods of idleness unless you call the appropriate libcurl
+function that performs transfers.
+
+\fICURLOPT_NOPROGRESS(3)\fP must be set to 0 to make this function actually
+get called.
+.SH DEFAULT
+By default, libcurl has an internal progress meter. That's rarely wanted by
+users.
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+http://curl.haxx.se/libcurl/c/progressfunc.html
+.SH AVAILABILITY
+Added in 7.32.0. This callback replaces \fICURLOPT_PROGRESSFUNCTION(3)\fP
+.SH RETURN VALUE
+Returns CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_XFERINFODATA "(3), " CURLOPT_NOPROGRESS "(3), "
diff --git a/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3 b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
new file mode 100644
index 0000000..2644c88
--- /dev/null
+++ b/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3
@@ -0,0 +1,49 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_XOAUTH2_BEARER 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XOAUTH2_BEARER, char *token);
+.SH DESCRIPTION
+Pass a char * as parameter, which should point to the zero terminated OAuth
+2.0 Bearer Access Token for use with IMAP, POP3 and SMTP servers that support
+the OAuth 2.0 Authorization Framework.
+
+Note: The user name used to generate the Bearer Token should be supplied via
+the \fICURLOPT_USERNAME(3)\fP option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+IMAP, POP3 and SMTP
+.SH EXAMPLE
+TODO
+.SH AVAILABILITY
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_OUT_OF_MEMORY if there was insufficient heap space.
+.SH "SEE ALSO"
+.BR CURLOPT_MAIL_AUTH "(3), " CURLOPT_USERNAME "(3), "
diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am
new file mode 100644
index 0000000..5517811
--- /dev/null
+++ b/docs/libcurl/opts/Makefile.am
@@ -0,0 +1,355 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
+
+AUTOMAKE_OPTIONS = foreign no-dependencies
+
+man_MANS = CURLOPT_ACCEPT_ENCODING.3 CURLOPT_ACCEPTTIMEOUT_MS.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_CONNECT_ONLY.3 \
+ CURLOPT_CONNECTTIMEOUT.3 CURLOPT_CONNECTTIMEOUT_MS.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_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_FTP_ACCOUNT.3 \
+ CURLOPT_FTP_ALTERNATIVE_TO_USER.3 CURLOPT_FTP_CREATE_MISSING_DIRS.3 \
+ CURLOPT_FTP_FILEMETHOD.3 CURLOPT_FTPPORT.3 \
+ CURLOPT_FTP_RESPONSE_TIMEOUT.3 CURLOPT_FTP_SKIP_PASV_IP.3 \
+ CURLOPT_FTPSSLAUTH.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_HTTP_CONTENT_DECODING.3 CURLOPT_HTTPGET.3 \
+ CURLOPT_HTTPHEADER.3 CURLOPT_HTTPPOST.3 CURLOPT_HTTPPROXYTUNNEL.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_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_MAX_RECV_SPEED_LARGE.3 CURLOPT_MAXREDIRS.3 \
+ CURLOPT_MAX_SEND_SPEED_LARGE.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_PINNEDPUBLICKEY.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_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_PROXY_TRANSFER_MODE.3 CURLOPT_PROXYTYPE.3 \
+ CURLOPT_PROXYUSERNAME.3 CURLOPT_PROXYUSERPWD.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_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_SHARE.3 CURLOPT_SOCKOPTDATA.3 \
+ CURLOPT_SOCKOPTFUNCTION.3 CURLOPT_SOCKS5_GSSAPI_NEC.3 \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.3 CURLOPT_SSH_AUTH_TYPES.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_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_SSLENGINE.3 \
+ CURLOPT_SSLENGINE_DEFAULT.3 CURLOPT_SSL_FALSESTART.3 CURLOPT_SSLKEY.3 \
+ CURLOPT_SSLKEYTYPE.3 CURLOPT_SSL_OPTIONS.3 \
+ CURLOPT_SSL_SESSIONID_CACHE.3 CURLOPT_SSL_VERIFYHOST.3 \
+ CURLOPT_SSL_VERIFYPEER.3 CURLOPT_SSL_VERIFYSTATUS.3 \
+ CURLOPT_SSLVERSION.3 CURLOPT_STDERR.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_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_TRANSFER_ENCODING.3 \
+ CURLOPT_TRANSFERTEXT.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 \
+ 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_SOCKETDATA.3 CURLMOPT_SOCKETFUNCTION.3 CURLMOPT_TIMERDATA.3 \
+ CURLMOPT_TIMERFUNCTION.3 CURLOPT_UNIX_SOCKET_PATH.3 \
+ CURLOPT_PATH_AS_IS.3 CURLOPT_PROXY_SERVICE_NAME.3 \
+ CURLOPT_SERVICE_NAME.3 CURLOPT_PIPEWAIT.3
+
+HTMLPAGES = CURLOPT_ACCEPT_ENCODING.html CURLOPT_ACCEPTTIMEOUT_MS.html \
+ CURLOPT_ADDRESS_SCOPE.html CURLOPT_APPEND.html \
+ CURLOPT_AUTOREFERER.html CURLOPT_BUFFERSIZE.html CURLOPT_CAINFO.html \
+ CURLOPT_CAPATH.html CURLOPT_CERTINFO.html \
+ CURLOPT_CHUNK_BGN_FUNCTION.html CURLOPT_CHUNK_DATA.html \
+ CURLOPT_CHUNK_END_FUNCTION.html CURLOPT_CLOSESOCKETDATA.html \
+ CURLOPT_CLOSESOCKETFUNCTION.html CURLOPT_CONNECT_ONLY.html \
+ CURLOPT_CONNECTTIMEOUT.html CURLOPT_CONNECTTIMEOUT_MS.html \
+ CURLOPT_CONV_FROM_NETWORK_FUNCTION.html \
+ CURLOPT_CONV_FROM_UTF8_FUNCTION.html \
+ CURLOPT_CONV_TO_NETWORK_FUNCTION.html CURLOPT_COOKIE.html \
+ CURLOPT_COOKIEFILE.html CURLOPT_COOKIEJAR.html CURLOPT_COOKIELIST.html \
+ CURLOPT_COOKIESESSION.html CURLOPT_COPYPOSTFIELDS.html \
+ CURLOPT_CRLF.html CURLOPT_CRLFILE.html CURLOPT_CUSTOMREQUEST.html \
+ CURLOPT_DEBUGDATA.html CURLOPT_DEBUGFUNCTION.html \
+ CURLOPT_DIRLISTONLY.html CURLOPT_DNS_CACHE_TIMEOUT.html \
+ CURLOPT_DNS_INTERFACE.html CURLOPT_DNS_LOCAL_IP4.html \
+ CURLOPT_DNS_LOCAL_IP6.html CURLOPT_DNS_SERVERS.html \
+ CURLOPT_DNS_USE_GLOBAL_CACHE.html CURLOPT_EGDSOCKET.html \
+ CURLOPT_ERRORBUFFER.html CURLOPT_EXPECT_100_TIMEOUT_MS.html \
+ CURLOPT_FAILONERROR.html CURLOPT_FILETIME.html \
+ CURLOPT_FNMATCH_DATA.html CURLOPT_FNMATCH_FUNCTION.html \
+ CURLOPT_FOLLOWLOCATION.html CURLOPT_FORBID_REUSE.html \
+ CURLOPT_FRESH_CONNECT.html CURLOPT_FTP_ACCOUNT.html \
+ CURLOPT_FTP_ALTERNATIVE_TO_USER.html \
+ CURLOPT_FTP_CREATE_MISSING_DIRS.html CURLOPT_FTP_FILEMETHOD.html \
+ CURLOPT_FTPPORT.html CURLOPT_FTP_RESPONSE_TIMEOUT.html \
+ CURLOPT_FTP_SKIP_PASV_IP.html CURLOPT_FTPSSLAUTH.html \
+ CURLOPT_FTP_SSL_CCC.html CURLOPT_FTP_USE_EPRT.html \
+ CURLOPT_FTP_USE_EPSV.html CURLOPT_FTP_USE_PRET.html \
+ CURLOPT_GSSAPI_DELEGATION.html CURLOPT_HEADER.html \
+ CURLOPT_HEADERDATA.html CURLOPT_HEADERFUNCTION.html \
+ CURLOPT_HEADEROPT.html CURLOPT_HTTP200ALIASES.html \
+ CURLOPT_HTTPAUTH.html CURLOPT_HTTP_CONTENT_DECODING.html \
+ CURLOPT_HTTPGET.html CURLOPT_HTTPHEADER.html CURLOPT_HTTPPOST.html \
+ CURLOPT_HTTPPROXYTUNNEL.html CURLOPT_HTTP_TRANSFER_DECODING.html \
+ CURLOPT_HTTP_VERSION.html CURLOPT_IGNORE_CONTENT_LENGTH.html \
+ CURLOPT_INFILESIZE.html CURLOPT_INFILESIZE_LARGE.html \
+ CURLOPT_INTERFACE.html CURLOPT_INTERLEAVEDATA.html \
+ CURLOPT_INTERLEAVEFUNCTION.html CURLOPT_IOCTLDATA.html \
+ CURLOPT_IOCTLFUNCTION.html CURLOPT_IPRESOLVE.html \
+ CURLOPT_ISSUERCERT.html CURLOPT_KEYPASSWD.html CURLOPT_KRBLEVEL.html \
+ CURLOPT_LOCALPORT.html CURLOPT_LOCALPORTRANGE.html \
+ CURLOPT_LOGIN_OPTIONS.html CURLOPT_LOW_SPEED_LIMIT.html \
+ CURLOPT_LOW_SPEED_TIME.html CURLOPT_MAIL_AUTH.html \
+ CURLOPT_MAIL_FROM.html CURLOPT_MAIL_RCPT.html CURLOPT_MAXCONNECTS.html \
+ CURLOPT_MAXFILESIZE.html CURLOPT_MAXFILESIZE_LARGE.html \
+ CURLOPT_MAX_RECV_SPEED_LARGE.html CURLOPT_MAXREDIRS.html \
+ CURLOPT_MAX_SEND_SPEED_LARGE.html CURLOPT_NETRC.html \
+ CURLOPT_NETRC_FILE.html CURLOPT_NEW_DIRECTORY_PERMS.html \
+ CURLOPT_NEW_FILE_PERMS.html CURLOPT_NOBODY.html \
+ CURLOPT_NOPROGRESS.html CURLOPT_NOPROXY.html CURLOPT_NOSIGNAL.html \
+ CURLOPT_OPENSOCKETDATA.html CURLOPT_OPENSOCKETFUNCTION.html \
+ CURLOPT_PASSWORD.html CURLOPT_PINNEDPUBLICKEY.html CURLOPT_PORT.html \
+ CURLOPT_POST.html CURLOPT_POSTFIELDS.html CURLOPT_POSTFIELDSIZE.html \
+ CURLOPT_POSTFIELDSIZE_LARGE.html CURLOPT_POSTQUOTE.html \
+ CURLOPT_POSTREDIR.html CURLOPT_PREQUOTE.html CURLOPT_PRIVATE.html \
+ CURLOPT_PROGRESSDATA.html CURLOPT_PROGRESSFUNCTION.html \
+ CURLOPT_PROTOCOLS.html CURLOPT_PROXY.html CURLOPT_PROXYAUTH.html \
+ CURLOPT_PROXYHEADER.html CURLOPT_PROXYPASSWORD.html \
+ CURLOPT_PROXYPORT.html CURLOPT_PROXY_TRANSFER_MODE.html \
+ CURLOPT_PROXYTYPE.html CURLOPT_PROXYUSERNAME.html \
+ CURLOPT_PROXYUSERPWD.html CURLOPT_PUT.html CURLOPT_QUOTE.html \
+ CURLOPT_RANDOM_FILE.html CURLOPT_RANGE.html CURLOPT_READDATA.html \
+ CURLOPT_READFUNCTION.html CURLOPT_REDIR_PROTOCOLS.html \
+ CURLOPT_REFERER.html CURLOPT_RESOLVE.html CURLOPT_RESUME_FROM.html \
+ CURLOPT_RESUME_FROM_LARGE.html CURLOPT_RTSP_CLIENT_CSEQ.html \
+ CURLOPT_RTSP_REQUEST.html CURLOPT_RTSP_SERVER_CSEQ.html \
+ CURLOPT_RTSP_SESSION_ID.html CURLOPT_RTSP_STREAM_URI.html \
+ CURLOPT_RTSP_TRANSPORT.html CURLOPT_SASL_IR.html CURLOPT_SEEKDATA.html \
+ CURLOPT_SEEKFUNCTION.html CURLOPT_SHARE.html CURLOPT_SOCKOPTDATA.html \
+ CURLOPT_SOCKOPTFUNCTION.html CURLOPT_SOCKS5_GSSAPI_NEC.html \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.html CURLOPT_SSH_AUTH_TYPES.html \
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.html CURLOPT_SSH_KEYDATA.html \
+ CURLOPT_SSH_KEYFUNCTION.html CURLOPT_SSH_KNOWNHOSTS.html \
+ CURLOPT_SSH_PRIVATE_KEYFILE.html CURLOPT_SSH_PUBLIC_KEYFILE.html \
+ CURLOPT_SSLCERT.html CURLOPT_SSLCERTTYPE.html \
+ CURLOPT_SSL_CIPHER_LIST.html CURLOPT_SSL_CTX_DATA.html \
+ CURLOPT_SSL_CTX_FUNCTION.html CURLOPT_SSL_ENABLE_ALPN.html \
+ CURLOPT_SSL_ENABLE_NPN.html CURLOPT_SSLENGINE.html \
+ CURLOPT_SSLENGINE_DEFAULT.html CURLOPT_SSL_FALSESTART.html \
+ CURLOPT_SSLKEY.html CURLOPT_SSLKEYTYPE.html CURLOPT_SSL_OPTIONS.html \
+ CURLOPT_SSL_SESSIONID_CACHE.html CURLOPT_SSL_VERIFYHOST.html \
+ CURLOPT_SSL_VERIFYPEER.html CURLOPT_SSL_VERIFYSTATUS.html \
+ CURLOPT_SSLVERSION.html CURLOPT_STDERR.html CURLOPT_TCP_KEEPALIVE.html \
+ CURLOPT_TCP_KEEPIDLE.html CURLOPT_TCP_KEEPINTVL.html \
+ CURLOPT_TCP_NODELAY.html CURLOPT_TELNETOPTIONS.html \
+ CURLOPT_TFTP_BLKSIZE.html CURLOPT_TIMECONDITION.html \
+ CURLOPT_TIMEOUT.html CURLOPT_TIMEOUT_MS.html CURLOPT_TIMEVALUE.html \
+ CURLOPT_TLSAUTH_PASSWORD.html CURLOPT_TLSAUTH_TYPE.html \
+ CURLOPT_TLSAUTH_USERNAME.html CURLOPT_TRANSFER_ENCODING.html \
+ CURLOPT_TRANSFERTEXT.html CURLOPT_UNRESTRICTED_AUTH.html \
+ CURLOPT_UPLOAD.html CURLOPT_URL.html CURLOPT_USERAGENT.html \
+ CURLOPT_USERNAME.html CURLOPT_USERPWD.html CURLOPT_USE_SSL.html \
+ CURLOPT_VERBOSE.html CURLOPT_WILDCARDMATCH.html CURLOPT_WRITEDATA.html \
+ CURLOPT_WRITEFUNCTION.html CURLOPT_XFERINFODATA.html \
+ CURLOPT_XFERINFOFUNCTION.html CURLOPT_XOAUTH2_BEARER.html \
+ CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.html \
+ CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.html CURLMOPT_MAXCONNECTS.html \
+ CURLMOPT_MAX_HOST_CONNECTIONS.html CURLMOPT_MAX_PIPELINE_LENGTH.html \
+ CURLMOPT_MAX_TOTAL_CONNECTIONS.html CURLMOPT_PIPELINING.html \
+ CURLMOPT_PIPELINING_SERVER_BL.html CURLMOPT_PIPELINING_SITE_BL.html \
+ CURLMOPT_SOCKETDATA.html CURLMOPT_SOCKETFUNCTION.html \
+ CURLMOPT_TIMERDATA.html CURLMOPT_TIMERFUNCTION.html \
+ CURLOPT_UNIX_SOCKET_PATH.html CURLOPT_PATH_AS_IS.html \
+ CURLOPT_PROXY_SERVICE_NAME.html CURLOPT_SERVICE_NAME.html \
+ CURLOPT_PIPEWAIT.html
+
+PDFPAGES = CURLOPT_ACCEPT_ENCODING.pdf CURLOPT_ACCEPTTIMEOUT_MS.pdf \
+ CURLOPT_ADDRESS_SCOPE.pdf CURLOPT_APPEND.pdf CURLOPT_AUTOREFERER.pdf \
+ CURLOPT_BUFFERSIZE.pdf CURLOPT_CAINFO.pdf CURLOPT_CAPATH.pdf \
+ CURLOPT_CERTINFO.pdf CURLOPT_CHUNK_BGN_FUNCTION.pdf \
+ CURLOPT_CHUNK_DATA.pdf CURLOPT_CHUNK_END_FUNCTION.pdf \
+ CURLOPT_CLOSESOCKETDATA.pdf CURLOPT_CLOSESOCKETFUNCTION.pdf \
+ CURLOPT_CONNECT_ONLY.pdf CURLOPT_CONNECTTIMEOUT.pdf \
+ CURLOPT_CONNECTTIMEOUT_MS.pdf CURLOPT_CONV_FROM_NETWORK_FUNCTION.pdf \
+ CURLOPT_CONV_FROM_UTF8_FUNCTION.pdf \
+ CURLOPT_CONV_TO_NETWORK_FUNCTION.pdf CURLOPT_COOKIE.pdf \
+ CURLOPT_COOKIEFILE.pdf CURLOPT_COOKIEJAR.pdf CURLOPT_COOKIELIST.pdf \
+ CURLOPT_COOKIESESSION.pdf CURLOPT_COPYPOSTFIELDS.pdf CURLOPT_CRLF.pdf \
+ CURLOPT_CRLFILE.pdf CURLOPT_CUSTOMREQUEST.pdf CURLOPT_DEBUGDATA.pdf \
+ CURLOPT_DEBUGFUNCTION.pdf CURLOPT_DIRLISTONLY.pdf \
+ CURLOPT_DNS_CACHE_TIMEOUT.pdf CURLOPT_DNS_INTERFACE.pdf \
+ CURLOPT_DNS_LOCAL_IP4.pdf CURLOPT_DNS_LOCAL_IP6.pdf \
+ CURLOPT_DNS_SERVERS.pdf CURLOPT_DNS_USE_GLOBAL_CACHE.pdf \
+ CURLOPT_EGDSOCKET.pdf CURLOPT_ERRORBUFFER.pdf \
+ CURLOPT_EXPECT_100_TIMEOUT_MS.pdf CURLOPT_FAILONERROR.pdf \
+ CURLOPT_FILETIME.pdf CURLOPT_FNMATCH_DATA.pdf \
+ CURLOPT_FNMATCH_FUNCTION.pdf CURLOPT_FOLLOWLOCATION.pdf \
+ CURLOPT_FORBID_REUSE.pdf CURLOPT_FRESH_CONNECT.pdf \
+ CURLOPT_FTP_ACCOUNT.pdf CURLOPT_FTP_ALTERNATIVE_TO_USER.pdf \
+ CURLOPT_FTP_CREATE_MISSING_DIRS.pdf CURLOPT_FTP_FILEMETHOD.pdf \
+ CURLOPT_FTPPORT.pdf CURLOPT_FTP_RESPONSE_TIMEOUT.pdf \
+ CURLOPT_FTP_SKIP_PASV_IP.pdf CURLOPT_FTPSSLAUTH.pdf \
+ CURLOPT_FTP_SSL_CCC.pdf CURLOPT_FTP_USE_EPRT.pdf \
+ CURLOPT_FTP_USE_EPSV.pdf CURLOPT_FTP_USE_PRET.pdf \
+ CURLOPT_GSSAPI_DELEGATION.pdf CURLOPT_HEADER.pdf \
+ CURLOPT_HEADERDATA.pdf CURLOPT_HEADERFUNCTION.pdf \
+ CURLOPT_HEADEROPT.pdf CURLOPT_HTTP200ALIASES.pdf CURLOPT_HTTPAUTH.pdf \
+ CURLOPT_HTTP_CONTENT_DECODING.pdf CURLOPT_HTTPGET.pdf \
+ CURLOPT_HTTPHEADER.pdf CURLOPT_HTTPPOST.pdf \
+ CURLOPT_HTTPPROXYTUNNEL.pdf CURLOPT_HTTP_TRANSFER_DECODING.pdf \
+ CURLOPT_HTTP_VERSION.pdf CURLOPT_IGNORE_CONTENT_LENGTH.pdf \
+ CURLOPT_INFILESIZE.pdf CURLOPT_INFILESIZE_LARGE.pdf \
+ CURLOPT_INTERFACE.pdf CURLOPT_INTERLEAVEDATA.pdf \
+ CURLOPT_INTERLEAVEFUNCTION.pdf CURLOPT_IOCTLDATA.pdf \
+ CURLOPT_IOCTLFUNCTION.pdf CURLOPT_IPRESOLVE.pdf CURLOPT_ISSUERCERT.pdf \
+ CURLOPT_KEYPASSWD.pdf CURLOPT_KRBLEVEL.pdf CURLOPT_LOCALPORT.pdf \
+ CURLOPT_LOCALPORTRANGE.pdf CURLOPT_LOGIN_OPTIONS.pdf \
+ CURLOPT_LOW_SPEED_LIMIT.pdf CURLOPT_LOW_SPEED_TIME.pdf \
+ CURLOPT_MAIL_AUTH.pdf CURLOPT_MAIL_FROM.pdf CURLOPT_MAIL_RCPT.pdf \
+ CURLOPT_MAXCONNECTS.pdf CURLOPT_MAXFILESIZE.pdf \
+ CURLOPT_MAXFILESIZE_LARGE.pdf CURLOPT_MAX_RECV_SPEED_LARGE.pdf \
+ CURLOPT_MAXREDIRS.pdf CURLOPT_MAX_SEND_SPEED_LARGE.pdf \
+ CURLOPT_NETRC.pdf CURLOPT_NETRC_FILE.pdf \
+ CURLOPT_NEW_DIRECTORY_PERMS.pdf CURLOPT_NEW_FILE_PERMS.pdf \
+ CURLOPT_NOBODY.pdf CURLOPT_NOPROGRESS.pdf CURLOPT_NOPROXY.pdf \
+ CURLOPT_NOSIGNAL.pdf CURLOPT_OPENSOCKETDATA.pdf \
+ CURLOPT_OPENSOCKETFUNCTION.pdf CURLOPT_PASSWORD.pdf \
+ CURLOPT_PINNEDPUBLICKEY.pdf CURLOPT_PORT.pdf CURLOPT_POST.pdf \
+ CURLOPT_POSTFIELDS.pdf CURLOPT_POSTFIELDSIZE.pdf \
+ CURLOPT_POSTFIELDSIZE_LARGE.pdf CURLOPT_POSTQUOTE.pdf \
+ CURLOPT_POSTREDIR.pdf CURLOPT_PREQUOTE.pdf CURLOPT_PRIVATE.pdf \
+ CURLOPT_PROGRESSDATA.pdf CURLOPT_PROGRESSFUNCTION.pdf \
+ CURLOPT_PROTOCOLS.pdf CURLOPT_PROXY.pdf CURLOPT_PROXYAUTH.pdf \
+ CURLOPT_PROXYHEADER.pdf CURLOPT_PROXYPASSWORD.pdf \
+ CURLOPT_PROXYPORT.pdf CURLOPT_PROXY_TRANSFER_MODE.pdf \
+ CURLOPT_PROXYTYPE.pdf CURLOPT_PROXYUSERNAME.pdf \
+ CURLOPT_PROXYUSERPWD.pdf CURLOPT_PUT.pdf CURLOPT_QUOTE.pdf \
+ CURLOPT_RANDOM_FILE.pdf CURLOPT_RANGE.pdf CURLOPT_READDATA.pdf \
+ CURLOPT_READFUNCTION.pdf CURLOPT_REDIR_PROTOCOLS.pdf \
+ CURLOPT_REFERER.pdf CURLOPT_RESOLVE.pdf CURLOPT_RESUME_FROM.pdf \
+ CURLOPT_RESUME_FROM_LARGE.pdf CURLOPT_RTSP_CLIENT_CSEQ.pdf \
+ CURLOPT_RTSP_REQUEST.pdf CURLOPT_RTSP_SERVER_CSEQ.pdf \
+ CURLOPT_RTSP_SESSION_ID.pdf CURLOPT_RTSP_STREAM_URI.pdf \
+ CURLOPT_RTSP_TRANSPORT.pdf CURLOPT_SASL_IR.pdf CURLOPT_SEEKDATA.pdf \
+ CURLOPT_SEEKFUNCTION.pdf CURLOPT_SHARE.pdf CURLOPT_SOCKOPTDATA.pdf \
+ CURLOPT_SOCKOPTFUNCTION.pdf CURLOPT_SOCKS5_GSSAPI_NEC.pdf \
+ CURLOPT_SOCKS5_GSSAPI_SERVICE.pdf CURLOPT_SSH_AUTH_TYPES.pdf \
+ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.pdf CURLOPT_SSH_KEYDATA.pdf \
+ CURLOPT_SSH_KEYFUNCTION.pdf CURLOPT_SSH_KNOWNHOSTS.pdf \
+ CURLOPT_SSH_PRIVATE_KEYFILE.pdf CURLOPT_SSH_PUBLIC_KEYFILE.pdf \
+ CURLOPT_SSLCERT.pdf CURLOPT_SSLCERTTYPE.pdf \
+ CURLOPT_SSL_CIPHER_LIST.pdf CURLOPT_SSL_CTX_DATA.pdf \
+ CURLOPT_SSL_CTX_FUNCTION.pdf CURLOPT_SSL_ENABLE_ALPN.pdf \
+ CURLOPT_SSL_ENABLE_NPN.pdf CURLOPT_SSLENGINE.pdf \
+ CURLOPT_SSLENGINE_DEFAULT.pdf CURLOPT_SSL_FALSESTART.pdf \
+ CURLOPT_SSLKEY.pdf CURLOPT_SSLKEYTYPE.pdf CURLOPT_SSL_OPTIONS.pdf \
+ CURLOPT_SSL_SESSIONID_CACHE.pdf CURLOPT_SSL_VERIFYHOST.pdf \
+ CURLOPT_SSL_VERIFYPEER.pdf CURLOPT_SSL_VERIFYSTATUS.pdf \
+ CURLOPT_SSLVERSION.pdf CURLOPT_STDERR.pdf CURLOPT_TCP_KEEPALIVE.pdf \
+ CURLOPT_TCP_KEEPIDLE.pdf CURLOPT_TCP_KEEPINTVL.pdf \
+ CURLOPT_TCP_NODELAY.pdf CURLOPT_TELNETOPTIONS.pdf \
+ CURLOPT_TFTP_BLKSIZE.pdf CURLOPT_TIMECONDITION.pdf CURLOPT_TIMEOUT.pdf \
+ CURLOPT_TIMEOUT_MS.pdf CURLOPT_TIMEVALUE.pdf \
+ CURLOPT_TLSAUTH_PASSWORD.pdf CURLOPT_TLSAUTH_TYPE.pdf \
+ CURLOPT_TLSAUTH_USERNAME.pdf CURLOPT_TRANSFER_ENCODING.pdf \
+ CURLOPT_TRANSFERTEXT.pdf CURLOPT_UNRESTRICTED_AUTH.pdf \
+ CURLOPT_UPLOAD.pdf CURLOPT_URL.pdf CURLOPT_USERAGENT.pdf \
+ CURLOPT_USERNAME.pdf CURLOPT_USERPWD.pdf CURLOPT_USE_SSL.pdf \
+ CURLOPT_VERBOSE.pdf CURLOPT_WILDCARDMATCH.pdf CURLOPT_WRITEDATA.pdf \
+ CURLOPT_WRITEFUNCTION.pdf CURLOPT_XFERINFODATA.pdf \
+ CURLOPT_XFERINFOFUNCTION.pdf CURLOPT_XOAUTH2_BEARER.pdf \
+ CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.pdf \
+ CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.pdf CURLMOPT_MAXCONNECTS.pdf \
+ CURLMOPT_MAX_HOST_CONNECTIONS.pdf CURLMOPT_MAX_PIPELINE_LENGTH.pdf \
+ CURLMOPT_MAX_TOTAL_CONNECTIONS.pdf CURLMOPT_PIPELINING.pdf \
+ CURLMOPT_PIPELINING_SERVER_BL.pdf CURLMOPT_PIPELINING_SITE_BL.pdf \
+ CURLMOPT_SOCKETDATA.pdf CURLMOPT_SOCKETFUNCTION.pdf \
+ CURLMOPT_TIMERDATA.pdf CURLMOPT_TIMERFUNCTION.pdf \
+ CURLOPT_UNIX_SOCKET_PATH.pdf CURLOPT_PATH_AS_IS.pdf \
+ CURLOPT_PROXY_SERVICE_NAME.pdf CURLOPT_SERVICE_NAME.pdf \
+ CURLOPT_PIPEWAIT.pdf
+
+CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
+
+EXTRA_DIST = $(man_MANS) $(HTMLPAGES) $(PDFPAGES)
+MAN2HTML= roffit --mandir=. < $< >$@
+
+SUFFIXES = .3 .html
+
+html: $(HTMLPAGES)
+
+.3.html:
+ $(MAN2HTML)
+
+pdf: $(PDFPAGES)
+
+.3.pdf:
+ @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
+ groff -Tps -man $< >$$foo.ps; \
+ ps2pdf $$foo.ps $@; \
+ rm $$foo.ps; \
+ echo "converted $< to $@")
+
+mancheck:
+ @cd $(top_srcdir)/docs/libcurl/opts && ls `awk -F, '!/OBSOLETE/ && /^ CINIT/ { a=substr($$1, 9); print "CURLOPT_" a ".3"}' $(top_srcdir)/include/curl/curl.h`
diff --git a/docs/libcurl/opts/template.3 b/docs/libcurl/opts/template.3
new file mode 100644
index 0000000..184e471
--- /dev/null
+++ b/docs/libcurl/opts/template.3
@@ -0,0 +1,38 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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_TEMPLATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
+.SH NAME
+CURLOPT_TEMPLATE \- [short desc]
+.SH SYNOPSIS
+#include <curl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TEMPLATE, [argument]);
+.SH DESCRIPTION
+.SH DEFAULT
+.SH PROTOCOLS
+.SH EXAMPLE
+.SH AVAILABILITY
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
index a02ead4..8299a51 100644
--- a/docs/libcurl/symbols-in-versions
+++ b/docs/libcurl/symbols-in-versions
@@ -17,27 +17,40 @@
CURLAUTH_BASIC 7.10.6
CURLAUTH_DIGEST 7.10.6
CURLAUTH_DIGEST_IE 7.19.3
-CURLAUTH_GSSNEGOTIATE 7.10.6
+CURLAUTH_GSSNEGOTIATE 7.10.6 7.38.0
+CURLAUTH_NEGOTIATE 7.38.0
+CURLAUTH_NONE 7.10.6
CURLAUTH_NTLM 7.10.6
+CURLAUTH_NTLM_WB 7.22.0
+CURLAUTH_ONLY 7.21.3
CURLCLOSEPOLICY_CALLBACK 7.7
CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
CURLCLOSEPOLICY_LEAST_TRAFFIC 7.7
+CURLCLOSEPOLICY_NONE 7.7
CURLCLOSEPOLICY_OLDEST 7.7
CURLCLOSEPOLICY_SLOWEST 7.7
CURLE_ABORTED_BY_CALLBACK 7.1
CURLE_AGAIN 7.18.2
+CURLE_ALREADY_COMPLETE 7.7.2
CURLE_BAD_CALLING_ORDER 7.1 7.17.0
CURLE_BAD_CONTENT_ENCODING 7.10
+CURLE_BAD_DOWNLOAD_RESUME 7.10
CURLE_BAD_FUNCTION_ARGUMENT 7.1
-CURLE_BAD_PASSWORD_ENTERED - 7.17.0
+CURLE_BAD_PASSWORD_ENTERED 7.4.2 7.17.0
+CURLE_CHUNK_FAILED 7.21.0
+CURLE_CONV_FAILED 7.15.4
+CURLE_CONV_REQD 7.15.4
CURLE_COULDNT_CONNECT 7.1
CURLE_COULDNT_RESOLVE_HOST 7.1
CURLE_COULDNT_RESOLVE_PROXY 7.1
CURLE_FAILED_INIT 7.1
CURLE_FILESIZE_EXCEEDED 7.10.8
CURLE_FILE_COULDNT_READ_FILE 7.1
+CURLE_FTP_ACCEPT_FAILED 7.24.0
+CURLE_FTP_ACCEPT_TIMEOUT 7.24.0
CURLE_FTP_ACCESS_DENIED 7.1
CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1 7.1
+CURLE_FTP_BAD_FILE_LIST 7.21.0
CURLE_FTP_CANT_GET_HOST 7.1
CURLE_FTP_CANT_RECONNECT 7.1 7.17.0
CURLE_FTP_COULDNT_GET_SIZE 7.1 7.17.0
@@ -51,7 +64,7 @@
CURLE_FTP_PORT_FAILED 7.1
CURLE_FTP_PRET_FAILED 7.20.0
CURLE_FTP_QUOTE_ERROR 7.1 7.17.0
-CURLE_FTP_SSL_FAILED - 7.17.0
+CURLE_FTP_SSL_FAILED 7.11.0 7.17.0
CURLE_FTP_USER_PASSWORD_INCORRECT 7.1 7.17.0
CURLE_FTP_WEIRD_227_FORMAT 7.1
CURLE_FTP_WEIRD_PASS_REPLY 7.1
@@ -61,18 +74,23 @@
CURLE_FTP_WRITE_ERROR 7.1 7.17.0
CURLE_FUNCTION_NOT_FOUND 7.1
CURLE_GOT_NOTHING 7.9.1
+CURLE_HTTP2 7.38.0
CURLE_HTTP_NOT_FOUND 7.1
-CURLE_HTTP_PORT_FAILED - 7.12.0
+CURLE_HTTP_PORT_FAILED 7.3 7.12.0
CURLE_HTTP_POST_ERROR 7.1
CURLE_HTTP_RANGE_ERROR 7.1 7.17.0
+CURLE_HTTP_RETURNED_ERROR 7.10.3
CURLE_INTERFACE_FAILED 7.12.0
CURLE_LDAP_CANNOT_BIND 7.1
CURLE_LDAP_INVALID_URL 7.10.8
CURLE_LDAP_SEARCH_FAILED 7.1
CURLE_LIBRARY_NOT_FOUND 7.1 7.17.0
+CURLE_LOGIN_DENIED 7.13.1
CURLE_MALFORMAT_USER 7.1 7.17.0
+CURLE_NOT_BUILT_IN 7.21.5
+CURLE_NO_CONNECTION_AVAILABLE 7.30.0
CURLE_OK 7.1
-CURLE_OPERATION_TIMEDOUT 7.17.0
+CURLE_OPERATION_TIMEDOUT 7.10.2
CURLE_OPERATION_TIMEOUTED 7.1 7.17.0
CURLE_OUT_OF_MEMORY 7.1
CURLE_PARTIAL_FILE 7.1
@@ -80,50 +98,95 @@
CURLE_QUOTE_ERROR 7.17.0
CURLE_RANGE_ERROR 7.17.0
CURLE_READ_ERROR 7.1
-CURLE_RECV_ERROR 7.13.0
+CURLE_RECV_ERROR 7.10
CURLE_REMOTE_ACCESS_DENIED 7.17.0
CURLE_REMOTE_DISK_FULL 7.17.0
+CURLE_REMOTE_FILE_EXISTS 7.17.0
+CURLE_REMOTE_FILE_NOT_FOUND 7.16.1
CURLE_RTSP_CSEQ_ERROR 7.20.0
CURLE_RTSP_SESSION_ERROR 7.20.0
-CURLE_SEND_ERROR 7.13.0
-CURLE_SHARE_IN_USE - 7.17.0
+CURLE_SEND_ERROR 7.10
+CURLE_SEND_FAIL_REWIND 7.12.3
+CURLE_SHARE_IN_USE 7.9.6 7.17.0
CURLE_SSH 7.16.1
CURLE_SSL_CACERT 7.10
+CURLE_SSL_CACERT_BADFILE 7.16.0
CURLE_SSL_CERTPROBLEM 7.10
CURLE_SSL_CIPHER 7.10
CURLE_SSL_CONNECT_ERROR 7.1
CURLE_SSL_CRL_BADFILE 7.19.0
-CURLE_SSL_ENGINE_INITFAILED 7.13.0
+CURLE_SSL_ENGINE_INITFAILED 7.12.3
CURLE_SSL_ENGINE_NOTFOUND 7.9.3
CURLE_SSL_ENGINE_SETFAILED 7.9.3
+CURLE_SSL_INVALIDCERTSTATUS 7.41.0
CURLE_SSL_ISSUER_ERROR 7.19.0
-CURLE_SSL_PEER_CERTIFICATE - 7.17.1
+CURLE_SSL_PEER_CERTIFICATE 7.8 7.17.1
+CURLE_SSL_PINNEDPUBKEYNOTMATCH 7.39.0
CURLE_SSL_SHUTDOWN_FAILED 7.16.1
CURLE_TELNET_OPTION_SYNTAX 7.7
CURLE_TFTP_DISKFULL 7.15.0 7.17.0
CURLE_TFTP_EXISTS 7.15.0 7.17.0
CURLE_TFTP_ILLEGAL 7.15.0
CURLE_TFTP_NOSUCHUSER 7.15.0
+CURLE_TFTP_NOTFOUND 7.15.0
+CURLE_TFTP_PERM 7.15.0
CURLE_TFTP_UNKNOWNID 7.15.0
CURLE_TOO_MANY_REDIRECTS 7.5
+CURLE_UNKNOWN_OPTION 7.21.5
CURLE_UNKNOWN_TELNET_OPTION 7.7
CURLE_UNSUPPORTED_PROTOCOL 7.1
+CURLE_UPLOAD_FAILED 7.16.3
CURLE_URL_MALFORMAT 7.1
CURLE_URL_MALFORMAT_USER 7.1 7.17.0
CURLE_USE_SSL_FAILED 7.17.0
CURLE_WRITE_ERROR 7.1
-CURLFTPAUTH_DEFAULT 7.12.2
+CURLFILETYPE_DEVICE_BLOCK 7.21.0
+CURLFILETYPE_DEVICE_CHAR 7.21.0
+CURLFILETYPE_DIRECTORY 7.21.0
+CURLFILETYPE_DOOR 7.21.0
+CURLFILETYPE_FILE 7.21.0
+CURLFILETYPE_NAMEDPIPE 7.21.0
+CURLFILETYPE_SOCKET 7.21.0
+CURLFILETYPE_SYMLINK 7.21.0
+CURLFILETYPE_UNKNOWN 7.21.0
+CURLFINFOFLAG_KNOWN_FILENAME 7.21.0
+CURLFINFOFLAG_KNOWN_FILETYPE 7.21.0
+CURLFINFOFLAG_KNOWN_GID 7.21.0
+CURLFINFOFLAG_KNOWN_HLINKCOUNT 7.21.0
+CURLFINFOFLAG_KNOWN_PERM 7.21.0
+CURLFINFOFLAG_KNOWN_SIZE 7.21.0
+CURLFINFOFLAG_KNOWN_TIME 7.21.0
+CURLFINFOFLAG_KNOWN_UID 7.21.0
+CURLFORM_ARRAY 7.9.1
+CURLFORM_ARRAY_END 7.9.1 7.9.5 7.9.6
+CURLFORM_ARRAY_START 7.9.1 7.9.5 7.9.6
+CURLFORM_BUFFER 7.9.8
+CURLFORM_BUFFERLENGTH 7.9.8
+CURLFORM_BUFFERPTR 7.9.8
+CURLFORM_CONTENTHEADER 7.9.3
+CURLFORM_CONTENTSLENGTH 7.9
+CURLFORM_CONTENTTYPE 7.9
+CURLFORM_COPYCONTENTS 7.9
+CURLFORM_COPYNAME 7.9
+CURLFORM_END 7.9
+CURLFORM_FILE 7.9
+CURLFORM_FILECONTENT 7.9.1
+CURLFORM_FILENAME 7.9.6
+CURLFORM_NAMELENGTH 7.9
+CURLFORM_NOTHING 7.9
+CURLFORM_PTRCONTENTS 7.9
+CURLFORM_PTRNAME 7.9
+CURLFORM_STREAM 7.18.2
CURLFTPAUTH_DEFAULT 7.12.2
CURLFTPAUTH_SSL 7.12.2
-CURLFTPAUTH_SSL 7.12.2
CURLFTPAUTH_TLS 7.12.2
-CURLFTPAUTH_TLS 7.12.2
-CURLFTPMETHOD_MULTICWD 7.15.1
-CURLFTPMETHOD_NOCWD 7.15.1
-CURLFTPMETHOD_SINGLECWD 7.15.1
-CURLFTPSSL_ALL - 7.17.0
-CURLFTPSSL_CCC_ACTIVE 7.16.1
-CURLFTPSSL_CCC_NONE 7.16.1
+CURLFTPMETHOD_DEFAULT 7.15.3
+CURLFTPMETHOD_MULTICWD 7.15.3
+CURLFTPMETHOD_NOCWD 7.15.3
+CURLFTPMETHOD_SINGLECWD 7.15.3
+CURLFTPSSL_ALL 7.11.0 7.17.0
+CURLFTPSSL_CCC_ACTIVE 7.16.2
+CURLFTPSSL_CCC_NONE 7.16.2
CURLFTPSSL_CCC_PASSIVE 7.16.1
CURLFTPSSL_CONTROL 7.11.0 7.17.0
CURLFTPSSL_NONE 7.11.0 7.17.0
@@ -131,6 +194,11 @@
CURLFTP_CREATE_DIR 7.19.4
CURLFTP_CREATE_DIR_NONE 7.19.4
CURLFTP_CREATE_DIR_RETRY 7.19.4
+CURLGSSAPI_DELEGATION_FLAG 7.22.0
+CURLGSSAPI_DELEGATION_NONE 7.22.0
+CURLGSSAPI_DELEGATION_POLICY_FLAG 7.22.0
+CURLHEADER_SEPARATE 7.37.0
+CURLHEADER_UNIFIED 7.37.0
CURLINFO_APPCONNECT_TIME 7.19.0
CURLINFO_CERTINFO 7.19.1
CURLINFO_CONDITION_UNMET 7.19.4
@@ -141,7 +209,9 @@
CURLINFO_COOKIELIST 7.14.1
CURLINFO_DATA_IN 7.9.6
CURLINFO_DATA_OUT 7.9.6
-CURLINFO_EFFECTIVE_URL 7.3
+CURLINFO_DOUBLE 7.4.1
+CURLINFO_EFFECTIVE_URL 7.4
+CURLINFO_END 7.9.6
CURLINFO_FILETIME 7.5
CURLINFO_FTP_ENTRY_PATH 7.15.4
CURLINFO_HEADER_IN 7.9.6
@@ -150,42 +220,94 @@
CURLINFO_HTTPAUTH_AVAIL 7.10.8
CURLINFO_HTTP_CODE 7.4.1 7.10.8
CURLINFO_HTTP_CONNECTCODE 7.10.7
+CURLINFO_LASTONE 7.4.1
CURLINFO_LASTSOCKET 7.15.2
CURLINFO_LOCAL_IP 7.21.0
CURLINFO_LOCAL_PORT 7.21.0
+CURLINFO_LONG 7.4.1
+CURLINFO_MASK 7.4.1
CURLINFO_NAMELOOKUP_TIME 7.4.1
+CURLINFO_NONE 7.4.1
CURLINFO_NUM_CONNECTS 7.12.3
CURLINFO_OS_ERRNO 7.12.2
CURLINFO_PRETRANSFER_TIME 7.4.1
CURLINFO_PRIMARY_IP 7.19.0
CURLINFO_PRIMARY_PORT 7.21.0
CURLINFO_PRIVATE 7.10.3
-CURLINFO_PRIVATE 7.10.3
CURLINFO_PROXYAUTH_AVAIL 7.10.8
CURLINFO_REDIRECT_COUNT 7.9.7
CURLINFO_REDIRECT_TIME 7.9.7
CURLINFO_REDIRECT_URL 7.18.2
CURLINFO_REQUEST_SIZE 7.4.1
CURLINFO_RESPONSE_CODE 7.10.8
+CURLINFO_RTSP_CLIENT_CSEQ 7.20.0
+CURLINFO_RTSP_CSEQ_RECV 7.20.0
+CURLINFO_RTSP_SERVER_CSEQ 7.20.0
+CURLINFO_RTSP_SESSION_ID 7.20.0
CURLINFO_SIZE_DOWNLOAD 7.4.1
CURLINFO_SIZE_UPLOAD 7.4.1
+CURLINFO_SLIST 7.12.3
CURLINFO_SPEED_DOWNLOAD 7.4.1
CURLINFO_SPEED_UPLOAD 7.4.1
+CURLINFO_SSL_DATA_IN 7.12.1
+CURLINFO_SSL_DATA_OUT 7.12.1
CURLINFO_SSL_ENGINES 7.12.3
CURLINFO_SSL_VERIFYRESULT 7.5
CURLINFO_STARTTRANSFER_TIME 7.9.2
+CURLINFO_STRING 7.4.1
CURLINFO_TEXT 7.9.6
+CURLINFO_TLS_SESSION 7.34.0
CURLINFO_TOTAL_TIME 7.4.1
+CURLINFO_TYPEMASK 7.4.1
+CURLIOCMD_NOP 7.12.3
+CURLIOCMD_RESTARTREAD 7.12.3
+CURLIOE_FAILRESTART 7.12.3
+CURLIOE_OK 7.12.3
+CURLIOE_UNKNOWNCMD 7.12.3
+CURLKHMATCH_MISMATCH 7.19.6
+CURLKHMATCH_MISSING 7.19.6
+CURLKHMATCH_OK 7.19.6
+CURLKHSTAT_DEFER 7.19.6
+CURLKHSTAT_FINE 7.19.6
+CURLKHSTAT_FINE_ADD_TO_FILE 7.19.6
+CURLKHSTAT_REJECT 7.19.6
+CURLKHTYPE_DSS 7.19.6
+CURLKHTYPE_RSA 7.19.6
+CURLKHTYPE_RSA1 7.19.6
+CURLKHTYPE_UNKNOWN 7.19.6
+CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 7.30.0
+CURLMOPT_MAXCONNECTS 7.16.3
+CURLMOPT_MAX_HOST_CONNECTIONS 7.30.0
+CURLMOPT_MAX_PIPELINE_LENGTH 7.30.0
+CURLMOPT_MAX_TOTAL_CONNECTIONS 7.30.0
+CURLMOPT_PIPELINING 7.16.0
+CURLMOPT_PIPELINING_SERVER_BL 7.30.0
+CURLMOPT_PIPELINING_SITE_BL 7.30.0
+CURLMOPT_SOCKETDATA 7.15.4
+CURLMOPT_SOCKETFUNCTION 7.15.4
+CURLMOPT_TIMERDATA 7.16.0
+CURLMOPT_TIMERFUNCTION 7.16.0
CURLMSG_DONE 7.9.6
+CURLMSG_NONE 7.9.6
+CURLM_ADDED_ALREADY 7.32.1
CURLM_BAD_EASY_HANDLE 7.9.6
CURLM_BAD_HANDLE 7.9.6
+CURLM_BAD_SOCKET 7.15.4
CURLM_CALL_MULTI_PERFORM 7.9.6
CURLM_CALL_MULTI_SOCKET 7.15.5
CURLM_INTERNAL_ERROR 7.9.6
CURLM_OK 7.9.6
CURLM_OUT_OF_MEMORY 7.9.6
+CURLM_UNKNOWN_OPTION 7.15.4
+CURLOPTTYPE_FUNCTIONPOINT 7.1
+CURLOPTTYPE_LONG 7.1
+CURLOPTTYPE_OBJECTPOINT 7.1
+CURLOPTTYPE_OFF_T 7.11.0
+CURLOPT_ACCEPTTIMEOUT_MS 7.24.0
+CURLOPT_ACCEPT_ENCODING 7.21.6
CURLOPT_ADDRESS_SCOPE 7.19.0
-CURLOPT_APPEND 7.16.4
+CURLOPT_APPEND 7.17.0
CURLOPT_AUTOREFERER 7.1
CURLOPT_BUFFERSIZE 7.10
CURLOPT_CAINFO 7.4.2
@@ -194,8 +316,10 @@
CURLOPT_CHUNK_BGN_FUNCTION 7.21.0
CURLOPT_CHUNK_DATA 7.21.0
CURLOPT_CHUNK_END_FUNCTION 7.21.0
-CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.4
+CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.5
CURLOPT_CLOSEPOLICY 7.7 7.16.1
+CURLOPT_CLOSESOCKETDATA 7.21.7
+CURLOPT_CLOSESOCKETFUNCTION 7.21.7
CURLOPT_CONNECTTIMEOUT 7.7
CURLOPT_CONNECTTIMEOUT_MS 7.16.2
CURLOPT_CONNECT_ONLY 7.15.2
@@ -205,7 +329,7 @@
CURLOPT_COOKIE 7.1
CURLOPT_COOKIEFILE 7.1
CURLOPT_COOKIEJAR 7.9
-CURLOPT_COOKIELIST 7.17.1
+CURLOPT_COOKIELIST 7.14.1
CURLOPT_COOKIESESSION 7.9.7
CURLOPT_COPYPOSTFIELDS 7.17.1
CURLOPT_CRLF 7.1
@@ -213,27 +337,31 @@
CURLOPT_CUSTOMREQUEST 7.1
CURLOPT_DEBUGDATA 7.9.6
CURLOPT_DEBUGFUNCTION 7.9.6
-CURLOPT_DIRLISTONLY 7.16.4
+CURLOPT_DIRLISTONLY 7.17.0
CURLOPT_DNS_CACHE_TIMEOUT 7.9.3
+CURLOPT_DNS_INTERFACE 7.33.0
+CURLOPT_DNS_LOCAL_IP4 7.33.0
+CURLOPT_DNS_LOCAL_IP6 7.33.0
+CURLOPT_DNS_SERVERS 7.24.0
CURLOPT_DNS_USE_GLOBAL_CACHE 7.9.3 7.11.1
CURLOPT_EGDSOCKET 7.7
-CURLOPT_ENCODING 7.12.2
+CURLOPT_ENCODING 7.10
CURLOPT_ERRORBUFFER 7.1
+CURLOPT_EXPECT_100_TIMEOUT_MS 7.36.0
CURLOPT_FAILONERROR 7.1
CURLOPT_FILE 7.1 7.9.7
CURLOPT_FILETIME 7.5
-CURLOPT_FLAGS 7.1 - 7.9.2
CURLOPT_FNMATCH_DATA 7.21.0
CURLOPT_FNMATCH_FUNCTION 7.21.0
CURLOPT_FOLLOWLOCATION 7.1
CURLOPT_FORBID_REUSE 7.7
CURLOPT_FRESH_CONNECT 7.7
CURLOPT_FTPAPPEND 7.1 7.16.4
-CURLOPT_FTPASCII 7.1 7.11.1 7.15.4
+CURLOPT_FTPASCII 7.1 7.11.1 7.15.5
CURLOPT_FTPLISTONLY 7.1 7.16.4
CURLOPT_FTPPORT 7.1
CURLOPT_FTPSSLAUTH 7.12.2
-CURLOPT_FTP_ACCOUNT 7.13.1
+CURLOPT_FTP_ACCOUNT 7.13.0
CURLOPT_FTP_ALTERNATIVE_TO_USER 7.15.5
CURLOPT_FTP_CREATE_MISSING_DIRS 7.10.7
CURLOPT_FTP_FILEMETHOD 7.15.1
@@ -244,16 +372,18 @@
CURLOPT_FTP_USE_EPRT 7.10.5
CURLOPT_FTP_USE_EPSV 7.9.2
CURLOPT_FTP_USE_PRET 7.20.0
+CURLOPT_GSSAPI_DELEGATION 7.22.0
CURLOPT_HEADER 7.1
CURLOPT_HEADERDATA 7.10
CURLOPT_HEADERFUNCTION 7.7.2
+CURLOPT_HEADEROPT 7.37.0
CURLOPT_HTTP200ALIASES 7.10.3
CURLOPT_HTTPAUTH 7.10.6
CURLOPT_HTTPGET 7.8.1
CURLOPT_HTTPHEADER 7.1
CURLOPT_HTTPPOST 7.1
CURLOPT_HTTPPROXYTUNNEL 7.3
-CURLOPT_HTTPREQUEST 7.1 - 7.15.4
+CURLOPT_HTTPREQUEST 7.1 - 7.15.5
CURLOPT_HTTP_CONTENT_DECODING 7.16.2
CURLOPT_HTTP_TRANSFER_DECODING 7.16.2
CURLOPT_HTTP_VERSION 7.9.1
@@ -268,13 +398,15 @@
CURLOPT_IOCTLFUNCTION 7.12.3
CURLOPT_IPRESOLVE 7.10.8
CURLOPT_ISSUERCERT 7.19.0
-CURLOPT_KEYPASSWD - 7.17.0
+CURLOPT_KEYPASSWD 7.17.0
CURLOPT_KRB4LEVEL 7.3 7.17.0
-CURLOPT_KRBLEVEL 7.17.0
+CURLOPT_KRBLEVEL 7.16.4
CURLOPT_LOCALPORT 7.15.2
CURLOPT_LOCALPORTRANGE 7.15.2
+CURLOPT_LOGIN_OPTIONS 7.34.0
CURLOPT_LOW_SPEED_LIMIT 7.1
CURLOPT_LOW_SPEED_TIME 7.1
+CURLOPT_MAIL_AUTH 7.25.0
CURLOPT_MAIL_FROM 7.20.0
CURLOPT_MAIL_RCPT 7.20.0
CURLOPT_MAXCONNECTS 7.7
@@ -283,7 +415,7 @@
CURLOPT_MAXREDIRS 7.5
CURLOPT_MAX_RECV_SPEED_LARGE 7.15.5
CURLOPT_MAX_SEND_SPEED_LARGE 7.15.5
-CURLOPT_MUTE 7.1 7.8 7.15.4
+CURLOPT_MUTE 7.1 7.8 7.15.5
CURLOPT_NETRC 7.1
CURLOPT_NETRC_FILE 7.11.0
CURLOPT_NEW_DIRECTORY_PERMS 7.16.4
@@ -292,12 +424,16 @@
CURLOPT_NOPROGRESS 7.1
CURLOPT_NOPROXY 7.19.4
CURLOPT_NOSIGNAL 7.10
+CURLOPT_NOTHING 7.1.1 7.11.1 7.11.0
CURLOPT_OPENSOCKETDATA 7.17.1
CURLOPT_OPENSOCKETFUNCTION 7.17.1
-CURLOPT_PASSWDDATA 7.1 7.11.1 7.15.4
-CURLOPT_PASSWDFUNCTION 7.1 7.11.1 7.15.4
+CURLOPT_PASSWDDATA 7.4.2 7.11.1 7.15.5
+CURLOPT_PASSWDFUNCTION 7.4.2 7.11.1 7.15.5
CURLOPT_PASSWORD 7.19.1
-CURLOPT_PASV_POST 7.12.1 - 7.13.0
+CURLOPT_PASV_HOST 7.12.1 7.16.0 7.15.5
+CURLOPT_PATH_AS_IS 7.42.0
+CURLOPT_PINNEDPUBLICKEY 7.39.0
+CURLOPT_PIPEWAIT 7.43.0
CURLOPT_PORT 7.1
CURLOPT_POST 7.1
CURLOPT_POST301 7.17.1 7.19.1
@@ -309,16 +445,17 @@
CURLOPT_PREQUOTE 7.9.5
CURLOPT_PRIVATE 7.10.3
CURLOPT_PROGRESSDATA 7.1
-CURLOPT_PROGRESSFUNCTION 7.1
-CURLOPT_PROGRESSMODE 7.1 - 7.9.2
+CURLOPT_PROGRESSFUNCTION 7.1 7.32.0
CURLOPT_PROTOCOLS 7.19.4
CURLOPT_PROXY 7.1
CURLOPT_PROXYAUTH 7.10.7
+CURLOPT_PROXYHEADER 7.37.0
CURLOPT_PROXYPASSWORD 7.19.1
CURLOPT_PROXYPORT 7.1
CURLOPT_PROXYTYPE 7.10
CURLOPT_PROXYUSERNAME 7.19.1
CURLOPT_PROXYUSERPWD 7.1
+CURLOPT_PROXY_SERVICE_NAME 7.43.0
CURLOPT_PROXY_TRANSFER_MODE 7.18.0
CURLOPT_PUT 7.1
CURLOPT_QUOTE 7.1
@@ -328,58 +465,78 @@
CURLOPT_READFUNCTION 7.1
CURLOPT_REDIR_PROTOCOLS 7.19.4
CURLOPT_REFERER 7.1
+CURLOPT_RESOLVE 7.21.3
CURLOPT_RESUME_FROM 7.1
CURLOPT_RESUME_FROM_LARGE 7.11.0
+CURLOPT_RTSPHEADER 7.20.0
CURLOPT_RTSP_CLIENT_CSEQ 7.20.0
CURLOPT_RTSP_REQUEST 7.20.0
CURLOPT_RTSP_SERVER_CSEQ 7.20.0
CURLOPT_RTSP_SESSION_ID 7.20.0
CURLOPT_RTSP_STREAM_URI 7.20.0
CURLOPT_RTSP_TRANSPORT 7.20.0
-CURLOPT_SEEKDATA 7.18.1
-CURLOPT_SEEKFUNCTION 7.18.1
+CURLOPT_SASL_IR 7.31.0
+CURLOPT_SEEKDATA 7.18.0
+CURLOPT_SEEKFUNCTION 7.18.0
+CURLOPT_SERVER_RESPONSE_TIMEOUT 7.20.0
+CURLOPT_SERVICE_NAME 7.43.0
CURLOPT_SHARE 7.10
CURLOPT_SOCKOPTDATA 7.16.0
CURLOPT_SOCKOPTFUNCTION 7.16.0
CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4
CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4
-CURLOPT_SOURCE_HOST 7.12.1 - 7.13.0
-CURLOPT_SOURCE_PATH 7.12.1 - 7.13.0
-CURLOPT_SOURCE_PORT 7.12.1 - 7.13.0
-CURLOPT_SOURCE_POSTQUOTE 7.12.1 - 7.15.4
-CURLOPT_SOURCE_PREQUOTE 7.12.1 - 7.15.4
-CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.4
-CURLOPT_SOURCE_URL 7.13.0 - 7.15.4
-CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.4
+CURLOPT_SOURCE_HOST 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PATH 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PORT 7.12.1 - 7.15.5
+CURLOPT_SOURCE_POSTQUOTE 7.12.1 - 7.15.5
+CURLOPT_SOURCE_PREQUOTE 7.12.1 - 7.15.5
+CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.5
+CURLOPT_SOURCE_URL 7.13.0 - 7.15.5
+CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.5
CURLOPT_SSH_AUTH_TYPES 7.16.1
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
+CURLOPT_SSH_KEYDATA 7.19.6
+CURLOPT_SSH_KEYFUNCTION 7.19.6
+CURLOPT_SSH_KNOWNHOSTS 7.19.6
CURLOPT_SSH_PRIVATE_KEYFILE 7.16.1
CURLOPT_SSH_PUBLIC_KEYFILE 7.16.1
CURLOPT_SSLCERT 7.1
-CURLOPT_SSLCERTPASSWD 7.17.0
+CURLOPT_SSLCERTPASSWD 7.1.1 7.17.0
CURLOPT_SSLCERTTYPE 7.9.3
CURLOPT_SSLENGINE 7.9.3
CURLOPT_SSLENGINE_DEFAULT 7.9.3
CURLOPT_SSLKEY 7.9.3
-CURLOPT_SSLKEYPASSWD 7.17.0
-CURLOPT_SSLKEYPASSWD 7.17.0
+CURLOPT_SSLKEYPASSWD 7.9.3 7.17.0
CURLOPT_SSLKEYTYPE 7.9.3
CURLOPT_SSLVERSION 7.1
CURLOPT_SSL_CIPHER_LIST 7.9
CURLOPT_SSL_CTX_DATA 7.10.6
CURLOPT_SSL_CTX_FUNCTION 7.10.6
+CURLOPT_SSL_ENABLE_ALPN 7.36.0
+CURLOPT_SSL_ENABLE_NPN 7.36.0
+CURLOPT_SSL_FALSESTART 7.42.0
+CURLOPT_SSL_OPTIONS 7.25.0
CURLOPT_SSL_SESSIONID_CACHE 7.16.0
CURLOPT_SSL_VERIFYHOST 7.8.1
CURLOPT_SSL_VERIFYPEER 7.4.2
+CURLOPT_SSL_VERIFYSTATUS 7.41.0
CURLOPT_STDERR 7.1
+CURLOPT_TCP_KEEPALIVE 7.25.0
+CURLOPT_TCP_KEEPIDLE 7.25.0
+CURLOPT_TCP_KEEPINTVL 7.25.0
CURLOPT_TCP_NODELAY 7.11.2
CURLOPT_TELNETOPTIONS 7.7
-CURLOPT_TFTPBLKSIZE 7.19.4
+CURLOPT_TFTP_BLKSIZE 7.19.4
CURLOPT_TIMECONDITION 7.1
CURLOPT_TIMEOUT 7.1
CURLOPT_TIMEOUT_MS 7.16.2
CURLOPT_TIMEVALUE 7.1
-CURLOPT_TRANSFERTEXT 7.11.1
+CURLOPT_TLSAUTH_PASSWORD 7.21.4
+CURLOPT_TLSAUTH_TYPE 7.21.4
+CURLOPT_TLSAUTH_USERNAME 7.21.4
+CURLOPT_TRANSFERTEXT 7.1.1
+CURLOPT_TRANSFER_ENCODING 7.21.6
+CURLOPT_UNIX_SOCKET_PATH 7.40.0
CURLOPT_UNRESTRICTED_AUTH 7.10.4
CURLOPT_UPLOAD 7.1
CURLOPT_URL 7.1
@@ -392,11 +549,25 @@
CURLOPT_WRITEDATA 7.9.7
CURLOPT_WRITEFUNCTION 7.1
CURLOPT_WRITEHEADER 7.1
+CURLOPT_WRITEINFO 7.1
+CURLOPT_XFERINFODATA 7.32.0
+CURLOPT_XFERINFOFUNCTION 7.32.0
+CURLOPT_XOAUTH2_BEARER 7.33.0
+CURLPAUSE_ALL 7.18.0
+CURLPAUSE_CONT 7.18.0
+CURLPAUSE_RECV 7.18.0
+CURLPAUSE_RECV_CONT 7.18.0
+CURLPAUSE_SEND 7.18.0
+CURLPAUSE_SEND_CONT 7.18.0
+CURLPIPE_HTTP1 7.43.0
+CURLPIPE_MULTIPLEX 7.43.0
+CURLPIPE_NOTHING 7.43.0
CURLPROTO_ALL 7.19.4
CURLPROTO_DICT 7.19.4
CURLPROTO_FILE 7.19.4
CURLPROTO_FTP 7.19.4
CURLPROTO_FTPS 7.19.4
+CURLPROTO_GOPHER 7.21.2
CURLPROTO_HTTP 7.19.4
CURLPROTO_HTTPS 7.19.4
CURLPROTO_IMAP 7.20.0
@@ -414,6 +585,8 @@
CURLPROTO_RTSP 7.20.0
CURLPROTO_SCP 7.19.4
CURLPROTO_SFTP 7.19.4
+CURLPROTO_SMB 7.40.0
+CURLPROTO_SMBS 7.40.0
CURLPROTO_SMTP 7.20.0
CURLPROTO_SMTPS 7.20.0
CURLPROTO_TELNET 7.19.4
@@ -424,21 +597,46 @@
CURLPROXY_SOCKS4A 7.18.0
CURLPROXY_SOCKS5 7.10
CURLPROXY_SOCKS5_HOSTNAME 7.18.0
+CURLSHE_BAD_OPTION 7.10.3
+CURLSHE_INVALID 7.10.3
+CURLSHE_IN_USE 7.10.3
+CURLSHE_NOMEM 7.12.0
+CURLSHE_NOT_BUILT_IN 7.23.0
+CURLSHE_OK 7.10.3
+CURLSHOPT_LOCKFUNC 7.10.3
+CURLSHOPT_NONE 7.10.3
+CURLSHOPT_SHARE 7.10.3
+CURLSHOPT_UNLOCKFUNC 7.10.3
+CURLSHOPT_UNSHARE 7.10.3
+CURLSHOPT_USERDATA 7.10.3
+CURLSOCKTYPE_ACCEPT 7.28.0
+CURLSOCKTYPE_IPCXN 7.16.0
+CURLSSH_AUTH_AGENT 7.28.0
+CURLSSH_AUTH_ANY 7.16.1
CURLSSH_AUTH_DEFAULT 7.16.1
CURLSSH_AUTH_HOST 7.16.1
CURLSSH_AUTH_KEYBOARD 7.16.1
CURLSSH_AUTH_NONE 7.16.1
CURLSSH_AUTH_PASSWORD 7.16.1
CURLSSH_AUTH_PUBLICKEY 7.16.1
-CURLUSESSL_ALL 7.17.0
+CURLSSLBACKEND_AXTLS 7.38.0
+CURLSSLBACKEND_CYASSL 7.34.0
+CURLSSLBACKEND_DARWINSSL 7.34.0
+CURLSSLBACKEND_GNUTLS 7.34.0
+CURLSSLBACKEND_GSKIT 7.34.0
+CURLSSLBACKEND_NONE 7.34.0
+CURLSSLBACKEND_NSS 7.34.0
+CURLSSLBACKEND_OPENSSL 7.34.0
+CURLSSLBACKEND_POLARSSL 7.34.0
+CURLSSLBACKEND_QSOSSL 7.34.0 - 7.38.1
+CURLSSLBACKEND_SCHANNEL 7.34.0
+CURLSSLOPT_ALLOW_BEAST 7.25.0
CURLUSESSL_ALL 7.17.0
CURLUSESSL_CONTROL 7.17.0
-CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_NONE 7.17.0
-CURLUSESSL_NONE 7.17.0
-CURLUSESSL_TRY 7.17.0
CURLUSESSL_TRY 7.17.0
CURLVERSION_FIRST 7.10
+CURLVERSION_FOURTH 7.16.1
CURLVERSION_NOW 7.10
CURLVERSION_SECOND 7.11.1
CURLVERSION_THIRD 7.12.0
@@ -447,39 +645,124 @@
CURL_CHUNK_BGN_FUNC_SKIP 7.21.0
CURL_CHUNK_END_FUNC_FAIL 7.21.0
CURL_CHUNK_END_FUNC_OK 7.21.0
+CURL_CSELECT_ERR 7.16.3
+CURL_CSELECT_IN 7.16.3
+CURL_CSELECT_OUT 7.16.3
+CURL_EASY_NONE 7.14.0 - 7.15.4
+CURL_EASY_TIMEOUT 7.14.0 - 7.15.4
+CURL_ERROR_SIZE 7.1
CURL_FNMATCHFUNC_FAIL 7.21.0
CURL_FNMATCHFUNC_MATCH 7.21.0
CURL_FNMATCHFUNC_NOMATCH 7.21.0
+CURL_FORMADD_DISABLED 7.12.1
+CURL_FORMADD_ILLEGAL_ARRAY 7.9.8
+CURL_FORMADD_INCOMPLETE 7.9.8
+CURL_FORMADD_MEMORY 7.9.8
+CURL_FORMADD_NULL 7.9.8
+CURL_FORMADD_OK 7.9.8
+CURL_FORMADD_OPTION_TWICE 7.9.8
+CURL_FORMADD_UNKNOWN_OPTION 7.9.8
+CURL_GLOBAL_ACK_EINTR 7.30.0
+CURL_GLOBAL_ALL 7.8
+CURL_GLOBAL_DEFAULT 7.8
+CURL_GLOBAL_NOTHING 7.8
+CURL_GLOBAL_SSL 7.8
+CURL_GLOBAL_WIN32 7.8.1
CURL_HTTP_VERSION_1_0 7.9.1
CURL_HTTP_VERSION_1_1 7.9.1
+CURL_HTTP_VERSION_2_0 7.33.0
+CURL_HTTP_VERSION_2 7.43.0
CURL_HTTP_VERSION_NONE 7.9.1
CURL_IPRESOLVE_V4 7.10.8
CURL_IPRESOLVE_V6 7.10.8
CURL_IPRESOLVE_WHATEVER 7.10.8
+CURL_LOCK_ACCESS_NONE 7.10.3
+CURL_LOCK_ACCESS_SHARED 7.10.3
+CURL_LOCK_ACCESS_SINGLE 7.10.3
+CURL_LOCK_DATA_CONNECT 7.10.3
+CURL_LOCK_DATA_COOKIE 7.10.3
+CURL_LOCK_DATA_DNS 7.10.3
+CURL_LOCK_DATA_NONE 7.10.3
+CURL_LOCK_DATA_SHARE 7.10.4
+CURL_LOCK_DATA_SSL_SESSION 7.10.3
+CURL_LOCK_TYPE_CONNECT 7.10 - 7.10.2
+CURL_LOCK_TYPE_COOKIE 7.10 - 7.10.2
+CURL_LOCK_TYPE_DNS 7.10 - 7.10.2
+CURL_LOCK_TYPE_NONE 7.10 - 7.10.2
+CURL_LOCK_TYPE_SSL_SESSION 7.10 - 7.10.2
+CURL_MAX_HTTP_HEADER 7.19.7
+CURL_MAX_WRITE_SIZE 7.9.7
CURL_NETRC_IGNORED 7.9.8
CURL_NETRC_OPTIONAL 7.9.8
CURL_NETRC_REQUIRED 7.9.8
+CURL_POLL_IN 7.14.0
+CURL_POLL_INOUT 7.14.0
+CURL_POLL_NONE 7.14.0
+CURL_POLL_OUT 7.14.0
+CURL_POLL_REMOVE 7.14.0
+CURL_PROGRESS_BAR 7.1.1 - 7.4.1
+CURL_PROGRESS_STATS 7.1.1 - 7.4.1
+CURL_READFUNC_ABORT 7.12.1
+CURL_READFUNC_PAUSE 7.18.0
+CURL_REDIR_GET_ALL 7.19.1
+CURL_REDIR_POST_301 7.19.1
+CURL_REDIR_POST_302 7.19.1
+CURL_REDIR_POST_303 7.25.1
+CURL_REDIR_POST_ALL 7.19.1
+CURL_RTSPREQ_ANNOUNCE 7.20.0
+CURL_RTSPREQ_DESCRIBE 7.20.0
+CURL_RTSPREQ_GET_PARAMETER 7.20.0
+CURL_RTSPREQ_NONE 7.20.0
+CURL_RTSPREQ_OPTIONS 7.20.0
+CURL_RTSPREQ_PAUSE 7.20.0
+CURL_RTSPREQ_PLAY 7.20.0
+CURL_RTSPREQ_RECEIVE 7.20.0
+CURL_RTSPREQ_RECORD 7.20.0
+CURL_RTSPREQ_SETUP 7.20.0
+CURL_RTSPREQ_SET_PARAMETER 7.20.0
+CURL_RTSPREQ_TEARDOWN 7.20.0
CURL_SEEKFUNC_CANTSEEK 7.19.5
CURL_SEEKFUNC_FAIL 7.19.5
CURL_SEEKFUNC_OK 7.19.5
+CURL_SOCKET_BAD 7.14.0
+CURL_SOCKET_TIMEOUT 7.14.0
+CURL_SOCKOPT_ALREADY_CONNECTED 7.21.5
+CURL_SOCKOPT_ERROR 7.21.5
+CURL_SOCKOPT_OK 7.21.5
CURL_SSLVERSION_DEFAULT 7.9.2
CURL_SSLVERSION_SSLv2 7.9.2
CURL_SSLVERSION_SSLv3 7.9.2
CURL_SSLVERSION_TLSv1 7.9.2
+CURL_SSLVERSION_TLSv1_0 7.34.0
+CURL_SSLVERSION_TLSv1_1 7.34.0
+CURL_SSLVERSION_TLSv1_2 7.34.0
CURL_TIMECOND_IFMODSINCE 7.9.7
CURL_TIMECOND_IFUNMODSINCE 7.9.7
CURL_TIMECOND_LASTMOD 7.9.7
+CURL_TIMECOND_NONE 7.9.7
+CURL_TLSAUTH_NONE 7.21.4
+CURL_TLSAUTH_SRP 7.21.4
CURL_VERSION_ASYNCHDNS 7.10.7
CURL_VERSION_CONV 7.15.4
CURL_VERSION_CURLDEBUG 7.19.6
CURL_VERSION_DEBUG 7.10.6
-CURL_VERSION_GSSNEGOTIATE 7.10.6
+CURL_VERSION_GSSAPI 7.38.0
+CURL_VERSION_GSSNEGOTIATE 7.10.6 7.38.0
+CURL_VERSION_HTTP2 7.33.0
CURL_VERSION_IDN 7.12.0
CURL_VERSION_IPV6 7.10
-CURL_VERSION_KERBEROS4 7.10
+CURL_VERSION_KERBEROS4 7.10 7.33.0
+CURL_VERSION_KERBEROS5 7.40.0
CURL_VERSION_LARGEFILE 7.11.1
CURL_VERSION_LIBZ 7.10
CURL_VERSION_NTLM 7.10.6
+CURL_VERSION_NTLM_WB 7.22.0
CURL_VERSION_SPNEGO 7.10.8
CURL_VERSION_SSL 7.10
CURL_VERSION_SSPI 7.13.2
+CURL_VERSION_TLSAUTH_SRP 7.21.4
+CURL_VERSION_UNIX_SOCKETS 7.40.0
+CURL_WAIT_POLLIN 7.28.0
+CURL_WAIT_POLLOUT 7.28.0
+CURL_WAIT_POLLPRI 7.28.0
+CURL_WRITEFUNC_PAUSE 7.18.0
diff --git a/docs/libcurl/symbols.pl b/docs/libcurl/symbols.pl
new file mode 100755
index 0000000..a7b76e2
--- /dev/null
+++ b/docs/libcurl/symbols.pl
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2011, Daniel Stenberg, <[email protected]>, 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 http://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.
+#
+###########################################################################
+#
+# Experience has shown that the symbols-in-versions file is very useful to
+# applications that want to build with a wide range of libcurl versions.
+# It is however easy to get it wrong and the source gets a bit messy with all
+# the fixed numerical comparisons.
+#
+# The point of this script is to provide an easy-to-use macro for libcurl-
+# using applications to do preprocessor checks for specific libcurl defines,
+# and yet make the code clearly show what the macro is used for.
+#
+# Run this script and generate libcurl-symbols.h and then use that header in
+# a fashion similar to:
+#
+# #include "libcurl-symbols.h"
+#
+# #if LIBCURL_HAS(CURLOPT_MUTE)
+# has mute
+# #else
+# no mute
+# #endif
+#
+#
+open F, "<symbols-in-versions";
+
+sub str2num {
+ my ($str)=@_;
+ if($str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
+ return sprintf("0x%06x", $1<<16 | $2 << 8 | $3);
+ }
+}
+
+print <<EOS
+
+#include <curl/curl.h>
+
+#define LIBCURL_HAS(x) \\
+ (defined(x ## _FIRST) && (x ## _FIRST <= LIBCURL_VERSION_NUM) && \\
+ (!defined(x ## _LAST) || ( x ## _LAST >= LIBCURL_VERSION_NUM)))
+
+EOS
+ ;
+
+while(<F>) {
+ if(/^(CURL[^ ]*)[ \t]*(.*)/) {
+ my ($sym, $vers)=($1, $2);
+
+ my $intr;
+ my $rm;
+ my $dep;
+
+ # is there removed info?
+ if($vers =~ /([\d.]+)[ \t-]+([\d.-]+)[ \t]+([\d.]+)/) {
+ ($intr, $dep, $rm)=($1, $2, $3);
+ }
+ # is it a dep-only line?
+ elsif($vers =~ /([\d.]+)[ \t-]+([\d.]+)/) {
+ ($intr, $dep)=($1, $2);
+ }
+ else {
+ $intr = $vers;
+ }
+
+ my $inum = str2num($intr);
+
+ print <<EOS
+#define ${sym}_FIRST $inum /* Added in $intr */
+EOS
+;
+ my $irm = str2num($rm);
+ if($rm) {
+ print <<EOS
+#define ${sym}_LAST $irm /* Last featured in $rm */
+EOS
+;
+ }
+
+ }
+}
diff --git a/docs/mk-ca-bundle.1 b/docs/mk-ca-bundle.1
new file mode 100644
index 0000000..164c9c3
--- /dev/null
+++ b/docs/mk-ca-bundle.1
@@ -0,0 +1,110 @@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 2008 - 2014, Daniel Stenberg, <[email protected]>, 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 http://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 mk-ca-bundle 1 "5 Jan 2013" "version 1.20" "mk-ca-bundle manual"
+.SH NAME
+mk-ca-bundle \- convert mozilla's certdata.txt to PEM format
+.SH SYNOPSIS
+mk-ca-bundle [bilnpqstuv]
+.I [outputfile]
+.SH DESCRIPTION
+The mk-ca-bundle tool downloads the certdata.txt file from Mozilla's source
+tree over HTTP, then parses certdata.txt and extracts certificates
+into PEM format. By default, only CA root certificates trusted to issue SSL
+server authentication certificates are extracted. These are then processed with
+the OpenSSL commandline tool to produce the final ca-bundle file.
+
+The default \fIoutputfile\fP name is \fBca-bundle.crt\fP. By setting it to '-'
+(a single dash) you will get the output sent to STDOUT instead of a file.
+
+The PEM format this scripts uses for output makes the result readily available
+for use by just about all OpenSSL or GnuTLS powered applications, such as
+curl, wget and more.
+.SH OPTIONS
+The following options are supported:
+.IP -b
+backup an existing version of \fIoutputfilename\fP
+.IP "-d [name]"
+specify which Mozilla tree to pull certdata.txt from (or a custom URL). Valid
+names are: aurora, beta, central, mozilla, nss, release (default). They are
+shortcuts for which source tree to get the cert data from.
+.IP -f
+force rebuild even if certdata.txt is current (Added in version 1.17)
+.IP -i
+print version info about used modules
+.IP -l
+print license info about certdata.txt
+.IP -n
+no download of certdata.txt (to use existing)
+.IP "-p [purposes]:[levels]"
+list of Mozilla trust purposes and levels for certificates to include in output.
+Takes the form of a comma separated list of purposes, a colon, and a comma
+separated list of levels. The default is to include all certificates trusted
+to issue SSL Server certificates (SERVER_AUTH:TRUSTED_DELEGATOR).
+
+(Added in version 1.21, Perl only)
+
+Valid purposes are:
+.RS
+ALL, DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT,
+DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, CRL_SIGN,
+SERVER_AUTH (default), CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION,
+IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, TIME_STAMPING, STEP_UP_APPROVED
+.RE
+.IP
+Valid trust levels are:
+.RS
+ALL, TRUSTED_DELEGATOR (default), NOT_TRUSTED, MUST_VERIFY_TRUST, TRUSTED
+.RE
+.IP -q
+be really quiet (no progress output at all)
+.IP -t
+include plain text listing of certificates
+.IP "-s [algorithms]"
+comma separated list of signature algorithms with which to hash/fingerprint
+each certificate and output when run in plain text mode.
+
+(Added in version 1.21, Perl only)
+
+Valid algorithms are:
+.RS
+ALL, NONE, MD5 (default), SHA1, SHA256, SHA384, SHA512
+.RE
+.IP -u
+unlink (remove) certdata.txt after processing
+.IP -v
+be verbose and print out processed CAs
+.SH EXIT STATUS
+Returns 0 on success. Returns 1 if it fails to download data.
+.SH CERTDATA FORMAT
+The file format used by Mozilla for this trust information seems to be documented here:
+.nf
+http://p11-glue.freedesktop.org/doc/storing-trust-policy/storing-trust-existing.html
+.fi
+.SH SEE ALSO
+.BR curl (1)
+.SH HISTORY
+\fBmk-ca-bundle\fP is a command line tool that is shipped as part of every
+curl and libcurl release (see http://curl.haxx.se/). It was originally based
+on the parse-certs script written by Roland Krikava and was later much
+improved by Guenter Knauf. This manual page was initially written by Jan
+Schaumann \&<[email protected]>.