docs: spellfixes

Pointed by the new CI job
This commit is contained in:
Daniel Stenberg 2022-09-20 23:30:19 +02:00
parent 72c41f7c8b
commit fd1ce3d4b0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
188 changed files with 1203 additions and 1208 deletions

View file

@ -26,11 +26,11 @@ ABI - Application Binary Interface
we do not break the ABI so you can *always* upgrade to a later version without
any loss or change in functionality.
## Soname Bumps
## 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
changed to adhere to new things, we will bump the soname. Then the library
changed to adhere to new things, we will bump the SONAME. Then the library
will get a different output name and thus can in fact be installed in
parallel with an older installed lib (on most systems). Thus, old
applications built against the previous ABI version will remain working and
@ -50,11 +50,11 @@ ABI - Application Binary Interface
that going backwards may get you in a situation where you pick a libcurl that
does not support the options your application needs. Or possibly you even
downgrade so far so you cross an ABI break border and thus a different
soname, and then your application may need to adapt to the modified ABI.
SONAME, and then your application may need to adapt to the modified ABI.
## History
The previous major library soname number bumps (breaking backwards
The previous major library SONAME number bumps (breaking backwards
compatibility) happened the following times:
0 - libcurl 7.1, August 2000

View file

@ -35,7 +35,7 @@ char *curl_easy_escape(CURL *curl, const char *string, int length);
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).
version (\fB%NN\fP where \fBNN\fP is a two-digit hexadecimal number).
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. This function does not accept

View file

@ -122,7 +122,7 @@ setup a transfer "through" an HTTP(S) proxy.
.IP CURLH_1XX
The header arrived in an HTTP 1xx response. A 1xx response is an "intermediate"
response that might happen before the "real" response.
.IP CURLH_PSUEDO
.IP CURLH_PSEUDO
The header is an HTTP/2 or HTTP/3 pseudo header
.SH EXAMPLE
.nf

View file

