16
16
1.6 What do you get for making curl?
17
17
1.7 What about CURL from curl.com?
18
18
1.8 I have a problem who do I mail?
19
1.9 Where do I buy commercial support for curl?
20
1.10 How many are using curl?
20
22
2. Install Related Problems
21
23
2.1 configure doesn't find OpenSSL even when it is installed
64
66
4.10 My HTTP request using HEAD, PUT or DELETE doesn't work!
65
67
4.11 Why does my HTTP range requests return the full document?
66
68
4.12 Why do I get "certificate verify failed" ?
69
4.13 Why is curl -R on Windows one hour off?
70
4.14 Redirects work in browser but not with curl!
69
73
5.1 Is libcurl thread-safe?
133
138
We pronounce curl and cURL with an initial k sound: [kurl].
135
NOTE: there are numerous sub-projects and related projects that also use the
136
word curl in the project names in various combinations, but you should take
140
There are numerous sub-projects and related projects that also use the word
141
curl in the project names in various combinations, but you should take
137
142
notice that this FAQ is directed at the command-line tool named curl (and
138
143
libcurl the library), and may therefore not be valid for other curl-related
144
projects. (There is however a small section for the PHP/CURL in this FAQ.)
141
146
1.2 What is libcurl?
146
151
You can use libcurl for free in your application, be it open source,
147
152
commercial or closed-source.
154
libcurl is most probably the most portable, most powerful and most often
155
used C-based multi-platform file transfer library on this planet - be it
156
open source or commercial.
149
158
1.3 What is curl not?
151
160
Curl is *not* a wget clone. That is a common misconception. Never, during
198
207
1.5 Who makes curl?
200
curl and libcurl are not made by any single individual. Sure, Daniel
201
Stenberg writes the major parts, but other persons' submissions are
209
curl and libcurl are not made by any single individual. Daniel Stenberg is
210
project leader and main developer, but other persons' submissions are
202
211
important and crucial. Anyone can contribute and post their changes and
203
212
improvements and have them inserted in the main sources (of course on the
204
213
condition that developers agree on that the fixes are good).
206
The list of contributors in the docs/THANKS file is only a small part of all
207
the people that every day provide us with bug reports, suggestions, ideas
215
The full list of the more than 450 contributors is found in the docs/THANKS
210
218
curl is developed by a community, with Daniel at the wheel.
220
228
have sponsored certain parts of the development in the past and I hope some
221
229
will continue to do so in the future.
223
If you want to support our project with a donation or similar, one way of
224
doing that would be to buy "gift certificates" at useful online shopping
225
sites, such as amazon.com or thinkgeek.com. Another way would be to sponsor
226
us through a banner-program or even better: by helping us coding,
227
documenting, testing etc. You're welcome to send us a buck using paypal, as
228
described here: http://curl.haxx.se/donation.html
231
If you want to support our project, consider a donation or a banner-program
232
or even better: by helping us coding, documenting, testing etc.
230
234
1.7 What about CURL from curl.com?
256
260
users thanks to the web based archives of the mailing lists), thus saving us
257
261
from having to repeat ourselves even more. Thanks for respecting this.
263
If you have found or simply suspect a security problem in curl or libcurl,
264
mail curl-security at haxx.se (closed list of receivers, mails are not
265
disclosed) and tell. Then we can produce a fix in a timely manner before the
266
flaw is announced to the world, thus lessen the impact the problem will have
269
1.9 Where do I buy commercial support for curl?
271
curl is fully open source. It means you can hire any skilled engineer to fix
272
your curl-related problems.
274
We list available alternatives on the curl web site:
275
http://curl.haxx.se/support.html
277
1.10 How many are using curl?
279
It is impossible to tell.
281
We don't know how many users that knowingly have installed and use curl.
283
We don't know how many users that use curl without knowing that they are in
286
We don't know how many users that downloaded or installed curl and then
289
Some facts to use as input to the math:
291
curl packages have been downloaded from the curl.haxx.se site well over a
292
million times. curl is installed by default with most Linux
293
distributions. curl is installed by default with Mac OS X. curl and libcurl
294
as used by numerous applications that include libcurl binaries in their
295
distribution packages (like Adobe Acrobat Reader and Google Earth).
297
More than 40 known named companies use curl in commercial environments and
298
products. More than 100 known named open source projects depend on
301
In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
302
estimated a user base of one million users or more.
304
In March 2005, the "Linux Counter project" estimated a total Linux user base
305
of some 29 millions, while Netcraft detected some 4 million "active" Linux
306
based web servers. A guess is that a fair amount of these Linux
307
installations have curl installed.
309
http://curl.haxx.se/docs/companies.html
310
http://curl.haxx.se/docs/programs.html
311
http://curl.haxx.se/libcurl/using/apps.html
312
http://counter.li.org/estimates.php
313
http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
260
316
2. Install Related Problems
509
567
- Server certificate. The server you communicate with has a server
510
568
certificate. You can and should verify this certificate to make sure that
511
569
you are truly talking to the real server and not a server impersonating
512
it. The server certificate verification process is made by using a
513
Certificate Authority certificate ("CA cert") that was used to sign the
514
server certificate. Server certificate verification is enabled by default
515
in curl and libcurl and is often the reason for problems as explained in
516
FAQ entry 4.12 and the SSLCERTS document
572
- Certificate Authority certificate ("CA cert"). You often have several CA
573
certs in a CA cert bundle that can be used to verify a server certificate
574
that was signed by one of the authorities in the bundle. curl comes with a
575
default CA cert bundle. You can override the default.
577
The server certificate verification process is made by using a Certificate
578
Authority certificate ("CA cert") that was used to sign the server
579
certificate. Server certificate verification is enabled by default in curl
580
and libcurl and is often the reason for problems as explained in FAQ entry
581
4.12 and the SSLCERTS document
517
582
(http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
518
583
"self-signed" or otherwise signed by a CA that you do not have a CA cert
519
584
for, cannot be verified. If the verification during a connect fails, you
520
585
are refused access. You then need to explicitly disable the verification
521
586
to connect to the server.
523
- Certificate Authority certificate ("CA cert"). You often have several CA
524
certs in a CA cert bundle that can be used to verify a server certificate
525
that was signed by one of the authorities in the bundle. curl comes with a
526
default CA cert bundle. You can override the default.
528
588
3.17 How do I list the root dir of an FTP server?
530
590
There are two ways. The way defined in the RFC is to use an encoded slash
734
796
Details are also in the SSLCERTS file in the release archives, found online
735
797
here: http://curl.haxx.se/docs/sslcerts.html
799
4.13 Why is curl -R on Windows one hour off?
801
During daylight savings time, when -R is used, curl will set a time that
802
appears one hour off. This happens due to a flaw in how Windows stores and
803
uses file modification times and it is not easily worked around. For details
804
on this problem, read this: http://www.codeproject.com/datetime/dstbugs.asp
806
4.14 Redirects work in browser but not with curl!
808
curl supports HTTP redirects fine (see item 3.8). Browsers generally support
809
at least two other ways to perform directs that curl does not:
811
- Meta tags. You can write a HTML tag that will cause the browser to
812
redirect to another given URL after a certain time.
814
- Javascript. You can write a javascript program embeded in a HTML page
815
that redirects the browser to another given URL.
817
There is no way to make curl follow these redirects. You must either
818
manually figure out what the page is set to do, or you write a script that
819
parses the results and fetches the new URL.
738
822
5. libcurl Issues
754
838
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
755
839
for the crypto functions).
757
[informative link missing]
841
http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
759
843
5.2 How can I receive all data into a large memory chunk?
767
851
One solution to this problem could be to have a pointer to a struct that you
768
852
pass to the callback function. You set the pointer using the
769
curl_easy_setopt(CURLOPT_FILE) function. Then that pointer will be passed to
770
the callback instead of a FILE * to a file:
853
CURLOPT_WRITEDATA option. Then that pointer will be passed to the callback
854
instead of a FILE * to a file:
772
856
/* imaginary struct */
773
857
struct MemoryStruct {
875
959
5.9 How does libcurl resolve host names?
877
libcurl includes a number of different name resolve functions:
961
libcurl supports a large a number of different name resolve functions. One
962
of them is picked at build-time and will be used unconditionally. Thus, if
963
you want to change name resolver function you must rebuild libcurl and tell
964
it to use a different function.
879
966
- The non-ipv6 resolver that can use one out of four host name resolve calls
880
967
(depending on what your system supports):
899
988
5.10 How do I prevent libcurl from writing the response to stdout?
901
990
libcurl provides a default built-in write function that writes received data
902
to stdout. Set a WRITEFUNCTION to receive the data, or possibly set
903
WRITEDATA to a different FILE * handle.
991
to stdout. Set the CURLOPT_WRITEFUNCTION to receive the data, or possibly
992
set CURLOPT_WRITEDATA to a different FILE * handle.
905
994
5.11 How do I make libcurl not receive the whole HTTP response?
929
1018
is just a brief summary for the cases we get the most questions. (Parts of
930
1019
this section was much enhanced by Bjorn Reese.)
1021
We are not lawyers and this is not legal advice. You should probably consult
1022
one if you want true and accurate legal insights without our prejudice.
932
1024
6.1 I have a GPL program, can I use the libcurl library?
973
1065
libraries that use it. It should be possible for everyone to use libcurl or
974
1066
curl in their projects, no matter what license they already have in use.
1068
6.7 What are my obligations when using libcurl in my commerical apps?
1070
Next to none. All you need to adhere to is the MIT-style license (stated in
1071
the COPYING file) which basically says you have to include the copyright
1072
notice in "all copies" and that you may not use the copyright holder's name
1073
when promoting your software.
1075
You do not have to release any of your source code.
1077
You do not have to reveal or make public any changes to the libcurl source
1080
You do not have to reveal or make public that you are using libcurl within
1083
As can be seen here: http://curl.haxx.se/docs/companies.html and
1084
elsewhere, more and more companies are dicovering the power
1085
of libcurl and take advantage of it even in commercial environments.
976
1088
7. PHP/CURL Issues
978
1090
7.1 What is PHP/CURL?
980
1092
The module for PHP that makes it possible for PHP programs to access curl-
981
functions from within PHP. We often call it PHP/CURL to differentiate from
982
curl the command line tool and libcurl the library.
1093
functions from within PHP.
1095
In the cURL project we call this module PHP/CURL to differentiate it from
1096
curl the command line tool and libcurl the library. The PHP team however
1097
does not refer to it like this (for unknown reasons). They call it plain
1098
CURL (often using all caps) which causes much confusion to users which in
1099
turn gives us a higher question load.
984
1101
7.2 Who write PHP/CURL?