Compare commits
918 Commits
curl-7_37_
...
curl-7_40_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9ce2d70019 | ||
![]() |
4ce22c607b | ||
![]() |
3df8e78860 | ||
![]() |
178bd7db34 | ||
![]() |
f7d5ecec9c | ||
![]() |
4e420600c1 | ||
![]() |
9547954978 | ||
![]() |
4626f31d0e | ||
![]() |
c07857e063 | ||
![]() |
39217edb12 | ||
![]() |
241a67f73b | ||
![]() |
ea93252ef1 | ||
![]() |
f6b168de4c | ||
![]() |
4113ad50e4 | ||
![]() |
c37dcf0edb | ||
![]() |
5359936d07 | ||
![]() |
ea4f98dca6 | ||
![]() |
f9b50910e0 | ||
![]() |
84143dc57d | ||
![]() |
747bad7c09 | ||
![]() |
3a805c5cc1 | ||
![]() |
7241527956 | ||
![]() |
825b0c7968 | ||
![]() |
2948954535 | ||
![]() |
efb64fdf80 | ||
![]() |
6416dc998b | ||
![]() |
0f26148423 | ||
![]() |
f460f12c9d | ||
![]() |
23bb054129 | ||
![]() |
d4b540f85a | ||
![]() |
4967109ffc | ||
![]() |
a68aa81320 | ||
![]() |
0ea9381b7d | ||
![]() |
1cb17b2a5d | ||
![]() |
1dd57bd783 | ||
![]() |
34f0bd110f | ||
![]() |
a75ede4b9b | ||
![]() |
a3daf542ad | ||
![]() |
4bb5a351b2 | ||
![]() |
43792592ca | ||
![]() |
5fbcb9a1fa | ||
![]() |
6e3af5424b | ||
![]() |
7635577ad7 | ||
![]() |
0df2ed85fd | ||
![]() |
5eae12fc80 | ||
![]() |
b40e37f93d | ||
![]() |
ee0941a0b7 | ||
![]() |
e86a6151f4 | ||
![]() |
f4413ca65a | ||
![]() |
7873f9bdbd | ||
![]() |
920e684d40 | ||
![]() |
81951d9874 | ||
![]() |
4c8a053855 | ||
![]() |
8a3c0fbed1 | ||
![]() |
e9d0c7a6f3 | ||
![]() |
56603e2770 | ||
![]() |
89cce1e458 | ||
![]() |
b4433a8ba6 | ||
![]() |
1933f9d33c | ||
![]() |
cfa0ac7aff | ||
![]() |
cfc863869f | ||
![]() |
4088721726 | ||
![]() |
d8273e198c | ||
![]() |
8f40145384 | ||
![]() |
6e7904f9aa | ||
![]() |
037cd0d991 | ||
![]() |
6d79722d78 | ||
![]() |
0d037cfdce | ||
![]() |
9459ee99ae | ||
![]() |
29726951b0 | ||
![]() |
097fc121e6 | ||
![]() |
325a64d8a2 | ||
![]() |
e9e48a6ff2 | ||
![]() |
2728caa613 | ||
![]() |
0943045108 | ||
![]() |
b235c29366 | ||
![]() |
f0a9221897 | ||
![]() |
fd281e9c4b | ||
![]() |
e0d265d3eb | ||
![]() |
98d37c5a0c | ||
![]() |
e5a8a26bcb | ||
![]() |
a9eadc9f91 | ||
![]() |
193ba7b46e | ||
![]() |
151ae59436 | ||
![]() |
bde08d216c | ||
![]() |
1abe65d928 | ||
![]() |
b7f740f2fc | ||
![]() |
cdc1cc22e7 | ||
![]() |
fe43a662a2 | ||
![]() |
1ac4db23f7 | ||
![]() |
7f99e12e98 | ||
![]() |
62a018762e | ||
![]() |
6dd9c3909c | ||
![]() |
6cb7b0c0ac | ||
![]() |
38aaf6c380 | ||
![]() |
ed4c0b53cc | ||
![]() |
95f78b2b56 | ||
![]() |
4ff5d32a6b | ||
![]() |
ed16a1695f | ||
![]() |
7c66ab5029 | ||
![]() |
8830df8b66 | ||
![]() |
a89ec793d0 | ||
![]() |
ce2a80b482 | ||
![]() |
93e6273b68 | ||
![]() |
68cc1e0c77 | ||
![]() |
2568928070 | ||
![]() |
383a4d0990 | ||
![]() |
0beccdf580 | ||
![]() |
a4d9158509 | ||
![]() |
8627618540 | ||
![]() |
d9166028e5 | ||
![]() |
6dae798824 | ||
![]() |
577286e0e2 | ||
![]() |
003dd2e7de | ||
![]() |
03e206d18a | ||
![]() |
2c5f346d3a | ||
![]() |
f9cf3de70b | ||
![]() |
6f1f5a7506 | ||
![]() |
ed68159d19 | ||
![]() |
0114889456 | ||
![]() |
2c7f099253 | ||
![]() |
ee9de01665 | ||
![]() |
f2a5283cbc | ||
![]() |
3e1625c787 | ||
![]() |
e96d7f1df4 | ||
![]() |
6a76d3eb53 | ||
![]() |
3b7bf29385 | ||
![]() |
a390329f60 | ||
![]() |
14c3601583 | ||
![]() |
9081014c2c | ||
![]() |
759d049ae8 | ||
![]() |
1befebc950 | ||
![]() |
ae56df82c1 | ||
![]() |
088b9b2a97 | ||
![]() |
b0670ff12b | ||
![]() |
9b61060ffc | ||
![]() |
5590a3f179 | ||
![]() |
7b3afc952f | ||
![]() |
93227ddca5 | ||
![]() |
cedf996073 | ||
![]() |
dc19789444 | ||
![]() |
64854c0364 | ||
![]() |
d8efde07e5 | ||
![]() |
2ffbd7afac | ||
![]() |
8676ce68e3 | ||
![]() |
91669584cf | ||
![]() |
7fc1cbb640 | ||
![]() |
b9950e3b33 | ||
![]() |
b13923f0f7 | ||
![]() |
212e3e26bc | ||
![]() |
125f655131 | ||
![]() |
c98b50753f | ||
![]() |
96d3c9363f | ||
![]() |
4d2c539b6c | ||
![]() |
35fae251dd | ||
![]() |
52a4d6b8ae | ||
![]() |
18f58c437f | ||
![]() |
2924dd6703 | ||
![]() |
c0fc9066a9 | ||
![]() |
bd7d7f4523 | ||
![]() |
172963005a | ||
![]() |
834608c39d | ||
![]() |
157c9752d5 | ||
![]() |
e98b7b1cb3 | ||
![]() |
5f5814ca5e | ||
![]() |
2ecce667a6 | ||
![]() |
783b5c3b11 | ||
![]() |
7dfbbae3d4 | ||
![]() |
6291a16b20 | ||
![]() |
24b30d259c | ||
![]() |
82fdb87b27 | ||
![]() |
97e90d7b89 | ||
![]() |
10be4ec2c3 | ||
![]() |
bd2231104b | ||
![]() |
8a4ce7d0f5 | ||
![]() |
f0ecdd04d3 | ||
![]() |
2f5c70b2b0 | ||
![]() |
f4b5f8cdf0 | ||
![]() |
8ff3bb5000 | ||
![]() |
1cc5194337 | ||
![]() |
0da4524a22 | ||
![]() |
664b9baf67 | ||
![]() |
cd6c13c2b3 | ||
![]() |
086ad79970 | ||
![]() |
0e8158eabc | ||
![]() |
f768be0a25 | ||
![]() |
41f1f6e830 | ||
![]() |
c3b85c12a9 | ||
![]() |
fc32b81382 | ||
![]() |
6ea4ee94f9 | ||
![]() |
e63d18fbd1 | ||
![]() |
145c263a4b | ||
![]() |
680d5fd041 | ||
![]() |
65d141e6da | ||
![]() |
0d99cdbeed | ||
![]() |
dca257f27e | ||
![]() |
dcd484a238 | ||
![]() |
090232ea19 | ||
![]() |
526603ff05 | ||
![]() |
eb88d778e7 | ||
![]() |
2adf294602 | ||
![]() |
e05de4f46d | ||
![]() |
f5e9c636e8 | ||
![]() |
ef91f04927 | ||
![]() |
befe9a10b9 | ||
![]() |
36d45eabc0 | ||
![]() |
864f17d894 | ||
![]() |
58b317c9da | ||
![]() |
4bdb1ca8d6 | ||
![]() |
d89285e8d6 | ||
![]() |
e17220ffcb | ||
![]() |
9b0b9f209e | ||
![]() |
adbee7ecf5 | ||
![]() |
ccfa139c71 | ||
![]() |
aa0e2ac451 | ||
![]() |
f4ca16058e | ||
![]() |
af937c441b | ||
![]() |
45229fae8e | ||
![]() |
ef5b98742f | ||
![]() |
697592b3dd | ||
![]() |
ee1d729ce0 | ||
![]() |
7b29c2803f | ||
![]() |
576ac00eb3 | ||
![]() |
87c4abb611 | ||
![]() |
5dc68dd609 | ||
![]() |
557ca620e4 | ||
![]() |
0b311834eb | ||
![]() |
7b5ca30917 | ||
![]() |
d3cca934ee | ||
![]() |
750203bde4 | ||
![]() |
0fcd74b836 | ||
![]() |
1b3a398ec1 | ||
![]() |
2e557de094 | ||
![]() |
4fd0add1cd | ||
![]() |
4ce87e33ee | ||
![]() |
86fe7e502b | ||
![]() |
b216427e73 | ||
![]() |
9730c9fb70 | ||
![]() |
7853c1cfe6 | ||
![]() |
c8644d1f63 | ||
![]() |
970c22f970 | ||
![]() |
479abdd32e | ||
![]() |
f1cc2a2c0c | ||
![]() |
99fb36797a | ||
![]() |
e9c7a86220 | ||
![]() |
fb7d7e0022 | ||
![]() |
8ef77547d0 | ||
![]() |
fa437e14a4 | ||
![]() |
61e71a8bc8 | ||
![]() |
71dd581127 | ||
![]() |
26b57832fe | ||
![]() |
884df3a51f | ||
![]() |
86b889485d | ||
![]() |
d784000a14 | ||
![]() |
2b604eada5 | ||
![]() |
018b9d421a | ||
![]() |
f9b7132175 | ||
![]() |
bbccbfe9d1 | ||
![]() |
2ad1df7327 | ||
![]() |
228f1ee9f2 | ||
![]() |
cf6c5c222d | ||
![]() |
aba5888f6b | ||
![]() |
397a634ebd | ||
![]() |
b14ebbcb17 | ||
![]() |
96c3b1a1bb | ||
![]() |
c8996bab1c | ||
![]() |
b359badd49 | ||
![]() |
6b8e5c0e8a | ||
![]() |
ce2d84b3bb | ||
![]() |
6f2419342f | ||
![]() |
d95cb3edc8 | ||
![]() |
99c2bad222 | ||
![]() |
069f63c893 | ||
![]() |
676f79f8d2 | ||
![]() |
cef28131f7 | ||
![]() |
02d2c0a08d | ||
![]() |
aec2e865f0 | ||
![]() |
56120ca04b | ||
![]() |
785d76d681 | ||
![]() |
9afd97022e | ||
![]() |
5409f32984 | ||
![]() |
733686e430 | ||
![]() |
557658776f | ||
![]() |
0627c48dde | ||
![]() |
7c00ba10da | ||
![]() |
e80d9d5902 | ||
![]() |
3529903afb | ||
![]() |
86981ac9f5 | ||
![]() |
bb6047cd64 | ||
![]() |
93e080cbaa | ||
![]() |
72703aa9f3 | ||
![]() |
c5399c827d | ||
![]() |
982a649aa5 | ||
![]() |
854049f962 | ||
![]() |
4bd860a001 | ||
![]() |
aa3e8dd3da | ||
![]() |
0beda1a388 | ||
![]() |
7eb7f7c32d | ||
![]() |
b486d1ce05 | ||
![]() |
29aa9a37cc | ||
![]() |
bc860548c2 | ||
![]() |
9cfa822fea | ||
![]() |
c1e8744177 | ||
![]() |
700843d69f | ||
![]() |
be1a505189 | ||
![]() |
2008c92513 | ||
![]() |
53e2e4c721 | ||
![]() |
dcc01123f2 | ||
![]() |
1450712e76 | ||
![]() |
bfdef6301c | ||
![]() |
33be9e29be | ||
![]() |
8ed2420dbb | ||
![]() |
409265a571 | ||
![]() |
885119bf50 | ||
![]() |
85070e46cc | ||
![]() |
9ce5e89fcc | ||
![]() |
2e2f981bcc | ||
![]() |
8cc7e74a8f | ||
![]() |
5b437c7637 | ||
![]() |
84d752d1ad | ||
![]() |
10cbc33a4c | ||
![]() |
d62706ec6d | ||
![]() |
4c3cfc7558 | ||
![]() |
ac5eb7fdfb | ||
![]() |
52655b4c90 | ||
![]() |
07e0957e1f | ||
![]() |
7d1f2ac769 | ||
![]() |
416cd9ac11 | ||
![]() |
804e462305 | ||
![]() |
34cb17b930 | ||
![]() |
64291e989e | ||
![]() |
c5b225c8ca | ||
![]() |
831312febe | ||
![]() |
cb13fad733 | ||
![]() |
9406ab91a2 | ||
![]() |
2933698677 | ||
![]() |
cf510ad781 | ||
![]() |
140ca2dcc2 | ||
![]() |
a08decdfed | ||
![]() |
fba9f41b84 | ||
![]() |
54fc885efd | ||
![]() |
013d5c18c3 | ||
![]() |
b77ff4d589 | ||
![]() |
36f7b399de | ||
![]() |
c068284882 | ||
![]() |
e05f801271 | ||
![]() |
e04ccbd506 | ||
![]() |
1342a96ecf | ||
![]() |
4bc47bec57 | ||
![]() |
e126ec4fc4 | ||
![]() |
46ae340f24 | ||
![]() |
6cc79dc79d | ||
![]() |
62a6230e1c | ||
![]() |
43da5b2066 | ||
![]() |
591d5ca41b | ||
![]() |
4be80d5109 | ||
![]() |
23e70e1cc6 | ||
![]() |
800094802e | ||
![]() |
9669794e7a | ||
![]() |
30892709d7 | ||
![]() |
a3fead9706 | ||
![]() |
201d0df50b | ||
![]() |
9f10e45e42 | ||
![]() |
a607f8a20c | ||
![]() |
ed77fdf389 | ||
![]() |
08f9c90981 | ||
![]() |
532efa9ce9 | ||
![]() |
a4b7f716d3 | ||
![]() |
2e16100609 | ||
![]() |
d54b551f6c | ||
![]() |
2e05db347e | ||
![]() |
cca12abf6e | ||
![]() |
18e53fa91a | ||
![]() |
8c58dea899 | ||
![]() |
9dfbcef272 | ||
![]() |
7faaca7118 | ||
![]() |
5f3824a5aa | ||
![]() |
1ae06e002d | ||
![]() |
8bdecd3617 | ||
![]() |
c4a7eedc16 | ||
![]() |
2ee3c63b13 | ||
![]() |
7b7f0da4a7 | ||
![]() |
676d62fa0e | ||
![]() |
f64dbb08c2 | ||
![]() |
dd469eec40 | ||
![]() |
17d27805f9 | ||
![]() |
767aaf587c | ||
![]() |
10286f45e7 | ||
![]() |
7bdfdd09e4 | ||
![]() |
a5ad43afe8 | ||
![]() |
fe0f8967bf | ||
![]() |
bfc63bfb19 | ||
![]() |
95c7cfb025 | ||
![]() |
2fbf23875f | ||
![]() |
48d19acb7c | ||
![]() |
9dbbba9976 | ||
![]() |
18e1a3022d | ||
![]() |
5d427004c6 | ||
![]() |
0106575728 | ||
![]() |
f0d860d35f | ||
![]() |
520dc64369 | ||
![]() |
8145f92dcc | ||
![]() |
40ee1ba0dc | ||
![]() |
474442dd56 | ||
![]() |
79931c5aeb | ||
![]() |
dc867bbf3a | ||
![]() |
71d66f3678 | ||
![]() |
ba82e1ef54 | ||
![]() |
612ecf934f | ||
![]() |
66e60c6553 | ||
![]() |
e7bcfb368c | ||
![]() |
eda919f4dc | ||
![]() |
7599143dcc | ||
![]() |
f28c856e33 | ||
![]() |
b7daa665ba | ||
![]() |
dcad09e125 | ||
![]() |
338b641370 | ||
![]() |
0a925d7834 | ||
![]() |
70100d5509 | ||
![]() |
e2828af607 | ||
![]() |
b5c496f109 | ||
![]() |
9f59fb6d33 | ||
![]() |
cfe4252744 | ||
![]() |
500d2db302 | ||
![]() |
6d45f952e6 | ||
![]() |
3aa0e57ce6 | ||
![]() |
a10976b961 | ||
![]() |
93859e2c9a | ||
![]() |
2d2a62e3d9 | ||
![]() |
f0d3be29f2 | ||
![]() |
21fa0d86b1 | ||
![]() |
3d6b865654 | ||
![]() |
1033acd92d | ||
![]() |
36bf141333 | ||
![]() |
49559c04f6 | ||
![]() |
68542e72a9 | ||
![]() |
3aa51450c4 | ||
![]() |
8a2dda312c | ||
![]() |
e5a4d1d9e5 | ||
![]() |
14de67fc77 | ||
![]() |
783c7f97ba | ||
![]() |
f4af38120a | ||
![]() |
259f4f3d01 | ||
![]() |
f697d7fdd5 | ||
![]() |
6f8d8131b1 | ||
![]() |
7e6d51a73c | ||
![]() |
25264131e2 | ||
![]() |
d7bfce3951 | ||
![]() |
3cfe3bc001 | ||
![]() |
92e7e346f3 | ||
![]() |
e8cea8d70f | ||
![]() |
efe4bab29b | ||
![]() |
54c8728cd7 | ||
![]() |
08f10fcd02 | ||
![]() |
5babaf7491 | ||
![]() |
d62cb0f5d0 | ||
![]() |
1c05b9359d | ||
![]() |
ad63f8a53c | ||
![]() |
f4781fc3cb | ||
![]() |
f222778489 | ||
![]() |
303bfc1024 | ||
![]() |
b387560692 | ||
![]() |
d997c8b2f6 | ||
![]() |
445aab4b73 | ||
![]() |
c3df44389b | ||
![]() |
5e873952b0 | ||
![]() |
98dcde4ec3 | ||
![]() |
34f7a3a229 | ||
![]() |
13989be71b | ||
![]() |
777c6e3c94 | ||
![]() |
0a33c971aa | ||
![]() |
dda59c5db5 | ||
![]() |
e819c3a4ca | ||
![]() |
fb24990211 | ||
![]() |
0320f6930d | ||
![]() |
1b8977ff7c | ||
![]() |
721fbf63f4 | ||
![]() |
a14ccfffb8 | ||
![]() |
15c4d51d39 | ||
![]() |
5565d0ab07 | ||
![]() |
8cb0101449 | ||
![]() |
aebfd4cfbf | ||
![]() |
b2bb51f339 | ||
![]() |
c5d25b22e4 | ||
![]() |
d71ea7c01e | ||
![]() |
ab4b49262a | ||
![]() |
850346cbaf | ||
![]() |
9029297dcb | ||
![]() |
80c5ae1d0e | ||
![]() |
e7497c0c99 | ||
![]() |
a419802c71 | ||
![]() |
2b535b3947 | ||
![]() |
7ba8e0bd01 | ||
![]() |
49ae8f8144 | ||
![]() |
4bef109689 | ||
![]() |
f6c6ee5663 | ||
![]() |
e7da67f5d3 | ||
![]() |
569288b3bf | ||
![]() |
b6821dbb91 | ||
![]() |
b04eef1318 | ||
![]() |
9bc2582c31 | ||
![]() |
f0b4bc12f8 | ||
![]() |
14b4707d9a | ||
![]() |
beb478a24b | ||
![]() |
795885f454 | ||
![]() |
7d9c1ebd66 | ||
![]() |
3af962a993 | ||
![]() |
211ca5ff77 | ||
![]() |
befbc8f56b | ||
![]() |
a9db36d1fd | ||
![]() |
acd90fcdc6 | ||
![]() |
f29b88c246 | ||
![]() |
006556713e | ||
![]() |
b274dedf1b | ||
![]() |
89cc9988c9 | ||
![]() |
697aa67d18 | ||
![]() |
e62e77426f | ||
![]() |
e102478b3d | ||
![]() |
79a97a9d36 | ||
![]() |
32913182dc | ||
![]() |
f3fc3d021d | ||
![]() |
f7e24683c4 | ||
![]() |
276741af4d | ||
![]() |
3f430c9c3a | ||
![]() |
07048941a4 | ||
![]() |
b5ed5843a4 | ||
![]() |
357a15a649 | ||
![]() |
e42e3a4fac | ||
![]() |
2e121fda35 | ||
![]() |
085081fc6e | ||
![]() |
b790bdf46b | ||
![]() |
76b2f53707 | ||
![]() |
95765567d0 | ||
![]() |
ad88a4bbba | ||
![]() |
0811742488 | ||
![]() |
7be56906d6 | ||
![]() |
a9c0cd4ab3 | ||
![]() |
07ac29a058 | ||
![]() |
64814739d5 | ||
![]() |
c1c16bea94 | ||
![]() |
d91d21f05b | ||
![]() |
c2c6805797 | ||
![]() |
9c613ade7a | ||
![]() |
382cee0a77 | ||
![]() |
980f2b7078 | ||
![]() |
3b738a16eb | ||
![]() |
9c5f851ec9 | ||
![]() |
3fe5b462f7 | ||
![]() |
28ff8babad | ||
![]() |
f9f212fb93 | ||
![]() |
df97ab3e5f | ||
![]() |
c18329cef6 | ||
![]() |
0fd714d2c3 | ||
![]() |
bd87aec5a7 | ||
![]() |
3ca560439c | ||
![]() |
897ef500e5 | ||
![]() |
ec783dc142 | ||
![]() |
2b04257491 | ||
![]() |
e9bbe425d4 | ||
![]() |
019c95f566 | ||
![]() |
40be9a1c1d | ||
![]() |
bf769d09ec | ||
![]() |
fb6e8a5aa4 | ||
![]() |
0eb3d15ccb | ||
![]() |
1752e9c088 | ||
![]() |
65db980106 | ||
![]() |
8e34d3f9ef | ||
![]() |
5b73f35761 | ||
![]() |
ede9884c59 | ||
![]() |
226e614378 | ||
![]() |
4b7d499e64 | ||
![]() |
2be6941f42 | ||
![]() |
c4f240de14 | ||
![]() |
e116d0a625 | ||
![]() |
9f5744a72f | ||
![]() |
e36115d688 | ||
![]() |
4cb7aa067c | ||
![]() |
4111032511 | ||
![]() |
50313059fc | ||
![]() |
1de0823953 | ||
![]() |
9069794e5e | ||
![]() |
7b82b07fba | ||
![]() |
c857bb68ec | ||
![]() |
005f2adaaa | ||
![]() |
0aecdf6828 | ||
![]() |
8ed66f98a9 | ||
![]() |
8478b4035e | ||
![]() |
2a2bb78cce | ||
![]() |
18b82345dc | ||
![]() |
d938d5e6f8 | ||
![]() |
fa9f5ed982 | ||
![]() |
72147c62f7 | ||
![]() |
7a91296f1d | ||
![]() |
c927c92086 | ||
![]() |
d4ea51734e | ||
![]() |
2ae142e663 | ||
![]() |
3621045631 | ||
![]() |
e64bc7cde6 | ||
![]() |
473322ec66 | ||
![]() |
89e543f383 | ||
![]() |
628290b5e6 | ||
![]() |
c2d5f2ef98 | ||
![]() |
9d64ab7d5a | ||
![]() |
357ff4d1dc | ||
![]() |
265b9a2e49 | ||
![]() |
ec8330b21d | ||
![]() |
8fdf832e5f | ||
![]() |
476499c75c | ||
![]() |
aec7c5a87c | ||
![]() |
b55502cdae | ||
![]() |
87a3a924ce | ||
![]() |
c6c22aeb44 | ||
![]() |
4f3ba55ed1 | ||
![]() |
734fdb0842 | ||
![]() |
6637b237e6 | ||
![]() |
bf7023d165 | ||
![]() |
b546c7c926 | ||
![]() |
199b3e46f9 | ||
![]() |
558814e16d | ||
![]() |
a3154295c5 | ||
![]() |
2257deb502 | ||
![]() |
fc61870a1c | ||
![]() |
cb2438ae52 | ||
![]() |
51f6702fe1 | ||
![]() |
93b268ade0 | ||
![]() |
9e37a7f9a5 | ||
![]() |
548811cb19 | ||
![]() |
b74205d022 | ||
![]() |
eb1e3a3985 | ||
![]() |
87c8e00b7a | ||
![]() |
b90f6e87cf | ||
![]() |
987a4a7367 | ||
![]() |
e0d269c0d8 | ||
![]() |
e644866caf | ||
![]() |
93e450793c | ||
![]() |
d1b56d0043 | ||
![]() |
6352df87b1 | ||
![]() |
dddb2aab8d | ||
![]() |
b7d3338df2 | ||
![]() |
061cea1cf3 | ||
![]() |
4bc31df3e4 | ||
![]() |
330346d51c | ||
![]() |
8128db9ec1 | ||
![]() |
55678c6951 | ||
![]() |
793ac8035c | ||
![]() |
c2791caf53 | ||
![]() |
d94717e099 | ||
![]() |
a60825fa96 | ||
![]() |
3aa899929d | ||
![]() |
b0bfae1963 | ||
![]() |
b9a34e818e | ||
![]() |
d57f7d586b | ||
![]() |
fa7d04fed4 | ||
![]() |
b1c4c39c58 | ||
![]() |
b85c625d83 | ||
![]() |
0d357155cc | ||
![]() |
ea6c5f03a5 | ||
![]() |
a9beeeeeea | ||
![]() |
a8ec986981 | ||
![]() |
69ce8a72f5 | ||
![]() |
ee0958cb4d | ||
![]() |
0e1590b3dd | ||
![]() |
53cbea2231 | ||
![]() |
46d71e7fd2 | ||
![]() |
b10a838a7a | ||
![]() |
9ee8efc63b | ||
![]() |
d9762a7cdb | ||
![]() |
3ef73d9a88 | ||
![]() |
7b85b332cb | ||
![]() |
9d49e4706e | ||
![]() |
17932a8f7b | ||
![]() |
841c9884b2 | ||
![]() |
30fc601e6c | ||
![]() |
d1638fe08b | ||
![]() |
fb4726d571 | ||
![]() |
d57d041d67 | ||
![]() |
4c2e40a488 | ||
![]() |
7494f0f498 | ||
![]() |
4da70dea28 | ||
![]() |
8250f93d41 | ||
![]() |
7d9bef9286 | ||
![]() |
1d2ffb4712 | ||
![]() |
88e925f3f5 | ||
![]() |
bd3df5ec6d | ||
![]() |
06b27ea24c | ||
![]() |
1b314a85db | ||
![]() |
8ee182288a | ||
![]() |
006b61eb0b | ||
![]() |
82b8b6865c | ||
![]() |
748644b72d | ||
![]() |
110cf8bc9e | ||
![]() |
376f3c10de | ||
![]() |
ae975713c2 | ||
![]() |
ca2c12d353 | ||
![]() |
785395b07e | ||
![]() |
df0a480058 | ||
![]() |
e3be3e69c0 | ||
![]() |
9c89133a1f | ||
![]() |
f213c0db09 | ||
![]() |
202aa9f775 | ||
![]() |
9636fc2588 | ||
![]() |
a76825a5ef | ||
![]() |
8a75dbeb23 | ||
![]() |
1ccfabb66d | ||
![]() |
40bcd5447c | ||
![]() |
4455f1f599 | ||
![]() |
9e6c3638e6 | ||
![]() |
fa50d9d96d | ||
![]() |
38ced24ad1 | ||
![]() |
921a0c22a6 | ||
![]() |
af45542cfe | ||
![]() |
55f8b03948 | ||
![]() |
55d6cba5e1 | ||
![]() |
3963adca3d | ||
![]() |
6beb0eeea1 | ||
![]() |
8acbb074f8 | ||
![]() |
be83356e5e | ||
![]() |
797d56cbd8 | ||
![]() |
9ee502ac6b | ||
![]() |
ed285ae5c9 | ||
![]() |
436a841354 | ||
![]() |
4a6fa4c204 | ||
![]() |
c25cd9094b | ||
![]() |
21db158722 | ||
![]() |
e40197315d | ||
![]() |
fd1ce3856a | ||
![]() |
c6ee182bd4 | ||
![]() |
4989695ec3 | ||
![]() |
0b48d1c821 | ||
![]() |
9e50d8f8bc | ||
![]() |
a6c48c8be7 | ||
![]() |
3c8c873252 | ||
![]() |
4901ec2324 | ||
![]() |
e608324f9f | ||
![]() |
0c14b31df4 | ||
![]() |
0426670f0a | ||
![]() |
cacdc27f52 | ||
![]() |
09b5a99816 | ||
![]() |
4c134bcfce | ||
![]() |
2434a4e88d | ||
![]() |
c9a981778d | ||
![]() |
367b784738 | ||
![]() |
7bff23b166 | ||
![]() |
accbbd7dc3 | ||
![]() |
889de6b285 | ||
![]() |
1d30f40950 | ||
![]() |
1cd5008bba | ||
![]() |
da933ee29d | ||
![]() |
d4a4a42cb3 | ||
![]() |
11bb05ba48 | ||
![]() |
0072422576 | ||
![]() |
dfd821c738 | ||
![]() |
ee40b6882d | ||
![]() |
36a7638073 | ||
![]() |
2603618831 | ||
![]() |
b17b4b4a4a | ||
![]() |
f646e9075f | ||
![]() |
ba8795083f | ||
![]() |
06de7d6936 | ||
![]() |
febcfab23d | ||
![]() |
1269df2e3b | ||
![]() |
dda86f386d | ||
![]() |
7320e53d9e | ||
![]() |
118977f19d | ||
![]() |
88c17d5587 | ||
![]() |
73a1a639a7 | ||
![]() |
8f4da2965e | ||
![]() |
14aa8f0c11 | ||
![]() |
898808fa8c | ||
![]() |
a20da5523e | ||
![]() |
5be48639b1 | ||
![]() |
1a073a20db | ||
![]() |
63a0bd4270 | ||
![]() |
98633c2a19 | ||
![]() |
bdfc75e751 | ||
![]() |
da23624b57 | ||
![]() |
30f2d0c0b3 | ||
![]() |
f854130b7b | ||
![]() |
2f2d84033b | ||
![]() |
b1341b3068 | ||
![]() |
23d52ca4a7 | ||
![]() |
437b9ba46f | ||
![]() |
f6e15d25a3 | ||
![]() |
75be5a6681 | ||
![]() |
c4410c85ab | ||
![]() |
97f6049bc2 | ||
![]() |
29240cb5c1 | ||
![]() |
7679cb3fa8 | ||
![]() |
0574196acb | ||
![]() |
14b3a2e4c3 | ||
![]() |
5663272435 | ||
![]() |
03f368d94c | ||
![]() |
96034c4a51 | ||
![]() |
078d1fbf2b | ||
![]() |
9eba83c156 | ||
![]() |
0187c9e11d | ||
![]() |
472d1d8e05 | ||
![]() |
629f52843f | ||
![]() |
c126bac153 | ||
![]() |
cff0757c31 | ||
![]() |
b5c56190b2 | ||
![]() |
4b491c675f | ||
![]() |
3ec253532e | ||
![]() |
215f932e49 | ||
![]() |
076c0ab683 | ||
![]() |
57b53918d1 | ||
![]() |
fc5a5a4f07 | ||
![]() |
01368d395c | ||
![]() |
cb1f18661a | ||
![]() |
97d2e4bd75 | ||
![]() |
33a95659e2 | ||
![]() |
35b078b29a | ||
![]() |
2384c11ff1 | ||
![]() |
4c4a188a22 | ||
![]() |
cd6ecf6a89 | ||
![]() |
d804ff0d6b | ||
![]() |
343befa44b | ||
![]() |
72945b856e | ||
![]() |
d01e30431c | ||
![]() |
ff5dcb8df2 | ||
![]() |
f187372f0a | ||
![]() |
1b69122810 | ||
![]() |
e9b4a96975 | ||
![]() |
37f0e8a32c | ||
![]() |
b91e97eabd | ||
![]() |
cda4aaba4d | ||
![]() |
ea864fb24d | ||
![]() |
5908ce5115 | ||
![]() |
159c3aafd8 | ||
![]() |
df739784e5 | ||
![]() |
03d34b683d | ||
![]() |
dc61480c54 | ||
![]() |
f05e1a991a | ||
![]() |
7ceada43af | ||
![]() |
26393a97b2 | ||
![]() |
7d2f61f66a | ||
![]() |
40e13829af | ||
![]() |
f719a97e12 | ||
![]() |
6c6983f477 | ||
![]() |
c399f6eeb2 | ||
![]() |
f8a8ed73fe | ||
![]() |
f8af8606a5 | ||
![]() |
524833e155 | ||
![]() |
5b37db44a3 | ||
![]() |
0e452a02f1 | ||
![]() |
ea6d371e7c | ||
![]() |
7efff86639 | ||
![]() |
67920e1516 | ||
![]() |
4d4dd7aea0 | ||
![]() |
cac1dd58a8 | ||
![]() |
595f5f0e43 | ||
![]() |
e4f6adb023 | ||
![]() |
8da2124060 | ||
![]() |
b9f6ca1d32 | ||
![]() |
05e81222d4 | ||
![]() |
7bb4c8cadb | ||
![]() |
f8f2188888 | ||
![]() |
0c23ec232b | ||
![]() |
a439e438f3 | ||
![]() |
028a408d57 | ||
![]() |
3d5be801b9 | ||
![]() |
1aa6418af9 | ||
![]() |
524bb823c9 | ||
![]() |
2c1db913f7 | ||
![]() |
01a0168806 | ||
![]() |
0e811d8c59 | ||
![]() |
df52f3500c | ||
![]() |
f0369223cd | ||
![]() |
16cb818a74 | ||
![]() |
8dfd22089c | ||
![]() |
37faf55e17 | ||
![]() |
30b093f6fc | ||
![]() |
f3bd3deddd | ||
![]() |
6543f6e36c | ||
![]() |
2fab0d45a9 | ||
![]() |
dc7a598126 | ||
![]() |
5828e886e6 | ||
![]() |
c56aa6f121 | ||
![]() |
e1b13eba75 | ||
![]() |
aae4e4bf70 | ||
![]() |
9c1cf96664 | ||
![]() |
821d4a1e55 | ||
![]() |
4e11bd156e | ||
![]() |
64010d603c | ||
![]() |
c31dec7f98 | ||
![]() |
5b22c47ca9 | ||
![]() |
8efc11a0c1 | ||
![]() |
2cd0c2d244 | ||
![]() |
05a887ebfa | ||
![]() |
81cd24adb8 | ||
![]() |
713f96ee0c | ||
![]() |
cc52d776dd | ||
![]() |
a8206adcad | ||
![]() |
3cad5ab77a | ||
![]() |
eed1c63c70 | ||
![]() |
e38ba43014 | ||
![]() |
46750c39bd | ||
![]() |
5128672731 | ||
![]() |
eda12bcff8 | ||
![]() |
a4cece3d47 | ||
![]() |
d242839af8 | ||
![]() |
6f8046f7a4 | ||
![]() |
c6e7cbb94e | ||
![]() |
12bf451ca4 | ||
![]() |
af46c96d65 | ||
![]() |
2856027e59 | ||
![]() |
fb93fa9216 | ||
![]() |
da172b0dde | ||
![]() |
6ffc113ceb | ||
![]() |
1abc42b26c | ||
![]() |
d19dfa974c | ||
![]() |
3de576efda | ||
![]() |
6bc76194e8 | ||
![]() |
f78ae415d2 | ||
![]() |
59431c242b | ||
![]() |
9ad282b1ae | ||
![]() |
223612afa2 | ||
![]() |
9008f3d564 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -45,5 +45,4 @@ CHANGES.dist
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
/[0-9]*.patch
|
||||
.dirstamp
|
||||
|
62
CHANGES.0
62
CHANGES.0
@@ -267,7 +267,7 @@ Daniel Stenberg (16 Apr 2010)
|
||||
Daniel Stenberg (15 Apr 2010)
|
||||
- Rainer Canavan filed bug report #2987196 that identified libcurl doing
|
||||
unnecesary reverse name lookups in many cases when built to use IPv4 and
|
||||
getaddrinfo(). The logic for ipv6 is now used for ipv4 too.
|
||||
getaddrinfo(). The logic for IPv6 is now used for IPv4 too.
|
||||
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2963679)
|
||||
|
||||
@@ -4271,7 +4271,7 @@ Daniel S (15 Nov 2007)
|
||||
list.
|
||||
|
||||
- Michal Marek fixed the test suite to better deal with the case when the HTTP
|
||||
ipv6 server can't run.
|
||||
IPv6 server can't run.
|
||||
|
||||
Yang Tse (14 Nov 2007)
|
||||
- Fix a variable potential wrapping in add_buffer() when using absolutely
|
||||
@@ -6109,7 +6109,7 @@ Daniel (22 August 2006)
|
||||
- David McCreedy fixed a remaining mistake from the August 19 TYPE change.
|
||||
|
||||
- Peter Sylvester pointed out a flaw in the AllowServerConnect() in the FTP
|
||||
code when doing pure ipv6 EPRT connections.
|
||||
code when doing pure IPv6 EPRT connections.
|
||||
|
||||
Daniel (19 August 2006)
|
||||
- Based on a patch by Armel Asselin, the FTP code no longer re-issues the TYPE
|
||||
@@ -6666,8 +6666,8 @@ Daniel (24 January 2006)
|
||||
|
||||
Daniel (20 January 2006)
|
||||
- Duane Cathey was one of our friends who reported that curl -P [IP]
|
||||
(CURLOPT_FTPPORT) didn't work for ipv6-enabed curls if the IP wasn't a
|
||||
"native" IP while it works fine for ipv6-disabled builds!
|
||||
(CURLOPT_FTPPORT) didn't work for IPv6-enabed curls if the IP wasn't a
|
||||
"native" IP while it works fine for IPv6-disabled builds!
|
||||
|
||||
In the process of fixing this, I removed the support for LPRT since I can't
|
||||
think of many reasons to keep doing it and asking on the mailing list didn't
|
||||
@@ -6676,7 +6676,7 @@ Daniel (20 January 2006)
|
||||
|
||||
Daniel (19 January 2006)
|
||||
- Jon Turner pointed out that doing -P [hostname] (CURLOPT_FTPPORT) with curl
|
||||
(built ipv4-only) didn't work.
|
||||
(built IPv4-only) didn't work.
|
||||
|
||||
Daniel (18 January 2006)
|
||||
- As reported in bug #1408742 (http://curl.haxx.se/bug/view.cgi?id=1408742),
|
||||
@@ -7557,7 +7557,7 @@ Daniel (29 March 2005)
|
||||
Daniel (16 March 2005)
|
||||
- Tru64 and some IRIX boxes seem to not like test 237 as it is. Their
|
||||
inet_addr() functions seems to use &255 on all numericals in a ipv4 dotted
|
||||
address which makes a different failure... Now I've modified the ipv4
|
||||
address which makes a different failure... Now I've modified the IPv4
|
||||
resolve code to use inet_pton() instead in an attempt to make these systems
|
||||
better detect this as a bad IP address rather than creating a toally bogus
|
||||
address that is then passed on and used.
|
||||
@@ -7750,7 +7750,7 @@ Daniel (7 February 2005)
|
||||
|
||||
Daniel (5 February 2005)
|
||||
- Eric Vergnaud found a use of an uninitialised variable in the ftp when doing
|
||||
PORT on ipv6-enabled hosts.
|
||||
PORT on IPv6-enabled hosts.
|
||||
|
||||
- David Byron pointed out we could use BUFSIZE to read data (in
|
||||
lib/transfer.c) instead of using BUFSIZE -1.
|
||||
@@ -7822,7 +7822,7 @@ Daniel (28 January 2005)
|
||||
8. fetch a URL from the same server as before (re-using the connection)
|
||||
|
||||
- Stephen More pointed out that CURLOPT_FTPPORT and the -P option didn't work
|
||||
when built ipv6-enabled. I've now made a fix for it. Writing test cases for
|
||||
when built IPv6-enabled. I've now made a fix for it. Writing test cases for
|
||||
custom port hosts turned too tricky so unfortunately there's none.
|
||||
|
||||
Daniel (25 January 2005)
|
||||
@@ -8560,9 +8560,9 @@ Daniel (20 August 2004)
|
||||
byte file is downloaded.
|
||||
|
||||
Daniel (18 August 2004)
|
||||
- Ling Thio pointed out that when libcurl is built ipv6-enabled, it still did
|
||||
- Ling Thio pointed out that when libcurl is built IPv6-enabled, it still did
|
||||
reverse DNS lookups when fed with a numerical IP-address (like
|
||||
http://127.0.0.1/), although it doesn't when built ipv6-disabled. libcurl
|
||||
http://127.0.0.1/), although it doesn't when built IPv6-disabled. libcurl
|
||||
should never do reverse lookups.
|
||||
|
||||
Daniel (17 August 2004)
|
||||
@@ -8714,7 +8714,7 @@ Daniel (27 June 2004)
|
||||
Daniel (24 June 2004)
|
||||
- The standard curl_version() string now only includes version info about
|
||||
involved libraries and not about particular features. Thus it will no longer
|
||||
include info about ipv6 nor GSS. That info is of course still available in
|
||||
include info about IPv6 nor GSS. That info is of course still available in
|
||||
the feature bitmask curl_version_info() offers.
|
||||
|
||||
- Replaced all occurances of sprintf() with snprintf(). This is mostly because
|
||||
@@ -8729,8 +8729,8 @@ Daniel (24 June 2004)
|
||||
|
||||
Internally, this means amongst other things that we can stop doing the weird
|
||||
"increase buffer size until it works" trick when resolving hosts on
|
||||
ipv4-only with gethostbyname_r(), we support socks even on libcurls built
|
||||
with ipv6 enabled (but only to socks servers that resolve to an ipv4
|
||||
IPv4-only with gethostbyname_r(), we support socks even on libcurls built
|
||||
with IPv6 enabled (but only to socks servers that resolve to an IPv4
|
||||
address) and we no longer deep-copy or relocate hostent structs (we create
|
||||
Curl_addrinfo chains instead).
|
||||
|
||||
@@ -9074,7 +9074,7 @@ Daniel (27 April 2004)
|
||||
and proxy name to the ACE encoded version to use internally for resolves and
|
||||
cookies etc. They are now using one 'struct hostname' each that keep both
|
||||
the original name and the possibly encoded name. IDN resolves work for me
|
||||
now using ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to
|
||||
now using IPv6, IPv4 and ares resolving. Even cookies on IDN sites seem to
|
||||
do right. I got some failures at first when CHARSET wasn't set at all which
|
||||
confused libidn completely and it decided by encoding of choice was
|
||||
'ANSI_X3.4-1968'...
|
||||
@@ -9115,7 +9115,7 @@ Daniel (25 April 2004)
|
||||
|
||||
CURLRES_ARES - is defined if libcurl is built to use c-ares for asynchronous
|
||||
name resolves. It cannot have ENABLE_IPV6 defined at the same time, as
|
||||
c-ares has no ipv6 support. This can be Windows or *nix.
|
||||
c-ares has no IPv6 support. This can be Windows or *nix.
|
||||
|
||||
CURLRES_THREADED - is defined if libcurl is built to run under (native)
|
||||
Windows, and then the name resolve will be done in a new thread, and the
|
||||
@@ -9132,8 +9132,8 @@ Daniel (25 April 2004)
|
||||
hostsyn.c - functions for synchronous name resolves
|
||||
hostares.c - functions for ares-using name resolves
|
||||
hostthre.c - functions for threaded name resolves
|
||||
hostip4.c - ipv4-specific functions
|
||||
hostip6.c - ipv6-specific functions
|
||||
hostip4.c - IPv4 specific functions
|
||||
hostip6.c - IPv6 specific functions
|
||||
|
||||
The hostip.h is the single united header file for all this. It defines the
|
||||
CURLRES_* defines based on the config*.h and setup.h defines.
|
||||
@@ -9225,7 +9225,7 @@ Daniel (15 April 2004)
|
||||
for the typical (not very deep) case.
|
||||
|
||||
Daniel (14 April 2004)
|
||||
- Asking for CURL_IPRESOLVE_V6 when ipv6 addresses can't be resolved will
|
||||
- Asking for CURL_IPRESOLVE_V6 when IPv6 addresses can't be resolved will
|
||||
now cause the resolve function to return NULL immediately. This flaw was
|
||||
pointed out by Gisle Vanem.
|
||||
|
||||
@@ -9380,7 +9380,7 @@ Daniel (29 March 2004)
|
||||
- The postit2.c source example used the wrong struct name for the post data.
|
||||
|
||||
Daniel (26 March 2004)
|
||||
- Gisle Vanem improved ipv6 support on windows by making the curl build to use
|
||||
- Gisle Vanem improved IPv6 support on Windows by making the curl build use
|
||||
the correct getaddrinfo() function.
|
||||
|
||||
Daniel (25 March 2004)
|
||||
@@ -9673,7 +9673,7 @@ Daniel (16 February 2004)
|
||||
and re-use that same handle during the entire curl handle's life-time. It
|
||||
improves performance.
|
||||
|
||||
- Fixed a problem when displaying verbose for ipv6-enabled libcurls and
|
||||
- Fixed a problem when displaying verbose for IPv6-enabled libcurls and
|
||||
re-used connections. Problem reported and fix verified by Grigory Entin.
|
||||
|
||||
- Jeff Lawson fixed the version-check in the SOCKS5 code.
|
||||
@@ -9725,7 +9725,7 @@ Daniel (9 February 2004)
|
||||
|
||||
- Tor Arntsen provided a patch that makes libcurl work-around a bug in the
|
||||
AIX5 implementation of getaddrinfo(). This makes the FTP PORT stuff work on
|
||||
ipv6-enabled AIX builds.
|
||||
IPv6-enabled AIX builds.
|
||||
|
||||
- Ken Rastatter provided portability fixes for the curlgtk.c example, and now
|
||||
it runs on windows with GTK as well!
|
||||
@@ -9754,7 +9754,7 @@ Daniel (5 February 2004)
|
||||
verifies this functionality.
|
||||
|
||||
- Tor Arntsen fixed a weird getaddrinfo() usage in the FTP code, preventing
|
||||
the ipv6-code for PORT work on AIX 5.2. We now also provide (better) error
|
||||
the IPv6-code for PORT work on AIX 5.2. We now also provide (better) error
|
||||
messages when bailing out in the that function.
|
||||
|
||||
- Tor Arntsen now provides AIX and IRIX (using gcc, xlc and the MIPSPro
|
||||
@@ -10133,10 +10133,10 @@ Daniel (13 November)
|
||||
possibly other platforms too.
|
||||
|
||||
- Peter Sylvester identified a problem in the connect code, which made the
|
||||
multi interface on a ipv6-enabled solaris box do bad. Test case 504 to be
|
||||
multi interface on a IPv6-enabled Solaris box do bad. Test case 504 to be
|
||||
specific. I've spent some time to clean-up the Curl_connecthost() function
|
||||
now to use less duplicated code for the two different sections: ipv6 and
|
||||
ipv4.
|
||||
now to use less duplicated code for the two different sections: IPv6 and
|
||||
IPv4.
|
||||
|
||||
Daniel (11 November)
|
||||
- Added CURLOPT_NETRC_FILE. Use this to tell libcurl which file to use instead
|
||||
@@ -10234,7 +10234,7 @@ Daniel (29 October)
|
||||
Daniel (28 October)
|
||||
- Dan C tracked down yet another weird behavior in the glibc gethostbyname_r()
|
||||
function for some specific versions (reported on 2.2.5 and 2.1.1), and
|
||||
provided a fix. On Linux machines with these glibc versions, non-ipv6
|
||||
provided a fix. On Linux machines with these glibc versions, non-IPv6
|
||||
builds of libcurl would often fail to resolve perfectly resolvable host
|
||||
names.
|
||||
|
||||
@@ -10353,7 +10353,7 @@ Version 7.10.8-pre3 (8 October 2003)
|
||||
|
||||
Daniel (8 October)
|
||||
- Frank Ticheler provided a patch that fixes how libcurl connects to multiple
|
||||
addresses, if one of them fails (ipv4-code).
|
||||
addresses, if one of them fails (IPv4 code).
|
||||
|
||||
Daniel (7 October)
|
||||
- Neil Dunbar provided a patch that now makes libcurl check SSL
|
||||
@@ -11865,7 +11865,7 @@ Daniel (30 Sep 2002)
|
||||
updated the man page accordingly.
|
||||
|
||||
- Cris Bailiff found out that the pre-releases crashed on name lookups on
|
||||
names such as "a:" or "baz:" (on Linux versions not being ipv6-enabled) due
|
||||
names such as "a:" or "baz:" (on Linux versions not being IPv6-enabled) due
|
||||
to some weird return codes from gethostbyname_r(). I'll blame the complete
|
||||
lack of docs in that department. Cris provided a fix, which I modified only
|
||||
slightly.
|
||||
@@ -17598,7 +17598,7 @@ Version 4.8.4
|
||||
- As Julian Romero Nieto reported, curl reported wrong version number.
|
||||
- As Teemu Yli-Elsila pointed out, the win32 version of 4.8 (and probably all
|
||||
other versions for win32) didn't work with binary files since I'm too used
|
||||
to the UNIX style fopen() where binary and text don't differ...
|
||||
to the Unix style fopen() where binary and text don't differ...
|
||||
- Ralph Beckmann brought me some changes that lets curl compile error and
|
||||
warning free with -Wall -pedantic with g++. I also took the opportunity to
|
||||
clean off some unused variables and similar.
|
||||
@@ -17851,7 +17851,7 @@ Version 2.7
|
||||
rewrite the former -l kludge in an external script that'll use urlget to
|
||||
fetch multipart files like that.
|
||||
- '-f' is introduced, it means Fail without output in case of HTTP server
|
||||
errors (return code >=300).
|
||||
errors (return code >=400).
|
||||
- Added support for -r, ranges. Specify which part of a document you
|
||||
want, and only that part is returned. Only with HTTP/1.1-servers.
|
||||
- Split up the source in 3 parts. Now all pure URL functions are in
|
||||
|
@@ -1,75 +0,0 @@
|
||||
# - Check if the source code provided in the SOURCE argument compiles.
|
||||
# CURL_CHECK_C_SOURCE_COMPILES(SOURCE VAR)
|
||||
# - macro which checks if the source code compiles
|
||||
# SOURCE - source code to try to compile
|
||||
# VAR - variable to store whether the source code compiled
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
macro(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
set(message "${VAR}")
|
||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||
if(${ARGC} GREATER 2)
|
||||
# then add the third argument as a message
|
||||
set(message "${ARGV2} (${VAR})")
|
||||
endif(${ARGC} GREATER 2)
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
else(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
endif(CMAKE_REQUIRED_INCLUDES)
|
||||
set(src "")
|
||||
foreach(def ${EXTRA_DEFINES})
|
||||
set(src "${src}#define ${def} 1\n")
|
||||
endforeach(def)
|
||||
foreach(inc ${HEADER_INCLUDES})
|
||||
set(src "${src}#include <${inc}>\n")
|
||||
endforeach(inc)
|
||||
|
||||
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||
IMMEDIATE)
|
||||
message(STATUS "Performing Test ${message}")
|
||||
try_compile(${VAR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${VAR})
|
||||
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||
message(STATUS "Performing Test ${message} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
else(${VAR})
|
||||
message(STATUS "Performing Test ${message} - Failed")
|
||||
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
endif(${VAR})
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_COMPILES)
|
@@ -1,83 +0,0 @@
|
||||
# - Check if the source code provided in the SOURCE argument compiles and runs.
|
||||
# CURL_CHECK_C_SOURCE_RUNS(SOURCE VAR)
|
||||
# - macro which checks if the source code runs
|
||||
# SOURCE - source code to try to compile
|
||||
# VAR - variable to store size if the type exists.
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
macro(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
set(message "${VAR}")
|
||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||
if(${ARGC} GREATER 2)
|
||||
# then add the third argument as a message
|
||||
set(message "${ARGV2} (${VAR})")
|
||||
endif(${ARGC} GREATER 2)
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
else(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
endif(CMAKE_REQUIRED_INCLUDES)
|
||||
set(src "")
|
||||
foreach(def ${EXTRA_DEFINES})
|
||||
set(src "${src}#define ${def} 1\n")
|
||||
endforeach(def)
|
||||
foreach(inc ${HEADER_INCLUDES})
|
||||
set(src "${src}#include <${inc}>\n")
|
||||
endforeach(inc)
|
||||
|
||||
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||
IMMEDIATE)
|
||||
message(STATUS "Performing Test ${message}")
|
||||
try_run(${VAR} ${VAR}_COMPILED
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
# if it did not compile make the return value fail code of 1
|
||||
if(NOT ${VAR}_COMPILED)
|
||||
set(${VAR} 1)
|
||||
endif(NOT ${VAR}_COMPILED)
|
||||
# if the return value was 0 then it worked
|
||||
set(result_var ${${VAR}})
|
||||
if("${result_var}" EQUAL 0)
|
||||
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||
message(STATUS "Performing Test ${message} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${${VAR}}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
else("${result_var}" EQUAL 0)
|
||||
message(STATUS "Performing Test ${message} - Failed")
|
||||
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${result_var}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
endif("${result_var}" EQUAL 0)
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_RUNS)
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -71,264 +71,88 @@ main ()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_5
|
||||
/* tests for gethostbyaddr_r or gethostbyname_r */
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
# define _REENTRANT
|
||||
/* no idea whether _REENTRANT is always set, just invent a new flag */
|
||||
# define TEST_GETHOSTBYFOO_REENTRANT
|
||||
#endif
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(TEST_GETHOSTBYFOO_REENTRANT)
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
int main(void)
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
char *address = "example.com";
|
||||
int length = 0;
|
||||
int type = 0;
|
||||
struct hostent h;
|
||||
int rc = 0;
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
|
||||
\
|
||||
defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||
struct hostent_data hdata;
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
|
||||
\
|
||||
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent *hp;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;q
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_7
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
hp = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &h_errnop);
|
||||
;
|
||||
|
||||
#if defined(HAVE_GETHOSTBYADDR_R_5) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
|
||||
hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
|
||||
(void)hp;
|
||||
#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
|
||||
defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
|
||||
rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, &hdata);
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, buffer, 8192, 0, &h_errnop);
|
||||
(void)hp; /* not used for test */
|
||||
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||
rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
|
||||
#endif
|
||||
|
||||
(void)length;
|
||||
(void)type;
|
||||
(void)rc;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
hp = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_8
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
int rc;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &hp, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
int rc;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &hp, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_3
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct hostent_data data;
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct hostent_data data;
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_5
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_6
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
|
289
CMake/FindGSS.cmake
Normal file
289
CMake/FindGSS.cmake
Normal file
@@ -0,0 +1,289 @@
|
||||
# - Try to find the GSS Kerberos library
|
||||
# Once done this will define
|
||||
#
|
||||
# GSS_ROOT_DIR - Set this variable to the root installation of GSS
|
||||
#
|
||||
# Read-Only variables:
|
||||
# GSS_FOUND - system has the Heimdal library
|
||||
# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found.
|
||||
# GSS_INCLUDE_DIR - the Heimdal include directory
|
||||
# GSS_LIBRARIES - The libraries needed to use GSS
|
||||
# GSS_LINK_DIRECTORIES - Directories to add to linker search path
|
||||
# GSS_LINKER_FLAGS - Additional linker flags
|
||||
# GSS_COMPILER_FLAGS - Additional compiler flags
|
||||
# GSS_VERSION - This is set to version advertised by pkg-config or read from manifest.
|
||||
# In case the library is found but no version info availabe it'll be set to "unknown"
|
||||
|
||||
set(_MIT_MODNAME mit-krb5-gssapi)
|
||||
set(_HEIMDAL_MODNAME heimdal-gssapi)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckTypeSize)
|
||||
|
||||
set(_GSS_ROOT_HINTS
|
||||
"${GSS_ROOT_DIR}"
|
||||
"$ENV{GSS_ROOT_DIR}"
|
||||
)
|
||||
|
||||
# try to find library using system pkg-config if user didn't specify root dir
|
||||
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
|
||||
if(UNIX)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME})
|
||||
list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}")
|
||||
elseif(WIN32)
|
||||
list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach.
|
||||
find_file(_GSS_CONFIGURE_SCRIPT
|
||||
NAMES
|
||||
"krb5-config"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
NO_CMAKE_PATH
|
||||
NO_CMAKE_ENVIRONMENT_PATH
|
||||
)
|
||||
|
||||
# if not found in user-supplied directories, maybe system knows better
|
||||
find_file(_GSS_CONFIGURE_SCRIPT
|
||||
NAMES
|
||||
"krb5-config"
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
||||
if(_GSS_CONFIGURE_SCRIPT)
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi"
|
||||
OUTPUT_VARIABLE _GSS_CFLAGS
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
message(STATUS "CFLAGS: ${_GSS_CFLAGS}")
|
||||
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||
# should also work in an odd case when multiple directories are given
|
||||
string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS)
|
||||
string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||
string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1"_GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||
|
||||
foreach(_flag ${_GSS_CFLAGS})
|
||||
if(_flag MATCHES "^-I.*")
|
||||
string(REGEX REPLACE "^-I" "" _val "${_flag}")
|
||||
list(APPEND _GSS_INCLUDE_DIR "${_val}")
|
||||
else()
|
||||
list(APPEND _GSS_COMPILER_FLAGS "${_flag}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi"
|
||||
OUTPUT_VARIABLE _GSS_LIB_FLAGS
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
|
||||
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||
# this script gives us libraries and link directories. Blah. We have to deal with it.
|
||||
string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS)
|
||||
string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||
string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1"_GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||
|
||||
foreach(_flag ${_GSS_LIB_FLAGS})
|
||||
if(_flag MATCHES "^-l.*")
|
||||
string(REGEX REPLACE "^-l" "" _val "${_flag}")
|
||||
list(APPEND _GSS_LIBRARIES "${_val}")
|
||||
elseif(_flag MATCHES "^-L.*")
|
||||
string(REGEX REPLACE "^-L" "" _val "${_flag}")
|
||||
list(APPEND _GSS_LINK_DIRECTORIES "${_val}")
|
||||
else()
|
||||
list(APPEND _GSS_LINKER_FLAGS "${_flag}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version"
|
||||
OUTPUT_VARIABLE _GSS_VERSION
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
|
||||
# older versions may not have the "--version" parameter. In this case we just don't care.
|
||||
if(_GSS_CONFIGURE_FAILED)
|
||||
set(_GSS_VERSION 0)
|
||||
endif()
|
||||
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor"
|
||||
OUTPUT_VARIABLE _GSS_VENDOR
|
||||
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||
)
|
||||
|
||||
# older versions may not have the "--vendor" parameter. In this case we just don't care.
|
||||
if(_GSS_CONFIGURE_FAILED)
|
||||
set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter
|
||||
else()
|
||||
if(_GSS_VENDOR MATCHES ".*H|heimdal.*")
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
else()
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else() # either there is no config script or we are on platform that doesn't provide one (Windows?)
|
||||
|
||||
find_path(_GSS_INCLUDE_DIR
|
||||
NAMES
|
||||
"gssapi/gssapi.h"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
inc
|
||||
)
|
||||
|
||||
if(_GSS_INCLUDE_DIR) #jay, we've found something
|
||||
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}")
|
||||
check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
|
||||
|
||||
if(_GSS_HAVE_MIT_HEADERS)
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
else()
|
||||
# prevent compiling the header - just check if we can include it
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__")
|
||||
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
|
||||
|
||||
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||
if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "")
|
||||
endif()
|
||||
else()
|
||||
# I'm not convienced if this is the right way but this is what autotools do at the moment
|
||||
find_path(_GSS_INCLUDE_DIR
|
||||
NAMES
|
||||
"gssapi.h"
|
||||
HINTS
|
||||
${_GSS_ROOT_HINTS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
inc
|
||||
)
|
||||
|
||||
if(_GSS_INCLUDE_DIR)
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# if we have headers, check if we can link libraries
|
||||
if(GSS_FLAVOUR)
|
||||
set(_GSS_LIBDIR_SUFFIXES "")
|
||||
set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS})
|
||||
get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH)
|
||||
list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT})
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64")
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi64")
|
||||
else()
|
||||
set(_GSS_LIBNAME "libgssapi")
|
||||
endif()
|
||||
else()
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386")
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi32")
|
||||
else()
|
||||
set(_GSS_LIBNAME "libgssapi")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS
|
||||
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||
set(_GSS_LIBNAME "gssapi_krb5")
|
||||
else()
|
||||
set(_GSS_LIBNAME "gssapi")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(_GSS_LIBRARIES
|
||||
NAMES
|
||||
${_GSS_LIBNAME}
|
||||
HINTS
|
||||
${_GSS_LIBDIR_HINTS}
|
||||
PATH_SUFFIXES
|
||||
${_GSS_LIBDIR_SUFFIXES}
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
else()
|
||||
if(_GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||
set(GSS_FLAVOUR "MIT")
|
||||
set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||
else()
|
||||
set(GSS_FLAVOUR "Heimdal")
|
||||
set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR})
|
||||
set(GSS_LIBRARIES ${_GSS_LIBRARIES})
|
||||
set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES})
|
||||
set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS})
|
||||
set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS})
|
||||
set(GSS_VERSION ${_GSS_VERSION})
|
||||
|
||||
if(GSS_FLAVOUR)
|
||||
|
||||
if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest")
|
||||
else()
|
||||
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}")
|
||||
file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str
|
||||
REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$")
|
||||
|
||||
string(REGEX MATCH "[0-9]\\.[^\"]+"
|
||||
GSS_VERSION "${heimdal_version_str}")
|
||||
endif()
|
||||
|
||||
if(NOT GSS_VERSION)
|
||||
set(GSS_VERSION "Heimdal Unknown")
|
||||
endif()
|
||||
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
|
||||
get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
|
||||
if(WIN32 AND _MIT_VERSION)
|
||||
set(GSS_VERSION "${_MIT_VERSION}")
|
||||
else()
|
||||
set(GSS_VERSION "MIT Unknown")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR)
|
||||
|
||||
find_package_handle_standard_args(GSS
|
||||
REQUIRED_VARS
|
||||
${_GSS_REQUIRED_VARS}
|
||||
VERSION_VAR
|
||||
GSS_VERSION
|
||||
FAIL_MESSAGE
|
||||
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
|
||||
)
|
||||
|
||||
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
35
CMake/FindLibSSH2.cmake
Normal file
35
CMake/FindLibSSH2.cmake
Normal file
@@ -0,0 +1,35 @@
|
||||
# - Try to find the libssh2 library
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBSSH2_FOUND - system has the libssh2 library
|
||||
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
|
||||
# LIBSSH2_LIBRARY - the libssh2 library name
|
||||
|
||||
if (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
|
||||
set(LibSSH2_FIND_QUIETLY TRUE)
|
||||
endif (LIBSSH2_INCLUDE_DIR AND LIBSSH2_LIBRARY)
|
||||
|
||||
FIND_PATH(LIBSSH2_INCLUDE_DIR libssh2.h
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBSSH2_LIBRARY NAMES ssh2
|
||||
)
|
||||
|
||||
if(LIBSSH2_INCLUDE_DIR)
|
||||
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9][0-9][0-9].*")
|
||||
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MAJOR "${libssh2_version_str}")
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_MINOR "${libssh2_version_str}")
|
||||
string(REGEX REPLACE "^.*LIBSSH2_VERSION_NUM[\t ]+0x[0-9][0-9][0-9][0-9]([0-9][0-9]).*$" "\\1" LIBSSH2_VERSION_PATCH "${libssh2_version_str}")
|
||||
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MAJOR "${LIBSSH2_VERSION_MAJOR}")
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_MINOR "${LIBSSH2_VERSION_MINOR}")
|
||||
string(REGEX REPLACE "^0(.+)" "\\1" LIBSSH2_VERSION_PATCH "${LIBSSH2_VERSION_PATCH}")
|
||||
|
||||
set(LIBSSH2_VERSION "${LIBSSH2_VERSION_MAJOR}.${LIBSSH2_VERSION_MINOR}.${LIBSSH2_VERSION_PATCH}")
|
||||
endif(LIBSSH2_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSSH2 DEFAULT_MSG LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY )
|
||||
|
||||
MARK_AS_ADVANCED(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY LIBSSH2_VERSION_MAJOR LIBSSH2_VERSION_MINOR LIBSSH2_VERSION_PATCH LIBSSH2_VERSION)
|
@@ -1,21 +0,0 @@
|
||||
# Extension of the standard FindOpenSSL.cmake
|
||||
# Adds OPENSSL_INCLUDE_DIRS and libeay32
|
||||
include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
||||
|
||||
# starting 2.8 it is better to use standard modules
|
||||
if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
|
||||
# Bill Hoffman told that libeay32 is necessary for him:
|
||||
find_library(SSL_LIBEAY NAMES libeay32)
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
if(SSL_LIBEAY)
|
||||
list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
|
||||
else()
|
||||
set(OPENSSL_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endif() # if (CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
@@ -1,10 +0,0 @@
|
||||
# Locate zlib
|
||||
include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
||||
|
||||
# starting 2.8 it is better to use standard modules
|
||||
if(CMAKE_MAJOR_VERSION EQUAL "2" AND CMAKE_MINOR_VERSION LESS "8")
|
||||
find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
|
||||
if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
|
||||
set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
|
||||
endif()
|
||||
endif()
|
95
CMake/Macros.cmake
Normal file
95
CMake/Macros.cmake
Normal file
@@ -0,0 +1,95 @@
|
||||
#File defines convenience macros for available feature testing
|
||||
|
||||
# This macro checks if the symbol exists in the library and if it
|
||||
# does, it prepends library to the list. It is intended to be called
|
||||
# multiple times with a sequence of possibly dependent libraries in
|
||||
# order of least-to-most-dependent. Some libraries depend on others
|
||||
# to link correctly.
|
||||
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||
${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||
|
||||
# Check if header file exists and add it to the list.
|
||||
# This macro is intended to be called multiple times with a sequence of
|
||||
# possibly dependent header files. Some headers depend on others to be
|
||||
# compiled correctly.
|
||||
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
|
||||
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||
|
||||
# For other curl specific tests, use this macro.
|
||||
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
if(NOT DEFINED "${CURL_TEST}")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_compile(${CURL_TEST}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
else(${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
endif(${CURL_TEST})
|
||||
endif()
|
||||
endmacro(CURL_INTERNAL_TEST)
|
||||
|
||||
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
if(NOT DEFINED "${CURL_TEST}_COMPILE")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}")
|
||||
if(${CURL_TEST}_COMPILE)
|
||||
file(APPEND
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"There was a problem running this test\n")
|
||||
endif(${CURL_TEST}_COMPILE)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"\n\n")
|
||||
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
endif()
|
||||
endmacro(CURL_INTERNAL_TEST_RUN)
|
@@ -1,15 +1,10 @@
|
||||
include(CurlCheckCSourceCompiles)
|
||||
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||
set(HEADER_INCLUDES)
|
||||
set(headers_hack)
|
||||
include(CheckCSourceCompiles)
|
||||
# The begin of the sources (macros and includes)
|
||||
set(_source_epilogue "#undef inline")
|
||||
|
||||
macro(add_header_include check header)
|
||||
if(${check})
|
||||
set(headers_hack
|
||||
"${headers_hack}\n#include <${header}>")
|
||||
#SET(HEADER_INCLUDES
|
||||
# ${HEADER_INCLUDES}
|
||||
# "${header}")
|
||||
set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
|
||||
endif(${check})
|
||||
endmacro(add_header_include)
|
||||
|
||||
@@ -18,22 +13,23 @@ if(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
||||
set(_source_epilogue
|
||||
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
|
||||
set(signature_call_conv "PASCAL")
|
||||
if(HAVE_LIBWS2_32)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||
endif()
|
||||
else(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||
endif(HAVE_WINDOWS_H)
|
||||
|
||||
set(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||
curl_check_c_source_compiles("recv(0, 0, 0, 0)" curl_cv_recv)
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
recv(0, 0, 0, 0);
|
||||
return 0;
|
||||
}" curl_cv_recv)
|
||||
if(curl_cv_recv)
|
||||
# AC_CACHE_CHECK([types of arguments and return type for recv],
|
||||
#[curl_cv_func_recv_args], [
|
||||
#SET(curl_cv_func_recv_args "unknown")
|
||||
#for recv_retv in 'int' 'ssize_t'; do
|
||||
if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
foreach(recv_retv "int" "ssize_t" )
|
||||
foreach(recv_arg1 "int" "ssize_t" "SOCKET")
|
||||
@@ -41,17 +37,23 @@ if(curl_cv_recv)
|
||||
foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(recv_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_recv_done)
|
||||
set(curl_cv_func_recv_test "UNKNOWN")
|
||||
set(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;")
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||
curl_check_c_source_compiles("
|
||||
unset(curl_cv_func_recv_test CACHE)
|
||||
check_c_source_compiles("
|
||||
${_source_epilogue}
|
||||
extern ${recv_retv} ${signature_call_conv}
|
||||
recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4});
|
||||
int main(void) {
|
||||
${recv_arg1} s=0;
|
||||
${recv_arg2} buf=0;
|
||||
${recv_arg3} len=0;
|
||||
${recv_arg4} flags=0;
|
||||
${recv_retv} res = recv(s, buf, len, flags)"
|
||||
curl_cv_func_recv_test
|
||||
"${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||
${recv_retv} res = recv(s, buf, len, flags);
|
||||
(void) res;
|
||||
return 0;
|
||||
}"
|
||||
curl_cv_func_recv_test)
|
||||
message(STATUS
|
||||
"Tested: ${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||
if(curl_cv_func_recv_test)
|
||||
set(curl_cv_func_recv_args
|
||||
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
||||
@@ -69,18 +71,13 @@ if(curl_cv_recv)
|
||||
endforeach(recv_arg2)
|
||||
endforeach(recv_arg1)
|
||||
endforeach(recv_retv)
|
||||
else(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
else()
|
||||
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
|
||||
#MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
|
||||
#MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
|
||||
#MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
|
||||
#MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
|
||||
#MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
|
||||
endif(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
endif()
|
||||
|
||||
if("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
message(FATAL_ERROR "Cannot find proper types to use for recv args")
|
||||
@@ -91,12 +88,12 @@ endif(curl_cv_recv)
|
||||
set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
||||
set(HAVE_RECV 1)
|
||||
|
||||
curl_check_c_source_compiles("send(0, 0, 0, 0)" curl_cv_send)
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
send(0, 0, 0, 0);
|
||||
return 0;
|
||||
}" curl_cv_send)
|
||||
if(curl_cv_send)
|
||||
# AC_CACHE_CHECK([types of arguments and return type for send],
|
||||
#[curl_cv_func_send_args], [
|
||||
#SET(curl_cv_func_send_args "unknown")
|
||||
#for send_retv in 'int' 'ssize_t'; do
|
||||
if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
foreach(send_retv "int" "ssize_t" )
|
||||
foreach(send_arg1 "int" "ssize_t" "SOCKET")
|
||||
@@ -104,19 +101,24 @@ if(curl_cv_send)
|
||||
foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(send_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_send_done)
|
||||
set(curl_cv_func_send_test "UNKNOWN")
|
||||
set(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;")
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||
curl_check_c_source_compiles("
|
||||
unset(curl_cv_func_send_test CACHE)
|
||||
check_c_source_compiles("
|
||||
${_source_epilogue}
|
||||
extern ${send_retv} ${signature_call_conv}
|
||||
send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4});
|
||||
int main(void) {
|
||||
${send_arg1} s=0;
|
||||
${send_arg2} buf=0;
|
||||
${send_arg3} len=0;
|
||||
${send_arg4} flags=0;
|
||||
${send_retv} res = send(s, buf, len, flags)"
|
||||
curl_cv_func_send_test
|
||||
"${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||
${send_retv} res = send(s, buf, len, flags);
|
||||
(void) res;
|
||||
return 0;
|
||||
}"
|
||||
curl_cv_func_send_test)
|
||||
message(STATUS
|
||||
"Tested: ${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||
if(curl_cv_func_send_test)
|
||||
#MESSAGE("Found arguments: ${curl_cv_func_send_test}")
|
||||
string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
|
||||
string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
|
||||
set(curl_cv_func_send_args
|
||||
@@ -135,20 +137,14 @@ if(curl_cv_send)
|
||||
endforeach(send_arg2)
|
||||
endforeach(send_arg1)
|
||||
endforeach(send_retv)
|
||||
else(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
else()
|
||||
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
|
||||
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
|
||||
#MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}")
|
||||
#MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}")
|
||||
#MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
|
||||
#MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
|
||||
#MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
|
||||
#MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
|
||||
endif(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
endif()
|
||||
|
||||
if("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
message(FATAL_ERROR "Cannot find proper types to use for send args")
|
||||
@@ -160,88 +156,71 @@ endif(curl_cv_send)
|
||||
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
||||
set(HAVE_SEND 1)
|
||||
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
||||
curl_check_c_source_compiles("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
int flag = MSG_NOSIGNAL;
|
||||
(void)flag;
|
||||
return 0;
|
||||
}" HAVE_MSG_NOSIGNAL)
|
||||
|
||||
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||
set(HEADER_INCLUDES)
|
||||
set(headers_hack)
|
||||
|
||||
macro(add_header_include check header)
|
||||
if(${check})
|
||||
set(headers_hack
|
||||
"${headers_hack}\n#include <${header}>")
|
||||
#SET(HEADER_INCLUDES
|
||||
# ${HEADER_INCLUDES}
|
||||
# "${header}")
|
||||
endif(${check})
|
||||
endmacro(add_header_include header)
|
||||
|
||||
if(HAVE_WINDOWS_H)
|
||||
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||
else(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||
if(NOT HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||
add_header_include(HAVE_TIME_H "time.h")
|
||||
endif(HAVE_WINDOWS_H)
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
||||
curl_check_c_source_compiles("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL)
|
||||
endif()
|
||||
check_c_source_compiles("${_source_epilogue}
|
||||
int main(void) {
|
||||
struct timeval ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_usec = 0;
|
||||
(void)ts;
|
||||
return 0;
|
||||
}" HAVE_STRUCT_TIMEVAL)
|
||||
|
||||
|
||||
include(CurlCheckCSourceRuns)
|
||||
set(EXTRA_DEFINES)
|
||||
set(HEADER_INCLUDES)
|
||||
include(CheckCSourceRuns)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SYS_POLL_H)
|
||||
set(HEADER_INCLUDES "sys/poll.h")
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||
endif(HAVE_SYS_POLL_H)
|
||||
curl_check_c_source_runs("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
|
||||
check_c_source_runs("
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
return poll((void *)0, 0, 10 /*ms*/);
|
||||
}" HAVE_POLL_FINE)
|
||||
|
||||
set(HAVE_SIG_ATOMIC_T 1)
|
||||
set(EXTRA_DEFINES)
|
||||
set(HEADER_INCLUDES)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
if(HAVE_SIGNAL_H)
|
||||
set(HEADER_INCLUDES "signal.h")
|
||||
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
||||
endif(HAVE_SIGNAL_H)
|
||||
check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
|
||||
if(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||
curl_check_c_source_compiles("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
check_c_source_compiles("
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
# include <signal.h>
|
||||
#endif
|
||||
int main(void) {
|
||||
static volatile sig_atomic_t dummy = 0;
|
||||
(void)dummy;
|
||||
return 0;
|
||||
}" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
||||
endif(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
endif(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE
|
||||
"#undef inline")
|
||||
|
||||
if(HAVE_WINDOWS_H)
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>")
|
||||
if(HAVE_WINSOCK2_H)
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
|
||||
endif(HAVE_WINSOCK2_H)
|
||||
else(HAVE_WINDOWS_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
|
||||
else()
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
if(HAVE_SYS_SOCKET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"sys/socket.h")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
|
||||
endif(HAVE_SYS_SOCKET_H)
|
||||
if(HAVE_NETINET_IN_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"netinet/in.h")
|
||||
endif(HAVE_NETINET_IN_H)
|
||||
if(HAVE_ARPA_INET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"arpa/inet.h")
|
||||
endif(HAVE_ARPA_INET_H)
|
||||
endif(HAVE_WINDOWS_H)
|
||||
endif()
|
||||
|
||||
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
|
@@ -5,6 +5,7 @@ if(NOT UNIX)
|
||||
set(HAVE_LIBSOCKET 0)
|
||||
set(NOT_NEED_LIBNSL 0)
|
||||
set(HAVE_LIBNSL 0)
|
||||
set(HAVE_GETHOSTNAME 1)
|
||||
set(HAVE_LIBZ 0)
|
||||
set(HAVE_LIBCRYPTO 0)
|
||||
|
||||
@@ -14,7 +15,6 @@ if(NOT UNIX)
|
||||
set(HAVE_ARPA_INET_H 0)
|
||||
set(HAVE_DLFCN_H 0)
|
||||
set(HAVE_FCNTL_H 1)
|
||||
set(HAVE_FEATURES_H 0)
|
||||
set(HAVE_INTTYPES_H 0)
|
||||
set(HAVE_IO_H 1)
|
||||
set(HAVE_MALLOC_H 1)
|
||||
|
657
CMakeLists.txt
657
CMakeLists.txt
@@ -38,36 +38,27 @@
|
||||
# To check:
|
||||
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
|
||||
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
|
||||
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||
include(Utilities)
|
||||
include(Macros)
|
||||
|
||||
project( CURL C )
|
||||
|
||||
message(WARNING "the curl cmake build system is poorly maintained. Be aware")
|
||||
|
||||
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
|
||||
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)"
|
||||
LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ})
|
||||
string (REGEX MATCH
|
||||
"LIBCURL_VERSION_MINOR[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI})
|
||||
string (REGEX MATCH
|
||||
"LIBCURL_VERSION_PATCH[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT})
|
||||
set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ})
|
||||
set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI})
|
||||
set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT})
|
||||
string (REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
|
||||
CURL_VERSION ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION})
|
||||
string (REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+"
|
||||
CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM})
|
||||
|
||||
include_regular_expression("^.*$") # Sukender: Is it necessary?
|
||||
|
||||
# Setup package meta-data
|
||||
# SET(PACKAGE "curl")
|
||||
set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
|
||||
message(STATUS "curl version=[${CURL_VERSION}]")
|
||||
# SET(PACKAGE_TARNAME "curl")
|
||||
# SET(PACKAGE_NAME "curl")
|
||||
@@ -83,12 +74,17 @@ include_directories( ${CURL_SOURCE_DIR}/include )
|
||||
option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
|
||||
option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
|
||||
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
|
||||
option(CURL_USE_ARES "Set to ON to enable c-ares support" OFF)
|
||||
option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
|
||||
option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF)
|
||||
# initialize CURL_LIBS
|
||||
set(CURL_LIBS "")
|
||||
|
||||
if(CURL_USE_ARES)
|
||||
set(USE_ARES ${CURL_USE_ARES})
|
||||
if(ENABLE_THREADED_RESOLVER AND ENABLE_ARES)
|
||||
message(FATAL_ERROR "Options ENABLE_THREADED_RESOLVER and ENABLE_ARES are mutually exclusive")
|
||||
endif()
|
||||
|
||||
if(ENABLE_ARES)
|
||||
set(USE_ARES 1)
|
||||
find_package(CARES REQUIRED)
|
||||
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
|
||||
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
|
||||
@@ -133,6 +129,19 @@ mark_as_advanced(CURL_DISABLE_HTTP)
|
||||
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_LDAPS)
|
||||
|
||||
option(CURL_DISABLE_RTSP "to disable RTSP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_RTSP)
|
||||
option(CURL_DISABLE_PROXY "to disable proxy" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_PROXY)
|
||||
option(CURL_DISABLE_POP3 "to disable POP3" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_POP3)
|
||||
option(CURL_DISABLE_IMAP "to disable IMAP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_IMAP)
|
||||
option(CURL_DISABLE_SMTP "to disable SMTP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_SMTP)
|
||||
option(CURL_DISABLE_GOPHER "to disable Gopher" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_GOPHER)
|
||||
|
||||
if(HTTP_ONLY)
|
||||
set(CURL_DISABLE_FTP ON)
|
||||
set(CURL_DISABLE_LDAP ON)
|
||||
@@ -141,6 +150,11 @@ if(HTTP_ONLY)
|
||||
set(CURL_DISABLE_DICT ON)
|
||||
set(CURL_DISABLE_FILE ON)
|
||||
set(CURL_DISABLE_TFTP ON)
|
||||
set(CURL_DISABLE_RTSP ON)
|
||||
set(CURL_DISABLE_POP3 ON)
|
||||
set(CURL_DISABLE_IMAP ON)
|
||||
set(CURL_DISABLE_SMTP ON)
|
||||
set(CURL_DISABLE_GOPHER ON)
|
||||
endif()
|
||||
|
||||
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
|
||||
@@ -152,9 +166,52 @@ option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
|
||||
mark_as_advanced(DISABLED_THREADSAFE)
|
||||
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
|
||||
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
|
||||
mark_as_advanced(ENABLE_IPV6)
|
||||
if(ENABLE_IPV6)
|
||||
include(CheckStructHasMember)
|
||||
check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h"
|
||||
HAVE_SOCKADDR_IN6_SIN6_ADDR)
|
||||
check_struct_has_member("struct sockaddr_in6" sin6_scope_id "netinet/in.h"
|
||||
HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
|
||||
if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR)
|
||||
message(WARNING "struct sockaddr_in6 not available, disabling IPv6 support")
|
||||
# Force the feature off as this name is used as guard macro...
|
||||
set(ENABLE_IPV6 OFF
|
||||
CACHE BOOL "Define if you want to enable IPv6 support" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_MANUAL "to provide the built-in manual" ON)
|
||||
unset(USE_MANUAL CACHE) # TODO: cache NROFF/NROFF_MANOPT/USE_MANUAL vars?
|
||||
if(ENABLE_MANUAL)
|
||||
find_program(NROFF NAMES gnroff nroff)
|
||||
if(NROFF)
|
||||
# Need a way to write to stdin, this will do
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test")
|
||||
# Tests for a valid nroff option to generate a manpage
|
||||
foreach(_MANOPT "-man" "-mandoc")
|
||||
execute_process(COMMAND "${NROFF}" ${_MANOPT}
|
||||
OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT
|
||||
INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt"
|
||||
ERROR_QUIET)
|
||||
# Save the option if it was valid
|
||||
if(NROFF_MANOPT_OUTPUT)
|
||||
message("Found *nroff option: -- ${_MANOPT}")
|
||||
set(NROFF_MANOPT ${_MANOPT})
|
||||
set(USE_MANUAL 1)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
# No need for the temporary file
|
||||
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt")
|
||||
if(NOT USE_MANUAL)
|
||||
message(WARNING "Found no *nroff option to get plaintext from man pages")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Found no *nroff program")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We need ansi c-flags, especially on HP
|
||||
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||
@@ -177,21 +234,24 @@ include (CheckIncludeFiles)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckSymbolExists)
|
||||
include (CheckTypeSize)
|
||||
include (CheckCSourceCompiles)
|
||||
|
||||
# On windows preload settings
|
||||
if(WIN32)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
|
||||
endif(WIN32)
|
||||
|
||||
# This macro checks if the symbol exists in the library and if it
|
||||
# does, it prepends library to the list.
|
||||
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||
${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||
if(ENABLE_THREADED_RESOLVER)
|
||||
check_include_file_concat("pthread.h" HAVE_PTHREAD_H)
|
||||
if(HAVE_PTHREAD_H)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD 1)
|
||||
find_package(Threads)
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(USE_THREADS_POSIX 1)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for all needed libraries
|
||||
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
|
||||
@@ -209,89 +269,271 @@ if(NOT NOT_NEED_LIBNSL)
|
||||
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
|
||||
endif(NOT NOT_NEED_LIBNSL)
|
||||
|
||||
check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
|
||||
check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
|
||||
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
||||
check_function_exists(gethostname HAVE_GETHOSTNAME)
|
||||
|
||||
if(WIN32)
|
||||
set(CURL_DEFAULT_DISABLE_LDAP OFF)
|
||||
# some windows compilers do not have wldap32
|
||||
if(NOT HAVE_WLDAP32)
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
||||
option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
|
||||
else()
|
||||
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
|
||||
endif()
|
||||
mark_as_advanced(CURL_LDAP_WIN)
|
||||
check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
|
||||
check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
|
||||
endif()
|
||||
|
||||
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
||||
mark_as_advanced(CMAKE_USE_OPENSSL)
|
||||
|
||||
# IF(NOT CURL_SPECIAL_LIBZ)
|
||||
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||
set(USE_SSLEAY OFF)
|
||||
set(USE_OPENSSL OFF)
|
||||
set(HAVE_LIBCRYPTO OFF)
|
||||
set(HAVE_LIBSSL OFF)
|
||||
|
||||
if(CMAKE_USE_OPENSSL)
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
|
||||
set(USE_SSLEAY ON)
|
||||
set(USE_OPENSSL ON)
|
||||
set(HAVE_LIBCRYPTO ON)
|
||||
set(HAVE_LIBSSL ON)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
|
||||
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
|
||||
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H)
|
||||
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H)
|
||||
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
|
||||
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
|
||||
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
|
||||
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H)
|
||||
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CURL_DISABLE_LDAP)
|
||||
|
||||
if(WIN32)
|
||||
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
|
||||
if(CURL_LDAP_WIN)
|
||||
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
||||
if(NOT HAVE_WLDAP32)
|
||||
set(CURL_LDAP_WIN OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(CMAKE_USE_OPENLDAP "Use OpenLDAP code." OFF)
|
||||
mark_as_advanced(CMAKE_USE_OPENLDAP)
|
||||
set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library")
|
||||
set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library")
|
||||
|
||||
if(CMAKE_USE_OPENLDAP AND CURL_LDAP_WIN)
|
||||
message(FATAL_ERROR "Cannot use CURL_LDAP_WIN and CMAKE_USE_OPENLDAP at the same time")
|
||||
endif()
|
||||
|
||||
# Now that we know, we're not using windows LDAP...
|
||||
if(NOT CURL_LDAP_WIN)
|
||||
# Check for LDAP
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
|
||||
check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP)
|
||||
check_library_exists_concat(${CMAKE_LBER_LIB} ber_init HAVE_LIBLBER)
|
||||
else()
|
||||
check_include_file_concat("winldap.h" HAVE_WINLDAP_H)
|
||||
check_include_file_concat("winber.h" HAVE_WINBER_H)
|
||||
endif()
|
||||
|
||||
set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory")
|
||||
if(CMAKE_LDAP_INCLUDE_DIR)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR})
|
||||
endif()
|
||||
check_include_file_concat("ldap.h" HAVE_LDAP_H)
|
||||
check_include_file_concat("lber.h" HAVE_LBER_H)
|
||||
|
||||
if(NOT HAVE_LDAP_H)
|
||||
message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
elseif(NOT HAVE_LIBLDAP)
|
||||
message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON")
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
else()
|
||||
if(CMAKE_USE_OPENLDAP)
|
||||
set(USE_OPENLDAP ON)
|
||||
endif()
|
||||
if(CMAKE_LDAP_INCLUDE_DIR)
|
||||
include_directories(${CMAKE_LDAP_INCLUDE_DIR})
|
||||
endif()
|
||||
set(NEED_LBER_H ON)
|
||||
set(_HEADER_LIST)
|
||||
if(HAVE_WINDOWS_H)
|
||||
list(APPEND _HEADER_LIST "windows.h")
|
||||
endif()
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
list(APPEND _HEADER_LIST "sys/types.h")
|
||||
endif()
|
||||
list(APPEND _HEADER_LIST "ldap.h")
|
||||
|
||||
set(_SRC_STRING "")
|
||||
foreach(_HEADER ${_HEADER_LIST})
|
||||
set(_INCLUDE_STRING "${_INCLUDE_STRING}#include <${_HEADER}>\n")
|
||||
endforeach()
|
||||
|
||||
set(_SRC_STRING
|
||||
"
|
||||
${_INCLUDE_STRING}
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
BerValue *bvp = NULL;
|
||||
BerElement *bep = ber_init(bvp);
|
||||
ber_free(bep, 1);
|
||||
return 0;
|
||||
}"
|
||||
)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-DLDAP_DEPRECATED=1" "-DWIN32_LEAN_AND_MEAN")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB})
|
||||
if(HAVE_LIBLBER)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
|
||||
endif()
|
||||
check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H)
|
||||
|
||||
if(NOT_NEED_LBER_H)
|
||||
set(NEED_LBER_H OFF)
|
||||
else()
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# No ldap, no ldaps.
|
||||
if(CURL_DISABLE_LDAP)
|
||||
if(NOT CURL_DISABLE_LDAPS)
|
||||
message(STATUS "LDAP needs to be enabled to support LDAPS")
|
||||
set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CURL_DISABLE_LDAPS)
|
||||
check_include_file_concat("ldap_ssl.h" HAVE_LDAP_SSL_H)
|
||||
check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H)
|
||||
endif()
|
||||
|
||||
# Check for idn
|
||||
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
||||
|
||||
# Check for LDAP
|
||||
check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
|
||||
# if(NOT HAVE_LIBLDAP)
|
||||
# SET(CURL_DISABLE_LDAP ON)
|
||||
# endif(NOT HAVE_LIBLDAP)
|
||||
|
||||
# Check for symbol dlopen (same as HAVE_LIBDL)
|
||||
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
|
||||
|
||||
# For other tests to use the same libraries
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
|
||||
|
||||
option(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
|
||||
set(HAVE_LIBZ OFF)
|
||||
set(HAVE_ZLIB_H OFF)
|
||||
set(HAVE_ZLIB OFF)
|
||||
if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
|
||||
if(CURL_ZLIB)
|
||||
find_package(ZLIB QUIET)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_ZLIB_H ON)
|
||||
set(HAVE_ZLIB ON)
|
||||
set(HAVE_LIBZ ON)
|
||||
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
||||
mark_as_advanced(CMAKE_USE_OPENSSL)
|
||||
if(CMAKE_USE_OPENSSL)
|
||||
#libSSH2
|
||||
option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
|
||||
mark_as_advanced(CMAKE_USE_LIBSSH2)
|
||||
set(USE_LIBSSH2 OFF)
|
||||
set(HAVE_LIBSSH2 OFF)
|
||||
set(HAVE_LIBSSH2_H OFF)
|
||||
|
||||
set(USE_SSLEAY OFF)
|
||||
set(USE_OPENSSL OFF)
|
||||
set(HAVE_LIBCRYPTO OFF)
|
||||
set(HAVE_LIBSSL OFF)
|
||||
if(CMAKE_USE_LIBSSH2)
|
||||
find_package(LibSSH2)
|
||||
if(LIBSSH2_FOUND)
|
||||
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY})
|
||||
set(CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}")
|
||||
include_directories("${LIBSSH2_INCLUDE_DIR}")
|
||||
set(HAVE_LIBSSH2 ON)
|
||||
set(USE_LIBSSH2 ON)
|
||||
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
set(USE_SSLEAY ON)
|
||||
set(USE_OPENSSL ON)
|
||||
set(HAVE_LIBCRYPTO ON)
|
||||
set(HAVE_LIBSSL ON)
|
||||
endif(OPENSSL_FOUND)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
# find_package has already found the headers
|
||||
set(HAVE_LIBSSH2_H ON)
|
||||
set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h")
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H")
|
||||
|
||||
# If we have features.h, then do the _BSD_SOURCE magic
|
||||
check_include_file("features.h" HAVE_FEATURES_H)
|
||||
# now check for specific libssh2 symbols as they were added in different versions
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h")
|
||||
check_function_exists(libssh2_version HAVE_LIBSSH2_VERSION)
|
||||
check_function_exists(libssh2_init HAVE_LIBSSH2_INIT)
|
||||
check_function_exists(libssh2_exit HAVE_LIBSSH2_EXIT)
|
||||
check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64)
|
||||
check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "")
|
||||
|
||||
# Check if header file exists and add it to the list.
|
||||
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
|
||||
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||
endif(LIBSSH2_FOUND)
|
||||
endif(CMAKE_USE_LIBSSH2)
|
||||
|
||||
option(CMAKE_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is supported with CMake build)" OFF)
|
||||
mark_as_advanced(CMAKE_USE_GSSAPI)
|
||||
|
||||
if(CMAKE_USE_GSSAPI)
|
||||
find_package(GSS)
|
||||
|
||||
set(HAVE_GSS_API ${GSS_FOUND})
|
||||
if(GSS_FOUND)
|
||||
|
||||
message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"")
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIR})
|
||||
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
|
||||
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
|
||||
|
||||
if(GSS_FLAVOUR STREQUAL "Heimdal")
|
||||
set(HAVE_GSSHEIMDAL ON)
|
||||
else() # MIT
|
||||
set(HAVE_GSSMIT ON)
|
||||
set(_INCLUDE_LIST "")
|
||||
if(HAVE_GSSAPI_GSSAPI_H)
|
||||
list(APPEND _INCLUDE_LIST "gssapi/gssapi.h")
|
||||
endif()
|
||||
if(HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||
list(APPEND _INCLUDE_LIST "gssapi/gssapi_generic.h")
|
||||
endif()
|
||||
if(HAVE_GSSAPI_GSSAPI_KRB5_H)
|
||||
list(APPEND _INCLUDE_LIST "gssapi/gssapi_krb5.h")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " _COMPILER_FLAGS_STR "${GSS_COMPILER_FLAGS}")
|
||||
string(REPLACE ";" " " _LINKER_FLAGS_STR "${GSS_LINKER_FLAGS}")
|
||||
|
||||
foreach(_dir ${GSS_LINK_DIRECTORIES})
|
||||
set(_LINKER_FLAGS_STR "${_LINKER_FLAGS_STR} -L\"${_dir}\"")
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "${_COMPILER_FLAGS_STR} ${_LINKER_FLAGS_STR}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES})
|
||||
check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" ${_INCLUDE_LIST} HAVE_GSS_C_NT_HOSTBASED_SERVICE)
|
||||
if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE)
|
||||
set(HAVE_OLD_GSSMIT ON)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
include_directories(${GSS_INCLUDE_DIR})
|
||||
link_directories(${GSS_LINK_DIRECTORIES})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
|
||||
list(APPEND CURL_LIBS ${GSS_LIBRARIES})
|
||||
|
||||
else()
|
||||
message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON)
|
||||
if(ENABLE_UNIX_SOCKETS)
|
||||
include(CheckStructHasMember)
|
||||
check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS)
|
||||
else()
|
||||
unset(USE_UNIX_SOCKETS CACHE)
|
||||
endif()
|
||||
|
||||
# Check for header files
|
||||
if(NOT UNIX)
|
||||
@@ -328,32 +570,18 @@ check_include_file_concat("des.h" HAVE_DES_H)
|
||||
check_include_file_concat("err.h" HAVE_ERR_H)
|
||||
check_include_file_concat("errno.h" HAVE_ERRNO_H)
|
||||
check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
|
||||
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
|
||||
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
|
||||
check_include_file_concat("idn-free.h" HAVE_IDN_FREE_H)
|
||||
check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
|
||||
check_include_file_concat("io.h" HAVE_IO_H)
|
||||
check_include_file_concat("krb.h" HAVE_KRB_H)
|
||||
check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
|
||||
check_include_file_concat("libssh2.h" HAVE_LIBSSH2_H)
|
||||
check_include_file_concat("limits.h" HAVE_LIMITS_H)
|
||||
check_include_file_concat("locale.h" HAVE_LOCALE_H)
|
||||
check_include_file_concat("net/if.h" HAVE_NET_IF_H)
|
||||
check_include_file_concat("netdb.h" HAVE_NETDB_H)
|
||||
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
|
||||
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
|
||||
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
|
||||
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H)
|
||||
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H)
|
||||
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
|
||||
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
|
||||
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
|
||||
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H)
|
||||
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
|
||||
endif(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
|
||||
check_include_file_concat("pem.h" HAVE_PEM_H)
|
||||
check_include_file_concat("poll.h" HAVE_POLL_H)
|
||||
check_include_file_concat("pwd.h" HAVE_PWD_H)
|
||||
@@ -382,25 +610,13 @@ check_include_file_concat("stddef.h" HAVE_STDDEF_H)
|
||||
check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
|
||||
check_include_file_concat("malloc.h" HAVE_MALLOC_H)
|
||||
check_include_file_concat("memory.h" HAVE_MEMORY_H)
|
||||
check_include_file_concat("ldap.h" HAVE_LDAP_H)
|
||||
check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
|
||||
check_include_file_concat("stdint.h" HAVE_STDINT_H)
|
||||
check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
|
||||
check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
|
||||
check_include_file_concat("idna.h" HAVE_IDNA_H)
|
||||
|
||||
if(NOT HAVE_LDAP_H)
|
||||
message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# No ldap, no ldaps.
|
||||
if(CURL_DISABLE_LDAP)
|
||||
if(NOT CURL_DISABLE_LDAPS)
|
||||
message(STATUS "LDAP needs to be enabled to support LDAPS")
|
||||
set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||
@@ -473,6 +689,12 @@ find_file(RANDOM_FILE urandom /dev)
|
||||
mark_as_advanced(RANDOM_FILE)
|
||||
|
||||
# Check for some functions that are used
|
||||
if(HAVE_LIBWS2_32)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||
elseif(HAVE_LIBSOCKET)
|
||||
set(CMAKE_REQUIRED_LIBRARIES socket)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
|
||||
check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
|
||||
check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
|
||||
@@ -536,6 +758,7 @@ check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
|
||||
check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
|
||||
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
|
||||
check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
|
||||
check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO)
|
||||
check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
|
||||
check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
|
||||
check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
|
||||
@@ -574,75 +797,6 @@ if(NOT HAVE_STRICMP)
|
||||
set(HAVE_LDAP_URL_PARSE 1)
|
||||
endif(NOT HAVE_STRICMP)
|
||||
|
||||
# For other curl specific tests, use this macro.
|
||||
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
if("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_compile(${CURL_TEST}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
else(${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
endif(${CURL_TEST})
|
||||
endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||
endmacro(CURL_INTERNAL_TEST)
|
||||
|
||||
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}")
|
||||
if(${CURL_TEST}_COMPILE)
|
||||
file(APPEND
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"There was a problem running this test\n")
|
||||
endif(${CURL_TEST}_COMPILE)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"\n\n")
|
||||
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
endif("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||
endmacro(CURL_INTERNAL_TEST_RUN)
|
||||
|
||||
# Do curl specific tests
|
||||
foreach(CURL_TEST
|
||||
HAVE_FCNTL_O_NONBLOCK
|
||||
@@ -830,24 +984,6 @@ if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif(MSVC)
|
||||
|
||||
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
|
||||
# TODO This is far to be complete!
|
||||
function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
|
||||
if(CURL_ZLIB AND ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
#ADD_DEFINITIONS( -DUSE_SSLEAY )
|
||||
endif()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${CURL_LIBS})
|
||||
endfunction()
|
||||
|
||||
# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
|
||||
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
|
||||
file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
|
||||
@@ -872,6 +1008,133 @@ if(BUILD_CURL_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL, WINSSL, DARWINSSL
|
||||
if(USE_OPENSSL)
|
||||
set(SSL_ENABLED 1)
|
||||
endif()
|
||||
|
||||
# Helper to populate a list (_items) with a label when conditions (the remaining
|
||||
# args) are satisfied
|
||||
function(_add_if label)
|
||||
# TODO need to disable policy CMP0054 (CMake 3.1) to allow this indirection
|
||||
if(${ARGN})
|
||||
set(_items ${_items} "${label}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Clear list and try to detect available features
|
||||
set(_items)
|
||||
_add_if("SSL" SSL_ENABLED)
|
||||
_add_if("IPv6" ENABLE_IPV6)
|
||||
_add_if("unix-sockets" USE_UNIX_SOCKETS)
|
||||
_add_if("libz" HAVE_LIBZ)
|
||||
_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX)
|
||||
_add_if("IDN" HAVE_LIBIDN)
|
||||
# TODO SSP1 (WinSSL) check is missing
|
||||
_add_if("SSPI" USE_WINDOWS_SSPI)
|
||||
_add_if("GSS-API" HAVE_GSS_API)
|
||||
# TODO SSP1 missing for SPNEGO
|
||||
_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND
|
||||
(HAVE_GSS_API OR USE_WINDOWS_SSPI))
|
||||
_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND
|
||||
(HAVE_GSS_API OR USE_WINDOWS_SSPI))
|
||||
# NTLM support requires crypto function adaptions from various SSL libs
|
||||
# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS, DARWINSSL
|
||||
if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR
|
||||
USE_WINDOWS_SSPI OR GNUTLS_ENABLED OR NSS_ENABLED OR DARWINSSL_ENABLED))
|
||||
_add_if("NTLM" 1)
|
||||
# TODO missing option (autoconf: --enable-ntlm-wb)
|
||||
_add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
|
||||
endif()
|
||||
# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP
|
||||
_add_if("TLS-SRP" USE_TLS_SRP)
|
||||
# TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header
|
||||
_add_if("HTTP2" USE_NGHTTP2)
|
||||
string(REPLACE ";" " " SUPPORT_FEATURES "${_items}")
|
||||
message(STATUS "Enabled features: ${SUPPORT_FEATURES}")
|
||||
|
||||
# Clear list and try to detect available protocols
|
||||
set(_items)
|
||||
_add_if("HTTP" NOT CURL_DISABLE_HTTP)
|
||||
_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED)
|
||||
_add_if("FTP" NOT CURL_DISABLE_FTP)
|
||||
_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED)
|
||||
_add_if("FILE" NOT CURL_DISABLE_FILE)
|
||||
_add_if("TELNET" NOT CURL_DISABLE_TELNET)
|
||||
_add_if("LDAP" NOT CURL_DISABLE_LDAP)
|
||||
# CURL_DISABLE_LDAP implies CURL_DISABLE_LDAPS
|
||||
# TODO check HAVE_LDAP_SSL (in autoconf this is enabled with --enable-ldaps)
|
||||
_add_if("LDAPS" NOT CURL_DISABLE_LDAPS AND
|
||||
((USE_OPENLDAP AND SSL_ENABLED) OR
|
||||
(NOT USE_OPENLDAP AND HAVE_LDAP_SSL)))
|
||||
_add_if("DICT" NOT CURL_DISABLE_DICT)
|
||||
_add_if("TFTP" NOT CURL_DISABLE_TFTP)
|
||||
_add_if("GOPHER" NOT CURL_DISABLE_GOPHER)
|
||||
_add_if("POP3" NOT CURL_DISABLE_POP3)
|
||||
_add_if("POP3S" NOT CURL_DISABLE_POP3 AND SSL_ENABLED)
|
||||
_add_if("IMAP" NOT CURL_DISABLE_IMAP)
|
||||
_add_if("IMAPS" NOT CURL_DISABLE_IMAP AND SSL_ENABLED)
|
||||
_add_if("SMTP" NOT CURL_DISABLE_SMTP)
|
||||
_add_if("SMTPS" NOT CURL_DISABLE_SMTP AND SSL_ENABLED)
|
||||
_add_if("SCP" USE_LIBSSH2)
|
||||
_add_if("SFTP" USE_LIBSSH2)
|
||||
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
|
||||
_add_if("RTMP" USE_LIBRTMP)
|
||||
list(SORT _items)
|
||||
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
|
||||
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
|
||||
|
||||
# curl-config needs the following options to be set.
|
||||
set(CC "${CMAKE_C_COMPILER}")
|
||||
# TODO probably put a -D... options here?
|
||||
set(CONFIGURE_OPTIONS "")
|
||||
# TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB?
|
||||
set(CPPFLAG_CURL_STATICLIB "")
|
||||
# TODO need to set this (see CURL_CHECK_CA_BUNDLE in acinclude.m4)
|
||||
set(CURL_CA_BUNDLE "")
|
||||
set(CURLVERSION "${CURL_VERSION}")
|
||||
set(ENABLE_SHARED "yes")
|
||||
if(CURL_STATICLIB)
|
||||
# Broken: LIBCURL_LIBS below; .a lib is not built
|
||||
message(WARNING "Static linking is broken!")
|
||||
set(ENABLE_STATIC "no")
|
||||
else()
|
||||
set(ENABLE_STATIC "no")
|
||||
endif()
|
||||
set(exec_prefix "\${prefix}")
|
||||
set(includedir "\${prefix}/include")
|
||||
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(LIBCURL_LIBS "")
|
||||
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
# TODO CURL_LIBS also contains absolute paths which don't work with static -l...
|
||||
foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
|
||||
set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}")
|
||||
endforeach()
|
||||
# "a" (Linux) or "lib" (Windows)
|
||||
string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
# Set this to "yes" to append all libraries on which -lcurl is dependent
|
||||
set(REQUIRE_LIB_DEPS "no")
|
||||
# SUPPORT_FEATURES
|
||||
# SUPPORT_PROTOCOLS
|
||||
set(VERSIONNUM "${CURL_VERSION_NUM}")
|
||||
|
||||
# Finally generate a "curl-config" matching this config
|
||||
configure_file("${CURL_SOURCE_DIR}/curl-config.in"
|
||||
"${CURL_BINARY_DIR}/curl-config" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/curl-config"
|
||||
DESTINATION bin
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Finally generate a pkg-config file matching this config
|
||||
configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in"
|
||||
"${CURL_BINARY_DIR}/libcurl.pc" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/libcurl.pc"
|
||||
DESTINATION lib/pkgconfig)
|
||||
|
||||
# This needs to be run very last so other parts of the scripts can take advantage of this.
|
||||
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2014, Daniel Stenberg, <daniel@haxx.se>.
|
||||
Copyright (c) 1996 - 2015, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
10
Makefile.am
10
Makefile.am
@@ -24,11 +24,10 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||
CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
|
||||
CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
|
||||
CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||
CMake/CurlTests.c CMake/FindGSS.cmake CMake/OtherTests.cmake \
|
||||
CMake/Platforms/WindowsCache.cmake CMake/Utilities.cmake \
|
||||
include/curl/curlbuild.h.cmake CMake/Macros.cmake
|
||||
|
||||
VC6_LIBTMPL = projects/Windows/VC6/lib/libcurl.tmpl
|
||||
VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp
|
||||
@@ -88,6 +87,7 @@ VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC_DIST = projects/README \
|
||||
projects/build-openssl.bat \
|
||||
projects/checksrc.bat \
|
||||
projects/Windows/VC6/curl.dsw \
|
||||
projects/Windows/VC6/lib/libcurl.dsw $(VC6_LIBDSP) \
|
||||
projects/Windows/VC6/src/curlsrc.dsw $(VC6_SRCDSP) \
|
||||
|
256
Makefile.dist
256
Makefile.dist
@@ -130,6 +130,42 @@ vc-x64: $(VC)
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||
|
||||
vc-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release WINDOWS_SSPI=1
|
||||
|
||||
vc-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1
|
||||
|
||||
vc-x64-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1
|
||||
|
||||
vc-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
@@ -142,29 +178,89 @@ vc-x64-zlib: $(VC)
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib
|
||||
|
||||
vc-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1
|
||||
|
||||
vc-x64-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1
|
||||
|
||||
vc-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
|
||||
vc-winssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl
|
||||
|
||||
vc-x64-winssl: $(VC)
|
||||
vc-ssl-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1
|
||||
|
||||
vc-x64-ssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1
|
||||
|
||||
vc-ssl-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
@@ -172,23 +268,143 @@ vc-ssl-zlib: $(VC)
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
|
||||
vc-winssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib
|
||||
|
||||
vc-x64-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
|
||||
vc-ssl-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1
|
||||
|
||||
vc-x64-ssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1
|
||||
|
||||
vc-ssl-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-ssh2-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib
|
||||
|
||||
vc-x64-ssl-ssh2-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib
|
||||
|
||||
vc-ssl-ssh2-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-ssh2-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1
|
||||
|
||||
vc-ssl-ssh2-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-ssl-ssh2-zlib-idn-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-ssh2-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib WINDOWS_SSPI=1
|
||||
|
||||
vc-winssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-x64-winssl-zlib-idn: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-winssl-zlib USE_IDN=1 WINDOWS_SSPI=1
|
||||
|
||||
vc-ssl-dll: $(VC)
|
||||
cd lib
|
||||
@@ -232,12 +448,6 @@ vc-zlib-dll: $(VC)
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||
|
||||
vc-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
|
||||
djgpp:
|
||||
$(MAKE) -C lib -f Makefile.dj
|
||||
$(MAKE) -C src -f Makefile.dj
|
||||
|
232
RELEASE-NOTES
232
RELEASE-NOTES
@@ -1,67 +1,146 @@
|
||||
Curl and libcurl 7.37.1
|
||||
Curl and libcurl 7.40.0
|
||||
|
||||
Public curl releases: 140
|
||||
Public curl releases: 143
|
||||
Command line options: 162
|
||||
curl_easy_setopt() options: 208
|
||||
Public functions in libcurl: 58
|
||||
Contributors: 1155
|
||||
Contributors: 1219
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o bits.close: introduce connection close tracking
|
||||
o darwinssl: Add support for --cacert
|
||||
o polarssl: add ALPN support
|
||||
o docs: Added new option man pages
|
||||
o http_digest: Added support for Windows SSPI based authentication
|
||||
o version info: Added Kerberos V5 to the supported features
|
||||
o Makefile: Added VC targets for WinIDN
|
||||
o config-win32: Introduce build targets for VS2012+
|
||||
o SSL: Add PEM format support for public key pinning
|
||||
o smtp: Added support for the conversion of Unix newlines during mail send [8]
|
||||
o smb: Added initial support for the SMB/CIFS protocol
|
||||
o Added support for HTTP over unix domain sockets, via
|
||||
CURLOPT_UNIX_SOCKET_PATH and --unix-socket
|
||||
o sasl: Added support for GSS-API based Kerberos V5 authentication
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o build: Fixed incorrect reference to curl_setup.h in Visual Studio files
|
||||
o build: Use $(TargetDir) and $(TargetName) macros for .pdb and .lib output
|
||||
o curl.1: clarify that -u can't specify a user with colon [1]
|
||||
o openssl: Fix uninitialized variable use in NPN callback
|
||||
o curl_easy_reset: reset the URL [2]
|
||||
o curl_version_info.3: returns a pointer to a static struct
|
||||
o url-parser: only use if_nametoindex if detected by configure [3]
|
||||
o select: with winsock, avoid passing unsupported arguments to select() [4]
|
||||
o gnutls: don't use deprecated type names anymore
|
||||
o gnutls: allow building with nghttp2 but without ALPN support
|
||||
o tests: Fix portability issue with the tftpd server
|
||||
o curl_sasl_sspi: Fixed corrupt hostname in DIGEST-MD5 SPN
|
||||
o curl_sasl: extended native DIGEST-MD5 cnonce to be a 32-byte hex string
|
||||
o random: use Curl_rand() for proper random data [5]
|
||||
o Curl_ossl_init: call OPENSSL_config for initing engines [6]
|
||||
o config-win32.h: Updated for VC12 [7]
|
||||
o winbuild: Don't USE_WINSSL when WITH_SSL is being used
|
||||
o getinfo: HTTP CONNECT code not reset between transfers [8]
|
||||
o Curl_rand: Use a fake entropy for debug builds when CURL_ENTROPY set
|
||||
o http2: avoid segfault when using the plain-text http2
|
||||
o conncache: move the connection counter to the cache struct
|
||||
o http2: better return code error checking
|
||||
o curlbuild: fix GCC build on SPARC systems without configure script
|
||||
o tool_metalink: Support polarssl as digest provider
|
||||
o curl.h: reverse the enum/define setup for old symbols
|
||||
o curl.h: moved two really old deprecated symbols
|
||||
o curl.h: renamed CURLOPT_DEPRECATEDx to CURLOPT_OBSOLETEx
|
||||
o buildconf: do not search tools in current directory.
|
||||
o OS400: make it compilable again. Make RPG binding up to date
|
||||
o nss: do not abort on connection failure (failing tests 305 and 404)
|
||||
o nss: make the fallback to SSLv3 work again
|
||||
o tool: prevent valgrind from reporting possibly lost memory (nss only)
|
||||
o progress callback: skip last callback update on errors [9]
|
||||
o nss: fix a memory leak when CURLOPT_CRLFILE is used
|
||||
o compiler warnings: potentially uninitialized variables [10]
|
||||
o url.c: Fixed memory leak on OOM
|
||||
o gnutls: ignore invalid certificate dates with VERIFYPEER disabled
|
||||
o gnutls: fix SRP support with versions of GnuTLS from 2.99.0
|
||||
o gnutls: fixed a couple of uninitialized variable references
|
||||
o gnutls: fixed compilation against versions < 2.12.0
|
||||
o build: Fixed overridden compiler PDB settings in VC7 to VC12
|
||||
o ntlm_wb: Fixed buffer size not being large enough for NTLMv2 sessions [11]
|
||||
o netrc: don't abort if home dir cannot be found
|
||||
o netrc: fixed thread safety problem by using getpwuid_r if available
|
||||
o cookie: avoid mutex deadlock [12]
|
||||
o configure: respect host tool prefix for krb5-config
|
||||
o gnutls: handle IP address in cert name check
|
||||
o darwinssl: fix session ID keys to only reuse identical sessions [18]
|
||||
o url-parsing: reject CRLFs within URLs [19]
|
||||
o OS400: Adjust specific support to last release
|
||||
o THANKS: Remove duplicate names
|
||||
o url.c: Fixed compilation warning
|
||||
o ssh: Fixed build on platforms where R_OK is not defined [1]
|
||||
o tool_strdup.c: include the tool strdup.h
|
||||
o build: Fixed Visual Studio project file generation of strdup.[c|h]
|
||||
o curl_easy_setopt.3: add CURLOPT_PINNEDPUBLICKEY [2]
|
||||
o curl.1: show zone index use in a URL
|
||||
o mk-ca-bundle.vbs: switch to new certdata.txt url
|
||||
o Makefile.dist: Added some missing SSPI configurations
|
||||
o build: Fixed no NTLM support for email when CURL_DISABLE_HTTP is defined
|
||||
o SSH: use the port number as well for known_known checks [3]
|
||||
o libssh2: detect features based on version, not configure checks
|
||||
o http2: Deal with HTTP/2 data inside Upgrade response header buffer [4]
|
||||
o multi: removed Curl_multi_set_easy_connection
|
||||
o symbol-scan.pl: do not require autotools
|
||||
o cmake: add ENABLE_THREADED_RESOLVER, rename ARES
|
||||
o cmake: build libhostname for test suite
|
||||
o cmake: fix HAVE_GETHOSTNAME definition
|
||||
o tests: fix libhostname visibility
|
||||
o tests: fix memleak in server/resolve.c
|
||||
o vtls.h: Fixed compiler warning when compiled without SSL
|
||||
o CMake: Restore order-dependent header checks
|
||||
o CMake: Restore order-dependent library checks
|
||||
o tool: Removed krb4 from the supported features
|
||||
o http2: Don't send Upgrade headers when we already do HTTP/2
|
||||
o examples: Don't call select() to sleep on windows [6]
|
||||
o win32: Updated some legacy APIs to use the newer extended versions [5]
|
||||
o easy.c: Fixed compilation warning when no verbose string support
|
||||
o connect.c: Fixed compilation warning when no verbose string support
|
||||
o build: in Makefile.m32 pass -F flag to windres
|
||||
o build: in Makefile.m32 add -m32 flag for 32bit
|
||||
o multi: when leaving for timeout, close accordingly
|
||||
o CMake: Simplify if() conditions on check result variables
|
||||
o build: in Makefile.m32 try to detect 64bit target
|
||||
o multi: inform about closed sockets before they are closed
|
||||
o multi-uv.c: close the file handle after download
|
||||
o examples: Wait recommended 100ms when no file descriptors are ready
|
||||
o ntlm: Split the SSPI based messaging code from the native messaging code
|
||||
o cmake: fix NTLM detection when CURL_DISABLE_HTTP defined
|
||||
o cmake: add Kerberos to the supported feature
|
||||
o CURLOPT_POSTFIELDS.3: mention the COPYPOSTFIELDS option
|
||||
o http: Disable pipelining for HTTP/2 and upgraded connections
|
||||
o ntlm: Fixed static'ness of local decode function
|
||||
o sasl: Reduced the need for two sets of NTLM messaging functions
|
||||
o multi.c: Fixed compilation warnings when no verbose string support
|
||||
o select.c: fix compilation for VxWorks [7]
|
||||
o multi-single.c: switch to use curl_multi_wait
|
||||
o curl_multi_wait.3: clarify numfds being used if not NULL
|
||||
o http.c: Fixed compilation warnings from features being disabled
|
||||
o NSS: enable the CAPATH option [9]
|
||||
o docs: Fix FAILONERROR typos
|
||||
o HTTP: don't abort connections with pending Negotiate authentication
|
||||
o HTTP: Free (proxy)userpwd for NTLM/Negotiate after sending a request
|
||||
o http_perhapsrewind: don't abort CONNECT requests
|
||||
o build: updated dependencies in makefiles
|
||||
o multi.c: Fixed compilation warning
|
||||
o ftp.c: Fixed compilation warnings when proxy support disabled
|
||||
o get_url_file_name: Fixed crash on OOM on debug build
|
||||
o cookie.c: Refactored cleanup code to simplify
|
||||
o OS400: enable NTLM authentication
|
||||
o ntlm: Use Windows Crypt API
|
||||
o http2: avoid logging neg "failure" if h2 was not requested
|
||||
o schannel_recv: return the correct code [10]
|
||||
o VC build: added sspi define for winssl-zlib builds
|
||||
o Curl_client_write(): chop long data, convert data only once
|
||||
o openldap: do not ignore Curl_client_write() return code
|
||||
o ldap: check Curl_client_write() return codes
|
||||
o parsedate.c: Fixed compilation warning
|
||||
o url.c: Fixed compilation warning when USE_NTLM is not defined
|
||||
o ntlm_wb_response: fix "statement not reached" [11]
|
||||
o telnet: fix "cast increases required alignment of target type"
|
||||
o smtp: Fixed dot stuffing when EOL characters at end of input buffers [12]
|
||||
o ntlm: Allow NTLM2Session messages when USE_NTRESPONSES manually defined
|
||||
o ntlm: Disable NTLM v2 when 64-bit integers are not supported
|
||||
o ntlm: Use short integer when decoding 16-bit values
|
||||
o ftp.c: Fixed compilation warning when no verbose string support
|
||||
o synctime.c: fixed timeserver URLs
|
||||
o mk-ca-bundle.pl: restored forced run again
|
||||
o ntlm: Fixed return code for bad type-2 Target Info
|
||||
o curl_schannel.c: Data may be available before connection shutdown
|
||||
o curl_schannel: Improvements to memory re-allocation strategy [13]
|
||||
o darwinssl: aprintf() to allocate the session key
|
||||
o tool_util.c: Use GetTickCount64 if it is available
|
||||
o lib: Fixed multiple code analysis warnings if SAL are available
|
||||
o tool_binmode.c: Explicitly ignore the return code of setmode
|
||||
o tool_urlglob.c: Silence warning C6293: Ill-defined for-loop
|
||||
o opts: Warn CURLOPT_TIMEOUT overrides when set after CURLOPT_TIMEOUT_MS
|
||||
o SFTP: work-around servers that return zero size on STAT [14]
|
||||
o connect: singleipconnect(): properly try other address families after failure
|
||||
o IPV6: address scope != scope id [15]
|
||||
o parseurlandfillconn(): fix improper non-numeric scope_id stripping [16]
|
||||
o secureserver.pl: make OpenSSL CApath and cert absolute path values
|
||||
o secureserver.pl: update Windows detection and fix path conversion
|
||||
o secureserver.pl: clean up formatting of config and fix verbose output
|
||||
o tests: Added Windows support using Cygwin-based OpenSSH
|
||||
o sockfilt.c: use non-Ex functions that are available before WinXP
|
||||
o VMS: Updates for 0740-0D1220
|
||||
o openssl: warn for SRP set if SSLv3 is used, not for TLS version
|
||||
o openssl: make it compile against openssl 1.1.0-DEV master branch
|
||||
o openssl: fix SSL/TLS versions in verbose output
|
||||
o curl: show size of inhibited data when using -v
|
||||
o build: Removed WIN32 definition from the Visual Studio projects
|
||||
o build: Removed WIN64 definition from the libcurl Visual Studio projects
|
||||
o vtls: Use bool for Curl_ssl_getsessionid() return type
|
||||
o sockfilt.c: Replace 100ms sleep with thread throttle
|
||||
o sockfilt.c: Reduce the number of individual memory allocations
|
||||
o vtls: Don't set cert info count until memory allocation is successful
|
||||
o nss: Don't ignore Curl_ssl_init_certinfo() OOM failure
|
||||
o nss: Don't ignore Curl_extract_certinfo() OOM failure
|
||||
o vtls: Fixed compilation warning and an ignored return code
|
||||
o sockfilt.c: Fixed compilation warnings
|
||||
o darwinssl: Fixed compilation warning
|
||||
o vtls: Use '(void) arg' for unused parameters
|
||||
o sepheaders.c: Fixed resource leak on failure
|
||||
o lib1900.c: Fixed cppcheck error [17]
|
||||
o ldap: Fixed Unicode connection details in Win32 initialsation / bind calls
|
||||
o ldap: Fixed Unicode DN, attributes and filter in Win32 search calls
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -70,26 +149,35 @@ This release includes the following known bugs:
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Alessandro Ghedini, Brad Spencer, Chris Young, Colin Hogben, Dan Fandrich,
|
||||
Daniel Stenberg, David Woodhouse, Dimitrios Siganos, Fabian Frank,
|
||||
Glen A Johnson Jr., Hubert Kario, Jeff Pohlmeyer, Jonathan Cardoso Machado,
|
||||
Kamil Dudka, Lindley French, Marcel Raad, Michał Górny, Nick Zitzmann,
|
||||
Patrick Monnerat, Ray Satiro, Steve Holme, Tatsuhiro Tsujikawa,
|
||||
Vilmos Nebehaj, Yousuke Kimoto, Dmitry Falko
|
||||
Andrey Labunets, Anthon Pang, Bill Nagel, Brad Harder, Brad King, Carlo Wood,
|
||||
Christian Hägele, Dan Fandrich, Daniel Stenberg, Dave Reisner, Frank Gevaerts,
|
||||
Gisle Vanem, Guenter Knauf, Jan Ehrhardt, Johan Lantz, John E. Malmberg,
|
||||
Jon Spencer, Julien Nabet, Kamil Dudka, Kyle J. McKay, Lucas Pardue,
|
||||
Marc Hesse, Marc Hoersken, Marc Renault, Michael Osipov, Nick Zitzmann,
|
||||
Nobuhiro Ban, Patrick Monnerat, Peter Wu, Ray Satiro, Sam Hurst,
|
||||
Stefan Bühler, Stefan Neis, Steve Holme, Tae Hyoung Ahn, Tatsuhiro Tsujikawa,
|
||||
Tomasz Kojm, Tor Arntsen, Waldek Kozba, Warren Menzer
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
References to bug reports and discussions on issues:
|
||||
|
||||
[1] = http://curl.haxx.se/bug/view.cgi?id=1375
|
||||
[2] = http://curl.haxx.se/mail/lib-2014-05/0235.html
|
||||
[3] = http://curl.haxx.se/mail/lib-2014-05/0260.html
|
||||
[4] = http://curl.haxx.se/mail/lib-2014-05/0278.html
|
||||
[5] = http://curl.haxx.se/mail/lib-2014-06/0001.html
|
||||
[6] = http://curl.haxx.se/mail/lib-2014-06/0003.html
|
||||
[7] = http://curl.haxx.se/bug/view.cgi?id=1378
|
||||
[8] = http://curl.haxx.se/bug/view.cgi?id=1380
|
||||
[9] = http://curl.haxx.se/mail/lib-2014-06/0062.html
|
||||
[10] = http://curl.haxx.se/bug/view.cgi?id=1391
|
||||
[11] = http://curl.haxx.se/mail/lib-2014-07/0103.html
|
||||
[12] = http://curl.haxx.se/mail/lib-2014-02/0184.html
|
||||
[1] = http://curl.haxx.se/mail/lib-2014-11/0035.html
|
||||
[2] = http://curl.haxx.se/mail/lib-2014-11/0078.html
|
||||
[3] = http://curl.haxx.se/bug/view.cgi?id=1448
|
||||
[4] = https://github.com/tatsuhiro-t/nghttp2/issues/103
|
||||
[5] = http://sourceforge.net/p/curl/feature-requests/82/
|
||||
[6] = http://curl.haxx.se/mail/lib-2014-11/0221.html
|
||||
[7] = http://curl.haxx.se/bug/view.cgi?id=1455
|
||||
[8] = http://curl.haxx.se/bug/view.cgi?id=1456
|
||||
[9] = http://curl.haxx.se/bug/view.cgi?id=1457
|
||||
[10] = http://curl.haxx.se/bug/view.cgi?id=1462
|
||||
[11] = http://curl.haxx.se/mail/lib-2014-12/0089.html
|
||||
[12] = http://curl.haxx.se/bug/view.cgi?id=1456
|
||||
[13] = http://curl.haxx.se/bug/view.cgi?id=1450
|
||||
[14] = http://curl.haxx.se/mail/lib-2014-12/0103.html
|
||||
[15] = http://curl.haxx.se/bug/view.cgi?id=1451
|
||||
[16] = http://curl.haxx.se/bug/view.cgi?id=1449
|
||||
[17] = https://github.com/bagder/curl/pull/133
|
||||
[18] = http://curl.haxx.se/docs/adv_20150108A.html
|
||||
[19] = http://curl.haxx.se/docs/adv_20150108B.html
|
||||
|
@@ -1,4 +0,0 @@
|
||||
To be addressed in ...
|
||||
=======================
|
||||
|
||||
327 -
|
@@ -2614,8 +2614,8 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||
capath="no"
|
||||
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
|
||||
dnl --with-ca-path given
|
||||
if test "x$OPENSSL_ENABLED" != "x1"; then
|
||||
AC_MSG_ERROR([--with-ca-path only works with openSSL])
|
||||
if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
|
||||
AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL])
|
||||
fi
|
||||
capath="$want_capath"
|
||||
ca="no"
|
||||
|
47
buildconf
47
buildconf
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -190,32 +190,32 @@ else
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# GNU libtool preliminary check
|
||||
# GNU libtoolize preliminary check
|
||||
#
|
||||
want_lt_major=1
|
||||
want_lt_minor=4
|
||||
want_lt_patch=2
|
||||
want_lt_version=1.4.2
|
||||
|
||||
# This approach that tries 'glibtool' first is intended for systems that
|
||||
# have GNU libtool named as 'glibtool' and libtool not being GNU's.
|
||||
# This approach that tries 'glibtoolize' first is intended for systems that
|
||||
# have GNU libtool named as 'glibtoolize' and libtoolize not being GNU's.
|
||||
|
||||
libtool=`findtool glibtool 2>/dev/null`
|
||||
if test ! -x "$libtool"; then
|
||||
libtool=`findtool ${LIBTOOL:-libtool}`
|
||||
libtoolize=`findtool glibtoolize 2>/dev/null`
|
||||
if test ! -x "$libtoolize"; then
|
||||
libtoolize=`findtool ${LIBTOOLIZE:-libtoolize}`
|
||||
fi
|
||||
if test -z "$libtool"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need GNU libtool $want_lt_version or newer installed."
|
||||
if test -z "$libtoolize"; then
|
||||
echo "buildconf: libtoolize not found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
lt_pver=`$libtool --version 2>/dev/null|head -n 1`
|
||||
lt_pver=`$libtoolize --version 2>/dev/null|head -n 1`
|
||||
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
|
||||
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
|
||||
if test -z "$lt_version"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need GNU libtool $want_lt_version or newer installed."
|
||||
echo "buildconf: libtoolize not found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
|
||||
@@ -245,27 +245,12 @@ else
|
||||
lt_status="good"
|
||||
fi
|
||||
if test "$lt_status" != "good"; then
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " You need GNU libtool $want_lt_version or newer installed."
|
||||
echo "buildconf: libtoolize version $lt_version found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: libtool version $lt_version (ok)"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# GNU libtoolize check
|
||||
#
|
||||
if test -z "$LIBTOOLIZE"; then
|
||||
# use (g)libtoolize from same location as (g)libtool
|
||||
libtoolize="${libtool}ize"
|
||||
else
|
||||
libtoolize=`findtool $LIBTOOLIZE`
|
||||
fi
|
||||
if test ! -f "$libtoolize"; then
|
||||
echo "buildconf: libtoolize not found."
|
||||
echo " You need GNU libtoolize $want_lt_version or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
echo "buildconf: libtoolize version $lt_version (ok)"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# m4 check
|
||||
|
182
configure.ac
182
configure.ac
@@ -151,10 +151,10 @@ dnl initialize all the info variables
|
||||
curl_ssh_msg="no (--with-libssh2)"
|
||||
curl_zlib_msg="no (--with-zlib)"
|
||||
curl_gss_msg="no (--with-gssapi)"
|
||||
curl_spnego_msg="no (--with-spnego)"
|
||||
curl_tls_srp_msg="no (--enable-tls-srp)"
|
||||
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
|
||||
curl_ipv6_msg="no (--enable-ipv6)"
|
||||
curl_unix_sockets_msg="no (--enable-unix-sockets)"
|
||||
curl_idn_msg="no (--with-{libidn,winidn})"
|
||||
curl_manual_msg="no (--enable-manual)"
|
||||
curl_libcurl_msg="enabled (--disable-libcurl-option)"
|
||||
@@ -575,6 +575,22 @@ AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
|
||||
)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether to support smb])
|
||||
AC_ARG_ENABLE(smb,
|
||||
AC_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
|
||||
AC_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS])
|
||||
AC_SUBST(CURL_DISABLE_SMB, [1])
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to support smtp])
|
||||
AC_ARG_ENABLE(smtp,
|
||||
AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
|
||||
@@ -1048,10 +1064,10 @@ dnl **********************************************************************
|
||||
dnl Checks for IPv6
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_MSG_CHECKING([whether to enable ipv6])
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
|
||||
AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
|
||||
AC_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
|
||||
AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
@@ -1134,41 +1150,6 @@ no)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for FBopenssl(SPNEGO) libraries
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_ARG_WITH(spnego,
|
||||
AC_HELP_STRING([--with-spnego=DIR],
|
||||
[Specify location of SPNEGO library fbopenssl]), [
|
||||
SPNEGO_ROOT="$withval"
|
||||
if test x"$SPNEGO_ROOT" != xno; then
|
||||
want_spnego="yes"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([if SPNEGO support is requested])
|
||||
if test x"$want_spnego" = xyes; then
|
||||
|
||||
if test X"$SPNEGO_ROOT" = Xyes; then
|
||||
AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
if test -z "$SPNEGO_LIB_DIR"; then
|
||||
LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SPNEGO, 1,
|
||||
[Define this if you have the SPNEGO library fbopenssl])
|
||||
curl_spnego_msg="enabled"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for GSS-API libraries
|
||||
dnl **********************************************************************
|
||||
@@ -1284,7 +1265,7 @@ else
|
||||
fi
|
||||
if test x"$want_gss" = xyes; then
|
||||
AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
|
||||
|
||||
HAVE_GSSAPI=1
|
||||
curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
|
||||
|
||||
if test -n "$gnu_gss"; then
|
||||
@@ -1296,12 +1277,6 @@ if test x"$want_gss" = xyes; then
|
||||
*-*-darwin*)
|
||||
LIBS="-lgssapi_krb5 -lresolv $LIBS"
|
||||
;;
|
||||
*-hp-hpux*)
|
||||
if test "$GSSAPI_ROOT" != "yes"; then
|
||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
|
||||
fi
|
||||
LIBS="-lgss $LIBS"
|
||||
;;
|
||||
*)
|
||||
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
|
||||
dnl krb5-config doesn't have --libs-only-L or similar, put everything
|
||||
@@ -1313,11 +1288,22 @@ if test x"$want_gss" = xyes; then
|
||||
dnl into LIBS
|
||||
gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
|
||||
LIBS="$gss_libs $LIBS"
|
||||
elif test "$GSSAPI_ROOT" != "yes"; then
|
||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
|
||||
LIBS="-lgssapi $LIBS"
|
||||
else
|
||||
LIBS="-lgssapi $LIBS"
|
||||
case $host in
|
||||
*-hp-hpux*)
|
||||
gss_libname="gss"
|
||||
;;
|
||||
*)
|
||||
gss_libname="gssapi"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$GSSAPI_ROOT" != "yes"; then
|
||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
|
||||
LIBS="-l$gss_libname $LIBS"
|
||||
else
|
||||
LIBS="-l$gss_libname $LIBS"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -1601,10 +1587,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
ENGINE_cleanup \
|
||||
CRYPTO_cleanup_all_ex_data \
|
||||
SSL_get_shutdown \
|
||||
SSLv2_client_method \
|
||||
SSL_CTX_set_next_proto_select_cb \
|
||||
SSL_CTX_set_alpn_protos \
|
||||
SSL_CTX_set_alpn_select_cb )
|
||||
SSLv2_client_method )
|
||||
|
||||
dnl Make an attempt to detect if this is actually yassl's headers and
|
||||
dnl OpenSSL emulation layer. We still leave everything else believing
|
||||
@@ -2114,6 +2097,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
if test "x$USE_NSS" = "xyes"; then
|
||||
AC_MSG_NOTICE([detected NSS version $version])
|
||||
|
||||
dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
|
||||
NSS_LIBS=$addlib
|
||||
AC_SUBST([NSS_LIBS])
|
||||
|
||||
dnl when shared libs were found in a path that the run-time
|
||||
dnl linker doesn't search through, we need to add it to
|
||||
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
|
||||
@@ -2362,12 +2349,6 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
||||
dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
|
||||
dnl to prevent further configure tests to fail due to this
|
||||
|
||||
dnl libssh2_version is a post 1.0 addition
|
||||
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
||||
dnl libssh2_scp_send64 was added in 1.2.6
|
||||
dnl libssh2_session_handshake was added in 1.2.8
|
||||
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
|
||||
libssh2_scp_send64 libssh2_session_handshake)
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
||||
export LD_LIBRARY_PATH
|
||||
@@ -2787,7 +2768,7 @@ if test X"$want_h2" != Xno; then
|
||||
CPPFLAGS="$CPPFLAGS $CPP_H2"
|
||||
LIBS="$LIB_H2 $LIBS"
|
||||
|
||||
AC_CHECK_LIB(nghttp2, nghttp2_session_client_new,
|
||||
AC_CHECK_LIB(nghttp2, nghttp2_session_callbacks_set_send_callback,
|
||||
[
|
||||
AC_CHECK_HEADERS(nghttp2/nghttp2.h,
|
||||
curl_h2_msg="enabled (nghttp2)"
|
||||
@@ -3293,6 +3274,39 @@ if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$
|
||||
curl_tls_srp_msg="enabled"
|
||||
fi
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable Unix domain sockets support
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether to enable Unix domain sockets])
|
||||
AC_ARG_ENABLE(unix-sockets,
|
||||
AC_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
|
||||
AC_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
|
||||
[ case "$enableval" in
|
||||
no) AC_MSG_RESULT(no)
|
||||
want_unix_sockets=no
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
want_unix_sockets=yes
|
||||
;;
|
||||
esac ], [
|
||||
AC_MSG_RESULT(auto)
|
||||
want_unix_sockets=auto
|
||||
]
|
||||
)
|
||||
if test "x$want_unix_sockets" != "xno"; then
|
||||
AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
|
||||
AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
|
||||
AC_SUBST(USE_UNIX_SOCKETS, [1])
|
||||
curl_unix_sockets_msg="enabled"
|
||||
], [
|
||||
if test "x$want_unix_sockets" = "xyes"; then
|
||||
AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
|
||||
fi
|
||||
], [
|
||||
#include <sys/un.h>
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable cookies support
|
||||
dnl
|
||||
@@ -3376,6 +3390,9 @@ fi
|
||||
if test "x$IPV6_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
|
||||
fi
|
||||
if test "x$USE_UNIX_SOCKETS" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
|
||||
fi
|
||||
if test "x$HAVE_LIBZ" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
|
||||
fi
|
||||
@@ -3388,17 +3405,34 @@ fi
|
||||
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
||||
fi
|
||||
if test "x$CURL_DISABLE_HTTP" != "x1" -a \
|
||||
"x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
|
||||
|
||||
if test "x$HAVE_GSSAPI" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
|
||||
fi
|
||||
|
||||
if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
|
||||
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
|
||||
fi
|
||||
|
||||
if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
|
||||
\( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
|
||||
fi
|
||||
|
||||
if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
|
||||
-o "x$DARWINSSL_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
||||
if test "x$NTLM_WB_ENABLED" = "x1"; then
|
||||
|
||||
if test "x$CURL_DISABLE_HTTP" != "x1" -a \
|
||||
"x$NTLM_WB_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$USE_TLS_SRP" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
|
||||
fi
|
||||
@@ -3406,12 +3440,6 @@ fi
|
||||
if test "x$USE_NGHTTP2" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
|
||||
fi
|
||||
if test "x$curl_spnego_msg" = "xenabled"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
|
||||
fi
|
||||
if test "x$want_gss" = "xyes"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
|
||||
fi
|
||||
|
||||
AC_SUBST(SUPPORT_FEATURES)
|
||||
|
||||
@@ -3464,6 +3492,16 @@ if test "x$CURL_DISABLE_IMAP" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
|
||||
fi
|
||||
fi
|
||||
if test "x$CURL_DISABLE_SMB" != "x1" \
|
||||
-a "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" \
|
||||
-a \( "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
|
||||
-o "x$DARWINSSL_ENABLED" = "x1" \); then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
|
||||
if test "x$SSL_ENABLED" = "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$CURL_DISABLE_SMTP" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
|
||||
if test "x$SSL_ENABLED" = "x1"; then
|
||||
@@ -3560,10 +3598,10 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
SSH support: ${curl_ssh_msg}
|
||||
zlib support: ${curl_zlib_msg}
|
||||
GSS-API support: ${curl_gss_msg}
|
||||
SPNEGO support: ${curl_spnego_msg}
|
||||
TLS-SRP support: ${curl_tls_srp_msg}
|
||||
resolver: ${curl_res_msg}
|
||||
ipv6 support: ${curl_ipv6_msg}
|
||||
IPv6 support: ${curl_ipv6_msg}
|
||||
Unix sockets support: ${curl_unix_sockets_msg}
|
||||
IDN support: ${curl_idn_msg}
|
||||
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
|
||||
Built-in manual: ${curl_manual_msg}
|
||||
|
@@ -25,6 +25,10 @@
|
||||
# This script shows all mentioned contributors from <hash> until HEAD. To aid
|
||||
# when writing RELEASE-NOTES and THANKS.
|
||||
#
|
||||
# Use --releasenotes to also include the names from the existing RELEASE-NOTES
|
||||
# file, which is handy when we've added names manually in there that should be
|
||||
# included in an updated list.
|
||||
#
|
||||
|
||||
start=$1
|
||||
|
||||
@@ -34,17 +38,35 @@ fi
|
||||
|
||||
# filter out Author:, Commit: and *by: lines
|
||||
# cut off the email parts
|
||||
# split list of names at comma
|
||||
# split list of names at " and "
|
||||
# cut off spaces first and last on the line
|
||||
# filter alternatives through THANKS-filter
|
||||
# only count names with a space (ie more than one word)
|
||||
# sort all unique names
|
||||
# awk them into RELEASE-NOTES format
|
||||
(
|
||||
git log $start..HEAD | \
|
||||
egrep '(Author|Commit|by):' | \
|
||||
egrep -i '(Author|Commit|by):' | \
|
||||
cut -d: -f2- | \
|
||||
cut '-d<' -f1 | \
|
||||
sed -e 's/^ //' -e 's/ $//g' | \
|
||||
tr , '\012' | \
|
||||
sed 's/ and /\n/' | \
|
||||
sed -e 's/^ //' -e 's/ $//g'
|
||||
|
||||
if echo "$*" | grep -qw -- '--releasenotes';then
|
||||
# if --releasenotes was used
|
||||
# grep out the list of names from RELEASE-NOTES
|
||||
# split on ", "
|
||||
# remove leading white spaces
|
||||
grep "^ [^ ]" RELEASE-NOTES| \
|
||||
sed 's/, */\n/g'| \
|
||||
sed 's/^ *//'
|
||||
fi
|
||||
)| \
|
||||
sed -f ./docs/THANKS-filter | \
|
||||
grep ' ' | \
|
||||
sort -u |
|
||||
sort -fu | \
|
||||
awk '{
|
||||
num++;
|
||||
n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
|
||||
|
@@ -128,6 +128,11 @@ Mono
|
||||
libcurl-net by Jeffrey Phillips
|
||||
http://sourceforge.net/projects/libcurl-net/
|
||||
|
||||
node.js
|
||||
|
||||
node-libcurl by Jonathan Cardoso Machado
|
||||
https://github.com/JCMais/node-libcurl
|
||||
|
||||
Object-Pascal
|
||||
|
||||
Free Pascal, Delphi and Kylix binding written by Christophe Espern.
|
||||
|
56
docs/FAQ
56
docs/FAQ
@@ -80,6 +80,7 @@ FAQ
|
||||
4.17 Non-functional connect timeouts on Windows
|
||||
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
||||
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||
4.20 curl doesn't return error for HTTP non-200 responses!
|
||||
|
||||
5. libcurl Issues
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -133,14 +134,14 @@ FAQ
|
||||
|
||||
A free and easy-to-use client-side URL transfer library, supporting DICT,
|
||||
FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
|
||||
POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
|
||||
POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP.
|
||||
|
||||
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
|
||||
kerberos, HTTP form based upload, proxies, cookies, user+password
|
||||
Kerberos, SPNEGO, HTTP form based upload, proxies, cookies, user+password
|
||||
authentication, file transfer resume, http proxy tunneling and more!
|
||||
|
||||
libcurl is highly portable, it builds and works identically on numerous
|
||||
platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
|
||||
platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HP-UX,
|
||||
IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOS, Mac
|
||||
OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS, Symbian, OSF,
|
||||
Android, Minix, IBM TPF and more...
|
||||
@@ -155,7 +156,10 @@ FAQ
|
||||
Since curl uses libcurl, curl supports the same wide range of common
|
||||
Internet protocols that libcurl does.
|
||||
|
||||
We pronounce curl and cURL with an initial k sound: [kurl].
|
||||
We pronounce curl with an initial k sound. It rhymes with words like girl
|
||||
and earl. This is a short WAV file to help you:
|
||||
|
||||
http://media.merriam-webster.com/soundc11/c/curl0001.wav
|
||||
|
||||
There are numerous sub-projects and related projects that also use the word
|
||||
curl in the project names in various combinations, but you should take
|
||||
@@ -238,10 +242,10 @@ FAQ
|
||||
1.6 What do you get for making curl?
|
||||
|
||||
Project cURL is entirely free and open. No person gets paid for developing
|
||||
(lib)curl on full or even part time. We do this voluntarily on our spare
|
||||
time. Occasionally companies pay individual developers to work on curl, but
|
||||
that's up to each company and developer. It is not controlled by nor
|
||||
supervised in any way by the project.
|
||||
curl on full time. We do this voluntarily, mostly on spare time.
|
||||
Occasionally companies pay individual developers to work on curl, but that's
|
||||
up to each company and developer. It is not controlled by nor supervised in
|
||||
any way by the project.
|
||||
|
||||
We still get help from companies. Haxx provides web site, bandwidth, mailing
|
||||
lists etc, sourceforge.net hosts project services we take advantage from,
|
||||
@@ -423,7 +427,7 @@ FAQ
|
||||
|
||||
curl can be built to use one of the following SSL alternatives: OpenSSL,
|
||||
GnuTLS, yassl, NSS, PolarSSL, axTLS, Secure Transport (native iOS/OS X),
|
||||
WinSSL (native Windows) or qssl (native IBM i). They all have their pros
|
||||
WinSSL (native Windows) or GSKit (native IBM i). They all have their pros
|
||||
and cons, and we try to maintain a comparison of them here:
|
||||
http://curl.haxx.se/docs/ssl-compared.html
|
||||
|
||||
@@ -1086,7 +1090,31 @@ FAQ
|
||||
immediately if its lone network connection goes down. That can be achieved
|
||||
by having the application monitor the network connection on its own using an
|
||||
OS-specific mechanism, then signalling libcurl to abort (see also item 5.13).
|
||||
|
||||
|
||||
4.20 curl doesn't return error for HTTP non-200 responses!
|
||||
|
||||
Correct. Unless you use -f (--fail).
|
||||
|
||||
When doing HTTP transfers, curl will perform exactly what you're asking it
|
||||
to do and if successful it will not return an error. You can use curl to
|
||||
test your web server's "file not found" page (that gets 404 back), you can
|
||||
use it to check your authentication protected web pages (that get a 401
|
||||
back) and so on.
|
||||
|
||||
The specific HTTP response code does not constitute a problem or error for
|
||||
curl. It simply sends and delivers HTTP as you asked and if that worked,
|
||||
everything is fine and dandy. The response code is generally providing more
|
||||
higher level error information that curl doesn't care about. The error was
|
||||
not in the HTTP transfer.
|
||||
|
||||
If you want your command line to treat error codes in the 400 and up range
|
||||
as errors and thus return a non-zero value and possibly show an error
|
||||
message, curl has a dedicated option for that: -f (CURLOPT_FAILONERROR in
|
||||
libcurl speak).
|
||||
|
||||
You can also use the -w option and the variable %{response_code} to extract
|
||||
the exact response code that was return in the response.
|
||||
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
@@ -1246,7 +1274,7 @@ FAQ
|
||||
you want to change name resolver function you must rebuild libcurl and tell
|
||||
it to use a different function.
|
||||
|
||||
- The non-ipv6 resolver that can use one out of four host name resolve calls
|
||||
- The non-IPv6 resolver that can use one out of four host name resolve calls
|
||||
(depending on what your system supports):
|
||||
|
||||
A - gethostbyname()
|
||||
@@ -1254,15 +1282,15 @@ FAQ
|
||||
C - gethostbyname_r() with 5 arguments
|
||||
D - gethostbyname_r() with 6 arguments
|
||||
|
||||
- The ipv6-resolver that uses getaddrinfo()
|
||||
- The IPv6-resolver that uses getaddrinfo()
|
||||
|
||||
- The c-ares based name resolver that uses the c-ares library for resolves.
|
||||
Using this offers asynchronous name resolves.
|
||||
|
||||
- The threaded resolver (default option on Windows). It uses:
|
||||
|
||||
A - gethostbyname() on plain ipv4 hosts
|
||||
B - getaddrinfo() on ipv6-enabled hosts
|
||||
A - gethostbyname() on plain IPv4 hosts
|
||||
B - getaddrinfo() on IPv6 enabled hosts
|
||||
|
||||
Also note that libcurl never resolves or reverse-lookups addresses given as
|
||||
pure numbers, such as 127.0.0.1 or ::1.
|
||||
|
@@ -28,7 +28,7 @@ libcurl
|
||||
- selectable network interface for outgoing traffic
|
||||
- IPv6 support on unix and Windows
|
||||
- persistent connections
|
||||
- socks5 support
|
||||
- socks 4 + 5 support, with or without local name resolving
|
||||
- supports user name and password in proxy environment variables
|
||||
- operations through proxy "tunnel" (using CONNECT)
|
||||
- support for large files (>2GB and >4GB) during upload and download
|
||||
@@ -45,8 +45,8 @@ HTTP
|
||||
- POST
|
||||
- Pipelining
|
||||
- multipart formpost (RFC1867-style)
|
||||
- authentication: Basic, Digest, NTLM (*9), GSS-Negotiate/Negotiate (*3) and
|
||||
SPNEGO (*4) to server and proxy
|
||||
- authentication: Basic, Digest, NTLM (*9) and Negotiate (SPNEGO) (*3)
|
||||
to server and proxy
|
||||
- resume (both GET and PUT)
|
||||
- follow redirects
|
||||
- maximum amount of redirects to follow
|
||||
@@ -64,6 +64,7 @@ HTTP
|
||||
- Content-Encoding support for deflate and gzip
|
||||
- "Transfer-Encoding: chunked" support in uploads
|
||||
- data compression (*12)
|
||||
- HTTP/2 (*5)
|
||||
|
||||
HTTPS (*1)
|
||||
- (all the HTTP features)
|
||||
@@ -76,8 +77,7 @@ HTTPS (*1)
|
||||
FTP
|
||||
- download
|
||||
- authentication
|
||||
- kerberos4 (*5)
|
||||
- kerberos5 (*3)
|
||||
- Kerberos 5 (*14)
|
||||
- active/passive using PORT, EPRT, PASV or EPSV
|
||||
- single file size information (compare to HTTP HEAD)
|
||||
- 'type=' URL support
|
||||
@@ -127,8 +127,15 @@ FILE
|
||||
- upload
|
||||
- resume
|
||||
|
||||
SMB
|
||||
- SMBv1 over TCP and SSL
|
||||
- download
|
||||
- upload
|
||||
- authentication with NTLMv1
|
||||
|
||||
SMTP
|
||||
- authentication: Plain, Login, CRAM-MD5, Digest-MD5 and NTLM (*9)
|
||||
- authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and Kerberos 5
|
||||
(*4)
|
||||
- send e-mails
|
||||
- mail from support
|
||||
- mail size support
|
||||
@@ -143,8 +150,8 @@ SMTPS (*1)
|
||||
|
||||
POP3
|
||||
- authentication: Clear Text, APOP and SASL
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
|
||||
NTLM (*9)
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and
|
||||
Kerberos 5 (*4)
|
||||
- list e-mails
|
||||
- retrieve e-mails
|
||||
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
|
||||
@@ -158,8 +165,8 @@ POP3S (*1)
|
||||
|
||||
IMAP
|
||||
- authentication: Clear Text and SASL
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5 and
|
||||
NTLM (*9)
|
||||
- SASL based authentication: Plain, Login, CRAM-MD5, Digest-MD5, NTLM (*9) and
|
||||
Kerberos 5 (*4)
|
||||
- list the folders of a mailbox
|
||||
- select a mailbox with support for verifying the UIDVALIDITY
|
||||
- fetch e-mails with support for specifying the UID and SECTION
|
||||
@@ -177,13 +184,15 @@ FOOTNOTES
|
||||
=========
|
||||
|
||||
*1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS, PolarSSL, WinSSL (native
|
||||
Windows), Secure Transport (native iOS/OS X) or qssl (native IBM i)
|
||||
Windows), Secure Transport (native iOS/OS X) or GSKit (native IBM i)
|
||||
*2 = requires OpenLDAP
|
||||
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar
|
||||
*4 = requires FBopenssl
|
||||
*5 = requires a krb4 library, such as the MIT one or similar
|
||||
*3 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos) or
|
||||
SSPI (native Windows)
|
||||
*4 = requires a GSS-API implementation, however, only Windows SSPI is
|
||||
currently supported
|
||||
*5 = requires nghttp2 and possibly a recent TLS library
|
||||
*6 = requires c-ares
|
||||
*7 = requires OpenSSL, NSS, qssl, WinSSL or Secure Transport; GnuTLS, for
|
||||
*7 = requires OpenSSL, NSS, GSKit, WinSSL or Secure Transport; GnuTLS, for
|
||||
example, only supports SSLv3 and TLSv1
|
||||
*8 = requires libssh2
|
||||
*9 = requires OpenSSL, GnuTLS, NSS, yassl, Secure Transport or SSPI (native
|
||||
@@ -194,3 +203,4 @@ FOOTNOTES
|
||||
*12 = requires libz
|
||||
*13 = requires libmetalink, and either an Apple or Microsoft operating
|
||||
system, or OpenSSL, or GnuTLS, or NSS
|
||||
*14 = requires a GSS-API implementation (such as Heimdal or MIT Kerberos)
|
||||
|
260
docs/HISTORY
260
docs/HISTORY
@@ -4,23 +4,31 @@
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How cURL Became Like This
|
||||
How cURL Became Like This
|
||||
=========================
|
||||
|
||||
|
||||
Towards the end of 1996, Daniel Stenberg came up with the idea to make
|
||||
Towards the end of 1996, Daniel Stenberg was spending time writing an IRC bot
|
||||
for an Amiga related channel on EFnet. He then came up with the idea to make
|
||||
currency-exchange calculations available to Internet Relay Chat (IRC)
|
||||
users. All the necessary data are published on the Web; he just needed to
|
||||
automate their retrieval.
|
||||
|
||||
Daniel simply adopted an existing command-line open-source tool, httpget, that
|
||||
Brazilian Rafael Sagula had written and recently release version 0.1 of. After
|
||||
a few minor adjustments, it did just what he needed. HttpGet 1.0 was released
|
||||
on April 8th 1997 with brand new HTTP proxy support.
|
||||
a few minor adjustments, it did just what he needed.
|
||||
|
||||
1997
|
||||
----
|
||||
|
||||
HttpGet 1.0 was released on April 8th 1997 with brand new HTTP proxy support.
|
||||
|
||||
We soon found and fixed support for getting currencies over GOPHER. Once FTP
|
||||
download support was added, the name of the project was changed and urlget 2.0
|
||||
was released in August 1997. The http-only days were already passed.
|
||||
|
||||
1998
|
||||
----
|
||||
|
||||
The project slowly grew bigger. When upload capabilities were added and the
|
||||
name once again was misleading, a second name change was made and on March 20,
|
||||
1998 curl 4 was released. (The version numbering from the previous names was
|
||||
@@ -33,33 +41,39 @@ was revealed to us much later.)
|
||||
|
||||
SSL support was added, powered by the SSLeay library.
|
||||
|
||||
August 1998, first announcement of curl on freshmeat.net.
|
||||
August, first announcement of curl on freshmeat.net.
|
||||
|
||||
October 1998, with the curl 4.9 release and the introduction of cookie
|
||||
support, curl was no longer released under the GPL license. Now we're at 4000
|
||||
lines of code, we switched over to the MPL license to restrict the effects of
|
||||
October, with the curl 4.9 release and the introduction of cookie support,
|
||||
curl was no longer released under the GPL license. Now we're at 4000 lines of
|
||||
code, we switched over to the MPL license to restrict the effects of
|
||||
"copyleft".
|
||||
|
||||
November 1998, configure script and reported successful compiles on several
|
||||
November, configure script and reported successful compiles on several
|
||||
major operating systems. The never-quite-understood -F option was added and
|
||||
curl could now simulate quite a lot of a browser. TELNET support was added.
|
||||
|
||||
Curl 5 was released in December 1998 and introduced the first ever curl man
|
||||
page. People started making Linux RPM packages out of it.
|
||||
|
||||
January 1999, DICT support added.
|
||||
1999
|
||||
----
|
||||
|
||||
January, DICT support added.
|
||||
|
||||
OpenSSL took over where SSLeay was abandoned.
|
||||
|
||||
May 1999, first Debian package.
|
||||
May, first Debian package.
|
||||
|
||||
August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300
|
||||
visits weekly.
|
||||
August, LDAP:// and FILE:// support added. The curl web site gets 1300 visits
|
||||
weekly.
|
||||
|
||||
Released curl 6.0 in September. 15000 lines of code.
|
||||
|
||||
December 28 1999, added the project on Sourceforge and started using its
|
||||
services for managing the project.
|
||||
December 28, added the project on Sourceforge and started using its services
|
||||
for managing the project.
|
||||
|
||||
2000
|
||||
----
|
||||
|
||||
Spring 2000, major internal overhaul to provide a suitable library interface.
|
||||
The first non-beta release was named 7.1 and arrived in August. This offered
|
||||
@@ -67,19 +81,22 @@ the easy interface and turned out to be the beginning of actually getting
|
||||
other software and programs to get based on and powered by libcurl. Almost
|
||||
20000 lines of code.
|
||||
|
||||
August 2000, the curl web site gets 4000 visits weekly.
|
||||
August, the curl web site gets 4000 visits weekly.
|
||||
|
||||
The PHP guys adopted libcurl already the same month, when the first ever third
|
||||
party libcurl binding showed up. CURL has been a supported module in PHP since
|
||||
the release of PHP 4.0.2. This would soon get followers. More than 16
|
||||
different bindings exist at the time of this writing.
|
||||
|
||||
September 2000, kerberos4 support was added.
|
||||
September, kerberos4 support was added.
|
||||
|
||||
In November 2000 started the work on a test suite for curl. It was later
|
||||
re-written from scratch again. The libcurl major SONAME number was set to 1.
|
||||
In November started the work on a test suite for curl. It was later re-written
|
||||
from scratch again. The libcurl major SONAME number was set to 1.
|
||||
|
||||
January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||
2001
|
||||
----
|
||||
|
||||
January, Daniel released curl 7.5.2 under a new license again: MIT (or
|
||||
MPL). The MIT license is extremely liberal and can be used combined with GPL
|
||||
in other projects. This would finally put an end to the "complaints" from
|
||||
people involved in GPLed projects that previously were prohibited from using
|
||||
@@ -92,17 +109,20 @@ code. The libcurl major SONAME number was bumped to 2 due to this overhaul.
|
||||
|
||||
The first experimental ftps:// support was added in March 2001.
|
||||
|
||||
August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more
|
||||
and more of a standard utility of Linux distributions and a regular in the BSD
|
||||
August. curl is bundled in Mac OS X, 10.1. It was already becoming more and
|
||||
more of a standard utility of Linux distributions and a regular in the BSD
|
||||
ports collections. The curl web site gets 8000 visits weekly. Curl Corporation
|
||||
contacted Daniel to discuss "the name issue". After Daniel's reply, they have
|
||||
never since got in touch again.
|
||||
|
||||
September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During
|
||||
the forthcoming 7.9.x releases, we introduced the multi interface slowly and
|
||||
September, libcurl 7.9 introduces cookie jar and curl_formadd(). During the
|
||||
forthcoming 7.9.x releases, we introduced the multi interface slowly and
|
||||
without much whistles.
|
||||
|
||||
June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is
|
||||
2002
|
||||
----
|
||||
|
||||
June, the curl web site gets 13000 visits weekly. curl and libcurl is
|
||||
35000 lines of code. Reported successful compiles on more than 40 combinations
|
||||
of CPUs and operating systems.
|
||||
|
||||
@@ -111,134 +131,152 @@ impossible. Around 5000 downloaded packages each week from the main site gives
|
||||
a hint, but the packages are mirrored extensively, bundled with numerous OS
|
||||
distributions and otherwise retrieved as part of other software.
|
||||
|
||||
September 2002, with the release of curl 7.10 it is released under the MIT
|
||||
license only.
|
||||
September, with the release of curl 7.10 it is released under the MIT license
|
||||
only.
|
||||
|
||||
January 2003. Started working on the distributed curl tests. The autobuilds.
|
||||
2003
|
||||
----
|
||||
|
||||
February 2003, the curl site averages at 20000 visits weekly. At any given
|
||||
moment, there's an average of 3 people browsing the curl.haxx.se site.
|
||||
January. Started working on the distributed curl tests. The autobuilds.
|
||||
|
||||
February, the curl site averages at 20000 visits weekly. At any given moment,
|
||||
there's an average of 3 people browsing the curl.haxx.se site.
|
||||
|
||||
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
|
||||
and Negotiate (June).
|
||||
|
||||
November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique
|
||||
visitors to the curl.haxx.se site. Five official web mirrors.
|
||||
November: curl 7.10.8 is released. 45000 lines of code. ~55000 unique visitors
|
||||
to the curl.haxx.se site. Five official web mirrors.
|
||||
|
||||
December 2003, full-fledged SSL for FTP is supported.
|
||||
December, full-fledged SSL for FTP is supported.
|
||||
|
||||
January 2004: curl 7.11.0 introduced large file support.
|
||||
2004
|
||||
----
|
||||
|
||||
June 2004:
|
||||
January: curl 7.11.0 introduced large file support.
|
||||
|
||||
curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||
June: curl 7.12.0 introduced IDN support. 10 official web mirrors.
|
||||
|
||||
This release bumped the major SONAME to 3 due to the removal of the
|
||||
curl_formparse() function
|
||||
This release bumped the major SONAME to 3 due to the removal of the
|
||||
curl_formparse() function
|
||||
|
||||
August 2004:
|
||||
Curl and libcurl 7.12.1
|
||||
August: Curl and libcurl 7.12.1
|
||||
|
||||
Public curl release number: 82
|
||||
Releases counted from the very beginning: 109
|
||||
Available command line options: 96
|
||||
Available curl_easy_setopt() options: 120
|
||||
Number of public functions in libcurl: 36
|
||||
Amount of public web site mirrors: 12
|
||||
Number of known libcurl bindings: 26
|
||||
Public curl release number: 82
|
||||
Releases counted from the very beginning: 109
|
||||
Available command line options: 96
|
||||
Available curl_easy_setopt() options: 120
|
||||
Number of public functions in libcurl: 36
|
||||
Amount of public web site mirrors: 12
|
||||
Number of known libcurl bindings: 26
|
||||
|
||||
April 2005:
|
||||
2005
|
||||
----
|
||||
|
||||
GnuTLS can now optionally be used for the secure layer when curl is built.
|
||||
April. GnuTLS can now optionally be used for the secure layer when curl is
|
||||
built.
|
||||
|
||||
September 2005:
|
||||
September: TFTP support was added.
|
||||
|
||||
TFTP support was added.
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
December: security vulnerability: libcurl URL Buffer Overflow
|
||||
|
||||
December 2005:
|
||||
2006
|
||||
----
|
||||
|
||||
security vulnerability: libcurl URL Buffer Overflow
|
||||
January. We dropped support for Gopher. We found bugs in the implementation
|
||||
that turned out having been introduced years ago, so with the conclusion that
|
||||
nobody had found out in all this time we removed it instead of fixing it.
|
||||
|
||||
January 2006:
|
||||
March: security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||
|
||||
We dropped support for Gopher. We found bugs in the implementation that
|
||||
turned out having been introduced years ago, so with the conclusion that
|
||||
nobody had found out in all this time we removed it instead of fixing it.
|
||||
April: Added the multi_socket() API
|
||||
|
||||
March 2006:
|
||||
September: The major SONAME number for libcurl was bumped to 4 due to the
|
||||
removal of ftp third party transfer support.
|
||||
|
||||
security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||
November: Added SCP and SFTP support
|
||||
|
||||
April 2006:
|
||||
2007
|
||||
----
|
||||
|
||||
Added the multi_socket() API
|
||||
February: Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||
|
||||
September 2006:
|
||||
July: security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||
|
||||
The major SONAME number for libcurl was bumped to 4 due to the removal of
|
||||
ftp third party transfer support.
|
||||
2008
|
||||
----
|
||||
|
||||
November 2006:
|
||||
November:
|
||||
|
||||
Added SCP and SFTP support
|
||||
|
||||
February 2007:
|
||||
|
||||
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||
|
||||
July 2007:
|
||||
|
||||
security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||
|
||||
November 2008:
|
||||
|
||||
Command line options: 128
|
||||
curl_easy_setopt() options: 158
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 37
|
||||
Contributors: 683
|
||||
Command line options: 128
|
||||
curl_easy_setopt() options: 158
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 37
|
||||
Contributors: 683
|
||||
|
||||
145,000 unique visitors. >100 GB downloaded.
|
||||
|
||||
March 2009:
|
||||
2009
|
||||
----
|
||||
|
||||
security vulnerability: libcurl Arbitrary File Access
|
||||
March: security vulnerability: libcurl Arbitrary File Access
|
||||
|
||||
August 2009:
|
||||
August: security vulnerability: libcurl embedded zero in cert name
|
||||
|
||||
security vulnerability: libcurl embedded zero in cert name
|
||||
December: Added support for IMAP, POP3 and SMTP
|
||||
|
||||
December 2009:
|
||||
2010
|
||||
----
|
||||
|
||||
Added support for IMAP, POP3 and SMTP
|
||||
January: Added support for RTSP
|
||||
|
||||
January 2010:
|
||||
February: security vulnerability: libcurl data callback excessive length
|
||||
|
||||
Added support for RTSP
|
||||
March: The project switched over to use git (hosted by github) instead of CVS
|
||||
for source code control
|
||||
|
||||
February 2010:
|
||||
May: Added support for RTMP
|
||||
|
||||
security vulnerability: libcurl data callback excessive length
|
||||
Added support for PolarSSL to do the SSL/TLS stuff
|
||||
|
||||
March 2010:
|
||||
August:
|
||||
|
||||
The project switched over to use git instead of CVS for source code control
|
||||
|
||||
May 2010:
|
||||
|
||||
Added support for RTMP
|
||||
|
||||
Added support for PolarSSL to do the SSL/TLS stuff
|
||||
|
||||
August 2010:
|
||||
|
||||
Public curl releases: 117
|
||||
Command line options: 138
|
||||
curl_easy_setopt() options: 180
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 39
|
||||
Contributors: 808
|
||||
Public curl releases: 117
|
||||
Command line options: 138
|
||||
curl_easy_setopt() options: 180
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 39
|
||||
Contributors: 808
|
||||
|
||||
Gopher support added (re-added actually)
|
||||
|
||||
2012
|
||||
----
|
||||
|
||||
July: Added support for Schannel (native Windows TLS backend) and Darwin SSL
|
||||
(Native Mac OS X and iOS TLS backend).
|
||||
|
||||
Supports metalink
|
||||
|
||||
October: SSH-agent support.
|
||||
|
||||
2013
|
||||
----
|
||||
|
||||
February: Cleaned up internals to always uses the "multi" non-blocking
|
||||
approach internally and only expose the blocking API with a wrapper.
|
||||
|
||||
September: First small steps on supporting HTTP/2 with nghttp2.
|
||||
|
||||
October: Removed krb4 support.
|
||||
|
||||
December: Happy eyeballs.
|
||||
|
||||
2014
|
||||
----
|
||||
|
||||
March: first real release supporting HTTP/2
|
||||
|
||||
September: Web site had 245,000 unique visitors and served 236GB data
|
||||
|
80
docs/INSTALL
80
docs/INSTALL
@@ -20,9 +20,10 @@ Building from git
|
||||
If you get your code off a git repository, see the GIT-INFO file in the
|
||||
root directory for specific instructions on how to proceed.
|
||||
|
||||
UNIX
|
||||
Unix
|
||||
====
|
||||
A normal unix installation is made in three or four steps (after you've
|
||||
|
||||
A normal Unix installation is made in three or four steps (after you've
|
||||
unpacked the source archive):
|
||||
|
||||
./configure
|
||||
@@ -136,8 +137,8 @@ UNIX
|
||||
|
||||
To build with axTLS for SSL/TLS, use both --without-ssl and --with-axtls.
|
||||
|
||||
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||
Heimdal Kerberos 5 packages installed.
|
||||
To build with GSS-API support, use --with-gssapi and have the MIT Kerberos
|
||||
or Heimdal packages installed.
|
||||
|
||||
To get support for SCP and SFTP, build with --with-libssh2 and have
|
||||
libssh2 0.16 or later installed.
|
||||
@@ -147,6 +148,7 @@ UNIX
|
||||
|
||||
SPECIAL CASES
|
||||
-------------
|
||||
|
||||
Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
|
||||
to get correct large file support.
|
||||
|
||||
@@ -155,7 +157,6 @@ UNIX
|
||||
./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
|
||||
RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
|
||||
|
||||
|
||||
Win32
|
||||
=====
|
||||
|
||||
@@ -187,7 +188,6 @@ Win32
|
||||
|
||||
If you get linkage errors read section 5.7 of the FAQ document.
|
||||
|
||||
|
||||
MingW32
|
||||
-------
|
||||
|
||||
@@ -209,7 +209,7 @@ Win32
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.8
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8y
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8zc
|
||||
set LIBSSH2_PATH=c:\libssh2-1.4.3
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
@@ -234,7 +234,6 @@ Win32
|
||||
- optional recent Novell CLDAP SDK available from:
|
||||
http://developer.novell.com/ndk/cldap.htm
|
||||
|
||||
|
||||
Cygwin
|
||||
------
|
||||
|
||||
@@ -318,7 +317,7 @@ Win32
|
||||
Before running nmake define the OPENSSL_PATH environment variable with
|
||||
the root/base directory of OpenSSL, for example:
|
||||
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8y
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8zc
|
||||
|
||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||
@@ -389,7 +388,6 @@ Win32
|
||||
is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
|
||||
libraries.
|
||||
|
||||
|
||||
OTHER MSVC IDEs
|
||||
---------------
|
||||
|
||||
@@ -400,7 +398,6 @@ Win32
|
||||
Make the sources in the src/ drawer be a "win32 console application"
|
||||
project. Name it curl.
|
||||
|
||||
|
||||
Disabling Specific Protocols in Win32 builds
|
||||
--------------------------------------------
|
||||
|
||||
@@ -419,16 +416,21 @@ Win32
|
||||
CURL_DISABLE_FILE disables FILE
|
||||
CURL_DISABLE_TFTP disables TFTP
|
||||
CURL_DISABLE_HTTP disables HTTP
|
||||
CURL_DISABLE_IMAP disables IMAP
|
||||
CURL_DISABLE_POP3 disables POP3
|
||||
CURL_DISABLE_SMTP disables SMTP
|
||||
|
||||
If you want to set any of these defines you have the following
|
||||
possibilities:
|
||||
If you want to set any of these defines you have the following options:
|
||||
|
||||
- Modify lib/config-win32.h
|
||||
- Modify lib/curl_setup.h
|
||||
- Modify lib/Makefile.vc6
|
||||
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
|
||||
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
|
||||
- Modify the "Preprocessor Definitions" in the libcurl project
|
||||
|
||||
Note: The pre-processor settings can be found using the Visual Studio IDE
|
||||
under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
|
||||
Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
|
||||
versions.
|
||||
|
||||
Using BSD-style lwIP instead of Winsock TCP/IP stack in Win32 builds
|
||||
--------------------------------------------------------------------
|
||||
@@ -440,8 +442,12 @@ Win32
|
||||
|
||||
- Modify lib/config-win32.h and src/config-win32.h
|
||||
- Modify lib/Makefile.vc6
|
||||
- Add definition to Project/Settings/C/C++/General/Preprocessor Definitions
|
||||
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
|
||||
- Modify the "Preprocessor Definitions" in the libcurl project
|
||||
|
||||
Note: The pre-processor settings can be found using the Visual Studio IDE
|
||||
under "Project -> Settings -> C/C++ -> General" in VC6 and "Project ->
|
||||
Properties -> Configuration Properties -> C/C++ -> Preprocessor" in later
|
||||
versions.
|
||||
|
||||
Once that libcurl has been built with BSD-style lwIP TCP/IP stack support,
|
||||
in order to use it with your program it is mandatory that your program
|
||||
@@ -465,9 +471,9 @@ Win32
|
||||
add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for
|
||||
dynamic import symbols.
|
||||
|
||||
|
||||
Apple iOS and Mac OS X
|
||||
======================
|
||||
|
||||
On recent Apple operating systems, curl can be built to use Apple's
|
||||
SSL/TLS implementation, Secure Transport, instead of OpenSSL. To build with
|
||||
Secure Transport for SSL/TLS, use the configure option --with-darwinssl. (It
|
||||
@@ -497,9 +503,9 @@ Apple iOS and Mac OS X
|
||||
./configure --with-darwinssl
|
||||
make
|
||||
|
||||
|
||||
IBM OS/2
|
||||
========
|
||||
|
||||
Building under OS/2 is not much different from building under unix.
|
||||
You need:
|
||||
|
||||
@@ -527,9 +533,9 @@ IBM OS/2
|
||||
If you're getting huge binaries, probably your makefiles have the -g in
|
||||
CFLAGS.
|
||||
|
||||
|
||||
VMS
|
||||
===
|
||||
|
||||
(The VMS section is in whole contributed by the friendly Nico Baggus)
|
||||
|
||||
Curl seems to work with FTP & HTTP other protocols are not tested. (the
|
||||
@@ -574,6 +580,7 @@ VMS
|
||||
the name can be fetched from external or internal message libraries
|
||||
Error code - the err codes assigned by the application
|
||||
Sev. - severity: Even = error, off = non error
|
||||
|
||||
0 = Warning
|
||||
1 = Success
|
||||
2 = Error
|
||||
@@ -595,12 +602,13 @@ VMS
|
||||
Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2
|
||||
|
||||
So far for porting notes as of:
|
||||
|
||||
13-jul-2001
|
||||
N. Baggus
|
||||
|
||||
|
||||
QNX
|
||||
===
|
||||
|
||||
(This section was graciously brought to us by David Bentham)
|
||||
|
||||
As QNX is targeted for resource constrained environments, the QNX headers
|
||||
@@ -611,11 +619,12 @@ QNX
|
||||
|
||||
A good all-round solution to this is to override the default when building
|
||||
libcurl, by overriding CFLAGS during configure, example
|
||||
# configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
|
||||
|
||||
# configure CFLAGS='-DFD_SETSIZE=64 -g -O2'
|
||||
|
||||
RISC OS
|
||||
=======
|
||||
|
||||
The library can be cross-compiled using gccsdk as follows:
|
||||
|
||||
CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \
|
||||
@@ -625,9 +634,9 @@ RISC OS
|
||||
where riscos-gcc and riscos-ar are links to the gccsdk tools.
|
||||
You can then link your program with curl/lib/.libs/libcurl.a
|
||||
|
||||
|
||||
AmigaOS
|
||||
=======
|
||||
|
||||
(This section was graciously brought to us by Diego Casorran)
|
||||
|
||||
To build cURL/libcurl on AmigaOS just type 'make amiga' ...
|
||||
@@ -647,10 +656,11 @@ AmigaOS
|
||||
To enable SSL support, you need a OpenSSL native version (without ixemul),
|
||||
you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/
|
||||
|
||||
|
||||
NetWare
|
||||
=======
|
||||
|
||||
To compile curl.nlm / libcurl.nlm you need:
|
||||
|
||||
- either any gcc / nlmconv, or CodeWarrior 7 PDK 4 or later.
|
||||
- gnu make and awk running on the platform you compile on;
|
||||
native Win32 versions can be downloaded from:
|
||||
@@ -691,9 +701,9 @@ NetWare
|
||||
the status of these builds can be viewed at the autobuild table:
|
||||
http://curl.haxx.se/dev/builds.html
|
||||
|
||||
|
||||
eCos
|
||||
====
|
||||
|
||||
curl does not use the eCos build system, so you must first build eCos
|
||||
separately, then link curl to the resulting eCos library. Here's a sample
|
||||
configure line to do so on an x86 Linux box targeting x86:
|
||||
@@ -761,9 +771,9 @@ eCos
|
||||
|
||||
config.errors = stderr; /* default errors to stderr */
|
||||
|
||||
|
||||
Minix
|
||||
=====
|
||||
|
||||
curl can be compiled on Minix 3 using gcc or ACK (starting with
|
||||
ver. 3.1.3). Ensure that GNU gawk and bash are both installed and
|
||||
available in the PATH.
|
||||
@@ -793,9 +803,9 @@ Minix
|
||||
make
|
||||
chmem =256000 src/curl
|
||||
|
||||
|
||||
Symbian OS
|
||||
==========
|
||||
|
||||
The Symbian OS port uses the Symbian build system to compile. From the
|
||||
packages/Symbian/group/ directory, run:
|
||||
|
||||
@@ -806,9 +816,9 @@ Symbian OS
|
||||
SDK doesn't include support for P.I.P.S., you will need to contact
|
||||
your SDK vendor to obtain that first.
|
||||
|
||||
|
||||
VxWorks
|
||||
========
|
||||
|
||||
Build for VxWorks is performed using cross compilation.
|
||||
That means you build on Windows machine using VxWorks tools and
|
||||
run the built image on the VxWorks device.
|
||||
@@ -832,13 +842,15 @@ VxWorks
|
||||
As a result the libcurl.a library should be created in the 'lib' folder.
|
||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||
|
||||
|
||||
Android
|
||||
=======
|
||||
|
||||
Method using the static makefile:
|
||||
|
||||
- see the build notes in the packages/Android/Android.mk file.
|
||||
|
||||
Method using a configure cross-compile (tested with Android NDK r7c, r8):
|
||||
|
||||
- prepare the toolchain of the Android NDK for standalone use; this can
|
||||
be done by invoking the script:
|
||||
./build/tools/make-standalone-toolchain.sh
|
||||
@@ -860,7 +872,8 @@ Android
|
||||
found in your automake folder:
|
||||
find /usr -name config.sub
|
||||
|
||||
Wrapper for pkg-config
|
||||
Wrapper for pkg-config:
|
||||
|
||||
- In order to make proper use of pkg-config so that configure is able to
|
||||
find all dependencies you should create a wrapper script for pkg-config;
|
||||
file /opt/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-pkg-config:
|
||||
@@ -874,9 +887,9 @@ Android
|
||||
|
||||
also create a copy or symlink with name arm-unknown-linux-androideabi-pkg-config.
|
||||
|
||||
|
||||
CROSS COMPILE
|
||||
=============
|
||||
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
Dan Fandrich)
|
||||
|
||||
@@ -922,9 +935,9 @@ CROSS COMPILE
|
||||
|
||||
./configure --host=ARCH-OS
|
||||
|
||||
|
||||
REDUCING SIZE
|
||||
=============
|
||||
|
||||
There are a number of configure options that can be used to reduce the
|
||||
size of libcurl for embedded applications where binary size is an
|
||||
important factor. First, be sure to set the CFLAGS variable when
|
||||
@@ -961,6 +974,7 @@ REDUCING SIZE
|
||||
size of the libcurl dynamic libraries on some platforms even further.
|
||||
Specify them by providing appropriate CFLAGS and LDFLAGS variables on the
|
||||
configure command-line, e.g.
|
||||
|
||||
CFLAGS="-Os -ffunction-sections -fdata-sections \
|
||||
-fno-unwind-tables -fno-asynchronous-unwind-tables" \
|
||||
LDFLAGS="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections"
|
||||
@@ -989,9 +1003,9 @@ REDUCING SIZE
|
||||
--disable-manual !--manual
|
||||
--disable-proxy !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5
|
||||
|
||||
|
||||
PORTS
|
||||
=====
|
||||
|
||||
This is a probably incomplete list of known hardware and operating systems
|
||||
that curl has been compiled for. If you know a system curl compiles and
|
||||
runs on, that isn't listed, please let us know!
|
||||
|
@@ -24,7 +24,6 @@ Current flaws in the curl CMake build
|
||||
Missing features in the cmake build:
|
||||
|
||||
- Builds libcurl without large file support
|
||||
- It doesn't build src/tool_hugehelp.c which creates the --manual output
|
||||
- Can't select which SSL library to build with, only OpenSSL
|
||||
- Doesn't build with SCP and SFTP support (libssh2)
|
||||
- Doesn't allow different resolver backends (no c-ares build support)
|
||||
@@ -32,7 +31,6 @@ Current flaws in the curl CMake build
|
||||
- Doesn't allow build curl and libcurl debug enabled
|
||||
- Doesn't allow a custom CA bundle path
|
||||
- Doesn't allow you to disable specific protocols from the build
|
||||
- Doesn't properly enable IPv6 support by default
|
||||
- Doesn't find or use krb4 or GSS
|
||||
- Rebuilds test files too eagerly, but still can't run the tests
|
||||
|
||||
|
@@ -14,6 +14,7 @@ INTERNALS
|
||||
|
||||
GIT
|
||||
===
|
||||
|
||||
All changes to the sources are committed to the git repository as soon as
|
||||
they're somewhat verified to work. Changes shall be committed as independently
|
||||
as possible so that individual changes can be easier spotted and tracked
|
||||
@@ -41,12 +42,13 @@ Portability
|
||||
libidn 0.4.1
|
||||
cyassl 2.0.0
|
||||
openldap 2.0
|
||||
MIT krb5 lib 1.2.4
|
||||
qsossl V5R3M0
|
||||
MIT Kerberos 1.2.4
|
||||
GSKit V5R3M0
|
||||
NSS 3.14.x
|
||||
axTLS 1.2.7
|
||||
PolarSSL 1.3.0
|
||||
Heimdal ?
|
||||
nghttp2 0.6.0
|
||||
|
||||
On systems where configure runs, we aim at working on them all - if they have
|
||||
a suitable C compiler. On systems that don't run configure, we strive to keep
|
||||
@@ -250,7 +252,9 @@ Library
|
||||
|
||||
Kerberos
|
||||
|
||||
The kerberos support is mainly in lib/krb4.c and lib/security.c.
|
||||
Kerberos support is mainly in lib/krb5.c and lib/security.c but also
|
||||
curl_sasl_sspi.c and curl_sasl_gssapi.c for the email protocols and
|
||||
socks_gssapi.c & socks_sspi.c for SOCKS5 proxy specifics.
|
||||
|
||||
TELNET
|
||||
|
||||
@@ -260,10 +264,18 @@ Library
|
||||
|
||||
The file:// protocol is dealt with in lib/file.c.
|
||||
|
||||
SMB
|
||||
|
||||
The smb:// protocol is dealt with in lib/smb.c.
|
||||
|
||||
LDAP
|
||||
|
||||
Everything LDAP is in lib/ldap.c and lib/openldap.c
|
||||
|
||||
E-mail
|
||||
|
||||
The e-mail related source code is in lib/imap.c, lib/pop3.c and lib/smtp.c.
|
||||
|
||||
GENERAL
|
||||
|
||||
URL encoding and decoding, called escaping and unescaping in the source code,
|
||||
|
@@ -3,6 +3,9 @@ join in and help us correct one or more of these! Also be sure to check the
|
||||
changelog of the current development status, as one or more of these problems
|
||||
may have been fixed since this was written!
|
||||
|
||||
88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus
|
||||
curl's -R option also doesn't work then.
|
||||
|
||||
87. -J/--remote-header-name doesn't decode %-encoded file names. RFC6266
|
||||
details how it should be done. The can of worm is basically that we have no
|
||||
charset handling in curl and ascii >=128 is a challenge for us. Not to
|
||||
@@ -51,10 +54,6 @@ may have been fixed since this was written!
|
||||
any file at all. Like when using FTP.
|
||||
http://curl.haxx.se/bug/view.cgi?id=1063
|
||||
|
||||
77. CURLOPT_FORBID_REUSE on a handle prevents NTLM from working since it
|
||||
"abuses" the underlying connection re-use system and if connections are
|
||||
forced to close they break the NTLM support.
|
||||
|
||||
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
|
||||
that platform), and long is only 32 bits. It makes it impossible for
|
||||
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
|
||||
@@ -201,7 +200,7 @@ may have been fixed since this was written!
|
||||
be to use a data structure other than a plain C string, one that can handle
|
||||
embedded NUL characters. From a practical standpoint, most FTP servers
|
||||
would not meaningfully support NUL characters within RFC 959 <string>,
|
||||
anyway (e.g., UNIX pathnames may not contain NUL).
|
||||
anyway (e.g., Unix pathnames may not contain NUL).
|
||||
|
||||
14. Test case 165 might fail on a system which has libidn present, but with an
|
||||
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
||||
@@ -216,9 +215,9 @@ may have been fixed since this was written!
|
||||
acknowledged after the actual TCP connect (during the SOCKS "negotiate"
|
||||
phase).
|
||||
|
||||
10. To get HTTP Negotiate authentication to work fine, you need to provide a
|
||||
(fake) user name (this concerns both curl and the lib) because the code
|
||||
wrongly only considers authentication if there's a user name provided.
|
||||
10. To get HTTP Negotiate (SPNEGO) authentication to work fine, you need to
|
||||
provide a (fake) user name (this concerns both curl and the lib) because the
|
||||
code wrongly only considers authentication if there's a user name provided.
|
||||
http://curl.haxx.se/bug/view.cgi?id=440 How?
|
||||
http://curl.haxx.se/mail/lib-2004-08/0182.html
|
||||
|
||||
|
@@ -21,9 +21,7 @@ announcement clause that collides with GPL.
|
||||
libcurl http://curl.haxx.se/docs/copyright.html
|
||||
|
||||
Uses an MIT (or Modified BSD)-style license that is as liberal as
|
||||
possible. Some of the source files that deal with KRB4 have Original
|
||||
BSD-style announce-clause licenses. You may not distribute binaries
|
||||
with krb4-enabled libcurl that also link with GPL-licensed code!
|
||||
possible.
|
||||
|
||||
OpenSSL http://www.openssl.org/source/license.html
|
||||
|
||||
@@ -70,14 +68,6 @@ zlib http://www.gzip.org/zlib/zlib_license.html
|
||||
(Used for compressed Transfer-Encoding support) Uses an MIT-style
|
||||
license that shouldn't collide with any other library.
|
||||
|
||||
krb4
|
||||
|
||||
While nothing in particular says that a Kerberos4 library must use any
|
||||
particular license, the one I've tried and used successfully so far
|
||||
(kth-krb4) is partly Original BSD-licensed with the announcement
|
||||
clause. Some of the code in libcurl that is written to deal with
|
||||
Kerberos4 is Modified BSD-licensed.
|
||||
|
||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||
|
||||
(May be used for GSS support) MIT licensed, that shouldn't collide
|
||||
@@ -94,12 +84,6 @@ GNU GSS http://www.gnu.org/software/gss/
|
||||
may not distribute binary curl packages that uses this if you build
|
||||
curl to also link and use any Original BSD licensed libraries!
|
||||
|
||||
fbopenssl
|
||||
|
||||
(Used for SPNEGO support) Unclear license. Based on its name, I assume
|
||||
that it uses the OpenSSL license and thus shares the same issues as
|
||||
described for OpenSSL above.
|
||||
|
||||
libidn http://josefsson.org/libidn/
|
||||
|
||||
(Used for IDNA support) Uses the GNU Lesser General Public
|
||||
|
@@ -14,6 +14,7 @@ MAIL ETIQUETTE
|
||||
1.5 Moderation of new posters
|
||||
1.6 Handling trolls and spam
|
||||
1.7 How to unsubscribe
|
||||
1.8 I posted, now what?
|
||||
|
||||
2. Sending mail
|
||||
2.1 Reply or New Mail
|
||||
@@ -125,6 +126,42 @@ MAIL ETIQUETTE
|
||||
You NEVER EVER email the mailing list requesting someone else to get you off
|
||||
the list.
|
||||
|
||||
1.8 I posted, now what?
|
||||
|
||||
If you aren't subscribed with the exact same email address that you used to
|
||||
send the email, your post will just be silently discarded.
|
||||
|
||||
If you posted for the first time to the mailing list, you first need to wait
|
||||
for an administrator to allow your email to go through. This normally
|
||||
happens very quickly but in case we're asleep, you may have to wait a few
|
||||
hours.
|
||||
|
||||
Once your email goes through it is sent out to several hundred or even
|
||||
thousand recipients. Your email may cover an area that not that many people
|
||||
know about or are interested in. Or possibly the person who knows about it
|
||||
is on vacation or under a very heavy work load right now. You have to wait
|
||||
for a response and you must not expect to get a response at all, but
|
||||
hopefully you get an answer within a couple of days.
|
||||
|
||||
You do yourself and all of us a service when you include as many details as
|
||||
possible already in your first email. Mention your operating system and
|
||||
environment. Tell us which curl version you're using and tell us what you
|
||||
did, what happened and what you expected would happen. Preferably, show us
|
||||
what you did in details enough to allow others to help point out the problem
|
||||
or repeat the same steps in their places.
|
||||
|
||||
Failing to include details will only delay responses and make people respond
|
||||
and ask for the details and you have to send a follow-up email that includes
|
||||
them.
|
||||
|
||||
Expect the responses to primarily help YOU debug the issue, or ask you
|
||||
questions that can lead you or others towards a solution or explanation to
|
||||
whatever you experience.
|
||||
|
||||
If you are a repeat offender to the guidelines outlined in this document,
|
||||
chances are that people will ignore you at will and your chances to get
|
||||
responses will greatly diminish.
|
||||
|
||||
|
||||
2. Sending mail
|
||||
|
||||
|
43
docs/MANUAL
43
docs/MANUAL
@@ -41,17 +41,28 @@ SIMPLE USAGE
|
||||
|
||||
Get a file from an SSH server using SFTP:
|
||||
|
||||
curl -u username sftp://shell.example.com/etc/issue
|
||||
curl -u username sftp://example.com/etc/issue
|
||||
|
||||
Get a file from an SSH server using SCP using a private key to authenticate:
|
||||
Get a file from an SSH server using SCP using a private key
|
||||
(not password-protected) to authenticate:
|
||||
|
||||
curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
|
||||
scp://shell.example.com/~/personal.txt
|
||||
curl -u username: --key ~/.ssh/id_rsa \
|
||||
scp://example.com/~/file.txt
|
||||
|
||||
Get a file from an SSH server using SCP using a private key
|
||||
(password-protected) to authenticate:
|
||||
|
||||
curl -u username: --key ~/.ssh/id_rsa --pass private_key_password \
|
||||
scp://example.com/~/file.txt
|
||||
|
||||
Get the main page from an IPv6 web server:
|
||||
|
||||
curl "http://[2001:1890:1112:1::20]/"
|
||||
|
||||
Get a file from an SMB server:
|
||||
|
||||
curl -u "domain\username:passwd" smb://server.example.com/share/file.txt
|
||||
|
||||
DOWNLOAD TO A FILE
|
||||
|
||||
Get a web page and store in a local file with a specific name:
|
||||
@@ -91,10 +102,13 @@ USING PASSWORDS
|
||||
|
||||
SFTP / SCP
|
||||
|
||||
This is similar to FTP, but you can specify a private key to use instead of
|
||||
a password. Note that the private key may itself be protected by a password
|
||||
that is unrelated to the login password of the remote system. If you
|
||||
provide a private key file you must also provide a public key file.
|
||||
This is similar to FTP, but you can use the --key option to specify a
|
||||
private key to use instead of a password. Note that the private key may
|
||||
itself be protected by a password that is unrelated to the login password
|
||||
of the remote system; this password is specified using the --pass option.
|
||||
Typically, curl will automatically extract the public key from the private
|
||||
key file, but in cases where curl does not have the proper library support,
|
||||
a matching public key file must be specified using the --pubkey option.
|
||||
|
||||
HTTP
|
||||
|
||||
@@ -108,10 +122,10 @@ USING PASSWORDS
|
||||
curl -u name:passwd http://machine.domain/full/path/to/file
|
||||
|
||||
HTTP offers many different methods of authentication and curl supports
|
||||
several: Basic, Digest, NTLM and Negotiate. Without telling which method to
|
||||
use, curl defaults to Basic. You can also ask curl to pick the most secure
|
||||
ones out of the ones that the server accepts for the given URL, by using
|
||||
--anyauth.
|
||||
several: Basic, Digest, NTLM and Negotiate (SPNEGO). Without telling which
|
||||
method to use, curl defaults to Basic. You can also ask curl to pick the
|
||||
most secure ones out of the ones that the server accepts for the given URL,
|
||||
by using --anyauth.
|
||||
|
||||
NOTE! According to the URL specification, HTTP URLs can not contain a user
|
||||
and password, so that style will not work when using curl via a proxy, even
|
||||
@@ -218,6 +232,11 @@ UPLOADING
|
||||
|
||||
curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
|
||||
|
||||
SMB / SMBS
|
||||
|
||||
curl -T file.txt -u "domain\username:passwd"
|
||||
smb://server.example.com/share/
|
||||
|
||||
HTTP
|
||||
|
||||
Upload all data on stdin to a specified HTTP site:
|
||||
|
@@ -7,15 +7,16 @@
|
||||
curl release procedure - how to do a release
|
||||
============================================
|
||||
|
||||
[in the source code repo]
|
||||
in the source code repo
|
||||
-----------------------
|
||||
|
||||
- edit RELEASE-NOTES to be accurate
|
||||
- edit `RELEASE-NOTES` to be accurate
|
||||
|
||||
- update docs/THANKS
|
||||
- update `docs/THANKS`
|
||||
|
||||
- make sure all relevant changes are committed on the master branch
|
||||
|
||||
- tag the git repo in this style: 'git tag -a curl-7_34_0'. -a annotates the
|
||||
- tag the git repo in this style: `git tag -a curl-7_34_0`. -a annotates the
|
||||
tag and we use underscores instead of dots in the version number.
|
||||
|
||||
- run "./maketgz 7.34.0" to build the release tarballs. It is important that
|
||||
@@ -29,11 +30,14 @@ curl release procedure - how to do a release
|
||||
|
||||
- upload the 8 resulting files to the primary download directory
|
||||
|
||||
[data in the curl-www repo]
|
||||
in the curl-www repo
|
||||
--------------------
|
||||
|
||||
- edit Makefile (version number and date),
|
||||
_newslog.html (announce the new release) and
|
||||
_changes.html (insert changes+bugfixes from RELEASE-NOTES)
|
||||
- edit `Makefile` (version number and date),
|
||||
|
||||
- edit `_newslog.html` (announce the new release) and
|
||||
|
||||
- edit `_changes.html` (insert changes+bugfixes from RELEASE-NOTES)
|
||||
|
||||
- commit all local changes
|
||||
|
||||
@@ -43,11 +47,48 @@ curl release procedure - how to do a release
|
||||
|
||||
(the web site then updates its contents automatically)
|
||||
|
||||
[inform]
|
||||
inform
|
||||
------
|
||||
|
||||
- send an email to curl-users, curl-announce and curl-library. Insert the
|
||||
RELEASE-NOTES into the mail.
|
||||
|
||||
[celebrate]
|
||||
celebrate
|
||||
---------
|
||||
|
||||
- suitable beverage intake is encouraged for the festivities
|
||||
|
||||
curl release scheduling
|
||||
=======================
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
We do releases every 8 weeks on Wednesdays. If critical problems arise, we can
|
||||
insert releases outside of the schedule or we can move the release date - but
|
||||
this is very rare.
|
||||
|
||||
Each 8 week release cycle is split in two 4-week periods.
|
||||
|
||||
- During the first 4 weeks after a release, we allow new features and changes
|
||||
to curl and libcurl. If we accept any such changes, we bump the minor number
|
||||
used for the next release.
|
||||
|
||||
- During the second 4-week period we do not merge any features or changes, we
|
||||
then only focus on fixing bugs and polishing things to make a solid coming
|
||||
release.
|
||||
|
||||
Coming dates
|
||||
------------
|
||||
|
||||
Based on the description above, here are some planned release dates (at the
|
||||
time of this writing):
|
||||
|
||||
- November 5, 2014 (version 7.39.0)
|
||||
- December 31, 2014
|
||||
- February 25, 2015
|
||||
- April 22, 2015
|
||||
- June 17, 2015
|
||||
- August 12, 2015
|
||||
- October 7, 2015
|
||||
- December 2, 2015
|
||||
|
@@ -1,12 +1,12 @@
|
||||
curl the next few years - perhaps
|
||||
=======================
|
||||
=================================
|
||||
|
||||
Roadmap of things Daniel Stenberg and Steve Holme want to work on next. It is
|
||||
intended to serve as a guideline for others for information, feedback and
|
||||
possible participation.
|
||||
|
||||
New stuff - libcurl
|
||||
===================
|
||||
-------------------
|
||||
|
||||
1. http2 test suite
|
||||
|
||||
@@ -18,37 +18,33 @@ New stuff - libcurl
|
||||
|
||||
5. HTTPS to proxy
|
||||
|
||||
6. make sure there's an easy handle passed in to curl_formadd(),
|
||||
curl_formget() and curl_formfree() by adding replacement functions and
|
||||
6. make sure there's an easy handle passed in to `curl_formadd()`,
|
||||
`curl_formget()` and `curl_formfree()` by adding replacement functions and
|
||||
deprecating the old ones to allow custom mallocs and more
|
||||
|
||||
7. HTTP Digest authentication via Windows SSPI
|
||||
|
||||
8. GSSAPI authentication in the email protocols
|
||||
|
||||
9. add support for third-party SASL libraries such as Cyrus SASL - may need to
|
||||
7. add support for third-party SASL libraries such as Cyrus SASL - may need to
|
||||
move existing native and SSPI based authentication into vsasl folder after
|
||||
reworking HTTP and SASL code
|
||||
|
||||
10. SASL authentication in LDAP
|
||||
8. SASL authentication in LDAP
|
||||
|
||||
11. Simplify the SMTP email interface so that programmers don't have to
|
||||
construct the body of an email that contains all the headers, alternative
|
||||
content, images and attachments - maintain raw interface so that
|
||||
programmers that want to do this can
|
||||
9. Simplify the SMTP email interface so that programmers don't have to
|
||||
construct the body of an email that contains all the headers, alternative
|
||||
content, images and attachments - maintain raw interface so that
|
||||
programmers that want to do this can
|
||||
|
||||
12. Allow the email protocols to return the capabilities before
|
||||
10. Allow the email protocols to return the capabilities before
|
||||
authenticating. This will allow an application to decide on the best
|
||||
authentication mechanism
|
||||
|
||||
13. Allow Windows threading model to be replaced by Win32 pthreads port
|
||||
11. Allow Windows threading model to be replaced by Win32 pthreads port
|
||||
|
||||
14. Implement a dynamic buffer size to allow SFTP to use much larger buffers
|
||||
12. Implement a dynamic buffer size to allow SFTP to use much larger buffers
|
||||
and possibly allow the size to be customizable by applications. Use less
|
||||
memory when handles are not in use?
|
||||
|
||||
New stuff - curl
|
||||
================
|
||||
----------------
|
||||
|
||||
1. Embed a language interpreter (lua?). For that middle ground where curl
|
||||
isn’t enough and a libcurl binding feels “too much”. Build-time conditional
|
||||
@@ -58,7 +54,7 @@ New stuff - curl
|
||||
don't have to be constructed before calling curl
|
||||
|
||||
Improve
|
||||
=======
|
||||
-------
|
||||
|
||||
1. build for windows (considered hard by many users)
|
||||
|
||||
@@ -69,8 +65,9 @@ Improve
|
||||
features/options in the future too
|
||||
|
||||
4. docs (considered "bad" by users but how do we make it better?)
|
||||
A - split up curl_easy_setopt.3
|
||||
B - split up curl.1
|
||||
|
||||
- split up `curl_easy_setopt.3`
|
||||
- split up curl.1
|
||||
|
||||
5. authentication framework (consider merging HTTP and SASL authentication to
|
||||
give one API for protocols to call)
|
||||
@@ -80,7 +77,7 @@ Improve
|
||||
ago
|
||||
|
||||
Remove
|
||||
======
|
||||
------
|
||||
|
||||
1. cmake support (nobody maintains it)
|
||||
|
||||
|
@@ -4,21 +4,24 @@
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
CURL SECURITY FOR DEVELOPERS
|
||||
curl security for developers
|
||||
============================
|
||||
|
||||
This document is intended to provide guidance to curl developers on how
|
||||
security vulnerabilities should be handled.
|
||||
|
||||
PUBLISHING INFORMATION
|
||||
Publishing Information
|
||||
----------------------
|
||||
|
||||
All known and public curl or libcurl related vulnerabilities are listed at
|
||||
http://curl.haxx.se/docs/security.html
|
||||
All known and public curl or libcurl related vulnerabilities are listed on
|
||||
[the curl web site security page](http://curl.haxx.se/docs/security.html).
|
||||
|
||||
Security vulnerabilities should not be entered in the project's public bug
|
||||
tracker unless the necessary configuration is in place to limit access to the
|
||||
issue to only the reporter and the project's security team.
|
||||
|
||||
VULNERABILITY HANDLING
|
||||
Vulnerability Handling
|
||||
----------------------
|
||||
|
||||
The typical process for handling a new security vulnerability is as follows.
|
||||
|
||||
@@ -31,7 +34,7 @@ any reference to the security nature of the commit if done prior to the public
|
||||
announcement.
|
||||
|
||||
- The person discovering the issue, the reporter, reports the vulnerability
|
||||
privately to curl-security@haxx.se. That's an email alias that reaches a
|
||||
privately to `curl-security@haxx.se`. That's an email alias that reaches a
|
||||
handful of selected and trusted people.
|
||||
|
||||
- Messages that do not relate to the reporting or managing of an undisclosed
|
||||
@@ -63,7 +66,7 @@ announcement.
|
||||
workarounds, when the release is out and make sure to credit all
|
||||
contributors properly.
|
||||
|
||||
- Request a CVE number from distros@openwall.org[1] when also informing and
|
||||
- Request a CVE number from distros@openwall[1] when also informing and
|
||||
preparing them for the upcoming public security vulnerability announcement -
|
||||
attach the advisory draft for information. Note that 'distros' won't accept
|
||||
an embargo longer than 19 days.
|
||||
@@ -89,3 +92,16 @@ announcement.
|
||||
mentioned.
|
||||
|
||||
[1] = http://oss-security.openwall.org/wiki/mailing-lists/distros
|
||||
|
||||
CURL-SECURITY (at haxx dot se)
|
||||
------------------------------
|
||||
|
||||
Who is on this list? There are a couple of criteria you must meet, and then we
|
||||
might ask you to join the list or you can ask to join it. It really isn't very
|
||||
formal. We basically only require that you have a long-term presence in the
|
||||
curl project and you have shown an understanding for the project and its way
|
||||
of working. You must've been around for a good while and you should have no
|
||||
plans in vanishing in the near future.
|
||||
|
||||
We do not make the list of partipants public mostly because it tends to vary
|
||||
somewhat over time and a list somewhere will only risk getting outdated.
|
||||
|
125
docs/SSLCERTS
125
docs/SSLCERTS
@@ -1,23 +1,46 @@
|
||||
Peer SSL Certificate Verification
|
||||
=================================
|
||||
SSL Certificate Verification
|
||||
============================
|
||||
|
||||
(NOTE: If libcurl was built with Schannel or Secure Transport support, then
|
||||
this does not apply to you. Scroll down for details on how the OS-native
|
||||
engines handle SSL certificates. If you're not sure, then run "curl -V" and
|
||||
read the results. If the version string says "WinSSL" in it, then it was built
|
||||
with Schannel support.)
|
||||
SSL is TLS
|
||||
----------
|
||||
|
||||
SSL is the old name. It is called TLS these days.
|
||||
|
||||
|
||||
Native SSL
|
||||
----------
|
||||
|
||||
If libcurl was built with Schannel or Secure Transport support (the native SSL
|
||||
libraries included in Windows and Mac OS X), then this does not apply to
|
||||
you. Scroll down for details on how the OS-native engines handle SSL
|
||||
certificates. If you're not sure, then run "curl -V" and read the results. If
|
||||
the version string says "WinSSL" in it, then it was built with Schannel
|
||||
support.
|
||||
|
||||
It is about trust
|
||||
-----------------
|
||||
|
||||
This system is about trust. In your local CA cert bundle you have certs from
|
||||
*trusted* Certificate Authorities that you then can use to verify that the
|
||||
server certificates you see are valid. They're signed by one of the CAs you
|
||||
trust.
|
||||
|
||||
Which CAs do you trust? You can decide to trust the same set of companies your
|
||||
operating system trusts, or the set one of the known browsers trust. That's
|
||||
basically trust via someone else you trust. You should just be aware that
|
||||
modern operating systems and browsers are setup to trust *hundreds* of
|
||||
companies and recent years several such CAs have been found untrustworthy.
|
||||
|
||||
Certificate Verification
|
||||
------------------------
|
||||
|
||||
libcurl performs peer SSL certificate verification by default. This is done
|
||||
by using CA cert bundle that the SSL library can use to make sure the peer's
|
||||
server certificate is valid.
|
||||
|
||||
If you communicate with HTTPS or FTPS servers using certificates that are
|
||||
signed by CAs present in the bundle, you can be sure that the remote server
|
||||
really is the one it claims to be.
|
||||
|
||||
Until 7.18.0, curl bundled a severely outdated ca bundle file that was
|
||||
installed by default. These days, the curl archives include no ca certs at
|
||||
all. You need to get them elsewhere. See below for example.
|
||||
If you communicate with HTTPS, FTPS or other TLS-using servers using
|
||||
certificates that are signed by CAs present in the bundle, you can be sure
|
||||
that the remote server really is the one it claims to be.
|
||||
|
||||
If the remote server uses a self-signed certificate, if you don't install a CA
|
||||
cert bundle, if the server uses a certificate signed by a CA that isn't
|
||||
@@ -26,13 +49,13 @@ impersonating your favorite site, and you want to transfer files from this
|
||||
server, do one of the following:
|
||||
|
||||
1. Tell libcurl to *not* verify the peer. With libcurl you disable this with
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
`curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);`
|
||||
|
||||
With the curl command line tool, you disable this with -k/--insecure.
|
||||
|
||||
2. Get a CA certificate that can verify the remote server and use the proper
|
||||
option to point out this CA cert for verification when connecting. For
|
||||
libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath);
|
||||
libcurl hackers: `curl_easy_setopt(curl, CURLOPT_CAPATH, capath);`
|
||||
|
||||
With the curl command line tool: --cacert [file]
|
||||
|
||||
@@ -46,32 +69,32 @@ server, do one of the following:
|
||||
If you use Internet Explorer, this is one way to get extract the CA cert
|
||||
for a particular server:
|
||||
|
||||
o View the certificate by double-clicking the padlock
|
||||
o Find out where the CA certificate is kept (Certificate>
|
||||
- View the certificate by double-clicking the padlock
|
||||
- Find out where the CA certificate is kept (Certificate>
|
||||
Authority Information Access>URL)
|
||||
o Get a copy of the crt file using curl
|
||||
o Convert it from crt to PEM using the openssl tool:
|
||||
- Get a copy of the crt file using curl
|
||||
- Convert it from crt to PEM using the openssl tool:
|
||||
openssl x509 -inform DES -in yourdownloaded.crt \
|
||||
-out outcert.pem -text
|
||||
o Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
|
||||
- Append the 'outcert.pem' to the CA cert bundle or use it stand-alone
|
||||
as described below.
|
||||
|
||||
If you use the 'openssl' tool, this is one way to get extract the CA cert
|
||||
for a particular server:
|
||||
|
||||
o openssl s_client -connect xxxxx.com:443 |tee logfile
|
||||
o type "QUIT", followed by the "ENTER" key
|
||||
o The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
|
||||
- `openssl s_client -connect xxxxx.com:443 |tee logfile`
|
||||
- type "QUIT", followed by the "ENTER" key
|
||||
- The certificate will have "BEGIN CERTIFICATE" and "END CERTIFICATE"
|
||||
markers.
|
||||
o If you want to see the data in the certificate, you can do: "openssl
|
||||
- If you want to see the data in the certificate, you can do: "openssl
|
||||
x509 -inform PEM -in certfile -text -out certdata" where certfile is
|
||||
the cert you extracted from logfile. Look in certdata.
|
||||
o If you want to trust the certificate, you can append it to your
|
||||
cert_bundle or use it stand-alone as described. Just remember that the
|
||||
- If you want to trust the certificate, you can append it to your
|
||||
cert bundle or use it stand-alone as described. Just remember that the
|
||||
security is no better than the way you obtained the certificate.
|
||||
|
||||
4. If you're using the curl command line tool, you can specify your own CA
|
||||
cert path by setting the environment variable CURL_CA_BUNDLE to the path
|
||||
cert path by setting the environment variable `CURL_CA_BUNDLE` to the path
|
||||
of your choice.
|
||||
|
||||
If you're using the curl command line tool on Windows, curl will search
|
||||
@@ -86,9 +109,7 @@ server, do one of the following:
|
||||
5. Get a better/different/newer CA cert bundle! One option is to extract the
|
||||
one a recent Firefox browser uses by running 'make ca-bundle' in the curl
|
||||
build tree root, or possibly download a version that was generated this
|
||||
way for you:
|
||||
|
||||
http://curl.haxx.se/docs/caextract.html
|
||||
way for you: [CA Extract](http://curl.haxx.se/docs/caextract.html)
|
||||
|
||||
Neglecting to use one of the above methods when dealing with a server using a
|
||||
certificate that isn't signed by one of the certificates in the installed CA
|
||||
@@ -96,35 +117,29 @@ cert bundle, will cause SSL to report an error ("certificate verify failed")
|
||||
during the handshake and SSL will then refuse further communication with that
|
||||
server.
|
||||
|
||||
Peer SSL Certificate Verification with NSS
|
||||
==========================================
|
||||
Certificate Verification with NSS
|
||||
---------------------------------
|
||||
|
||||
If libcurl was built with NSS support, then depending on the OS distribution,
|
||||
it is probably required to take some additional steps to use the system-wide CA
|
||||
cert db. RedHat ships with an additional module, libnsspem.so, which enables
|
||||
NSS to read the OpenSSL PEM CA bundle. This library is missing in OpenSuSE, and
|
||||
without it, NSS can only work with its own internal formats. NSS also has a new
|
||||
database format: https://wiki.mozilla.org/NSS_Shared_DB
|
||||
it is probably required to take some additional steps to use the system-wide
|
||||
CA cert db. RedHat ships with an additional module, libnsspem.so, which
|
||||
enables NSS to read the OpenSSL PEM CA bundle. This library is missing in
|
||||
OpenSuSE, and without it, NSS can only work with its own internal formats. NSS
|
||||
also has a new [database format](https://wiki.mozilla.org/NSS_Shared_DB).
|
||||
|
||||
Starting with version 7.19.7, libcurl will check for the NSS version it runs,
|
||||
and automatically add the 'sql:' prefix to the certdb directory (either the
|
||||
hardcoded default /etc/pki/nssdb or the directory configured with SSL_DIR
|
||||
environment variable) if version 3.12.0 or later is detected. To check which
|
||||
certdb format your distribution provides, examine the default
|
||||
certdb location: /etc/pki/nssdb; the new certdb format can be identified by
|
||||
the filenames cert9.db, key4.db, pkcs11.txt; filenames of older versions are
|
||||
cert8.db, key3.db, modsec.db.
|
||||
Starting with version 7.19.7, libcurl automatically adds the 'sql:' prefix to
|
||||
the certdb directory (either the hardcoded default /etc/pki/nssdb or the
|
||||
directory configured with SSL_DIR environment variable). To check which certdb
|
||||
format your distribution provides, examine the default certdb location:
|
||||
/etc/pki/nssdb; the new certdb format can be identified by the filenames
|
||||
cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db,
|
||||
key3.db, secmod.db.
|
||||
|
||||
Usually these cert databases are empty, but NSS also has built-in CAs which are
|
||||
provided through a shared library, libnssckbi.so; if you want to use these
|
||||
built-in CAs, then create a symlink to libnssckbi.so in /etc/pki/nssdb:
|
||||
ln -s /usr/lib[64]/libnssckbi.so /etc/pki/nssdb/libnssckbi.so
|
||||
Certificate Verification with Schannel and Secure Transport
|
||||
-----------------------------------------------------------
|
||||
|
||||
Peer SSL Certificate Verification with Schannel and Secure Transport
|
||||
====================================================================
|
||||
|
||||
If libcurl was built with Schannel (Microsoft's TLS/SSL engine) or Secure
|
||||
Transport (Apple's TLS/SSL engine) support, then libcurl will still perform
|
||||
If libcurl was built with Schannel (Microsoft's native TLS engine) or Secure
|
||||
Transport (Apple's native TLS engine) support, then libcurl will still perform
|
||||
peer certificate verification, but instead of using a CA cert bundle, it will
|
||||
use the certificates that are built into the OS. These are the same
|
||||
certificates that appear in the Internet Options control panel (under Windows)
|
||||
|
102
docs/THANKS
102
docs/THANKS
@@ -22,7 +22,7 @@ Alan Pinstein
|
||||
Albert Chin-A-Young
|
||||
Albert Choy
|
||||
Ale Vesely
|
||||
Alejandro Alvarez
|
||||
Alejandro Alvarez Ayllon
|
||||
Aleksandar Milivojevic
|
||||
Aleksey Tulinov
|
||||
Alessandro Ghedini
|
||||
@@ -48,6 +48,7 @@ Alexey Zakhlestin
|
||||
Alexis Carvalho
|
||||
Alfred Gebert
|
||||
Allen Pulsifer
|
||||
Alona Rossen
|
||||
Amol Pattekar
|
||||
Amr Shahin
|
||||
Anatoli Tubman
|
||||
@@ -55,6 +56,7 @@ Anders Gustafsson
|
||||
Anders Havn
|
||||
Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andre Heinecke
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Farber
|
||||
@@ -66,8 +68,8 @@ Andreas Schuldei
|
||||
Andreas Wurf
|
||||
Andrei Benea
|
||||
Andrei Cipu
|
||||
Andrei Kurushin
|
||||
Andrej E Baranov
|
||||
Andres Garcia
|
||||
Andrew Benham
|
||||
Andrew Biggs
|
||||
Andrew Bushnell
|
||||
@@ -83,6 +85,7 @@ Andy Cedilnik
|
||||
Andy Serpa
|
||||
Andy Tsouladze
|
||||
Angus Mackay
|
||||
Anthon Pang
|
||||
Anthony Bryan
|
||||
Anthony G. Basile
|
||||
Antoine Calando
|
||||
@@ -97,11 +100,14 @@ Arnaud Ebalard
|
||||
Arthur Murray
|
||||
Arve Knudsen
|
||||
Arvid Norberg
|
||||
Ask Bjørn Hansen
|
||||
Askar Safin
|
||||
Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Axel Tillequin
|
||||
Balaji Parasuram
|
||||
Balaji Salunke
|
||||
Balint Szilakszi
|
||||
Barry Abrahamson
|
||||
Bart Whiteley
|
||||
@@ -116,6 +122,7 @@ Benbuck Nason
|
||||
Benjamin Gerard
|
||||
Benjamin Gilbert
|
||||
Benjamin Johnson
|
||||
Benoit Neil
|
||||
Benoit Sigoure
|
||||
Bernard Leak
|
||||
Bernhard Reutner-Fischer
|
||||
@@ -124,6 +131,7 @@ Bill Doyle
|
||||
Bill Egert
|
||||
Bill Hoffman
|
||||
Bill Middlecamp
|
||||
Bill Nagel
|
||||
Bjoern Sikora
|
||||
Bjorn Augustsson
|
||||
Bjorn Reese
|
||||
@@ -138,6 +146,7 @@ Brad Hards
|
||||
Brad King
|
||||
Brad Spencer
|
||||
Bradford Bruce
|
||||
Brandon Casey
|
||||
Brandon Wang
|
||||
Brendan Jurd
|
||||
Brent Beardsley
|
||||
@@ -148,6 +157,7 @@ Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
Bruce Mitchener
|
||||
Bruno Thomsen
|
||||
Bruno de Carvalho
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
@@ -155,9 +165,10 @@ Byrial Jensen
|
||||
Cameron Kaiser
|
||||
Camille Moncelier
|
||||
Caolan McNamara
|
||||
Carlo Wood
|
||||
Carsten Lange
|
||||
Casey O'Donnell
|
||||
Cedric Deltheil
|
||||
Catalin Patulea
|
||||
Chad Monroe
|
||||
Chandrakant Bagul
|
||||
Charles Kerr
|
||||
@@ -166,13 +177,13 @@ Chih-Chung Chang
|
||||
Chris "Bob Bob"
|
||||
Chris Combes
|
||||
Chris Conlon
|
||||
Chris Conroy
|
||||
Chris Deidun
|
||||
Chris Flerackers
|
||||
Chris Gaukroger
|
||||
Chris Maltby
|
||||
Chris Mumford
|
||||
Chris Smowton
|
||||
Chris Young
|
||||
Christian Grothoff
|
||||
Christian Hägele
|
||||
Christian Krause
|
||||
@@ -195,6 +206,7 @@ Clifford Wolf
|
||||
Cody Jones
|
||||
Cody Mack
|
||||
Colby Ranger
|
||||
Colin Blair
|
||||
Colin Hogben
|
||||
Colin Watson
|
||||
Colm Buckley
|
||||
@@ -254,6 +266,7 @@ David Kimdon
|
||||
David Lang
|
||||
David LeBlanc
|
||||
David McCreedy
|
||||
David Meyer
|
||||
David Odin
|
||||
David Phillips
|
||||
David Rosenstrauch
|
||||
@@ -267,6 +280,7 @@ David Woodhouse
|
||||
David Wright
|
||||
David Yan
|
||||
Dengminwen
|
||||
Dennis Clarke
|
||||
Derek Higgins
|
||||
Detlef Schmier
|
||||
Didier Brisebourg
|
||||
@@ -274,7 +288,9 @@ Diego Casorran
|
||||
Dilyan Palauzov
|
||||
Dima Barsky
|
||||
Dima Tisnek
|
||||
Dimitar Boevski
|
||||
Dimitre Dimitrov
|
||||
Dimitrios Siganos
|
||||
Dimitris Sarris
|
||||
Dinar
|
||||
Dirk Eddelbuettel
|
||||
@@ -282,6 +298,7 @@ Dirk Manske
|
||||
Dmitri Shubin
|
||||
Dmitriy Sergeyev
|
||||
Dmitry Bartsevich
|
||||
Dmitry Falko
|
||||
Dmitry Kurochkin
|
||||
Dmitry Popov
|
||||
Dmitry Rechkin
|
||||
@@ -297,13 +314,13 @@ Douglas R. Horner
|
||||
Douglas Steinwand
|
||||
Dov Murik
|
||||
Duane Cathey
|
||||
Duncan
|
||||
Duncan Mac-Vicar Prett
|
||||
Dustin Boswell
|
||||
Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Ebenezer Ikonne
|
||||
Ed Morley
|
||||
Edin Kadribasic
|
||||
Eduard Bloch
|
||||
Edward Rudd
|
||||
@@ -333,8 +350,10 @@ Eric Wong
|
||||
Eric Young
|
||||
Erick Nuwendam
|
||||
Erik Johansson
|
||||
Ernest Beinrohr
|
||||
Erwan Legrand
|
||||
Erwin Authried
|
||||
Ethan Glasser Camp
|
||||
Eugene Kotlyarov
|
||||
Evan Jordan
|
||||
Evgeny Turnaev
|
||||
@@ -348,8 +367,9 @@ Felix Yan
|
||||
Felix von Leitner
|
||||
Feng Tu
|
||||
Florian Schoppmann
|
||||
Florian Weimer
|
||||
Forrest Cahoon
|
||||
Francois Charlier
|
||||
Frank Gevaerts
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
Frank McGeough
|
||||
@@ -357,6 +377,7 @@ Frank Meier
|
||||
Frank Ticheler
|
||||
Frank Van Uffelen
|
||||
František Kučera
|
||||
François Charlier
|
||||
Fred Machado
|
||||
Fred New
|
||||
Fred Noz
|
||||
@@ -390,24 +411,27 @@ Gilles Blanc
|
||||
Gisle Vanem
|
||||
Giuseppe Attardi
|
||||
Giuseppe D'Ambrosio
|
||||
Glen A Johnson Jr.
|
||||
Glen Nakamura
|
||||
Glen Scott
|
||||
Glenn Sheridan
|
||||
Gokhan Sengun
|
||||
Gordon Marler
|
||||
Gorilla Maguila
|
||||
Grant Erickson
|
||||
Greg Hewgill
|
||||
Greg Morse
|
||||
Greg Onufer
|
||||
Greg Pratt
|
||||
Greg Zavertnik
|
||||
Grigory Entin
|
||||
Guenole Bescon
|
||||
Guenter Knauf
|
||||
Guido Berhoerster
|
||||
Guillaume Arluison
|
||||
Gunter Knauf
|
||||
Gustaf Hui
|
||||
Gwenole Beauchesne
|
||||
Gökhan Şengün
|
||||
Götz Babin-Ebell
|
||||
Hamish Mackenzie
|
||||
Hang Kin Lau
|
||||
@@ -416,12 +440,14 @@ Hanno Kranzhoff
|
||||
Hans Steegers
|
||||
Hans-Jurgen May
|
||||
Hardeep Singh
|
||||
Haris Okanovic
|
||||
Harshal Pradhan
|
||||
Hauke Duden
|
||||
He Qin
|
||||
Heikki Korpela
|
||||
Heinrich Ko
|
||||
Heinrich Schaefer
|
||||
Helwing Lutz
|
||||
Hendrik Visage
|
||||
Henrik Storner
|
||||
Henry Ludemann
|
||||
@@ -457,6 +483,7 @@ Jacky Lam
|
||||
Jacob Meuser
|
||||
Jacob Moshenko
|
||||
Jad Chamcham
|
||||
Jakub Zakrzewski
|
||||
James Bursa
|
||||
James Cheng
|
||||
James Clancy
|
||||
@@ -476,6 +503,7 @@ Jan Schaumann
|
||||
Jan Van Boghout
|
||||
Jared Jennings
|
||||
Jared Lundell
|
||||
Jari Aalto
|
||||
Jari Sundell
|
||||
Jason Glasgow
|
||||
Jason Liu
|
||||
@@ -490,7 +518,7 @@ Jean-Claude Chauve
|
||||
Jean-Francois Bertrand
|
||||
Jean-Louis Lemaire
|
||||
Jean-Marc Ranger
|
||||
Jean-Noel Rouvignac
|
||||
Jean-Noël Rouvignac
|
||||
Jean-Philippe Barrette-LaPierre
|
||||
Jeff Connelly
|
||||
Jeff Hodges
|
||||
@@ -500,11 +528,12 @@ Jeff Lawson
|
||||
Jeff Phillips
|
||||
Jeff Pohlmeyer
|
||||
Jeff Weber
|
||||
Jeffrey Pohlmeyer
|
||||
Jeremy Friesner
|
||||
Jeremy Huddleston
|
||||
Jeremy Lin
|
||||
Jeroen Koekkoek
|
||||
Jerome Muffat-Meridol
|
||||
Jerome Robert
|
||||
Jerome Vouillon
|
||||
Jerry Krinock
|
||||
Jerry Wu
|
||||
@@ -529,7 +558,9 @@ Johan Anderson
|
||||
Johan Nilsson
|
||||
Johan van Selst
|
||||
Johannes Bauer
|
||||
Johannes Ernst
|
||||
John Bradshaw
|
||||
John Coffey
|
||||
John Crow
|
||||
John Dennis
|
||||
John Dunn
|
||||
@@ -556,9 +587,12 @@ Jon Turner
|
||||
Jonas Forsman
|
||||
Jonas Schnelli
|
||||
Jonatan Lander
|
||||
Jonatan Vela
|
||||
Jonathan Cardoso Machado
|
||||
Jonathan Hseu
|
||||
Jonathan Nieder
|
||||
Jongki Suwandi
|
||||
Jose Alf
|
||||
Jose Kahan
|
||||
Josef Wolf
|
||||
Josh Kapell
|
||||
@@ -581,13 +615,13 @@ Justin Karneges
|
||||
Justin Maggard
|
||||
Jörg Mueller-Tolk
|
||||
Jörn Hartroth
|
||||
K. R. Walker
|
||||
Kai Engert
|
||||
Kai Sommerfeld
|
||||
Kai-Uwe Rommel
|
||||
Kalle Vahlman
|
||||
Kamil Dudka
|
||||
Kang-Jin Lee
|
||||
Karl M
|
||||
Karl Moerder
|
||||
Karol Pietrzak
|
||||
Kaspar Brand
|
||||
@@ -624,6 +658,7 @@ Lachlan O'Dea
|
||||
Larry Campbell
|
||||
Larry Fahnoe
|
||||
Larry Lin
|
||||
Larry Stone
|
||||
Lars Buitinck
|
||||
Lars Gustafsson
|
||||
Lars J. Aas
|
||||
@@ -639,9 +674,11 @@ Len Krause
|
||||
Lenaic Lefever
|
||||
Lenny Rachitsky
|
||||
Leon Winter
|
||||
Leonardo Rosati
|
||||
Liam Healy
|
||||
Lijo Antony
|
||||
Linas Vepstas
|
||||
Lindley French
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
Lisa Xu
|
||||
@@ -649,15 +686,18 @@ Liza Alenchery
|
||||
Lluís Batlle i Rossell
|
||||
Loic Dachary
|
||||
Loren Kirkby
|
||||
Luan Cestari
|
||||
Luca Altea
|
||||
Luca Alteas
|
||||
Lucas Adamski
|
||||
Lucas Pardue
|
||||
Ludek Finstrle
|
||||
Ludovico Cavedon
|
||||
Lukasz Czekierda
|
||||
Luke Amery
|
||||
Luke Call
|
||||
Luke Dashjr
|
||||
Luong Dinh Dung
|
||||
Lyndon Hill
|
||||
Maciej Karpiuk
|
||||
Maciej Puzio
|
||||
Maciej W. Rozycki
|
||||
@@ -713,6 +753,7 @@ Mateusz Loskot
|
||||
Mathias Axelsson
|
||||
Mats Lidell
|
||||
Matt Arsenault
|
||||
Matt Ford
|
||||
Matt Kraai
|
||||
Matt Veenstra
|
||||
Matt Witherspoon
|
||||
@@ -747,11 +788,12 @@ Michael Smith
|
||||
Michael Stillwell
|
||||
Michael Wallner
|
||||
Michal Bonino
|
||||
Michal Gorny
|
||||
Michal Kowalczyk
|
||||
Michal Marek
|
||||
Michał Górny
|
||||
Michał Kowalczyk
|
||||
Michele Bini
|
||||
Miguel Angel
|
||||
Miguel Diaz
|
||||
Mihai Ionescu
|
||||
Mikael Johansson
|
||||
Mikael Sennerholm
|
||||
@@ -760,19 +802,21 @@ Mike Crowe
|
||||
Mike Dobbs
|
||||
Mike Giancola
|
||||
Mike Hasselberg
|
||||
Mike Henshaw
|
||||
Mike Hommey
|
||||
Mike Mio
|
||||
Mike Power
|
||||
Mike Protts
|
||||
Mike Revi
|
||||
Miklos Nemeth
|
||||
Miroslav Spousta
|
||||
Mitz Wark
|
||||
Mohamed Lrhazi
|
||||
Mohammad AlSaleh
|
||||
Mohun Biswas
|
||||
Moonesamy
|
||||
Myk Taylor
|
||||
Nach M. S.
|
||||
Nagai H
|
||||
Nathan Coulter
|
||||
Nathan O'Sullivan
|
||||
Nathanael Nerode
|
||||
@@ -803,11 +847,12 @@ Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Novotny
|
||||
Ofer
|
||||
Ola Mork
|
||||
Olaf Flebbe
|
||||
Olaf Stueben
|
||||
Olaf Stüben
|
||||
Oliver Gondža
|
||||
Oliver Kuckertz
|
||||
Oliver Schindler
|
||||
Olivier Berger
|
||||
Oren Tirosh
|
||||
Ori Avtalion
|
||||
@@ -818,10 +863,12 @@ Paolo Piacentini
|
||||
Paras Sethia
|
||||
Pascal Terjan
|
||||
Pasha Kuznetsov
|
||||
Pasi Karkkainen
|
||||
Pat Ray
|
||||
Patrice Guerin
|
||||
Patricia Muscalu
|
||||
Patrick Bihan-Faou
|
||||
Patrick McManus
|
||||
Patrick Monnerat
|
||||
Patrick Scott
|
||||
Patrick Smith
|
||||
@@ -836,6 +883,7 @@ Paul Marquis
|
||||
Paul Moore
|
||||
Paul Nolan
|
||||
Paul Querna
|
||||
Paul Saab
|
||||
Pavel Cenek
|
||||
Pavel Orehov
|
||||
Pavel Raiskup
|
||||
@@ -843,7 +891,6 @@ Pawel A. Gajda
|
||||
Pawel Kierski
|
||||
Pedro Larroy
|
||||
Pedro Neves
|
||||
Pete Su
|
||||
Peter Bray
|
||||
Peter Forret
|
||||
Peter Gal
|
||||
@@ -858,6 +905,8 @@ Peter Su
|
||||
Peter Sylvester
|
||||
Peter Todd
|
||||
Peter Verhas
|
||||
Peter Wang
|
||||
Peter Wu
|
||||
Peter Wullinger
|
||||
Peteris Krumins
|
||||
Petr Bahula
|
||||
@@ -889,6 +938,7 @@ Quinn Slack
|
||||
Radu Simionescu
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Rafaël Carré
|
||||
Rainer Canavan
|
||||
Rainer Jung
|
||||
Rainer Koenig
|
||||
@@ -901,6 +951,7 @@ Randy McMurchy
|
||||
Ravi Pratap
|
||||
Ray Dassen
|
||||
Ray Pekowski
|
||||
Ray Satiro
|
||||
Reinout van Schouwen
|
||||
Remi Gacogne
|
||||
Renato Botelho
|
||||
@@ -921,6 +972,7 @@ Richard Clayton
|
||||
Richard Cooper
|
||||
Richard Gorton
|
||||
Richard Michael
|
||||
Richard Moore
|
||||
Richard Prescott
|
||||
Richard Silverman
|
||||
Rick Jones
|
||||
@@ -944,6 +996,7 @@ Robin Johnson
|
||||
Robin Kay
|
||||
Robson Braga Araujo
|
||||
Rodney Simmons
|
||||
Rodric Glaser
|
||||
Rodrigo Silva
|
||||
Roland Blom
|
||||
Roland Krikava
|
||||
@@ -952,6 +1005,7 @@ Rolland Dudemaine
|
||||
Roman Koifman
|
||||
Roman Mamedov
|
||||
Romulo A. Ceccon
|
||||
Ron Parker
|
||||
Ron Zapp
|
||||
Rosimildo da Silva
|
||||
Roy Shan
|
||||
@@ -967,7 +1021,6 @@ S. Moonesamy
|
||||
Salvador Dávila
|
||||
Salvatore Sorrentino
|
||||
Sam Deane
|
||||
Sam Listopad
|
||||
Sampo Kellomaki
|
||||
Samuel Díaz García
|
||||
Samuel Listopad
|
||||
@@ -978,6 +1031,7 @@ Santhana Todatry
|
||||
Saqib Ali
|
||||
Sara Golemon
|
||||
Saran Neti
|
||||
Sascha Swiercy
|
||||
Saul good
|
||||
Scott Bailey
|
||||
Scott Barrett
|
||||
@@ -985,7 +1039,6 @@ Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sebastian Rasmussen
|
||||
Sebastien Willemijns
|
||||
Senthil Raja Velu
|
||||
Sergei Nikulov
|
||||
Sergey Tatarincev
|
||||
@@ -1008,6 +1061,7 @@ Song Ma
|
||||
Sonia Subramanian
|
||||
Spacen Jasset
|
||||
Spiridonoff A.V
|
||||
Spork Schivago
|
||||
Stadler Stephan
|
||||
Stan van de Burgt
|
||||
Stanislav Ivochkin
|
||||
@@ -1017,6 +1071,7 @@ Stefan Neis
|
||||
Stefan Teleman
|
||||
Stefan Tomanek
|
||||
Stefan Ulrich
|
||||
Steinar H. Gunderson
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
Stephen Kick
|
||||
@@ -1036,9 +1091,11 @@ Steven Gu
|
||||
Steven M. Schweda
|
||||
Steven Parkes
|
||||
Stoned Elipot
|
||||
Sune Ahlgren
|
||||
Sven Anders
|
||||
Sven Neuhaus
|
||||
Sven Wegener
|
||||
Symeon Paraschoudis
|
||||
Sébastien Willemijns
|
||||
T. Bharath
|
||||
T. Yamada
|
||||
@@ -1063,7 +1120,9 @@ Tim Costello
|
||||
Tim Harder
|
||||
Tim Heckman
|
||||
Tim Newsome
|
||||
Tim Ruehsen
|
||||
Tim Sneddon
|
||||
Tim Starling
|
||||
Timo Sirainen
|
||||
Tinus van den Berg
|
||||
Tobias Markus
|
||||
@@ -1107,6 +1166,7 @@ Török Edwin
|
||||
Ulf Härnhammar
|
||||
Ulf Samuelsson
|
||||
Ulrich Doehner
|
||||
Ulrich Telle
|
||||
Ulrich Zadow
|
||||
Venkat Akella
|
||||
Victor Snezhko
|
||||
@@ -1126,6 +1186,7 @@ Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
Vsevolod Novikov
|
||||
Waldek Kozba
|
||||
Walter J. Mack
|
||||
Ward Willats
|
||||
Wayne Haigh
|
||||
@@ -1136,18 +1197,20 @@ Wez Furlong
|
||||
Wilfredo Sanchez
|
||||
Will Dietz
|
||||
Willem Sparreboom
|
||||
William Ahern
|
||||
Wojciech Zwiefka
|
||||
Wouter Van Rooy
|
||||
Wu Yongzheng
|
||||
Xavier Bouchoux
|
||||
Yaakov Selkowitz
|
||||
Yamada Yasuharu
|
||||
Yang Tse
|
||||
Yarram Sunil
|
||||
Yasuharu Yamada
|
||||
Yehezkel Horowitz
|
||||
Yehoshua Hershberg
|
||||
Yi Huang
|
||||
Yingwei Liu
|
||||
Yousuke Kimoto
|
||||
Yukihiro Kawada
|
||||
Yuriy Sosov
|
||||
Yves Arrouye
|
||||
@@ -1159,3 +1222,4 @@ Zvi Har'El
|
||||
nk
|
||||
swalkaus at yahoo.com
|
||||
tommink[at]post.pl
|
||||
Никита Дорохин
|
||||
|
48
docs/THANKS-filter
Normal file
48
docs/THANKS-filter
Normal file
@@ -0,0 +1,48 @@
|
||||
# This is a list of names we have recorded that already are thanked
|
||||
# appropriately in THANKS. This list contains variations of their names and
|
||||
# their "canonical" name. This file is used for scripting purposes to avoid
|
||||
# duplicate entries and will not be included in release tarballs.
|
||||
# When removing dupes that aren't identical names from THANKS, add a line
|
||||
# here!
|
||||
#
|
||||
# Used-by: contributor.sh
|
||||
s/Andres Garcia/Andrés García/
|
||||
s/Chris Conroy/Christopher Conroy/
|
||||
s/Francois Charlier/François Charlier/
|
||||
s/Gokhan Sengun/Gökhan Şengün/
|
||||
s/John Malmberg/John E. Malmberg/
|
||||
s/Luca Alteas/Luca Altea/
|
||||
s/Michal Gorny/Michał Górny/
|
||||
s/Michal Górny/Michał Górny/
|
||||
s/Moonesamy/S. Moonesamy/
|
||||
s/Pete Su$/Peter Su/
|
||||
s/Sam Listopad/Samuel Listopad/
|
||||
s/Sebastien Willemijns/Sébastien Willemijns/
|
||||
s/YAMADA Yasuharu/Yasuharu Yamada/
|
||||
s/Karl M$/Karl Moerder/
|
||||
s/Bjorn Stenberg/Björn Stenberg/
|
||||
s/upstream tests 305 and 404//
|
||||
s/Gaël PORTAY/Gaël Portay/
|
||||
s/Romulo Ceccon/Romulo A. Ceccon/
|
||||
s/Nach M. S$/Nach M. S./
|
||||
s/Jay Satiro/Ray Satiro/
|
||||
s/Richard J. Moore/Richard Moore/
|
||||
s/Sergey Nikulov/Sergei Nikulov/
|
||||
s/Petr Písař/Petr Pisar/
|
||||
s/Nick Zitzmann (originally)/Nick Zitzmann/
|
||||
s/product-security at Apple//
|
||||
s/IT DOES NOT WORK//
|
||||
s/Albert Chin/Albert Chin-A-Young/
|
||||
s/Paras S/Paras Sethia/
|
||||
s/Дмитрий Фалько/Dmitry Falko/
|
||||
s/byte_bucket in the #curl IRC channel//
|
||||
s/Michal Górny and Anthony G. Basile//
|
||||
s/Alejandro Alvarez$/Alejandro Alvarez Ayllon/
|
||||
s/Ant Bryan/Anthony Bryan/
|
||||
s/Cédric Deltheil/Cédric Deltheil/
|
||||
s/Christian Hagele/Christian Hägele/
|
||||
s/douglas steinwand/Douglas Steinwand/
|
||||
s/Frank Van Uffelen and Fabian Hiernaux//
|
||||
s/Rodrigo Silva (MestreLion)/Rodrigo Silva/
|
||||
s/tetetest tetetest//
|
||||
s/Jiří Hruška/Jiri Hruska/
|
46
docs/TODO
46
docs/TODO
@@ -19,10 +19,12 @@
|
||||
1.6 Modified buffer size approach
|
||||
1.7 Detect when called from within callbacks
|
||||
1.8 Allow SSL (HTTPS) to proxy
|
||||
1.9 Cache negative name resolves
|
||||
|
||||
2. libcurl - multi interface
|
||||
2.1 More non-blocking
|
||||
2.2 Fix HTTP Pipelining for PUT
|
||||
2.3 Better support for same name resolves
|
||||
|
||||
3. Documentation
|
||||
3.1 Update date and version in man pages
|
||||
@@ -33,6 +35,8 @@
|
||||
4.3 Earlier bad letter detection
|
||||
4.4 REST for large files
|
||||
4.5 ASCII support
|
||||
4.6 GSSAPI via Windows SSPI
|
||||
4.7 STAT for LIST without data connection
|
||||
|
||||
5. HTTP
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
@@ -80,6 +84,7 @@
|
||||
|
||||
14. SASL
|
||||
14.1 Other authentication mechanisms
|
||||
14.2 Add QOP support to GSSAPI authentication
|
||||
|
||||
15. Client
|
||||
15.1 sync
|
||||
@@ -130,7 +135,7 @@
|
||||
|
||||
Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
|
||||
SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
|
||||
To support ipv6 interface addresses for network interfaces properly.
|
||||
To support IPv6 interface addresses for network interfaces properly.
|
||||
|
||||
1.4 signal-based resolver timeouts
|
||||
|
||||
@@ -189,6 +194,12 @@
|
||||
...and by Firefox soon:
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=378637
|
||||
|
||||
1.9 Cache negative name resolves
|
||||
|
||||
A name resolve that has failed is likely to fail when made again within a
|
||||
short period of time. Currently we only cache positive responses.
|
||||
|
||||
|
||||
2. libcurl - multi interface
|
||||
|
||||
2.1 More non-blocking
|
||||
@@ -211,6 +222,15 @@
|
||||
serial requests and currently libcurl only supports that for HEAD and GET
|
||||
requests but it should also be possible for PUT.
|
||||
|
||||
2.3 Better support for same name resolves
|
||||
|
||||
If a name resolve has been initiated for name NN and a second easy handle
|
||||
wants to resolve that name as well, make it wait for the first resolve to end
|
||||
up in the cache instead of doing a second separate resolve. This is
|
||||
especially needed when adding many simultaneous handles using the same host
|
||||
name when the DNS resolver can get flooded.
|
||||
|
||||
|
||||
3. Documentation
|
||||
|
||||
3.1 Update date and version in man pages
|
||||
@@ -251,6 +271,20 @@
|
||||
FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||
accordingly.
|
||||
|
||||
4.6 GSSAPI via Windows SSPI
|
||||
|
||||
In addition to currently supporting the SASL GSSAPI mechanism (Kerberos V5)
|
||||
via third-party GSS-API libraries, such as Heimdal or MIT Kerberos, also add
|
||||
support for GSSAPI authentication via Windows SSPI.
|
||||
|
||||
4.7 STAT for LIST without data connection
|
||||
|
||||
Some FTP servers allow STAT for listing directories instead of using LIST, and
|
||||
the response is then sent over the control connection instead of as the
|
||||
otherwise usedw data connection: http://www.nsftools.com/tips/RawFTP.htm#STAT
|
||||
|
||||
This is not detailed in any FTP specification.
|
||||
|
||||
5. HTTP
|
||||
|
||||
5.1 Better persistency for HTTP 1.0
|
||||
@@ -440,7 +474,15 @@ to provide the data to send.
|
||||
|
||||
14.1 Other authentication mechanisms
|
||||
|
||||
Add support for GSSAPI to SMTP, POP3 and IMAP.
|
||||
Add support for other authentication mechanisms such as EXTERNAL, OLP,
|
||||
GSS-SPNEGO and others.
|
||||
|
||||
14.2 Add QOP support to GSSAPI authentication
|
||||
|
||||
Currently the GSSAPI authentication only supports the default QOP of auth
|
||||
(Authentication), whilst Kerberos V5 supports both auth-int (Authentication
|
||||
with integrity protection) and auth-conf (Authentication with integrity and
|
||||
privacy protection).
|
||||
|
||||
15. Client
|
||||
|
||||
|
263
docs/curl.1
263
docs/curl.1
@@ -20,7 +20,7 @@
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl 1 "27 July 2012" "Curl 7.27.0" "Curl Manual"
|
||||
.TH curl 1 "30 Nov 2014" "Curl 7.40.0" "Curl Manual"
|
||||
.SH NAME
|
||||
curl \- transfer a URL
|
||||
.SH SYNOPSIS
|
||||
@@ -30,8 +30,8 @@ curl \- transfer a URL
|
||||
.B curl
|
||||
is a tool to transfer data from or to a server, using one of the supported
|
||||
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
|
||||
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The
|
||||
command is designed to work without user interaction.
|
||||
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
|
||||
and TFTP). The command is designed to work without user interaction.
|
||||
|
||||
curl offers a busload of useful tricks like proxy support, user
|
||||
authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
|
||||
@@ -48,18 +48,20 @@ RFC 3986.
|
||||
You can specify multiple URLs or parts of URLs by writing part sets within
|
||||
braces as in:
|
||||
|
||||
http://site.{one,two,three}.com
|
||||
http://site.{one,two,three}.com
|
||||
|
||||
or you can get sequences of alphanumeric series by using [] as in:
|
||||
|
||||
ftp://ftp.numericals.com/file[1-100].txt
|
||||
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
|
||||
ftp://ftp.letters.com/file[a-z].txt
|
||||
ftp://ftp.numericals.com/file[1-100].txt
|
||||
|
||||
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
|
||||
|
||||
ftp://ftp.letters.com/file[a-z].txt
|
||||
|
||||
Nested sequences are not supported, but you can use several ones next to each
|
||||
other:
|
||||
|
||||
http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
|
||||
http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
|
||||
|
||||
You can specify any amount of URLs on the command line. They will be fetched
|
||||
in a sequential manner in the specified order.
|
||||
@@ -67,8 +69,19 @@ in a sequential manner in the specified order.
|
||||
You can specify a step counter for the ranges to get every Nth number or
|
||||
letter:
|
||||
|
||||
http://www.numericals.com/file[1-100:10].txt
|
||||
http://www.letters.com/file[a-z:2].txt
|
||||
http://www.numericals.com/file[1-100:10].txt
|
||||
|
||||
http://www.letters.com/file[a-z:2].txt
|
||||
|
||||
When using [] or {} sequences when invoked from a command line prompt, you
|
||||
probably have to put the full URL within double quotes to avoid the shell from
|
||||
interfering with it. This also goes for other characters treated special, like
|
||||
for example '&', '?' and '*'.
|
||||
|
||||
Provide the IPv6 zone index in the URL with an escaped percentage sign and the
|
||||
interface name. Like in
|
||||
|
||||
http://[fe80::3%25eth0]/
|
||||
|
||||
If you specify URL without protocol:// prefix, curl will attempt to guess what
|
||||
protocol you might want. It will then default to HTTP but try other protocols
|
||||
@@ -157,23 +170,23 @@ You can use options \fI--tlsv1.0\fP, \fI--tlsv1.1\fP, and \fI--tlsv1.2\fP to
|
||||
control the TLS version more precisely (if the SSL backend in use supports such
|
||||
a level of control).
|
||||
.IP "-2, --sslv2"
|
||||
(SSL)
|
||||
Forces curl to use SSL version 2 when negotiating with a remote SSL server.
|
||||
(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL
|
||||
server. Sometimes curl is built without SSLv2 support. SSLv2 is widely
|
||||
considered insecure.
|
||||
.IP "-3, --sslv3"
|
||||
(SSL)
|
||||
Forces curl to use SSL version 3 when negotiating with a remote SSL server.
|
||||
(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL
|
||||
server. Sometimes curl is built without SSLv3 support.
|
||||
.IP "-4, --ipv4"
|
||||
If curl is capable of resolving an address to multiple IP versions (which it
|
||||
is if it is IPv6-capable), this option tells curl to resolve names to IPv4
|
||||
addresses only.
|
||||
This option tells curl to resolve names to IPv4 addresses only, and not for
|
||||
example try IPv6.
|
||||
.IP "-6, --ipv6"
|
||||
If curl is capable of resolving an address to multiple IP versions (which it
|
||||
is if it is IPv6-capable), this option tells curl to resolve names to IPv6
|
||||
addresses only.
|
||||
This option tells curl to resolve names to IPv6 addresses only, and not for
|
||||
example try IPv4.
|
||||
.IP "-a, --append"
|
||||
(FTP/SFTP) When used in an upload, this will tell curl to append to the target
|
||||
file instead of overwriting it. If the file doesn't exist, it will be created.
|
||||
Note that this flag is ignored by some SSH servers (including OpenSSH).
|
||||
(FTP/SFTP) When used in an upload, this makes curl append to the target file
|
||||
instead of overwriting it. If the remote file doesn't exist, it will be
|
||||
created. Note that this flag is ignored by some SFTP servers (including
|
||||
OpenSSH).
|
||||
.IP "-A, --user-agent <agent string>"
|
||||
(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
|
||||
done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
|
||||
@@ -194,10 +207,9 @@ since it may require data to be sent twice and then the client must be able to
|
||||
rewind. If the need should arise when uploading from stdin, the upload
|
||||
operation will fail.
|
||||
.IP "-b, --cookie <name=data>"
|
||||
(HTTP)
|
||||
Pass the data to the HTTP server as a cookie. It is supposedly the
|
||||
data previously received from the server in a "Set-Cookie:" line.
|
||||
The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
|
||||
(HTTP) Pass the data to the HTTP server as a cookie. It is supposedly the data
|
||||
previously received from the server in a "Set-Cookie:" line. The data should
|
||||
be in the format "NAME1=VALUE1; NAME2=VALUE2".
|
||||
|
||||
If no '=' symbol is used in the line, it is treated as a filename to use to
|
||||
read previously stored cookie lines from, which should be used in this session
|
||||
@@ -207,26 +219,29 @@ in combination with the \fI-L, --location\fP option. The file format of the
|
||||
file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
|
||||
cookie file format.
|
||||
|
||||
\fBNOTE\fP that the file specified with \fI-b, --cookie\fP is only used as
|
||||
input. No cookies will be stored in the file. To store cookies, use the
|
||||
\fI-c, --cookie-jar\fP option or you could even save the HTTP headers to a file
|
||||
using \fI-D, --dump-header\fP!
|
||||
The file specified with \fI-b, --cookie\fP is only used as input. No cookies
|
||||
will be written to the file. To store cookies, use the \fI-c, --cookie-jar\fP
|
||||
option.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-B, --use-ascii"
|
||||
(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be
|
||||
enforced by using an URL that ends with ";type=A". This option causes data
|
||||
sent to stdout to be in text mode for win32 systems.
|
||||
(FTP/LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using
|
||||
an URL that ends with ";type=A". This option causes data sent to stdout to be
|
||||
in text mode for win32 systems.
|
||||
.IP "--basic"
|
||||
(HTTP) Tells curl to use HTTP Basic authentication. This is the default and
|
||||
this option is usually pointless, unless you use it to override a previously
|
||||
set option that sets a different authentication method (such as \fI--ntlm\fP,
|
||||
\fI--digest\fP, or \fI--negotiate\fP).
|
||||
(HTTP) Tells curl to use HTTP Basic authentication with the remote host. This
|
||||
is the default and this option is usually pointless, unless you use it to
|
||||
override a previously set option that sets a different authentication method
|
||||
(such as \fI--ntlm\fP, \fI--digest\fP, or \fI--negotiate\fP).
|
||||
|
||||
Used together with \fI-u, --user\fP and \fI-x, --proxy\fP.
|
||||
|
||||
See also \fI--proxy-basic\fP.
|
||||
.IP "-c, --cookie-jar <file name>"
|
||||
(HTTP) Specify to which file you want curl to write all cookies after a
|
||||
completed operation. Curl writes all cookies previously read from a specified
|
||||
file as well as all cookies received from remote server(s). If no cookies are
|
||||
known, no file will be written. The file will be written using the Netscape
|
||||
known, no data will be written. The file will be written using the Netscape
|
||||
cookie file format. If you set the file name to a single dash, "-", the
|
||||
cookies will be written to stdout.
|
||||
|
||||
@@ -266,11 +281,12 @@ If this option is used several times, the last one will be used.
|
||||
supports, and save the uncompressed document. If this option is used and the
|
||||
server sends an unsupported encoding, curl will report an error.
|
||||
.IP "--connect-timeout <seconds>"
|
||||
Maximum time in seconds that you allow the connection to the server to take.
|
||||
This only limits the connection phase, once curl has connected this option is
|
||||
of no more use. Since 7.32.0, this option accepts decimal values, but the
|
||||
actual timeout will decrease in accuracy as the specified timeout increases in
|
||||
decimal precision. See also the \fI-m, --max-time\fP option.
|
||||
Maximum time in seconds that you allow curl's connection to take. This only
|
||||
limits the connection phase, so if curl connects within the given period it
|
||||
will continue - if not it will exit. Since version 7.32.0, this option
|
||||
accepts decimal values.
|
||||
|
||||
See also the \fI-m, --max-time\fP option.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--create-dirs"
|
||||
@@ -282,7 +298,9 @@ uses no dir or if the dirs it mentions already exist, no dir will be created.
|
||||
To create remote directories when using FTP or SFTP, try
|
||||
\fI--ftp-create-dirs\fP.
|
||||
.IP "--crlf"
|
||||
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||
Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||
|
||||
(SMTP added in 7.40.0)
|
||||
.IP "--crlfile <file>"
|
||||
(HTTPS/FTPS) Provide a file using PEM format with a Certificate Revocation
|
||||
List that may specify peer certificates that are to be considered revoked.
|
||||
@@ -318,13 +336,12 @@ Write the protocol headers to the specified file.
|
||||
This option is handy to use when you want to store the headers that an HTTP
|
||||
site sends to you. Cookies from the headers could then be read in a second
|
||||
curl invocation by using the \fI-b, --cookie\fP option! The
|
||||
\fI-c, --cookie-jar\fP option is however a better way to store cookies.
|
||||
\fI-c, --cookie-jar\fP option is a better way to store cookies.
|
||||
|
||||
When used in FTP, the FTP server response lines are considered being "headers"
|
||||
and thus are saved there.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
|
||||
.IP "--data-ascii <data>"
|
||||
See \fI-d, --data\fP.
|
||||
.IP "--data-binary <data>"
|
||||
@@ -522,12 +539,25 @@ OpenSSL-powered curl to make SSL-connections much more efficiently than using
|
||||
|
||||
If this option is set, the default capath value will be ignored, and if it is
|
||||
used several times, the last one will be used.
|
||||
.IP "--pinnedpubkey <pinned public key>"
|
||||
(SSL) Tells curl to use the specified public key file to verify the peer. The
|
||||
file must contain a single public key in PEM or DER format.
|
||||
|
||||
When negotiating a TLS or SSL connection, the server sends a certificate
|
||||
indicating its identity. A public key is extracted from this certificate and
|
||||
if it does not exactly match the public key provided to this option, curl will
|
||||
abort the connection before sending or receiving any data.
|
||||
|
||||
This is currently only implemented in the OpenSSL, GnuTLS and GSKit backends.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
(Added in 7.39.0)
|
||||
.IP "-f, --fail"
|
||||
(HTTP) Fail silently (no output at all) on server errors. This is mostly done
|
||||
to better enable scripts etc to better deal with failed attempts. In
|
||||
normal cases when an HTTP server fails to deliver a document, it returns an
|
||||
HTML document stating so (which often also describes why and more). This flag
|
||||
will prevent curl from outputting that and return error 22.
|
||||
to better enable scripts etc to better deal with failed attempts. In normal
|
||||
cases when an HTTP server fails to deliver a document, it returns an HTML
|
||||
document stating so (which often also describes why and more). This flag will
|
||||
prevent curl from outputting that and return error 22.
|
||||
|
||||
This method is not fail-safe and there are occasions where non-successful
|
||||
response codes will slip through, especially when authentication is involved
|
||||
@@ -536,11 +566,11 @@ response codes will slip through, especially when authentication is involved
|
||||
(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
|
||||
submit button. This causes curl to POST data using the Content-Type
|
||||
multipart/form-data according to RFC 2388. This enables uploading of binary
|
||||
files etc. To force the 'content' part to be a file, prefix the file name
|
||||
with an @ sign. To just get the content part from a file, prefix the file name
|
||||
with the symbol <. The difference between @ and < is then that @ makes a file
|
||||
get attached in the post as a file upload, while the < makes a text field and
|
||||
just get the contents for that text field from a file.
|
||||
files etc. To force the 'content' part to be a file, prefix the file name with
|
||||
an @ sign. To just get the content part from a file, prefix the file name with
|
||||
the symbol <. The difference between @ and < is then that @ makes a file get
|
||||
attached in the post as a file upload, while the < makes a text field and just
|
||||
get the contents for that text field from a file.
|
||||
|
||||
Example, to send your password file to the server, where
|
||||
\&'password' is the name of the form-field to which /etc/passwd will be the
|
||||
@@ -699,6 +729,10 @@ See also the \fI-A, --user-agent\fP and \fI-e, --referer\fP options.
|
||||
Starting in 7.37.0, you need \fI--proxy-header\fP to send custom headers
|
||||
intended for a proxy.
|
||||
|
||||
Example:
|
||||
|
||||
\&# curl -H "X-First-Name: Joe" http://192.168.0.1/
|
||||
|
||||
This option can be used multiple times to add/replace/remove multiple headers.
|
||||
.IP "--hostpubmd5 <md5>"
|
||||
(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
|
||||
@@ -779,12 +813,12 @@ the following places in this order:
|
||||
|
||||
1) curl tries to find the "home dir": It first checks for the CURL_HOME and
|
||||
then the HOME environment variables. Failing that, it uses getpwuid() on
|
||||
UNIX-like systems (which returns the home dir given the current user in your
|
||||
Unix-like systems (which returns the home dir given the current user in your
|
||||
system). On Windows, it then checks for the APPDATA variable, or as a last
|
||||
resort the '%USERPROFILE%\\Application Data'.
|
||||
|
||||
2) On windows, if there is no _curlrc file in the home dir, it checks for one
|
||||
in the same dir the curl executable is placed. On UNIX-like systems, it will
|
||||
in the same dir the curl executable is placed. On Unix-like systems, it will
|
||||
simply try to load .curlrc from the determined home dir.
|
||||
|
||||
.nf
|
||||
@@ -813,7 +847,8 @@ If this option is used several times, the last one will be used. If
|
||||
unspecified, the option defaults to 60 seconds.
|
||||
.IP "--key <key>"
|
||||
(SSL/SSH) Private key file name. Allows you to provide your private key in this
|
||||
separate file.
|
||||
separate file. For SSH, if not specified, curl tries the following candidates
|
||||
in order: '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--key-type <type>"
|
||||
@@ -827,9 +862,8 @@ If this option is used several times, the last one will be used.
|
||||
should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use
|
||||
a level that is not one of these, 'private' will instead be used.
|
||||
|
||||
This option requires a library built with kerberos4 or GSSAPI
|
||||
(GSS-Negotiate) support. This is not very common. Use \fI-V, --version\fP to
|
||||
see if your curl supports it.
|
||||
This option requires a library built with kerberos4 support. This is not
|
||||
very common. Use \fI-V, --version\fP to see if your curl supports it.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-l, --list-only"
|
||||
@@ -866,6 +900,10 @@ When curl follows a redirect and the request is not a plain GET (for example
|
||||
POST or PUT), it will do the following request with a GET if the HTTP response
|
||||
was 301, 302, or 303. If the response code was any other 3xx code, curl will
|
||||
re-send the following request using the same unmodified method.
|
||||
|
||||
You can tell curl to not change the non-GET request method to GET after a 30x
|
||||
response by using the dedicated options for that: \fI--post301\fP,
|
||||
\fI--post302\fP and \fI-post303\fP.
|
||||
.IP "--libcurl <file>"
|
||||
Append this option to any ordinary curl command line, and you will get a
|
||||
libcurl-using C source code written to the file that does the equivalent
|
||||
@@ -874,9 +912,10 @@ of what your command-line operation does!
|
||||
If this option is used several times, the last given file name will be
|
||||
used. (Added in 7.16.1)
|
||||
.IP "--limit-rate <speed>"
|
||||
Specify the maximum transfer rate you want curl to use. This feature is useful
|
||||
if you have a limited pipe and you'd like your transfer not to use your entire
|
||||
bandwidth.
|
||||
Specify the maximum transfer rate you want curl to use - for both downloads
|
||||
and uploads. This feature is useful if you have a limited pipe and you'd like
|
||||
your transfer not to use your entire bandwidth. To make it slower than it
|
||||
otherwise would be.
|
||||
|
||||
The given speed is measured in bytes/second, unless a suffix is appended.
|
||||
Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
|
||||
@@ -987,7 +1026,7 @@ in Metalink file, hash check will fail.
|
||||
.IP "-n, --netrc"
|
||||
Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
|
||||
home directory for login name and password. This is typically used for FTP on
|
||||
UNIX. If used with HTTP, curl will enable user authentication. See
|
||||
Unix. If used with HTTP, curl will enable user authentication. See
|
||||
.BR netrc(4)
|
||||
or
|
||||
.BR ftp(1)
|
||||
@@ -1024,18 +1063,13 @@ Very similar to \fI--netrc\fP, but this option makes the .netrc usage
|
||||
\fBoptional\fP and not mandatory as the \fI--netrc\fP option does.
|
||||
|
||||
.IP "--negotiate"
|
||||
(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
|
||||
designed by Microsoft and is used in their web applications. It is primarily
|
||||
meant as a support for Kerberos5 authentication but may be also used along
|
||||
with another authentication method. For more information see IETF draft
|
||||
draft-brezak-spnego-http-04.txt.
|
||||
(HTTP) Enables Negotiate (SPNEGO) authentication.
|
||||
|
||||
If you want to enable Negotiate for your proxy authentication, then use
|
||||
If you want to enable Negotiate (SPNEGO) for proxy authentication, then use
|
||||
\fI--proxy-negotiate\fP.
|
||||
|
||||
This option requires a library built with GSSAPI support. This is
|
||||
not very common. Use \fI-V, --version\fP to see if your version supports
|
||||
GSS-Negotiate.
|
||||
This option requires a library built with GSS-API or SSPI support. Use \fI-V,
|
||||
--version\fP to see if your curl supports GSS-API/SSPI and SPNEGO.
|
||||
|
||||
When using this option, you must also provide a fake \fI-u, --user\fP option to
|
||||
activate the authentication code properly. Sending a '-u :' is enough as the
|
||||
@@ -1254,8 +1288,8 @@ the default authentication method curl uses with proxies.
|
||||
Tells curl to use HTTP Digest authentication when communicating with the given
|
||||
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
||||
.IP "--proxy-negotiate"
|
||||
Tells curl to use HTTP Negotiate authentication when communicating
|
||||
with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
|
||||
Tells curl to use HTTP Negotiate (SPNEGO) authentication when communicating
|
||||
with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate (SPNEGO)
|
||||
with a remote host. (Added in 7.17.1)
|
||||
.IP "--proxy-ntlm"
|
||||
Tells curl to use HTTP NTLM authentication when communicating with the given
|
||||
@@ -1272,6 +1306,11 @@ protocol instead of the default HTTP 1.1.
|
||||
separate file.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
|
||||
(As of 7.39.0, curl attempts to automatically extract the public key from the
|
||||
private key file, so passing this option is generally not required. Note that
|
||||
this public key extraction requires libcurl to be linked against a copy of
|
||||
libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
|
||||
.IP "-q"
|
||||
If used as the first parameter on the command line, the \fIcurlrc\fP config
|
||||
file will not be read and used. See the \fI-K, --config\fP for details on the
|
||||
@@ -1518,7 +1557,7 @@ sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
|
||||
sockd/real-name would use sockd/real-name for cases where the proxy-name does
|
||||
not match the principal name. (Added in 7.19.4).
|
||||
.IP "--socks5-gssapi-nec"
|
||||
As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
|
||||
As part of the GSS-API negotiation a protection mode is negotiated. RFC 1961
|
||||
says in section 4.3/4.4 it should be protected, but the NEC reference
|
||||
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
|
||||
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
|
||||
@@ -1623,6 +1662,9 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--trace-time"
|
||||
Prepends a time stamp to each trace or verbose line that curl displays.
|
||||
(Added in 7.14.0)
|
||||
.IP "--unix-socket <path>"
|
||||
(HTTP) Connect through this Unix domain socket, instead of using the
|
||||
network. (Added in 7.40.0)
|
||||
.IP "-u, --user <user:password>"
|
||||
Specify the user name and password to use for server authentication. Overrides
|
||||
\fI-n, --netrc\fP and \fI--netrc-optional\fP.
|
||||
@@ -1633,17 +1675,31 @@ The user name and passwords are split up on the first colon, which makes it
|
||||
impossible to use a colon in the user name with this option. The password can,
|
||||
still.
|
||||
|
||||
If you use an SSPI-enabled curl binary and perform NTLM authentication, you
|
||||
can force curl to select the user name and password from your environment by
|
||||
specifying a single colon with this option: "-u :".
|
||||
When using Kerberos V5 with a Windows based server you should include the
|
||||
Windows domain name in the user name, in order for the server to succesfully
|
||||
obtain a Kerberos Ticket. If you don't then the initial authentication
|
||||
handshake may fail.
|
||||
|
||||
When using NTLM, the user name can be specified simply as the user name,
|
||||
without the domain, if there is a single domain and forest in your setup
|
||||
for example.
|
||||
|
||||
To specify the domain name use either Down-Level Logon Name or UPN (User
|
||||
Principal Name) formats. For example, EXAMPLE\\user and user@example.com
|
||||
respectively.
|
||||
|
||||
If you use a Windows SSPI-enabled curl binary and perform Kerberos V5,
|
||||
Negotiate, NTLM or Digest authentication then you can tell curl to select
|
||||
the user name and password from your environment by specifying a single colon
|
||||
with this option: "-u :".
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-U, --proxy-user <user:password>"
|
||||
Specify the user name and password to use for proxy authentication.
|
||||
|
||||
If you use an SSPI-enabled curl binary and do NTLM authentication, you can
|
||||
force curl to pick up the user name and password from your environment by
|
||||
simply specifying a single colon with this option: "-U :".
|
||||
If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM
|
||||
authentication then you can tell curl to select the user name and password
|
||||
from your environment by specifying a single colon with this option: "-U :".
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--url <URL>"
|
||||
@@ -1653,10 +1709,11 @@ URL(s) in a config file.
|
||||
This option may be used any number of times. To control where this URL is
|
||||
written, use the \fI-o, --output\fP or the \fI-O, --remote-name\fP options.
|
||||
.IP "-v, --verbose"
|
||||
Makes the fetching more verbose/talkative. Mostly useful for debugging. A line
|
||||
starting with '>' means "header data" sent by curl, '<' means "header data"
|
||||
received by curl that is hidden in normal cases, and a line starting with '*'
|
||||
means additional info provided by curl.
|
||||
Be more verbose/talkative during the operation. Useful for debugging and
|
||||
seeing what's going on "under the hood". A line starting with '>' means
|
||||
"header data" sent by curl, '<' means "header data" received by curl that is
|
||||
hidden in normal cases, and a line starting with '*' means additional info
|
||||
provided by curl.
|
||||
|
||||
Note that if you only want HTTP headers in the output, \fI-i, --include\fP
|
||||
might be the option you're looking for.
|
||||
@@ -1668,10 +1725,10 @@ This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
||||
|
||||
Use \fI-s, --silent\fP to make curl quiet.
|
||||
.IP "-w, --write-out <format>"
|
||||
Defines what to display on stdout after a completed and successful
|
||||
operation. The format is a string that may contain plain text mixed with any
|
||||
number of variables. The string can be specified as "string", to get read from
|
||||
a particular file you specify it "@filename" and to tell curl to read the
|
||||
Make curl display information on stdout after a completed transfer. The format
|
||||
is a string that may contain plain text mixed with any number of
|
||||
variables. The format can be specified as a literal "string", or you can have
|
||||
curl read the format from a file with "@filename" and to tell curl to read the
|
||||
format from stdin you write "@-".
|
||||
|
||||
The variables present in the output format will be substituted by the value or
|
||||
@@ -1892,7 +1949,8 @@ than the specified date/time.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-h, --help"
|
||||
Usage help.
|
||||
Usage help. This lists all current command line options with a short
|
||||
description.
|
||||
.IP "-M, --manual"
|
||||
Manual. Display the huge help text.
|
||||
.IP "-V, --version"
|
||||
@@ -1912,29 +1970,32 @@ You can use IPv6 with this.
|
||||
.IP "krb4"
|
||||
Krb4 for FTP is supported.
|
||||
.IP "SSL"
|
||||
HTTPS and FTPS are supported.
|
||||
SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S
|
||||
and so on.
|
||||
.IP "libz"
|
||||
Automatic decompression of compressed files over HTTP is supported.
|
||||
.IP "NTLM"
|
||||
NTLM authentication is supported.
|
||||
.IP "GSS-Negotiate"
|
||||
Negotiate authentication and krb5 for FTP is supported.
|
||||
.IP "Debug"
|
||||
This curl uses a libcurl built with Debug. This enables more error-tracking
|
||||
and memory debugging etc. For curl-developers only!
|
||||
.IP "AsynchDNS"
|
||||
This curl uses asynchronous name resolves.
|
||||
This curl uses asynchronous name resolves. Asynchronous name resolves can be
|
||||
done using either the c-ares or the threaded resolver backends.
|
||||
.IP "SPNEGO"
|
||||
SPNEGO Negotiate authentication is supported.
|
||||
SPNEGO authentication is supported.
|
||||
.IP "Largefile"
|
||||
This curl supports transfers of large files, files larger than 2GB.
|
||||
.IP "IDN"
|
||||
This curl supports IDN - international domain names.
|
||||
.IP "GSS-API"
|
||||
GSS-API is supported.
|
||||
.IP "SSPI"
|
||||
SSPI is supported. If you use NTLM and set a blank user name, curl will
|
||||
authenticate with your current user and password.
|
||||
SSPI is supported.
|
||||
.IP "TLS-SRP"
|
||||
SRP (Secure Remote Password) authentication is supported for TLS.
|
||||
.IP "HTTP2"
|
||||
HTTP/2 support has been built-in.
|
||||
.IP "Metalink"
|
||||
This curl supports Metalink (both version 3 and 4 (RFC 5854)), which
|
||||
describes mirrors and hashes. curl will use mirrors for failover if
|
||||
@@ -2150,6 +2211,8 @@ unable to parse FTP file list
|
||||
FTP chunk callback reported error
|
||||
.IP 89
|
||||
No connection available, the session will be queued
|
||||
.IP 90
|
||||
SSL public key does not matched pinned public key
|
||||
.IP XX
|
||||
More error codes will appear here in future releases. The existing ones
|
||||
are meant to never change.
|
||||
|
@@ -62,7 +62,6 @@ static const char *urls[] = {
|
||||
"http://www.uefa.com",
|
||||
"http://www.ieee.org",
|
||||
"http://www.apple.com",
|
||||
"http://www.sony.com",
|
||||
"http://www.symantec.com",
|
||||
"http://www.zdnet.com",
|
||||
"http://www.fujitsu.com",
|
||||
|
@@ -1,20 +1,42 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# These are all libcurl example programs to be test compiled
|
||||
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
||||
fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \
|
||||
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
||||
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||
smtp-mail smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn rtsp \
|
||||
externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl pop3-dele \
|
||||
pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi imap-list \
|
||||
imap-lsub imap-fetch imap-store imap-append imap-examine imap-search \
|
||||
imap-create imap-delete imap-copy imap-noop imap-ssl imap-tls imap-multi \
|
||||
url2file sftpget ftpsget postinmemory
|
||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||
smtp-mail smtp-multi smtp-ssl smtp-tls smtp-vrfy smtp-expn rtsp \
|
||||
externalsocket resolve progressfunc pop3-retr pop3-list pop3-uidl \
|
||||
pop3-dele pop3-top pop3-stat pop3-noop pop3-ssl pop3-tls pop3-multi \
|
||||
imap-list imap-lsub imap-fetch imap-store imap-append imap-examine \
|
||||
imap-search imap-create imap-delete imap-copy imap-noop imap-ssl \
|
||||
imap-tls imap-multi url2file sftpget ftpsget postinmemory
|
||||
|
||||
# These examples require external dependencies that may not be commonly
|
||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \
|
||||
ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cpp cacertinmem.c \
|
||||
ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
|
||||
smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
|
||||
smooth-gtk-thread.c version-check.pl href_extractor.c asiohiper.cpp \
|
||||
multi-uv.c xmlstream.c usercertinmem.c sessioninfo.c
|
||||
|
@@ -38,7 +38,7 @@ ZLIB_PATH = ../../../zlib-1.2.8
|
||||
endif
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../../openssl-0.9.8y
|
||||
OPENSSL_PATH = ../../../openssl-0.9.8zc
|
||||
endif
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
@@ -148,9 +148,6 @@ endif
|
||||
ifeq ($(findstring -sspi,$(CFG)),-sspi)
|
||||
SSPI = 1
|
||||
endif
|
||||
ifeq ($(findstring -spnego,$(CFG)),-spnego)
|
||||
SPNEGO = 1
|
||||
endif
|
||||
ifeq ($(findstring -ldaps,$(CFG)),-ldaps)
|
||||
LDAPS = 1
|
||||
endif
|
||||
@@ -230,9 +227,6 @@ ifdef SSPI
|
||||
CFLAGS += -DUSE_SCHANNEL
|
||||
endif
|
||||
endif
|
||||
ifdef SPNEGO
|
||||
CFLAGS += -DHAVE_SPNEGO
|
||||
endif
|
||||
ifdef IPV6
|
||||
CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
|
||||
endif
|
||||
|
@@ -19,7 +19,7 @@ endif
|
||||
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../../openssl-0.9.8y
|
||||
OPENSSL_PATH = ../../../openssl-0.9.8zc
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
@@ -211,9 +211,6 @@ endif
|
||||
ifeq ($(findstring -idn,$(CFG)),-idn)
|
||||
WITH_IDN = 1
|
||||
endif
|
||||
ifeq ($(findstring -spnego,$(CFG)),-spnego)
|
||||
WITH_SPNEGO = 1
|
||||
endif
|
||||
ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
|
||||
ENABLE_IPV6 = 1
|
||||
endif
|
||||
@@ -247,10 +244,6 @@ ifdef WITH_SSL
|
||||
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
|
||||
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
|
||||
IMPORTS += GetProcessSwitchCount RunningProcess
|
||||
ifdef WITH_SPNEGO
|
||||
# INCLUDES += -I$(FBOPENSSL_PATH)/include
|
||||
LDLIBS += $(FBOPENSSL_PATH)/nw/fbopenssl.$(LIBEXT)
|
||||
endif
|
||||
else
|
||||
ifdef WITH_AXTLS
|
||||
INCLUDES += -I$(AXTLS_PATH)/inc
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -84,7 +84,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
||||
/* cancel running timer */
|
||||
timer.cancel();
|
||||
|
||||
if ( timeout_ms > 0 )
|
||||
if(timeout_ms > 0)
|
||||
{
|
||||
/* update timer */
|
||||
timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
|
||||
@@ -103,26 +103,44 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
||||
/* Die if we get a bad CURLMcode somewhere */
|
||||
static void mcode_or_die(const char *where, CURLMcode code)
|
||||
{
|
||||
if ( CURLM_OK != code )
|
||||
if(CURLM_OK != code)
|
||||
{
|
||||
const char *s;
|
||||
switch ( code )
|
||||
switch(code)
|
||||
{
|
||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||
case CURLM_INTERNAL_ERROR: s="CURLM_INTERNAL_ERROR"; break;
|
||||
case CURLM_UNKNOWN_OPTION: s="CURLM_UNKNOWN_OPTION"; break;
|
||||
case CURLM_LAST: s="CURLM_LAST"; break;
|
||||
default: s="CURLM_unknown";
|
||||
case CURLM_CALL_MULTI_PERFORM:
|
||||
s = "CURLM_CALL_MULTI_PERFORM";
|
||||
break;
|
||||
case CURLM_BAD_SOCKET: s="CURLM_BAD_SOCKET";
|
||||
case CURLM_BAD_HANDLE:
|
||||
s = "CURLM_BAD_HANDLE";
|
||||
break;
|
||||
case CURLM_BAD_EASY_HANDLE:
|
||||
s = "CURLM_BAD_EASY_HANDLE";
|
||||
break;
|
||||
case CURLM_OUT_OF_MEMORY:
|
||||
s = "CURLM_OUT_OF_MEMORY";
|
||||
break;
|
||||
case CURLM_INTERNAL_ERROR:
|
||||
s = "CURLM_INTERNAL_ERROR";
|
||||
break;
|
||||
case CURLM_UNKNOWN_OPTION:
|
||||
s = "CURLM_UNKNOWN_OPTION";
|
||||
break;
|
||||
case CURLM_LAST:
|
||||
s = "CURLM_LAST";
|
||||
break;
|
||||
default:
|
||||
s = "CURLM_unknown";
|
||||
break;
|
||||
case CURLM_BAD_SOCKET:
|
||||
s = "CURLM_BAD_SOCKET";
|
||||
fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
|
||||
/* ignore this error */
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(MSG_OUT, "\nERROR: %s returns %s", where, s);
|
||||
|
||||
exit(code);
|
||||
}
|
||||
}
|
||||
@@ -139,9 +157,9 @@ static void check_multi_info(GlobalInfo *g)
|
||||
|
||||
fprintf(MSG_OUT, "\nREMAINING: %d", g->still_running);
|
||||
|
||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left)))
|
||||
while((msg = curl_multi_info_read(g->multi, &msgs_left)))
|
||||
{
|
||||
if (msg->msg == CURLMSG_DONE)
|
||||
if(msg->msg == CURLMSG_DONE)
|
||||
{
|
||||
easy = msg->easy_handle;
|
||||
res = msg->data.result;
|
||||
@@ -157,17 +175,19 @@ static void check_multi_info(GlobalInfo *g)
|
||||
}
|
||||
|
||||
/* Called by asio when there is an action on a socket */
|
||||
static void event_cb(GlobalInfo * g, boost::asio::ip::tcp::socket * tcp_socket, int action)
|
||||
static void event_cb(GlobalInfo *g, boost::asio::ip::tcp::socket *tcp_socket,
|
||||
int action)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nevent_cb: action=%d", action);
|
||||
|
||||
CURLMcode rc;
|
||||
rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action, &g->still_running);
|
||||
rc = curl_multi_socket_action(g->multi, tcp_socket->native_handle(), action,
|
||||
&g->still_running);
|
||||
|
||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||
check_multi_info(g);
|
||||
|
||||
if ( g->still_running <= 0 )
|
||||
if(g->still_running <= 0)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nlast transfer done, kill timeout");
|
||||
timer.cancel();
|
||||
@@ -177,7 +197,7 @@ static void event_cb(GlobalInfo * g, boost::asio::ip::tcp::socket * tcp_socket,
|
||||
/* Called by asio when our timeout expires */
|
||||
static void timer_cb(const boost::system::error_code & error, GlobalInfo *g)
|
||||
{
|
||||
if ( !error)
|
||||
if(!error)
|
||||
{
|
||||
fprintf(MSG_OUT, "\ntimer_cb: ");
|
||||
|
||||
@@ -194,7 +214,7 @@ static void remsock(int *f, GlobalInfo *g)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nremsock: ");
|
||||
|
||||
if ( f )
|
||||
if(f)
|
||||
{
|
||||
free(f);
|
||||
}
|
||||
@@ -206,9 +226,10 @@ static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
|
||||
|
||||
std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(s);
|
||||
|
||||
if ( it == socket_map.end() )
|
||||
if(it == socket_map.end())
|
||||
{
|
||||
fprintf(MSG_OUT, "\nsocket %d is a c-ares socket, ignoring", s);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -216,44 +237,36 @@ static void setsock(int *fdp, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
|
||||
|
||||
*fdp = act;
|
||||
|
||||
if ( act == CURL_POLL_IN )
|
||||
if(act == CURL_POLL_IN)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nwatching for socket to become readable");
|
||||
|
||||
tcp_socket->async_read_some(boost::asio::null_buffers(),
|
||||
boost::bind(&event_cb, g,
|
||||
tcp_socket,
|
||||
act));
|
||||
boost::bind(&event_cb, g, tcp_socket, act));
|
||||
}
|
||||
else if ( act == CURL_POLL_OUT )
|
||||
else if (act == CURL_POLL_OUT)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nwatching for socket to become writable");
|
||||
|
||||
tcp_socket->async_write_some(boost::asio::null_buffers(),
|
||||
boost::bind(&event_cb, g,
|
||||
tcp_socket,
|
||||
act));
|
||||
boost::bind(&event_cb, g, tcp_socket, act));
|
||||
}
|
||||
else if ( act == CURL_POLL_INOUT )
|
||||
else if(act == CURL_POLL_INOUT)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nwatching for socket to become readable & writable");
|
||||
|
||||
tcp_socket->async_read_some(boost::asio::null_buffers(),
|
||||
boost::bind(&event_cb, g,
|
||||
tcp_socket,
|
||||
act));
|
||||
boost::bind(&event_cb, g, tcp_socket, act));
|
||||
|
||||
tcp_socket->async_write_some(boost::asio::null_buffers(),
|
||||
boost::bind(&event_cb, g,
|
||||
tcp_socket,
|
||||
act));
|
||||
boost::bind(&event_cb, g, tcp_socket, act));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
|
||||
{
|
||||
int *fdp = (int *)calloc(sizeof(int), 1); /* fdp is used to store current action */
|
||||
/* fdp is used to store current action */
|
||||
int *fdp = (int *) calloc(sizeof(int), 1);
|
||||
|
||||
setsock(fdp, s, easy, action, g);
|
||||
curl_multi_assign(g->multi, s, fdp);
|
||||
@@ -265,20 +278,20 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
fprintf(MSG_OUT, "\nsock_cb: socket=%d, what=%d, sockp=%p", s, what, sockp);
|
||||
|
||||
GlobalInfo *g = (GlobalInfo*) cbp;
|
||||
int *actionp = (int*) sockp;
|
||||
const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE"};
|
||||
int *actionp = (int *) sockp;
|
||||
const char *whatstr[] = { "none", "IN", "OUT", "INOUT", "REMOVE"};
|
||||
|
||||
fprintf(MSG_OUT,
|
||||
"\nsocket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
|
||||
|
||||
if ( what == CURL_POLL_REMOVE )
|
||||
if(what == CURL_POLL_REMOVE)
|
||||
{
|
||||
fprintf(MSG_OUT, "\n");
|
||||
remsock(actionp, g);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !actionp )
|
||||
if(!actionp)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nAdding data: %s", whatstr[what]);
|
||||
addsock(s, e, what, g);
|
||||
@@ -291,19 +304,19 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
setsock(actionp, s, e, what, g);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_WRITEFUNCTION */
|
||||
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
|
||||
size_t written = size * nmemb;
|
||||
char* pBuffer = (char*)malloc(written + 1);
|
||||
char* pBuffer = (char *) malloc(written + 1);
|
||||
|
||||
strncpy(pBuffer, (const char *)ptr, written);
|
||||
pBuffer [written] = '\0';
|
||||
pBuffer[written] = '\0';
|
||||
|
||||
fprintf(MSG_OUT, "%s", pBuffer);
|
||||
|
||||
@@ -312,12 +325,12 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
return written;
|
||||
}
|
||||
|
||||
|
||||
/* CURLOPT_PROGRESSFUNCTION */
|
||||
static int prog_cb (void *p, double dltotal, double dlnow, double ult,
|
||||
double uln)
|
||||
static int prog_cb(void *p, double dltotal, double dlnow, double ult,
|
||||
double uln)
|
||||
{
|
||||
ConnInfo *conn = (ConnInfo *)p;
|
||||
|
||||
(void)ult;
|
||||
(void)uln;
|
||||
|
||||
@@ -328,16 +341,15 @@ static int prog_cb (void *p, double dltotal, double dlnow, double ult,
|
||||
}
|
||||
|
||||
/* CURLOPT_OPENSOCKETFUNCTION */
|
||||
static curl_socket_t opensocket(void *clientp,
|
||||
curlsocktype purpose,
|
||||
static curl_socket_t opensocket(void *clientp, curlsocktype purpose,
|
||||
struct curl_sockaddr *address)
|
||||
{
|
||||
fprintf(MSG_OUT, "\nopensocket :");
|
||||
|
||||
curl_socket_t sockfd = CURL_SOCKET_BAD;
|
||||
|
||||
/* restrict to ipv4 */
|
||||
if (purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET)
|
||||
/* restrict to IPv4 */
|
||||
if(purpose == CURLSOCKTYPE_IPCXN && address->family == AF_INET)
|
||||
{
|
||||
/* create a tcp socket object */
|
||||
boost::asio::ip::tcp::socket *tcp_socket = new boost::asio::ip::tcp::socket(io_service);
|
||||
@@ -346,9 +358,9 @@ static curl_socket_t opensocket(void *clientp,
|
||||
boost::system::error_code ec;
|
||||
tcp_socket->open(boost::asio::ip::tcp::v4(), ec);
|
||||
|
||||
if (ec)
|
||||
if(ec)
|
||||
{
|
||||
//An error occurred
|
||||
/* An error occurred */
|
||||
std::cout << std::endl << "Couldn't open socket [" << ec << "][" << ec.message() << "]";
|
||||
fprintf(MSG_OUT, "\nERROR: Returning CURL_SOCKET_BAD to signal error");
|
||||
}
|
||||
@@ -372,7 +384,7 @@ static int closesocket(void *clientp, curl_socket_t item)
|
||||
|
||||
std::map<curl_socket_t, boost::asio::ip::tcp::socket *>::iterator it = socket_map.find(item);
|
||||
|
||||
if ( it != socket_map.end() )
|
||||
if(it != socket_map.end())
|
||||
{
|
||||
delete it->second;
|
||||
socket_map.erase(it);
|
||||
@@ -382,22 +394,21 @@ static int closesocket(void *clientp, curl_socket_t item)
|
||||
}
|
||||
|
||||
/* Create a new easy handle, and add it to the global curl_multi */
|
||||
static void new_conn(char *url, GlobalInfo *g )
|
||||
static void new_conn(char *url, GlobalInfo *g)
|
||||
{
|
||||
ConnInfo *conn;
|
||||
CURLMcode rc;
|
||||
|
||||
conn = (ConnInfo *)calloc(1, sizeof(ConnInfo));
|
||||
memset(conn, 0, sizeof(ConnInfo));
|
||||
conn->error[0]='\0';
|
||||
conn = (ConnInfo *) calloc(1, sizeof(ConnInfo));
|
||||
|
||||
conn->easy = curl_easy_init();
|
||||
|
||||
if ( !conn->easy )
|
||||
if(!conn->easy)
|
||||
{
|
||||
fprintf(MSG_OUT, "\ncurl_easy_init() failed, exiting!");
|
||||
|
||||
exit(2);
|
||||
}
|
||||
|
||||
conn->global = g;
|
||||
conn->url = strdup(url);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
|
||||
@@ -431,6 +442,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
GlobalInfo g;
|
||||
CURLMcode rc;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
@@ -450,5 +462,6 @@ int main(int argc, char **argv)
|
||||
curl_multi_cleanup(g.multi);
|
||||
|
||||
fprintf(MSG_OUT, "\ndone.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <sys/socket.h> /* socket definitions */
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h> /* inet (3) funtions */
|
||||
#include <unistd.h> /* misc. UNIX functions */
|
||||
#include <unistd.h> /* misc. Unix functions */
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
@@ -128,6 +128,7 @@ static int fill_buffer(URL_FILE *file, size_t want)
|
||||
fd_set fdexcep;
|
||||
struct timeval timeout;
|
||||
int rc;
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
/* only attempt to fill buffer if transactions still running and buffer
|
||||
* doesnt exceed required size already
|
||||
@@ -158,15 +159,35 @@ static int fill_buffer(URL_FILE *file, size_t want)
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially
|
||||
in case of (maxfd == -1), we call select(0, ...), which is basically
|
||||
equal to sleep. */
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -26,9 +26,9 @@ struct callback_data {
|
||||
FILE *output;
|
||||
};
|
||||
|
||||
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains);
|
||||
static long file_is_coming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains);
|
||||
|
||||
static long file_is_downloaded(struct callback_data *data);
|
||||
|
||||
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
|
||||
|
||||
/* callback is called before download of concrete file started */
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming);
|
||||
|
||||
/* callback is called after data from the file have been transferred */
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
|
||||
@@ -89,9 +89,9 @@ int main(int argc, char **argv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains)
|
||||
static long file_is_coming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains)
|
||||
{
|
||||
printf("%3d %40s %10luB ", remains, finfo->filename,
|
||||
(unsigned long)finfo->size);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -31,20 +31,25 @@ int main(void)
|
||||
if(curl) {
|
||||
struct curl_slist *chunk = NULL;
|
||||
|
||||
chunk = curl_slist_append(chunk, "Accept: moo");
|
||||
/* Remove a header curl would otherwise add by itself */
|
||||
chunk = curl_slist_append(chunk, "Accept:");
|
||||
|
||||
/* Add a custom header */
|
||||
chunk = curl_slist_append(chunk, "Another: yes");
|
||||
|
||||
/* request with the built-in Accept: */
|
||||
/* Modify a header curl otherwise adds differently */
|
||||
chunk = curl_slist_append(chunk, "Host: example.com");
|
||||
|
||||
/* Add a header with "blank" contents to the right of the colon. Note that
|
||||
we're then using a semicolon in the string we pass to curl! */
|
||||
chunk = curl_slist_append(chunk, "X-silly-header;");
|
||||
|
||||
/* set our custom set of headers */
|
||||
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "localhost");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
/* Check for errors */
|
||||
if(res != CURLE_OK)
|
||||
fprintf(stderr, "curl_easy_perform() failed: %s\n",
|
||||
curl_easy_strerror(res));
|
||||
|
||||
/* redo request with our own custom Accept: */
|
||||
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
|
||||
res = curl_easy_perform(curl);
|
||||
/* Check for errors */
|
||||
if(res != CURLE_OK)
|
||||
|
@@ -88,6 +88,7 @@ int main(void)
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
int rc;
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
@@ -109,15 +110,36 @@ int main(void)
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* Get file descriptors from the transfers */
|
||||
curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
|
||||
fprintf(stderr,
|
||||
|
@@ -73,6 +73,7 @@ int main(void)
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
@@ -99,15 +100,35 @@ int main(void)
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
|
@@ -147,6 +147,7 @@ int main(void)
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
@@ -173,15 +174,35 @@ int main(void)
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
|
@@ -62,6 +62,7 @@ int main(void)
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
@@ -88,15 +89,35 @@ int main(void)
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
|
@@ -83,6 +83,7 @@ int main(void)
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
@@ -109,15 +110,35 @@ int main(void)
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -31,6 +31,15 @@
|
||||
/* curl stuff */
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WAITMS(x) Sleep(x)
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
#define WAITMS(x) \
|
||||
struct timeval wait = { 0, (x) * 1000 }; \
|
||||
(void)select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Simply download a HTTP file.
|
||||
*/
|
||||
@@ -40,6 +49,7 @@ int main(void)
|
||||
CURLM *multi_handle;
|
||||
|
||||
int still_running; /* keep number of running handles */
|
||||
int repeats = 0;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
|
||||
@@ -58,56 +68,33 @@ int main(void)
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_wait() return code */
|
||||
int numfds;
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
/* wait for activity, timeout or "nothing" */
|
||||
mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
|
||||
/* set a suitable timeout to play around with */
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
/* select error */
|
||||
still_running = 0;
|
||||
printf("select() returns error, this is badness\n");
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* 'numfds' being zero means either a timeout or no file descriptors to
|
||||
wait for. Try timeout on first occurance, then assume no file
|
||||
descriptors and no file descriptors to wait for means wait for 100
|
||||
milliseconds. */
|
||||
|
||||
if(!numfds) {
|
||||
repeats++; /* count number of repeated zero numfds */
|
||||
if(repeats > 1) {
|
||||
WAITMS(100); /* sleep 100 milliseconds */
|
||||
}
|
||||
}
|
||||
else
|
||||
repeats = 0;
|
||||
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
} while(still_running);
|
||||
|
||||
curl_multi_remove_handle(multi_handle, http_handle);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -64,13 +64,13 @@ curl_context_t* create_curl_context(curl_socket_t sockfd)
|
||||
|
||||
void curl_close_cb(uv_handle_t *handle)
|
||||
{
|
||||
curl_context_t* context = (curl_context_t*) handle->data;
|
||||
curl_context_t *context = (curl_context_t *) handle->data;
|
||||
free(context);
|
||||
}
|
||||
|
||||
void destroy_curl_context(curl_context_t *context)
|
||||
{
|
||||
uv_close((uv_handle_t*) &context->poll_handle, curl_close_cb);
|
||||
uv_close((uv_handle_t *) &context->poll_handle, curl_close_cb);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,18 +83,49 @@ void add_download(const char *url, int num)
|
||||
sprintf(filename, "%d.download", num);
|
||||
|
||||
file = fopen(filename, "w");
|
||||
if (file == NULL) {
|
||||
if(!file) {
|
||||
fprintf(stderr, "Error opening %s\n", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
handle = curl_easy_init();
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
|
||||
curl_easy_setopt(handle, CURLOPT_PRIVATE, file);
|
||||
curl_easy_setopt(handle, CURLOPT_URL, url);
|
||||
curl_multi_add_handle(curl_handle, handle);
|
||||
fprintf(stderr, "Added download %s -> %s\n", url, filename);
|
||||
}
|
||||
|
||||
static void check_multi_info(void)
|
||||
{
|
||||
int running_handles;
|
||||
char *done_url;
|
||||
CURLMsg *message;
|
||||
int pending;
|
||||
FILE *file;
|
||||
|
||||
while((message = curl_multi_info_read(curl_handle, &pending))) {
|
||||
switch(message->msg) {
|
||||
case CURLMSG_DONE:
|
||||
curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL,
|
||||
&done_url);
|
||||
curl_easy_getinfo(message->easy_handle, CURLINFO_PRIVATE, &file);
|
||||
printf("%s DONE\n", done_url);
|
||||
|
||||
curl_multi_remove_handle(curl_handle, message->easy_handle);
|
||||
curl_easy_cleanup(message->easy_handle);
|
||||
if(file) {
|
||||
fclose(file);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "CURLMSG default\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void curl_perform(uv_poll_t *req, int status, int events)
|
||||
{
|
||||
int running_handles;
|
||||
@@ -106,32 +137,17 @@ void curl_perform(uv_poll_t *req, int status, int events)
|
||||
|
||||
uv_timer_stop(&timeout);
|
||||
|
||||
if (events & UV_READABLE)
|
||||
if(events & UV_READABLE)
|
||||
flags |= CURL_CSELECT_IN;
|
||||
if (events & UV_WRITABLE)
|
||||
if(events & UV_WRITABLE)
|
||||
flags |= CURL_CSELECT_OUT;
|
||||
|
||||
context = (curl_context_t*)req;
|
||||
context = (curl_context_t *) req;
|
||||
|
||||
curl_multi_socket_action(curl_handle, context->sockfd, flags,
|
||||
&running_handles);
|
||||
|
||||
while ((message = curl_multi_info_read(curl_handle, &pending))) {
|
||||
switch (message->msg) {
|
||||
case CURLMSG_DONE:
|
||||
curl_easy_getinfo(message->easy_handle, CURLINFO_EFFECTIVE_URL,
|
||||
&done_url);
|
||||
printf("%s DONE\n", done_url);
|
||||
|
||||
curl_multi_remove_handle(curl_handle, message->easy_handle);
|
||||
curl_easy_cleanup(message->easy_handle);
|
||||
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "CURLMSG default\n");
|
||||
abort();
|
||||
}
|
||||
}
|
||||
check_multi_info();
|
||||
}
|
||||
|
||||
void on_timeout(uv_timer_t *req, int status)
|
||||
@@ -139,11 +155,12 @@ void on_timeout(uv_timer_t *req, int status)
|
||||
int running_handles;
|
||||
curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0,
|
||||
&running_handles);
|
||||
check_multi_info();
|
||||
}
|
||||
|
||||
void start_timeout(CURLM *multi, long timeout_ms, void *userp)
|
||||
{
|
||||
if (timeout_ms <= 0)
|
||||
if(timeout_ms <= 0)
|
||||
timeout_ms = 1; /* 0 means directly call socket_action, but we'll do it in
|
||||
a bit */
|
||||
uv_timer_start(&timeout, on_timeout, timeout_ms, 0);
|
||||
@@ -153,9 +170,9 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
|
||||
void *socketp)
|
||||
{
|
||||
curl_context_t *curl_context;
|
||||
if (action == CURL_POLL_IN || action == CURL_POLL_OUT) {
|
||||
if (socketp) {
|
||||
curl_context = (curl_context_t*) socketp;
|
||||
if(action == CURL_POLL_IN || action == CURL_POLL_OUT) {
|
||||
if(socketp) {
|
||||
curl_context = (curl_context_t *) socketp;
|
||||
}
|
||||
else {
|
||||
curl_context = create_curl_context(s);
|
||||
@@ -163,7 +180,7 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
|
||||
curl_multi_assign(curl_handle, s, (void *) curl_context);
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
switch(action) {
|
||||
case CURL_POLL_IN:
|
||||
uv_poll_start(&curl_context->poll_handle, UV_READABLE, curl_perform);
|
||||
break;
|
||||
@@ -171,7 +188,7 @@ int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
|
||||
uv_poll_start(&curl_context->poll_handle, UV_WRITABLE, curl_perform);
|
||||
break;
|
||||
case CURL_POLL_REMOVE:
|
||||
if (socketp) {
|
||||
if(socketp) {
|
||||
uv_poll_stop(&((curl_context_t*)socketp)->poll_handle);
|
||||
destroy_curl_context((curl_context_t*) socketp);
|
||||
curl_multi_assign(curl_handle, s, NULL);
|
||||
@@ -188,10 +205,10 @@ int main(int argc, char **argv)
|
||||
{
|
||||
loop = uv_default_loop();
|
||||
|
||||
if (argc <= 1)
|
||||
if(argc <= 1)
|
||||
return 0;
|
||||
|
||||
if (curl_global_init(CURL_GLOBAL_ALL)) {
|
||||
if(curl_global_init(CURL_GLOBAL_ALL)) {
|
||||
fprintf(stderr, "Could not init cURL\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -202,11 +219,12 @@ int main(int argc, char **argv)
|
||||
curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
|
||||
curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
|
||||
|
||||
while (argc-- > 1) {
|
||||
while(argc-- > 1) {
|
||||
add_download(argv[argc], argc);
|
||||
}
|
||||
|
||||
uv_run(loop, UV_RUN_DEFAULT);
|
||||
curl_multi_cleanup(curl_handle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -88,6 +88,7 @@ int main(void)
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
int rc;
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
@@ -109,15 +110,36 @@ int main(void)
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* Get file descriptors from the transfers */
|
||||
curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
|
||||
fprintf(stderr,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -53,23 +53,26 @@ int main(void)
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
|
||||
|
||||
/* open the files */
|
||||
headerfile = fopen(headerfilename,"wb");
|
||||
if (headerfile == NULL) {
|
||||
/* open the header file */
|
||||
headerfile = fopen(headerfilename, "wb");
|
||||
if(!headerfile) {
|
||||
curl_easy_cleanup(curl_handle);
|
||||
return -1;
|
||||
}
|
||||
bodyfile = fopen(bodyfilename,"wb");
|
||||
if (bodyfile == NULL) {
|
||||
|
||||
/* open the body file */
|
||||
bodyfile = fopen(bodyfilename, "wb");
|
||||
if(!bodyfile) {
|
||||
curl_easy_cleanup(curl_handle);
|
||||
fclose(headerfile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* we want the headers be written to this file handle */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
|
||||
|
||||
/* we want the body be written to this file handle instead of stdout */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
|
||||
|
||||
/* get it! */
|
||||
curl_easy_perform(curl_handle);
|
||||
|
@@ -155,6 +155,7 @@ int main(void)
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
int rc;
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
@@ -176,15 +177,36 @@ int main(void)
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* Get file descriptors from the transfers */
|
||||
curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
if(tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
|
||||
fprintf(stderr,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@@ -92,6 +92,8 @@
|
||||
#define MAX_STRING 256
|
||||
#define MAX_STRING1 MAX_STRING+1
|
||||
|
||||
#define SYNCTIME_UA "synctime/1.0"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char http_proxy[MAX_STRING1];
|
||||
@@ -99,12 +101,11 @@ typedef struct
|
||||
char timeserver[MAX_STRING1];
|
||||
} conf_t;
|
||||
|
||||
const char DefaultTimeServer[4][MAX_STRING1] =
|
||||
const char DefaultTimeServer[3][MAX_STRING1] =
|
||||
{
|
||||
"http://nist.time.gov/timezone.cgi?UTC/s/0",
|
||||
"http://www.google.com/",
|
||||
"http://www.worldtimeserver.com/current_time_in_UTC.aspx",
|
||||
"http://www.worldtime.com/cgi-bin/wt.cgi"
|
||||
"http://pool.ntp.org/",
|
||||
"http://nist.time.gov/",
|
||||
"http://www.google.com/"
|
||||
};
|
||||
|
||||
const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
||||
@@ -186,9 +187,9 @@ void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
|
||||
if (strlen(proxy_user_password) > 0)
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
|
||||
|
||||
/* Trick Webserver by claiming that you are using Microsoft WinXP SP2, IE6 */
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT,
|
||||
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
|
||||
#ifdef SYNCTIME_UA
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
|
||||
#endif
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
|
||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
|
||||
}
|
||||
|
@@ -7,16 +7,16 @@
|
||||
libcurl's binary interface
|
||||
|
||||
ABI - Application Binary Interface
|
||||
----------------------------------
|
||||
|
||||
First, allow me to define the word for this context: ABI describes the
|
||||
low-level interface between an application program and a library. Calling
|
||||
conventions, function arguments, return values, struct sizes/defines and
|
||||
more.
|
||||
"ABI" describes the low-level interface between an application program and a
|
||||
library. Calling conventions, function arguments, return values, struct
|
||||
sizes/defines and more.
|
||||
|
||||
For a longer description, see
|
||||
http://en.wikipedia.org/wiki/Application_binary_interface
|
||||
[Wikipedia has a longer description](http://en.wikipedia.org/wiki/Application_binary_interface)
|
||||
|
||||
Upgrades
|
||||
--------
|
||||
|
||||
In the vast majority of all cases, a typical libcurl upgrade does not break
|
||||
the ABI at all. Your application can remain using libcurl just as before,
|
||||
@@ -26,11 +26,13 @@ Upgrades
|
||||
it now is defined to work.
|
||||
|
||||
Version Numbers
|
||||
---------------
|
||||
|
||||
In libcurl land, you really can't tell by the libcurl version number if that
|
||||
libcurl is binary compatible or not with another libcurl version.
|
||||
|
||||
Soname Bumps
|
||||
------------
|
||||
|
||||
Whenever there are changes done to the library that will cause an ABI
|
||||
breakage, that may require your application to get attention or possibly be
|
||||
@@ -43,7 +45,11 @@ Soname Bumps
|
||||
During the first seven years of libcurl releases, there have only been four
|
||||
ABI breakages.
|
||||
|
||||
We are determined to bump the SONAME as rarely as possible. Ideally, we
|
||||
never do it again.
|
||||
|
||||
Downgrades
|
||||
----------
|
||||
|
||||
Going to an older libcurl version from one you're currently using can be a
|
||||
tricky thing. Mostly we add features and options to newer libcurls as that
|
||||
@@ -54,6 +60,7 @@ Downgrades
|
||||
soname, and then your application may need to adapt to the modified ABI.
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
The previous major library soname number bumps (breaking backwards
|
||||
compatibility) have happened the following times:
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -22,20 +22,20 @@
|
||||
.\"
|
||||
.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_cleanup - End a libcurl easy session
|
||||
curl_easy_cleanup - End a libcurl easy handle
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
|
||||
.BI "void curl_easy_cleanup(CURL *" handle ");"
|
||||
|
||||
.SH DESCRIPTION
|
||||
This function must be the last function to call for an easy session. It is the
|
||||
opposite of the \fIcurl_easy_init(3)\fP function and must be called with the
|
||||
same \fIhandle\fP as input that the curl_easy_init call returned.
|
||||
same \fIhandle\fP as input that a \fIcurl_easy_init(3)\fP call returned.
|
||||
|
||||
This will effectively close all connections this handle has used and possibly
|
||||
has kept open until now. Don't call this function if you intend to transfer
|
||||
more files.
|
||||
This might close all connections this handle has used and possibly has kept
|
||||
open until now - unless it was attached to a multi handle while doing the
|
||||
transfers. Don't call this function if you intend to transfer more files,
|
||||
re-using handles is a key to good performance with libcurl.
|
||||
|
||||
Occasionally you may get your progress callback or header callback called from
|
||||
within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using
|
||||
@@ -43,15 +43,25 @@ within \fIcurl_easy_cleanup(3)\fP (if previously set for the handle using
|
||||
connection and the protocol is of a kind that requires a command/response
|
||||
sequence before disconnect. Examples of such protocols are FTP, POP3 and IMAP.
|
||||
|
||||
Any uses of the \fBhandle\fP after this function has been called and have
|
||||
returned, are illegal. This kills the handle and all memory associated with
|
||||
it!
|
||||
Any use of the \fBhandle\fP after this function has been called and have
|
||||
returned, is illegal. \fIcurl_easy_cleanup(3)\fP kills the handle and all
|
||||
memory associated with it!
|
||||
|
||||
With libcurl versions prior to 7.17.: when you've called this, you can safely
|
||||
remove all the strings you've previously told libcurl to use, as it won't use
|
||||
them anymore now.
|
||||
For libcurl versions before 7.17,: after you've called this function, you can
|
||||
safely remove all the strings you've previously told libcurl to use, as it
|
||||
won't use them anymore now.
|
||||
.SH RETURN VALUE
|
||||
None
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), "
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,7 @@
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
||||
.TH curl_easy_duphandle 3 "19 Sep 2014" "libcurl" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_duphandle - Clone a libcurl session handle
|
||||
.SH SYNOPSIS
|
||||
@@ -47,5 +47,4 @@ in a synchronous way, the input handle may not be in use when cloned.
|
||||
If this function returns NULL, something went wrong and no valid handle was
|
||||
returned.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)
|
||||
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -26,13 +26,13 @@ curl_easy_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );"
|
||||
.BI "char *curl_easy_escape( CURL *" curl ", char *" string ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function converts the given input string to an URL encoded string and
|
||||
returns that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version
|
||||
(%NN where NN is a two-digit hexadecimal number).
|
||||
This function converts the given input \fBstring\fP to an URL encoded string
|
||||
and returns that as a new allocated string. All input characters that are not
|
||||
a-z, A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped"
|
||||
version (%NN where NN is a two-digit hexadecimal number).
|
||||
|
||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
|
||||
uses strlen() on the input \fBurl\fP to find out the size.
|
||||
@@ -42,5 +42,16 @@ You must \fIcurl_free(3)\fP the returned string when you're done with it.
|
||||
Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
char *output = curl_easy_escape(curl, "data to convert", 15);
|
||||
if(output) {
|
||||
printf("Encoded: %s\n", output);
|
||||
curl_free(output);
|
||||
}
|
||||
}}
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 2396
|
||||
.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 3986
|
||||
|
@@ -76,8 +76,8 @@ start until the connect to the remote host (or proxy) was completed.
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the SSL/SSH connect/handshake to the remote host was completed.
|
||||
This time is most often very near to the PRETRANSFER time, except for cases
|
||||
such as HTTP pippelining where the pretransfer time can be delayed due to
|
||||
waits in line for the pipeline and more. (Added in 7.19.0)
|
||||
such as HTTP pipelining where the pretransfer time can be delayed due to waits
|
||||
in line for the pipeline and more. (Added in 7.19.0)
|
||||
.IP CURLINFO_PRETRANSFER_TIME
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the file transfer is just about to begin. This includes all
|
||||
@@ -222,13 +222,13 @@ request was done. The struct reports how many certs it found and then you can
|
||||
extract info for each of those certs by following the linked lists. The info
|
||||
chain is provided in a series of data in the format "name:content" where the
|
||||
content is for the specific named data. See also the certinfo.c example. NOTE:
|
||||
this option is only available in libcurl built with OpenSSL, NSS, GSKit or
|
||||
QsoSSL support. (Added in 7.19.1)
|
||||
this option is only available in libcurl built with OpenSSL, NSS or GSKit
|
||||
support. (Added in 7.19.1)
|
||||
.IP CURLINFO_TLS_SESSION
|
||||
Pass a pointer to a 'struct curl_tlsinfo *'. The pointer will be initialized
|
||||
to refer to a 'struct curl_tlsinfo *' that will contain an enum indicating the
|
||||
SSL library used for the handshake and the respective internal TLS session
|
||||
structure of this underlying SSL library.
|
||||
Pass a pointer to a 'struct curl_tlssessioninfo *'. The pointer will be
|
||||
initialized to refer to a 'struct curl_tlssessioninfo *' that will contain an
|
||||
enum indicating the SSL library used for the handshake and the respective
|
||||
internal TLS session structure of this underlying SSL library.
|
||||
|
||||
This may then be used to extract certificate information in a format
|
||||
convenient for further processing, such as manual validation. NOTE: this
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -26,26 +26,34 @@ curl_easy_init - Start a libcurl easy session
|
||||
.B #include <curl/curl.h>
|
||||
|
||||
.BI "CURL *curl_easy_init( );"
|
||||
|
||||
.SH DESCRIPTION
|
||||
This function must be the first function to call, and it returns a CURL easy
|
||||
handle that you must use as input to other easy-functions. curl_easy_init
|
||||
initializes curl and this call \fBMUST\fP have a corresponding call to
|
||||
handle that you must use as input to other functions in the easy
|
||||
interface. This call \fBMUST\fP have a corresponding call to
|
||||
\fIcurl_easy_cleanup(3)\fP when the operation is complete.
|
||||
|
||||
If you did not already call \fIcurl_global_init(3)\fP,
|
||||
\fIcurl_easy_init(3)\fP does it automatically.
|
||||
This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
|
||||
not thread-safe, and it may result in resource problems because there is
|
||||
no corresponding cleanup.
|
||||
|
||||
You are strongly advised to not allow this automatic behaviour, by
|
||||
calling \fIcurl_global_init(3)\fP yourself properly.
|
||||
See the description in \fBlibcurl\fP(3) of global environment
|
||||
requirements for details of how to use this function.
|
||||
If you did not already call \fIcurl_global_init(3)\fP, \fIcurl_easy_init(3)\fP
|
||||
does it automatically. This may be lethal in multi-threaded cases, since
|
||||
\fIcurl_global_init(3)\fP is not thread-safe, and it may result in resource
|
||||
problems because there is no corresponding cleanup.
|
||||
|
||||
You are strongly advised to not allow this automatic behaviour, by calling
|
||||
\fIcurl_global_init(3)\fP yourself properly. See the description in
|
||||
\fBlibcurl\fP(3) of global environment requirements for details of how to use
|
||||
this function.
|
||||
.SH RETURN VALUE
|
||||
If this function returns NULL, something went wrong and you cannot use the
|
||||
other curl functions.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"
|
||||
.BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3), "
|
||||
.BR curl_easy_perform "(3) "
|
||||
|
@@ -40,9 +40,8 @@ the writing is later unpaused.
|
||||
|
||||
While it may feel tempting, take care and notice that you cannot call this
|
||||
function from another thread. To unpause, you may for example call it from the
|
||||
progress callback (see \fIcurl_easy_setopt(3)\fP's
|
||||
\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at least once per
|
||||
second, even if the connection is paused.
|
||||
progress callback (\fICURLOPT_PROGRESSFUNCTION(3)\fP), which gets called at
|
||||
least once per second, even if the connection is paused.
|
||||
|
||||
When this function is called to unpause reading, the chance is high that you
|
||||
will get your write callback called before this function returns.
|
||||
|
@@ -21,7 +21,7 @@
|
||||
.\" **************************************************************************
|
||||
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_perform - Perform a file transfer
|
||||
curl_easy_perform - perform a blocking file transfer
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
@@ -58,6 +58,16 @@ CURLE_OK (0) means everything was ok, non-zero means an error occurred as
|
||||
defines - see \fIlibcurl-errors(3)\fP. If the \fBCURLOPT_ERRORBUFFER(3)\fP was
|
||||
set with \fIcurl_easy_setopt(3)\fP there will be a readable error message in
|
||||
the error buffer when non-zero is returned.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}}
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), " curl_easy_setopt "(3), "
|
||||
.BR curl_multi_add_handle "(3), " curl_multi_perform "(3), "
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -39,5 +39,6 @@ This function was added in libcurl 7.12.1
|
||||
.SH RETURN VALUE
|
||||
Nothing
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3)
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3),"
|
||||
.BR curl_easy_duphandle "(3)"
|
||||
|
||||
|
@@ -28,14 +28,14 @@ curl_easy_setopt \- set options for a curl easy handle
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
|
||||
.SH DESCRIPTION
|
||||
curl_easy_setopt() is used to tell libcurl how to behave. By using the
|
||||
appropriate options to \fIcurl_easy_setopt\fP, you can change libcurl's
|
||||
behavior. All options are set with the \fIoption\fP followed by a
|
||||
\fIparameter\fP. That parameter can be a \fBlong\fP, a \fBfunction pointer\fP,
|
||||
an \fBobject pointer\fP or a \fBcurl_off_t\fP, depending on what the specific
|
||||
option expects. Read this manual carefully as bad input values may cause
|
||||
libcurl to behave badly! You can only set one option in each function call. A
|
||||
typical application uses many curl_easy_setopt() calls in the setup phase.
|
||||
\fIcurl_easy_setopt(3)\fP is used to tell libcurl how to behave. By setting
|
||||
the appropriate options, the application can change libcurl's behavior. All
|
||||
options are set with an \fIoption\fP followed by a \fIparameter\fP. That
|
||||
parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
|
||||
pointer\fP or a \fBcurl_off_t\fP, depending on what the specific option
|
||||
expects. Read this manual carefully as bad input values may cause libcurl to
|
||||
behave badly! You can only set one option in each function call. A typical
|
||||
application uses many \fIcurl_easy_setopt(3)\fP calls in the setup phase.
|
||||
|
||||
Options set with this function call are valid for all forthcoming transfers
|
||||
performed using this \fIhandle\fP. The options are not in any way reset
|
||||
@@ -45,8 +45,8 @@ options back to internal default with \fIcurl_easy_reset(3)\fP.
|
||||
|
||||
Strings passed to libcurl as 'char *' arguments, are copied by the library;
|
||||
thus the string storage associated to the pointer argument may be overwritten
|
||||
after curl_easy_setopt() returns. The only exception to this rule is really
|
||||
\fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string
|
||||
after \fIcurl_easy_setopt(3)\fP returns. The only exception to this rule is
|
||||
really \fICURLOPT_POSTFIELDS(3)\fP, but the alternative that copies the string
|
||||
\fICURLOPT_COPYPOSTFIELDS(3)\fP has some usage characteristics you need to
|
||||
read up on.
|
||||
|
||||
@@ -78,7 +78,7 @@ Data pointer to pass to the read callback. See \fICURLOPT_READDATA(3)\fP
|
||||
.IP CURLOPT_IOCTLFUNCTION
|
||||
Callback for I/O operations. See \fICURLOPT_IOCTLFUNCTION(3)\fP
|
||||
.IP CURLOPT_IOCTLDATA
|
||||
Data pointer to pass to the i/o callback. See \fICURLOPT_IOCTLDATA(3)\fP
|
||||
Data pointer to pass to the I/O callback. See \fICURLOPT_IOCTLDATA(3)\fP
|
||||
.IP CURLOPT_SEEKFUNCTION
|
||||
Callback for seek operations. See \fICURLOPT_SEEKFUNCTION(3)\fP
|
||||
.IP CURLOPT_SEEKDATA
|
||||
@@ -112,9 +112,9 @@ Callback for debug information. See \fICURLOPT_DEBUGFUNCTION(3)\fP
|
||||
.IP CURLOPT_DEBUGDATA
|
||||
Data pointer to pass to the debug callback. See \fICURLOPT_DEBUGDATA(3)\fP
|
||||
.IP CURLOPT_SSL_CTX_FUNCTION
|
||||
Callback for SSL CTX logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP
|
||||
Callback for SSL context logic. See \fICURLOPT_SSL_CTX_FUNCTION(3)\fP
|
||||
.IP CURLOPT_SSL_CTX_DATA
|
||||
Data pointer to pass to the ssl context callback. See \fICURLOPT_SSL_CTX_DATA(3)\fP
|
||||
Data pointer to pass to the SSL context callback. See \fICURLOPT_SSL_CTX_DATA(3)\fP
|
||||
.IP CURLOPT_CONV_TO_NETWORK_FUNCTION
|
||||
Callback for code base conversion. See \fICURLOPT_CONV_TO_NETWORK_FUNCTION(3)\fP
|
||||
.IP CURLOPT_CONV_FROM_NETWORK_FUNCTION
|
||||
@@ -124,7 +124,7 @@ Callback for code base conversion. See \fICURLOPT_CONV_FROM_UTF8_FUNCTION(3)\fP
|
||||
.IP CURLOPT_INTERLEAVEFUNCTION
|
||||
Callback for RTSP interleaved data. See \fICURLOPT_INTERLEAVEFUNCTION(3)\fP
|
||||
.IP CURLOPT_INTERLEAVEDATA
|
||||
Data pointer to pass to the interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP
|
||||
Data pointer to pass to the RTSP interleave callback. See \fICURLOPT_INTERLEAVEDATA(3)\fP
|
||||
.IP CURLOPT_CHUNK_BGN_FUNCTION
|
||||
Callback for wildcard download start of chunk. See \fICURLOPT_CHUNK_BGN_FUNCTION(3)\fP
|
||||
.IP CURLOPT_CHUNK_END_FUNCTION
|
||||
@@ -134,7 +134,7 @@ Data pointer to pass to the chunk callbacks. See \fICURLOPT_CHUNK_DATA(3)\fP
|
||||
.IP CURLOPT_FNMATCH_FUNCTION
|
||||
Callback for wildcard matching. See \fICURLOPT_FNMATCH_FUNCTION(3)\fP
|
||||
.IP CURLOPT_FNMATCH_DATA
|
||||
Data pointer to pass to the fnmatch callback. See \fICURLOPT_FNMATCH_DATA(3)\fP
|
||||
Data pointer to pass to the wildcard matching callback. See \fICURLOPT_FNMATCH_DATA(3)\fP
|
||||
.SH ERROR OPTIONS
|
||||
.IP CURLOPT_ERRORBUFFER
|
||||
Error message buffer. See \fICURLOPT_ERRORBUFFER(3)\fP
|
||||
@@ -160,9 +160,9 @@ Filter out hosts from proxy use. \fICURLOPT_NOPROXY(3)\fP
|
||||
.IP CURLOPT_HTTPPROXYTUNNEL
|
||||
Tunnel through the HTTP proxy. \fICURLOPT_HTTPPROXYTUNNEL(3)\fP
|
||||
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
|
||||
Socks5 gassapi service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
|
||||
Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
|
||||
.IP CURLOPT_SOCKS5_GSSAPI_NEC
|
||||
Socks5 gssapi NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
|
||||
Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
|
||||
.IP CURLOPT_INTERFACE
|
||||
Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
|
||||
.IP CURLOPT_LOCALPORT
|
||||
@@ -187,17 +187,19 @@ Enable TCP keep-alive. See \fICURLOPT_TCP_KEEPALIVE(3)\fP
|
||||
Idle time before sending keep-alive. See \fICURLOPT_TCP_KEEPIDLE(3)\fP
|
||||
.IP CURLOPT_TCP_KEEPINTVL
|
||||
Interval between keep-alive probes. See \fICURLOPT_TCP_KEEPINTVL(3)\fP
|
||||
.IP CURLOPT_UNIX_SOCKET_PATH
|
||||
Path to a Unix domain socket. See \fICURLOPT_UNIX_SOCKET_PATH(3)\fP
|
||||
.SH NAMES and PASSWORDS OPTIONS (Authentication)
|
||||
.IP CURLOPT_NETRC
|
||||
Enable .netrc parsing. See \fICURLOPT_NETRC(3)\fP
|
||||
.IP CURLOPT_NETRC_FILE
|
||||
\&.netrc file name. See \fICURLOPT_NETRC_FILE(3)\fP
|
||||
.IP CURLOPT_USERPWD
|
||||
User and password. See \fICURLOPT_USERPWD(3)\fP
|
||||
User name and password. See \fICURLOPT_USERPWD(3)\fP
|
||||
.IP CURLOPT_PROXYUSERPWD
|
||||
Proxy user and password. See \fICURLOPT_PROXYUSERPWD(3)\fP
|
||||
Proxy user name and password. See \fICURLOPT_PROXYUSERPWD(3)\fP
|
||||
.IP CURLOPT_USERNAME
|
||||
Username. See \fICURLOPT_USERNAME(3)\fP
|
||||
User name. See \fICURLOPT_USERNAME(3)\fP
|
||||
.IP CURLOPT_PASSWORD
|
||||
Password. See \fICURLOPT_PASSWORD(3)\fP
|
||||
.IP CURLOPT_LOGIN_OPTIONS
|
||||
@@ -217,7 +219,7 @@ HTTP proxy authentication methods. See \fICURLOPT_PROXYAUTH(3)\fP
|
||||
.IP CURLOPT_SASL_IR
|
||||
Enable SASL initial response. See \fICURLOPT_SASL_IR(3)\fP
|
||||
.IP CURLOPT_XOAUTH2_BEARER
|
||||
XOAuth2 bearer token. See \fICURLOPT_XOAUTH2_BEARER(3)\fP
|
||||
OAuth2 bearer token. See \fICURLOPT_XOAUTH2_BEARER(3)\fP
|
||||
.SH HTTP OPTIONS
|
||||
.IP CURLOPT_AUTOREFERER
|
||||
Automatically set Referer: header. See \fICURLOPT_AUTOREFERER(3)\fP
|
||||
@@ -228,7 +230,7 @@ Request Transfer-Encoding. See \fICURLOPT_TRANSFER_ENCODING(3)\fP
|
||||
.IP CURLOPT_FOLLOWLOCATION
|
||||
Follow HTTP redirects. See \fICURLOPT_FOLLOWLOCATION(3)\fP
|
||||
.IP CURLOPT_UNRESTRICTED_AUTH
|
||||
Do not restrict auth to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
|
||||
Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
|
||||
.IP CURLOPT_MAXREDIRS
|
||||
Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
|
||||
.IP CURLOPT_POSTREDIR
|
||||
@@ -300,8 +302,6 @@ Commands to run before transfer. See \fICURLOPT_QUOTE(3)\fP
|
||||
Commands to run after transfer. See \fICURLOPT_POSTQUOTE(3)\fP
|
||||
.IP CURLOPT_PREQUOTE
|
||||
Commands to run just before transfer. See \fICURLOPT_PREQUOTE(3)\fP
|
||||
.IP CURLOPT_DIRLISTONLY
|
||||
List only. See \fICURLOPT_DIRLISTONLY(3)\fP
|
||||
.IP CURLOPT_APPEND
|
||||
Append to remote file. See \fICURLOPT_APPEND(3)\fP
|
||||
.IP CURLOPT_FTP_USE_EPRT
|
||||
@@ -311,7 +311,7 @@ Use EPSV. See \fICURLOPT_FTP_USE_EPSV(3)\fP
|
||||
.IP CURLOPT_FTP_USE_PRET
|
||||
Use PRET. See \fICURLOPT_FTP_USE_PRET(3)\fP
|
||||
.IP CURLOPT_FTP_CREATE_MISSING_DIRS
|
||||
Create missing dirs on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP
|
||||
Create missing directories on the remote server. See \fICURLOPT_FTP_CREATE_MISSING_DIRS(3)\fP
|
||||
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
|
||||
Timeout for FTP responses. See \fICURLOPT_FTP_RESPONSE_TIMEOUT(3)\fP
|
||||
.IP CURLOPT_FTP_ALTERNATIVE_TO_USER
|
||||
@@ -356,6 +356,8 @@ Resume a transfer. See \fICURLOPT_RESUME_FROM_LARGE(3)\fP
|
||||
Custom request/method. See \fICURLOPT_CUSTOMREQUEST(3)\fP
|
||||
.IP CURLOPT_FILETIME
|
||||
Request file modification date and time. See \fICURLOPT_FILETIME(3)\fP
|
||||
.IP CURLOPT_DIRLISTONLY
|
||||
List only. See \fICURLOPT_DIRLISTONLY(3)\fP
|
||||
.IP CURLOPT_NOBODY
|
||||
Do not get the body contents. See \fICURLOPT_NOBODY(3)\fP
|
||||
.IP CURLOPT_INFILESIZE
|
||||
@@ -382,11 +384,11 @@ Low speed limit to abort transfer. See \fICURLOPT_LOW_SPEED_LIMIT(3)\fP
|
||||
.IP CURLOPT_LOW_SPEED_TIME
|
||||
Time to be below the speed to trigger low speed abort. See \fICURLOPT_LOW_SPEED_TIME(3)\fP
|
||||
.IP CURLOPT_MAX_SEND_SPEED_LARGE
|
||||
Cap upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP
|
||||
Cap the upload speed to this. See \fICURLOPT_MAX_SEND_SPEED_LARGE(3)\fP
|
||||
.IP CURLOPT_MAX_RECV_SPEED_LARGE
|
||||
Cap download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP
|
||||
Cap the download speed to this. See \fICURLOPT_MAX_RECV_SPEED_LARGE(3)\fP
|
||||
.IP CURLOPT_MAXCONNECTS
|
||||
Max number of connection is connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP
|
||||
Maximum number of connections in the connection pool. See \fICURLOPT_MAXCONNECTS(3)\fP
|
||||
.IP CURLOPT_FRESH_CONNECT
|
||||
Use a new connection. \fICURLOPT_FRESH_CONNECT(3)\fP
|
||||
.IP CURLOPT_FORBID_REUSE
|
||||
@@ -425,7 +427,7 @@ Client key password. See \fICURLOPT_KEYPASSWD(3)\fP
|
||||
.IP CURLOPT_SSL_ENABLE_ALPN
|
||||
Enable use of ALPN. See \fICURLOPT_SSL_ENABLE_ALPN(3)\fP
|
||||
.IP CURLOPT_SSL_ENABLE_NPN
|
||||
)Enable use of NPN. See \fICURLOPT_SSL_ENABLE_NPN(3)\fP
|
||||
Enable use of NPN. See \fICURLOPT_SSL_ENABLE_NPN(3)\fP
|
||||
.IP CURLOPT_SSLENGINE
|
||||
Use identifier with SSL engine. See \fICURLOPT_SSLENGINE(3)\fP
|
||||
.IP CURLOPT_SSLENGINE_DEFAULT
|
||||
@@ -446,6 +448,8 @@ Certificate Revocation List. See \fICURLOPT_CRLFILE(3)\fP
|
||||
Verify the host name in the SSL certificate. See \fICURLOPT_SSL_VERIFYHOST(3)\fP
|
||||
.IP CURLOPT_CERTINFO
|
||||
Extract certificate info. See \fICURLOPT_CERTINFO(3)\fP
|
||||
.IP CURLOPT_PINNEDPUBLICKEY
|
||||
Set pinned SSL public key . See \fICURLOPT_PINNEDPUBLICKEY(3)\fP
|
||||
.IP CURLOPT_RANDOM_FILE
|
||||
Provide source for entropy random data. See \fICURLOPT_RANDOM_FILE(3)\fP
|
||||
.IP CURLOPT_EGDSOCKET
|
||||
@@ -483,7 +487,7 @@ Share object to use. See \fICURLOPT_SHARE(3)\fP
|
||||
.IP CURLOPT_NEW_FILE_PERMS
|
||||
Mode for creating new remote files. See \fICURLOPT_NEW_FILE_PERMS(3)\fP
|
||||
.IP CURLOPT_NEW_DIRECTORY_PERMS
|
||||
Mode for creating new remote dirs. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP
|
||||
Mode for creating new remote directories. See \fICURLOPT_NEW_DIRECTORY_PERMS(3)\fP
|
||||
.SH TELNET OPTIONS
|
||||
.IP CURLOPT_TELNETOPTIONS
|
||||
TELNET options. See \fICURLOPT_TELNETOPTIONS(3)\fP
|
||||
@@ -497,5 +501,16 @@ the library is too old to support it or the option was removed in a recent
|
||||
version, this function will return \fICURLE_UNKNOWN_OPTION\fP. If support for
|
||||
the option was disabled at compile-time, it will return
|
||||
\fICURLE_NOT_BUILT_IN\fP.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}}
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3)"
|
||||
.BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), "
|
||||
.BR curl_multi_setopt "(3), "
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -27,8 +27,11 @@ curl_easy_strerror - return string describing error code
|
||||
|
||||
const char *curl_easy_strerror(CURLcode errornum);
|
||||
.SH DESCRIPTION
|
||||
The curl_easy_strerror() function returns a string describing the CURLcode
|
||||
error code passed in the argument \fIerrornum\fP.
|
||||
The \fIcurl_easy_strerror(3)\fP function returns a string describing the
|
||||
CURLcode error code passed in the argument \fIerrornum\fP.
|
||||
|
||||
Typically applications also appreciate \fICURLOPT_ERRORBUFFER(3)\fP for more
|
||||
specific error descriptions generated at run-time.
|
||||
.SH AVAILABILITY
|
||||
This function was added in libcurl 7.12.0
|
||||
.SH RETURN VALUE
|
||||
|
@@ -86,6 +86,10 @@ you must set its length with \fBCURLFORM_CONTENTSLENGTH\fP.
|
||||
.IP CURLFORM_CONTENTSLENGTH
|
||||
followed by a long giving the length of the contents. Note that for
|
||||
\fICURLFORM_STREAM\fP contents, this option is mandatory.
|
||||
|
||||
If you pass a 0 (zero) for this option, libcurl will instead do a strlen() on
|
||||
the contents to figure out the size. If you really want to send a zero byte
|
||||
content then you must make sure strlen() on the data pointer returns zero.
|
||||
.IP CURLFORM_FILECONTENT
|
||||
followed by a filename, causes that file to be read and its contents used
|
||||
as data in this part. This part does \fInot\fP automatically become a file
|
||||
|
@@ -29,7 +29,7 @@ curl_free - reclaim memory that has been obtained through a libcurl call
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_free reclaims memory that has been obtained through a libcurl call. Use
|
||||
curl_free() instead of free() to avoid anomalies that can result from
|
||||
\fIcurl_free(3)\fP instead of free() to avoid anomalies that can result from
|
||||
differences in memory management between your application and libcurl.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_unescape "(3)"
|
||||
.BR curl_easy_unescape "(3), " curl_easy_escape "(3) "
|
||||
|
@@ -102,4 +102,7 @@ number).
|
||||
|
||||
Having a 64 bit time_t is not a guarantee that dates beyond 03:14:07 UTC,
|
||||
January 19, 2038 will work fine. On systems with a 64 bit time_t but with a
|
||||
crippled mktime(), \fIcurl_getdate\fP will return -1 in this case.
|
||||
crippled mktime(), \fIcurl_getdate(3)\fP will return -1 in this case.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_escape "(3), " curl_easy_unescape "(3), "
|
||||
.BR CURLOPT_TIMECONDITION "(3), " CURLOPT_TIMEVALUE "(3) "
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -46,11 +46,11 @@ libcurl.
|
||||
\fBThis function is not thread safe.\fP You must not call it when any other
|
||||
thread in the program (i.e. a thread sharing the same memory) is running.
|
||||
This doesn't just mean no other thread that is using libcurl. Because
|
||||
\fIcurl_global_init()\fP calls functions of other libraries that are similarly
|
||||
thread unsafe, it could conflict with any other thread that uses these other
|
||||
libraries.
|
||||
\fIcurl_global_init(3)\fP calls functions of other libraries that are
|
||||
similarly thread unsafe, it could conflict with any other thread that uses
|
||||
these other libraries.
|
||||
|
||||
See the description in \fBlibcurl\fP(3) of global environment requirements for
|
||||
See the description in \fBlibcurl(3)\fP of global environment requirements for
|
||||
details of how to use this function.
|
||||
|
||||
.SH FLAGS
|
||||
@@ -74,7 +74,8 @@ the functionality of the \fBCURL_GLOBAL_ALL\fP mask.
|
||||
.TP
|
||||
.B CURL_GLOBAL_ACK_EINTR
|
||||
When this flag is set, curl will acknowledge EINTR condition when connecting
|
||||
or when waiting for data. Otherwise, curl waits until full timeout elapses.
|
||||
or when waiting for data. Otherwise, curl waits until full timeout
|
||||
elapses. (Added in 7.30.0)
|
||||
.SH RETURN VALUE
|
||||
If this function returns non-zero, something went wrong and you cannot use the
|
||||
other curl functions.
|
||||
|
@@ -29,30 +29,35 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Adds a standard easy handle to the multi stack. This function call will make
|
||||
this \fImulti_handle\fP control the specified \fIeasy_handle\fP. Furthermore,
|
||||
libcurl now initiates the connection associated with the specified
|
||||
\fIeasy_handle\fP.
|
||||
this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
|
||||
|
||||
While an easy handle is added to a multi stack, you can not and you must not
|
||||
use \fIcurl_easy_perform(3)\fP on that handle. After having removed the handle
|
||||
from the multi stack again, it is perfectly fine to use it with the easy
|
||||
interface again.
|
||||
use \fIcurl_easy_perform(3)\fP on that handle. After having removed the easy
|
||||
handle from the multi stack again, it is perfectly fine to use it with the
|
||||
easy interface again.
|
||||
|
||||
If the easy handle is not set to use a shared (\fICURLOPT_SHARE(3)\fP) or
|
||||
global DNS cache (\fICURLOPT_DNS_USE_GLOBAL_CACHE(3)\fP), it will be made to
|
||||
use the DNS cache that is shared between all easy handles within the multi
|
||||
handle when \fIcurl_multi_add_handle(3)\fP is called.
|
||||
|
||||
When an easy interface is added to a multi handle, it will use a shared
|
||||
connection cache owned by the multi handle. Removing and adding new easy
|
||||
handles will not affect the pool of connections or the ability to do
|
||||
connection re-use.
|
||||
|
||||
If you have CURLMOPT_TIMERFUNCTION set in the multi handle (and you really
|
||||
should if you're working event-based with \fIcurl_multi_socket_action(3)\fP
|
||||
and friends), that callback will be called from within this function to ask
|
||||
for an updated timer so that your main event loop will get the activity on
|
||||
this handle to get started.
|
||||
|
||||
The easy handle will remain added until you remove it again with
|
||||
\fIcurl_multi_remove_handle(3)\fP. You should remove the easy handle from the
|
||||
multi stack before you terminate first the easy handle and then the multi
|
||||
handle:
|
||||
The easy handle will remain added to the multi handle until you remove it
|
||||
again with \fIcurl_multi_remove_handle(3)\fP - even when a transfer with that
|
||||
specific easy handle is completed.
|
||||
|
||||
You should remove the easy handle from the multi stack before you terminate
|
||||
first the easy handle and then the multi handle:
|
||||
|
||||
1 - \fIcurl_multi_remove_handle(3)\fP
|
||||
|
||||
@@ -62,4 +67,5 @@ handle:
|
||||
.SH RETURN VALUE
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
|
||||
.BR curl_multi_setopt "(3), " curl_multi_socket_action "(3) "
|
||||
|
@@ -21,7 +21,7 @@
|
||||
.\" **************************************************************************
|
||||
.TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_multi_assign \- set data to association with an internal socket
|
||||
curl_multi_assign \- set data to associate with an internal socket
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
@@ -30,7 +30,7 @@ CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd,
|
||||
.SH DESCRIPTION
|
||||
This function creates an association in the multi handle between the given
|
||||
socket and a private pointer of the application. This is designed for
|
||||
\fIcurl_multi_socket(3)\fP uses.
|
||||
\fIcurl_multi_socket_action(3)\fP uses.
|
||||
|
||||
When set, the \fIsockptr\fP pointer will be passed to all future socket
|
||||
callbacks for the specific \fIsockfd\fP socket.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -37,23 +37,35 @@ 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
|
||||
\fIcurl_multi_fdset(3)\fP only adds its own descriptors, it doesn't zero or
|
||||
otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be
|
||||
called as soon as one of them is ready to be read from or written to.
|
||||
otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should
|
||||
be called as soon as one of them is ready to be read from or written to.
|
||||
|
||||
If the \fIread_fd_set\fP argument is not a null pointer, it points to an
|
||||
object of type fd_set that on returns specifies the file descriptors to be
|
||||
checked for being ready to read.
|
||||
|
||||
If the \fIwrite_fd_set\fP argument is not a null pointer, it points to an
|
||||
object of type fd_set that on return specifies the file descriptors to be
|
||||
checked for being ready to write.
|
||||
|
||||
If the \fIexc_fd_set\fP argument is not a null pointer, it points to an object
|
||||
of type fd_set that on return specifies the file descriptors to be checked for
|
||||
error conditions pending.
|
||||
|
||||
If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
|
||||
this function returns. Otherwise it will contain the higher descriptor number
|
||||
this function returns. Otherwise it will contain the highest descriptor number
|
||||
libcurl set. When libcurl returns -1 in \fImax_fd\fP, it is because libcurl
|
||||
currently does something that isn't possible for your application to monitor
|
||||
with a socket and unfortunately you can then not know exactly when the current
|
||||
action is completed using select(). When max_fd returns with -1, you need to
|
||||
wait a while and then proceed and call \fIcurl_multi_perform\fP anyway. How
|
||||
long to wait? I would suggest 100 milliseconds at least, but you may want to
|
||||
test it out in your own particular conditions to find a suitable value.
|
||||
action is completed using select(). You then need to wait a while before you
|
||||
proceed and call \fIcurl_multi_perform(3)\fP anyway. How long to wait? We
|
||||
suggest 100 milliseconds at least, but you may want to test it out in your own
|
||||
particular conditions to find a suitable value.
|
||||
|
||||
When doing select(), you should use \fBcurl_multi_timeout\fP to figure out how
|
||||
long to wait for action. Call \fIcurl_multi_perform\fP even if no activity has
|
||||
been seen on the fd_sets after the timeout expires as otherwise internal
|
||||
retries and timeouts may not work as you'd think and want.
|
||||
When doing select(), you should use \fIcurl_multi_timeout(3)\fP to figure out
|
||||
how long to wait for action. Call \fIcurl_multi_perform(3)\fP even if no
|
||||
activity has been seen on the fd_sets after the timeout expires as otherwise
|
||||
internal retries and timeouts may not work as you'd think and want.
|
||||
|
||||
If one of the sockets used by libcurl happens to be larger than what can be
|
||||
set in an fd_set, which on POSIX systems means that the file descriptor is
|
||||
@@ -67,4 +79,5 @@ CURLMcode type, general libcurl multi interface error code. See
|
||||
\fIlibcurl-errors(3)\fP
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
|
||||
.BR curl_multi_timeout "(3), " curl_multi_perform "(3) "
|
||||
.BR curl_multi_wait "(3), "
|
||||
.BR curl_multi_timeout "(3), " curl_multi_perform "(3), " select "(2) "
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -34,7 +34,7 @@ in an non-blocking fashion.
|
||||
When an application has found out there's data available for the multi_handle
|
||||
or a timeout has elapsed, the application should call this function to
|
||||
read/write whatever there is to read or write right now etc.
|
||||
curl_multi_perform() returns as soon as the reads/writes are done. This
|
||||
\fIcurl_multi_perform(3)\fP returns as soon as the reads/writes are done. This
|
||||
function does not require that there actually is any data available for
|
||||
reading or that data can be written, it can be called just in case. It will
|
||||
write the number of handles that still transfer data in the second argument's
|
||||
@@ -53,7 +53,7 @@ there is no longer any transfers in progress.
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
|
||||
Before version 7.20.0: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this
|
||||
basically means that you should call \fIcurl_multi_perform\fP again, before
|
||||
basically means that you should call \fIcurl_multi_perform(3)\fP again, before
|
||||
you select() on more actions. You don't have to do it immediately, but the
|
||||
return code means that libcurl may have more data available to return or that
|
||||
there may be more data to send off before it is "satisfied". Do note that
|
||||
@@ -74,5 +74,6 @@ period, then it'll wait for action on the file descriptors using
|
||||
\fIcurl_multi_perform(3)\fP gets called.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
|
||||
.BR curl_multi_wait "(3), "
|
||||
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
|
||||
.BR libcurl-errors "(3)"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -28,16 +28,17 @@ curl_multi_remove_handle - remove an easy handle from a multi session
|
||||
CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Removes a given easy_handle from the multi_handle. This will make the
|
||||
specified easy handle be removed from this multi handle's control.
|
||||
Removes a given \fIeasy_handle\fI from the \fImulti_handle\fI. This will make
|
||||
the specified easy handle be removed from this multi handle's control.
|
||||
|
||||
When the easy handle has been removed from a multi stack, it is again
|
||||
perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle.
|
||||
perfectly legal to invoke \fIcurl_easy_perform(3)\fP on this easy handle.
|
||||
|
||||
Removing an easy handle while being used, will effectively halt the transfer
|
||||
in progress involving that easy handle. All other easy handles and transfers
|
||||
will remain unaffected.
|
||||
Removing an easy handle while being used is perfectly legal and will
|
||||
effectively halt the transfer in progress involving that easy handle. All
|
||||
other easy handles and transfers will remain unaffected.
|
||||
.SH RETURN VALUE
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3), "
|
||||
.BR curl_multi_add_handle "(3) "
|
||||
|
@@ -19,7 +19,7 @@
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual"
|
||||
.TH curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_multi_setopt \- set options for a curl multi handle
|
||||
.SH SYNOPSIS
|
||||
@@ -27,183 +27,40 @@ curl_multi_setopt \- set options for a curl multi handle
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
|
||||
.SH DESCRIPTION
|
||||
curl_multi_setopt() is used to tell a libcurl multi handle how to behave. By
|
||||
using the appropriate options to \fIcurl_multi_setopt(3)\fP, you can change
|
||||
libcurl's behaviour when using that multi handle. All options are set with
|
||||
the \fIoption\fP followed by the parameter \fIparam\fP. That parameter can be
|
||||
a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject pointer\fP or a
|
||||
\fBcurl_off_t\fP type, depending on what the specific option expects. Read
|
||||
this manual carefully as bad input values may cause libcurl to behave badly!
|
||||
You can only set one option in each function call.
|
||||
\fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
|
||||
behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
|
||||
can change libcurl's behaviour when using that multi handle. All options are
|
||||
set with the \fIoption\fP followed by the parameter \fIparam\fP. That
|
||||
parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
|
||||
pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
|
||||
expects. Read this manual carefully as bad input values may cause libcurl to
|
||||
behave badly! You can only set one option in each function call.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP CURLMOPT_SOCKETFUNCTION
|
||||
Pass a pointer to a function matching the \fBcurl_socket_callback\fP
|
||||
prototype. The \fIcurl_multi_socket_action(3)\fP function informs the
|
||||
application about updates in the socket (file descriptor) status by doing
|
||||
none, one, or multiple calls to the curl_socket_callback given in the
|
||||
\fBparam\fP argument. They update the status with changes since the previous
|
||||
time a \fIcurl_multi_socket(3)\fP function was called. If the given callback
|
||||
pointer is NULL, no callback will be called. Set the callback's \fBuserp\fP
|
||||
argument with \fICURLMOPT_SOCKETDATA\fP. See \fIcurl_multi_socket(3)\fP for
|
||||
more callback details.
|
||||
See \fICURLMOPT_SOCKETFUNCTION(3)\fP
|
||||
.IP CURLMOPT_SOCKETDATA
|
||||
Pass a pointer to whatever you want passed to the \fBcurl_socket_callback\fP's
|
||||
fourth argument, the userp pointer. This is not used by libcurl but only
|
||||
passed-thru as-is. Set the callback pointer with
|
||||
\fICURLMOPT_SOCKETFUNCTION\fP.
|
||||
See \fICURLMOPT_SOCKETDATA(3)\fP
|
||||
.IP CURLMOPT_PIPELINING
|
||||
Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi
|
||||
handle will make it attempt to perform HTTP Pipelining as far as possible for
|
||||
transfers using this handle. This means that if you add a second request that
|
||||
can use an already existing connection, the second request will be \&"piped"
|
||||
on the same connection rather than being executed in parallel. (Added in
|
||||
7.16.0)
|
||||
See \fICURLMOPT_PIPELINING(3)\fP
|
||||
.IP CURLMOPT_TIMERFUNCTION
|
||||
Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP
|
||||
prototype: int curl_multi_timer_callback(CURLM *multi /* multi handle */,
|
||||
long timeout_ms /* timeout in milliseconds */, void *userp /* TIMERDATA */).
|
||||
This function will then be called when the timeout value
|
||||
changes. The timeout value is at what latest time the application should call
|
||||
one of the \&"performing" functions of the multi interface
|
||||
(\fIcurl_multi_socket_action(3)\fP and \fIcurl_multi_perform(3)\fP) - to allow
|
||||
libcurl to keep timeouts and retries etc to work. A timeout value of -1 means
|
||||
that there is no timeout at all, and 0 means that the timeout is already
|
||||
reached. Libcurl attempts to limit calling this only when the fixed future
|
||||
timeout time actually changes. See also \fICURLMOPT_TIMERDATA\fP. The callback
|
||||
should return 0 on success, and -1 on error. This
|
||||
callback can be used instead of, or in addition to,
|
||||
\fIcurl_multi_timeout(3)\fP. (Added in 7.16.0)
|
||||
See \fICURLMOPT_TIMERFUNCTION(3)\fP
|
||||
.IP CURLMOPT_TIMERDATA
|
||||
Pass a pointer to whatever you want passed to the
|
||||
\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is
|
||||
not used by libcurl but only passed-thru as-is. Set the callback pointer with
|
||||
\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0)
|
||||
.IP CURLMOPT_MAXCONNECTS
|
||||
Pass a long. The set number will be used as the maximum amount of
|
||||
simultaneously open connections that libcurl may keep in its connection cache
|
||||
after completed use. By default libcurl will enlarge the size for each added
|
||||
easy handle to make it fit 4 times the number of added easy handles.
|
||||
|
||||
By setting this option, you can prevent the cache size from growing beyond the
|
||||
limit set by you.
|
||||
|
||||
When the cache is full, curl closes the oldest one in the cache to prevent the
|
||||
number of open connections from increasing.
|
||||
|
||||
This option is for the multi handle's use only, when using the easy interface
|
||||
you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option.
|
||||
|
||||
See \fICURLMOPT_MAX_TOTAL_CONNECTIONS\fP for limiting the number of active
|
||||
connections.
|
||||
|
||||
(Added in 7.16.3)
|
||||
See \fICURLMOPT_TIMERDATA(3)\fP
|
||||
.IP CURLMOPT_MAX_HOST_CONNECTIONS
|
||||
Pass a long. The set number will be used as the maximum amount of
|
||||
simultaneously open connections to a single host. For each new session to
|
||||
a host, libcurl will open a new connection up to the limit set by
|
||||
CURLMOPT_MAX_HOST_CONNECTIONS. When the limit is reached, the sessions will
|
||||
be pending until there are available connections. If CURLMOPT_PIPELINING is
|
||||
1, libcurl will try to pipeline if the host is capable of it.
|
||||
|
||||
The default value is 0, which means that there is no limit.
|
||||
However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING
|
||||
is 1 will not be treated as unlimited. Instead it will open only 1 connection
|
||||
and try to pipeline on it.
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
|
||||
.IP CURLMOPT_MAX_PIPELINE_LENGTH
|
||||
Pass a long. The set number will be used as the maximum amount of requests
|
||||
in a pipelined connection. When this limit is reached, libcurl will use another
|
||||
connection to the same host (see CURLMOPT_MAX_HOST_CONNECTIONS), or queue the
|
||||
requests until one of the pipelines to the host is ready to accept a request.
|
||||
Thus, the total number of requests in-flight is CURLMOPT_MAX_HOST_CONNECTIONS *
|
||||
CURLMOPT_MAX_PIPELINE_LENGTH.
|
||||
The default value is 5.
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
|
||||
.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
|
||||
Pass a long. If a pipelined connection is currently processing a request
|
||||
with a Content-Length larger than CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, that
|
||||
connection will not be considered for additional requests, even if it is
|
||||
shorter than CURLMOPT_MAX_PIPELINE_LENGTH.
|
||||
The default value is 0, which means that the penalization is inactive.
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
|
||||
.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
|
||||
Pass a long. If a pipelined connection is currently processing a
|
||||
chunked (Transfer-encoding: chunked) request with a current chunk length
|
||||
larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, that connection will not be
|
||||
considered for additional requests, even if it is shorter than
|
||||
CURLMOPT_MAX_PIPELINE_LENGTH.
|
||||
The default value is 0, which means that the penalization is inactive.
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
|
||||
.IP CURLMOPT_PIPELINING_SITE_BL
|
||||
Pass an array of char *, ending with NULL. This is a list of sites that are
|
||||
blacklisted from pipelining, i.e sites that are known to not support HTTP
|
||||
pipelining. The array is copied by libcurl.
|
||||
|
||||
The default value is NULL, which means that there is no blacklist.
|
||||
|
||||
Pass a NULL pointer to clear the blacklist.
|
||||
|
||||
Example:
|
||||
|
||||
.nf
|
||||
site_blacklist[] =
|
||||
{
|
||||
"www.haxx.se",
|
||||
"www.example.com:1234",
|
||||
NULL
|
||||
};
|
||||
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINE_SITE_BL, site_blacklist);
|
||||
.fi
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
|
||||
.IP CURLMOPT_PIPELINING_SERVER_BL
|
||||
Pass an array of char *, ending with NULL. This is a list of server types
|
||||
prefixes (in the Server: HTTP header) that are blacklisted from pipelining,
|
||||
i.e server types that are known to not support HTTP pipelining. The array is
|
||||
copied by libcurl.
|
||||
|
||||
Note that the comparison matches if the Server: header begins with the string
|
||||
in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can
|
||||
both be blacklisted by having "Ninja" in the backlist.
|
||||
|
||||
The default value is NULL, which means that there is no blacklist.
|
||||
|
||||
Pass a NULL pointer to clear the blacklist.
|
||||
|
||||
Example:
|
||||
|
||||
.nf
|
||||
server_blacklist[] =
|
||||
{
|
||||
"Microsoft-IIS/6.0",
|
||||
"nginx/0.8.54",
|
||||
NULL
|
||||
};
|
||||
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist);
|
||||
.fi
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
|
||||
.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
|
||||
Pass a long. The set number will be used as the maximum amount of
|
||||
simultaneously open connections in total. For each new session, libcurl
|
||||
will open a new connection up to the limit set by
|
||||
CURLMOPT_MAX_TOTAL_CONNECTIONS. When the limit is reached, the sessions will
|
||||
be pending until there are available connections. If CURLMOPT_PIPELINING is
|
||||
1, libcurl will try to pipeline if the host is capable of it.
|
||||
|
||||
The default value is 0, which means that there is no limit.
|
||||
However, for backwards compatibility, setting it to 0 when CURLMOPT_PIPELINING
|
||||
is 1 will not be treated as unlimited. Instead it will open only 1 connection
|
||||
and try to pipeline on it.
|
||||
|
||||
(Added in 7.30.0)
|
||||
See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
|
||||
.SH RETURNS
|
||||
The standard CURLMcode for multi interface error codes. Note that it returns a
|
||||
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -33,9 +33,9 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||
int *numfds);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function polls on all file descriptors used by the curl easy handles
|
||||
contained in the given multi handle set. It will block until activity is
|
||||
detected on at least one of the handles or \fItimeout_ms\fP has passed.
|
||||
\fIcurl_multi_wait(3)\fP polls all file descriptors used by the curl easy
|
||||
handles contained in the given multi handle set. It will block until activity
|
||||
is detected on at least one of the handles or \fItimeout_ms\fP has passed.
|
||||
Alternatively, if the multi handle has a pending internal timeout that has a
|
||||
shorter expiry time than \fItimeout_ms\fP, that shorter time will be used
|
||||
instead to make sure timeout accuracy is reasonably kept.
|
||||
@@ -43,7 +43,7 @@ instead to make sure timeout accuracy is reasonably kept.
|
||||
The calling application may pass additional curl_waitfd structures which are
|
||||
similar to \fIpoll(2)\fP's pollfd structure to be waited on in the same call.
|
||||
|
||||
On completion, if \fInumfds\fP is supplied, it will be populated with the
|
||||
On completion, if \fInumfds\fP is non-NULL, it will be populated with the
|
||||
total number of file descriptors on which interesting events occured. This
|
||||
number can include both libcurl internal descriptors as well as descriptors
|
||||
provided in \fIextra_fds\fP.
|
||||
|
@@ -20,7 +20,7 @@
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_version_info 3 "18 Feb 2014" "libcurl 7.33.0" "libcurl Manual"
|
||||
.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_version_info - returns run-time libcurl version info
|
||||
.SH SYNOPSIS
|
||||
@@ -96,7 +96,10 @@ bits are:
|
||||
.IP CURL_VERSION_IPV6
|
||||
supports IPv6
|
||||
.IP CURL_VERSION_KERBEROS4
|
||||
supports kerberos4 (when using FTP)
|
||||
supports Kerberos V4 (when using FTP)
|
||||
.IP CURL_VERSION_KERBEROS5
|
||||
supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5 proxy
|
||||
(Added in 7.40.0)
|
||||
.IP CURL_VERSION_SSL
|
||||
supports SSL (HTTPS/FTPS) (Added in 7.10)
|
||||
.IP CURL_VERSION_LIBZ
|
||||
@@ -124,9 +127,14 @@ libcurl was built with support for IDNA, domain names with international
|
||||
letters. (Added in 7.12.0)
|
||||
.IP CURL_VERSION_SSPI
|
||||
libcurl was built with support for SSPI. This is only available on Windows and
|
||||
makes libcurl use Windows-provided functions for NTLM authentication. It also
|
||||
allows libcurl to use the current user and the current user's password without
|
||||
the app having to pass them on. (Added in 7.13.2)
|
||||
makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and
|
||||
Digest authentication. It also allows libcurl to use the current user
|
||||
credentials without the app having to pass them on. (Added in 7.13.2)
|
||||
.IP CURL_VERSION_GSSAPI
|
||||
libcurl was built with support for GSS-API. This makes libcurl use provided
|
||||
functions for Kerberos and SPNEGO authentication. It also allows libcurl
|
||||
to use the current user credentials without the app having to pass them on.
|
||||
(Added in 7.38.0)
|
||||
.IP CURL_VERSION_CONV
|
||||
libcurl was built with support for character conversions, as provided by the
|
||||
CURLOPT_CONV_* callbacks. (Added in 7.15.4)
|
||||
@@ -138,12 +146,14 @@ libcurl was built with support for NTLM delegation to a winbind helper.
|
||||
.IP CURL_VERSION_HTTP2
|
||||
libcurl was built with support for HTTP2.
|
||||
(Added in 7.33.0)
|
||||
.IP CURL_VERSION_UNIX_SOCKETS
|
||||
libcurl was built with support for Unix domain sockets.
|
||||
(Added in 7.40.0)
|
||||
.RE
|
||||
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
|
||||
has no SSL support, this is NULL.
|
||||
|
||||
\fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
|
||||
OpenSSL project. If libcurl has no SSL support, this is 0.
|
||||
\fIssl_version_num\fP is always 0.
|
||||
|
||||
\fIlibz_version\fP is an ASCII string (there is no numerical version). If
|
||||
libcurl has no libz support, this is NULL.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
An overview of the six time values available from curl_easy_getinfo()
|
||||
|
||||
curk_easy_perform()
|
||||
curl_easy_perform()
|
||||
|
|
||||
|--NT
|
||||
|--|--CT
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -19,7 +19,7 @@
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface"
|
||||
.TH libcurl 3 "19 Sep 2014" "libcurl" "libcurl easy interface"
|
||||
.SH NAME
|
||||
libcurl-easy \- easy interface overview
|
||||
.SH DESCRIPTION
|
||||
@@ -33,6 +33,17 @@ without a specified URL as you may have figured out yourself). You might want
|
||||
to set some callbacks as well that will be called from the library when data
|
||||
is available etc. \fIcurl_easy_setopt(3)\fP is used for all this.
|
||||
|
||||
\fICURLOPT_URL(3)\fP is only option you really must set, as otherwise there
|
||||
can be no transfer. Another commonly used option is \fICURLOPT_VERBOSE(3)\fP
|
||||
that will help you see what libcurl is doing under the hood, very useful when
|
||||
debugging for example. The \fIcurl_easy_setopt(3)\fP man page has a full index
|
||||
of the over 200 available options.
|
||||
|
||||
If you at any point would like to blank all previously set options for a
|
||||
single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also
|
||||
make a clone of an easy handle (with all its set options) using
|
||||
\fIcurl_easy_duphandle(3)\fP.
|
||||
|
||||
When all is setup, you tell libcurl to perform the transfer using
|
||||
\fIcurl_easy_perform(3)\fP. It will then do the entire operation and won't
|
||||
return until it is done (successfully or not).
|
||||
@@ -42,4 +53,6 @@ transfer, or if you're done, cleanup the session by calling
|
||||
\fIcurl_easy_cleanup(3)\fP. If you want persistent connections, you don't
|
||||
cleanup immediately, but instead run ahead and perform other transfers using
|
||||
the same easy handle.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_easy_setopt "(3), "
|
||||
.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl "(3) "
|
||||
|
@@ -83,6 +83,9 @@ FTP servers return a 227-line as a response to a PASV command. If libcurl
|
||||
fails to parse that line, this return code is passed back.
|
||||
.IP "CURLE_FTP_CANT_GET_HOST (15)"
|
||||
An internal failure to lookup the host used for the new connection.
|
||||
.IP "CURLE_HTTP2 (16)"
|
||||
A problem was detected in the HTTP2 framing layer. This is somewhat generic
|
||||
and can be one out of several problems, see the error buffer for details.
|
||||
.IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
|
||||
Received an error when trying to set the transfer mode to binary or ASCII.
|
||||
.IP "CURLE_PARTIAL_FILE (18)"
|
||||
@@ -294,3 +297,7 @@ Not enough memory was available.
|
||||
.IP "CURLSHE_NOT_BUILT_IN (5)"
|
||||
The requested sharing could not be done because the library you use don't have
|
||||
that particular feature enabled. (Added in 7.23.0)
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_strerror "(3), " curl_multi_strerror "(3), "
|
||||
.BR curl_share_strerror "(3), " CURLOPT_ERRORBUFFER "(3), "
|
||||
.BR CURLOPT_VERBOSE "(3), " CURLOPT_DEBUGFUNCTION "(3) "
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
@@ -20,7 +20,7 @@
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH libcurl-multi 3 "3 Feb 2007" "libcurl 7.16.0" "libcurl multi interface"
|
||||
.TH libcurl-multi 3 "19 Sep 2014" "libcurl" "libcurl multi interface"
|
||||
.SH NAME
|
||||
libcurl-multi \- how to use the multi interface
|
||||
.SH DESCRIPTION
|
||||
@@ -43,18 +43,28 @@ complicated for the application.
|
||||
|
||||
3. Enable the application to wait for action on its own file descriptors and
|
||||
curl's file descriptors simultaneous easily.
|
||||
|
||||
4. Enable event-based handling and scaling transfers up to and beyond
|
||||
thousands of parallel connections.
|
||||
.SH "ONE MULTI HANDLE MANY EASY HANDLES"
|
||||
To use the multi interface, you must first create a 'multi handle' with
|
||||
\fIcurl_multi_init(3)\fP. This handle is then used as input to all further
|
||||
curl_multi_* functions.
|
||||
|
||||
Each single transfer is built up with an easy handle. You must create them,
|
||||
and setup the appropriate options for each easy handle, as outlined in the
|
||||
\fIlibcurl(3)\fP man page, using \fIcurl_easy_setopt(3)\fP.
|
||||
With a multi handle and the multi interface you can do any amount of
|
||||
simultaneous transfers in parallel. Each single transfer is built up around an
|
||||
easy handle. You must create the easy handles you need, and setup the
|
||||
appropriate options for each easy handle, as outlined in the \fIlibcurl(3)\fP
|
||||
man page, using \fIcurl_easy_setopt(3)\fP.
|
||||
|
||||
When the easy handle is setup for a transfer, then instead of using
|
||||
\fIcurl_easy_perform(3)\fP (as when using the easy interface for transfers),
|
||||
you should instead add the easy handle to the multi handle using
|
||||
There are two flavours of the multi interface, the select() oriented one and
|
||||
the event based one we called multi_socket. You will benefit from reading
|
||||
through the description of both versions to full understand how they work and
|
||||
differentiate. We start out with the select() oriented version.
|
||||
|
||||
When an easy handle is setup for a transfer, then instead of using
|
||||
\fIcurl_easy_perform(3)\fP like when using the easy interface for transfers,
|
||||
you should add the easy handle to the multi handle with
|
||||
\fIcurl_multi_add_handle(3)\fP. The multi handle is sometimes referred to as a
|
||||
\'multi stack\' because of the fact that it may hold a large amount of easy
|
||||
handles.
|
||||
@@ -71,7 +81,8 @@ application drive. You drive the transfers by invoking
|
||||
anything available to transfer. It'll use the callbacks and everything else
|
||||
you have setup in the individual easy handles. It'll transfer data on all
|
||||
current transfers in the multi stack that are ready to transfer anything. It
|
||||
may be all, it may be none.
|
||||
may be all, it may be none. When there's nothing more to do for now, it
|
||||
returns back to the calling application.
|
||||
|
||||
Your application can acquire knowledge from libcurl when it would like to get
|
||||
invoked to transfer data, so that you don't have to busy-loop and call that
|
||||
@@ -80,7 +91,9 @@ interface using which you can extract fd_sets from libcurl to use in select()
|
||||
or poll() calls in order to get to know when the transfers in the multi stack
|
||||
might need attention. This also makes it very easy for your program to wait
|
||||
for input on your own private file descriptors at the same time or perhaps
|
||||
timeout every now and then, should you want that.
|
||||
timeout every now and then, should you want that. \fIcurl_multi_timeout(3)\fP
|
||||
also helps you with providing a suitable timeout period for your select()
|
||||
call.
|
||||
|
||||
\fIcurl_multi_perform(3)\fP stores the number of still running transfers in
|
||||
one of its input arguments, and by reading that you can figure out when all
|
||||
@@ -121,21 +134,39 @@ using large numbers of simultaneous connections.
|
||||
When using this API, you add easy handles to the multi handle just as with the
|
||||
normal multi interface. Then you also set two callbacks with the
|
||||
CURLMOPT_SOCKETFUNCTION and CURLMOPT_TIMERFUNCTION options to
|
||||
\fIcurl_multi_setopt(3)\fP.
|
||||
\fIcurl_multi_setopt(3)\fP. They are two callback functions that libcurl will
|
||||
call with information about what sockets to wait for, and for what activity,
|
||||
and what the curret timeout time is - if that expires libcurl should be
|
||||
notified.
|
||||
|
||||
The API is then designed to inform your application about which sockets
|
||||
libcurl is currently using and for what activities (read and/or write) on
|
||||
those sockets your application is expected to wait for.
|
||||
The multi_socket API is designed to inform your application about which
|
||||
sockets libcurl is currently using and for what activities (read and/or write)
|
||||
on those sockets your application is expected to wait for.
|
||||
|
||||
Your application must then make sure to receive all sockets informed about in
|
||||
the CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given
|
||||
activity on them. When a socket has the given activity, you call
|
||||
Your application must make sure to receive all sockets informed about in the
|
||||
CURLMOPT_SOCKETFUNCTION callback and make sure it reacts on the given activity
|
||||
on them. When a socket has the given activity, you call
|
||||
\fIcurl_multi_socket_action(3)\fP specifying which socket and action there
|
||||
are.
|
||||
|
||||
The CURLMOPT_TIMERFUNCTION callback is called to set a timeout. When that
|
||||
timeout expires, your application should call the
|
||||
\fIcurl_multi_socket_action(3)\fP function saying it was due to a timeout.
|
||||
|
||||
This API is typically used with an event-driven underlying functionality (like
|
||||
libevent, libev, kqueue, epoll or similar) which which the application
|
||||
"subscribes" on socket changes. This allows applications and libcurl to much
|
||||
better scale upward and beyond thousands of simultaneous transfers without
|
||||
losing performance.
|
||||
|
||||
When you've added your initial set of handles, you call
|
||||
\fIcurl_multi_socket_action(3)\fP with CURL_SOCKET_TIMEOUT set in the sockfd
|
||||
argument, and you'll get callbacks call that sets you up and you then continue
|
||||
to call \fIcurl_multi_socket_action(3)\fP accordingly when you get activity on
|
||||
the sockets you've been asked to wait on, or if the timeout timer expires.
|
||||
|
||||
You can poll \fIcurl_multi_info_read(3)\fP to see if any transfer has
|
||||
completed, as it then has a message saying so.
|
||||
.SH "BLOCKING"
|
||||
A few areas in the code are still using blocking code, even when used from the
|
||||
multi interface. While we certainly want and intend for these to get fixed in
|
||||
@@ -149,3 +180,5 @@ the future, you should be aware of the following current restrictions:
|
||||
- file:// transfers
|
||||
- TELNET transfers
|
||||
.fi
|
||||
.SH "SEE ALSO"
|
||||
.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl "(3) "
|
||||
|
@@ -63,3 +63,4 @@ When you're done using the share, make sure that no easy handle is still using
|
||||
it, and call \fIcurl_share_cleanup(3)\fP on the handle.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)"
|
||||
.BR libcurl-errors "(3), " libcurl-easy "(3), " libcurl-multi "(3) "
|
||||
|
@@ -20,7 +20,7 @@
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH libcurl-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming"
|
||||
.TH libcurl-tutorial 3 "19 Sep 2014" "libcurl" "libcurl programming"
|
||||
.SH NAME
|
||||
libcurl-tutorial \- libcurl programming tutorial
|
||||
.SH "Objective"
|
||||
@@ -40,7 +40,7 @@ refer to their respective man pages.
|
||||
|
||||
.SH "Building"
|
||||
There are many different ways to build C programs. This chapter will assume a
|
||||
UNIX-style build process. If you use a different build system, you can still
|
||||
Unix style build process. If you use a different build system, you can still
|
||||
read this to get general information that may apply to your environment as
|
||||
well.
|
||||
.IP "Compiling the Program"
|
||||
@@ -137,15 +137,17 @@ rather than at build-time (if possible of course). By calling
|
||||
struct, your program can figure out exactly what the currently running libcurl
|
||||
supports.
|
||||
|
||||
.SH "Handle the Easy libcurl"
|
||||
.SH "Two Interfaces"
|
||||
libcurl first introduced the so called easy interface. All operations in the
|
||||
easy interface are prefixed with 'curl_easy'.
|
||||
|
||||
Recent libcurl versions also offer the multi interface. More about that
|
||||
interface, what it is targeted for and how to use it is detailed in a separate
|
||||
chapter further down. You still need to understand the easy interface first,
|
||||
so please continue reading for better understanding.
|
||||
easy interface are prefixed with 'curl_easy'. The easy interface lets you do
|
||||
single transfers with a synchronous and blocking function call.
|
||||
|
||||
libcurl also offers another interface that allows multiple simultaneous
|
||||
transfers in a single thread, the so called multi interface. More about that
|
||||
interface is detailed in a separate chapter further down. You still need to
|
||||
understand the easy interface first, so please continue reading for better
|
||||
understanding.
|
||||
.SH "Handle the Easy libcurl"
|
||||
To use the easy interface, you must first create yourself an easy handle. You
|
||||
need one handle for each easy session you want to perform. Basically, you
|
||||
should use one handle for every thread you plan to use for transferring. You
|
||||
@@ -162,13 +164,18 @@ transfer or series of transfers.
|
||||
You set properties and options for this handle using
|
||||
\fIcurl_easy_setopt(3)\fP. They control how the subsequent transfer or
|
||||
transfers will be made. Options remain set in the handle until set again to
|
||||
something different. Alas, multiple requests using the same handle will use
|
||||
the same options.
|
||||
something different. They are sticky. Multiple requests using the same handle
|
||||
will use the same options.
|
||||
|
||||
If you at any point would like to blank all previously set options for a
|
||||
single easy handle, you can call \fIcurl_easy_reset(3)\fP and you can also
|
||||
make a clone of an easy handle (with all its set options) using
|
||||
\fIcurl_easy_duphandle(3)\fP.
|
||||
|
||||
Many of the options you set in libcurl are "strings", pointers to data
|
||||
terminated with a zero byte. When you set strings with
|
||||
\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't
|
||||
need to be kept around in your application after being set[4].
|
||||
\fIcurl_easy_setopt(3)\fP, libcurl makes its own copy so that they don't need
|
||||
to be kept around in your application after being set[4].
|
||||
|
||||
One of the most basic properties to set in the handle is the URL. You set your
|
||||
preferred URL to transfer with \fICURLOPT_URL(3)\fP in a manner similar to:
|
||||
@@ -257,7 +264,7 @@ than one thread at any given time.
|
||||
|
||||
libcurl is completely thread safe, except for two issues: signals and SSL/TLS
|
||||
handlers. Signals are used for timing out name resolves (during DNS lookup) -
|
||||
when built without c-ares support and not on Windows.
|
||||
when built without using either the c-ares or threaded resolver backends.
|
||||
|
||||
If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are
|
||||
then of course using the underlying SSL library multi-threaded and those libs
|
||||
@@ -271,7 +278,7 @@ OpenSSL
|
||||
|
||||
GnuTLS
|
||||
|
||||
http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
|
||||
http://gnutls.org/manual/html_node/Thread-safety.html
|
||||
|
||||
NSS
|
||||
|
||||
@@ -405,7 +412,7 @@ similar to the \fICURLOPT_USERPWD(3)\fP option like this:
|
||||
|
||||
curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret");
|
||||
|
||||
There's a long time UNIX "standard" way of storing ftp user names and
|
||||
There's a long time Unix "standard" way of storing FTP user names and
|
||||
passwords, namely in the $HOME/.netrc file. The file should be made private
|
||||
so that only the user may read it (see also the "Security Considerations"
|
||||
chapter), as it might contain the password in plain text. libcurl has the
|
||||
@@ -442,7 +449,7 @@ authentication method is called 'Basic', which is sending the name and
|
||||
password in clear-text in the HTTP request, base64-encoded. This is insecure.
|
||||
|
||||
At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM,
|
||||
Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use
|
||||
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);
|
||||
@@ -1122,9 +1129,9 @@ analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP
|
||||
Basic uses base64 encoded passwords fool you. They may not look readable at a
|
||||
first glance, but they very easily "deciphered" by anyone within seconds.
|
||||
|
||||
To avoid this problem, use HTTP authentication methods or other protocols that
|
||||
don't let snoopers see your password: HTTP with Digest, NTLM or GSS
|
||||
authentication, HTTPS, FTPS, SCP, SFTP and FTP-Kerberos are a few examples.
|
||||
To avoid this problem, use an authentication mechanism or other protocol that
|
||||
doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
|
||||
NTLM authentication, HTTPS, FTPS, SCP and SFTP are a few examples.
|
||||
|
||||
.IP "Redirects"
|
||||
The \fICURLOPT_FOLLOWLOCATION(3)\fP option automatically follows HTTP
|
||||
@@ -1295,39 +1302,44 @@ To avoid this problem, you must of course use your common sense. Often, you
|
||||
can just edit out the sensitive data or just search/replace your true
|
||||
information with faked data.
|
||||
|
||||
.SH "Multiple Transfers Using the multi Interface"
|
||||
|
||||
.SH "The multi Interface"
|
||||
The easy interface as described in detail in this document is a synchronous
|
||||
interface that transfers one file at a time and doesn't return until it is
|
||||
done.
|
||||
|
||||
The multi interface, on the other hand, allows your program to transfer
|
||||
multiple files in both directions at the same time, without forcing you
|
||||
to use multiple threads. The name might make it seem that the multi
|
||||
interface is for multi-threaded programs, but the truth is almost the
|
||||
reverse. The multi interface can allow a single-threaded application
|
||||
to perform the same kinds of multiple, simultaneous transfers that
|
||||
multi-threaded programs can perform. It allows many of the benefits
|
||||
of multi-threaded transfers without the complexity of managing and
|
||||
synchronizing many threads.
|
||||
multiple files in both directions at the same time, without forcing you to use
|
||||
multiple threads. The name might make it seem that the multi interface is for
|
||||
multi-threaded programs, but the truth is almost the reverse. The multi
|
||||
interface allows a single-threaded application to perform the same kinds of
|
||||
multiple, simultaneous transfers that multi-threaded programs can perform. It
|
||||
allows many of the benefits of multi-threaded transfers without the complexity
|
||||
of managing and synchronizing many threads.
|
||||
|
||||
To complicate matters somewhat more, there are even two versions of the multi
|
||||
interface. The event based one, also called multi_socket and the "normal one"
|
||||
designed for using with select(). See the libcurl-multi.3 man page for details
|
||||
on the multi_socket event based API, this description here is for the select()
|
||||
oriented one.
|
||||
|
||||
To use this interface, you are better off if you first understand the basics
|
||||
of how to use the easy interface. The multi interface is simply a way to make
|
||||
multiple transfers at the same time by adding up multiple easy handles into
|
||||
a "multi stack".
|
||||
|
||||
You create the easy handles you want and you set all the options just like you
|
||||
have been told above, and then you create a multi handle with
|
||||
\fIcurl_multi_init(3)\fP and add all those easy handles to that multi handle
|
||||
with \fIcurl_multi_add_handle(3)\fP.
|
||||
You create the easy handles you want, one for each concurrent transfer, and
|
||||
you set all the options just like you learned above, and then you create a
|
||||
multi handle with \fIcurl_multi_init(3)\fP and add all those easy handles to
|
||||
that multi handle with \fIcurl_multi_add_handle(3)\fP.
|
||||
|
||||
When you've added the handles you have for the moment (you can still add new
|
||||
ones at any time), you start the transfers by calling
|
||||
\fIcurl_multi_perform(3)\fP.
|
||||
|
||||
\fIcurl_multi_perform(3)\fP is asynchronous. It will only execute as little as
|
||||
possible and then return back control to your program. It is designed to never
|
||||
block.
|
||||
\fIcurl_multi_perform(3)\fP is asynchronous. It will only perform what can be
|
||||
done now and then return back control to your program. It is designed to never
|
||||
block. You need to keep calling the function until all transfers are
|
||||
completed.
|
||||
|
||||
The best usage of this interface is when you do a select() on all possible
|
||||
file descriptors or sockets to know when to call libcurl again. This also
|
||||
@@ -1340,11 +1352,12 @@ When you then call select(), it'll return when one of the file handles signal
|
||||
action and you then call \fIcurl_multi_perform(3)\fP to allow libcurl to do
|
||||
what it wants to do. Take note that libcurl does also feature some time-out
|
||||
code so we advise you to never use very long timeouts on select() before you
|
||||
call \fIcurl_multi_perform(3)\fP, which thus should be called unconditionally
|
||||
every now and then even if none of its file descriptors have signaled
|
||||
ready. Another precaution you should use: always call
|
||||
\fIcurl_multi_fdset(3)\fP immediately before the select() call since the
|
||||
current set of file descriptors may change when calling a curl function.
|
||||
call \fIcurl_multi_perform(3)\fP again. \fIcurl_multi_timeout(3)\fP is
|
||||
provided to help you get a suitable timeout period.
|
||||
|
||||
Another precaution you should use: always call \fIcurl_multi_fdset(3)\fP
|
||||
immediately before the select() call since the current set of file descriptors
|
||||
may change in any curl function invoke.
|
||||
|
||||
If you want to stop the transfer of one of the easy handles in the stack, you
|
||||
can use \fIcurl_multi_remove_handle(3)\fP to remove individual easy
|
||||
@@ -1389,9 +1402,11 @@ This happens on Windows machines when libcurl is built and used as a
|
||||
DLL. However, you can still do this on Windows if you link with a static
|
||||
library.
|
||||
.IP "[3]"
|
||||
The curl-config tool is generated at build-time (on UNIX-like systems) and
|
||||
The curl-config tool is generated at build-time (on Unix-like systems) and
|
||||
should be installed with the 'make install' or similar instruction that
|
||||
installs the library, header files, man pages etc.
|
||||
.IP "[4]"
|
||||
This behavior was different in versions before 7.17.0, where strings had to
|
||||
remain valid past the end of the \fIcurl_easy_setopt(3)\fP call.
|
||||
.SH "SEE ALSO"
|
||||
.BR libcurl-errors "(3), " libcurl-multi "(3), " libcurl-easy "(3) "
|
||||
|
@@ -40,7 +40,7 @@ details.
|
||||
|
||||
To transfer files, you create an "easy handle" using \fIcurl_easy_init(3)\fP
|
||||
for a single individual transfer (in either direction). You then set your
|
||||
desired set of options in that handle with \fIcurk_easy_setopt(3)\fP. Options
|
||||
desired set of options in that handle with \fIcurl_easy_setopt(3)\fP. Options
|
||||
you set with \fIcurl_easy_setopt(3)\fP stick. They will be used on every
|
||||
repeated use of this handle until you either change the option, or you reset
|
||||
them all with \fIcurl_easy_reset(3)\fP.
|
||||
@@ -148,18 +148,16 @@ the library code. For example, when libcurl is built for SSL
|
||||
capability via the GNU TLS library, there is an elaborate tree inside
|
||||
that library that describes the SSL protocol.
|
||||
|
||||
\fIcurl_global_init()\fP is the function that you must call. This may
|
||||
allocate resources (e.g. the memory for the GNU TLS tree mentioned
|
||||
above), so the companion function \fIcurl_global_cleanup()\fP releases
|
||||
them.
|
||||
\fIcurl_global_init(3)\fP is the function that you must call. This may
|
||||
allocate resources (e.g. the memory for the GNU TLS tree mentioned above), so
|
||||
the companion function \fIcurl_global_cleanup(3)\fP releases them.
|
||||
|
||||
The basic rule for constructing a program that uses libcurl is this:
|
||||
Call \fIcurl_global_init()\fP, with a \fICURL_GLOBAL_ALL\fP argument,
|
||||
immediately after the program starts, while it is still only one
|
||||
thread and before it uses libcurl at all. Call
|
||||
\fIcurl_global_cleanup()\fP immediately before the program exits, when
|
||||
the program is again only one thread and after its last use of
|
||||
libcurl.
|
||||
The basic rule for constructing a program that uses libcurl is this: Call
|
||||
\fIcurl_global_init(3)\fP, with a \fICURL_GLOBAL_ALL\fP argument, immediately
|
||||
after the program starts, while it is still only one thread and before it uses
|
||||
libcurl at all. Call \fIcurl_global_cleanup(3)\fP immediately before the
|
||||
program exits, when the program is again only one thread and after its last
|
||||
use of libcurl.
|
||||
|
||||
You can call both of these multiple times, as long as all calls meet
|
||||
these requirements and the number of calls to each is the same.
|
||||
@@ -184,48 +182,42 @@ your code doesn't know about other parts of the program -- it doesn't
|
||||
know whether they use libcurl or not. And its code doesn't necessarily
|
||||
run at the start and end of the whole program.
|
||||
|
||||
A module like this must have global constant functions of its own,
|
||||
just like \fIcurl_global_init()\fP and \fIcurl_global_cleanup()\fP.
|
||||
The module thus has control at the beginning and end of the program
|
||||
and has a place to call the libcurl functions. Note that if multiple
|
||||
modules in the program use libcurl, they all will separately call the
|
||||
libcurl functions, and that's OK because only the first
|
||||
\fIcurl_global_init()\fP and the last \fIcurl_global_cleanup()\fP in a
|
||||
program change anything. (libcurl uses a reference count in static
|
||||
memory).
|
||||
A module like this must have global constant functions of its own, just like
|
||||
\fIcurl_global_init(3)\fP and \fIcurl_global_cleanup(3)\fP. The module thus
|
||||
has control at the beginning and end of the program and has a place to call
|
||||
the libcurl functions. Note that if multiple modules in the program use
|
||||
libcurl, they all will separately call the libcurl functions, and that's OK
|
||||
because only the first \fIcurl_global_init(3)\fP and the last
|
||||
\fIcurl_global_cleanup(3)\fP in a program change anything. (libcurl uses a
|
||||
reference count in static memory).
|
||||
|
||||
In a C++ module, it is common to deal with the global constant
|
||||
situation by defining a special class that represents the global
|
||||
constant environment of the module. A program always has exactly one
|
||||
object of the class, in static storage. That way, the program
|
||||
automatically calls the constructor of the object as the program
|
||||
starts up and the destructor as it terminates. As the author of this
|
||||
libcurl-using module, you can make the constructor call
|
||||
\fIcurl_global_init()\fP and the destructor call
|
||||
\fIcurl_global_cleanup()\fP and satisfy libcurl's requirements without
|
||||
your user having to think about it.
|
||||
In a C++ module, it is common to deal with the global constant situation by
|
||||
defining a special class that represents the global constant environment of
|
||||
the module. A program always has exactly one object of the class, in static
|
||||
storage. That way, the program automatically calls the constructor of the
|
||||
object as the program starts up and the destructor as it terminates. As the
|
||||
author of this libcurl-using module, you can make the constructor call
|
||||
\fIcurl_global_init(3)\fP and the destructor call \fIcurl_global_cleanup(3)\fP
|
||||
and satisfy libcurl's requirements without your user having to think about it.
|
||||
|
||||
\fIcurl_global_init()\fP has an argument that tells what particular
|
||||
parts of the global constant environment to set up. In order to
|
||||
successfully use any value except \fICURL_GLOBAL_ALL\fP (which says to
|
||||
set up the whole thing), you must have specific knowledge of internal
|
||||
workings of libcurl and all other parts of the program of which it is
|
||||
part.
|
||||
\fIcurl_global_init(3)\fP has an argument that tells what particular parts of
|
||||
the global constant environment to set up. In order to successfully use any
|
||||
value except \fICURL_GLOBAL_ALL\fP (which says to set up the whole thing), you
|
||||
must have specific knowledge of internal workings of libcurl and all other
|
||||
parts of the program of which it is part.
|
||||
|
||||
A special part of the global constant environment is the identity of
|
||||
the memory allocator. \fIcurl_global_init()\fP selects the system
|
||||
default memory allocator, but you can use \fIcurl_global_init_mem()\fP
|
||||
to supply one of your own. However, there is no way to use
|
||||
\fIcurl_global_init_mem()\fP in a modular program -- all modules in
|
||||
the program that might use libcurl would have to agree on one
|
||||
allocator.
|
||||
A special part of the global constant environment is the identity of the
|
||||
memory allocator. \fIcurl_global_init(3)\fP selects the system default memory
|
||||
allocator, but you can use \fIcurl_global_init_mem(3)\fP to supply one of your
|
||||
own. However, there is no way to use \fIcurl_global_init_mem(3)\fP in a
|
||||
modular program -- all modules in the program that might use libcurl would
|
||||
have to agree on one allocator.
|
||||
|
||||
There is a failsafe in libcurl that makes it usable in simple
|
||||
situations without you having to worry about the global constant
|
||||
environment at all: \fIcurl_easy_init()\fP sets up the environment
|
||||
itself if it hasn't been done yet. The resources it acquires to do so
|
||||
get released by the operating system automatically when the program
|
||||
exits.
|
||||
There is a failsafe in libcurl that makes it usable in simple situations
|
||||
without you having to worry about the global constant environment at all:
|
||||
\fIcurl_easy_init(3)\fP sets up the environment itself if it hasn't been done
|
||||
yet. The resources it acquires to do so get released by the operating system
|
||||
automatically when the program exits.
|
||||
|
||||
This failsafe feature exists mainly for backward compatibility because
|
||||
there was a time when the global functions didn't exist. Because it
|
||||
|
@@ -1,3 +1,24 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 2006, David Shaw <dshaw@jabberwocky.com>
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
###########################################################################
|
||||
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
|
||||
# [ACTION-IF-YES], [ACTION-IF-NO])
|
||||
# ----------------------------------------------------------
|
||||
|
48
docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
Normal file
48
docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
Normal file
@@ -0,0 +1,48 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size);
|
||||
.SH DESCRIPTION
|
||||
Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently
|
||||
processing a chunked (Transfer-encoding: chunked) request with a current chunk
|
||||
length larger than \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP, that pipeline
|
||||
will not be considered for additional requests, even if it is shorter than
|
||||
\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that the penalization is inactive.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), "
|
||||
.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), "
|
47
docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
Normal file
47
docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
Normal file
@@ -0,0 +1,47 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size);
|
||||
.SH DESCRIPTION
|
||||
Pass a long with a \fBsize\fP in bytes. If a pipelined connection is currently
|
||||
processing a request with a Content-Length larger than this
|
||||
\fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP, that pipeline will then not be
|
||||
considered for additional requests, even if it is shorter than
|
||||
\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that the size penalization is inactive.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), "
|
62
docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
Normal file
62
docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
Normal file
@@ -0,0 +1,62 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAXCONNECTS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_MAXCONNECTS \- set size of connection cache
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max);
|
||||
.SH DESCRIPTION
|
||||
Pass a long indicating the \fBmax\fP. The set number will be used as the
|
||||
maximum amount of simultaneously open connections that libcurl may keep in its
|
||||
connection cache after completed use. By default libcurl will enlarge the size
|
||||
for each added easy handle to make it fit 4 times the number of added easy
|
||||
handles.
|
||||
|
||||
By setting this option, you can prevent the cache size from growing beyond the
|
||||
limit set by you.
|
||||
|
||||
When the cache is full, curl closes the oldest one in the cache to prevent the
|
||||
number of open connections from increasing.
|
||||
|
||||
This option is for the multi handle's use only, when using the easy interface
|
||||
you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option.
|
||||
|
||||
See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP for limiting the number of active
|
||||
connections.
|
||||
|
||||
.SH DEFAULT
|
||||
See DESCRIPTION
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.3
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
|
||||
.BR CURLOPT_MAXCONNECTS "(3), "
|
||||
|
54
docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
Normal file
54
docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
Normal file
@@ -0,0 +1,54 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS, long max);
|
||||
.SH DESCRIPTION
|
||||
Pass a long to indicate \fBmax\fP. The set number will be used as the maximum
|
||||
amount of simultaneously open connections to a single host. For each new
|
||||
session to a host, libcurl will open a new connection up to the limit set by
|
||||
\fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP. When the limit is reached, the
|
||||
sessions will be pending until a connection becomes available. If
|
||||
\fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to pipeline if the
|
||||
host is capable of it.
|
||||
|
||||
The default \fBmax\fP value is 0, unlimited. However, for backwards
|
||||
compatibility, setting it to 0 when \fICURLMOPT_PIPELINING(3)\fP is 1 will not
|
||||
be treated as unlimited. Instead it will open only 1 connection and try to
|
||||
pipeline on it.
|
||||
.SH DEFAULT
|
||||
0
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_TOTAL_CONNECTIONS "(3), "
|
51
docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
Normal file
51
docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
Normal file
@@ -0,0 +1,51 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max);
|
||||
.SH DESCRIPTION
|
||||
Pass a long. The set \fBmax\fP number will be used as the maximum amount of
|
||||
outstanding requests in a pipelined connection. Only used if pipelining is
|
||||
enabled.
|
||||
|
||||
When this limit is reached, libcurl will use another connection to the same
|
||||
host (see \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP), or queue the request until
|
||||
one of the pipelines to the host is ready to accept a request. Thus, the
|
||||
total number of requests in-flight is \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP *
|
||||
\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
5
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
|
50
docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
Normal file
50
docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
Normal file
@@ -0,0 +1,50 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount);
|
||||
.SH DESCRIPTION
|
||||
Pass a long for the \fBamount\fP. The set number will be used as the maximum
|
||||
number of simultaneously open connections in total using this multi
|
||||
handle. For each new session, libcurl will open a new connection up to the
|
||||
limit set by \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is
|
||||
reached, the sessions will be pending until there are available
|
||||
connections. If \fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl will try to
|
||||
pipeline if the host is capable of it.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that there is no limit. It is then simply
|
||||
controlled by the number of easy handles added.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAXCONNECTS "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
|
57
docs/libcurl/opts/CURLMOPT_PIPELINING.3
Normal file
57
docs/libcurl/opts/CURLMOPT_PIPELINING.3
Normal file
@@ -0,0 +1,57 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PIPELINING 3 "17 Jun 2014" "libcurl 7.37.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_PIPELINING \- enable/disable HTTP pipelining
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, bool onoff);
|
||||
.SH DESCRIPTION
|
||||
Set the \fBonoff\fP parameter to 1 to make libcurl use HTTP pipelining for
|
||||
HTTP transfers done using this multi handle, as far as possible. This means
|
||||
that if you add a second request that can use an already existing connection,
|
||||
the second request will be \&"piped" on the same connection rather than being
|
||||
executed in parallel.
|
||||
|
||||
When using pipelining, there are also several other related options that are
|
||||
interesting to tweak and adjust to alter how libcurl spreads out requests on
|
||||
different connections or not etc.
|
||||
.SH DEFAULT
|
||||
0 (off)
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
TODO
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAX_PIPELINE_LENGTH "(3), "
|
||||
.BR CURLMOPT_PIPELINING_SITE_BL "(3), "
|
||||
.BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE "(3), "
|
||||
.BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE "(3), "
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
|
||||
.BR CURLMOPT_MAXCONNECTS "(3), "
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS "(3), "
|
60
docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
Normal file
60
docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
Normal file
@@ -0,0 +1,60 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
.\" * copies of the Software, and permit persons to whom the Software is
|
||||
.\" * furnished to do so, under the terms of the COPYING file.
|
||||
.\" *
|
||||
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
.\" * KIND, either express or implied.
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PIPELINING_SERVER_BL 3 "4 Nov 2014" "libcurl 7.39.0" "curl_multi_setopt options"
|
||||
.SH NAME
|
||||
CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist
|
||||
.SH SYNOPSIS
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers);
|
||||
.SH DESCRIPTION
|
||||
Pass a \fBservers\fP array of char *, ending with a NULL entry. This is a list
|
||||
of server types prefixes (in the Server: HTTP header) that are blacklisted
|
||||
from pipelining, i.e server types that are known to not support HTTP
|
||||
pipelining. The array is copied by libcurl.
|
||||
|
||||
Note that the comparison matches if the Server: header begins with the string
|
||||
in the blacklist, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can
|
||||
both be blacklisted by having "Ninja" in the backlist.
|
||||
|
||||
Pass a NULL pointer to clear the blacklist.
|
||||
.SH DEFAULT
|
||||
The default value is NULL, which means that there is no blacklist.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
server_blacklist[] =
|
||||
{
|
||||
"Microsoft-IIS/6.0",
|
||||
"nginx/0.8.54",
|
||||
NULL
|
||||
};
|
||||
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINE_SERVER_BL, server_blacklist);
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING "(3), " CURLMOPT_PIPELINING_SITE_BL "(3), "
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user