@ -31,8 +31,8 @@ curl_easy_option_by_id - find an easy setopt option by id
const struct curl_easyoption *curl_easy_option_by_id(CURLoption id);
.fi
.SH DESCRIPTION
Given a CURLoption \fBid\fP, this function returns a pointer to the
curl_easyoption struct, holding information about the
Given a \fICURLoption\fP \fBid\fP, this function returns a pointer to the
\fIcurl_easyoption\fP struct, holding information about the
\fIcurl_easy_setopt(3)\fP option using that id. The option id is the CURLOPT_
prefix ones provided in the standard curl/curl.h header file. This function
will return the non-aliases version for the cases where there is an alias
@ -49,7 +49,7 @@ if(opt) {
.SH AVAILABILITY
This function was added in libcurl 7.73.0
.SH RETURN VALUE
A pointer to the curl_easyoption struct for the option or NULL.
A pointer to the \fIcurl_easyoption\fP struct for the option or NULL.
.SH "SEE ALSO"
.BR curl_easy_option_by_name "(3)," curl_easy_option_next "(3),"
.BR curl_easy_setopt "(3),"

View file

@ -31,10 +31,11 @@ curl_easy_option_by_name - find an easy setopt option by name
const struct curl_easyoption *curl_easy_option_by_name(const char *name);
.fi
.SH DESCRIPTION
Given a \fBname\fP, this function returns a pointer to the curl_easyoption
struct, holding information about the \fIcurl_easy_setopt(3)\fP option using
that name. The name should be specified without the "CURLOPT_" prefix and the
name comparison is made case insensitive.
Given a \fBname\fP, this function returns a pointer to the
\fIcurl_easyoption\fP struct, holding information about the
\fIcurl_easy_setopt(3)\fP option using that name. The name should be specified
without the "CURLOPT_" prefix and the name comparison is made case
insensitive.
If libcurl has no option with the given name, this function returns NULL.
.SH EXAMPLE
@ -47,7 +48,7 @@ if(opt) {
.SH AVAILABILITY
This function was added in libcurl 7.73.0
.SH RETURN VALUE
A pointer to the curl_easyoption struct for the option or NULL.
A pointer to the \fIcurl_easyoption\fP struct for the option or NULL.
.SH "SEE ALSO"
.BR curl_easy_option_next "(3)," curl_easy_option_by_id "(3),"
.BR curl_easy_setopt "(3),"

View file

@ -53,7 +53,7 @@ const struct curl_easyoption *
curl_easy_option_next(const struct curl_easyoption *prev);
.fi
.SH DESCRIPTION
This function returns a pointer to the first or the next curl_easyoption
This function returns a pointer to the first or the next \fIcurl_easyoption\fP
struct, providing an ability to iterate over all known options for
\fIcurl_easy_setopt(3)\fP in this instance of libcurl.
@ -79,8 +79,8 @@ while(opt) {
.SH AVAILABILITY
This function was added in libcurl 7.73.0
.SH RETURN VALUE
A pointer to the curl_easyoption struct for the next option or NULL if no more
options.
A pointer to the \fIcurl_easyoption\fP struct for the next option or NULL if
no more options.
.SH "SEE ALSO"
.BR curl_easy_option_by_name "(3)," curl_easy_option_by_id "(3),"
.BR curl_easy_setopt "(3),"

View file

@ -74,7 +74,7 @@ if(curl) {
.SH AVAILABILITY
Always
.SH RETURN VALUE
CURLE_OK (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 - see \fIlibcurl-errors(3)\fP. If the \fICURLOPT_ERRORBUFFER(3)\fP was
set with \fIcurl_easy_setopt(3)\fP there will be a readable error message in

View file

@ -220,7 +220,7 @@ Ask for alternate buffer size. See \fICURLOPT_BUFFERSIZE(3)\fP
.IP CURLOPT_PORT
Port number to connect to. See \fICURLOPT_PORT(3)\fP
.IP CURLOPT_TCP_FASTOPEN
Enable TFO, TCP Fast Open. See \fICURLOPT_TCP_FASTOPEN(3)\fP
Enable TCP Fast Open. See \fICURLOPT_TCP_FASTOPEN(3)\fP
.IP CURLOPT_TCP_NODELAY
Disable the Nagle algorithm. See \fICURLOPT_TCP_NODELAY(3)\fP
.IP CURLOPT_ADDRESS_SCOPE
@ -402,7 +402,7 @@ Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP
.IP CURLOPT_APPEND
Append to remote file. See \fICURLOPT_APPEND(3)\fP
.IP CURLOPT_FTP_USE_EPRT
Use EPTR. See \fICURLOPT_FTP_USE_EPRT(3)\fP
Use EPRT. See \fICURLOPT_FTP_USE_EPRT(3)\fP
.IP CURLOPT_FTP_USE_EPSV
Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP
.IP CURLOPT_FTP_USE_PRET
@ -452,7 +452,7 @@ Resume a transfer. See \fICURLOPT_RESUME_FROM(3)\fP
.IP CURLOPT_RESUME_FROM_LARGE
Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP
.IP CURLOPT_CURLU
Set URL to work on with CURLU *. See \fICURLOPT_CURLU(3)\fP
Set URL to work on with a URL handle. See \fICURLOPT_CURLU(3)\fP
.IP CURLOPT_CUSTOMREQUEST
Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP
.IP CURLOPT_FILETIME
@ -675,9 +675,9 @@ Custom pointer to pass to ssh key callback. See \fICURLOPT_SSH_KEYDATA(3)\fP
Callback for checking host key handling. See \fICURLOPT_SSH_HOSTKEYFUNCTION(3)\fP
.IP CURLOPT_SSH_HOSTKEYDATA
Custom pointer to pass to ssh host key callback. See \fICURLOPT_SSH_HOSTKEYDATA(3)\fP
.SH WEBSOCKETS
.SH WEBSOCKET
.IP CURLOPT_WS_OPTIONS
Set Websockets options. See \fICURLOPT_WS_OPTIONS(3)\fP
Set WebSocket options. See \fICURLOPT_WS_OPTIONS(3)\fP
.SH OTHER OPTIONS
.IP CURLOPT_PRIVATE
Private pointer to store. See \fICURLOPT_PRIVATE(3)\fP

View file

@ -42,11 +42,10 @@ If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_unescape(3)\fP
will use strlen() on the input \fIurl\fP string to find out the size.
If \fBoutlength\fP 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. Since this is a
pointer to an \fIint\fP type, it can only return a value up to INT_MAX so no
longer string can be unescaped if the string length is returned in this
parameter.
returned string in the integer it points to. This allows proper handling even
for strings containing %00. Since this is a pointer to an \fIint\fP type, it
can only return a value up to \fIINT_MAX\fP so no longer string can be
returned in this parameter.
Since 7.82.0, the \fBcurl\fP parameter is ignored. Prior to that there was
per-handle character conversion support for some very old operating systems

View file

@ -35,11 +35,11 @@ Obsolete function. Use \fIcurl_easy_escape(3)\fP instead!
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).
A-Z or 0-9 will be converted to their "URL escaped" version (\fB%NN\fP where
\fBNN\fP is a two-digit hexadecimal number).
If the \fBlength\fP argument is set to 0, curl_escape() will use strlen() on
the input \fBurl\fP string to find out the size.
If the \fBlength\fP argument is set to 0, \fIcurl_escape(3)\fP will use
strlen() on the input \fBurl\fP string to find out the size.
You must \fIcurl_free(3)\fP the returned string when you are done with it.
.SH EXAMPLE

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.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
curl_formadd - add a section to a multipart form POST
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -34,13 +34,12 @@ CURLFORMcode curl_formadd(struct curl_httppost **firstitem,
.SH DESCRIPTION
This function is deprecated. Do not use. See \fIcurl_mime_init(3)\fP instead.
curl_formadd() is used to append sections when building a multipart/formdata
HTTP POST (sometimes referred to as RFC2388-style posts). Append one section
at a time until you have added all the sections you want included and then you
pass the \fIfirstitem\fP pointer as parameter to \fICURLOPT_HTTPPOST(3)\fP.
\fIlastitem\fP is set after each \fIcurl_formadd(3)\fP call and on repeated
invokes it should be left as set to allow repeated invokes to find the end of
the list faster.
curl_formadd() is used to append sections when building a multipart form
post. Append one section at a time until you have added all the sections you
want included and then you pass the \fIfirstitem\fP pointer as parameter to
\fICURLOPT_HTTPPOST(3)\fP. \fIlastitem\fP is set after each
\fIcurl_formadd(3)\fP call and on repeated invokes it should be left as set to
allow repeated invokes to find the end of the list faster.
After the \fIlastitem\fP pointer follow the real arguments.
@ -52,7 +51,7 @@ the function itself. You must call \fIcurl_formfree(3)\fP on the
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.
First, there are some basics you need to understand about multipart/formdata
First, there are some basics you need to understand about multipart form
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 will discuss what options you use to set these properties in the
@ -65,14 +64,15 @@ parts.
.IP CURLFORM_COPYNAME
followed by a string which provides the \fIname\fP of this part. libcurl
copies the string so your application does not need to keep it around after
this function call. If the name is not NUL-terminated, you must set its length
with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to contain
zero-valued bytes. The copied data will be freed by \fIcurl_formfree(3)\fP.
this function call. If the name is not null-terminated, you must set its
length with \fBCURLFORM_NAMELENGTH\fP. The \fIname\fP is not allowed to
contain zero-valued bytes. The copied data will be freed by
\fIcurl_formfree(3)\fP.
.IP CURLFORM_PTRNAME
followed by a string which provides the \fIname\fP of this part. libcurl
will use the pointer and refer to the data in your application, so you
must make sure it remains until curl no longer needs it. If the name
is not NUL-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP.
is not null-terminated, you must set its length with \fBCURLFORM_NAMELENGTH\fP.
The \fIname\fP is not allowed to contain zero-valued bytes.
.IP CURLFORM_COPYCONTENTS
followed by a pointer to the contents of this part, the actual data
@ -82,11 +82,11 @@ terminated, or if you would like it to contain zero bytes, you must
set the length of the name with \fBCURLFORM_CONTENTSLENGTH\fP. The copied
data will be freed by \fIcurl_formfree(3)\fP.
.IP CURLFORM_PTRCONTENTS
followed by a pointer to the contents of this part, the actual data
to send away. libcurl will use the pointer and refer to the data in your
application, so you must make sure it remains until curl no longer needs it.
If the data is not NUL-terminated, or if you would like it to contain zero bytes,
you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
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
is not null-terminated, or if you would like it to contain zero bytes, you
must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
.IP CURLFORM_CONTENTLEN
followed by a curl_off_t value giving the length of the contents. Note that
for \fICURLFORM_STREAM\fP contents, this option is mandatory.
@ -157,10 +157,10 @@ chunked encoded. (Option added in libcurl 7.18.2)
.IP CURLFORM_ARRAY
Another possibility to send options to curl_formadd() is the
\fBCURLFORM_ARRAY\fP option, that passes a struct curl_forms array pointer as
its value. Each curl_forms structure element has a CURLformoption and a char
pointer. The final element in the array must be a CURLFORM_END. All available
options can be used in an array, except the CURLFORM_ARRAY option itself. The
last argument in such an array must always be \fBCURLFORM_END\fP.
its value. Each curl_forms structure element has a \fICURLformoption\fP and a
char pointer. The final element in the array must be a CURLFORM_END. All
available options can be used in an array, except the CURLFORM_ARRAY option
itself. The last argument in such an array must always be \fBCURLFORM_END\fP.
.IP CURLFORM_CONTENTHEADER
specifies extra headers for the form POST section. This takes a curl_slist
prepared in the usual way using \fBcurl_slist_append\fP and appends the list
@ -168,9 +168,10 @@ of headers to those libcurl automatically generates. The list must exist while
the POST occurs, if you free it before the post completes you may experience
problems.
When you have passed the HttpPost pointer to \fIcurl_easy_setopt(3)\fP (using
the \fICURLOPT_HTTPPOST(3)\fP option), you must not free the list until after
you have called \fIcurl_easy_cleanup(3)\fP for the curl handle.
When you have passed the \fIstruct curl_httppost\fP pointer to
\fIcurl_easy_setopt(3)\fP (using the \fICURLOPT_HTTPPOST(3)\fP option), you
must not free the list until after you have called \fIcurl_easy_cleanup(3)\fP
for the curl handle.
See example below.
.SH EXAMPLE
@ -259,7 +260,7 @@ actually sent: the effective data size can then not be automatically
determined, resulting in a chunked encoding transfer. Backslashes and
double quotes in field and file names are now escaped before transmission.
.SH RETURN VALUE
0 means everything was ok, non-zero means an error occurred corresponding
0 means everything was OK, non-zero means an error occurred corresponding
to a CURL_FORMADD_* constant defined in
.I <curl/curl.h>
.SH "SEE ALSO"

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.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
curl_formfree - free a previously build multipart form post chain
.SH SYNOPSIS
.nf
#include <curl/curl.h>

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.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
curl_formget - serialize a previously built multipart form POST chain
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>
@ -67,6 +67,6 @@ request as only then will libcurl get the actual read callback to use!
This function was added in libcurl 7.15.5. The form API is deprecated in
libcurl 7.56.0.
.SH RETURN VALUE
0 means everything was ok, non-zero means an error occurred
0 means everything was OK, non-zero means an error occurred
.SH "SEE ALSO"
.BR curl_formadd "(3), " curl_mime_init "(3)"

View file

@ -45,9 +45,9 @@ order of the items is immaterial. A date string may contain many flavors of
items:
.TP 0.8i
.B calendar date items
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.
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.
.TP
.B time of the day items
This string specifies the time on a given day. You must specify it with 6
@ -61,7 +61,7 @@ UTC. Supported formats include: -1200, MST, +0100.
.TP
.B day of the week items
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
(using English): `Sunday', `Monday', etc or they may be abbreviated to their
first three letters. This is usually not info that adds anything.
.TP
.B pure numbers
@ -97,8 +97,8 @@ calendar date.
.SH STANDARDS
This parser handles 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 RFC
7231 says HTTP applications may use.
RFC 1036) and ANSI C's \fIasctime()\fP format. These formats are the only ones
RFC 7231 says HTTP applications may use.
.SH AVAILABILITY
Always
.SH RETURN VALUE

View file

@ -45,9 +45,7 @@ You must \fIcurl_free(3)\fP the returned string when you are done with it.
}
.fi
.SH AVAILABILITY
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().
Always
.SH RETURN VALUE
A pointer to a null-terminated string or NULL if it failed to find the
specified name.

View file

@ -57,9 +57,9 @@ This does not just mean no other thread that is using libcurl. Because
similarly thread unsafe, it could conflict with any other thread that uses
these other libraries.
If you are initializing libcurl from a Windows DLL you should not initialize it
from DllMain or a static initializer because Windows holds the loader lock
during that time and it could cause a deadlock.
If you are initializing libcurl from a Windows DLL you should not initialize
it from \fIDllMain\fP or a static initializer because Windows holds the loader
lock during that time and it could cause a deadlock.
See the description in \fIlibcurl(3)\fP of global environment requirements for
details of how to use this function.
@ -89,7 +89,7 @@ winsock has to be done by the application or you risk getting undefined
behaviors. This option exists for when the initialization is handled outside
of libcurl so there's no need for libcurl to do it again.
.IP CURL_GLOBAL_NOTHING
Initialise nothing extra. This sets no bit.
Initialize nothing extra. This sets no bit.
.IP CURL_GLOBAL_DEFAULT
A sensible default. It will init both SSL and Win32. Right now, this equals
the functionality of the \fBCURL_GLOBAL_ALL\fP mask.

View file

@ -72,7 +72,7 @@ screw things up for libcurl. Take care!
.SH AVAILABILITY
Added in 7.12.0
.SH RETURN VALUE
CURLE_OK (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
\fI<curl/curl.h>\fP defines - see \fIlibcurl-errors(3)\fP.
.SH "SEE ALSO"
.BR curl_global_init "(3), "

View file

@ -64,17 +64,17 @@ The backend can be identified by the \fIid\fP
both \fIid\fP and \fIname\fP are specified, the \fIname\fP will be ignored.
If neither \fIid\fP nor \fPname\fP are specified, the function will fail with
CURLSSLSET_UNKNOWN_BACKEND and set the \fIavail\fP pointer to the
\fBCURLSSLSET_UNKNOWN_BACKEND\fP and set the \fIavail\fP pointer to the
NULL-terminated list of available backends. The available backends are those
that this particular build of libcurl supports.
Since libcurl 7.60.0, the \fIavail\fP pointer will always be set to the list
of alternatives if non-NULL.
Upon success, the function returns CURLSSLSET_OK.
Upon success, the function returns \fBCURLSSLSET_OK\fP.
If the specified SSL backend is not available, the function returns
CURLSSLSET_UNKNOWN_BACKEND and sets the \fIavail\fP pointer to a
\fBCURLSSLSET_UNKNOWN_BACKEND\fP and sets the \fIavail\fP pointer to a
NULL-terminated list of available SSL backends. In this case, you may call the
function again to try to select a different backend.
@ -105,7 +105,8 @@ This does not just mean no other thread that is using libcurl.
This function was added in libcurl 7.56.0. Before this version, there was no
support for choosing SSL backends at runtime.
.SH RETURN VALUE
If this function returns CURLSSLSET_OK, the backend was successfully selected.
If this function returns \fICURLSSLSET_OK\fP, the backend was successfully
selected.
If the chosen backend is unknown (or support for the chosen backend has not
been compiled into libcurl), the function returns

View file

@ -67,7 +67,7 @@ not be used with other types of data.
If the original data is already encoded in such a scheme, a custom
\fIContent-Transfer-Encoding\fP header should be added with
\FIcurl_mime_headers\fP() instead of setting a part encoder.
\fIcurl_mime_headers\fP() instead of setting a part encoder.
Encoding should not be applied to multiparts, thus the use of this
function on a part with content set with \fIcurl_mime_subparts\fP() is

View file

@ -36,9 +36,9 @@ with \fIcurl_mime_addpart(3)\fP and other mime-handling functions. This must
be called when the data has been used, which typically means after
\fIcurl_easy_perform(3)\fP has been called.
The handle to free is the one you passed to
the \fICURLOPT_MIMEPOST(3)\fP option: attached subparts mime structures must
not be explicitly freed as they are by the top structure freeing.
The handle to free is the one you passed to the \fICURLOPT_MIMEPOST(3)\fP
option: attached sub part mime structures must not be explicitly freed as they
are by the top structure freeing.
\fBmime\fP is the handle as returned from a previous call to
\fIcurl_mime_init(3)\fP and may be NULL.

View file

@ -41,7 +41,7 @@ fields are named.
The name string is copied into the part, thus the associated storage may
safely be released or reused after call. Setting a part's name multiple times
is valid: only the value set by the last call is retained. It is possible to
"unname" a part by setting \fIname\fP to NULL.
reset the name of a part by setting \fIname\fP to NULL.
.SH EXAMPLE
.nf
curl_mime *mime;

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.TH curl_mime_subparts 3 "22 August 2017" "libcurl 7.56.0" "libcurl Manual"
.SH NAME
curl_mime_subparts - set subparts of a multipart mime part
curl_mime_subparts - set sub-parts of a multipart mime part
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -36,7 +36,7 @@ structure.
\fIpart\fP is a handle to the multipart part.
\fIsubparts\fP is a mime structure handle holding the subparts. After
\fIsubparts\fP is a mime structure handle holding the sub-parts. After
\fIcurl_mime_subparts\fP succeeds, the mime structure handle belongs to the
multipart part and must not be freed explicitly. It may however be updated by
subsequent calls to mime API functions.

View file

@ -64,9 +64,9 @@ The functions \fBcurl_mvprintf()\fP, \fBcurl_mvfprintf()\fP,
\fBcurl_mvsprintf()\fP, \fBcurl_mvsnprintf()\fP are equivalent to the
functions \fBcurl_mprintf()\fP, \fBcurl_mfprintf()\fP, \fBcurl_msprintf()\fP,
\fBcurl_msnprintf()\fP, respectively, except that they are called with a
va_list instead of a variable number of arguments. These functions do not
call the va_end macro. Because they invoke the va_arg macro, the value of ap
is undefined after the call.
\fIva_list\fP instead of a variable number of arguments. These functions do
not call the \fIva_end\fP macro. Because they invoke the \fIva_arg\fP macro,
the value of \fIap\fP is undefined after the call.
The functions \fBcurl_maprintf()\fP and \fBcurl_mvaprintf()\fP return the
output string as pointer to a newly allocated memory area. The returned string
@ -93,21 +93,21 @@ can also specify explicitly which argument is taken, at each place where an
argument is required, by writing "%m$" instead of '%' and "*m$" instead
of '*', where the decimal integer m denotes the position in the argument list
of the desired argument, indexed starting from 1. Thus,
.nf
curl_mprintf("%*d", width, num);
.fi
and
.nf
curl_mprintf("%2$*1$d", width, num);
.fi
are equivalent. The second style allows repeated references to the same
argument.
If the style using '$' is used, it must be used throughout for all conversions
taking an argument and all width and precision arguments, but it may be mixed
with "%%" formats, which do not consume an argument. There may be no gaps in
the numbers of argu ments specified using '$'; for example, if arguments 1
and 3 are specified, argument 2 must also be specified somewhere in the format
the numbers of arguments specified using '$'; for example, if arguments 1 and
3 are specified, argument 2 must also be specified somewhere in the format
string.
.SH "Flag characters"
@ -139,17 +139,17 @@ minimum field width. If the converted value has fewer characters than the
field width, it will be padded with spaces on the left (or right, if the
left-adjustment flag has been given). Instead of a decimal digit string one
may write "*" or "*m$" (for some decimal integer m) to specify that the field
width is given in the next argument, or in the m-th argument, respec tively,
which must be of type int. A negative field width is taken as a '-' flag
followed by a positive field width. In no case does a nonexistent or small
field width cause truncation of a field; if the result of a conversion is
wider than the field width, the field is expanded to contain the conversion
result.
width is given in the next argument, or in the \fIm-th\fP argument,
respectively, which must be of type int. A negative field width is taken as
a '-' flag followed by a positive field width. In no case does a nonexistent
or small field width cause truncation of a field; if the result of a
conversion is wider than the field width, the field is expanded to contain the
conversion result.
.SH "Precision"
An optional precision in the form of a period ('.') followed by an optional
decimal digit string. Instead of a decimal digit string one may write "*" or
"*m$" (for some decimal integer m) to specify that the precision is given in
the next argument, or in the m-th argument, respectively, which must be of
the next argument, or in the \fIm-th\fP argument, respectively, which must be of
type int. If the precision is given as just '.', the precision is taken to be
zero. A negative precision is taken as if the precision were omitted. This
gives the minimum number of digits to appear for \fBd\fP, \fBi\fP, \fBo\fP,
@ -198,18 +198,18 @@ empty.
.B o, u, x, X
The unsigned int argument is converted to unsigned octal (o), unsigned decimal
(u), or unsigned hexadecimal (\fBx\fP and \fBX\fP) notation. The letters
abcdef are used for \fBx\fP conversions; the letters ABCDEF are used for
\fBX\fP conversions. The precision, if any, gives the minimum number of digits
that must appear; if the converted value requires fewer digits, it is padded
on the left with zeros. The default precision is 1. When 0 is printed with
an explicit precision 0, the output is empty.
\fIabcdef\fP are used for \fBx\fP conversions; the letters \fIABCDEF\fP are
used for \fBX\fP conversions. The precision, if any, gives the minimum number
of digits that must appear; if the converted value requires fewer digits, it
is padded on the left with zeros. The default precision is 1. When 0 is
printed with an explicit precision 0, the output is empty.
.TP
.B e, E
The double argument is rounded and output in the style "[-]d.ddde±dd"
The double argument is rounded and output in the style \fB"[-]d.ddde±dd"\fP
.TP
.B f, F
The double argument is rounded and output to decimal notiation in the style
[-]ddd.ddd.
The double argument is rounded and output to decimal notation in the style
\fB"[-]ddd.ddd"\fP.
.TP
.B g, G
The double argument is converted in style f or e.
@ -219,12 +219,12 @@ The int argument is converted to an unsigned char, and the resulting character
is written.
.TP
.B s
The const char * argument is expected to be a pointer to an array of character
type (pointer to a string). Characters from the array are written up to (but
not including) a terminating null byte. If a precision is specified, no more
than the number specified are written. If a precision is given, no null byte
need be present; if the precision is not specified, or is greater than the
size of the array, the array must contain a terminating null byte.
The \fIconst char *\fP argument is expected to be a pointer to an array of
character type (pointer to a string). Characters from the array are written up
to (but not including) a terminating null byte. If a precision is specified,
no more than the number specified are written. If a precision is given, no
null byte need be present; if the precision is not specified, or is greater
than the size of the array, the array must contain a terminating null byte.
.TP
.B p
The \fIvoid *\fP pointer argument is printed in hexadecimal.

View file

@ -77,7 +77,7 @@ first the easy handle and then the multi handle:
curl_multi_add_handle(multi_handle, http_handle2);
.fi
.SH AVAILABILITY
ADded in 7.9.6
Added in 7.9.6
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"

View file

@ -36,23 +36,23 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
.ad
.SH DESCRIPTION
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
libcurl returns its \fIfd_set\fP sets. The application can use these to
select() on, but be sure to \fIFD_ZERO\fP them before calling this function as
\fIcurl_multi_fdset(3)\fP only adds its own descriptors, it does not 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.
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.
object of type \fBfd_set\fP 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.
object of type \fBfd_set\fP 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.
of type \fBfd_set\fP 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 highest descriptor number
@ -67,16 +67,17 @@ conditions to find a suitable value.
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 would think and want.
activity has been seen on the \fBfd_sets\fP after the timeout expires as
otherwise internal retries and timeouts may not work as you would 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...
set in an \fBfd_set\fP, which on POSIX systems means that the file descriptor
is larger than \fBFD_SETSIZE\fP, then libcurl will try to not set it. Setting
a too large file descriptor in an \fBfd_set\fP 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 EXAMPLE
.nf
/* get file descriptors from the transfers */
@ -93,7 +94,7 @@ for...
.SH AVAILABILITY
Added in 7.9.6
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See
\fBCURLMcode\fP type, general libcurl multi interface error code. See
\fIlibcurl-errors(3)\fP
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.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
curl_multi_info_read - read multi stack information
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -31,10 +31,10 @@ curl_multi_info_read - read multi stack informationals
CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue);
.fi
.SH DESCRIPTION
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.
Ask the multi handle if there are any messages from the individual
transfers. Messages may include information 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.
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
@ -50,10 +50,10 @@ is emptied.
calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
\fIcurl_easy_cleanup(3)\fP.
The 'CURLMsg' struct is simple and only contains basic information. 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):
The \fICURLMsg\fP struct is simple and only contains basic information. 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
struct CURLMsg {

View file

@ -31,9 +31,9 @@ curl_multi_init - create a multi handle
CURLM *curl_multi_init();
.fi
.SH DESCRIPTION
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
This function returns a pointer to a \fICURLM\fP 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
\fIcurl_multi_cleanup(3)\fP when the operation is complete.
.SH EXAMPLE
.nf

View file

@ -43,7 +43,8 @@ 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.
similar to \fIpoll(2)\fP's \fIpollfd\fP 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

View file

@ -29,8 +29,8 @@ curl_multi_strerror - return string describing error code
.B #include <curl/curl.h>
.BI "const char *curl_multi_strerror(CURLMcode " errornum ");"
.SH DESCRIPTION
The curl_multi_strerror() function returns a string describing the CURLMcode
error code passed in the argument \fIerrornum\fP.
The curl_multi_strerror() function returns a string describing the
\fICURLMcode\fP error code passed in the argument \fIerrornum\fP.
.SH EXAMPLE
.nf
int still_running;

View file

@ -42,8 +42,9 @@ 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.
The calling application may pass additional \fIcurl_waitfd\fP structures which
are similar to \fIpoll(2)\fP's \fIpollfd\fP 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
@ -66,14 +67,14 @@ struct curl_waitfd {
};
.fi
.IP CURL_WAIT_POLLIN
Bit flag to curl_waitfd.events indicating the socket should poll on read
Bit flag to \fIcurl_waitfd.events\fP 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
Bit flag to \fIcurl_waitfd.events\fP 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.
Bit flag to \fIcurl_waitfd.events\fP indicating the socket should poll on
write events such as the socket being clear to write without blocking.
.SH EXAMPLE
.nf
CURL *easy_handle;

View file

@ -31,10 +31,11 @@ curl_share_init - Create a shared object
CURLSH *curl_share_init();
.fi
.SH DESCRIPTION
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
\fIcurl_share_cleanup\fP when all operations using the share are complete.
This function returns a pointer to a \fICURLSH\fP 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 \fIcurl_share_cleanup(3)\fP when all operations using the share are
complete.
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

View file

@ -29,8 +29,8 @@ curl_share_strerror - return string describing error code
.B #include <curl/curl.h>
.BI "const char *curl_share_strerror(CURLSHcode " errornum ");"
.SH DESCRIPTION
The curl_share_strerror() function returns a string describing the CURLSHcode
error code passed in the argument \fIerrornum\fP.
The \fIcurl_share_strerror(3)\fP function returns a string describing the
\fICURLSHcode\fP error code passed in the argument \fIerrornum\fP.
.SH EXAMPLE
.nf
CURLSHcode sh;

View file

@ -52,9 +52,7 @@ if(curl_strnequal(name, input, 5))
printf("Name and input matches in the 5 first bytes\\n");
.fi
.SH AVAILABILITY
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().
Always
.SH RETURN VALUE
Non-zero if the strings are identical. Zero if they are not.
.SH "SEE ALSO"

View file

@ -38,8 +38,8 @@ 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.
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
input 'url' string to find out the size.
If the 'length' argument is set to 0, \fIcurl_unescape(3)\fP will use strlen()
on the input \fBurl\fP string to find out the size.
You must \fIcurl_free(3)\fP the returned string when you are done with it.
.SH EXAMPLE

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.TH curl_url 3 "6 Aug 2018" "libcurl" "libcurl Manual"
.SH NAME
curl_url - returns a new CURLU handle
curl_url - returns a new URL handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -31,8 +31,8 @@ curl_url - returns a new CURLU handle
CURLU *curl_url();
.fi
.SH DESCRIPTION
This function will allocates and returns a pointer to a fresh CURLU handle, to
be used for further use of the URL API.
This function will allocates and returns a pointer to a fresh \fICURLU\fP
handle, to be used for further use of the URL API.
.SH EXAMPLE
.nf
CURLUcode rc;

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.TH curl_url_cleanup 3 "6 Aug 2018" "libcurl" "libcurl Manual"
.SH NAME
curl_url_cleanup - free a CURLU handle
curl_url_cleanup - free the URL handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -31,7 +31,7 @@ curl_url_cleanup - free a CURLU handle
void curl_url_cleanup(CURLU *handle);
.fi
.SH DESCRIPTION
Frees all the resources associated with the given CURLU handle!
Frees all the resources associated with the given \fICURLU\fP handle!
.SH EXAMPLE
.nf
CURLU *url = curl_url();

View file

@ -23,7 +23,7 @@
.\" **************************************************************************
.TH curl_url_dup 3 "6 Aug 2018" "libcurl" "libcurl Manual"
.SH NAME
curl_url_dup - duplicate a CURLU handle
curl_url_dup - duplicate a URL handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -31,9 +31,9 @@ curl_url_dup - duplicate a CURLU handle
CURLU *curl_url_dup(CURLU *inhandle);
.fi
.SH DESCRIPTION
Duplicates a given CURLU \fIinhandle\fP and all its contents and returns a
pointer to a new CURLU handle. The new handle also needs to be freed with
\fIcurl_url_cleanup(3)\fP.
Duplicates a given \fICURLU\fP \fIinhandle\fP and all its contents and returns
a pointer to a new \fICURLU\fP handle. The new handle also needs to be freed
with \fIcurl_url_cleanup(3)\fP.
.SH EXAMPLE
.nf
CURLUcode rc;

View file

@ -86,7 +86,7 @@ Scheme cannot be URL decoded on get.
.IP CURLUPART_PASSWORD
.IP CURLUPART_OPTIONS
.IP CURLUPART_HOST
The host name. If it is an IPv6 numeric address, the zoneid will not be part
The host name. If it is an IPv6 numeric address, the zone id will not be part
of it but is provided separately in \fICURLUPART_ZONEID\fP. IPv6 numerical
addresses are returned within brackets ([]).
.IP CURLUPART_ZONEID

View file

@ -46,7 +46,7 @@ The application does not have to keep \fIcontent\fP around after a successful
call.
Setting a part to a NULL pointer will effectively remove that part's contents
from the CURLU handle.
from the \fICURLU\fP handle.
By default, this API only accepts URLs using schemes for protocols that are
supported built-in. To make libcurl parse URLs generically even for schemes it
@ -87,7 +87,7 @@ If a path is set in the URL without a leading slash, a slash will be inserted
automatically when this URL is read from the handle.
.IP CURLUPART_QUERY
The query part will also get spaces converted to pluses when asked to URL
encode on set with the CURLU_URLENCODE bit.
encode on set with the \fICURLU_URLENCODE\fP bit.
If used together with the \fICURLU_APPENDQUERY\fP bit, the provided part will
be appended on the end of the existing query - and if the previous part did not
@ -159,8 +159,8 @@ individual parts. (Added in 7.78.0)
.SH AVAILABILITY
Added in 7.62.0. CURLUPART_ZONEID was added in 7.65.0.
.SH RETURN VALUE
Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went
fine. See the \fIlibcurl-errors(3)\fP man page for the full list with
Returns a \fICURLUcode\fP error value, which is CURLUE_OK (0) if everything
went fine. See the \fIlibcurl-errors(3)\fP man page for the full list with
descriptions.
A URL string passed on to \fIcurl_url_set(3)\fP for the \fBCURLUPART_URL\fP

View file

@ -208,8 +208,7 @@ 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_THREADSAFE
libcurl was built with thread-safety support (Atomic or SRWLOCK) to protect
curl initialisation. (Added in 7.84.0)
See \fIlibcurl-thread(3)\fP
curl initialization. (Added in 7.84.0) See \fIlibcurl-thread(3)\fP
.IP CURL_VERSION_TLSAUTH_SRP
libcurl was built with support for TLS-SRP (in one or more of the built-in TLS
backends). (Added in 7.21.4)
@ -219,7 +218,7 @@ libcurl was built with support for Unix domain sockets.
.RE
\fIssl_version\fP is an ASCII string for the TLS library name + version
used. If libcurl has no SSL support, this is NULL. For example "Schannel",
\&"SecureTransport" or "OpenSSL/1.1.0g".
\&"Secure Transport" or "OpenSSL/1.1.0g".
\fIssl_version_num\fP is always 0.

View file

@ -30,24 +30,24 @@ curl_ws_recv - receive WebSocket data
#include <curl/easy.h>
CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
size_t *recv, unsigned int *recvflags);
size_t *recv, unsigned int *flags);
.fi
.SH DESCRIPTION
This function call is EXPERIMENTAL.
Retrives as much as possible of a received WebSocket data fragment into the
Retrieves as much as possible of a received WebSocket data fragment into the
\fBbuffer\fP, but not more than \fBbuflen\fP bytes. The provide
\fIrecvflags\fP argument gets bits set to help characterize the fragment.
.SH RECVFLAGS
\fIflags\fP argument gets bits set to help characterize the fragment.
.SH FLAGS
.IP CURLWS_TEXT
The buffer contains text data. Note that this makes a difference to WebSocket
but libcurl itself will not make any verification of the content or
precautions that you actually receive valid UTF-8 content.
.IP CURLWS_BINARY
This is binary data.
.IP CURLWS_FINAL
This is the final fragment of the message, if this is not set, it implies that
there will be another fragment coming as part of the same message.
.IP CURLWS_CONT
This is not the final fragment of the message, it implies that there will be
another fragment coming as part of the same message.
.IP CURLWS_CLOSE
This transfer is now closed.
.IP CURLWS_PING

View file

@ -24,13 +24,13 @@
.\"
.TH curl_ws_send 3 "12 Jun 2022" "libcurl 7.85.0" "libcurl Manual"
.SH NAME
curl_ws_send - receive websocket data
curl_ws_send - receive WebSocket data
.SH SYNOPSIS
.nf
#include <curl/easy.h>
CURLcode curl_ws_send(CURL *curl, const void *buffer, size_t buflen,
size_t *sent, unsigned int sendflags);
size_t *sent, unsigned int flags);
.fi
.SH DESCRIPTION
This function call is EXPERIMENTAL.
@ -38,9 +38,9 @@ This function call is EXPERIMENTAL.
Send the specific message fragment over the established WebSocket connection.
If \fBCURLWS_RAW_MODE\fP is enabled in \fICURLOPT_WS_OPTIONS(3)\fP, the
\fBsendflags\fP argument should be set to 0.
\fBflags\fP argument should be set to 0.
.SH SENDFLAGS
.SH FLAGS
.IP CURLWS_TEXT
The buffer contains text data. Note that this makes a difference to WebSocket
but libcurl itself will not make any verification of the content or

View file

@ -50,8 +50,8 @@ specific backend at first use. If no selection is done by the program using
libcurl, this variable's selection will be used. Setting a name that is not a
built-in alternative will make libcurl stay with the default.
SSL backend names (case-insensitive): bearssl, gnutls, gskit, mbedtls,
nss, openssl, rustls, schannel, secure-transport, wolfssl
SSL backend names (case-insensitive): BearSSL, GnuTLS, gskit, mbedTLS,
nss, OpenSSL, rustls, Schannel, Secure-Transport, wolfSSL
.IP HOME
When the netrc feature is used (\fICURLOPT_NETRC(3)\fP), this variable is
checked as the primary way to find the "current" home directory in which
@ -61,13 +61,14 @@ When the netrc feature is used (\fICURLOPT_NETRC(3)\fP), this variable is
checked as the secondary way to find the "current" home directory (on Windows
only) in which the .netrc file is likely to exist.
.IP LOGNAME
User name to use when invoking the ntlm-wb tool, if NTLMUSER was not set.
User name to use when invoking the \fIntlm-wb\fP tool, if \fINTLMUSER\fP was
not set.
.IP NO_PROXY
This has the same functionality as the \fICURLOPT_NOPROXY(3)\fP option: it
gives libcurl a comma-separated list of host name patterns for which libcurl
should not use a proxy.
.IP NTLMUSER
User name to use when invoking the ntlm-wb tool.
User name to use when invoking the \fIntlm-wb\fP tool.
.IP SSLKEYLOGFILE
When set and libcurl runs with a SSL backend that supports this feature,
libcurl will save SSL secrets into the given file name. Using those SSL
@ -77,8 +78,8 @@ analyze/view the traffic.
When libcurl runs with the NSS backends for TLS features, this variable is
used to find the directory for NSS PKI database instead of the built-in.
.IP USER
User name to use when invoking the ntlm-wb tool, if NTLMUSER and LOGNAME
were not set.
User name to use when invoking the \fIntlm-wb\fP tool, if \fINTLMUSER\fP and
\fILOGNAME\fP were not set.
.SH "Debug Variables"
There's a set of variables only recognized and used if libcurl was built
"debug enabled", which should never be true for a library used in production.
@ -93,6 +94,7 @@ random outputs can be tested for what they generate.
.IP "CURL_TRACE"
Debug-only variable. Used for debugging the lib/ldap implementation.
.IP "CURL_NTLM_WB_FILE"
Debug-only variable. Used to set to a debug-version of the ntlm-wb executable.
Debug-only variable. Used to set to a debug-version of the \fIntlm-wb\fP
executable.
.IP "CURL_OPENLDAP_TRACE"
Debug-only variable. Used for debugging the lib/openldap.c implementation.
Debug-only variable. Used for debugging the OpenLDAP implementation.

View file

@ -56,9 +56,9 @@ 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.
Could not resolve proxy. The given proxy host could not be resolved.
.IP "CURLE_COULDNT_RESOLVE_HOST (6)"
Couldn't resolve host. The given remote host was not resolved.
Could not resolve host. The given remote host was not resolved.
.IP "CURLE_COULDNT_CONNECT (7)"
Failed to connect() to host or proxy.
.IP "CURLE_WEIRD_SERVER_REPLY (8)"
@ -197,9 +197,9 @@ Not used in modern versions.
.IP "CURLE_SSL_CERTPROBLEM (58)"
problem with the local client certificate.
.IP "CURLE_SSL_CIPHER (59)"
Couldn't use specified cipher.
Could not use specified cipher.
.IP "CURLE_PEER_FAILED_VERIFICATION (60)"
The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.
The remote server's SSL certificate or SSH fingerprint was deemed not OK.
This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its
previous value was 51.
.IP "CURLE_BAD_CONTENT_ENCODING (61)"
@ -252,8 +252,8 @@ Issuer check failed (Added in 7.19.0)
.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(3)\fP, a
custom LIST command will be sent with PRET CMD before PASV as well. (Added in
7.20.0)
custom LIST command will be sent with the PRET command 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)"
@ -301,12 +301,12 @@ between. Before version 7.20.0 (released on February 9 2010) this could be retur
\fIcurl_multi_perform(3)\fP, but in later versions this return code is never
used.
.IP "CURLM_CALL_MULTI_SOCKET (-1)"
An alias for CURLM_CALL_MULTI_PERFORM. Never returned by modern libcurl
An alias for \fICURLM_CALL_MULTI_PERFORM\fP. Never returned by modern libcurl
versions.
.IP "CURLM_OK (0)"
Things are fine.
.IP "CURLM_BAD_HANDLE (1)"
The passed-in handle is not a valid CURLM handle.
The passed-in handle is not a valid \fICURLM\fP handle.
.IP "CURLM_BAD_EASY_HANDLE (2)"
An easy handle was not good/valid. It could mean that it is not an easy handle
at all, or possibly that the handle already is in use by this or another multi
@ -327,7 +327,7 @@ second time. (Added in 7.32.1)
.IP "CURLM_RECURSIVE_API_CALL (8)"
An API function was called from inside a callback.
.IP "CURLM_WAKEUP_FAILURE (9)"
Wakeup is unavailable or failed.
Wake up is unavailable or failed.
.IP "CURLM_BAD_FUNCTION_ARGUMENT (10)"
A function was called with a bad parameter.
.IP "CURLM_ABORTED_BY_CALLBACK (11)"
@ -335,8 +335,8 @@ A multi handle callback returned error.
.IP "CURLM_UNRECOVERABLE_POLL (12)"
An internal call to poll() or select() returned error that is not recoverable.
.SH "CURLSHcode"
The "share" interface will return a CURLSHcode to indicate when an error has
occurred. Also consider \fIcurl_share_strerror(3)\fP.
The "share" interface will return a \fBCURLSHcode\fP to indicate when an error
has occurred. Also consider \fIcurl_share_strerror(3)\fP.
.IP "CURLSHE_OK (0)"
All fine. Proceed as usual.
.IP "CURLSHE_BAD_OPTION (1)"
@ -352,10 +352,10 @@ Not enough memory was available.
The requested sharing could not be done because the library you use do not have
that particular feature enabled. (Added in 7.23.0)
.SH "CURLUcode"
The URL interface will return a CURLUcode to indicate when an error has
The URL interface will return a \fICURLUcode\fP to indicate when an error has
occurred. Also consider \fIcurl_url_strerror(3)\fP.
.IP "CURLUE_BAD_HANDLE (1)"
An invalid CURLU pointer was passed as argument.
An invalid URL handle was passed as argument.
.IP "CURLUE_BAD_PARTPOINTER (2)"
An invalid 'part' argument was passed as argument.
.IP "CURLUE_MALFORMED_INPUT (3)"
@ -389,7 +389,7 @@ There is no query part in the URL.
.IP "CURLUE_NO_FRAGMENT (17)"
There is no fragment part in the URL.
.IP "CURLUE_NO_ZONEID (18)"
There is no zoneid set in the URL.
There is no zone id set in the URL.
.IP "CURLUE_BAD_FILE_URL (19)"
The file:// URL is invalid.
.IP "CURLUE_BAD_FRAGMENT (20)"

View file

@ -58,7 +58,7 @@ transfers in parallel. Each single transfer is built up around an easy
handle. You create all the easy handles you need, and setup the appropriate
options for each easy handle using \fIcurl_easy_setopt(3)\fP.
There are two flavours of the multi interface, the select() oriented one and
There are two flavors of the multi interface, the select() oriented one and
the event based one we call multi_socket. You will benefit from reading
through the description of both versions to fully understand how they work and
differentiate. We start out with the select() oriented version.
@ -89,7 +89,7 @@ Your application extracts info from libcurl about when it would like to get
invoked to transfer data or do other work. The most convenient way is to use
\fIcurl_multi_poll(3)\fP that will help you wait until the application should
call libcurl again. The older API to accomplish the same thing is
\fIcurl_multi_fdset(3)\fP that extracts fd_sets from libcurl to use in
\fIcurl_multi_fdset(3)\fP that extracts \fIfd_sets\fP 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. Both these APIs allow for your program to
wait for input on your own private file descriptors at the same time.
@ -160,10 +160,11 @@ better scale upward and beyond thousands of simultaneous transfers without
losing performance.
When you have 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 will 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 have been asked to wait on, or if the timeout timer expires.
\fIcurl_multi_socket_action(3)\fP with CURL_SOCKET_TIMEOUT set in the
\fIsockfd\fP argument, and you will 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 have 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.

View file

@ -45,7 +45,7 @@ should be aware.
.SH "Command Lines"
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 get read by other
users of your system when they use 'ps' or other tools to list currently
users of your system when they use \fIps\fP or other tools to list currently
running processes.
To avoid these problems, never feed sensitive things to programs using command
@ -76,23 +76,22 @@ To avoid this problem, use an authentication mechanism or other protocol that
does not let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
NTLM authentication. Or even better: use authenticated protocols that protect
the entire connection and everything sent over it.
.SH "Un-authenticated Connections"
.SH "Unauthenticated Connections"
Protocols that do not have any form of cryptographic authentication cannot
with any certainty know that they communicate with the right remote server.
If your application is using a fixed scheme or fixed host name, it is not safe
as long as the connection is un-authenticated. There can be a
man-in-the-middle or in fact the whole server might have been replaced by an
evil actor.
as long as the connection is unauthenticated. There can be a man-in-the-middle
or in fact the whole server might have been replaced by an evil actor.
Un-authenticated protocols are unsafe. The data that comes back to curl may
Unauthenticated protocols are unsafe. The data that comes back to curl may
have been injected by an attacker. The data that curl sends might be modified
before it reaches the intended server. If it even reaches the intended server
at all.
Remedies:
.IP "Restrict operations to authenticated transfers"
Ie use authenticated protocols protected with HTTPS or SSH.
Use authenticated protocols protected with HTTPS or SSH.
.IP "Make sure the server's certificate etc is verified"
Never ever switch off certificate verification.
.SH "Redirects"
@ -106,7 +105,7 @@ 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).
\fBfile://localhost/etc/passwd\fP).
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
@ -116,7 +115,7 @@ then return data even when the server is password protected.
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. sftp://user@some-internal-server/etc/passwd
e.g. \fBsftp://user@some-internal-server/etc/passwd\fP
The \fICURLOPT_REDIR_PROTOCOLS(3)\fP and \fICURLOPT_NETRC(3)\fP options can be
used to mitigate against this kind of attack.
@ -137,26 +136,26 @@ For all options in libcurl which specify headers, including but not limited to
\fICURLOPT_HTTPHEADER(3)\fP, \fICURLOPT_PROXYHEADER(3)\fP,
\fICURLOPT_COOKIE(3)\fP, \fICURLOPT_USERAGENT(3)\fP, \fICURLOPT_REFERER(3)\fP
and \fICURLOPT_RANGE(3)\fP, libcurl will send the headers as-is and will not
apply any special sanitization or normalization to them.
apply any special sanitation or normalization to them.
If you allow untrusted user input into these options without sanitizing CRLF
sequences in them, someone malicious may be able to modify the request in a way
you didn't intend such as injecting new headers.
sequences in them, someone malicious may be able to modify the request in a
way you did not intend such as injecting new headers.
.SH "Local 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 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. Applications can
mitigate against this by setting a \fICURLOPT_OPENSOCKETFUNCTION(3)\fP
or \fICURLOPT_PREREQFUNCTION(3)\fP and checking the address before a
connection.
\fBhttp://fuzzybunnies.example.com/\fP could actually resolve to the IP
address of a server behind a firewall, such as 127.0.0.1 or
10.1.2.3. Applications can mitigate against this by setting a
\fICURLOPT_OPENSOCKETFUNCTION(3)\fP or \fICURLOPT_PREREQFUNCTION(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. Applications can mitigate against this with the
translation service might happily translate \fBfile://localhost/etc/passwd\fP
and display the result. Applications can mitigate against this with the
\fICURLOPT_PROTOCOLS(3)\fP option as well as by similar mitigation techniques
for redirections.
@ -183,16 +182,16 @@ or a mix of decimal, octal or hexadecimal encoding.
.SH "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
addresses like 127.0.0.1 is not 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 should not 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, setting
\fICURLOPT_IPRESOLVE(3)\fP to CURL_IPRESOLVE_V4 can be used to limit resolved
addresses to IPv4 only and bypass these issues.
addresses like 127.0.0.1 is not sufficient--the equivalent IPv6 addresses
\fB::1\fP, \fB::\fP, \fB0:00::0:1\fP, \fB::127.0.0.1\fP and
\fB::ffff:7f00:1\fP 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 should
not 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, setting \fICURLOPT_IPRESOLVE(3)\fP to CURL_IPRESOLVE_V4
can be used to limit resolved addresses to IPv4 only and bypass these issues.
.SH Uploads
When uploading, a redirect can cause a local (or remote) file to be
overwritten. Applications must not allow any unsanitized URL to be passed in
@ -223,9 +222,9 @@ between requests.
.SH "Dangerous SCP URLs"
SCP URLs can contain raw commands within the scp: URL, which is a side effect
of how the SCP protocol is designed. e.g.
.nf
scp://user:pass@host/a;date >/tmp/test;
.fi
Applications must not allow unsanitized SCP: URLs to be passed in for
downloads.
.SH "file://"
@ -305,13 +304,13 @@ as within libcurl itself.
When performing an FTP transfer, two TCP connections are used: one for setting
up the transfer and one for the actual data.
FTP is not only un-authenticated, but the setting up of the second transfer is
FTP is not only unauthenticated, but the setting up of the second transfer is
also a weak spot. The second connection to use for data, is either setup with
the PORT/EPRT command that makes the server connect back to the client on the
given IP+PORT, or with PASV/EPSV that makes the server setup a port to listen
to and tells the client to connect to a given IP+PORT.
Again, un-authenticated means that the connection might be meddled with by a
Again, unauthenticated means that the connection might be meddled with by a
man-in-the-middle or that there's a malicious server pretending to be the
right one.
@ -360,7 +359,8 @@ file name. The curl command-line tool does this with
a file name. An application could also use \fICURLINFO_EFFECTIVE_URL(3)\fP 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", "prn:" or even ".bashrc".
supplying one like \fB"/etc/passwd"\fP, \fB"\\autoexec.bat"\fP, \fB"prn:"\fP
or even \fB".bashrc"\fP.
.SH "Server Certificates"
A secure application should never use the \fICURLOPT_SSL_VERIFYPEER(3)\fP
option to disable certificate validation. There are numerous attacks that are
@ -384,7 +384,7 @@ 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 "Setuid applications using libcurl"
.SH "setuid applications using libcurl"
libcurl-using applications that set the 'setuid' bit to run with elevated or
modified rights also implicitly give that extra power to libcurl and this
should only be done after careful considerations.
@ -396,13 +396,13 @@ that the user is otherwise not able to view (like credentials for a login
etc), it should be noted that libcurl still might understand proxy environment
variables that allow the user to redirect libcurl operations to use a proxy
controlled by the user.
.SH "File descriptors, fork and ntlm_wb"
An application that uses libcurl and invokes `fork()` will get all file
.SH "File descriptors, fork and NTLM"
An application that uses libcurl and invokes \fIfork()\fP will get all file
descriptors duplicated in the child process, including the ones libcurl
created.
libcurl itself uses `fork()` and `execl()` if told to use the
`CURLAUTH_NTLM_WB` authentication method which then will invoke the helper
libcurl itself uses \fIfork()\fP and \fIexecl()\fP if told to use the
\fBCURLAUTH_NTLM_WB\fP authentication method which then will invoke the helper
command in a child process with file descriptors duplicated. Make sure that
only the trusted and reliable helper program is invoked!
.SH "Secrets in memory"
@ -416,7 +416,7 @@ core dump file, such data might be accessible.
Further, when eventually closing a handle and the secrets are no longer
needed, libcurl does not explicitly clear memory before freeing it, so
crendentials may be left in freed data.
credentials may be left in freed data.
.SH "Report Security Problems"
Should you detect or just suspect a security problem in libcurl or curl,
contact the project curl security team immediately. See

View file

@ -95,8 +95,8 @@ days). Some operating systems that are known to have solid and working thread
support are Linux, Solaris and Windows.
.IP "curl_global_* functions"
These functions are thread-safe since libcurl 7.84.0 if
\fIcurl_version_info(3)\fP has the CURL_VERSION_THREADSAFE feature bit set
(most platforms).
\fIcurl_version_info(3)\fP has the \fBCURL_VERSION_THREADSAFE\fP feature bit
set (most platforms).
If these functions are not thread-safe and you are using libcurl with multiple
threads it is especially important that before use you call

View file

@ -49,9 +49,9 @@ well.
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:
$ curl-config --cflags
.nf
$ curl-config --cflags
.fi
.IP "Linking the Program with libcurl"
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
@ -59,9 +59,9 @@ 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:
$ curl-config --libs
.nf
$ curl-config --libs
.fi
.IP "SSL or Not"
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
@ -69,10 +69,10 @@ 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:
$ curl-config --feature
And if SSL is supported, the keyword 'SSL' will be written to stdout,
.nf
$ curl-config --feature
.fi
And if SSL is supported, the keyword \fISSL\fP will be written to stdout,
possibly together with a few other features that could be either on or off on
for different libcurls.
@ -95,9 +95,9 @@ stop you from that.
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
.nf
curl_global_init()
.fi
and it takes one parameter which is a bit pattern that tells libcurl what to
initialize. Using \fICURL_GLOBAL_ALL\fP will make it initialize all known
internal sub modules, and might be a good default option. The current two bits
@ -155,9 +155,9 @@ should use one handle for every thread you plan to use for transferring. You
must never share the same handle in multiple threads.
Get an easy handle with
easyhandle = curl_easy_init();
.nf
handle = curl_easy_init();
.fi
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.
@ -190,19 +190,19 @@ 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:
.nf
size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
.fi
You tell libcurl to pass all data to this function by issuing a function
similar to this:
curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, write_data);
.nf
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_data);
.fi
You can control what data your callback function gets in the fourth argument
by setting another property:
curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, &internal_struct);
.nf
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &internal_struct);
.fi
Using that property, you can easily pass local data between your application
and the function that gets invoked by libcurl. libcurl itself will not touch the
data you pass with \fICURLOPT_WRITEDATA(3)\fP.
@ -229,9 +229,9 @@ will experience crashes.
There are of course many more options you can set, and we will get back to a few
of them later. Let's instead continue to the actual transfer:
success = curl_easy_perform(easyhandle);
.nf
success = curl_easy_perform(handle);
.fi
\fIcurl_easy_perform(3)\fP 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,
@ -301,30 +301,30 @@ 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:
.nf
size_t function(char *bufptr, size_t size, size_t nitems, void *userp);
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
.fi
Where \fIbufptr\fP is the pointer to a buffer we fill in with data to upload
and \fIsize*nitems\fP is the size of the buffer and therefore also the maximum
amount of data we can return to libcurl in this call. The \fIuserp\fP pointer
is the custom pointer we set to point to a struct of ours to pass private data
between the application and the callback.
.nf
curl_easy_setopt(handle, CURLOPT_READFUNCTION, read_function);
curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, read_function);
curl_easy_setopt(easyhandle, CURLOPT_READDATA, &filedata);
curl_easy_setopt(handle, CURLOPT_READDATA, &filedata);
.fi
Tell libcurl that we want to upload:
curl_easy_setopt(easyhandle, CURLOPT_UPLOAD, 1L);
.nf
curl_easy_setopt(handle, CURLOPT_UPLOAD, 1L);
.fi
A few protocols will not behave properly when uploads are done without any prior
knowledge of the expected file size. So, set the upload file size using the
\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 */
curl_easy_setopt(easyhandle, CURLOPT_INFILESIZE_LARGE, file_size);
curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, file_size);
.fi
When you call \fIcurl_easy_perform(3)\fP this time, it will perform all the
@ -342,9 +342,9 @@ several ways to specify them.
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:
.nf
protocol://user:password@example.com/path/
.fi
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.
@ -352,29 +352,29 @@ 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
\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");
.nf
curl_easy_setopt(handle, CURLOPT_USERPWD, "myname:thesecret");
.fi
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 \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");
.nf
curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, "myname:thesecret");
.fi
There's a long time Unix "standard" way of storing FTP user names and
passwords, namely in the $HOME/.netrc file (on Windows, libcurl also checks
the %USERPROFILE% environment variable if %HOME% is unset, and tries
_netrc as name). 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 \fICURLOPT_NETRC(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_NETRC, 1L);
the \fI%USERPROFILE% environment\fP variable if \fI%HOME%\fP is unset, and
tries "_netrc" as name). 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
\fICURLOPT_NETRC(3)\fP option:
.nf
curl_easy_setopt(handle, CURLOPT_NETRC, 1L);
.fi
And a basic example of how such a .netrc file may look like:
.nf
@ -389,9 +389,9 @@ without it. There are times when the password is not optional, like when
you are using an SSL private key for secure transfers.
To pass the known private key password to libcurl:
curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
.nf
curl_easy_setopt(handle, CURLOPT_KEYPASSWD, "keypassword");
.fi
.SH "HTTP Authentication"
The previous chapter showed how to set user name and password for getting
URLs that require authentication. When using the HTTP protocol, there are
@ -403,23 +403,22 @@ 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 (SPNEGO). You can tell libcurl which one to use
with \fICURLOPT_HTTPAUTH(3)\fP as in:
curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
.nf
curl_easy_setopt(handle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
.fi
And when you send authentication to a proxy, you can also set authentication
type the same way but instead with \fICURLOPT_PROXYAUTH(3)\fP:
curl_easy_setopt(easyhandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
.nf
curl_easy_setopt(handle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
.fi
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:
curl_easy_setopt(easyhandle, CURLOPT_HTTPAUTH,
CURLAUTH_DIGEST|CURLAUTH_BASIC);
For convenience, you can use the 'CURLAUTH_ANY' define (instead of a list
.nf
curl_easy_setopt(handle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST|CURLAUTH_BASIC);
.fi
For convenience, you can use the \fICURLAUTH_ANY\fP define (instead of a list
with specific types) which allows libcurl to use whatever method it wants.
When asking for multiple types, libcurl will pick the available one it
@ -436,10 +435,10 @@ libcurl to post it all to the remote site:
.nf
char *data="name=daniel&project=curl";
curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, data);
curl_easy_setopt(easyhandle, CURLOPT_URL, "http://posthere.com/");
curl_easy_setopt(handle, CURLOPT_POSTFIELDS, data);
curl_easy_setopt(handle, CURLOPT_URL, "http://posthere.com/");
curl_easy_perform(easyhandle); /* post away! */
curl_easy_perform(handle); /* post away! */
.fi
Simple enough, huh? Since you set the POST options with the
@ -458,15 +457,15 @@ that list to libcurl.
headers = curl_slist_append(headers, "Content-Type: text/xml");
/* post binary data */
curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, binaryptr);
curl_easy_setopt(handle, CURLOPT_POSTFIELDS, binaryptr);
/* set the size of the postfields data */
curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDSIZE, 23L);
curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE, 23L);
/* pass our list of custom made headers */
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
curl_easy_perform(easyhandle); /* post away! */
curl_easy_perform(handle); /* post away! */
curl_slist_free_all(headers); /* free the header list */
.fi
@ -497,7 +496,7 @@ The following example sets two simple text parts with plain textual contents,
and then a file with binary contents and uploads the whole thing.
.nf
curl_mime *multipart = curl_mime_init(easyhandle);
curl_mime *multipart = curl_mime_init(handle);
curl_mimepart *part = curl_mime_addpart(multipart);
curl_mime_name(part, "name");
curl_mime_data(part, "daniel", CURL_ZERO_TERMINATED);
@ -509,9 +508,9 @@ and then a file with binary contents and uploads the whole thing.
curl_mime_filedata(part, "curl.png");
/* Set the form info */
curl_easy_setopt(easyhandle, CURLOPT_MIMEPOST, multipart);
curl_easy_setopt(handle, CURLOPT_MIMEPOST, multipart);
curl_easy_perform(easyhandle); /* post away! */
curl_easy_perform(handle); /* post away! */
/* free the post data again */
curl_mime_free(multipart);
@ -553,9 +552,9 @@ The MIME API example above is expressed as follows using this function:
CURLFORM_FILECONTENT, "curl.png", CURLFORM_END);
/* Set the form info */
curl_easy_setopt(easyhandle, CURLOPT_HTTPPOST, post);
curl_easy_setopt(handle, CURLOPT_HTTPPOST, post);
curl_easy_perform(easyhandle); /* post away! */
curl_easy_perform(handle); /* post away! */
/* free the post data again */
curl_formfree(post);
@ -580,20 +579,20 @@ post handle:
CURLFORM_CONTENTHEADER, headers,
CURLFORM_END);
curl_easy_perform(easyhandle); /* post away! */
curl_easy_perform(handle); /* post away! */
curl_formfree(post); /* free post */
curl_slist_free_all(headers); /* free custom header list */
.fi
Since all options on an easyhandle are "sticky", they remain the same until
Since all options on an easy handle 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
request. You force an easy handle to go back to GET by using the
\fICURLOPT_HTTPGET(3)\fP option:
curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
.nf
curl_easy_setopt(handle, CURLOPT_HTTPGET, 1L);
.fi
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!
@ -602,7 +601,7 @@ Four rules have to be respected in building the multi-part:
.br
- The easy handle must be created before building the multi-part.
.br
- The multi-part is always created by a call to curl_mime_init(easyhandle).
- The multi-part is always created by a call to curl_mime_init(handle).
.br
- Each part is created by a call to curl_mime_addpart(multipart).
.br
@ -669,7 +668,7 @@ The deprecated multipart/mixed implementation of multiple files field is
translated to two distinct parts with the same name.
.nf
curl_easy_setopt(easyhandle, CURLOPT_READFUNCTION, myreadfunc);
curl_easy_setopt(handle, CURLOPT_READFUNCTION, myreadfunc);
curl_formadd(&post, &last,
CURLFORM_COPYNAME, "stream",
CURLFORM_STREAM, arg,
@ -804,40 +803,40 @@ invoke your own custom FTP commands or even proper FTP directory listings.
.IP "Proxy Options"
To tell libcurl to use a proxy at a given port number:
curl_easy_setopt(easyhandle, CURLOPT_PROXY, "proxy-host.com:8080");
.nf
curl_easy_setopt(handle, CURLOPT_PROXY, "proxy-host.com:8080");
.fi
Some proxies require user authentication before allowing a request, and you
pass that information similar to this:
curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");
.nf
curl_easy_setopt(handle, CURLOPT_PROXYUSERPWD, "user:password");
.fi
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 \fICURLOPT_PROXYTYPE(3)\fP (if not,
it will default to assume an HTTP proxy):
curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
.nf
curl_easy_setopt(handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
.fi
.IP "Environment Variables"
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.
following an old tradition 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.
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 http://proxy 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.
\&"[protocol://][user:password@]machine[:port]". Where the protocol:// part
specifies which type of proxy it is, and the optional port number specifies on
which port the proxy operates. 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.
There are two special environment variables. 'all_proxy' is what sets proxy
for any URL in case the protocol specific variable was not set, and
@ -859,7 +858,7 @@ with the traffic.
Opening an SSL connection over an HTTP proxy is therefore 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
is made with the HTTP request CONNECT. ("please dear proxy, connect me to that
remote host").
Because of the nature of this operation, where the proxy has no idea what kind
@ -884,9 +883,9 @@ Again, this is often prevented by the administrators of proxies and is
rarely allowed.
Tell libcurl to use proxy tunneling like this:
curl_easy_setopt(easyhandle, CURLOPT_HTTPPROXYTUNNEL, 1L);
.nf
curl_easy_setopt(handle, CURLOPT_HTTPPROXYTUNNEL, 1L);
.fi
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
@ -970,7 +969,7 @@ anything but default.
.IP "Expect"
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
of the post. If the posted data amount is deemed "small", libcurl will not use
this header.
.SH "Customizing Operations"
@ -988,9 +987,9 @@ libcurl is your friend here too.
If just changing the actual HTTP request keyword is what you want, like when
GET, HEAD or POST is not good enough for you, \fICURLOPT_CUSTOMREQUEST(3)\fP
is there for you. It is simple to use:
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
.nf
curl_easy_setopt(handle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
.fi
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
@ -1008,9 +1007,9 @@ think fit. Adding headers is this easy:
headers = curl_slist_append(headers, "X-silly-content: yes");
/* pass our list of custom made headers */
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
curl_easy_perform(easyhandle); /* transfer http */
curl_easy_perform(handle); /* transfer http */
curl_slist_free_all(headers); /* free the header list */
.fi
@ -1050,7 +1049,7 @@ we support. libcurl speaks HTTP 1.1 by default. Some old servers do not 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:
curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_easy_setopt(handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
.IP "FTP Custom Commands"
@ -1061,7 +1060,7 @@ Sending custom commands to an 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
data-connection must be left to libcurl's own judgment. Also be aware that
libcurl will do its 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
@ -1073,9 +1072,9 @@ A little example that deletes a given file before an operation:
headers = curl_slist_append(headers, "DELE file-to-remove");
/* pass the list of custom commands to the handle */
curl_easy_setopt(easyhandle, CURLOPT_QUOTE, headers);
curl_easy_setopt(handle, CURLOPT_QUOTE, headers);
curl_easy_perform(easyhandle); /* transfer ftp data! */
curl_easy_perform(handle); /* transfer ftp data! */
curl_slist_free_all(headers); /* free the header list */
.fi
@ -1121,9 +1120,9 @@ they are sent from clients to servers with the Cookie: header.
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;");
.nf
curl_easy_setopt(handle, CURLOPT_COOKIE, "name1=var1; name2=var2;");
.fi
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.
@ -1215,17 +1214,17 @@ use this function (this would over-encode it), but explicitly set the
corresponding part header.
Upon sending such a message, libcurl prepends it with the header list
set with \fICURLOPT_HTTPHEADER(3)\fP, as 0th-level mime part headers.
set with \fICURLOPT_HTTPHEADER(3)\fP, as zero level mime part headers.
Here is an example building an email message with an inline plain/html text
alternative and a file attachment encoded in base64:
.nf
curl_mime *message = curl_mime_init(easyhandle);
curl_mime *message = curl_mime_init(handle);
/* The inline part is an alternative proposing the html and the text
versions of the email. */
curl_mime *alt = curl_mime_init(easyhandle);
curl_mime *alt = curl_mime_init(handle);
/* HTML message. */
curl_mimepart *part = curl_mime_addpart(alt);
@ -1256,8 +1255,8 @@ alternative and a file attachment encoded in base64:
headers = curl_slist_append(headers, "To: you@example.com");
/* Set these into the easy handle. */
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(easyhandle, CURLOPT_MIMEPOST, mime);
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(handle, CURLOPT_MIMEPOST, mime);
.fi
It should be noted that appending a message to an IMAP directory requires
@ -1331,8 +1330,8 @@ 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
\fIcurl_multi_fdset(3)\fP, that fills in a set of fd_set variables for you
with the particular file descriptors libcurl uses for the moment.
\fIcurl_multi_fdset(3)\fP, that fills in a set of \fIfd_set\fP variables for
you with the particular file descriptors libcurl uses for the moment.
When you then call select(), it will return when one of the file handles signal
action and you then call \fIcurl_multi_perform(3)\fP to allow libcurl to do

View file

@ -30,21 +30,23 @@ The URL interface provides functions for parsing and generating URLs.
You still only include <curl/curl.h> in your code.
.SH CREATE
Create a handle that holds URL info and resources with \fIcurl_url(3)\fP:
.nf
CURLU *h = curl_url();
.fi
.SH CLEANUP
When done with it, clean it up with \fIcurl_url_cleanup(3)\fP:
When done with it, clean it up with \fIcurl_url_cleanup(3)\fP
.nf
curl_url_cleanup(h);
.fi
.SH DUPLICATE
When you need a copy of a handle, just duplicate it with \fIcurl_url_dup(3)\fP:
.nf
CURLU *nh = curl_url_dup(h);
.fi
.SH PARSING
By "setting" a URL to the handle with \fIcurl_url_set(3)\fP, the URL is parsed
By setting a URL to the handle with \fIcurl_url_set(3)\fP, the URL is parsed
and stored in the handle. If the URL is not syntactically correct it will
return an error instead.
.nf
rc = curl_url_set(h, CURLUPART_URL,
"https://example.com:449/foo/bar?name=moo", 0);
@ -56,16 +58,17 @@ If successful, this stores the URL in its individual parts within the handle.
.SH REDIRECT
When a handle already contains info about a URL, setting a relative URL will
make it "redirect" to adapt to it.
.nf
rc = curl_url_set(h, CURLUPART_URL, "../test?another", 0);
.fi
.SH "GET URL"
The `CURLU` handle represents a URL and you can easily extract that with
The \fBCURLU\fP handle represents a URL and you can easily extract that with
\fIcurl_url_get(3)\fP:
.nf
char *url;
rc = curl_url_get(h, CURLUPART_URL, &url, 0);
curl_free(url);
.fi
The zero in the fourth argument is a bitmask for changing specific features.
.SH "GET PARTS"
When a URL has been parsed or parts have been set, you can extract those
@ -83,7 +86,7 @@ pieces from the handle at any time.
.fi
Extracted parts are not URL decoded unless the user also asks for it with the
CURLU_URLDECODE flag set in the fourth bitmask argument.
\fICURLU_URLDECODE\fP flag set in the fourth bitmask argument.
Remember to free the returned string with \fIcurl_free(3)\fP when you are done
with it!
@ -103,27 +106,26 @@ instead of parsing such.
.fi
Set parts are not URL encoded unless the user asks for it with the
`CURLU_URLENCODE` flag.
.SH "APPENDQUERY"
\fICURLU_URLENCODE\fP flag.
.SH "CURLU_APPENDQUERY"
An application can append a string to the right end of the query part with the
`CURLU_APPENDQUERY` flag to \fIcurl_url_set(3)\fP.
\fICURLU_APPENDQUERY\fP flag to \fIcurl_url_set(3)\fP.
Imagine a handle that holds the URL `https://example.com/?shoes=2`. An
application can then add the string `hat=1` to the query part like this:
Imagine a handle that holds the URL "https://example.com/?shoes=2". An
application can then add the string "hat=1" to the query part like this:
.nf
rc = curl_url_set(urlp, CURLUPART_QUERY, "hat=1", CURLU_APPENDQUERY);
.fi
It will even notice the lack of an ampersand (`&`) separator so it will inject
It will even notice the lack of an ampersand (&) separator so it will inject
one too, and the handle's full URL will then equal
`https://example.com/?shoes=2&hat=1`.
"https://example.com/?shoes=2&hat=1".
The appended string can of course also get URL encoded on add, and if asked to
URL encode, the encoding process will skip the '=' character. For example,
append `candy=N&N` to what we already have, and URL encode it to deal with the
append "candy=N&N" to what we already have, and URL encode it to deal with the
ampersand in the data:
.nf
rc = curl_url_set(urlp, CURLUPART_QUERY, "candy=N&N",
CURLU_APPENDQUERY | CURLU_URLENCODE);
@ -131,9 +133,9 @@ ampersand in the data:
Now the URL looks like
.nf
https://example.com/?shoes=2&hat=1&candy=N%26N`
https://example.com/?shoes=2&hat=1&candy=N%26N
.fi
.SH AVALABILITY
.SH AVAILABILITY
The URL API was introduced in libcurl 7.62.0.
.SH "SEE ALSO"
.BR curl_url "(3), " curl_url_cleanup "(3), " curl_url_get "(3), "

View file

@ -31,7 +31,7 @@ specific man pages for each function mentioned in here. See
\fIlibcurl-url(3)\fP and \fIlibcurl-tutorial(3)\fP for in-depth understanding
on how to program with libcurl.
There are many bindings available that bring libcurl access to your favourite
There are many bindings available that bring libcurl access to your favorite
language. Look elsewhere for documentation on those.
libcurl has a global constant environment that you must set up and maintain
@ -205,8 +205,8 @@ 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.
(Caveat: If you are initializing libcurl from a Windows DLL you should not
initialize it from DllMain or a static initializer because Windows holds the
loader lock during that time and it could cause a deadlock.)
initialize it from \fIDllMain\fP or a static initializer because Windows holds
the loader lock during that time and it could cause a deadlock.)
\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

View file

@ -24,7 +24,7 @@
.\"
.TH CURLINFO_CAINFO 3 "20 May 2022" "libcurl 7.84.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CAINFO \- get the default built-in CAINFO string
CURLINFO_CAINFO \- get the default built-in CA certificate path
.SH SYNOPSIS
.nf
#include <curl/curl.h>

View file

@ -24,7 +24,7 @@
.\"
.TH CURLINFO_CAPATH 3 "20 May 2022" "libcurl 7.84.0" "curl_easy_getinfo options"
.SH NAME
CURLINFO_CAPATH \- get the default built-in CAPATH string
CURLINFO_CAPATH \- get the default built-in CA path string
.SH SYNOPSIS
.nf
#include <curl/curl.h>

View file

@ -33,13 +33,13 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CERTINFO,
struct curl_certinfo **chainp);
.fi
.SH DESCRIPTION
Pass a pointer to a 'struct curl_certinfo *' and you will get it set to point to
a struct that holds a number of linked lists with info about the certificate
chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the request was
made. 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.
Pass a pointer to a \fIstruct curl_certinfo *\fP and you will get it set to
point to a struct that holds a number of linked lists with info about the
certificate chain, assuming you had \fICURLOPT_CERTINFO(3)\fP enabled when the
request was made. 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 \fIcertinfo.c\fP example.
.SH PROTOCOLS
All TLS-based
.SH EXAMPLE

View file

@ -33,7 +33,7 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);
.fi
.SH DESCRIPTION
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
in number of seconds since January 1 1970 in the GMT/UTC time zone. If you get
-1, it can be because of many reasons (it might be unknown, the server might
hide it or the server does not support the command that tells document time
etc) and the time of the document is unknown.

View file

@ -34,10 +34,10 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME_T,
.fi
.SH DESCRIPTION
Pass a pointer to a curl_off_t 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 (it might be unknown, the server
might hide it or the server does not support the command that tells document
time etc) and the time of the document is unknown.
document in number of seconds since January 1 1970 in the GMT/UTC time
zone. If you get -1, it can be because of many reasons (it might be unknown,
the server might hide it or the server does not support the command that tells
document time etc) and the time of the document is unknown.
You must ask libcurl to collect this information before the transfer is made,
by using the \fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or

View file

@ -71,12 +71,11 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_ERROR, long *detail);
.fi
.SH DESCRIPTION
Pass a pointer to a long to receive a detailed error code when the most recent
transfer returned a CURLE_PROXY error.
transfer returned a \fBCURLE_PROXY\fP error. That error code will match the
\fBCURLproxycode\fP set.
The return value will match the CURLproxycode set.
The returned value will be zero (equal to CURLPX_OK) if no such response code
was available.
The error code will be zero (\fBCURLPX_OK\fP) if no response code was
available.
.SH PROTOCOLS
All that can be done over SOCKS
.SH EXAMPLE

View file

@ -33,7 +33,7 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep);
.fi
.SH DESCRIPTION
Pass a pointer to a long to receive the last received HTTP, FTP, SMTP or
LDAP (openldap only) response code. This option was previously known as
LDAP (OpenLDAP only) response code. This option was previously known as
CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier.
The stored value will be zero if no server response code has been received.
Note that a proxy's CONNECT response should

View file

@ -36,7 +36,7 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SERVER_CSEQ,
Pass a pointer to a long to receive the next CSeq that will be expected by the
application.
Llistening for server initiated requests is currently unimplemented!
Listening for server initiated requests is not implemented!
Applications wishing to resume an RTSP session on another connection should
retrieve this info before closing the active connection.

View file

@ -40,14 +40,14 @@ This option is exactly the same as \fICURLINFO_TLS_SSL_PTR(3)\fP except in the
case of OpenSSL. If the session \fIbackend\fP is CURLSSLBACKEND_OPENSSL the
session \fIinternals\fP pointer varies depending on the option:
CURLINFO_TLS_SESSION OpenSSL session \fIinternals\fP is SSL_CTX *.
CURLINFO_TLS_SESSION OpenSSL session \fIinternals\fP is \fBSSL_CTX *\fP.
CURLINFO_TLS_SSL_PTR OpenSSL session \fIinternals\fP is SSL *.
CURLINFO_TLS_SSL_PTR OpenSSL session \fIinternals\fP is \fBSSL *\fP.
You can obtain an SSL_CTX pointer from an SSL pointer using OpenSSL function
SSL_get_SSL_CTX. Therefore unless you need compatibility with older versions of
libcurl use \fICURLINFO_TLS_SSL_PTR(3)\fP. Refer to that document for more
information.
You can obtain an \fBSSL_CTX\fP pointer from an SSL pointer using OpenSSL
function \fISSL_get_SSL_CTX(3)\fP. Therefore unless you need compatibility
with older versions of libcurl use \fICURLINFO_TLS_SSL_PTR(3)\fP. Refer to
that document for more information.
.SH PROTOCOLS
All TLS-based
.SH EXAMPLE

View file

@ -38,9 +38,9 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SSL_PTR,
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SESSION,
struct curl_tlssessioninfo **session);
.SH DESCRIPTION
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 a pointer to the
Pass a pointer to a \fIstruct curl_tlssessioninfo *\fP. The pointer will be
initialized to refer to a \fIstruct curl_tlssessioninfo *\fP that will contain
an enum indicating the SSL library used for the handshake and a pointer to the
respective internal TLS session structure of this underlying SSL library.
This option may be useful for example to extract certificate information in a
@ -66,34 +66,32 @@ The \fIinternals\fP struct member will point to a TLS library specific pointer
for the active ("in use") SSL connection, with the following underlying types:
.RS
.IP GnuTLS
gnutls_session_t
\fBgnutls_session_t\fP
.IP gskit
gsk_handle
\fBgsk_handle\fP
.IP NSS
PRFileDesc *
\fBPRFileDesc *\fP
.IP OpenSSL
CURLINFO_TLS_SESSION: SSL_CTX *
CURLINFO_TLS_SESSION: \fBSSL_CTX *\fP
CURLINFO_TLS_SSL_PTR: SSL *
CURLINFO_TLS_SSL_PTR: \fBSSL *\fP
.RE
Since 7.48.0 the \fIinternals\fP member can point to these other SSL backends
as well:
.RS
.IP mbedTLS
mbedtls_ssl_context *
\fBmbedTLS_ssl_context *\fP
.IP "Secure Channel"
CtxtHandle *
\fBCtxtHandle *\fP
.IP "Secure Transport"
SSLContext *
\fBSSLContext *\fP
.IP "wolfSSL"
SSL *
.IP "MesaLink"
SSL *
\fBSSL *\fP
.RE
If the \fIinternals\fP pointer is NULL then either the SSL backend is not
supported, an SSL session has not yet been established or the connection is no
longer associated with the easy handle (eg curl_easy_perform has returned).
longer associated with the easy handle (e.g. curl_easy_perform has returned).
.SH LIMITATIONS
This option has some limitations that could make it unsafe when it comes to
the manual verification of certificates.
@ -104,7 +102,7 @@ using FTP over SSL. That is because the FTP protocol has a control channel and
a data channel and one or both may be over SSL. Currently there is no way to
retrieve a second in-use SSL session associated with an easy handle.
This option has not been thoroughly tested with plaintext protocols that can
This option has not been thoroughly tested with clear text protocols that can
be upgraded/downgraded to/from SSL: FTP, SMTP, POP3, IMAP when used with
\fICURLOPT_USE_SSL(3)\fP. Though you will be able to retrieve the SSL pointer,
it's possible that before you can do that data (including auth) may have
@ -117,10 +115,10 @@ after renegotiation but before you are able to get the (possibly) changed SSL
pointer, with the (possibly) changed certificate information.
If you are using OpenSSL or wolfSSL then \fICURLOPT_SSL_CTX_FUNCTION(3)\fP can
be used to set a certificate verification callback in the CTX. That is safer
than using this option to poll for certificate changes and does not suffer from
any of the problems above. There is currently no way in libcurl to set a
verification callback for the other SSL backends.
be used to set a certificate verification callback. That is safer than using
this option to poll for certificate changes and does not suffer from any of
the problems above. There is currently no way in libcurl to set a verification
callback for the other SSL backends.
How are you using this option? Are you affected by any of these limitations?
Please let us know by making a comment at

View file

@ -35,11 +35,11 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE,
.SH DESCRIPTION
No function since pipelining was removed in 7.62.0.
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.
Pass a long with a \fBsize\fP in bytes. If a transfer in a pipeline 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

View file

@ -35,8 +35,8 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE,
.SH DESCRIPTION
No function since pipelining was removed in 7.62.0.
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
Pass a long with a \fBsize\fP in bytes. If a transfer in a pipeline 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.

View file

@ -38,8 +38,7 @@ maximum number of concurrent streams for a connections that libcurl should
support on connections done using HTTP/2.
Valid values range from 1 to 2147483647 (2^31 - 1) and defaults to 100. The
value passed here would be honoured based on other system resources
properties.
value passed here would be honored based on other system resources properties.
.SH DEFAULT
100
.SH PROTOCOLS

View file

@ -36,8 +36,8 @@ CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH,
No function since pipelining was removed in 7.62.0.
Pass a long. The set \fBmax\fP number will be used as the maximum amount of
outstanding requests in an HTTP/1.1 pipelined connection. This option is only
used for HTTP/1.1 pipelining, not for HTTP/2 multiplexing.
outstanding requests in an HTTP/1.1 pipeline. This option is only used for
HTTP/1.1 pipelining, not for HTTP/2 multiplexing.
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

View file

@ -49,9 +49,9 @@ pushes will be denied automatically.
The callback gets its arguments like this:
\fIparent\fP is the handle of the stream on which this push arrives. The new
handle has been duphandle()d from the parent, meaning that it has gotten all
its options inherited. It is then up to the application to alter any options
if desired.
handle has been duplicated from the parent, meaning that it has gotten all its
options inherited. It is then up to the application to alter any options if
desired.
\fIeasy\fP is a newly created handle that represents this upcoming transfer.
@ -73,8 +73,8 @@ functions. These functions can only be used from within this callback and they
can only access the PUSH_PROMISE headers. The normal response headers will be
passed to the header callback for pushed streams just as for normal streams.
.IP curl_pushheader_bynum
Returns the header at index 'num' (or NULL). The returned pointer points to a
"name:value" string that will be freed when this callback returns.
Returns the header at index \fInum\fP (or NULL). The returned pointer points
to a "name:value" string that will be freed when this callback returns.
.IP curl_pushheader_byname
Returns the value for the given header name (or NULL). This is a shortcut so
that the application does not have to loop through all headers to find the one

View file

@ -51,9 +51,7 @@ non-compressed, \fIdeflate\fP which requests the server to compress its
response using the zlib algorithm, \fIgzip\fP which requests the gzip
algorithm, (since curl 7.57.0) \fIbr\fP which is brotli and (since curl
7.72.0) \fIzstd\fP which is zstd. Provide them in the string as a
comma-separated list of accepted encodings, like:
"br, gzip, deflate".
comma-separated list of accepted encodings, like: \fB"br, gzip, deflate"\fP.
Set \fICURLOPT_ACCEPT_ENCODING(3)\fP to NULL to explicitly disable it, which
makes libcurl not send an Accept-Encoding: header and not decompress received

View file

@ -57,7 +57,7 @@ nine space-separated fields.
An example line could look like
h2 www.example 8443 h3 quic.example 443 "20190808 06:18:37" 1 0
h2 www.example 8443 h3 second.example 443 "20190808 06:18:37" 1 0
The fields of that line are:
@ -69,7 +69,7 @@ Host name for the source origin
Port number for the source origin
.IP h3
ALPN id for the destination host
.IP quic.example
.IP second.example
Host name for the destination host
.IP 443
Port number for the destination host

View file

@ -35,8 +35,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AWS_SIGV4, char *param);
Provides AWS V4 signature authentication on HTTP(S) header.
.PP
Pass a char * that is the collection of specific arguments are used for
creating outgoing authentication headers.
The format of the param option is:
creating outgoing authentication headers. The format of the \fIparam\fP
option is:
.IP provider1[:provider2[:region[:service]]]
.IP provider1,\ provider2
The providers arguments are used for generating some authentication parameters
@ -50,19 +50,19 @@ It is extracted from the host name specified in the URL if omitted.
.PP
NOTE: This call set \fICURLOPT_HTTPAUTH(3)\fP to CURLAUTH_AWS_SIGV4.
Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
as calling this with "aws:amz" in parameter.
as calling this with \fB"aws:amz"\fP in parameter.
.PP
Example with "Test:Try", when curl will do the algorithm, it will generate
"TEST-HMAC-SHA256" for "Algorithm", "x-try-date" and "X-Try-Date" for "date",
"test4_request" for "request type",
"SignedHeaders=content-type;host;x-try-date" for "signed headers"
\fB"TEST-HMAC-SHA256"P for "Algorithm", \fB"x-try-date"\fP and
\fB"X-Try-Date"\fP for "date", \fB"test4_request"\fP for "request type",
\fB"SignedHeaders=content-type;host;x-try-date"\fP for "signed headers"
.PP
If you use just "test", instead of "test:try",
test will be use for every strings generated
.SH DEFAULT
By default, the value of this parameter is NULL.
Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
as calling this with "aws:amz" in parameter.
as calling this with \fB"aws:amz"\fP in parameter.
.SH PROTOCOLS
HTTP
.SH EXAMPLE
@ -92,8 +92,8 @@ Added in 7.75.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH NOTES
This option overrides the other auth types you might have set in CURL_HTTPAUTH
which should be highlighted as this makes this auth method special.
This method cannot be combined with other auth types.
This option overrides the other auth types you might have set in
\fICURLOPT_HTTPAUTH(3)\fP which should be highlighted as this makes this auth
method special. This method cannot be combined with other auth types.
.SH "SEE ALSO"
.BR CURLOPT_HEADEROPT "(3), " CURLOPT_HTTPHEADER "(3), "

View file

@ -39,8 +39,8 @@ 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.
This option is by default set to the system path where libcurl's CA
certificate 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.

View file

@ -34,12 +34,12 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);
.SH DESCRIPTION
Pass a char * to a null-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.
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.
to some limitation in OpenSSL.
The application does not have to keep the string around after setting this
option.

View file

@ -24,7 +24,7 @@
.\"
.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
CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcard match
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -68,14 +68,14 @@ 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.
The \fItransfer_info\fP pointer will point to a \fBcurl_fileinfo\fP struct
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
the FTP wildcard download, the target is \fBcurl_fileinfo\fP 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

View file

@ -24,7 +24,7 @@
.\"
.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
CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcard match
.SH SYNOPSIS
.nf
#include <curl/curl.h>

View file

@ -38,7 +38,7 @@ 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.
\fBCURL_VERSION_CONV\fP 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
@ -54,10 +54,10 @@ the network.
If you set a callback pointer to NULL, or do not 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.
return the \fBCURLE_CONV_REQD\fP error code.
If HAVE_ICONV is defined, CURL_ICONV_CODESET_OF_HOST must also be defined.
For example:
If \fBHAVE_ICONV\fP is defined, \fBCURL_ICONV_CODESET_OF_HOST\fP must also be
defined. For example:
\&#define CURL_ICONV_CODESET_OF_HOST "IBM-1047"

View file

@ -80,9 +80,8 @@ if(curl) {
}
.fi
.SH "Cookie file format"
The cookie file format and general cookie concepts in curl are described in
the HTTP-COOKIES.md file, also hosted online here:
https://curl.se/docs/http-cookies.html
The cookie file format and general cookie concepts in curl are described
online here: https://curl.se/docs/http-cookies.html
.SH AVAILABILITY
As long as HTTP is supported
.SH RETURN VALUE

View file

@ -107,17 +107,16 @@ curl_easy_perform(curl); /* cookies imported from cookies.txt */
curl_easy_cleanup(curl); /* cookies exported to cookies.txt */
.fi
.SH "Cookie file format"
The cookie file format and general cookie concepts in curl are described in
the HTTP-COOKIES.md file, also hosted online here:
https://curl.se/docs/http-cookies.html
The cookie file format and general cookie concepts in curl are described
online here: https://curl.se/docs/http-cookies.html
.SH AVAILABILITY
ALL was added in 7.14.1
\fBALL\fP was added in 7.14.1
SESS was added in 7.15.4
\fBSESS\fP was added in 7.15.4
FLUSH was added in 7.17.1
\fBFLUSH\fP was added in 7.17.1
RELOAD was added in 7.39.0
\fFRELOAD\fP 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.

View file

@ -24,7 +24,7 @@
.\"
.TH CURLOPT_CURLU 3 "28 Oct 2018" "libcurl 7.63.0" "curl_easy_setopt options"
.SH NAME
CURLOPT_CURLU \- URL in CURLU * format
CURLOPT_CURLU \- URL in URL handle format
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -33,7 +33,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CURLU, void *pointer);
.fi
.SH DESCRIPTION
Pass in a pointer to the \fIURL\fP to work with. The parameter should be a
CURLU *. Setting \fICURLOPT_CURLU(3)\fP will explicitly override
\fICURLU *\fP. Setting \fICURLOPT_CURLU(3)\fP will explicitly override
\fICURLOPT_URL(3)\fP.
\fICURLOPT_URL(3)\fP or \fICURLOPT_CURLU(3)\fP \fBmust\fP be set before a

View file

@ -74,16 +74,16 @@ 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.
\fBDELE\fP and \fBNOOP\fP for example.
.IP SMTP
Instead of a HELP or VRFY when issuing SMTP based requests.
Instead of a \fBHELP\fP or \fBVRFY\fP when issuing SMTP based requests.
For example:
Normally a multiline response is returned which can be used, in conjunction
Normally a multi line 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.
issue \fBNOOP\fP and \fBRSET\fP commands.
The application does not have to keep the string around after setting this
option.

View file

@ -61,7 +61,7 @@ NOT be null-terminated, but will be exactly of the \fIsize\fP as told by the
The \fIuserptr\fP argument is the pointer set with \fICURLOPT_DEBUGDATA(3)\fP.
Available curl_infotype values:
Available \fBcurl_infotype\fP values:
.IP CURLINFO_TEXT
The data is informational text.
.IP CURLINFO_HEADER_IN

View file

@ -43,11 +43,11 @@ dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3,
pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
An unknown or unsupported protocol causes error
\fICURLE_UNSUPPORTED_PROTOCOL\fP when libcurl parses a schemeless URL. Parsing
happens when \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP is
called. The protocols supported by libcurl will vary depending on how it was
built. Use \fIcurl_version_info(3)\fP if you need a list of protocol names
supported by the build of libcurl that you are using.
\fICURLE_UNSUPPORTED_PROTOCOL\fP when libcurl parses a URL without a
scheme. Parsing happens when \fIcurl_easy_perform(3)\fP or
\fIcurl_multi_perform(3)\fP is called. The protocols supported by libcurl will
vary depending on how it was built. Use \fIcurl_version_info(3)\fP if you need
a list of protocol names supported by the build of libcurl that you are using.
This option does not change the default proxy protocol (http).

View file

@ -48,7 +48,8 @@ Subject Alternate Name field in the certificate matches the host name in the
DoH URL to which you told Curl to connect.
When the \fIverify\fP value is set to 1L it is treated the same as 2L. However
for consistency with the other VERIFYHOST options we suggest use 2 and not 1.
for consistency with the other \fIVERIFYHOST\fP options we suggest use 2 and
not 1.
When the \fIverify\fP value is set to 0L, the connection succeeds regardless of
the names used in the certificate. Use that ability with caution!

View file

@ -47,8 +47,8 @@ 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.
a port or port range have to be in brackets. IPv6 addresses without
port/range specifier can be in brackets.
Examples with specified ports:

View file

@ -24,7 +24,7 @@
.\"
.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
CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing directories for FTP and SFTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>
@ -51,11 +51,11 @@ 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
retry the CWD command again if the subsequent \fBMKD\fP command fails. This is
especially useful if you are 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!
but then another connection does \fBMKD\fP before this connection and thus
\fBMKD\fP fails but trying CWD works!
.SH DEFAULT
CURLFTP_CREATE_DIR_NONE (0)
.SH PROTOCOLS

View file

@ -37,7 +37,7 @@ allow unconditional GSSAPI credential delegation. The delegation is disabled
by default since 7.21.7. Set the parameter to
\fBCURLGSSAPI_DELEGATION_POLICY_FLAG\fP 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
GSS-API implementation and the definition of \fIGSS_C_DELEG_POLICY_FLAG\fP was
available at compile-time.
.SH DEFAULT
CURLGSSAPI_DELEGATION_NONE

View file

@ -24,7 +24,7 @@
.\"
.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "1 Feb 2018" "libcurl 7.59.0" "curl_easy_setopt options"
.SH NAME
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for IPv6 for happy eyeballs
.SH SYNOPSIS
.nf
#include <curl/curl.h>

View file

@ -50,8 +50,8 @@ physical line. Each line in the file has the following format:
[host] [stamp]
[host] is the domain name for the entry and the name is dot-prefixed if it is
a includeSubDomain entry (if the entry is valid for all subdmains to the name
as well or only for the exact name).
an entry valid for all subdomains to the name as well or only for the exact
name.
[stamp] is the time (in UTC) when the entry expires and it uses the format
\&"YYYYMMDD HH:MM:SS".

View file

@ -50,10 +50,10 @@ Set the \fIuserp\fP argument with the \fICURLOPT_HSTSREADDATA(3)\fP option or
it will be NULL.
When this callback is invoked, the \fIsts\fP pointer points to a populated
struct: Copy the host name to 'name' (no longer than 'namelen' bytes). Make it
null-terminated. Set 'includeSubDomains' to TRUE or FALSE. Set 'expire' to a
date stamp or a zero length string for *forever* (wrong date stamp format
might cause the name to not get accepted)
struct: Copy the host name to \fIname\fP (no longer than \fInamelen\fP
bytes). Make it null-terminated. Set \fIincludeSubDomains\fP to TRUE or
FALSE. Set \fIexpire\fP to a date stamp or a zero length string for *forever*
(wrong date stamp format might cause the name to not get accepted)
The callback should return \fICURLSTS_OK\fP if it returns a name and is
prepared to be called again (for another host) or \fICURLSTS_DONE\fP if it has

View file

@ -34,7 +34,7 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTSWRITEDATA, void *pointer);
.SH DESCRIPTION
Data \fIpointer\fP to pass to the HSTS write function. If you use the
\fICURLOPT_HSTSWRITEFUNCTION(3)\fP option, this is the pointer you will get as
input in the 4th argument to the callback.
input in the fourth argument to the callback.
This option does not enable HSTS, you need to use \fICURLOPT_HSTS_CTRL(3)\fP to
do that.

View file

@ -57,10 +57,10 @@ Set the \fIuserp\fP argument with the \fICURLOPT_HSTSWRITEDATA(3)\fP option or
it will be NULL.
When the callback is invoked, the \fIsts\fP pointer points to a populated
struct: Read the host name to 'name' (it is 'namelen' bytes long and null
terminated. The 'includeSubDomains' field is non-zero if the entry matches
subdomains. The 'expire' string is a date stamp null-terminated string using
the syntax YYYYMMDD HH:MM:SS.
struct: Read the host name to 'name' (it is \fInamelen\fP bytes long and null
terminated. The \fIincludeSubDomains\fP field is non-zero if the entry matches
subdomains. The \fIexpire\fP string is a date stamp null-terminated string
using the syntax YYYYMMDD HH:MM:SS.
The callback should return \fICURLSTS_OK\fP if it succeeded and is prepared to
be called again (for another host) or \fICURLSTS_DONE\fP if there's nothing

View file

@ -78,11 +78,11 @@ 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
is specified at compile time but is typically \fB/usr/bin/ntlm_auth\fP.
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
kill it when complete, calling \fBwaitpid()\fP 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
@ -98,7 +98,7 @@ 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
value to force libcurl to probe for unrestricted auth and if not, only that
single auth algorithm is acceptable.
.IP CURLAUTH_AWS_SIGV4
provides AWS V4 signature authentication on HTTPS header

View file

@ -45,8 +45,7 @@ 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).
right side of the colon), use the form 'name;' (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

View file

@ -32,10 +32,10 @@ CURLOPT_HTTPPOST \- multipart formpost content
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
Tells libcurl you want a \fBmultipart/formdata\fP 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
Pass a pointer to a linked list of \fIcurl_httppost\fP structs as parameter.
The easiest way to create such a list, is to use \fIcurl_formadd(3)\fP as
documented. The data in this list must remain intact as long as the curl
transfer is alive and is using it.

View file

@ -36,7 +36,7 @@ Pass a char * as parameter, which should be pointing to the null-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
the IETF draft \fBdraft-earhart-url-smtp-00.txt\fP.
\fICURLOPT_LOGIN_OPTIONS(3)\fP can be used to set protocol specific login
options, such as the preferred authentication mechanism via "AUTH=NTLM" or

View file

@ -43,12 +43,13 @@ 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 an address verification (\fBVRFY\fP 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".
When performing a mailing list expand (\fBEXPN\fP command), each recipient
should be specified using the mailing list name, such as "Friends" or
"London-Office".
.SH DEFAULT
NULL
.SH PROTOCOLS
@ -68,7 +69,7 @@ if(curl) {
}
.fi
.SH AVAILABILITY
Added in 7.20.0. The VRFY and EXPN logic was added in 7.34.0
Added in 7.20.0. The \fBVRFY\fP and \fBEXPN\fP 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"

View file

@ -29,10 +29,10 @@ CURLOPT_MAXAGE_CONN \- max idle time allowed for reusing a connection
.nf
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXAGE_CONN, long maxage);
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXAGE_CONN, long age);
.fi
.SH DESCRIPTION
Pass a long as parameter containing \fImaxage\fP - the maximum time in seconds
Pass a long as parameter containing \fIage\fP - the maximum time in seconds
that you allow an existing connection to have been idle to be considered for
reuse for this request.
@ -42,10 +42,9 @@ reuse. The \fICURLOPT_MAXAGE_CONN(3)\fP limit prevents libcurl from trying too
old connections for reuse, since old connections have a high risk of not
working and thus trying them is a performance loss and sometimes service loss
due to the difficulties to figure out the situation. If a connection is found
in the cache that is older than this set \fImaxage\fP, it will instead be
closed.
in the cache that is older than this set \fIage\fP, it will instead be closed.
.SH DEFAULT
Default maxage is 118 seconds.
Default maximum age is set to 118 seconds.
.SH PROTOCOLS
All
.SH EXAMPLE

View file

@ -74,7 +74,7 @@ Each field is provided as a sequence of letters that ends with a space or
newline. Starting in 7.84.0, libcurl also supports quoted strings. They start
and end with double quotes and support the escaped special letters \\\", \\n,
\\r, and \\t. Quoted strings are the only way a space character can be used in
a user namd or password.
a user name or password.
.IP "machine <name>"
Provides credentials for a host called \fBname\fP. libcurl searches the .netrc

View file

@ -37,7 +37,7 @@ 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.
For HTTP operations when \fICURLOPT_NOBODY(3)\fP has been set, unsetting the
For HTTP operations when \fICURLOPT_NOBODY(3)\fP has been set, disabling this
option (with 0) will make it a GET again - only if the method is still set to
be HEAD. The proper way to get back to a GET request is to set
\fICURLOPT_HTTPGET(3)\fP and for other methods, use the POST or UPLOAD

View file

@ -37,16 +37,16 @@ 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.
hostname itself. For example, "ample.com" would match ample.com, ample.com:80,
and www.ample.com, but not www.example.com or ample.com.org.
If the name in the noproxy list has a leading period, it is a domain match
against the provided host name. This way ".example.com" will switch off proxy
use for both "www.example.com" as well as for "foo.example.com".
If the name in the \fInoproxy\fP list has a leading period, it is a domain
match against the provided host name. This way ".example.com" will switch off
proxy use for both "www.example.com" as well as for "foo.example.com".
Setting the noproxy string to "" (an empty string) will explicitly enable the
proxy for all host names, even if there is an environment variable set for it.
Setting the \fInoproxy\fP string to "" (an empty string) will explicitly
enable the proxy for all host names, even if there is an environment variable
set for it.
Enter IPv6 numerical addresses in the list of host names without enclosing
brackets:

View file

@ -46,10 +46,10 @@ 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
effort to never cause such SIGPIPE signals 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

View file

@ -33,7 +33,8 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);
.fi
.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.
argument in the open socket callback set with
\fICURLOPT_OPENSOCKETFUNCTION(3)\fP.
.SH DEFAULT
The default value of this parameter is NULL.
.SH PROTOCOLS

View file

@ -106,21 +106,21 @@ PEM/DER support:
7.43.0: NSS and wolfSSL
7.47.0: mbedtls
7.47.0: mbedTLS
7.54.1: SecureTransport on macOS 10.7+/iOS 10+
7.54.1: Secure Transport on macOS 10.7+/iOS 10+
7.58.1: SChannel
7.58.1: Schannel
sha256 support:
7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL
7.47.0: mbedtls
7.47.0: mbedTLS
7.54.1: SecureTransport on macOS 10.7+/iOS 10+
7.54.1: Secure Transport on macOS 10.7+/iOS 10+
7.58.1: SChannel Windows XP SP3+
7.58.1: Schannel Windows XP SP3+
Other SSL backends not supported.
.SH RETURN VALUE

Some files were not shown because too many files have changed in this diff Show more