Compare commits
1360 Commits
curl-7_38_
...
http2-push
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f87a3d736f | ||
![]() |
f44b803f16 | ||
![]() |
6842afbf44 | ||
![]() |
ea1eec8ea8 | ||
![]() |
570076e82c | ||
![]() |
ef0fdb83b8 | ||
![]() |
1c3811f4fd | ||
![]() |
afbee791d5 | ||
![]() |
2546134b97 | ||
![]() |
93aacc3050 | ||
![]() |
307f212379 | ||
![]() |
26ddc536b0 | ||
![]() |
0e7d76d6a8 | ||
![]() |
26583a62ab | ||
![]() |
cf6ef2dc92 | ||
![]() |
3b93f1a3ec | ||
![]() |
46d0eba2e9 | ||
![]() |
4a2398627c | ||
![]() |
b88f980a74 | ||
![]() |
85739723ba | ||
![]() |
f72b30e6fb | ||
![]() |
52d83cb0c6 | ||
![]() |
38e07886ed | ||
![]() |
bdf89d80ca | ||
![]() |
24a8359b25 | ||
![]() |
24f0b6ebf7 | ||
![]() |
50c7f17e50 | ||
![]() |
3e7ec1e849 | ||
![]() |
28f4fc5272 | ||
![]() |
45f21e0f37 | ||
![]() |
f93da27756 | ||
![]() |
f29f2cbd00 | ||
![]() |
4fd187c677 | ||
![]() |
496e96c242 | ||
![]() |
bb5b29ec14 | ||
![]() |
75ba107767 | ||
![]() |
b430cb2a58 | ||
![]() |
99eafc49bb | ||
![]() |
45bad4ac97 | ||
![]() |
f3288196ff | ||
![]() |
ff7097f72c | ||
![]() |
55fc47a401 | ||
![]() |
d186be9510 | ||
![]() |
878c5757c0 | ||
![]() |
dd39a67101 | ||
![]() |
da08a204c2 | ||
![]() |
a9ed0fd6cb | ||
![]() |
a3e5a4371b | ||
![]() |
4a7feea31a | ||
![]() |
8d0d688296 | ||
![]() |
a5fb9151ee | ||
![]() |
f348b2d3bc | ||
![]() |
1514f3506b | ||
![]() |
55f3eb588d | ||
![]() |
bf5218c85e | ||
![]() |
cbf2920d02 | ||
![]() |
0fcfe4d7ac | ||
![]() |
20ac345806 | ||
![]() |
eaeeed2e8f | ||
![]() |
56b7663f73 | ||
![]() |
025dbe46df | ||
![]() |
1a8926d12f | ||
![]() |
b8673bb9f0 | ||
![]() |
c2cc3a5e97 | ||
![]() |
aa4e3c6438 | ||
![]() |
d712e22b56 | ||
![]() |
f649411a1c | ||
![]() |
8f4791440a | ||
![]() |
6befade68f | ||
![]() |
3587da9e7c | ||
![]() |
1ce14037c0 | ||
![]() |
30bd59ba6e | ||
![]() |
ccfdd5986c | ||
![]() |
fc16d9cec8 | ||
![]() |
7c17b58eec | ||
![]() |
3013bb6b1c | ||
![]() |
001ab7d860 | ||
![]() |
59432503c0 | ||
![]() |
cb5d4b1389 | ||
![]() |
3174c940b5 | ||
![]() |
2b3860d1d6 | ||
![]() |
0a9f285140 | ||
![]() |
af3d76ccf9 | ||
![]() |
952b745c98 | ||
![]() |
21784936e1 | ||
![]() |
352fbceef3 | ||
![]() |
19d5bcd66a | ||
![]() |
f6af9aef7e | ||
![]() |
46a050e9f5 | ||
![]() |
3cac8c9049 | ||
![]() |
33ee411848 | ||
![]() |
3bbcb4b036 | ||
![]() |
e8423f9ce1 | ||
![]() |
9f5dcab83d | ||
![]() |
41db5aed7a | ||
![]() |
4bb815a32e | ||
![]() |
4e7c3c12d3 | ||
![]() |
9a0a16a61c | ||
![]() |
2f1eae0f27 | ||
![]() |
3628a90852 | ||
![]() |
a8904b39f3 | ||
![]() |
8a7c1c76b3 | ||
![]() |
f348a6b4ab | ||
![]() |
d1b1d782f5 | ||
![]() |
e57f08863a | ||
![]() |
44fe4b9029 | ||
![]() |
9972666b47 | ||
![]() |
c005790ff1 | ||
![]() |
49a6642f01 | ||
![]() |
f81d356c21 | ||
![]() |
b18a1654c1 | ||
![]() |
02dfc930b5 | ||
![]() |
96c0164b88 | ||
![]() |
4bef1c7bf4 | ||
![]() |
4a79475b13 | ||
![]() |
b6e3da5f08 | ||
![]() |
28cdc0d82c | ||
![]() |
3a973517a9 | ||
![]() |
f9f22b0d63 | ||
![]() |
ef02da3156 | ||
![]() |
e582cd16ff | ||
![]() |
1514977bcd | ||
![]() |
fda0e74c22 | ||
![]() |
03e2a9b023 | ||
![]() |
817323ed82 | ||
![]() |
42ed88e70a | ||
![]() |
84d811f6af | ||
![]() |
d04bab8873 | ||
![]() |
640f283bbb | ||
![]() |
995c6006fe | ||
![]() |
78ac944dc2 | ||
![]() |
ee04c20b74 | ||
![]() |
126e7f7253 | ||
![]() |
b0143a2a33 | ||
![]() |
6a688976f0 | ||
![]() |
c175d184a2 | ||
![]() |
d5aab55b33 | ||
![]() |
0f6f7c100a | ||
![]() |
db979fea73 | ||
![]() |
a393d64456 | ||
![]() |
265f83a9f0 | ||
![]() |
301ba7772c | ||
![]() |
00a770b3f5 | ||
![]() |
dd23c49546 | ||
![]() |
3d38a38012 | ||
![]() |
d4313b1f01 | ||
![]() |
7da064fdd2 | ||
![]() |
897a7b3a13 | ||
![]() |
155b1f5df9 | ||
![]() |
979670988a | ||
![]() |
0b26b94bdc | ||
![]() |
4883f7019d | ||
![]() |
39b9bf60d1 | ||
![]() |
d69eee0964 | ||
![]() |
7ff7e45405 | ||
![]() |
4ac6cc3ebd | ||
![]() |
077f12b0ae | ||
![]() |
d6f1c74330 | ||
![]() |
7d0df07e48 | ||
![]() |
811443754a | ||
![]() |
df3a970cb4 | ||
![]() |
193251794a | ||
![]() |
8b38fcf2f6 | ||
![]() |
5871affc7a | ||
![]() |
3e8a5d88a5 | ||
![]() |
522ca8c035 | ||
![]() |
a66ed407d2 | ||
![]() |
61a94d6f77 | ||
![]() |
56c362b1a7 | ||
![]() |
72105ebf05 | ||
![]() |
38bd6bf0bb | ||
![]() |
be4c8fd1ef | ||
![]() |
783b3c7b42 | ||
![]() |
02ec1ced9b | ||
![]() |
2ce2f03007 | ||
![]() |
d722138f29 | ||
![]() |
0dc0de0351 | ||
![]() |
d261652d42 | ||
![]() |
74a4bd5ecd | ||
![]() |
591a6933da | ||
![]() |
e91aedd840 | ||
![]() |
ee3ad233a2 | ||
![]() |
70b5b698b0 | ||
![]() |
a28734be09 | ||
![]() |
5252f13dfa | ||
![]() |
153f940198 | ||
![]() |
f4b8b39881 | ||
![]() |
01e1bdb10c | ||
![]() |
7bbac214f5 | ||
![]() |
84c6b6561f | ||
![]() |
2c238ea1fc | ||
![]() |
5fe71975e4 | ||
![]() |
77f1029ecd | ||
![]() |
7957d2eb92 | ||
![]() |
47caff7bdf | ||
![]() |
d6440d7366 | ||
![]() |
f858624052 | ||
![]() |
6e6b02f398 | ||
![]() |
5fa82ca56f | ||
![]() |
1c01cee601 | ||
![]() |
750d678c0e | ||
![]() |
a6af3df660 | ||
![]() |
2a746f6c28 | ||
![]() |
fd137786e5 | ||
![]() |
b419e7ae0c | ||
![]() |
d37e0160c2 | ||
![]() |
640296c95d | ||
![]() |
c4d6f9163a | ||
![]() |
c720cd6356 | ||
![]() |
3377e692ee | ||
![]() |
5bf472fd39 | ||
![]() |
8936a23f51 | ||
![]() |
f010f3e3ca | ||
![]() |
33058a1dc3 | ||
![]() |
9fcc297ff3 | ||
![]() |
8a35211f3e | ||
![]() |
fa08362a5f | ||
![]() |
a5e09e9eea | ||
![]() |
86bc654532 | ||
![]() |
690317aae2 | ||
![]() |
3c104448d6 | ||
![]() |
ae8387b91c | ||
![]() |
d93619ca5d | ||
![]() |
aa99a63f03 | ||
![]() |
4bb8bad964 | ||
![]() |
b6c9f5b7ae | ||
![]() |
4335b86a10 | ||
![]() |
3f88d92e92 | ||
![]() |
32606e4f0b | ||
![]() |
693422b79b | ||
![]() |
6a61285909 | ||
![]() |
4271695122 | ||
![]() |
b23fda76c1 | ||
![]() |
926cb9ff65 | ||
![]() |
55db5bdff7 | ||
![]() |
790d1a4816 | ||
![]() |
1c0f70f534 | ||
![]() |
cd39b944af | ||
![]() |
6ba2e88a64 | ||
![]() |
1f8a337e41 | ||
![]() |
b2ea1bfcd6 | ||
![]() |
0741271198 | ||
![]() |
97c272e5d1 | ||
![]() |
54c394699d | ||
![]() |
09a31fabe4 | ||
![]() |
d4f62f6c5d | ||
![]() |
1945f99d59 | ||
![]() |
b55cb2eef2 | ||
![]() |
c0700e3c7f | ||
![]() |
92e754de78 | ||
![]() |
9a91e8059b | ||
![]() |
3447c973d0 | ||
![]() |
cae43a10cb | ||
![]() |
aa8f613e98 | ||
![]() |
aff153f83a | ||
![]() |
59f3f92ba6 | ||
![]() |
6a7261359b | ||
![]() |
f1e0a0aae7 | ||
![]() |
047e6aa05c | ||
![]() |
48be87e5f0 | ||
![]() |
49726926c6 | ||
![]() |
710a2e99b5 | ||
![]() |
79478fdb68 | ||
![]() |
81e25b0e25 | ||
![]() |
0675abbc75 | ||
![]() |
26cbd7a1d9 | ||
![]() |
ba4741842e | ||
![]() |
27ace9893c | ||
![]() |
85c45d153b | ||
![]() |
fd9d3a1ef1 | ||
![]() |
d409f094a5 | ||
![]() |
b47c17d67c | ||
![]() |
1fd33e3ec8 | ||
![]() |
22691f849a | ||
![]() |
00e01fc0a7 | ||
![]() |
aadda65f5e | ||
![]() |
7166fd8a60 | ||
![]() |
79b9d5f1a4 | ||
![]() |
0583e87ada | ||
![]() |
b5f947b8ac | ||
![]() |
31be461c6b | ||
![]() |
6088fbce06 | ||
![]() |
cf2d21d86f | ||
![]() |
875a6d9324 | ||
![]() |
1b8f9c95b6 | ||
![]() |
9d704b3df9 | ||
![]() |
cc0e7ebc3b | ||
![]() |
3a87bdebd1 | ||
![]() |
63c64e05a4 | ||
![]() |
1e6d0e06f7 | ||
![]() |
b6e477890f | ||
![]() |
2eb02480ef | ||
![]() |
f70112522f | ||
![]() |
8dc3bbf0f8 | ||
![]() |
67a8bbb51a | ||
![]() |
691a07dac6 | ||
![]() |
05e4137d31 | ||
![]() |
82805b56b9 | ||
![]() |
1ba6e4c88e | ||
![]() |
8f78794fd5 | ||
![]() |
0cbbbbdc31 | ||
![]() |
78843afb9f | ||
![]() |
ad48b177c3 | ||
![]() |
9430dd583e | ||
![]() |
8df4b5af3f | ||
![]() |
a471a9f3b6 | ||
![]() |
27ac643455 | ||
![]() |
b3175a767d | ||
![]() |
58b0a8b059 | ||
![]() |
9e7125a1db | ||
![]() |
7fe172d3b2 | ||
![]() |
72bea7cc65 | ||
![]() |
139141f8d7 | ||
![]() |
e44155156a | ||
![]() |
992a731116 | ||
![]() |
261a0fedcf | ||
![]() |
f251417d85 | ||
![]() |
a9e46749b2 | ||
![]() |
c3101ae287 | ||
![]() |
d363c07912 | ||
![]() |
a30be951d6 | ||
![]() |
f2a0b2164a | ||
![]() |
81ee1e69fe | ||
![]() |
846f492053 | ||
![]() |
b4be97fb67 | ||
![]() |
0db831976e | ||
![]() |
369430cd17 | ||
![]() |
abf6bddc14 | ||
![]() |
f203edc544 | ||
![]() |
e2a9ebb321 | ||
![]() |
0b5efa57ad | ||
![]() |
21e82bd635 | ||
![]() |
2685041a5c | ||
![]() |
b121633402 | ||
![]() |
c84f0250e3 | ||
![]() |
049fe7fb53 | ||
![]() |
6419aee248 | ||
![]() |
5b66860652 | ||
![]() |
787c2ae91b | ||
![]() |
31987c340e | ||
![]() |
fcdc597b1a | ||
![]() |
623d24f3ee | ||
![]() |
ae3c985060 | ||
![]() |
9a743bc5fc | ||
![]() |
d2feb71752 | ||
![]() |
211f1e3c6b | ||
![]() |
dab4ff179f | ||
![]() |
e7a289ebb9 | ||
![]() |
488102fc17 | ||
![]() |
559e2cc921 | ||
![]() |
318ad8d767 | ||
![]() |
83835f7185 | ||
![]() |
eb2a6180fb | ||
![]() |
7b223a3a21 | ||
![]() |
5b58bface3 | ||
![]() |
83b29e43cd | ||
![]() |
24908c12d7 | ||
![]() |
4e299192ed | ||
![]() |
e35f2e61ec | ||
![]() |
d29f8b460c | ||
![]() |
ec31962640 | ||
![]() |
aa5808b504 | ||
![]() |
a45146868b | ||
![]() |
35648f2e79 | ||
![]() |
ac2827ac09 | ||
![]() |
bd9ac3cff2 | ||
![]() |
7e6ca87a72 | ||
![]() |
9edf28e12d | ||
![]() |
bbd0dd3fe2 | ||
![]() |
e438a9e2f0 | ||
![]() |
56ae66d518 | ||
![]() |
ff4a4dd92e | ||
![]() |
ab6e6edb9e | ||
![]() |
f687860936 | ||
![]() |
5d23279299 | ||
![]() |
ecc4940df2 | ||
![]() |
4b02b84897 | ||
![]() |
145c4692ff | ||
![]() |
430006c5e2 | ||
![]() |
148207e2d7 | ||
![]() |
7f5a170442 | ||
![]() |
ed429b72d7 | ||
![]() |
fea13a17d8 | ||
![]() |
5f6f9e8b59 | ||
![]() |
f9251a5c86 | ||
![]() |
38c304a58f | ||
![]() |
9cd4d6518f | ||
![]() |
e6917d3b77 | ||
![]() |
57dc2f7e40 | ||
![]() |
b734518371 | ||
![]() |
61ff197a27 | ||
![]() |
6779c50e26 | ||
![]() |
1f651d1d4d | ||
![]() |
185914fd31 | ||
![]() |
4dcd25e138 | ||
![]() |
a332922a52 | ||
![]() |
8854f8d45a | ||
![]() |
9e8f9dbdd3 | ||
![]() |
620e0b23c8 | ||
![]() |
2b7ac4e710 | ||
![]() |
7868dc7103 | ||
![]() |
abfab1786e | ||
![]() |
9e66d3f4d3 | ||
![]() |
1977ff811d | ||
![]() |
8ecfaad2cc | ||
![]() |
431c5261d2 | ||
![]() |
d260a0aeeb | ||
![]() |
e3fbdc7c8a | ||
![]() |
28de58504e | ||
![]() |
7e16aa936f | ||
![]() |
e539f01567 | ||
![]() |
252e9acd50 | ||
![]() |
4d6e079dd2 | ||
![]() |
ef1c3b4648 | ||
![]() |
2dc1a5ce93 | ||
![]() |
0037eb5805 | ||
![]() |
9395999543 | ||
![]() |
a6b8fe2a5f | ||
![]() |
3dbe12a1e9 | ||
![]() |
40914fd544 | ||
![]() |
8c41f368f5 | ||
![]() |
6105029b23 | ||
![]() |
9c518a7d95 | ||
![]() |
8644a88202 | ||
![]() |
76afe14584 | ||
![]() |
fe02d132e2 | ||
![]() |
0f4a03cbb6 | ||
![]() |
9e661601fe | ||
![]() |
29c655c0a6 | ||
![]() |
059b3a5770 | ||
![]() |
918e040953 | ||
![]() |
9063a7f853 | ||
![]() |
851c29269b | ||
![]() |
0cf649d9cc | ||
![]() |
0911b96399 | ||
![]() |
983ccdcead | ||
![]() |
186e46d88d | ||
![]() |
0d1060f21e | ||
![]() |
6d3260af64 | ||
![]() |
1d3f1a80d0 | ||
![]() |
a5d994941c | ||
![]() |
143acd6222 | ||
![]() |
852d35b6ea | ||
![]() |
f39b1c0801 | ||
![]() |
e424a1b3e7 | ||
![]() |
fa895f2aa2 | ||
![]() |
a6a264ef2c | ||
![]() |
3a757fddbb | ||
![]() |
d9973eaeb8 | ||
![]() |
5a1614cecd | ||
![]() |
0f24df6e54 | ||
![]() |
e662ddff49 | ||
![]() |
c19349951d | ||
![]() |
9da14a96ab | ||
![]() |
00ea0e7db0 | ||
![]() |
df28af8f39 | ||
![]() |
44ffe27056 | ||
![]() |
adb4e41a1a | ||
![]() |
42bc45be8e | ||
![]() |
870a67e01f | ||
![]() |
2e9494b15d | ||
![]() |
3ac3331e14 | ||
![]() |
163d29826d | ||
![]() |
042526c19f | ||
![]() |
9fa1abe9fe | ||
![]() |
492dfca65d | ||
![]() |
64736dd1be | ||
![]() |
709cf76f6b | ||
![]() |
1a62b6e68c | ||
![]() |
ae8235571f | ||
![]() |
ac4d08b5e2 | ||
![]() |
6bba85d500 | ||
![]() |
8aabbf5f8c | ||
![]() |
dcf23b0cfe | ||
![]() |
af838b7d7b | ||
![]() |
43eb8b2874 | ||
![]() |
df5578a7a3 | ||
![]() |
f2108ec34c | ||
![]() |
a318e04419 | ||
![]() |
1cb227c1f1 | ||
![]() |
f3f7d37c1d | ||
![]() |
ca04681c3b | ||
![]() |
e349a1bf74 | ||
![]() |
70523c690b | ||
![]() |
17abfd5a4b | ||
![]() |
f6864697c3 | ||
![]() |
921d195187 | ||
![]() |
48b5374e65 | ||
![]() |
c715fa0b60 | ||
![]() |
adf27bf60f | ||
![]() |
e71bcb659c | ||
![]() |
0d04e859e1 | ||
![]() |
bc3a44aebc | ||
![]() |
1514b718e3 | ||
![]() |
b9c190ba77 | ||
![]() |
e47b8306db | ||
![]() |
4909f7c795 | ||
![]() |
7a1538d9cc | ||
![]() |
0409a7d969 | ||
![]() |
becff7da56 | ||
![]() |
4aa9bb6b13 | ||
![]() |
ff837422ee | ||
![]() |
2e880e29bf | ||
![]() |
ffc2aeec6e | ||
![]() |
b3bcdaf01a | ||
![]() |
03fa576833 | ||
![]() |
0c050662b7 | ||
![]() |
da39f380a4 | ||
![]() |
e08a12dab1 | ||
![]() |
92835ca5d8 | ||
![]() |
5d87b1f22c | ||
![]() |
5e4395eab8 | ||
![]() |
689061e3f2 | ||
![]() |
90314100e0 | ||
![]() |
20112ed846 | ||
![]() |
63b4b8c7bd | ||
![]() |
633b3895d7 | ||
![]() |
b723ec9905 | ||
![]() |
ec80b1f414 | ||
![]() |
676ac46ff5 | ||
![]() |
31c8f8ac11 | ||
![]() |
b1c7fc050b | ||
![]() |
fce3f8f487 | ||
![]() |
6f89f86c3d | ||
![]() |
49655a6822 | ||
![]() |
1385199e80 | ||
![]() |
aba2c4dca2 | ||
![]() |
c1878e8f52 | ||
![]() |
ab85ac5eda | ||
![]() |
d771b44e53 | ||
![]() |
7eebf9a3fb | ||
![]() |
20c727ec4c | ||
![]() |
9956ef2d33 | ||
![]() |
0daf1ef729 | ||
![]() |
499024d208 | ||
![]() |
761d5166af | ||
![]() |
05792d6936 | ||
![]() |
2a15e594ef | ||
![]() |
d557da5d79 | ||
![]() |
600ccb2237 | ||
![]() |
45b9b62de4 | ||
![]() |
d37b58274d | ||
![]() |
0d41c3e46b | ||
![]() |
57d6d253a1 | ||
![]() |
7f1d76f7ee | ||
![]() |
211d5329f4 | ||
![]() |
cfc6d460cb | ||
![]() |
0ebe2c15d1 | ||
![]() |
28c9e1edf4 | ||
![]() |
b3cbf4500d | ||
![]() |
83bb07027d | ||
![]() |
6b68aa989c | ||
![]() |
8f027aa0bf | ||
![]() |
ac100f1624 | ||
![]() |
f91a7bc992 | ||
![]() |
859a82a85c | ||
![]() |
8f369c53cf | ||
![]() |
6f494c5e34 | ||
![]() |
0a7182f6ad | ||
![]() |
ae9963776a | ||
![]() |
7b5348415f | ||
![]() |
c49e228916 | ||
![]() |
957fcd9049 | ||
![]() |
f826bf37ea | ||
![]() |
564b7b6dd0 | ||
![]() |
ca51ac4017 | ||
![]() |
4161624e94 | ||
![]() |
04f246f8c7 | ||
![]() |
8ca3b05624 | ||
![]() |
6fdc8651bd | ||
![]() |
8cc70db2db | ||
![]() |
c469369b86 | ||
![]() |
58e39b4da5 | ||
![]() |
300876a7a6 | ||
![]() |
ef782d726e | ||
![]() |
26d4e0ad4e | ||
![]() |
e3558a551b | ||
![]() |
595a66ce0f | ||
![]() |
3cc9e9383b | ||
![]() |
9d964e5477 | ||
![]() |
153e9c0278 | ||
![]() |
980ba2202c | ||
![]() |
7b2012f262 | ||
![]() |
ed9a4b9fc4 | ||
![]() |
fe79f20957 | ||
![]() |
0d24f64473 | ||
![]() |
e1bb13c09f | ||
![]() |
a268a804b7 | ||
![]() |
5691325440 | ||
![]() |
db6bcbd83f | ||
![]() |
37824498a3 | ||
![]() |
23c6f0a344 | ||
![]() |
d1cf5d5706 | ||
![]() |
e888e30476 | ||
![]() |
3d5648f9ee | ||
![]() |
12e45b8462 | ||
![]() |
c260c9fad3 | ||
![]() |
731e6a6662 | ||
![]() |
eb748f159a | ||
![]() |
d6c4695dcd | ||
![]() |
261208d432 | ||
![]() |
795f013006 | ||
![]() |
71f8fdee81 | ||
![]() |
6005b0d99c | ||
![]() |
7a8b2885e2 | ||
![]() |
79543caf90 | ||
![]() |
e1ea18f90e | ||
![]() |
5f09cbcdbd | ||
![]() |
960b04e137 | ||
![]() |
089783c838 | ||
![]() |
be57f689b0 | ||
![]() |
fca58f6212 | ||
![]() |
2cc571f9e3 | ||
![]() |
1cbc8fd3d1 | ||
![]() |
9c4fa400cf | ||
![]() |
b9fd757d03 | ||
![]() |
3a9419f65a | ||
![]() |
1d25acb038 | ||
![]() |
5d5c78b47f | ||
![]() |
8bb3443a21 | ||
![]() |
30ef1a0779 | ||
![]() |
81b98dafa1 | ||
![]() |
47438daa60 | ||
![]() |
36e6404228 | ||
![]() |
930be07067 | ||
![]() |
30eb6bbdc9 | ||
![]() |
a2f8887b79 | ||
![]() |
b2c01f02d5 | ||
![]() |
c807ce73ed | ||
![]() |
af8928a23b | ||
![]() |
14a6cfaddb | ||
![]() |
0b1f37e77c | ||
![]() |
a4065ebf1c | ||
![]() |
bd0c3b3c66 | ||
![]() |
f46c6fbee0 | ||
![]() |
f13669a375 | ||
![]() |
3af90a6e19 | ||
![]() |
5e113a18c5 | ||
![]() |
5940e06f01 | ||
![]() |
5c73cdef62 | ||
![]() |
251a349055 | ||
![]() |
5f09947d28 | ||
![]() |
224cf1c274 | ||
![]() |
bb12d44471 | ||
![]() |
bcf07f8a4b | ||
![]() |
cc28bc472e | ||
![]() |
e9834808e9 | ||
![]() |
710c38d7a4 | ||
![]() |
d21b66835f | ||
![]() |
4e58589b0e | ||
![]() |
e6b4b4b66d | ||
![]() |
355bf01c82 | ||
![]() |
b4f13a4952 | ||
![]() |
99e71e6a84 | ||
![]() |
9a452ba3a1 | ||
![]() |
659d252b6f | ||
![]() |
c712fe01a9 | ||
![]() |
5c0e66d632 | ||
![]() |
acc8089bc2 | ||
![]() |
34636fa47e | ||
![]() |
003076e17c | ||
![]() |
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 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -45,5 +45,7 @@ CHANGES.dist
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
/[0-9]*.patch
|
||||
.dirstamp
|
||||
test-driver
|
||||
/build/
|
||||
/builds/
|
||||
|
@@ -3,6 +3,8 @@ language: c
|
||||
before_script:
|
||||
- ./buildconf
|
||||
|
||||
script: ./configure --enable-debug && make && make test-full
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
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,71 +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()
|
||||
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}")
|
||||
endif()
|
||||
if(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
endif()
|
||||
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()
|
||||
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()
|
||||
endif()
|
||||
endmacro()
|
@@ -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 "${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)
|
@@ -1,7 +1,10 @@
|
||||
#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.
|
||||
# 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})
|
||||
@@ -11,8 +14,11 @@ macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL 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_file("${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}")
|
||||
@@ -21,7 +27,7 @@ endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||
|
||||
# For other curl specific tests, use this macro.
|
||||
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
if("${CURL_TEST}" MATCHES "^${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)
|
||||
@@ -49,11 +55,11 @@ macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
endif(${CURL_TEST})
|
||||
endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||
endif()
|
||||
endmacro(CURL_INTERNAL_TEST)
|
||||
|
||||
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||
if(NOT DEFINED "${CURL_TEST}_COMPILE")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
@@ -85,5 +91,5 @@ macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
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$")
|
||||
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,8 +13,8 @@ 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)
|
||||
@@ -29,14 +24,12 @@ else(HAVE_WINDOWS_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")
|
||||
@@ -44,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}")
|
||||
@@ -72,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")
|
||||
@@ -94,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")
|
||||
@@ -107,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
|
||||
@@ -138,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")
|
||||
@@ -163,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)
|
||||
|
430
CMakeLists.txt
430
CMakeLists.txt
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2015, 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
|
||||
@@ -48,27 +48,17 @@ 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")
|
||||
@@ -84,12 +74,35 @@ 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)
|
||||
|
||||
option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF)
|
||||
option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF)
|
||||
|
||||
if (ENABLE_DEBUG)
|
||||
# DEBUGBUILD will be defined only for Debug builds
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUGBUILD>)
|
||||
else()
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUGBUILD)
|
||||
endif()
|
||||
set(ENABLE_CURLDEBUG ON)
|
||||
endif()
|
||||
|
||||
if (ENABLE_CURLDEBUG)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG)
|
||||
endif()
|
||||
|
||||
# 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})
|
||||
@@ -171,9 +184,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}")
|
||||
@@ -200,9 +256,22 @@ include (CheckCSourceCompiles)
|
||||
|
||||
# On windows preload settings
|
||||
if(WIN32)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
|
||||
endif(WIN32)
|
||||
|
||||
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)
|
||||
check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
|
||||
@@ -219,19 +288,49 @@ if(NOT NOT_NEED_LIBNSL)
|
||||
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
|
||||
endif(NOT NOT_NEED_LIBNSL)
|
||||
|
||||
check_function_exists(gethostname HAVE_GETHOSTNAME)
|
||||
|
||||
if(WIN32)
|
||||
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)
|
||||
|
||||
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_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("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
|
||||
check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
|
||||
check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H)
|
||||
check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H)
|
||||
check_include_file("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
|
||||
check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
|
||||
check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
|
||||
check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H)
|
||||
check_include_file("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)
|
||||
option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
|
||||
if(USE_WIN32_LDAP)
|
||||
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
||||
if(NOT HAVE_WLDAP32)
|
||||
set(CURL_LDAP_WIN OFF)
|
||||
set(USE_WIN32_LDAP OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -241,13 +340,14 @@ if(NOT CURL_DISABLE_LDAP)
|
||||
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")
|
||||
if(CMAKE_USE_OPENLDAP AND USE_WIN32_LDAP)
|
||||
message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at the same time")
|
||||
endif()
|
||||
|
||||
# Now that we know, we're not using windows LDAP...
|
||||
if(NOT CURL_LDAP_WIN)
|
||||
if(NOT USE_WIN32_LDAP)
|
||||
# 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()
|
||||
@@ -301,8 +401,8 @@ if(NOT CURL_DISABLE_LDAP)
|
||||
return 0;
|
||||
}"
|
||||
)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-DLDAP_DEPRECATED=1" "-DWIN32_LEAN_AND_MEAN")
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB})
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DLDAP_DEPRECATED=1")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB})
|
||||
if(HAVE_LIBLBER)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
|
||||
endif()
|
||||
@@ -336,9 +436,6 @@ check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
||||
# 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)
|
||||
@@ -350,39 +447,10 @@ if(CURL_ZLIB)
|
||||
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)
|
||||
|
||||
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(OPENSSL_FOUND)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
|
||||
#libSSH2
|
||||
option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
|
||||
mark_as_advanced(CMAKE_USE_LIBSSH2)
|
||||
@@ -396,6 +464,7 @@ if(CMAKE_USE_LIBSSH2)
|
||||
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)
|
||||
|
||||
@@ -416,20 +485,82 @@ if(CMAKE_USE_LIBSSH2)
|
||||
endif(LIBSSH2_FOUND)
|
||||
endif(CMAKE_USE_LIBSSH2)
|
||||
|
||||
# If we have features.h, then do the _BSD_SOURCE magic
|
||||
check_include_file("features.h" HAVE_FEATURES_H)
|
||||
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)
|
||||
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
|
||||
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
|
||||
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
|
||||
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
|
||||
endif(NOT UNIX)
|
||||
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||
if(NOT UNIX)
|
||||
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
|
||||
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
|
||||
endif(NOT UNIX)
|
||||
|
||||
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
|
||||
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
|
||||
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
|
||||
@@ -454,9 +585,6 @@ 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)
|
||||
@@ -576,6 +704,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)
|
||||
@@ -618,7 +752,6 @@ if(CMAKE_USE_OPENSSL)
|
||||
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
|
||||
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||
set(USE_OPENSSL 1)
|
||||
set(USE_SSLEAY 1)
|
||||
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
|
||||
@@ -639,6 +772,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)
|
||||
@@ -677,12 +811,7 @@ if(NOT HAVE_STRICMP)
|
||||
set(HAVE_LDAP_URL_PARSE 1)
|
||||
endif(NOT HAVE_STRICMP)
|
||||
|
||||
|
||||
|
||||
# Do curl specific tests
|
||||
if(HAVE_LIBWS2_32)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||
endif()
|
||||
foreach(CURL_TEST
|
||||
HAVE_FCNTL_O_NONBLOCK
|
||||
HAVE_IOCTLSOCKET
|
||||
@@ -869,24 +998,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})
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_LIBSSH2 AND LIBSSH2_FOUND)
|
||||
include_directories(${LIBSSH2_INCLUDE_DIR})
|
||||
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)
|
||||
@@ -911,6 +1022,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")
|
||||
|
25
CONTRIBUTING.md
Normal file
25
CONTRIBUTING.md
Normal file
@@ -0,0 +1,25 @@
|
||||
How to contribute to curl
|
||||
=========================
|
||||
|
||||
Join the community
|
||||
------------------
|
||||
|
||||
1. Click 'watch' on the github repo
|
||||
|
||||
2. Subscribe to the suitable [mailing lists](http://curl.haxx.se/mail/)
|
||||
|
||||
Read [docs/CONTRIBUTE](docs/CONTRIBUTE)
|
||||
---------------------------------------
|
||||
|
||||
Send your suggestions using one of these methods:
|
||||
-------------------------------------------------
|
||||
|
||||
1. in a mail to the mailing list
|
||||
|
||||
2. as a pull request on github
|
||||
|
||||
3. as an issue on github
|
||||
|
||||
|
||||
/ The cURL team!
|
||||
|
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.
|
||||
|
||||
|
@@ -94,7 +94,7 @@ if test ! -z $SDK32; then
|
||||
rm -r libcurl.framework
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
@@ -121,7 +121,7 @@ if test ! -z $SDK32; then
|
||||
|
||||
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
install_name_tool -id @rpath/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||
pwd
|
||||
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
|
98
Makefile.am
98
Makefile.am
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2015, 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
|
||||
@@ -24,100 +24,101 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||
CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
|
||||
CMake/CurlTests.c 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
|
||||
VC6_LIBDSP = projects/Windows/VC6/lib/libcurl.dsp.dist
|
||||
VC6_LIBDSP_DEPS = $(VC6_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC6_SRCTMPL = projects/Windows/VC6/src/curlsrc.tmpl
|
||||
VC6_SRCDSP = projects/Windows/VC6/src/curlsrc.dsp
|
||||
VC6_SRCDSP = projects/Windows/VC6/src/curlsrc.dsp.dist
|
||||
VC6_SRCDSP_DEPS = $(VC6_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC7_LIBTMPL = projects/Windows/VC7/lib/libcurl.tmpl
|
||||
VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj
|
||||
VC7_LIBVCPROJ = projects/Windows/VC7/lib/libcurl.vcproj.dist
|
||||
VC7_LIBVCPROJ_DEPS = $(VC7_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC7_SRCTMPL = projects/Windows/VC7/src/curlsrc.tmpl
|
||||
VC7_SRCVCPROJ = projects/Windows/VC7/src/curlsrc.vcproj
|
||||
VC7_SRCVCPROJ = projects/Windows/VC7/src/curlsrc.vcproj.dist
|
||||
VC7_SRCVCPROJ_DEPS = $(VC7_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC71_LIBTMPL = projects/Windows/VC7.1/lib/libcurl.tmpl
|
||||
VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj
|
||||
VC71_LIBVCPROJ = projects/Windows/VC7.1/lib/libcurl.vcproj.dist
|
||||
VC71_LIBVCPROJ_DEPS = $(VC71_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC71_SRCTMPL = projects/Windows/VC7.1/src/curlsrc.tmpl
|
||||
VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curlsrc.vcproj
|
||||
VC71_SRCVCPROJ = projects/Windows/VC7.1/src/curlsrc.vcproj.dist
|
||||
VC71_SRCVCPROJ_DEPS = $(VC71_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC8_LIBTMPL = projects/Windows/VC8/lib/libcurl.tmpl
|
||||
VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj
|
||||
VC8_LIBVCPROJ = projects/Windows/VC8/lib/libcurl.vcproj.dist
|
||||
VC8_LIBVCPROJ_DEPS = $(VC8_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC8_SRCTMPL = projects/Windows/VC8/src/curlsrc.tmpl
|
||||
VC8_SRCVCPROJ = projects/Windows/VC8/src/curlsrc.vcproj
|
||||
VC8_SRCVCPROJ = projects/Windows/VC8/src/curlsrc.vcproj.dist
|
||||
VC8_SRCVCPROJ_DEPS = $(VC8_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC9_LIBTMPL = projects/Windows/VC9/lib/libcurl.tmpl
|
||||
VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj
|
||||
VC9_LIBVCPROJ = projects/Windows/VC9/lib/libcurl.vcproj.dist
|
||||
VC9_LIBVCPROJ_DEPS = $(VC9_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC9_SRCTMPL = projects/Windows/VC9/src/curlsrc.tmpl
|
||||
VC9_SRCVCPROJ = projects/Windows/VC9/src/curlsrc.vcproj
|
||||
VC9_SRCVCPROJ = projects/Windows/VC9/src/curlsrc.vcproj.dist
|
||||
VC9_SRCVCPROJ_DEPS = $(VC9_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC10_LIBTMPL = projects/Windows/VC10/lib/libcurl.tmpl
|
||||
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj
|
||||
VC10_LIBVCXPROJ = projects/Windows/VC10/lib/libcurl.vcxproj.dist
|
||||
VC10_LIBVCXPROJ_DEPS = $(VC10_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC10_SRCTMPL = projects/Windows/VC10/src/curlsrc.tmpl
|
||||
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curlsrc.vcxproj
|
||||
VC10_SRCVCXPROJ = projects/Windows/VC10/src/curlsrc.vcxproj.dist
|
||||
VC10_SRCVCXPROJ_DEPS = $(VC10_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC11_LIBTMPL = projects/Windows/VC11/lib/libcurl.tmpl
|
||||
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj
|
||||
VC11_LIBVCXPROJ = projects/Windows/VC11/lib/libcurl.vcxproj.dist
|
||||
VC11_LIBVCXPROJ_DEPS = $(VC11_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC11_SRCTMPL = projects/Windows/VC11/src/curlsrc.tmpl
|
||||
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curlsrc.vcxproj
|
||||
VC11_SRCVCXPROJ = projects/Windows/VC11/src/curlsrc.vcxproj.dist
|
||||
VC11_SRCVCXPROJ_DEPS = $(VC11_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC12_LIBTMPL = projects/Windows/VC12/lib/libcurl.tmpl
|
||||
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj
|
||||
VC12_LIBVCXPROJ = projects/Windows/VC12/lib/libcurl.vcxproj.dist
|
||||
VC12_LIBVCXPROJ_DEPS = $(VC12_LIBTMPL) Makefile.am lib/Makefile.inc
|
||||
VC12_SRCTMPL = projects/Windows/VC12/src/curlsrc.tmpl
|
||||
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curlsrc.vcxproj
|
||||
VC12_SRCVCXPROJ = projects/Windows/VC12/src/curlsrc.vcxproj.dist
|
||||
VC12_SRCVCXPROJ_DEPS = $(VC12_SRCTMPL) Makefile.am src/Makefile.inc
|
||||
|
||||
VC_DIST = projects/README \
|
||||
projects/build-openssl.bat \
|
||||
projects/Windows/VC6/curl.dsw \
|
||||
projects/Windows/VC6/lib/libcurl.dsw $(VC6_LIBDSP) \
|
||||
projects/Windows/VC6/src/curlsrc.dsw $(VC6_SRCDSP) \
|
||||
projects/Windows/VC7/curl.sln \
|
||||
projects/Windows/VC7/lib/libcurl.sln $(VC7_LIBVCPROJ) \
|
||||
projects/Windows/VC7/src/curlsrc.sln $(VC7_SRCVCPROJ) \
|
||||
projects/Windows/VC7.1/curl.sln \
|
||||
projects/Windows/VC7.1/lib/libcurl.sln $(VC71_LIBVCPROJ) \
|
||||
projects/Windows/VC7.1/src/curlsrc.sln $(VC71_SRCVCPROJ) \
|
||||
projects/Windows/VC8/curl.sln \
|
||||
projects/Windows/VC8/lib/libcurl.sln $(VC8_LIBVCPROJ) \
|
||||
projects/Windows/VC8/src/curlsrc.sln $(VC8_SRCVCPROJ) \
|
||||
projects/Windows/VC9/curl.sln \
|
||||
projects/Windows/VC9/lib/libcurl.sln $(VC9_LIBVCPROJ) \
|
||||
projects/Windows/VC9/src/curlsrc.sln $(VC9_SRCVCPROJ) \
|
||||
projects/Windows/VC10/curl.sln \
|
||||
projects/Windows/VC10/lib/libcurl.sln $(VC10_LIBVCXPROJ) \
|
||||
projects/Windows/VC10/src/curlsrc.sln $(VC10_SRCVCXPROJ) \
|
||||
projects/Windows/VC11/curl.sln \
|
||||
projects/Windows/VC11/lib/libcurl.sln $(VC11_LIBVCXPROJ) \
|
||||
projects/Windows/VC11/src/curlsrc.sln $(VC11_SRCVCXPROJ) \
|
||||
projects/Windows/VC12/curl.sln \
|
||||
projects/Windows/VC12/lib/libcurl.sln $(VC12_LIBVCXPROJ) \
|
||||
projects/Windows/VC12/src/curlsrc.sln $(VC12_SRCVCXPROJ)
|
||||
projects/checksrc.bat \
|
||||
projects/Windows/VC6/curl-all.dsw \
|
||||
projects/Windows/VC6/lib/libcurl.dsw \
|
||||
projects/Windows/VC6/src/curlsrc.dsw \
|
||||
projects/Windows/VC7/curl-all.sln \
|
||||
projects/Windows/VC7/lib/libcurl.sln \
|
||||
projects/Windows/VC7/src/curlsrc.sln \
|
||||
projects/Windows/VC7.1/curl-all.sln \
|
||||
projects/Windows/VC7.1/lib/libcurl.sln \
|
||||
projects/Windows/VC7.1/src/curlsrc.sln \
|
||||
projects/Windows/VC8/curl-all.sln \
|
||||
projects/Windows/VC8/lib/libcurl.sln \
|
||||
projects/Windows/VC8/src/curlsrc.sln \
|
||||
projects/Windows/VC9/curl-all.sln \
|
||||
projects/Windows/VC9/lib/libcurl.sln \
|
||||
projects/Windows/VC9/src/curlsrc.sln \
|
||||
projects/Windows/VC10/curl-all.sln \
|
||||
projects/Windows/VC10/lib/libcurl.sln \
|
||||
projects/Windows/VC10/src/curlsrc.sln \
|
||||
projects/Windows/VC11/curl-all.sln \
|
||||
projects/Windows/VC11/lib/libcurl.sln \
|
||||
projects/Windows/VC11/src/curlsrc.sln \
|
||||
projects/Windows/VC12/curl-all.sln \
|
||||
projects/Windows/VC12/lib/libcurl.sln \
|
||||
projects/Windows/VC12/src/curlsrc.sln
|
||||
|
||||
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
|
||||
winbuild/MakefileBuild.vc winbuild/Makefile.vc \
|
||||
winbuild/Makefile.msvc.names
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework \
|
||||
RELEASE-NOTES buildconf libcurl.pc.in MacOSX-Framework scripts/zsh.pl \
|
||||
$(CMAKE_DIST) $(VC_DIST) $(WINBUILD_DIST) lib/libcurl.vers.in
|
||||
|
||||
CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
|
||||
@@ -152,7 +153,7 @@ html:
|
||||
pdf:
|
||||
cd docs; make pdf
|
||||
|
||||
check: test examples
|
||||
check: test examples check-docs
|
||||
|
||||
if CROSSCOMPILING
|
||||
test-full: test
|
||||
@@ -180,6 +181,9 @@ endif
|
||||
examples:
|
||||
@(cd docs/examples; $(MAKE) check)
|
||||
|
||||
check-docs:
|
||||
@(cd docs/libcurl; $(MAKE) check)
|
||||
|
||||
# This is a hook to have 'make clean' also clean up the docs and the tests
|
||||
# dir. The extra check for the Makefiles being present is necessary because
|
||||
# 'make distcheck' will make clean first in these directories _before_ it runs
|
||||
|
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
|
||||
|
4
README
4
README
@@ -38,12 +38,12 @@ GIT
|
||||
|
||||
To download the very latest source off the GIT server do this:
|
||||
|
||||
git clone git://github.com/bagder/curl.git
|
||||
git clone https://github.com/bagder/curl.git
|
||||
|
||||
(you'll get a directory named curl created, filled with the source code)
|
||||
|
||||
NOTICE
|
||||
|
||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||
Kungliga Tekniska H<EFBFBD>gskolan. This notice is included here to comply with the
|
||||
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||
distribution terms.
|
||||
|
126
RELEASE-NOTES
126
RELEASE-NOTES
@@ -1,92 +1,19 @@
|
||||
Curl and libcurl 7.38.0
|
||||
Curl and libcurl 7.44.0
|
||||
|
||||
Public curl releases: 141
|
||||
Command line options: 162
|
||||
curl_easy_setopt() options: 208
|
||||
Public curl releases: 148
|
||||
Command line options: 176
|
||||
curl_easy_setopt() options: 219
|
||||
Public functions in libcurl: 58
|
||||
Contributors: 1216
|
||||
Contributors: 1291
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o CURLE_HTTP2 is a new error code
|
||||
o CURLAUTH_NEGOTIATE is a new auth define
|
||||
o CURL_VERSION_GSSAPI is a new capability bit
|
||||
o no longer use fbopenssl for anything
|
||||
o schannel: use CryptGenRandom for random numbers
|
||||
o axtls: define curlssl_random using axTLS's PRNG
|
||||
o cyassl: use RNG_GenerateBlock to generate a good random number
|
||||
o findprotocol: show unsupported protocol within quotes
|
||||
o version: detect and show LibreSSL
|
||||
o version: detect and show BoringSSL
|
||||
o imap/pop3/smtp: Kerberos (SASL GSSAPI) authentication via Windows SSPI
|
||||
o http2: requires nghttp2 0.6.0 or later
|
||||
o
|
||||
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o CVE-2014-3613: cookie leak with IP address as domain [25]
|
||||
o CVE-2014-3620: cookie leak for TLDs [26]
|
||||
|
||||
o fix a build failure on Debian when NSS support is enabled [1]
|
||||
o HTTP/2: fixed compiler warnings when built disabled [2]
|
||||
o cyassl: return the correct error code on no CA cert
|
||||
o http: Deprecate GSS-Negotiate macros due to bad naming
|
||||
o http: Fixed Negotiate: authentication
|
||||
o multi: Improve proxy CONNECT performance (regression) [3]
|
||||
o ntlm_wb: Avoid invoking ntlm_auth helper with empty username
|
||||
o ntlm_wb: Fix hard-coded limit on NTLM auth packet size
|
||||
o url.c: use the preferred symbol name: *READDATA [4]
|
||||
o smtp: fixed a segfault during test 1320 torture test
|
||||
o cyassl: made it compile with version 2.0.6 again
|
||||
o nss: do not check the version of NSS at run time
|
||||
o c-ares: fix build without IPv6 support [5]
|
||||
o HTTP/2: use base64url encoding [6]
|
||||
o SSPI Negotiate: Fix 3 memory leaks
|
||||
o libtest: fixed duplicated line in Makefile [7]
|
||||
o conncache: fix compiler warning [8]
|
||||
o openssl: make ossl_send return CURLE_OK better
|
||||
o HTTP/2: Support expect: 100-continue
|
||||
o HTTP/2: Fix infinite loop in readwrite_data()
|
||||
o parsedate: fix the return code for an overflow edge condition
|
||||
o darwinssl: don't use strtok()
|
||||
o http_negotiate_sspi: Fixed specific username and password not working [9]
|
||||
o openssl: replace call to OPENSSL_config [10]
|
||||
o http2: show the received header for better debugging
|
||||
o HTTP/2: Move :authority before non-pseudo header fields
|
||||
o HTTP/2: Reset promised stream, not its associated stream
|
||||
o HTTP/2: added some more logging for debugging stream problems
|
||||
o ntlm: Added support for SSPI package info query
|
||||
o ntlm: Fixed hard coded buffer for SSPI based auth packet generation
|
||||
o sasl_sspi: Fixed memory leak with not releasing Package Info struct
|
||||
o sasl_sspi: Fixed SPN not being converted to wchar under Unicode builds
|
||||
o sasl: Use a dynamic buffer for DIGEST-MD5 SPN generation
|
||||
o http_negotiate_sspi: Use a dynamic buffer for SPN generation
|
||||
o sasl_sspi: Fixed missing free of challenge buffer on SPN failure
|
||||
o sasl_sspi: Fixed hard coded buffer for response generation
|
||||
o Curl_poll + Curl_wait_ms: fix timeout return value
|
||||
o docs/SSLCERTS: update the section about NSS database
|
||||
o create_conn: prune dead connections [11]
|
||||
o openssl: fix version report for the 0.9.8 branch
|
||||
o mk-ca-bundle.pl: switched to using hg.mozilla.org [12]
|
||||
o http: fix the Content-Range: parser [13]
|
||||
o Curl_disconnect: don't free the URL [14]
|
||||
o win32: Fixed WinSock 2 #if [15]
|
||||
o NTLM: ignore CURLOPT_FORBID_REUSE during NTLM HTTP auth
|
||||
o curl.1: clarify --limit-rate's effect on both directions [16]
|
||||
o disconnect: don't touch easy-related state on disconnects [17]
|
||||
o Cmake: big cleanup and numerous fixes
|
||||
o HTTP/2: supports draft-14 - moved :headers before the non-psuedo headers
|
||||
o HTTP/2: Reset promised stream, not its associated stream
|
||||
o configure.ac: Add support for recent GSS-API implementations for HP-UX
|
||||
o CONNECT: close proxy connections that fail [18]
|
||||
o CURLOPT_NOBODY.3: clarify this option is for downloads [19]
|
||||
o darwinssl: fix CA certificate checking using PEM format [20]
|
||||
o resolve: cache lookup for async resolvers [21]
|
||||
o low-speed-limit: avoid timeout flood [22]
|
||||
o polarssl: implement CURLOPT_SSLVERSION [23]
|
||||
o multi: convert CURLM_STATE_CONNECT_PEND handling to a list [24]
|
||||
o curl_multi_cleanup: remove superfluous NULL assigns
|
||||
o polarssl: support CURLOPT_CAPATH / --capath
|
||||
o progress: size_dl/size_ul are always >= 0, and clear "KNOWN" properly
|
||||
o
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -95,43 +22,10 @@ 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, Andre Heinecke, Anthon Pang, Askar Safin, Brandon Casey,
|
||||
Catalin Patulea, Dan Fandrich, Daniel Stenberg, Dave Reisner, David Meyer,
|
||||
David Shaw, David Woodhouse, Dimitrios Siganos, Ed Morley, Fabian Keil,
|
||||
Florian Weimer, Frank Gevaerts, Frank Meier, Haris Okanovic, Jakub Zakrzewski,
|
||||
Jan Ehrhardt, John Coffey, Jonatan Vela, Jose Alf, Kamil Dudka,
|
||||
Leonardo Rosati, Marcel Raad, Michael Osipov, Michael Wallner, Paras S,
|
||||
Patrick Monnerat, Paul Saab, Peter Wang, Rafaël Carré, Sergey Nikulov,
|
||||
Spork Schivago, Steve Holme, Tatsuhiro Tsujikawa, Tim Ruehsen, Toby Peterson,
|
||||
Vilmos Nebehaj,
|
||||
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
References to bug reports and discussions on issues:
|
||||
|
||||
[1] = http://curl.haxx.se/mail/lib-2014-07/0209.html
|
||||
[2] = http://curl.haxx.se/mail/lib-2014-07/0202.html
|
||||
[3] = http://curl.haxx.se/bug/view.cgi?id=1397
|
||||
[4] = http://curl.haxx.se/bug/view.cgi?id=1398
|
||||
[5] = http://curl.haxx.se/mail/lib-2014-07/0337.html
|
||||
[6] = https://github.com/tatsuhiro-t/nghttp2/issues/62
|
||||
[7] = https://github.com/bagder/curl/pull/105
|
||||
[8] = http://curl.haxx.se/bug/view.cgi?id=1399
|
||||
[9] = http://curl.haxx.se/mail/lib-2014-06/0224.html
|
||||
[10] = http://curl.haxx.se/bug/view.cgi?id=1401
|
||||
[11] = http://curl.haxx.se/mail/lib-2014-06/0189.html
|
||||
[12] = http://curl.haxx.se/bug/view.cgi?id=1409
|
||||
[13] = http://curl.haxx.se/mail/lib-2014-06/0221.html
|
||||
[14] = http://curl.haxx.se/mail/lib-2014-08/0148.html
|
||||
[15] = http://curl.haxx.se/mail/lib-2014-08/0155.html
|
||||
[16] = http://curl.haxx.se/bug/view.cgi?id=1414
|
||||
[17] = http://curl.haxx.se/mail/lib-2014-08/0148.html
|
||||
[18] = http://curl.haxx.se/bug/view.cgi?id=1381
|
||||
[19] = http://curl.haxx.se/mail/lib-2014-08/0236.html
|
||||
[20] = https://github.com/bagder/curl/pull/115
|
||||
[21] = https://github.com/bagder/curl/pull/112
|
||||
[22] = http://curl.haxx.se/mail/lib-2014-06/0235.html
|
||||
[23] = http://curl.haxx.se/bug/view.cgi?id=1419
|
||||
[24] = http://curl.haxx.se/mail/lib-2014-07/0206.html
|
||||
[25] = http://curl.haxx.se/docs/adv_20140910A.html
|
||||
[26] = http://curl.haxx.se/docs/adv_20140910B.html
|
||||
[1] =
|
||||
|
@@ -1,4 +0,0 @@
|
||||
To be addressed in ...
|
||||
=======================
|
||||
|
||||
327 -
|
30
acinclude.m4
30
acinclude.m4
@@ -2452,23 +2452,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [
|
||||
])
|
||||
|
||||
|
||||
# This is only a temporary fix. This macro is here to replace the broken one
|
||||
# delivered by the automake project (including the 1.9.6 release). As soon as
|
||||
# they ship a working version we SHOULD remove this work-around.
|
||||
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} \"$am_aux_dir/missing\""
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_VERIFY_RUNTIMELIBS
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify that the shared libs found so far can be used when running
|
||||
@@ -2607,15 +2590,16 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
|
||||
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
|
||||
dnl both given
|
||||
AC_MSG_ERROR([Can't specify both --with-ca-bundle and --with-ca-path.])
|
||||
ca="$want_ca"
|
||||
capath="$want_capath"
|
||||
elif test "x$want_ca" != "xno" -a "x$want_ca" != "xunset"; then
|
||||
dnl --with-ca-bundle given
|
||||
ca="$want_ca"
|
||||
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$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then
|
||||
AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL])
|
||||
fi
|
||||
capath="$want_capath"
|
||||
ca="no"
|
||||
@@ -2669,11 +2653,13 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [Location of default ca bundle])
|
||||
AC_SUBST(CURL_CA_BUNDLE)
|
||||
AC_MSG_RESULT([$ca])
|
||||
elif test "x$capath" != "xno"; then
|
||||
fi
|
||||
if test "x$capath" != "xno"; then
|
||||
CURL_CA_PATH="\"$capath\""
|
||||
AC_DEFINE_UNQUOTED(CURL_CA_PATH, "$capath", [Location of default ca path])
|
||||
AC_MSG_RESULT([$capath (capath)])
|
||||
else
|
||||
fi
|
||||
if test "x$ca" = "xno" && test "x$capath" = "xno"; then
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
51
buildconf
51
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
|
||||
@@ -333,6 +318,8 @@ for fname in .deps \
|
||||
ltsugar.m4 \
|
||||
ltversion.m4 \
|
||||
lt~obsolete.m4 \
|
||||
missing \
|
||||
install-sh \
|
||||
stamp-h1 \
|
||||
stamp-h2 \
|
||||
stamp-h3 ; do
|
||||
@@ -344,7 +331,7 @@ done
|
||||
#
|
||||
|
||||
echo "buildconf: running libtoolize"
|
||||
${libtoolize} --copy --automake --force || die "libtoolize command failed"
|
||||
${libtoolize} --copy --force || die "libtoolize command failed"
|
||||
|
||||
# When using libtool 1.5.X (X < 26) we copy libtool.m4 to our local m4
|
||||
# subdirectory and this local copy is patched to fix some warnings that
|
||||
|
335
configure.ac
335
configure.ac
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2015, 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
|
||||
@@ -154,6 +154,7 @@ dnl initialize all the info variables
|
||||
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)"
|
||||
@@ -574,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])
|
||||
@@ -1029,7 +1046,7 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||
|
||||
if test "$LDAPLIBNAME" = "wldap32"; then
|
||||
curl_ldap_msg="enabled (winldap)"
|
||||
AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
|
||||
AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
|
||||
else
|
||||
curl_ldap_msg="enabled (OpenLDAP)"
|
||||
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
|
||||
@@ -1047,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)
|
||||
@@ -1167,6 +1184,8 @@ AC_ARG_WITH(gssapi,
|
||||
fi
|
||||
])
|
||||
|
||||
: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
|
||||
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_MSG_CHECKING([if GSS-API support is requested])
|
||||
if test x"$want_gss" = xyes; then
|
||||
@@ -1175,8 +1194,8 @@ if test x"$want_gss" = xyes; then
|
||||
if test -z "$GSSAPI_INCS"; then
|
||||
if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
|
||||
GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
|
||||
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then
|
||||
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
|
||||
elif test -f "$KRB5CONFIG"; then
|
||||
GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
|
||||
elif test "$GSSAPI_ROOT" != "yes"; then
|
||||
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
|
||||
fi
|
||||
@@ -1266,10 +1285,10 @@ if test x"$want_gss" = xyes; then
|
||||
dnl into LIBS
|
||||
gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
|
||||
LIBS="$gss_libs $LIBS"
|
||||
elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then
|
||||
elif test -f "$KRB5CONFIG"; then
|
||||
dnl krb5-config doesn't have --libs-only-L or similar, put everything
|
||||
dnl into LIBS
|
||||
gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
|
||||
gss_libs=`$KRB5CONFIG --libs gssapi`
|
||||
LIBS="$gss_libs $LIBS"
|
||||
else
|
||||
case $host in
|
||||
@@ -1434,6 +1453,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
|
||||
$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
|
||||
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
|
||||
AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
|
||||
AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
|
||||
@@ -1510,7 +1530,7 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
|
||||
else
|
||||
|
||||
dnl Have the libraries--check for SSLeay/OpenSSL headers
|
||||
dnl Have the libraries--check for OpenSSL headers
|
||||
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
|
||||
openssl/pem.h openssl/ssl.h openssl/err.h,
|
||||
curl_ssl_msg="enabled (OpenSSL)"
|
||||
@@ -1534,17 +1554,11 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
fi
|
||||
|
||||
if test X"$OPENSSL_ENABLED" = X"1"; then
|
||||
AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
|
||||
|
||||
dnl is there a pkcs12.h header present?
|
||||
AC_CHECK_HEADERS(openssl/pkcs12.h)
|
||||
else
|
||||
LIBS="$CLEANLIBS"
|
||||
fi
|
||||
dnl USE_SSLEAY is the historical name for what configure calls
|
||||
dnl OPENSSL_ENABLED; the names should really be unified
|
||||
USE_SSLEAY="$OPENSSL_ENABLED"
|
||||
AC_SUBST(USE_SSLEAY)
|
||||
|
||||
if test X"$OPT_SSL" != Xoff &&
|
||||
test "$OPENSSL_ENABLED" != "1"; then
|
||||
@@ -1561,8 +1575,11 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
|
||||
])
|
||||
|
||||
dnl these can only exist if openssl exists
|
||||
dnl yassl doesn't have SSL_get_shutdown
|
||||
dnl These can only exist if OpenSSL exists
|
||||
dnl Older versions of Cyassl (some time before 2.9.4) don't have
|
||||
dnl SSL_get_shutdown (but this check won't actually detect it there
|
||||
dnl as it's a macro that needs the header files be included)
|
||||
dnl BoringSSL doesn't have DES_set_odd_parity
|
||||
|
||||
AC_CHECK_FUNCS( RAND_status \
|
||||
RAND_screen \
|
||||
@@ -1571,30 +1588,29 @@ if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
|
||||
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 )
|
||||
DES_set_odd_parity )
|
||||
|
||||
dnl Make an attempt to detect if this is actually yassl's headers and
|
||||
dnl OpenSSL emulation layer. We still leave everything else believing
|
||||
dnl and acting like OpenSSL.
|
||||
|
||||
AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
|
||||
AC_MSG_CHECKING([for BoringSSL])
|
||||
if test "x$ac_cv_func_DES_set_odd_parity" != "xyes"; then
|
||||
curl_ssl_msg="enabled (BoringSSL)"
|
||||
AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
|
||||
[Define to 1 if using BoringSSL.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_MSG_CHECKING([for libressl])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/opensslv.h>
|
||||
]],[[
|
||||
#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
|
||||
int dummy = SSL_ERROR_NONE;
|
||||
#else
|
||||
Not the yaSSL OpenSSL compatibility header.
|
||||
#endif
|
||||
int dummy = LIBRESSL_VERSION_NUMBER;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
|
||||
[Define to 1 if using yaSSL in OpenSSL compatibility mode.])
|
||||
curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
|
||||
AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
|
||||
[Define to 1 if using libressl.])
|
||||
curl_ssl_msg="enabled (libressl)"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
@@ -1658,8 +1674,8 @@ dnl ---
|
||||
if test "$OPENSSL_ENABLED" = "1"; then
|
||||
AC_CHECK_LIB(crypto, SRP_Calc_client_key,
|
||||
[
|
||||
AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
|
||||
AC_SUBST(HAVE_SSLEAY_SRP, [1])
|
||||
AC_DEFINE(HAVE_OPENSSL_SRP, 1, [if you have the function SRP_Calc_client_key])
|
||||
AC_SUBST(HAVE_OPENSSL_SRP, [1])
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -1929,6 +1945,10 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
OPT_CYASSL=""
|
||||
fi
|
||||
|
||||
dnl This should be reworked to use pkg-config instead
|
||||
|
||||
cyassllibname=cyassl
|
||||
|
||||
if test -z "$OPT_CYASSL" ; then
|
||||
dnl check for lib in system default first
|
||||
|
||||
@@ -1970,19 +1990,70 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
[
|
||||
CPPFLAGS=$_cppflags
|
||||
LDFLAGS=$_ldflags
|
||||
cyassllib=""
|
||||
])
|
||||
fi
|
||||
|
||||
addld=""
|
||||
addlib=""
|
||||
addcflags=""
|
||||
|
||||
if test "x$USE_CYASSL" != "xyes"; then
|
||||
dnl libcyassl renamed to libwolfssl as of 3.4.0
|
||||
addld=-L$OPT_CYASSL/lib$libsuff
|
||||
addcflags=-I$OPT_CYASSL/include
|
||||
cyassllib=$OPT_CYASSL/lib$libsuff
|
||||
|
||||
LDFLAGS="$LDFLAGS $addld"
|
||||
if test "$addcflags" != "-I/usr/include"; then
|
||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||
fi
|
||||
|
||||
cyassllibname=wolfssl
|
||||
my_ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$cyassllibname -lm $LIBS"
|
||||
|
||||
AC_MSG_CHECKING([for CyaSSL_Init in -lwolfssl])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
/* These aren't needed for detection and confuse WolfSSL.
|
||||
They are set up properly later if it is detected. */
|
||||
#undef SIZEOF_LONG
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#include <cyassl/ssl.h>
|
||||
]],[[
|
||||
return CyaSSL_Init();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
|
||||
AC_SUBST(USE_CYASSL, [1])
|
||||
CYASSL_ENABLED=1
|
||||
USE_CYASSL="yes"
|
||||
curl_ssl_msg="enabled (CyaSSL)"
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
CPPFLAGS=$_cppflags
|
||||
LDFLAGS=$_ldflags
|
||||
cyassllib=""
|
||||
])
|
||||
LIBS="$my_ac_save_LIBS"
|
||||
fi
|
||||
|
||||
if test "x$USE_CYASSL" = "xyes"; then
|
||||
AC_MSG_NOTICE([detected CyaSSL])
|
||||
|
||||
dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
|
||||
dnl Versions since at least 2.6.0 may have options.h
|
||||
AC_CHECK_HEADERS(cyassl/options.h)
|
||||
|
||||
dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
|
||||
AC_CHECK_HEADERS(cyassl/error-ssl.h)
|
||||
|
||||
LIBS="-lcyassl -lm $LIBS"
|
||||
LIBS="-l$cyassllibname -lm $LIBS"
|
||||
|
||||
if test -n "$cyassllib"; then
|
||||
dnl when shared libs were found in a path that the run-time
|
||||
@@ -2049,57 +2120,73 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# Without pkg-config, we'll kludge in some defaults
|
||||
addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||
addcflags="-I$OPT_NSS/include"
|
||||
version="unknown"
|
||||
nssprefix=$OPT_NSS
|
||||
fi
|
||||
|
||||
if test -n "$addlib"; then
|
||||
|
||||
CLEANLIBS="$LIBS"
|
||||
CLEANCPPFLAGS="$CPPFLAGS"
|
||||
|
||||
LIBS="$addlib $LIBS"
|
||||
if test "$addcflags" != "-I/usr/include"; then
|
||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||
fi
|
||||
|
||||
dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
|
||||
AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
|
||||
[
|
||||
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
|
||||
AC_SUBST(USE_NSS, [1])
|
||||
USE_NSS="yes"
|
||||
NSS_ENABLED=1
|
||||
curl_ssl_msg="enabled (NSS)"
|
||||
],
|
||||
[
|
||||
LIBS="$CLEANLIBS"
|
||||
CPPFLAGS="$CLEANCPPFLAGS"
|
||||
])
|
||||
|
||||
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
|
||||
dnl due to this
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
|
||||
export LD_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
|
||||
NSS_PCDIR="$OPT_NSS/lib/pkgconfig"
|
||||
if test -f "$NSS_PCDIR/nss.pc"; then
|
||||
CURL_CHECK_PKGCONFIG(nss, [$NSS_PCDIR])
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
addld=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-L nss`
|
||||
addlib=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --libs-only-l nss`
|
||||
addcflags=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --cflags nss`
|
||||
version=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --modversion nss`
|
||||
nssprefix=`CURL_EXPORT_PCDIR([$NSS_PCDIR]) $PKGCONFIG --variable=prefix nss`
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test -z "$addlib"; then
|
||||
# Without pkg-config, we'll kludge in some defaults
|
||||
AC_MSG_WARN([Using hard-wired libraries and compilation flags for NSS.])
|
||||
addld="-L$OPT_NSS/lib"
|
||||
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
|
||||
addcflags="-I$OPT_NSS/include"
|
||||
version="unknown"
|
||||
nssprefix=$OPT_NSS
|
||||
fi
|
||||
|
||||
CLEANLDFLAGS="$LDFLAGS"
|
||||
CLEANLIBS="$LIBS"
|
||||
CLEANCPPFLAGS="$CPPFLAGS"
|
||||
|
||||
LDFLAGS="$addld $LDFLAGS"
|
||||
LIBS="$addlib $LIBS"
|
||||
if test "$addcflags" != "-I/usr/include"; then
|
||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||
fi
|
||||
|
||||
dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
|
||||
AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
|
||||
[
|
||||
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
|
||||
AC_SUBST(USE_NSS, [1])
|
||||
USE_NSS="yes"
|
||||
NSS_ENABLED=1
|
||||
curl_ssl_msg="enabled (NSS)"
|
||||
],
|
||||
[
|
||||
LDFLAGS="$CLEANLDFLAGS"
|
||||
LIBS="$CLEANLIBS"
|
||||
CPPFLAGS="$CLEANCPPFLAGS"
|
||||
])
|
||||
|
||||
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
|
||||
dnl due to this
|
||||
if test "x$cross_compiling" != "xyes"; then
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
|
||||
export LD_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
|
||||
fi
|
||||
|
||||
fi dnl NSS found
|
||||
|
||||
fi dnl NSS not disabled
|
||||
|
||||
fi dnl curl_ssl_msg = init_ssl_msg
|
||||
@@ -2335,12 +2422,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
|
||||
@@ -2760,7 +2841,9 @@ if test X"$want_h2" != Xno; then
|
||||
CPPFLAGS="$CPPFLAGS $CPP_H2"
|
||||
LIBS="$LIB_H2 $LIBS"
|
||||
|
||||
AC_CHECK_LIB(nghttp2, nghttp2_session_callbacks_set_send_callback,
|
||||
# use nghttp2_option_set_no_recv_client_magic to require nghttp2
|
||||
# >= 1.0.0
|
||||
AC_CHECK_LIB(nghttp2, nghttp2_option_set_no_recv_client_magic,
|
||||
[
|
||||
AC_CHECK_HEADERS(nghttp2/nghttp2.h,
|
||||
curl_h2_msg="enabled (nghttp2)"
|
||||
@@ -3260,12 +3343,45 @@ AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
|
||||
want_tls_srp=yes
|
||||
)
|
||||
|
||||
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
|
||||
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
|
||||
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
|
||||
USE_TLS_SRP=1
|
||||
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
|
||||
@@ -3341,7 +3457,7 @@ dnl For keeping supported features and protocols also in pkg-config file
|
||||
dnl since it is more cross-compile friendly than curl-config
|
||||
dnl
|
||||
|
||||
if test "x$USE_SSLEAY" = "x1"; then
|
||||
if test "x$OPENSSL_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
|
||||
elif test -n "$SSL_ENABLED"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
|
||||
@@ -3349,6 +3465,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
|
||||
@@ -3371,17 +3490,24 @@ if test "x$CURL_DISABLE_CRYPTO_AUTH" != "x1" -a \
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
|
||||
fi
|
||||
|
||||
if test "x$CURL_DISABLE_HTTP" != "x1" -a \
|
||||
"x$CURL_DISABLE_CRYPTO_AUTH" != "x1"; then
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||
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$OPENSSL_ENABLED" = "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
|
||||
@@ -3441,6 +3567,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$OPENSSL_ENABLED" = "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
|
||||
@@ -3539,7 +3675,8 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
GSS-API support: ${curl_gss_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}
|
||||
|
@@ -71,7 +71,7 @@ while test $# -gt 0; do
|
||||
;;
|
||||
|
||||
--ca)
|
||||
echo "@CURL_CA_BUNDLE@"
|
||||
echo @CURL_CA_BUNDLE@
|
||||
;;
|
||||
|
||||
--cc)
|
||||
|
@@ -50,7 +50,7 @@ Cocoa
|
||||
D
|
||||
|
||||
Written by Kenneth Bogert
|
||||
http://curl.haxx.se/libcurl/d/
|
||||
http://dlang.org/library/std/net/curl.html
|
||||
|
||||
Dylan
|
||||
|
||||
@@ -60,7 +60,7 @@ Dylan
|
||||
Eiffel
|
||||
|
||||
Written by Eiffel Software
|
||||
http://curl.haxx.se/libcurl/eiffel/
|
||||
https://room.eiffel.com/library/curl
|
||||
|
||||
Euphoria
|
||||
|
||||
@@ -78,7 +78,7 @@ Ferite
|
||||
|
||||
Gambas
|
||||
|
||||
http://gambas.sourceforge.net
|
||||
http://gambas.sourceforge.net/
|
||||
|
||||
glib/GTK+
|
||||
|
||||
@@ -90,6 +90,11 @@ Guile:
|
||||
Written by Michael L. Gran
|
||||
http://www.lonelycactus.com/guile-curl.html
|
||||
|
||||
Harbour
|
||||
|
||||
Written by Viktor Szakáts
|
||||
https://github.com/vszakats/harbour-core/tree/master/contrib/hbcurl
|
||||
|
||||
Haskell
|
||||
|
||||
Written by Galois, Inc
|
||||
@@ -97,8 +102,7 @@ Haskell
|
||||
|
||||
Java
|
||||
|
||||
Maintained by [blank]
|
||||
http://curl.haxx.se/libcurl/java/
|
||||
https://github.com/pjlegato/curl-java
|
||||
|
||||
Julia
|
||||
|
||||
@@ -115,7 +119,7 @@ Lua
|
||||
luacurl by Alexander Marinov
|
||||
http://luacurl.luaforge.net/
|
||||
|
||||
Lua-cURL by J<EFBFBD>rgen H<EFBFBD>tzel
|
||||
Lua-cURL by Jürgen Hötzel
|
||||
http://luaforge.net/projects/lua-curl/
|
||||
|
||||
Mono
|
||||
@@ -126,7 +130,12 @@ Mono
|
||||
.NET
|
||||
|
||||
libcurl-net by Jeffrey Phillips
|
||||
http://sourceforge.net/projects/libcurl-net/
|
||||
https://sourceforge.net/projects/libcurl-net/
|
||||
|
||||
node.js
|
||||
|
||||
node-libcurl by Jonathan Cardoso Machado
|
||||
https://github.com/JCMais/node-libcurl
|
||||
|
||||
Object-Pascal
|
||||
|
||||
@@ -136,7 +145,7 @@ Object-Pascal
|
||||
O'Caml
|
||||
|
||||
Written by Lars Nilsson
|
||||
http://sourceforge.net/projects/ocurl/
|
||||
https://sourceforge.net/projects/ocurl/
|
||||
|
||||
Pascal
|
||||
|
||||
@@ -145,13 +154,13 @@ Pascal
|
||||
|
||||
Perl
|
||||
|
||||
Maintained by Cris Bailiff
|
||||
http://curl.haxx.se/libcurl/perl/
|
||||
Maintained by Cris Bailiff and Bálint Szilakszi
|
||||
https://github.com/szbalint/WWW--Curl
|
||||
|
||||
PHP
|
||||
|
||||
Written by Sterling Hughes
|
||||
http://curl.haxx.se/libcurl/php/
|
||||
https://php.net/curl
|
||||
|
||||
PostgreSQL
|
||||
|
||||
@@ -165,8 +174,7 @@ Python
|
||||
|
||||
R
|
||||
|
||||
RCurl by Duncan Temple Lang
|
||||
http://www.omegahat.org/RCurl/
|
||||
http://cran.r-project.org/package=curl
|
||||
|
||||
Rexx
|
||||
|
||||
@@ -187,10 +195,15 @@ Ruby
|
||||
ruby-curl-multi - written by Kristjan Petursson and Keith Rarick
|
||||
http://curl-multi.rubyforge.org/
|
||||
|
||||
Rust
|
||||
|
||||
curl-rust - by Carl Lerche
|
||||
https://github.com/carllerche/curl-rust
|
||||
|
||||
Scheme
|
||||
|
||||
Bigloo binding by Kirill Lisovsky
|
||||
http://curl.haxx.se/libcurl/scheme/
|
||||
http://www.metapaper.net/lisovsky/web/curl/
|
||||
|
||||
S-Lang
|
||||
|
||||
@@ -214,13 +227,13 @@ SPL
|
||||
|
||||
Tcl
|
||||
|
||||
Tclcurl by Andr<EFBFBD>s Garc<EFBFBD>a
|
||||
http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html
|
||||
Tclcurl by Andrés García
|
||||
http://mirror.yellow5.com/tclcurl/
|
||||
|
||||
Visual Basic
|
||||
|
||||
libcurl-vb by Jeffrey Phillips
|
||||
http://sourceforge.net/projects/libcurl-vb/
|
||||
https://sourceforge.net/projects/libcurl-vb/
|
||||
|
||||
Visual Foxpro
|
||||
|
||||
@@ -240,3 +253,8 @@ XBLite
|
||||
|
||||
Written by David Szafranski
|
||||
http://perso.wanadoo.fr/xblite/libraries.html
|
||||
|
||||
Xojo
|
||||
|
||||
Written by Andrew Lambert
|
||||
https://github.com/charonn0/RB-libcURL
|
||||
|
@@ -35,11 +35,9 @@ BUGS
|
||||
have a go at a solution. You can optionally also post your bug/problem at
|
||||
curl's bug tracking system over at
|
||||
|
||||
https://sourceforge.net/p/curl/bugs/
|
||||
https://github.com/bagder/curl/issues
|
||||
|
||||
Please read the rest of this document below first before doing that! Also,
|
||||
you need to login to your sourceforge account before being able to submit a
|
||||
bug report (necessary evil done to avoid spam).
|
||||
Please read the rest of this document below first before doing that!
|
||||
|
||||
If you feel you need to ask around first, find a suitable mailing list and
|
||||
post there. The lists are available on http://curl.haxx.se/mail/
|
||||
|
@@ -34,7 +34,7 @@
|
||||
3.3 How To Make a Patch without git
|
||||
3.4 How to get your changes into the main sources
|
||||
3.5 Write good commit messages
|
||||
3.6 Please don't send pull requests
|
||||
3.6 About pull requests
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
|
||||
We also hang out on IRC in #curl on irc.freenode.net
|
||||
|
||||
If you're at all interested in the code side of things, consider clicking
|
||||
'watch' on the curl repo at github to get notified on pull requests and new
|
||||
issues posted there.
|
||||
|
||||
1.2. License
|
||||
|
||||
When contributing with code, you agree to put your changes and new code under
|
||||
@@ -78,10 +82,10 @@
|
||||
|
||||
1.3 What To Read
|
||||
|
||||
Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS, the
|
||||
most recent CHANGES. Just lurking on the curl-library mailing list is gonna
|
||||
give you a lot of insights on what's going on right now. Asking there is a
|
||||
good idea too.
|
||||
Source code, the man pages, the INTERNALS document, TODO, KNOWN_BUGS and the
|
||||
most recent changes in the git log. Just lurking on the curl-library mailing
|
||||
list is gonna give you a lot of insights on what's going on right now. Asking
|
||||
there is a good idea too.
|
||||
|
||||
2. cURL Coding Standards
|
||||
|
||||
@@ -199,7 +203,7 @@
|
||||
|
||||
You need to first checkout the repository:
|
||||
|
||||
git clone git://github.com/bagder/curl.git
|
||||
git clone https://github.com/bagder/curl.git
|
||||
|
||||
You then proceed and edit all the files you like and you commit them to your
|
||||
local repository:
|
||||
@@ -241,8 +245,8 @@
|
||||
|
||||
For unix-like operating systems:
|
||||
|
||||
http://www.gnu.org/software/patch/patch.html
|
||||
http://www.gnu.org/directory/diffutils.html
|
||||
https://savannah.gnu.org/projects/patch/
|
||||
https://www.gnu.org/software/diffutils/
|
||||
|
||||
For Windows:
|
||||
|
||||
@@ -288,27 +292,15 @@
|
||||
and make sure that you have your own user and email setup correctly in git
|
||||
before you commit
|
||||
|
||||
3.6 Please don't send pull requests
|
||||
3.6 About pull requests
|
||||
|
||||
With git (and especially github) it is easy and tempting to send a pull
|
||||
request to one or more people in the curl project to have changes merged this
|
||||
way instead of mailing patches to the curl-library mailing list.
|
||||
request to the curl project to have changes merged this way instead of
|
||||
mailing patches to the curl-library mailing list.
|
||||
|
||||
We don't like that. We want them mailed for these reasons:
|
||||
We used to dislike this but we're trying to change that and accept that this
|
||||
is a frictionless way for people to contribute to the project. We now welcome
|
||||
pull requests!
|
||||
|
||||
- Peer review. Anyone and everyone on the list can review, comment and
|
||||
improve on the patch. Pull requests limit this ability.
|
||||
|
||||
- Anyone can merge the patch into their own trees for testing and those who
|
||||
have push rights can push it to the main repo. It doesn't have to be anyone
|
||||
the patch author knows beforehand.
|
||||
|
||||
- Commit messages can be tweaked and changed if merged locally instead of
|
||||
using github. Merges directly on github requires the changes to be perfect
|
||||
already, which they seldom are.
|
||||
|
||||
- Merges on github prevents rebases and even enforces --no-ff which is a git
|
||||
style we don't otherwise use in the project
|
||||
|
||||
However: once patches have been reviewed and deemed fine on list they are
|
||||
perfectly OK to be pulled from a published git tree.
|
||||
We will continue to avoid using github's merge tools to make the history
|
||||
linear and to make sure commits follow our style guidelines.
|
||||
|
@@ -112,7 +112,7 @@ The Better License, Original BSD, GPL or LGPL?
|
||||
In Debian land, there seems to be a common opinion that LGPL is "maximally
|
||||
compatible" with apps while Original BSD is not. Like this:
|
||||
|
||||
http://lists.debian.org/debian-devel/2005/09/msg01417.html
|
||||
https://lists.debian.org/debian-devel/2005/09/msg01417.html
|
||||
|
||||
More SSL Libraries
|
||||
|
||||
@@ -163,13 +163,13 @@ Distro Angle of this Problem
|
||||
Footnotes
|
||||
|
||||
[1] = http://www.xfree86.org/3.3.6/COPYRIGHT2.html#6
|
||||
[2] = http://www.fsf.org/licensing/essays/bsd.html
|
||||
[3] = http://www.fsf.org/licensing/licenses/gpl.html
|
||||
[2] = https://www.gnu.org/philosophy/bsd.html
|
||||
[3] = https://www.gnu.org/licenses/gpl.html
|
||||
[4] = http://curl.haxx.se/docs/copyright.html
|
||||
[5] = http://www.openssl.org/source/license.html
|
||||
[6] = http://www.fsf.org/licensing/licenses/gpl.html end of section 3
|
||||
[7] = http://www.fsf.org/licensing/licenses/lgpl.html
|
||||
[8] = http://en.wikipedia.org/wiki/OpenSSL_exception
|
||||
[5] = https://www.openssl.org/source/license.html
|
||||
[6] = https://www.gnu.org/licenses/gpl.html end of section 3
|
||||
[7] = https://www.gnu.org/licenses/lgpl.html
|
||||
[8] = https://en.wikipedia.org/wiki/OpenSSL_exception
|
||||
|
||||
Feedback/Updates provided by
|
||||
|
||||
|
59
docs/FAQ
59
docs/FAQ
@@ -21,6 +21,7 @@ FAQ
|
||||
1.12 I have a problem who can I chat with?
|
||||
1.13 curl's ECCN number?
|
||||
1.14 How do I submit my patch?
|
||||
1.15 How do I port libcurl to my OS?
|
||||
|
||||
2. Install Related Problems
|
||||
2.1 configure doesn't find OpenSSL even when it is installed
|
||||
@@ -81,6 +82,7 @@ FAQ
|
||||
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
||||
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||
4.20 curl doesn't return error for HTTP non-200 responses!
|
||||
4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
|
||||
|
||||
5. libcurl Issues
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -134,7 +136,7 @@ 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, SPNEGO, HTTP form based upload, proxies, cookies, user+password
|
||||
@@ -156,7 +158,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
|
||||
@@ -347,7 +352,7 @@ FAQ
|
||||
cryptography. When doing so, the Export Control Classification Number (ECCN)
|
||||
is used to identify the level of export control etc.
|
||||
|
||||
ASF gives a good explanation at http://www.apache.org/dev/crypto.html
|
||||
ASF gives a good explanation at https://www.apache.org/dev/crypto.html
|
||||
|
||||
We believe curl's number might be ECCN 5D002, another possibility is
|
||||
5D992. It seems necessary to write them, asking to confirm.
|
||||
@@ -376,6 +381,19 @@ FAQ
|
||||
|
||||
Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
|
||||
|
||||
1.15 How do I port libcurl to my OS?
|
||||
|
||||
Here's a rough step-by-step:
|
||||
|
||||
1. copy a suitable lib/config-*.h file as a start to lib/config-[youros].h
|
||||
|
||||
2. edit lib/config-[youros].h to match your OS and setup
|
||||
|
||||
3. edit lib/curl_setup.h to include config-[youros].h when your OS is
|
||||
detected by the preprocessor, in the style others already exist
|
||||
|
||||
4. compile lib/*.c and make them into a library
|
||||
|
||||
|
||||
2. Install Related Problems
|
||||
|
||||
@@ -424,7 +442,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
|
||||
|
||||
@@ -761,8 +779,9 @@ FAQ
|
||||
request-body in a GET request with something like "curl -X GET -d data
|
||||
[URL]"
|
||||
|
||||
Note that -X doesn't change curl's behavior. It only modifies the actual
|
||||
string sent in the request.
|
||||
Note that -X doesn't actually change curl's behavior as it only modifies the
|
||||
actual string sent in the request, but that may of course trigger a
|
||||
different set of events.
|
||||
|
||||
Accordingly, by using -XPOST on a command line that for example would follow
|
||||
a 303 redirect, you will effectively prevent curl from behaving
|
||||
@@ -1023,7 +1042,7 @@ FAQ
|
||||
timeout is set.
|
||||
|
||||
See option TcpMaxConnectRetransmissions on this page:
|
||||
http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
|
||||
https://support.microsoft.com/en-us/kb/175523/en-us
|
||||
|
||||
Also, even on non-Windows systems there may run a firewall or anti-virus
|
||||
software or similar that accepts the connection but does not actually do
|
||||
@@ -1040,7 +1059,7 @@ FAQ
|
||||
You'll find that even if D:\blah.txt does exist, cURL returns a 'file
|
||||
not found' error.
|
||||
|
||||
According to RFC 1738 (http://www.faqs.org/rfcs/rfc1738.html),
|
||||
According to RFC 1738 (https://www.ietf.org/rfc/rfc1738.txt),
|
||||
file:// URLs must contain a host component, but it is ignored by
|
||||
most implementations. In the above example, 'D:' is treated as the
|
||||
host component, and is taken away. Thus, cURL tries to open '/blah.txt'.
|
||||
@@ -1112,6 +1131,16 @@ FAQ
|
||||
You can also use the -w option and the variable %{response_code} to extract
|
||||
the exact response code that was return in the response.
|
||||
|
||||
4.21 Why is there a HTTP/1.1 in my HTTP/2 request?
|
||||
|
||||
If you use verbose to see the HTTP request when you send off a HTTP/2
|
||||
request, it will still say 1.1.
|
||||
|
||||
The reason for this is that we first generate the request to send using the
|
||||
old 1.1 style and show that request in the verbose output, and then we
|
||||
convert it over to the binary header-compressed HTTP/2 style. The actual
|
||||
"1.1" part from that request is then not actually used in the transfer. The
|
||||
binary HTTP/2 headers are not human readable.
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
@@ -1134,13 +1163,13 @@ FAQ
|
||||
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
|
||||
need to provide one or two locking functions:
|
||||
|
||||
http://www.openssl.org/docs/crypto/threads.html
|
||||
https://www.openssl.org/docs/crypto/threads.html
|
||||
|
||||
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
|
||||
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
|
||||
for the crypto functions).
|
||||
|
||||
http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
|
||||
https://web.archive.org/web/20111103083330/http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
|
||||
|
||||
No special locking is needed with a NSS-powered libcurl. NSS is thread-safe.
|
||||
|
||||
@@ -1271,7 +1300,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()
|
||||
@@ -1279,15 +1308,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.
|
||||
@@ -1316,7 +1345,7 @@ FAQ
|
||||
Also note that on many networks NATs or other IP-munging techniques are used
|
||||
that makes you see and use a different IP address locally than what the
|
||||
remote server will see you coming from. You may also consider using
|
||||
http://www.torproject.org .
|
||||
https://www.torproject.org/ .
|
||||
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
|
||||
|
@@ -64,7 +64,7 @@ HTTP
|
||||
- Content-Encoding support for deflate and gzip
|
||||
- "Transfer-Encoding: chunked" support in uploads
|
||||
- data compression (*12)
|
||||
- HTTP/2 (*4)
|
||||
- HTTP/2 (*5)
|
||||
|
||||
HTTPS (*1)
|
||||
- (all the HTTP features)
|
||||
@@ -77,7 +77,6 @@ HTTPS (*1)
|
||||
FTP
|
||||
- download
|
||||
- authentication
|
||||
- kerberos4 (*5)
|
||||
- Kerberos 5 (*14)
|
||||
- active/passive using PORT, EPRT, PASV or EPSV
|
||||
- single file size information (compare to HTTP HEAD)
|
||||
@@ -128,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), Kerberos 5
|
||||
(*4) and External.
|
||||
- send e-mails
|
||||
- mail from support
|
||||
- mail size support
|
||||
@@ -144,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),
|
||||
Kerberos 5 (*4) and External.
|
||||
- list e-mails
|
||||
- retrieve e-mails
|
||||
- enhanced command support for: CAPA, DELE, TOP, STAT, UIDL and NOOP via
|
||||
@@ -159,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),
|
||||
Kerberos 5 (*4) and External.
|
||||
- list the folders of a mailbox
|
||||
- select a mailbox with support for verifying the UIDVALIDITY
|
||||
- fetch e-mails with support for specifying the UID and SECTION
|
||||
@@ -178,14 +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 GSS-API implementation (such as Heimdal or MIT Kerberos) or
|
||||
SSPI (native Windows)
|
||||
*4 = requires nghttp2 and possibly a recent TLS library
|
||||
*5 = requires a krb4 library, such as the MIT one or similar
|
||||
*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
|
||||
|
@@ -273,3 +273,10 @@ August:
|
||||
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
|
||||
|
@@ -36,7 +36,7 @@ HTTP Cookies
|
||||
For a very long time, the only spec explaining how to use cookies was the
|
||||
original Netscape spec from 1994: http://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
||||
In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published
|
||||
In 2011, RFC6265 (https://www.ietf.org/rfc/rfc6265.txt) was finally published
|
||||
and details how cookies work within HTTP.
|
||||
|
||||
1.2 Cookies saved to disk
|
||||
|
107
docs/HTTP2.md
Normal file
107
docs/HTTP2.md
Normal file
@@ -0,0 +1,107 @@
|
||||
HTTP/2 with curl
|
||||
================
|
||||
|
||||
[HTTP/2 Spec](https://www.rfc-editor.org/rfc/rfc7540.txt)
|
||||
[http2 explained](http://daniel.haxx.se/http2/)
|
||||
|
||||
Build prerequisites
|
||||
-------------------
|
||||
- nghttp2
|
||||
- OpenSSL, NSS, GnutTLS or PolarSSL with a new enough version
|
||||
|
||||
[nghttp2](https://nghttp2.org/)
|
||||
-------------------------------
|
||||
|
||||
libcurl uses this 3rd party library for the low level protocol handling
|
||||
parts. The reason for this is that HTTP/2 is much more complex at that layer
|
||||
than HTTP/1.1 (which we implement on our own) and that nghttp2 is an already
|
||||
existing and well functional library.
|
||||
|
||||
We require at least version 1.0.0.
|
||||
|
||||
Over an http:// URL
|
||||
-------------------
|
||||
|
||||
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will
|
||||
include an upgrade header in the initial request to the host to allow
|
||||
upgrading to HTTP/2.
|
||||
|
||||
Possibly we can later introduce an option that will cause libcurl to fail if
|
||||
not possible to upgrade. Possibly we introduce an option that makes libcurl
|
||||
use HTTP/2 at once over http://
|
||||
|
||||
Over an https:// URL
|
||||
--------------------
|
||||
|
||||
If `CURLOPT_HTTP_VERSION` is set to `CURL_HTTP_VERSION_2_0`, libcurl will use
|
||||
ALPN (or NPN) to negotiate which protocol to continue with. Possibly introduce
|
||||
an option that will cause libcurl to fail if not possible to use HTTP/2.
|
||||
Consider options to explicitly disable ALPN and/or NPN.
|
||||
|
||||
ALPN is the TLS extension that HTTP/2 is expected to use. The NPN extension is
|
||||
for a similar purpose, was made prior to ALPN and is used for SPDY so early
|
||||
HTTP/2 servers are implemented using NPN before ALPN support is widespread.
|
||||
|
||||
SSL libs
|
||||
--------
|
||||
|
||||
The challenge is the ALPN and NPN support and all our different SSL
|
||||
backends. You may need a fairly updated SSL library version for it to
|
||||
provide the necessary TLS features. Right now we support:
|
||||
|
||||
- OpenSSL: ALPN and NPN
|
||||
- NSS: ALPN and NPN
|
||||
- GnuTLS: ALPN
|
||||
- PolarSSL: ALPN
|
||||
|
||||
Multiplexing
|
||||
------------
|
||||
|
||||
Starting in 7.43.0, libcurl fully supports HTTP/2 multiplexing, which is the
|
||||
term for doing multiple independent transfers over the same physical TCP
|
||||
connection.
|
||||
|
||||
To take advantage of multiplexing, you need to use the multi interface and set
|
||||
`CURLMOPT_PIPELINING` to `CURLPIPE_MULTIPLEX`. With that bit set, libcurl will
|
||||
attempt to re-use existing HTTP/2 connections and just add a new stream over
|
||||
that when doing subsequent parallel requests.
|
||||
|
||||
While libcurl sets up a connection to a HTTP server there is a period during
|
||||
which it doesn't know if it can pipeline or do multiplexing and if you add new
|
||||
transfers in that period, libcurl will default to start new connections for
|
||||
those transfers. With the new option `CURLOPT_PIPEWAIT` (added in 7.43.0), you
|
||||
can ask that a transfer should rather wait and see in case there's a
|
||||
connection for the same host in progress that might end up being possible to
|
||||
multiplex on. It favours keeping the number of connections low to the cost of
|
||||
slightly longer time to first byte transferred.
|
||||
|
||||
Applications
|
||||
------------
|
||||
|
||||
We hide HTTP/2's binary nature and convert received HTTP/2 traffic to headers
|
||||
in HTTP 1.1 style. This allows applications to work unmodified.
|
||||
|
||||
curl tool
|
||||
---------
|
||||
|
||||
curl offers the `--http2` command line option to enable use of HTTP/2
|
||||
|
||||
HTTP Alternative Services
|
||||
-------------------------
|
||||
|
||||
Alt-Svc is a suggested extension with a corresponding frame (ALTSVC) in HTTP/2
|
||||
that tells the client about an alternative "route" to the same content for the
|
||||
same origin server that you get the response from. A browser or long-living
|
||||
client can use that hint to create a new connection asynchronously. For
|
||||
libcurl, we may introduce a way to bring such clues to the applicaton and/or
|
||||
let a subsequent request use the alternate route
|
||||
automatically. [Spec](https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-05)
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
- Provide API to set priorities / dependencies of individual streams
|
||||
|
||||
- Implement "prior-knowledge" HTTP/2 connecitons over clear text so that
|
||||
curl can connect with HTTP/2 at once without 1.1+Upgrade.
|
||||
|
129
docs/INSTALL
129
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
|
||||
=====
|
||||
|
||||
@@ -172,13 +173,13 @@ Win32
|
||||
advice given above.
|
||||
|
||||
KB94248 - How To Use the C Run-Time
|
||||
http://support.microsoft.com/kb/94248/en-us
|
||||
https://support.microsoft.com/kb/94248/en-us
|
||||
|
||||
KB140584 - How to link with the correct C Run-Time (CRT) library
|
||||
http://support.microsoft.com/kb/140584/en-us
|
||||
https://support.microsoft.com/kb/140584/en-us
|
||||
|
||||
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
|
||||
http://msdn.microsoft.com/en-us/library/ms235460
|
||||
https://msdn.microsoft.com/en-us/library/ms235460
|
||||
|
||||
If your app is misbehaving in some strange way, or it is suffering
|
||||
from memory corruption, before asking for further help, please try
|
||||
@@ -187,7 +188,6 @@ Win32
|
||||
|
||||
If you get linkage errors read section 5.7 of the FAQ document.
|
||||
|
||||
|
||||
MingW32
|
||||
-------
|
||||
|
||||
@@ -209,8 +209,8 @@ Win32
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.8
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8y
|
||||
set LIBSSH2_PATH=c:\libssh2-1.4.3
|
||||
set OPENSSL_PATH=c:\openssl-1.0.2c
|
||||
set LIBSSH2_PATH=c:\libssh2-1.6.0
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||
@@ -232,8 +232,7 @@ Win32
|
||||
- optional MingW32-built OpenLDAP SDK available from:
|
||||
http://www.gknw.net/mirror/openldap/
|
||||
- optional recent Novell CLDAP SDK available from:
|
||||
http://developer.novell.com/ndk/cldap.htm
|
||||
|
||||
https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
|
||||
|
||||
Cygwin
|
||||
------
|
||||
@@ -255,7 +254,7 @@ Win32
|
||||
If you use MSVC 6 it is required that you use the February 2003 edition of
|
||||
the 'Platform SDK' which can be downloaded from:
|
||||
|
||||
http://www.microsoft.com/en-us/download/details.aspx?id=12261
|
||||
https://www.microsoft.com/en-us/download/details.aspx?id=12261
|
||||
|
||||
Building any software with MSVC 6 without having PSDK installed is just
|
||||
asking for trouble down the road once you have released it, you might notice
|
||||
@@ -264,7 +263,7 @@ Win32
|
||||
software built in such way will at some point regret having done so.
|
||||
|
||||
If the compiler has been updated with the installation of a service pack as
|
||||
those mentioned in http://support.microsoft.com/kb/194022 the compiler can be
|
||||
those mentioned in https://support.microsoft.com/kb/194022 the compiler can be
|
||||
safely used to read source code, translate and make it object code.
|
||||
|
||||
But, even with the service packs mentioned above installed, the resulting
|
||||
@@ -300,7 +299,7 @@ Win32
|
||||
Then run 'nmake vc' in curl's root directory.
|
||||
|
||||
If you want to compile with zlib support, you will need to build
|
||||
zlib (http://www.gzip.org/zlib/) as well. Please read the zlib
|
||||
zlib (http://www.zlib.net/) as well. Please read the zlib
|
||||
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
||||
variable to the location of zlib.h and zlib.lib, for example:
|
||||
|
||||
@@ -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,18 @@ Win32
|
||||
add '-DCURL_STATICLIB' to your CFLAGS. Otherwise the linker will look for
|
||||
dynamic import symbols.
|
||||
|
||||
Legacy Windows and SSL
|
||||
----------------------
|
||||
WinSSL (Windows SSPI, more specifically Schannel), is the native SSL library
|
||||
that comes with the Windows OS. WinSSL in Windows <= XP is not able to
|
||||
connect to servers that no longer support the legacy handshakes and
|
||||
algorithms used by those versions. If you will be using curl in one of those
|
||||
earlier versions of Windows you should choose another SSL backend like
|
||||
OpenSSL.
|
||||
|
||||
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 +512,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 +542,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 +589,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 +611,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 +628,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 +643,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,20 +665,19 @@ 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:
|
||||
http://www.gknw.net/development/prgtools/
|
||||
- recent Novell LibC SDK available from:
|
||||
http://developer.novell.com/ndk/libc.htm
|
||||
- or recent Novell CLib SDK available from:
|
||||
http://developer.novell.com/ndk/clib.htm
|
||||
- recent Novell LibC or Novell CLib SDK available from:
|
||||
https://www.novell.com/developer/ndk/
|
||||
- optional recent Novell CLDAP SDK available from:
|
||||
http://developer.novell.com/ndk/cldap.htm
|
||||
https://www.novell.com/developer/ndk/ldap_libraries_for_c.html
|
||||
- optional zlib sources (static or dynamic linking with zlib.imp);
|
||||
sources with NetWare Makefile can be obtained from:
|
||||
http://www.gknw.net/mirror/zlib/
|
||||
@@ -691,9 +708,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 +778,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 +810,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,16 +823,16 @@ 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.
|
||||
|
||||
To build libcurl for VxWorks you need:
|
||||
|
||||
- CYGWIN (free, http://cygwin.com/)
|
||||
- CYGWIN (free, https://cygwin.com/)
|
||||
- Wind River Workbench (commercial)
|
||||
|
||||
If you have CYGWIN and Workbench installed on you machine
|
||||
@@ -832,13 +849,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 +879,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 +894,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 +942,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 +981,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 +1010,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!
|
||||
@@ -1072,18 +1093,18 @@ Useful URLs
|
||||
|
||||
axTLS http://axtls.sourceforge.net/
|
||||
c-ares http://c-ares.haxx.se/
|
||||
GNU GSS http://www.gnu.org/software/gss/
|
||||
GnuTLS http://www.gnu.org/software/gnutls/
|
||||
Heimdal http://www.pdc.kth.se/heimdal/
|
||||
libidn http://www.gnu.org/software/libidn/
|
||||
GNU GSS https://www.gnu.org/software/gss/
|
||||
GnuTLS https://www.gnu.org/software/gnutls/
|
||||
Heimdal http://www.h5l.org/
|
||||
libidn https://www.gnu.org/software/libidn/
|
||||
libmetalink https://launchpad.net/libmetalink/
|
||||
libssh2 http://www.libssh2.org/
|
||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||
NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||
NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
|
||||
OpenLDAP http://www.openldap.org/
|
||||
OpenSSL http://www.openssl.org/
|
||||
PolarSSL http://polarssl.org/
|
||||
yassl http://www.yassl.com/
|
||||
OpenSSL https://www.openssl.org/
|
||||
PolarSSL https://tls.mbed.org/
|
||||
wolfSSL https://www.wolfssl.com/wolfSSL/
|
||||
Zlib http://www.zlib.net/
|
||||
|
||||
MingW http://www.mingw.org/
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -95,7 +95,7 @@ install instructions may produce erratic behaviour in DevCpp. For further info
|
||||
check the following sites
|
||||
|
||||
http://aditsu.freeunixhost.com/dev-cpp-faq.html
|
||||
http://sourceforge.net/forum/message.php?msg_id=3252213
|
||||
https://sourceforge.net/p/dev-cpp/discussion/48211/thread/2a85ea46
|
||||
|
||||
As I have mentioned before I will confine this to the SSL Library compilations
|
||||
but the process is very similar for compilation of the executable - curl.exe;
|
||||
|
912
docs/INTERNALS
912
docs/INTERNALS
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,18 @@ 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!
|
||||
|
||||
90. IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
|
||||
code reveals that pingpong.c contains some truncation code, at line 408,
|
||||
when it deems the server response to be too large truncating it to 40
|
||||
characters"
|
||||
http://curl.haxx.se/bug/view.cgi?id=1366
|
||||
|
||||
89. Disabling HTTP Pipelining when there are ongoing transfers can lead to
|
||||
heap corruption and crash. http://curl.haxx.se/bug/view.cgi?id=1411
|
||||
|
||||
88. libcurl doesn't support CURLINFO_FILETIME for SFTP transfers and thus
|
||||
curl's -R option also doesn't work then.
|
||||
|
||||
87. -J/--remote-header-name doesn't decode %-encoded file names. RFC6266
|
||||
details how it should be done. The can of worm is basically that we have no
|
||||
charset handling in curl and ascii >=128 is a challenge for us. Not to
|
||||
@@ -85,7 +97,7 @@ may have been fixed since this was written!
|
||||
something beyond ascii but currently libcurl will only pass in the verbatim
|
||||
string the app provides. There are several browsers that already do this
|
||||
encoding. The key seems to be the updated draft to RFC2231:
|
||||
http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||
https://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||
|
||||
66. When using telnet, the time limitation options don't work.
|
||||
http://curl.haxx.se/bug/view.cgi?id=846
|
||||
@@ -197,7 +209,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
|
||||
|
@@ -1,245 +0,0 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Structs in libcurl
|
||||
|
||||
This document should cover 7.32.0 pretty accurately, but will make sense even
|
||||
for older and later versions as things don't change drastically that often.
|
||||
|
||||
1. The main structs in libcurl
|
||||
1.1 SessionHandle
|
||||
1.2 connectdata
|
||||
1.3 Curl_multi
|
||||
1.4 Curl_handler
|
||||
1.5 conncache
|
||||
1.6 Curl_share
|
||||
1.7 CookieInfo
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. The main structs in libcurl
|
||||
|
||||
1.1 SessionHandle
|
||||
|
||||
The SessionHandle handle struct is the one returned to the outside in the
|
||||
external API as a "CURL *". This is usually known as an easy handle in API
|
||||
documentations and examples.
|
||||
|
||||
Information and state that is related to the actual connection is in the
|
||||
'connectdata' struct. When a transfer is about to be made, libcurl will
|
||||
either create a new connection or re-use an existing one. The particular
|
||||
connectdata that is used by this handle is pointed out by
|
||||
SessionHandle->easy_conn.
|
||||
|
||||
Data and information that regard this particular single transfer is put in
|
||||
the SingleRequest sub-struct.
|
||||
|
||||
When the SessionHandle struct is added to a multi handle, as it must be in
|
||||
order to do any transfer, the ->multi member will point to the Curl_multi
|
||||
struct it belongs to. The ->prev and ->next members will then be used by the
|
||||
multi code to keep a linked list of SessionHandle structs that are added to
|
||||
that same multi handle. libcurl always uses multi so ->multi *will* point to
|
||||
a Curl_multi when a transfer is in progress.
|
||||
|
||||
->mstate is the multi state of this particular SessionHandle. When
|
||||
multi_runsingle() is called, it will act on this handle according to which
|
||||
state it is in. The mstate is also what tells which sockets to return for a
|
||||
specific SessionHandle when curl_multi_fdset() is called etc.
|
||||
|
||||
The libcurl source code generally use the name 'data' for the variable that
|
||||
points to the SessionHandle.
|
||||
|
||||
|
||||
1.2 connectdata
|
||||
|
||||
A general idea in libcurl is to keep connections around in a connection
|
||||
"cache" after they have been used in case they will be used again and then
|
||||
re-use an existing one instead of creating a new as it creates a significant
|
||||
performance boost.
|
||||
|
||||
Each 'connectdata' identifies a single physical connection to a server. If
|
||||
the connection can't be kept alive, the connection will be closed after use
|
||||
and then this struct can be removed from the cache and freed.
|
||||
|
||||
Thus, the same SessionHandle can be used multiple times and each time select
|
||||
another connectdata struct to use for the connection. Keep this in mind, as
|
||||
it is then important to consider if options or choices are based on the
|
||||
connection or the SessionHandle.
|
||||
|
||||
Functions in libcurl will assume that connectdata->data points to the
|
||||
SessionHandle that uses this connection.
|
||||
|
||||
As a special complexity, some protocols supported by libcurl require a
|
||||
special disconnect procedure that is more than just shutting down the
|
||||
socket. It can involve sending one or more commands to the server before
|
||||
doing so. Since connections are kept in the connection cache after use, the
|
||||
original SessionHandle may no longer be around when the time comes to shut
|
||||
down a particular connection. For this purpose, libcurl holds a special
|
||||
dummy 'closure_handle' SessionHandle in the Curl_multi struct to
|
||||
|
||||
FTP uses two TCP connections for a typical transfer but it keeps both in
|
||||
this single struct and thus can be considered a single connection for most
|
||||
internal concerns.
|
||||
|
||||
The libcurl source code generally use the name 'conn' for the variable that
|
||||
points to the connectdata.
|
||||
|
||||
|
||||
1.3 Curl_multi
|
||||
|
||||
Internally, the easy interface is implemented as a wrapper around multi
|
||||
interface functions. This makes everything multi interface.
|
||||
|
||||
Curl_multi is the multi handle struct exposed as "CURLM *" in external APIs.
|
||||
|
||||
This struct holds a list of SessionHandle structs that have been added to
|
||||
this handle with curl_multi_add_handle(). The start of the list is ->easyp
|
||||
and ->num_easy is a counter of added SessionHandles.
|
||||
|
||||
->msglist is a linked list of messages to send back when
|
||||
curl_multi_info_read() is called. Basically a node is added to that list
|
||||
when an individual SessionHandle's transfer has completed.
|
||||
|
||||
->hostcache points to the name cache. It is a hash table for looking up name
|
||||
to IP. The nodes have a limited life time in there and this cache is meant
|
||||
to reduce the time for when the same name is wanted within a short period of
|
||||
time.
|
||||
|
||||
->timetree points to a tree of SessionHandles, sorted by the remaining time
|
||||
until it should be checked - normally some sort of timeout. Each
|
||||
SessionHandle has one node in the tree.
|
||||
|
||||
->sockhash is a hash table to allow fast lookups of socket descriptor to
|
||||
which SessionHandle that uses that descriptor. This is necessary for the
|
||||
multi_socket API.
|
||||
|
||||
->conn_cache points to the connection cache. It keeps track of all
|
||||
connections that are kept after use. The cache has a maximum size.
|
||||
|
||||
->closure_handle is described in the 'connectdata' section.
|
||||
|
||||
The libcurl source code generally use the name 'multi' for the variable that
|
||||
points to the Curl_multi struct.
|
||||
|
||||
|
||||
1.4 Curl_handler
|
||||
|
||||
Each unique protocol that is supported by libcurl needs to provide at least
|
||||
one Curl_handler struct. It defines what the protocol is called and what
|
||||
functions the main code should call to deal with protocol specific issues.
|
||||
In general, there's a source file named [protocol].c in which there's a
|
||||
"struct Curl_handler Curl_handler_[protocol]" declared. In url.c there's
|
||||
then the main array with all individual Curl_handler structs pointed to from
|
||||
a single array which is scanned through when a URL is given to libcurl to
|
||||
work with.
|
||||
|
||||
->scheme is the URL scheme name, usually spelled out in uppercase. That's
|
||||
"HTTP" or "FTP" etc. SSL versions of the protcol need its own Curl_handler
|
||||
setup so HTTPS separate from HTTP.
|
||||
|
||||
->setup_connection is called to allow the protocol code to allocate protocol
|
||||
specific data that then gets associated with that SessionHandle for the rest
|
||||
of this transfer. It gets freed again at the end of the transfer. It will be
|
||||
called before the 'connectdata' for the transfer has been selected/created.
|
||||
Most protocols will allocate its private 'struct [PROTOCOL]' here and assign
|
||||
SessionHandle->req.protop to point to it.
|
||||
|
||||
->connect_it allows a protocol to do some specific actions after the TCP
|
||||
connect is done, that can still be considered part of the connection phase.
|
||||
|
||||
Some protocols will alter the connectdata->recv[] and connectdata->send[]
|
||||
function pointers in this function.
|
||||
|
||||
->connecting is similarly a function that keeps getting called as long as the
|
||||
protocol considers itself still in the connecting phase.
|
||||
|
||||
->do_it is the function called to issue the transfer request. What we call
|
||||
the DO action internally. If the DO is not enough and things need to be kept
|
||||
getting done for the entire DO sequence to complete, ->doing is then usually
|
||||
also provided. Each protocol that needs to do multiple commands or similar
|
||||
for do/doing need to implement their own state machines (see SCP, SFTP,
|
||||
FTP). Some protocols (only FTP and only due to historical reasons) has a
|
||||
separate piece of the DO state called DO_MORE.
|
||||
|
||||
->doing keeps getting called while issuing the transfer request command(s)
|
||||
|
||||
->done gets called when the transfer is complete and DONE. That's after the
|
||||
main data has been transferred.
|
||||
|
||||
->do_more gets called during the DO_MORE state. The FTP protocol uses this
|
||||
state when setting up the second connection.
|
||||
|
||||
->proto_getsock
|
||||
->doing_getsock
|
||||
->domore_getsock
|
||||
->perform_getsock
|
||||
Functions that return socket information. Which socket(s) to wait for which
|
||||
action(s) during the particular multi state.
|
||||
|
||||
->disconnect is called immediately before the TCP connection is shutdown.
|
||||
|
||||
->readwrite gets called during transfer to allow the protocol to do extra
|
||||
reads/writes
|
||||
|
||||
->defport is the default report TCP or UDP port this protocol uses
|
||||
|
||||
->protocol is one or more bits in the CURLPROTO_* set. The SSL versions have
|
||||
their "base" protocol set and then the SSL variation. Like "HTTP|HTTPS".
|
||||
|
||||
->flags is a bitmask with additional information about the protocol that will
|
||||
make it get treated differently by the generic engine:
|
||||
|
||||
PROTOPT_SSL - will make it connect and negotiate SSL
|
||||
|
||||
PROTOPT_DUAL - this protocol uses two connections
|
||||
|
||||
PROTOPT_CLOSEACTION - this protocol has actions to do before closing the
|
||||
connection. This flag is no longer used by code, yet still set for a bunch
|
||||
protocol handlers.
|
||||
|
||||
PROTOPT_DIRLOCK - "direction lock". The SSH protocols set this bit to
|
||||
limit which "direction" of socket actions that the main engine will
|
||||
concern itself about.
|
||||
|
||||
PROTOPT_NONETWORK - a protocol that doesn't use network (read file:)
|
||||
|
||||
PROTOPT_NEEDSPWD - this protocol needs a password and will use a default
|
||||
one unless one is provided
|
||||
|
||||
PROTOPT_NOURLQUERY - this protocol can't handle a query part on the URL
|
||||
(?foo=bar)
|
||||
|
||||
|
||||
1.5 conncache
|
||||
|
||||
Is a hash table with connections for later re-use. Each SessionHandle has
|
||||
a pointer to its connection cache. Each multi handle sets up a connection
|
||||
cache that all added SessionHandles share by default.
|
||||
|
||||
|
||||
1.6 Curl_share
|
||||
|
||||
The libcurl share API allocates a Curl_share struct, exposed to the external
|
||||
API as "CURLSH *".
|
||||
|
||||
The idea is that the struct can have a set of own versions of caches and
|
||||
pools and then by providing this struct in the CURLOPT_SHARE option, those
|
||||
specific SessionHandles will use the caches/pools that this share handle
|
||||
holds.
|
||||
|
||||
Then individual SessionHandle structs can be made to share specific things
|
||||
that they otherwise wouldn't, such as cookies.
|
||||
|
||||
The Curl_share struct can currently hold cookies, DNS cache and the SSL
|
||||
session cache.
|
||||
|
||||
|
||||
1.7 CookieInfo
|
||||
|
||||
This is the main cookie struct. It holds all known cookies and related
|
||||
information. Each SessionHandle has its own private CookieInfo even when
|
||||
they are added to a multi handle. They can be made to share cookies by using
|
||||
the share API.
|
@@ -21,33 +21,31 @@ 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
|
||||
OpenSSL https://www.openssl.org/source/license.html
|
||||
|
||||
(May be used for SSL/TLS support) Uses an Original BSD-style license
|
||||
with an announcement clause that makes it "incompatible" with GPL. You
|
||||
are not allowed to ship binaries that link with OpenSSL that includes
|
||||
GPL code (unless that specific GPL code includes an exception for
|
||||
OpenSSL - a habit that is growing more and more common). If OpenSSL's
|
||||
licensing is a problem for you, consider using GnuTLS or yassl
|
||||
instead.
|
||||
licensing is a problem for you, consider using another TLS library.
|
||||
|
||||
GnuTLS http://www.gnutls.org/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the LGPL[3] license. If this is
|
||||
a problem for you, consider using OpenSSL instead. Also note that
|
||||
a problem for you, consider using another TLS library. Also note that
|
||||
GnuTLS itself depends on and uses other libs (libgcrypt and
|
||||
libgpg-error) and they too are LGPL- or GPL-licensed.
|
||||
|
||||
yassl http://www.yassl.com/
|
||||
WolfSSL https://www.wolfssl.com/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the GPL[1] license. If this is
|
||||
a problem for you, consider using OpenSSL or GnuTLS instead.
|
||||
(May be used for SSL/TLS support) Uses the GPL[1] license or a
|
||||
propietary license. If this is a problem for you, consider using
|
||||
another TLS library.
|
||||
|
||||
NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||
NSS https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
|
||||
|
||||
(May be used for SSL/TLS support) Is covered by the MPL[4] license,
|
||||
the GPL[1] license and the LGPL[3] license. You may choose to license
|
||||
@@ -59,36 +57,44 @@ axTLS http://axtls.sourceforge.net/
|
||||
|
||||
(May be used for SSL/TLS support) Uses a Modified BSD-style license.
|
||||
|
||||
mbedTLS https://tls.mbed.org/
|
||||
|
||||
(May be used for SSL/TLS support) Uses the GPL[1] license or a
|
||||
propietary license. If this is a problem for you, consider using
|
||||
another TLS library.
|
||||
|
||||
BoringSSL https://boringssl.googlesource.com/
|
||||
|
||||
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
|
||||
license as that.
|
||||
|
||||
libressl http://www.libressl.org/
|
||||
|
||||
(May be used for SSL/TLS support) As an OpenSSL fork, it has the same
|
||||
license as that.
|
||||
|
||||
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
||||
|
||||
(Used for asynchronous name resolves) Uses an MIT license that is very
|
||||
liberal and imposes no restrictions on any other library or part you
|
||||
may link with.
|
||||
|
||||
zlib http://www.gzip.org/zlib/zlib_license.html
|
||||
zlib http://www.zlib.net/zlib_license.html
|
||||
|
||||
(Used for compressed Transfer-Encoding support) Uses an MIT-style
|
||||
license that shouldn't collide with any other library.
|
||||
|
||||
krb4
|
||||
|
||||
While nothing in particular says that a Kerberos4 library must use any
|
||||
particular license, the one I've tried and used successfully so far
|
||||
(kth-krb4) is partly Original BSD-licensed with the announcement
|
||||
clause. Some of the code in libcurl that is written to deal with
|
||||
Kerberos4 is Modified BSD-licensed.
|
||||
|
||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||
|
||||
(May be used for GSS support) MIT licensed, that shouldn't collide
|
||||
with any other parts.
|
||||
|
||||
Heimdal http://www.pdc.kth.se/heimdal/
|
||||
Heimdal http://www.h5l.org
|
||||
|
||||
(May be used for GSS support) Heimdal is Original BSD licensed with
|
||||
the announcement clause.
|
||||
|
||||
GNU GSS http://www.gnu.org/software/gss/
|
||||
GNU GSS https://www.gnu.org/software/gss/
|
||||
|
||||
(May be used for GSS support) GNU GSS is GPL licensed. Note that you
|
||||
may not distribute binary curl packages that uses this if you build
|
||||
@@ -115,10 +121,10 @@ libssh2 http://www.libssh2.org/
|
||||
(Used for scp and sftp support) libssh2 uses a Modified BSD-style
|
||||
license.
|
||||
|
||||
[1] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html
|
||||
[2] = http://www.fsf.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
|
||||
[1] = GPL - GNU General Public License: https://www.gnu.org/licenses/gpl.html
|
||||
[2] = https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs details on
|
||||
how to write such an exception to the GPL
|
||||
[3] = LGPL - GNU Lesser General Public License:
|
||||
http://www.gnu.org/licenses/lgpl.html
|
||||
https://www.gnu.org/licenses/lgpl.html
|
||||
[4] = MPL - Mozilla Public License:
|
||||
http://www.mozilla.org/MPL/
|
||||
https://www.mozilla.org/MPL/
|
||||
|
@@ -230,7 +230,7 @@ MAIL ETIQUETTE
|
||||
Quote as little as possible. Just enough to provide the context you cannot
|
||||
leave out. A lengthy description can be found here:
|
||||
|
||||
http://www.netmeister.org/news/learn2quote.html
|
||||
https://www.netmeister.org/news/learn2quote.html
|
||||
|
||||
2.7 Digest
|
||||
|
||||
|
39
docs/MANUAL
39
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
|
||||
|
||||
@@ -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:
|
||||
@@ -451,8 +470,8 @@ COOKIES
|
||||
stored cookies which match the request as it follows the location. The
|
||||
file "empty.txt" may be a nonexistent file.
|
||||
|
||||
Alas, to both read and write cookies from a netscape cookie file, you can
|
||||
set both -b and -c to use the same file:
|
||||
To read and write cookies from a netscape cookie file, you can set both -b
|
||||
and -c to use the same file:
|
||||
|
||||
curl -b cookies.txt -c cookies.txt www.example.com
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2015, 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,8 +37,8 @@ EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
||||
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
||||
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
|
||||
MAIL-ETIQUETTE HTTP-COOKIES LIBCURL-STRUCTS SECURITY RELEASE-PROCEDURE \
|
||||
SSL-PROBLEMS
|
||||
MAIL-ETIQUETTE HTTP-COOKIES SECURITY RELEASE-PROCEDURE \
|
||||
SSL-PROBLEMS HTTP2.md ROADMAP.md
|
||||
|
||||
MAN2HTML= roffit < $< >$@
|
||||
|
||||
|
@@ -1,21 +1,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 +24,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 +41,49 @@ 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):
|
||||
|
||||
- June 17, 2015 (version 7.43.0)
|
||||
- August 12, 2015
|
||||
- October 7, 2015
|
||||
- December 2, 2015
|
||||
- January 27, 2016
|
||||
- March 23, 2016
|
||||
- May 18, 2016
|
||||
- July 13, 2016
|
||||
- September 7, 2016
|
||||
|
123
docs/ROADMAP.md
123
docs/ROADMAP.md
@@ -1,54 +1,107 @@
|
||||
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
|
||||
===================
|
||||
HTTP/2
|
||||
------
|
||||
|
||||
1. http2 test suite
|
||||
- test suite
|
||||
|
||||
2. http2 multiplexing/pipelining
|
||||
Base this on existing nghttp2 server to start with to make functional
|
||||
tests. Later on we can adopt that code or work with nghttp2 to provide ways
|
||||
to have the http2 server respond with broken responses to make sure we deal
|
||||
with that nicely as well.
|
||||
|
||||
3. SPDY
|
||||
To decide: if we need to bundle parts of the nghttp2 stuff that probably
|
||||
won't be shipped by many distros.
|
||||
|
||||
4. SRV records
|
||||
- stream properties API
|
||||
|
||||
5. HTTPS to proxy
|
||||
Provide options for setting priorities and dependencies among the streams
|
||||
(easy handles). They are mostly information set for the stream and sent to
|
||||
the server so we don't have to add much logic for this.
|
||||
|
||||
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
|
||||
- server push
|
||||
|
||||
7. HTTP Digest authentication via Windows SSPI
|
||||
Not exactly clear exactly how to support this API-wise, but by adding
|
||||
handles without asking for a resource it could be a way to be prepared to
|
||||
receive pushes in case such are sent. We probably need it to still specify
|
||||
a URL with host name, port etc but we probably need a special option to
|
||||
tell libcurl it is for server push purposes.
|
||||
|
||||
8. GSSAPI authentication in the email protocols
|
||||
- provide option for HTTP/2 "prior knowledge" over clear text
|
||||
|
||||
9. 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
|
||||
As it would avoid the roundtrip-heavy Upgrade: procedures when you _know_
|
||||
it speaks HTTP/2.
|
||||
|
||||
10. SASL authentication in LDAP
|
||||
- provide option to allow curl to default to HTTP/2 only when using HTTPS
|
||||
|
||||
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
|
||||
We could switch on HTTP/2 by-default for HTTPS quite easily and it
|
||||
shouldn't hurt anyone, while HTTP/2 for HTTP by default could introduce
|
||||
lots of Upgrade: roundtrips that users won't like. So a separated option
|
||||
alternative makes sense.
|
||||
|
||||
12. Allow the email protocols to return the capabilities before
|
||||
authenticating. This will allow an application to decide on the best
|
||||
authentication mechanism
|
||||
SRV records
|
||||
-----------
|
||||
|
||||
13. Allow Windows threading model to be replaced by Win32 pthreads port
|
||||
How to find services for specific domains/hosts.
|
||||
|
||||
14. 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?
|
||||
HTTPS to proxy
|
||||
--------------
|
||||
|
||||
To avoid network traffic to/from the proxy getting snooped on.
|
||||
|
||||
curl_formadd()
|
||||
--------------
|
||||
|
||||
make sure there's an easy handle passed in to `curl_formadd()`,
|
||||
`curl_formget()` and `curl_formfree()` by adding replacement functions and
|
||||
deprecating the old ones to allow custom mallocs and more
|
||||
|
||||
third-party SASL
|
||||
----------------
|
||||
|
||||
add support for third-party SASL libraries such as Cyrus SASL - may need to
|
||||
move existing native and SSPI based authentication into vsasl folder after
|
||||
reworking HTTP and SASL code
|
||||
|
||||
SASL authentication in LDAP
|
||||
---------------------------
|
||||
|
||||
...
|
||||
|
||||
Simplify the SMTP email
|
||||
-----------------------
|
||||
|
||||
Simplify the SMTP email interface so that programmers don't have to
|
||||
construct the body of an email that contains all the headers, alternative
|
||||
content, images and attachments - maintain raw interface so that
|
||||
programmers that want to do this can
|
||||
|
||||
email capabilities
|
||||
------------------
|
||||
|
||||
Allow the email protocols to return the capabilities before
|
||||
authenticating. This will allow an application to decide on the best
|
||||
authentication mechanism
|
||||
|
||||
Win32 pthreads
|
||||
--------------
|
||||
|
||||
Allow Windows threading model to be replaced by Win32 pthreads port
|
||||
|
||||
dynamic buffer size
|
||||
-------------------
|
||||
|
||||
Implement a dynamic buffer size to allow SFTP to use much larger buffers and
|
||||
possibly allow the size to be customizable by applications. Use less memory
|
||||
when handles are not in use?
|
||||
|
||||
New stuff - curl
|
||||
================
|
||||
----------------
|
||||
|
||||
1. Embed a language interpreter (lua?). For that middle ground where curl
|
||||
isn’t enough and a libcurl binding feels “too much”. Build-time conditional
|
||||
@@ -58,7 +111,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 +122,8 @@ 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.1
|
||||
|
||||
5. authentication framework (consider merging HTTP and SASL authentication to
|
||||
give one API for protocols to call)
|
||||
@@ -80,9 +133,7 @@ Improve
|
||||
ago
|
||||
|
||||
Remove
|
||||
======
|
||||
------
|
||||
|
||||
1. cmake support (nobody maintains it)
|
||||
|
||||
2. makefile.vc files as there is no point in maintaining two sets of Windows
|
||||
1. makefile.vc files as there is no point in maintaining two sets of Windows
|
||||
makefiles. Note: These are currently being used by the Windows autobuilds
|
||||
|
@@ -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.
|
||||
@@ -91,6 +94,7 @@ announcement.
|
||||
[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
|
||||
|
@@ -53,7 +53,7 @@ SSL ciphers
|
||||
|
||||
References:
|
||||
|
||||
http://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
|
||||
https://tools.ietf.org/html/draft-popov-tls-prohibiting-rc4-01
|
||||
|
||||
Allow BEAST
|
||||
|
||||
|
@@ -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
|
||||
@@ -94,15 +117,15 @@ 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 automatically adds the 'sql:' prefix to
|
||||
the certdb directory (either the hardcoded default /etc/pki/nssdb or the
|
||||
@@ -112,11 +135,11 @@ format your distribution provides, examine the default certdb location:
|
||||
cert9.db, key4.db, pkcs11.txt; filenames of older versions are cert8.db,
|
||||
key3.db, secmod.db.
|
||||
|
||||
Peer SSL Certificate Verification with Schannel and Secure Transport
|
||||
====================================================================
|
||||
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)
|
||||
|
100
docs/THANKS
100
docs/THANKS
@@ -36,10 +36,14 @@ Alex Suykov
|
||||
Alex Vinnik
|
||||
Alex aka WindEagle
|
||||
Alexander Beedie
|
||||
Alexander Dyagilev
|
||||
Alexander Elgert
|
||||
Alexander Klauer
|
||||
Alexander Kourakos
|
||||
Alexander Krasnostavsky
|
||||
Alexander Lazic
|
||||
Alexander Pepper
|
||||
Alexander Peslyak
|
||||
Alexander Zhuravlev
|
||||
Alexey Borzov
|
||||
Alexey Pesternikov
|
||||
@@ -52,6 +56,7 @@ Alona Rossen
|
||||
Amol Pattekar
|
||||
Amr Shahin
|
||||
Anatoli Tubman
|
||||
Anders Bakken
|
||||
Anders Gustafsson
|
||||
Anders Havn
|
||||
Andi Jahja
|
||||
@@ -70,7 +75,6 @@ Andrei Benea
|
||||
Andrei Cipu
|
||||
Andrei Kurushin
|
||||
Andrej E Baranov
|
||||
Andres Garcia
|
||||
Andrew Benham
|
||||
Andrew Biggs
|
||||
Andrew Bushnell
|
||||
@@ -80,6 +84,7 @@ Andrew Kurushin
|
||||
Andrew Moise
|
||||
Andrew Wansink
|
||||
Andrew de los Reyes
|
||||
Andrey Labunets
|
||||
Andrii Moiseiev
|
||||
Andrés García
|
||||
Andy Cedilnik
|
||||
@@ -87,6 +92,7 @@ Andy Serpa
|
||||
Andy Tsouladze
|
||||
Angus Mackay
|
||||
Anthon Pang
|
||||
Anthony Avina
|
||||
Anthony Bryan
|
||||
Anthony G. Basile
|
||||
Antoine Calando
|
||||
@@ -101,6 +107,7 @@ Arnaud Ebalard
|
||||
Arthur Murray
|
||||
Arve Knudsen
|
||||
Arvid Norberg
|
||||
Ashish Shukla
|
||||
Ask Bjørn Hansen
|
||||
Askar Safin
|
||||
Ates Goral
|
||||
@@ -108,10 +115,12 @@ Augustus Saunders
|
||||
Avery Fay
|
||||
Axel Tillequin
|
||||
Balaji Parasuram
|
||||
Balaji Salunke
|
||||
Balint Szilakszi
|
||||
Barry Abrahamson
|
||||
Bart Whiteley
|
||||
Bas Mevissen
|
||||
Ben Boeckel
|
||||
Ben Darnell
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
@@ -126,11 +135,13 @@ Benoit Neil
|
||||
Benoit Sigoure
|
||||
Bernard Leak
|
||||
Bernhard Reutner-Fischer
|
||||
Bert Huijben
|
||||
Bertrand Demiddelaer
|
||||
Bill Doyle
|
||||
Bill Egert
|
||||
Bill Hoffman
|
||||
Bill Middlecamp
|
||||
Bill Nagel
|
||||
Bjoern Sikora
|
||||
Bjorn Augustsson
|
||||
Bjorn Reese
|
||||
@@ -141,6 +152,7 @@ Bob Richmond
|
||||
Bob Schader
|
||||
Bogdan Nicula
|
||||
Brad Burdick
|
||||
Brad Harder
|
||||
Brad Hards
|
||||
Brad King
|
||||
Brad Spencer
|
||||
@@ -150,12 +162,15 @@ Brandon Wang
|
||||
Brendan Jurd
|
||||
Brent Beardsley
|
||||
Brian Akins
|
||||
Brian Chrisman
|
||||
Brian Dessent
|
||||
Brian J. Murrell
|
||||
Brian Prodoehl
|
||||
Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
Bruce Mitchener
|
||||
Bruno Thomsen
|
||||
Bruno de Carvalho
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
@@ -163,19 +178,20 @@ Byrial Jensen
|
||||
Cameron Kaiser
|
||||
Camille Moncelier
|
||||
Caolan McNamara
|
||||
Carlo Wood
|
||||
Carsten Lange
|
||||
Casey O'Donnell
|
||||
Catalin Patulea
|
||||
Cedric Deltheil
|
||||
Chad Monroe
|
||||
Chandrakant Bagul
|
||||
Charles Kerr
|
||||
Charles Romestant
|
||||
Chen Prog
|
||||
Chih-Chung Chang
|
||||
Chris "Bob Bob"
|
||||
Chris Araman
|
||||
Chris Combes
|
||||
Chris Conlon
|
||||
Chris Conroy
|
||||
Chris Deidun
|
||||
Chris Flerackers
|
||||
Chris Gaukroger
|
||||
@@ -220,6 +236,7 @@ Curt Bogmine
|
||||
Cyrill Osterwalder
|
||||
Cédric Deltheil
|
||||
D. Flinkmann
|
||||
Da-Yoon Chung
|
||||
Dag Ekengren
|
||||
Dagobert Michelsen
|
||||
Damian Dixon
|
||||
@@ -236,6 +253,7 @@ Daniel Black
|
||||
Daniel Cater
|
||||
Daniel Egger
|
||||
Daniel Johnson
|
||||
Daniel Melani
|
||||
Daniel Mentz
|
||||
Daniel Steinberg
|
||||
Daniel Stenberg
|
||||
@@ -287,6 +305,7 @@ Diego Casorran
|
||||
Dilyan Palauzov
|
||||
Dima Barsky
|
||||
Dima Tisnek
|
||||
Dimitar Boevski
|
||||
Dimitre Dimitrov
|
||||
Dimitrios Siganos
|
||||
Dimitris Sarris
|
||||
@@ -296,6 +315,7 @@ Dirk Manske
|
||||
Dmitri Shubin
|
||||
Dmitriy Sergeyev
|
||||
Dmitry Bartsevich
|
||||
Dmitry Eremin-Solenikov
|
||||
Dmitry Falko
|
||||
Dmitry Kurochkin
|
||||
Dmitry Popov
|
||||
@@ -311,6 +331,7 @@ Douglas Kilpatrick
|
||||
Douglas R. Horner
|
||||
Douglas Steinwand
|
||||
Dov Murik
|
||||
Drake Arconis
|
||||
Duane Cathey
|
||||
Duncan Mac-Vicar Prett
|
||||
Dustin Boswell
|
||||
@@ -325,10 +346,12 @@ Edward Rudd
|
||||
Edward Sheldrake
|
||||
Eelco Dolstra
|
||||
Eetu Ojanen
|
||||
Egon Eckert
|
||||
Eldar Zaitov
|
||||
Ellis Pritchard
|
||||
Elmira A Semenova
|
||||
Emanuele Bovisio
|
||||
Emil Lerner
|
||||
Emil Romanus
|
||||
Emiliano Ida
|
||||
Enrico Scholz
|
||||
@@ -367,7 +390,7 @@ Feng Tu
|
||||
Florian Schoppmann
|
||||
Florian Weimer
|
||||
Forrest Cahoon
|
||||
Francois Charlier
|
||||
Frank Gevaerts
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
Frank McGeough
|
||||
@@ -379,6 +402,7 @@ François Charlier
|
||||
Fred Machado
|
||||
Fred New
|
||||
Fred Noz
|
||||
Fred Stluka
|
||||
Frederic Lepied
|
||||
Fredrik Thulin
|
||||
Gabriel Kuri
|
||||
@@ -413,10 +437,10 @@ Glen A Johnson Jr.
|
||||
Glen Nakamura
|
||||
Glen Scott
|
||||
Glenn Sheridan
|
||||
Gokhan Sengun
|
||||
Gordon Marler
|
||||
Gorilla Maguila
|
||||
Grant Erickson
|
||||
Grant Pannell
|
||||
Greg Hewgill
|
||||
Greg Morse
|
||||
Greg Onufer
|
||||
@@ -435,6 +459,7 @@ Götz Babin-Ebell
|
||||
Hamish Mackenzie
|
||||
Hang Kin Lau
|
||||
Hang Su
|
||||
Hanno Böck
|
||||
Hanno Kranzhoff
|
||||
Hans Steegers
|
||||
Hans-Jurgen May
|
||||
@@ -475,6 +500,7 @@ Immanuel Gregoire
|
||||
Ingmar Runge
|
||||
Ingo Ralf Blum
|
||||
Ingo Wilken
|
||||
Isaac Boukris
|
||||
Ishan SinghLevett
|
||||
Ivo Bellin Salarin
|
||||
Jack Zhang
|
||||
@@ -515,6 +541,7 @@ Jaz Fresh
|
||||
Jean Jacques Drouin
|
||||
Jean-Claude Chauve
|
||||
Jean-Francois Bertrand
|
||||
Jean-Francois Durand
|
||||
Jean-Louis Lemaire
|
||||
Jean-Marc Ranger
|
||||
Jean-Noël Rouvignac
|
||||
@@ -527,9 +554,12 @@ Jeff Lawson
|
||||
Jeff Phillips
|
||||
Jeff Pohlmeyer
|
||||
Jeff Weber
|
||||
Jens Rantil
|
||||
Jeremy Friesner
|
||||
Jeremy Huddleston
|
||||
Jeremy Lin
|
||||
Jeroen Koekkoek
|
||||
Jeroen Ooms
|
||||
Jerome Muffat-Meridol
|
||||
Jerome Robert
|
||||
Jerome Vouillon
|
||||
@@ -543,6 +573,7 @@ Jim Drash
|
||||
Jim Freeman
|
||||
Jim Hollinger
|
||||
Jim Meyering
|
||||
Jiri Dvorak
|
||||
Jiri Hruska
|
||||
Jiri Jaburek
|
||||
Jiri Malak
|
||||
@@ -551,8 +582,10 @@ Joe Halpin
|
||||
Joe Malicki
|
||||
Joe Mason
|
||||
Joel Chen
|
||||
Joel Depooter
|
||||
Jofell Gallardo
|
||||
Johan Anderson
|
||||
Johan Lantz
|
||||
Johan Nilsson
|
||||
Johan van Selst
|
||||
Johannes Bauer
|
||||
@@ -569,8 +602,8 @@ John Joseph Bachir
|
||||
John Kelly
|
||||
John Lask
|
||||
John Lightsey
|
||||
John Malmberg
|
||||
John Marino
|
||||
John Marshall
|
||||
John McGowan
|
||||
John P. McCaskey
|
||||
John Suprock
|
||||
@@ -580,6 +613,8 @@ Johnny Luong
|
||||
Jon Grubbs
|
||||
Jon Nelson
|
||||
Jon Sargeant
|
||||
Jon Seymour
|
||||
Jon Spencer
|
||||
Jon Torrey
|
||||
Jon Travis
|
||||
Jon Turner
|
||||
@@ -588,6 +623,7 @@ Jonas Schnelli
|
||||
Jonatan Lander
|
||||
Jonatan Vela
|
||||
Jonathan Cardoso Machado
|
||||
Jonathan Cardoso Machado Machado
|
||||
Jonathan Hseu
|
||||
Jonathan Nieder
|
||||
Jongki Suwandi
|
||||
@@ -604,8 +640,10 @@ Judson Bishop
|
||||
Juergen Wilke
|
||||
Jukka Pihl
|
||||
Julian Noble
|
||||
Julian Ospald
|
||||
Julian Taylor
|
||||
Julien Chaffraix
|
||||
Julien Nabet
|
||||
Julien Royer
|
||||
Jun-ichiro itojun Hagino
|
||||
Jurij Smakov
|
||||
@@ -614,13 +652,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
|
||||
@@ -651,6 +689,7 @@ Krishnendu Majumdar
|
||||
Krister Johansen
|
||||
Kristian Gunstone
|
||||
Kristian Köhntopp
|
||||
Kyle J. McKay
|
||||
Kyle L. Huff
|
||||
Kyle Sallee
|
||||
Lachlan O'Dea
|
||||
@@ -669,6 +708,7 @@ Laurent Rabret
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Leif W
|
||||
Leith Bade
|
||||
Len Krause
|
||||
Lenaic Lefever
|
||||
Lenny Rachitsky
|
||||
@@ -681,13 +721,15 @@ Lindley French
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
Lisa Xu
|
||||
Liviu Chircu
|
||||
Liza Alenchery
|
||||
Lluís Batlle i Rossell
|
||||
Loic Dachary
|
||||
Loren Kirkby
|
||||
Luan Cestari
|
||||
Luca Altea
|
||||
Luca Alteas
|
||||
Lucas Adamski
|
||||
Lucas Pardue
|
||||
Ludek Finstrle
|
||||
Ludovico Cavedon
|
||||
Lukasz Czekierda
|
||||
@@ -707,8 +749,10 @@ Manuel Massing
|
||||
Marc Boucher
|
||||
Marc Deslauriers
|
||||
Marc Doughty
|
||||
Marc Hesse
|
||||
Marc Hoersken
|
||||
Marc Kleine-Budde
|
||||
Marc Renault
|
||||
Marcel Raad
|
||||
Marcel Roelofs
|
||||
Marcelo Juchem
|
||||
@@ -731,6 +775,7 @@ Mark Salisbury
|
||||
Mark Snelling
|
||||
Mark Tully
|
||||
Markus Duft
|
||||
Markus Elfring
|
||||
Markus Koetter
|
||||
Markus Moeller
|
||||
Markus Oberhumer
|
||||
@@ -759,6 +804,7 @@ Matt Wixson
|
||||
Matteo Rocco
|
||||
Matthew Blain
|
||||
Matthew Clarke
|
||||
Matthew Hall
|
||||
Matthias Bolte
|
||||
Maurice Barnum
|
||||
Mauro Iorio
|
||||
@@ -779,17 +825,19 @@ Michael Day
|
||||
Michael Goffioul
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
Michael Kaufmann
|
||||
Michael Mealling
|
||||
Michael Mueller
|
||||
Michael Osipov
|
||||
Michael Smith
|
||||
Michael Stapelberg
|
||||
Michael Stillwell
|
||||
Michael Wallner
|
||||
Michal Bonino
|
||||
Michal Gorny
|
||||
Michal Marek
|
||||
Michał Górny
|
||||
Michał Kowalczyk
|
||||
Michel Promonet
|
||||
Michele Bini
|
||||
Miguel Angel
|
||||
Miguel Diaz
|
||||
@@ -813,9 +861,10 @@ Mitz Wark
|
||||
Mohamed Lrhazi
|
||||
Mohammad AlSaleh
|
||||
Mohun Biswas
|
||||
Moonesamy
|
||||
Mostyn Bramley-Moore
|
||||
Myk Taylor
|
||||
Nach M. S.
|
||||
Nagai H
|
||||
Nathan Coulter
|
||||
Nathan O'Sullivan
|
||||
Nathanael Nerode
|
||||
@@ -842,6 +891,7 @@ Nikos Mavrogiannopoulos
|
||||
Ning Dong
|
||||
Nir Soffer
|
||||
Nis Jorgensen
|
||||
Nobuhiro Ban
|
||||
Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Novotny
|
||||
@@ -853,7 +903,9 @@ Oliver Gondža
|
||||
Oliver Kuckertz
|
||||
Oliver Schindler
|
||||
Olivier Berger
|
||||
Oren Souroujon
|
||||
Oren Tirosh
|
||||
Orgad Shaneh
|
||||
Ori Avtalion
|
||||
Oscar Koeroo
|
||||
Oscar Norlander
|
||||
@@ -869,6 +921,7 @@ Patricia Muscalu
|
||||
Patrick Bihan-Faou
|
||||
Patrick McManus
|
||||
Patrick Monnerat
|
||||
Patrick Rapin
|
||||
Patrick Scott
|
||||
Patrick Smith
|
||||
Patrick Watson
|
||||
@@ -881,6 +934,7 @@ Paul Marks
|
||||
Paul Marquis
|
||||
Paul Moore
|
||||
Paul Nolan
|
||||
Paul Oliver
|
||||
Paul Querna
|
||||
Paul Saab
|
||||
Pavel Cenek
|
||||
@@ -890,7 +944,6 @@ Pawel A. Gajda
|
||||
Pawel Kierski
|
||||
Pedro Larroy
|
||||
Pedro Neves
|
||||
Pete Su
|
||||
Peter Bray
|
||||
Peter Forret
|
||||
Peter Gal
|
||||
@@ -898,6 +951,7 @@ Peter Heuchert
|
||||
Peter Hjalmarsson
|
||||
Peter Korsgaard
|
||||
Peter Lamberg
|
||||
Peter Laser
|
||||
Peter O'Gorman
|
||||
Peter Pentchev
|
||||
Peter Silva
|
||||
@@ -906,6 +960,7 @@ Peter Sylvester
|
||||
Peter Todd
|
||||
Peter Verhas
|
||||
Peter Wang
|
||||
Peter Wu
|
||||
Peter Wullinger
|
||||
Peteris Krumins
|
||||
Petr Bahula
|
||||
@@ -937,6 +992,7 @@ Quinn Slack
|
||||
Radu Simionescu
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Rafayel Mkrtchyan
|
||||
Rafaël Carré
|
||||
Rainer Canavan
|
||||
Rainer Jung
|
||||
@@ -962,6 +1018,7 @@ Rene Rebe
|
||||
Reuven Wachtfogel
|
||||
Reza Arbab
|
||||
Ricardo Cadime
|
||||
Rich Burridge
|
||||
Rich Gray
|
||||
Rich Rauenzahn
|
||||
Richard Archer
|
||||
@@ -1020,7 +1077,8 @@ S. Moonesamy
|
||||
Salvador Dávila
|
||||
Salvatore Sorrentino
|
||||
Sam Deane
|
||||
Sam Listopad
|
||||
Sam Hurst
|
||||
Sam Schanken
|
||||
Sampo Kellomaki
|
||||
Samuel Díaz García
|
||||
Samuel Listopad
|
||||
@@ -1038,8 +1096,8 @@ Scott Barrett
|
||||
Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sean Boudreau
|
||||
Sebastian Rasmussen
|
||||
Sebastien Willemijns
|
||||
Senthil Raja Velu
|
||||
Sergei Nikulov
|
||||
Sergey Tatarincev
|
||||
@@ -1066,6 +1124,8 @@ Spork Schivago
|
||||
Stadler Stephan
|
||||
Stan van de Burgt
|
||||
Stanislav Ivochkin
|
||||
Stefan Bühler
|
||||
Stefan Eissing
|
||||
Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Neis
|
||||
@@ -1080,6 +1140,7 @@ Stephen More
|
||||
Sterling Hughes
|
||||
Steve Green
|
||||
Steve H Truong
|
||||
Steve Havelka
|
||||
Steve Holme
|
||||
Steve Lhomme
|
||||
Steve Little
|
||||
@@ -1096,9 +1157,11 @@ Sune Ahlgren
|
||||
Sven Anders
|
||||
Sven Neuhaus
|
||||
Sven Wegener
|
||||
Symeon Paraschoudis
|
||||
Sébastien Willemijns
|
||||
T. Bharath
|
||||
T. Yamada
|
||||
Tae Hyoung Ahn
|
||||
Taneli Vahakangas
|
||||
Tanguy Fautre
|
||||
Tatsuhiro Tsujikawa
|
||||
@@ -1108,6 +1171,7 @@ Thomas J. Moore
|
||||
Thomas Klausner
|
||||
Thomas L. Shinnick
|
||||
Thomas Lopatic
|
||||
Thomas Ruecker
|
||||
Thomas Schwinge
|
||||
Thomas Tonino
|
||||
Tiit Pikma
|
||||
@@ -1120,12 +1184,14 @@ Tim Costello
|
||||
Tim Harder
|
||||
Tim Heckman
|
||||
Tim Newsome
|
||||
Tim Ruehsen
|
||||
Tim Sneddon
|
||||
Tim Starling
|
||||
Timo Sirainen
|
||||
Tinus van den Berg
|
||||
Tobias Markus
|
||||
Tobias Rundström
|
||||
Tobias Stoeckmann
|
||||
Toby Peterson
|
||||
Todd A Ouska
|
||||
Todd Kulesza
|
||||
@@ -1146,6 +1212,8 @@ Tomas Hoger
|
||||
Tomas Mlcoch
|
||||
Tomas Pospisek
|
||||
Tomas Szepe
|
||||
Tomas Tomecek
|
||||
Tomasz Kojm
|
||||
Tomasz Lacki
|
||||
Tommie Gannert
|
||||
Tommy Tam
|
||||
@@ -1165,12 +1233,14 @@ Török Edwin
|
||||
Ulf Härnhammar
|
||||
Ulf Samuelsson
|
||||
Ulrich Doehner
|
||||
Ulrich Telle
|
||||
Ulrich Zadow
|
||||
Venkat Akella
|
||||
Victor Snezhko
|
||||
Vijay Panghal
|
||||
Vikram Saxena
|
||||
Viktor Szakáts
|
||||
Ville Skyttä
|
||||
Vilmos Nebehaj
|
||||
Vincent Bronner
|
||||
Vincent Le Normand
|
||||
@@ -1183,9 +1253,12 @@ Vladimir Grishchenko
|
||||
Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
Vojtěch Král
|
||||
Vsevolod Novikov
|
||||
Waldek Kozba
|
||||
Walter J. Mack
|
||||
Ward Willats
|
||||
Warren Menzer
|
||||
Wayne Haigh
|
||||
Werner Koch
|
||||
Wesley Laxton
|
||||
@@ -1210,6 +1283,7 @@ Yi Huang
|
||||
Yingwei Liu
|
||||
Yousuke Kimoto
|
||||
Yukihiro Kawada
|
||||
Yun SangHo
|
||||
Yuriy Sosov
|
||||
Yves Arrouye
|
||||
Yves Lejeune
|
||||
|
52
docs/THANKS-filter
Normal file
52
docs/THANKS-filter
Normal file
@@ -0,0 +1,52 @@
|
||||
# This is a list of names we have recorded that already are thanked
|
||||
# appropriately in THANKS. This list contains variations of their names and
|
||||
# their "canonical" name. This file is used for scripting purposes to avoid
|
||||
# duplicate entries and will not be included in release tarballs.
|
||||
# When removing dupes that aren't identical names from THANKS, add a line
|
||||
# here!
|
||||
#
|
||||
# Used-by: contributor.sh
|
||||
s/Andres Garcia/Andrés García/
|
||||
s/Chris Conroy/Christopher Conroy/
|
||||
s/Francois Charlier/François Charlier/
|
||||
s/Gokhan Sengun/Gökhan Şengün/
|
||||
s/John Malmberg/John E. Malmberg/
|
||||
s/Luca Alteas/Luca Altea/
|
||||
s/Michal Gorny/Michał Górny/
|
||||
s/Michal Górny/Michał Górny/
|
||||
s/Moonesamy/S. Moonesamy/
|
||||
s/Pete Su$/Peter Su/
|
||||
s/Sam Listopad/Samuel Listopad/
|
||||
s/Sebastien Willemijns/Sébastien Willemijns/
|
||||
s/YAMADA Yasuharu/Yasuharu Yamada/
|
||||
s/Karl M$/Karl Moerder/
|
||||
s/Bjorn Stenberg/Björn Stenberg/
|
||||
s/upstream tests 305 and 404//
|
||||
s/Gaël PORTAY/Gaël Portay/
|
||||
s/Romulo Ceccon/Romulo A. Ceccon/
|
||||
s/Nach M. S$/Nach M. S./
|
||||
s/Jay Satiro/Ray Satiro/
|
||||
s/Richard J. Moore/Richard Moore/
|
||||
s/Sergey Nikulov/Sergei Nikulov/
|
||||
s/Petr Písař/Petr Pisar/
|
||||
s/Nick Zitzmann (originally)/Nick Zitzmann/
|
||||
s/product-security at Apple//
|
||||
s/IT DOES NOT WORK//
|
||||
s/Albert Chin/Albert Chin-A-Young/
|
||||
s/Paras S\z/Paras Sethia/
|
||||
s/Paras Sethiaethia/Paras Sethia/
|
||||
s/Дмитрий Фалько/Dmitry Falko/
|
||||
s/byte_bucket in the #curl IRC channel//
|
||||
s/Michal Górny and Anthony G. Basile//
|
||||
s/Alejandro Alvarez$/Alejandro Alvarez Ayllon/
|
||||
s/Ant Bryan/Anthony Bryan/
|
||||
s/Cédric Deltheil/Cédric Deltheil/
|
||||
s/Christian Hagele/Christian Hägele/
|
||||
s/douglas steinwand/Douglas Steinwand/
|
||||
s/Frank Van Uffelen and Fabian Hiernaux//
|
||||
s/Rodrigo Silva (MestreLion)/Rodrigo Silva/
|
||||
s/tetetest tetetest//
|
||||
s/Jiří Hruška/Jiri Hruska/
|
||||
s/Viktor Szakats/Viktor Szakáts/
|
||||
s/Jonathan Cardoso/Jonathan Cardoso Machado/
|
||||
s/Linus Nielsen/Linus Nielsen Feltzing/
|
347
docs/TODO
347
docs/TODO
@@ -9,6 +9,11 @@
|
||||
Things to do in project cURL. Please tell us what you think, contribute and
|
||||
send us patches that improve things!
|
||||
|
||||
Be aware that these are things that we could do, or have once been considered
|
||||
things we could do. If you want to work on any of these areas, please
|
||||
consider bringing it up for discussions first on the mailing list so that we
|
||||
all agree it is still a good idea for the project!
|
||||
|
||||
All bugs documented in the KNOWN_BUGS document are subject for fixing!
|
||||
|
||||
1. libcurl
|
||||
@@ -19,10 +24,13 @@
|
||||
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
|
||||
1.10 Support IDNA2008
|
||||
|
||||
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
|
||||
@@ -34,6 +42,7 @@
|
||||
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
|
||||
@@ -41,7 +50,7 @@
|
||||
5.3 Rearrange request header order
|
||||
5.4 SPDY
|
||||
5.5 auth= in URLs
|
||||
5.6 Digest via Windows SSPI
|
||||
5.6 Refuse "downgrade" redirects
|
||||
|
||||
6. TELNET
|
||||
6.1 ditch stdin
|
||||
@@ -63,61 +72,74 @@
|
||||
10. LDAP
|
||||
10.1 SASL based authentication mechanisms
|
||||
|
||||
11. New protocols
|
||||
11.1 RSYNC
|
||||
|
||||
12. SSL
|
||||
12.1 Disable specific versions
|
||||
12.2 Provide mutex locking API
|
||||
12.3 Evaluate SSL patches
|
||||
12.4 Cache OpenSSL contexts
|
||||
12.5 Export session ids
|
||||
12.6 Provide callback for cert verification
|
||||
12.7 improve configure --with-ssl
|
||||
12.8 Support DANE
|
||||
|
||||
13. GnuTLS
|
||||
13.1 SSL engine stuff
|
||||
13.2 check connection
|
||||
|
||||
14. SASL
|
||||
14.1 Other authentication mechanisms
|
||||
14.2 GSSAPI via GSS-API libraries
|
||||
11. SMB
|
||||
11.1 File listing support
|
||||
11.2 Honor file timestamps
|
||||
11.3 Use NTLMv2
|
||||
|
||||
15. Client
|
||||
15.1 sync
|
||||
15.2 glob posts
|
||||
15.3 prevent file overwriting
|
||||
15.4 simultaneous parallel transfers
|
||||
15.5 provide formpost headers
|
||||
15.6 warning when setting an option
|
||||
12. New protocols
|
||||
12.1 RSYNC
|
||||
|
||||
16. Build
|
||||
16.1 roffit
|
||||
13. SSL
|
||||
13.1 Disable specific versions
|
||||
13.2 Provide mutex locking API
|
||||
13.3 Evaluate SSL patches
|
||||
13.4 Cache OpenSSL contexts
|
||||
13.5 Export session ids
|
||||
13.6 Provide callback for cert verification
|
||||
13.7 improve configure --with-ssl
|
||||
13.8 Support DANE
|
||||
|
||||
17. Test suite
|
||||
17.1 SSL tunnel
|
||||
17.2 nicer lacking perl message
|
||||
17.3 more protocols supported
|
||||
17.4 more platforms supported
|
||||
17.5 Add support for concurrent connections
|
||||
14. GnuTLS
|
||||
14.1 SSL engine stuff
|
||||
14.2 check connection
|
||||
|
||||
18. Next SONAME bump
|
||||
18.1 http-style HEAD output for FTP
|
||||
18.2 combine error codes
|
||||
18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
15. WinSSL/SChannel
|
||||
15.1 Add support for client certificate authentication
|
||||
15.2 Add support for custom server certificate validation
|
||||
15.3 Add support for the --ciphers option
|
||||
|
||||
19. Next major release
|
||||
19.1 cleanup return codes
|
||||
19.2 remove obsolete defines
|
||||
19.3 size_t
|
||||
19.4 remove several functions
|
||||
19.5 remove CURLOPT_FAILONERROR
|
||||
19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
19.7 remove progress meter from libcurl
|
||||
19.8 remove 'curl_httppost' from public
|
||||
19.9 have form functions use CURL handle argument
|
||||
19.10 Add CURLOPT_MAIL_CLIENT option
|
||||
16. SASL
|
||||
16.1 Other authentication mechanisms
|
||||
16.2 Add QOP support to GSSAPI authentication
|
||||
|
||||
17. Client
|
||||
17.1 sync
|
||||
17.2 glob posts
|
||||
17.3 prevent file overwriting
|
||||
17.4 simultaneous parallel transfers
|
||||
17.5 provide formpost headers
|
||||
17.6 warning when setting an option
|
||||
17.7 warning when sending binary output to terminal
|
||||
17.8 offer color-coded HTTP header output
|
||||
17.9 Choose the name of file in braces for complex URLs
|
||||
|
||||
18. Build
|
||||
18.1 roffit
|
||||
|
||||
19. Test suite
|
||||
19.1 SSL tunnel
|
||||
19.2 nicer lacking perl message
|
||||
19.3 more protocols supported
|
||||
19.4 more platforms supported
|
||||
19.5 Add support for concurrent connections
|
||||
|
||||
20. Next SONAME bump
|
||||
20.1 http-style HEAD output for FTP
|
||||
20.2 combine error codes
|
||||
20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
21. Next major release
|
||||
21.1 cleanup return codes
|
||||
21.2 remove obsolete defines
|
||||
21.3 size_t
|
||||
21.4 remove several functions
|
||||
21.5 remove CURLOPT_FAILONERROR
|
||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
21.7 remove progress meter from libcurl
|
||||
21.8 remove 'curl_httppost' from public
|
||||
21.9 have form functions use CURL handle argument
|
||||
21.10 Add CURLOPT_MAIL_CLIENT option
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -133,7 +155,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
|
||||
|
||||
@@ -187,11 +209,23 @@
|
||||
|
||||
To prevent local users from snooping on your traffic to the proxy. Supported
|
||||
by Chrome already:
|
||||
http://www.chromium.org/developers/design-documents/secure-web-proxy
|
||||
https://www.chromium.org/developers/design-documents/secure-web-proxy
|
||||
|
||||
...and by Firefox soon:
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=378637
|
||||
|
||||
1.9 Cache negative name resolves
|
||||
|
||||
A name resolve that has failed is likely to fail when made again within a
|
||||
short period of time. Currently we only cache positive responses.
|
||||
|
||||
1.10 Support IDNA2008
|
||||
|
||||
International Domain Names are supported in libcurl since years back, powered
|
||||
by libidn. libidn implements IDNA2003 which has been superseded by IDNA2008.
|
||||
libidn2 is an existing library offering support for IDNA2008.
|
||||
|
||||
|
||||
2. libcurl - multi interface
|
||||
|
||||
2.1 More non-blocking
|
||||
@@ -214,6 +248,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
|
||||
@@ -229,7 +272,7 @@
|
||||
HOST is a command for a client to tell which host name to use, to offer FTP
|
||||
servers named-based virtual hosting:
|
||||
|
||||
http://tools.ietf.org/html/rfc7151
|
||||
https://tools.ietf.org/html/rfc7151
|
||||
|
||||
4.2 Alter passive/active on failure and retry
|
||||
|
||||
@@ -260,6 +303,14 @@ 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
|
||||
@@ -305,11 +356,13 @@ support for GSSAPI authentication via Windows SSPI.
|
||||
|
||||
Additionally this should be implemented for proxy base URLs as well.
|
||||
|
||||
5.6 Digest via Windows SSPI
|
||||
5.6 Refuse "downgrade" redirects
|
||||
|
||||
See https://github.com/bagder/curl/issues/226
|
||||
|
||||
Consider a way to tell curl to refuse to "downgrade" protocol with a redirect
|
||||
and/or possibly a bit that refuses redirect to change protocol completely.
|
||||
|
||||
libcurl already supports HTTP Digest Authentication via native routines as well
|
||||
as SASL Digest via both Windows SSPI and native routines. In addition to this
|
||||
libcurl should also support HTTP Digest Authentication via Windows SSPI.
|
||||
|
||||
6. TELNET
|
||||
|
||||
@@ -374,32 +427,47 @@ to provide the data to send.
|
||||
be possible to use ldap_bind_s() instead specifying the security context
|
||||
information ourselves.
|
||||
|
||||
11. New protocols
|
||||
11. SMB
|
||||
|
||||
11.1 RSYNC
|
||||
11.1 File listing support
|
||||
|
||||
Add support for listing the contents of a SMB share. The output should probably
|
||||
be the same as/similar to FTP.
|
||||
|
||||
11.2 Honor file timestamps
|
||||
|
||||
The timestamp of the transferred file should reflect that of the original file.
|
||||
|
||||
11.3 Use NTLMv2
|
||||
|
||||
Currently the SMB authentication uses NTLMv1.
|
||||
|
||||
12. New protocols
|
||||
|
||||
12.1 RSYNC
|
||||
|
||||
There's no RFC for the protocol or an URI/URL format. An implementation
|
||||
should most probably use an existing rsync library, such as librsync.
|
||||
|
||||
12. SSL
|
||||
13. SSL
|
||||
|
||||
12.1 Disable specific versions
|
||||
13.1 Disable specific versions
|
||||
|
||||
Provide an option that allows for disabling specific SSL versions, such as
|
||||
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
|
||||
|
||||
12.2 Provide mutex locking API
|
||||
13.2 Provide mutex locking API
|
||||
|
||||
Provide a libcurl API for setting mutex callbacks in the underlying SSL
|
||||
library, so that the same application code can use mutex-locking
|
||||
independently of OpenSSL or GnutTLS being used.
|
||||
|
||||
12.3 Evaluate SSL patches
|
||||
13.3 Evaluate SSL patches
|
||||
|
||||
Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
|
||||
12.4 Cache OpenSSL contexts
|
||||
13.4 Cache OpenSSL contexts
|
||||
|
||||
"Look at SSL cafile - quick traces look to me like these are done on every
|
||||
request as well, when they should only be necessary once per SSL context (or
|
||||
@@ -409,7 +477,7 @@ to provide the data to send.
|
||||
style connections are re-used. It will make us use slightly more memory but
|
||||
it will libcurl do less creations and deletions of SSL contexts.
|
||||
|
||||
12.5 Export session ids
|
||||
13.5 Export session ids
|
||||
|
||||
Add an interface to libcurl that enables "session IDs" to get
|
||||
exported/imported. Cris Bailiff said: "OpenSSL has functions which can
|
||||
@@ -417,22 +485,22 @@ to provide the data to send.
|
||||
the state from such a buffer at a later date - this is used by mod_ssl for
|
||||
apache to implement and SSL session ID cache".
|
||||
|
||||
12.6 Provide callback for cert verification
|
||||
13.6 Provide callback for cert verification
|
||||
|
||||
OpenSSL supports a callback for customised verification of the peer
|
||||
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
|
||||
it be? There's so much that could be done if it were!
|
||||
|
||||
12.7 improve configure --with-ssl
|
||||
13.7 improve configure --with-ssl
|
||||
|
||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
|
||||
12.8 Support DANE
|
||||
13.8 Support DANE
|
||||
|
||||
DNS-Based Authentication of Named Entities (DANE) is a way to provide SSL
|
||||
keys and certs over DNS using DNSSEC as an alternative to the CA model.
|
||||
http://www.rfc-editor.org/rfc/rfc6698.txt
|
||||
https://www.rfc-editor.org/rfc/rfc6698.txt
|
||||
|
||||
An initial patch was posted by Suresh Krishnaswamy on March 7th 2013
|
||||
(http://curl.haxx.se/mail/lib-2013-03/0075.html) but it was a too simple
|
||||
@@ -440,32 +508,69 @@ to provide the data to send.
|
||||
http://curl.haxx.se/mail/lib-2013-03/0103.html . libunbound may be the
|
||||
correct library to base this development on.
|
||||
|
||||
13. GnuTLS
|
||||
14. GnuTLS
|
||||
|
||||
13.1 SSL engine stuff
|
||||
14.1 SSL engine stuff
|
||||
|
||||
Is this even possible?
|
||||
|
||||
13.2 check connection
|
||||
14.2 check connection
|
||||
|
||||
Add a way to check if the connection seems to be alive, to correspond to the
|
||||
SSL_peak() way we use with OpenSSL.
|
||||
|
||||
14. SASL
|
||||
15. WinSSL/SChannel
|
||||
|
||||
14.1 Other authentication mechanisms
|
||||
15.1 Add support for client certificate authentication
|
||||
|
||||
Add support for other authentication mechanisms such as EXTERNAL, OLP,
|
||||
WinSSL/SChannel currently makes use of the OS-level system and user
|
||||
certificate and private key stores. This does not allow the application
|
||||
or the user to supply a custom client certificate using curl or libcurl.
|
||||
|
||||
Therefore support for the existing -E/--cert and --key options should be
|
||||
implemented by supplying a custom certificate to the SChannel APIs, see:
|
||||
- Getting a Certificate for Schannel
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
|
||||
|
||||
15.2 Add support for custom server certificate validation
|
||||
|
||||
WinSSL/SChannel currently makes use of the OS-level system and user
|
||||
certificate trust store. This does not allow the application or user to
|
||||
customize the server certificate validation process using curl or libcurl.
|
||||
|
||||
Therefore support for the existing --cacert or --capath options should be
|
||||
implemented by supplying a custom certificate to the SChannel APIs, see:
|
||||
- Getting a Certificate for Schannel
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx
|
||||
|
||||
15.3 Add support for the --ciphers option
|
||||
|
||||
The cipher suites used by WinSSL/SChannel are configured on an OS-level
|
||||
instead of an application-level. This does not allow the application or
|
||||
the user to customize the configured cipher suites using curl or libcurl.
|
||||
|
||||
Therefore support for the existing --ciphers option should be implemented
|
||||
by mapping the OpenSSL/GnuTLS cipher suites to the SChannel APIs, see
|
||||
- Specifying Schannel Ciphers and Cipher Strengths
|
||||
https://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
|
||||
|
||||
16. SASL
|
||||
|
||||
16.1 Other authentication mechanisms
|
||||
|
||||
Add support for other authentication mechanisms such as OLP,
|
||||
GSS-SPNEGO and others.
|
||||
|
||||
14.2 GSSAPI via GSS-API libraries
|
||||
16.2 Add QOP support to GSSAPI authentication
|
||||
|
||||
Add support for GSSAPI authentication via third-party GSS-API libraries, such
|
||||
as Heimdal and MIT Kerberos.
|
||||
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
|
||||
17. Client
|
||||
|
||||
15.1 sync
|
||||
17.1 sync
|
||||
|
||||
"curl --sync http://example.com/feed[1-100].rss" or
|
||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||
@@ -474,12 +579,12 @@ to provide the data to send.
|
||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||
should also be used to set the mod date on the downloaded file.
|
||||
|
||||
15.2 glob posts
|
||||
17.2 glob posts
|
||||
|
||||
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||
This is easily scripted though.
|
||||
|
||||
15.3 prevent file overwriting
|
||||
17.3 prevent file overwriting
|
||||
|
||||
Add an option that prevents cURL from overwriting existing local files. When
|
||||
used, and there already is an existing file with the target file name
|
||||
@@ -487,14 +592,14 @@ to provide the data to send.
|
||||
existing). So that index.html becomes first index.html.1 and then
|
||||
index.html.2 etc.
|
||||
|
||||
15.4 simultaneous parallel transfers
|
||||
17.4 simultaneous parallel transfers
|
||||
|
||||
The client could be told to use maximum N simultaneous parallel transfers and
|
||||
then just make sure that happens. It should of course not make more than one
|
||||
connection to the same remote host. This would require the client to use the
|
||||
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||
|
||||
15.5 provide formpost headers
|
||||
17.5 provide formpost headers
|
||||
|
||||
Extending the capabilities of the multipart formposting. How about leaving
|
||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||
@@ -508,43 +613,67 @@ to provide the data to send.
|
||||
which should overwrite the program reasonable defaults (plain/text,
|
||||
8bit...)
|
||||
|
||||
15.6 warning when setting an option
|
||||
17.6 warning when setting an option
|
||||
|
||||
Display a warning when libcurl returns an error when setting an option.
|
||||
This can be useful to tell when support for a particular feature hasn't been
|
||||
compiled into the library.
|
||||
|
||||
16. Build
|
||||
17.7 warning when sending binary output to terminal
|
||||
|
||||
16.1 roffit
|
||||
Provide a way that prompts the user for confirmation before binary data is
|
||||
sent to the terminal, much in the style 'less' does it.
|
||||
|
||||
17.8 offer color-coded HTTP header output
|
||||
|
||||
By offering different color output on the header name and the header
|
||||
contents, they could be made more readable and thus help users working on
|
||||
HTTP services.
|
||||
|
||||
17.9 Choose the name of file in braces for complex URLs
|
||||
|
||||
When using braces to download a list of URLs and you use complicated names
|
||||
in the list of alternatives, it could be handy to allow curl to use other
|
||||
names when saving.
|
||||
|
||||
Consider a way to offer that. Possibly like
|
||||
{partURL1:name1,partURL2:name2,partURL3:name3} where the name following the
|
||||
colon is the output name.
|
||||
|
||||
See https://github.com/bagder/curl/issues/221
|
||||
|
||||
|
||||
18. Build
|
||||
|
||||
18.1 roffit
|
||||
|
||||
Consider extending 'roffit' to produce decent ASCII output, and use that
|
||||
instead of (g)nroff when building src/tool_hugehelp.c
|
||||
|
||||
17. Test suite
|
||||
19. Test suite
|
||||
|
||||
17.1 SSL tunnel
|
||||
19.1 SSL tunnel
|
||||
|
||||
Make our own version of stunnel for simple port forwarding to enable HTTPS
|
||||
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
||||
provide test tools built with either OpenSSL or GnuTLS
|
||||
|
||||
17.2 nicer lacking perl message
|
||||
19.2 nicer lacking perl message
|
||||
|
||||
If perl wasn't found by the configure script, don't attempt to run the tests
|
||||
but explain something nice why it doesn't.
|
||||
|
||||
17.3 more protocols supported
|
||||
19.3 more protocols supported
|
||||
|
||||
Extend the test suite to include more protocols. The telnet could just do FTP
|
||||
or http operations (for which we have test servers).
|
||||
|
||||
17.4 more platforms supported
|
||||
19.4 more platforms supported
|
||||
|
||||
Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
||||
fork()s and it should become even more portable.
|
||||
|
||||
17.5 Add support for concurrent connections
|
||||
19.5 Add support for concurrent connections
|
||||
|
||||
Tests 836, 882 and 938 were designed to verify that separate connections aren't
|
||||
used when using different login credentials in protocols that shouldn't re-use
|
||||
@@ -558,14 +687,14 @@ to provide the data to send.
|
||||
and thus the wait for connections loop is never entered to receive the second
|
||||
connection.
|
||||
|
||||
18. Next SONAME bump
|
||||
20. Next SONAME bump
|
||||
|
||||
18.1 http-style HEAD output for FTP
|
||||
20.1 http-style HEAD output for FTP
|
||||
|
||||
#undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
|
||||
from being output in NOBODY requests over FTP
|
||||
|
||||
18.2 combine error codes
|
||||
20.2 combine error codes
|
||||
|
||||
Combine some of the error codes to remove duplicates. The original
|
||||
numbering should not be changed, and the old identifiers would be
|
||||
@@ -590,29 +719,29 @@ to provide the data to send.
|
||||
|
||||
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
|
||||
|
||||
18.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
20.3 extend CURLOPT_SOCKOPTFUNCTION prototype
|
||||
|
||||
The current prototype only provides 'purpose' that tells what the
|
||||
connection/socket is for, but not any protocol or similar. It makes it hard
|
||||
for applications to differentiate on TCP vs UDP and even HTTP vs FTP and
|
||||
similar.
|
||||
|
||||
19. Next major release
|
||||
21. Next major release
|
||||
|
||||
19.1 cleanup return codes
|
||||
21.1 cleanup return codes
|
||||
|
||||
curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||
CURLMcode. These should be changed to be the same.
|
||||
|
||||
19.2 remove obsolete defines
|
||||
21.2 remove obsolete defines
|
||||
|
||||
remove obsolete defines from curl/curl.h
|
||||
|
||||
19.3 size_t
|
||||
21.3 size_t
|
||||
|
||||
make several functions use size_t instead of int in their APIs
|
||||
|
||||
19.4 remove several functions
|
||||
21.4 remove several functions
|
||||
|
||||
remove the following functions from the public API:
|
||||
|
||||
@@ -633,18 +762,18 @@ to provide the data to send.
|
||||
|
||||
curl_multi_socket_all
|
||||
|
||||
19.5 remove CURLOPT_FAILONERROR
|
||||
21.5 remove CURLOPT_FAILONERROR
|
||||
|
||||
Remove support for CURLOPT_FAILONERROR, it has gotten too kludgy and weird
|
||||
internally. Let the app judge success or not for itself.
|
||||
|
||||
19.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
21.6 remove CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||
|
||||
Remove support for a global DNS cache. Anything global is silly, and we
|
||||
already offer the share interface for the same functionality but done
|
||||
"right".
|
||||
|
||||
19.7 remove progress meter from libcurl
|
||||
21.7 remove progress meter from libcurl
|
||||
|
||||
The internally provided progress meter output doesn't belong in the library.
|
||||
Basically no application wants it (apart from curl) but instead applications
|
||||
@@ -654,7 +783,7 @@ to provide the data to send.
|
||||
variable types passed to it instead of doubles so that big files work
|
||||
correctly.
|
||||
|
||||
19.8 remove 'curl_httppost' from public
|
||||
21.8 remove 'curl_httppost' from public
|
||||
|
||||
curl_formadd() was made to fill in a public struct, but the fact that the
|
||||
struct is public is never really used by application for their own advantage
|
||||
@@ -663,7 +792,7 @@ to provide the data to send.
|
||||
Changing them to return a private handle will benefit the implementation and
|
||||
allow us much greater freedoms while still maintaining a solid API and ABI.
|
||||
|
||||
19.9 have form functions use CURL handle argument
|
||||
21.9 have form functions use CURL handle argument
|
||||
|
||||
curl_formadd() and curl_formget() both currently have no CURL handle
|
||||
argument, but both can use a callback that is set in the easy handle, and
|
||||
@@ -671,7 +800,7 @@ to provide the data to send.
|
||||
curl_easy_perform() (or similar) called - which is hard to grasp and a design
|
||||
mistake.
|
||||
|
||||
19.10 Add CURLOPT_MAIL_CLIENT option
|
||||
21.10 Add CURLOPT_MAIL_CLIENT option
|
||||
|
||||
Rather than use the URL to specify the mail client string to present in the
|
||||
HELO and EHLO commands, libcurl should support a new CURLOPT specifically for
|
||||
|
@@ -1,4 +1,3 @@
|
||||
Updated: Dec 24, 2013 (http://curl.haxx.se/docs/httpscripting.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -23,6 +22,8 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
3. Fetch a page
|
||||
3.1 GET
|
||||
3.2 HEAD
|
||||
3.3 Multiple URLs in a single command line
|
||||
3.4 Multiple HTTP methods in a single command line
|
||||
4. HTML forms
|
||||
4.1 Forms explained
|
||||
4.2 GET
|
||||
@@ -136,7 +137,7 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
The Uniform Resource Locator format is how you specify the address of a
|
||||
particular resource on the Internet. You know these, you've seen URLs like
|
||||
http://curl.haxx.se or https://yourbank.com a million times. RFC 3986 is the
|
||||
canonical spec.
|
||||
canonical spec. And yeah, the formal name is not URL, it is URI.
|
||||
|
||||
2.2 Host
|
||||
|
||||
@@ -193,7 +194,6 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
the associated response. The path is what is to the right side of the slash
|
||||
that follows the host name and possibly port number.
|
||||
|
||||
|
||||
3. Fetch a page
|
||||
|
||||
3.1 GET
|
||||
@@ -224,6 +224,46 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
may see a Content-Length: in the response headers, but there must not be an
|
||||
actual body in the HEAD response.
|
||||
|
||||
3.3 Multiple URLs in a single command line
|
||||
|
||||
A single curl command line may involve one or many URLs. The most common case
|
||||
is probably to just use one, but you can specify any amount of URLs. Yes
|
||||
any. No limits. You'll then get requests repeated over and over for all the
|
||||
given URLs.
|
||||
|
||||
Example, send two GETs:
|
||||
|
||||
curl http://url1.example.com http://url2.example.com
|
||||
|
||||
If you use --data to POST to the URL, using multiple URLs means that you send
|
||||
that same POST to all the given URLs.
|
||||
|
||||
Example, send two POSTs:
|
||||
|
||||
curl --data name=curl http://url1.example.com http://url2.example.com
|
||||
|
||||
|
||||
3.4 Multiple HTTP methods in a single command line
|
||||
|
||||
Sometimes you need to operate on several URLs in a single command line and do
|
||||
different HTTP methods on each. For this, you'll enjoy the --next option. It
|
||||
is basically a separator that separates a bunch of options from the next. All
|
||||
the URLs before --next will get the same method and will get all the POST
|
||||
data merged into one.
|
||||
|
||||
When curl reaches the --next on the command line, it'll sort of reset the
|
||||
method and the POST data and allow a new set.
|
||||
|
||||
Perhaps this is best shown with a few examples. To send first a HEAD and then
|
||||
a GET:
|
||||
|
||||
curl -I http://example.com --next http://example.com
|
||||
|
||||
To first send a POST and then a GET:
|
||||
|
||||
curl -d score=10 http://example.com/post.cgi --next http://example.com/results.html
|
||||
|
||||
|
||||
4. HTML forms
|
||||
|
||||
4.1 Forms explained
|
||||
@@ -302,6 +342,10 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
curl --data-urlencode "name=I am Daniel" http://www.example.com
|
||||
|
||||
If you repeat --data several times on the command line, curl will
|
||||
concatenate all the given data pieces - and put a '&' symbol between each
|
||||
data segment.
|
||||
|
||||
4.4 File Upload POST
|
||||
|
||||
Back in late 1995 they defined an additional way to post data over HTTP. It
|
||||
@@ -557,8 +601,10 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
truckload of advanced features to allow all those encryptions and key
|
||||
infrastructure mechanisms encrypted HTTP requires.
|
||||
|
||||
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
||||
libraries. To get a page from a HTTPS server, simply run curl like:
|
||||
Curl supports encrypted fetches when built to use a TLS library and it can be
|
||||
built to use one out of a fairly large set of libraries - "curl -V" will show
|
||||
which one your curl was built to use (if any!). To get a page from a HTTPS
|
||||
server, simply run curl like:
|
||||
|
||||
curl https://secure.example.com
|
||||
|
||||
@@ -584,6 +630,12 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
http://curl.haxx.se/docs/sslcerts.html
|
||||
|
||||
At times you may end up with your own CA cert store and then you can tell
|
||||
curl to use that to verify the server's certificate:
|
||||
|
||||
curl --cacert ca-bundle.pem https://example.com/
|
||||
|
||||
|
||||
11. Custom Request Elements
|
||||
|
||||
11.1 Modify method and headers
|
||||
@@ -692,7 +744,7 @@ The Art Of Scripting HTTP Requests Using Curl
|
||||
|
||||
14.1 Standards
|
||||
|
||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||
RFC 7230 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol
|
||||
|
||||
RFC 3986 explains the URL syntax
|
||||
|
@@ -1,22 +1,18 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Version Numbers and Releases
|
||||
============================
|
||||
|
||||
Curl is not only curl. Curl is also libcurl. They're actually individually
|
||||
versioned, but they mostly follow each other rather closely.
|
||||
|
||||
The version numbering is always built up using the same system:
|
||||
|
||||
X.Y[.Z]
|
||||
X.Y.Z
|
||||
|
||||
Where
|
||||
X is main version number
|
||||
Y is release number
|
||||
Z is patch number
|
||||
- X is main version number
|
||||
- Y is release number
|
||||
- Z is patch number
|
||||
|
||||
## Bumping numbers
|
||||
|
||||
One of these numbers will get bumped in each new release. The numbers to the
|
||||
right of a bumped number will be reset to zero. If Z is zero, it may not be
|
||||
@@ -57,4 +53,4 @@ Version Numbers and Releases
|
||||
release. It makes comparisons with greater than and less than work.
|
||||
|
||||
This number is also available as three separate defines:
|
||||
LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH.
|
||||
`LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.
|
||||
|
287
docs/curl.1
287
docs/curl.1
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2015, 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 curl 1 "2 Aug 2014" "Curl 7.38.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
|
||||
@@ -39,8 +39,7 @@ resume, Metalink, and more. As you will see below, the number of features will
|
||||
make your head spin!
|
||||
|
||||
curl is powered by libcurl for all transfer-related features. See
|
||||
.BR libcurl (3)
|
||||
for details.
|
||||
\fIlibcurl(3)\fP for details.
|
||||
.SH URL
|
||||
The URL syntax is protocol-dependent. You'll find a detailed description in
|
||||
RFC 3986.
|
||||
@@ -48,18 +47,20 @@ 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 +68,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 +169,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 +206,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 +218,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.
|
||||
|
||||
@@ -254,11 +268,11 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--ciphers <list of ciphers>"
|
||||
(SSL) Specifies which ciphers to use in the connection. The list of ciphers
|
||||
must specify valid ciphers. Read up on SSL cipher list details on this URL:
|
||||
\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
|
||||
\fIhttps://www.openssl.org/docs/apps/ciphers.html\fP
|
||||
|
||||
NSS ciphers are done differently than OpenSSL and GnuTLS. The full list of NSS
|
||||
ciphers is in the NSSCipherSuite entry at this URL:
|
||||
\fIhttp://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
|
||||
\fIhttps://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html#Directives\fP
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--compressed"
|
||||
@@ -266,11 +280,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 +297,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.
|
||||
@@ -297,9 +314,10 @@ presses the submit button. This will cause curl to pass the data to the server
|
||||
using the content-type application/x-www-form-urlencoded. Compare to
|
||||
\fI-F, --form\fP.
|
||||
|
||||
\fI-d, --data\fP is the same as \fI--data-ascii\fP. To post data purely binary,
|
||||
you should instead use the \fI--data-binary\fP option. To URL-encode the value
|
||||
of a form field you may use \fI--data-urlencode\fP.
|
||||
\fI-d, --data\fP is the same as \fI--data-ascii\fP. \fI--data-raw\fP is almost
|
||||
the same but does not have a special interpretation of the @ character. To
|
||||
post data purely binary, you should instead use the \fI--data-binary\fP option.
|
||||
To URL-encode the value of a form field you may use \fI--data-urlencode\fP.
|
||||
|
||||
If any of these options is used more than once on the same command line, the
|
||||
data pieces specified will be merged together with a separating
|
||||
@@ -311,20 +329,20 @@ read the data from, or - if you want curl to read the data from
|
||||
stdin. Multiple files can also be specified. Posting data from a file
|
||||
named 'foobar' would thus be done with \fI--data\fP @foobar. When --data is
|
||||
told to read from a file like that, carriage returns and newlines will be
|
||||
stripped out.
|
||||
stripped out. If you don't want the @ character to have a special
|
||||
interpretation use \fI--data-raw\fP instead.
|
||||
.IP "-D, --dump-header <file>"
|
||||
Write the protocol headers to the specified file.
|
||||
|
||||
This option is handy to use when you want to store the headers that an HTTP
|
||||
site sends to you. Cookies from the headers could then be read in a second
|
||||
curl invocation by using the \fI-b, --cookie\fP option! The
|
||||
\fI-c, --cookie-jar\fP option is 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>"
|
||||
@@ -337,6 +355,10 @@ and carriage returns are preserved and conversions are never done.
|
||||
|
||||
If this option is used several times, the ones following the first will append
|
||||
data as described in \fI-d, --data\fP.
|
||||
.IP "--data-raw <data>"
|
||||
(HTTP) This posts data similarly to \fI--data\fP but without the special
|
||||
interpretation of the @ character. See \fI-d, --data\fP.
|
||||
(Added in 7.43.0)
|
||||
.IP "--data-urlencode <data>"
|
||||
(HTTP) This posts data, similar to the other --data options with the exception
|
||||
that this performs URL-encoding. (Added in 7.18.0)
|
||||
@@ -522,12 +544,45 @@ 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.
|
||||
|
||||
Added in 7.39.0 for OpenSSL, GnuTLS and GSKit. Added in 7.43.0 for NSS and
|
||||
wolfSSL/CyaSSL. Other SSL backends not supported.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--cert-status"
|
||||
(SSL) Tells curl to verify the status of the server certificate by using the
|
||||
Certificate Status Request (aka. OCSP stapling) TLS extension.
|
||||
|
||||
If this option is enabled and the server sends an invalid (e.g. expired)
|
||||
response, if the response suggests that the server certificate has been revoked,
|
||||
or no response at all is received, the verification fails.
|
||||
|
||||
This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
|
||||
(Added in 7.41.0)
|
||||
.IP "--false-start"
|
||||
|
||||
(SSL) Tells curl to use false start during the TLS handshake. False start is a
|
||||
mode where a TLS client will start sending application data before verifying
|
||||
the server's Finished message, thus saving a round trip when performing a full
|
||||
handshake.
|
||||
|
||||
This is currently only implemented in the NSS and Secure Transport (on iOS 7.0
|
||||
or later, or OS X 10.9 or later) backends.
|
||||
(Added in 7.42.0)
|
||||
.IP "-f, --fail"
|
||||
(HTTP) Fail silently (no output at all) on server errors. This is mostly done
|
||||
to better enable scripts etc to better deal with failed attempts. In
|
||||
normal cases when 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 +591,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
|
||||
@@ -611,6 +666,7 @@ curl does one CWD with the full target directory and then operates on the file
|
||||
\&"normally" (like in the multicwd case). This is somewhat more standards
|
||||
compliant than 'nocwd' but without the full penalty of 'multicwd'.
|
||||
.RE
|
||||
.IP
|
||||
(Added in 7.15.1)
|
||||
.IP "--ftp-pasv"
|
||||
(FTP) Use passive mode for the data connection. Passive is the internal default
|
||||
@@ -703,6 +759,12 @@ Example:
|
||||
|
||||
\&# curl -H "X-First-Name: Joe" http://192.168.0.1/
|
||||
|
||||
\fBWARNING\fP: headers set with this option will be set in all requests - even
|
||||
after redirects are followed, like when told with \fB-L, --location\fP. This
|
||||
can lead to the header being sent to other hosts than the original host, so
|
||||
sensitive headers should be used with caution combined with following
|
||||
redirects.
|
||||
|
||||
This option can be used multiple times to add/replace/remove multiple headers.
|
||||
.IP "--hostpubmd5 <md5>"
|
||||
(SCP/SFTP) Pass a string containing 32 hexadecimal digits. The string should
|
||||
@@ -783,12 +845,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
|
||||
@@ -817,7 +879,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>"
|
||||
@@ -995,14 +1058,11 @@ 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
|
||||
.BR netrc(4)
|
||||
or
|
||||
.BR ftp(1)
|
||||
for details on the file format. Curl will not complain if that file
|
||||
doesn't have the right permissions (it should not be either world- or
|
||||
group-readable). The environment variable "HOME" is used to find the home
|
||||
directory.
|
||||
Unix. If used with HTTP, curl will enable user authentication. See
|
||||
\fInetrc(5)\fP \fIftp(1)\fP for details on the file format. Curl will not
|
||||
complain if that file doesn't have the right permissions (it should not be
|
||||
either world- or group-readable). The environment variable "HOME" is used to
|
||||
find the home directory.
|
||||
|
||||
A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
|
||||
to FTP to the machine host.domain.com with user name \&'myself' and password
|
||||
@@ -1164,7 +1224,7 @@ i.e "my.host.domain" to specify the machine
|
||||
make curl pick the same IP address that is already used for the control
|
||||
connection
|
||||
.RE
|
||||
|
||||
.IP
|
||||
If this option is used several times, the last one will be used. Disable the
|
||||
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
|
||||
instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
|
||||
@@ -1178,6 +1238,12 @@ available.
|
||||
(SSL/SSH) Passphrase for the private key
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--path-as-is"
|
||||
Tell curl to not handle sequences of /../ or /./ in the given URL
|
||||
path. Normally curl will squash or merge them according to standards but with
|
||||
this option set you tell it not to do that.
|
||||
|
||||
(Added in 7.42.0)
|
||||
.IP "--post301"
|
||||
(HTTP) Tells curl to respect RFC 2616/10.3.2 and not convert POST requests
|
||||
into GET requests when following a 301 redirection. The non-RFC behaviour is
|
||||
@@ -1263,6 +1329,11 @@ with a remote host. (Added in 7.17.1)
|
||||
.IP "--proxy-ntlm"
|
||||
Tells curl to use HTTP NTLM authentication when communicating with the given
|
||||
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
|
||||
.IP "--proxy-service-name <servicename>"
|
||||
This option allows you to change the service name for proxy negotiation.
|
||||
|
||||
Examples: --proxy-negotiate proxy-name \fI--proxy-service-name\fP sockd would use
|
||||
sockd/proxy-name. (Added in 7.43.0).
|
||||
.IP "--proxy1.0 <proxyhost[:port]>"
|
||||
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
|
||||
assumed at port 1080.
|
||||
@@ -1275,6 +1346,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
|
||||
@@ -1355,7 +1431,7 @@ specifies 300 bytes from offset 500(H)
|
||||
.B 100-199,500-599
|
||||
specifies two separate 100-byte ranges(*)(H)
|
||||
.RE
|
||||
|
||||
.IP
|
||||
(*) = NOTE that this will cause the server to reply with a multipart
|
||||
response!
|
||||
|
||||
@@ -1439,6 +1515,11 @@ terminal/stdout unless you redirect it.
|
||||
.IP "--sasl-ir"
|
||||
Enable initial response in SASL authentication.
|
||||
(Added in 7.31.0)
|
||||
.IP "--service-name <servicename>"
|
||||
This option allows you to change the service name for SPNEGO.
|
||||
|
||||
Examples: --negotiate \fI--service-name\fP sockd would use
|
||||
sockd/server-name. (Added in 7.43.0).
|
||||
.IP "-S, --show-error"
|
||||
When used with \fI-s\fP it makes curl show an error message if it fails.
|
||||
.IP "--ssl"
|
||||
@@ -1626,6 +1707,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.
|
||||
@@ -1637,7 +1721,7 @@ impossible to use a colon in the user name with this option. The password can,
|
||||
still.
|
||||
|
||||
When using Kerberos V5 with a Windows based server you should include the
|
||||
Windows domain name in the user name, in order for the server to succesfully
|
||||
Windows domain name in the user name, in order for the server to successfully
|
||||
obtain a Kerberos Ticket. If you don't then the initial authentication
|
||||
handshake may fail.
|
||||
|
||||
@@ -1650,9 +1734,9 @@ 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 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 :".
|
||||
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>"
|
||||
@@ -1670,10 +1754,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.
|
||||
@@ -1685,10 +1770,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
|
||||
@@ -1810,7 +1895,7 @@ displayed with millisecond resolution.
|
||||
The URL that was fetched last. This is most meaningful if you've told curl
|
||||
to follow location: headers.
|
||||
.RE
|
||||
|
||||
.IP
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-x, --proxy <[protocol://][user:password@]proxyhost[:port]>"
|
||||
Use the specified proxy.
|
||||
@@ -1844,7 +1929,7 @@ password.
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-X, --request <command>"
|
||||
(HTTP) Specifies a custom request method to use when communicating with the
|
||||
HTTP server. The specified request will be used instead of the method
|
||||
HTTP server. The specified request method will be used instead of the method
|
||||
otherwise used (which defaults to GET). Read the HTTP 1.1 specification for
|
||||
details and explanations. Common additional HTTP requests include PUT and
|
||||
DELETE, but related technologies like WebDAV offers PROPFIND, COPY, MOVE and
|
||||
@@ -1858,6 +1943,11 @@ alter the way curl behaves. So for example if you want to make a proper HEAD
|
||||
request, using -X HEAD will not suffice. You need to use the \fI-I, --head\fP
|
||||
option.
|
||||
|
||||
The method string you set with -X will be used for all requests, which if you
|
||||
for example use \fB-L, --location\fP may cause unintended side-effects when
|
||||
curl doesn't change request method according to the HTTP 30x response codes -
|
||||
and similar.
|
||||
|
||||
(FTP)
|
||||
Specifies a custom FTP command to use instead of LIST when doing file lists
|
||||
with FTP.
|
||||
@@ -1909,7 +1999,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"
|
||||
@@ -1929,7 +2020,8 @@ 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"
|
||||
@@ -1938,7 +2030,8 @@ NTLM authentication is supported.
|
||||
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 authentication is supported.
|
||||
.IP "Largefile"
|
||||
@@ -1951,6 +2044,8 @@ GSS-API is supported.
|
||||
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
|
||||
@@ -2166,6 +2261,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.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,9 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Example application source code using the multi interface to download many
|
||||
* files, but with a capped maximum amount of simultaneous transfers.
|
||||
*
|
||||
/* <DESC>
|
||||
* Source code using the multi interface to download many
|
||||
* files, with a capped maximum amount of simultaneous transfers.
|
||||
* </DESC>
|
||||
* Written by Michael Wallner
|
||||
*/
|
||||
|
||||
@@ -62,7 +63,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,43 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2015, 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 http2-download \
|
||||
http2-upload http2-serverpush
|
||||
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2015, 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
|
||||
@@ -21,7 +21,7 @@
|
||||
###########################################################################
|
||||
#
|
||||
## Makefile for building curl examples with MingW (GCC-3.2 or later)
|
||||
## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3)
|
||||
## and optionally OpenSSL (1.0.2a), libssh2 (1.5), zlib (1.2.8), librtmp (2.4)
|
||||
##
|
||||
## Usage: mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
|
||||
## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
|
||||
@@ -38,23 +38,23 @@ 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-1.0.2a
|
||||
endif
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
LIBSSH2_PATH = ../../../libssh2-1.4.3
|
||||
LIBSSH2_PATH = ../../../libssh2-1.5.0
|
||||
endif
|
||||
# Edit the path below to point to the base of your librtmp package.
|
||||
ifndef LIBRTMP_PATH
|
||||
LIBRTMP_PATH = ../../../librtmp-2.3
|
||||
LIBRTMP_PATH = ../../../librtmp-2.4
|
||||
endif
|
||||
# Edit the path below to point to the base of your libidn package.
|
||||
ifndef LIBIDN_PATH
|
||||
LIBIDN_PATH = ../../../libidn-1.18
|
||||
LIBIDN_PATH = ../../../libidn-1.30
|
||||
endif
|
||||
# Edit the path below to point to the base of your MS IDN package.
|
||||
# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
|
||||
# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815
|
||||
# https://www.microsoft.com/en-us/download/details.aspx?id=734
|
||||
ifndef WINIDN_PATH
|
||||
WINIDN_PATH = ../../../Microsoft IDN Mitigation APIs
|
||||
endif
|
||||
@@ -62,6 +62,10 @@ endif
|
||||
ifndef LDAP_SDK
|
||||
LDAP_SDK = c:/novell/ndk/cldapsdk/win32
|
||||
endif
|
||||
# Edit the path below to point to the base of your nghttp2 package.
|
||||
ifndef NGHTTP2_PATH
|
||||
NGHTTP2_PATH = ../../../nghttp2-1.0.0
|
||||
endif
|
||||
|
||||
PROOT = ../..
|
||||
|
||||
@@ -72,14 +76,24 @@ endif
|
||||
|
||||
# Edit the var below to set to your architecture or set environment var.
|
||||
ifndef ARCH
|
||||
ARCH = w32
|
||||
ifeq ($(findstring x86_64,$(shell $(CC) -dumpmachine)),x86_64)
|
||||
ARCH = w64
|
||||
else
|
||||
ARCH = w32
|
||||
endif
|
||||
endif
|
||||
|
||||
CC = $(CROSSPREFIX)gcc
|
||||
CFLAGS = -g -O2 -Wall
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
ifeq ($(ARCH),w64)
|
||||
CFLAGS += -D_AMD64_
|
||||
CFLAGS += -m64 -D_AMD64_
|
||||
LDFLAGS += -m64
|
||||
RCFLAGS += -F pe-x86-64
|
||||
else
|
||||
CFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
RCFLAGS += -F pe-i386
|
||||
endif
|
||||
# comment LDFLAGS below to keep debug info
|
||||
LDFLAGS = -s
|
||||
@@ -158,9 +172,12 @@ ifeq ($(findstring -metalink,$(CFG)),-metalink)
|
||||
METALINK = 1
|
||||
endif
|
||||
ifeq ($(findstring -winssl,$(CFG)),-winssl)
|
||||
SCHANNEL = 1
|
||||
WINSSL = 1
|
||||
SSPI = 1
|
||||
endif
|
||||
ifeq ($(findstring -nghttp2,$(CFG)),-nghttp2)
|
||||
NGHTTP2 = 1
|
||||
endif
|
||||
|
||||
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
|
||||
|
||||
@@ -184,6 +201,10 @@ ifdef RTMP
|
||||
CFLAGS += -DUSE_LIBRTMP
|
||||
curl_LDADD += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
|
||||
endif
|
||||
ifdef NGHTTP2
|
||||
CFLAGS += -DUSE_NGHTTP2
|
||||
curl_LDADD += -L"$(NGHTTP2_PATH)/lib" -lnghttp2
|
||||
endif
|
||||
ifdef SSH2
|
||||
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
|
||||
curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
|
||||
@@ -204,7 +225,7 @@ ifdef SSL
|
||||
ifndef DYN
|
||||
OPENSSL_LIBS += -lgdi32 -lcrypt32
|
||||
endif
|
||||
CFLAGS += -DUSE_SSLEAY
|
||||
CFLAGS += -DUSE_OPENSSL
|
||||
curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
|
||||
endif
|
||||
ifdef ZLIB
|
||||
@@ -223,7 +244,7 @@ endif
|
||||
endif
|
||||
ifdef SSPI
|
||||
CFLAGS += -DUSE_WINDOWS_SSPI
|
||||
ifdef SCHANNEL
|
||||
ifdef WINSSL
|
||||
CFLAGS += -DUSE_SCHANNEL
|
||||
endif
|
||||
endif
|
||||
|
@@ -19,12 +19,12 @@ 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-1.0.2a
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
LIBSSH2_PATH = ../../../libssh2-1.4.3
|
||||
LIBSSH2_PATH = ../../../libssh2-1.5.0
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your axTLS package.
|
||||
@@ -34,12 +34,12 @@ endif
|
||||
|
||||
# Edit the path below to point to the base of your libidn package.
|
||||
ifndef LIBIDN_PATH
|
||||
LIBIDN_PATH = ../../../libidn-1.18
|
||||
LIBIDN_PATH = ../../../libidn-1.30
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your librtmp package.
|
||||
ifndef LIBRTMP_PATH
|
||||
LIBRTMP_PATH = ../../../librtmp-2.3
|
||||
LIBRTMP_PATH = ../../../librtmp-2.4
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your fbopenssl package.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,11 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* HTTP PUT upload with authentiction using "any" method. libcurl picks the
|
||||
* one the server supports/wants.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef WIN32
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2012 - 2015, 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,11 +20,11 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* demonstrate the use of multi socket interface with boost::asio
|
||||
* </DESC>
|
||||
*/
|
||||
/*
|
||||
* file: asiohiper.cpp
|
||||
* Example program to demonstrate the use of multi socket interface
|
||||
* with boost::asio
|
||||
*
|
||||
* This program is in c++ and uses boost::asio instead of libevent/libev.
|
||||
* Requires boost::asio, boost::bind and boost::system
|
||||
*
|
||||
@@ -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 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,17 +19,11 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Example using a "in core" PEM certificate to retrieve a https page.
|
||||
* Written by Theo Borm
|
||||
/* <DESC>
|
||||
* CA cert in memory with OpenSSL to get a HTTPS page.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
/* on a netBSD system with OPENSSL& LIBCURL installed from
|
||||
* pkgsrc (using default paths) this program can be compiled using:
|
||||
* gcc -I/usr/pkg/include -L/usr/pkg/lib -lcurl -Wl,-R/usr/pkg/lib -lssl
|
||||
* -lcrypto -lz -o curlcacerttest curlcacerttest.c
|
||||
* on other operating systems you may want to change paths to headers
|
||||
* and libraries
|
||||
*/
|
||||
#include <openssl/ssl.h>
|
||||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Extract lots of TLS certificate info.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Show transfer timing info after download completes.
|
||||
* </DESC>
|
||||
*/
|
||||
/* Example source code to show how the callback function can be used to
|
||||
* download data into a chunk of memory instead of storing it in a file.
|
||||
* After successful download we use curl_easy_getinfo() calls to get the
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* This example shows usage of simple cookie interface. */
|
||||
/* <DESC>
|
||||
* Import and export cookies with COOKIELIST.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -96,7 +99,12 @@ main(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* HTTP-header style cookie */
|
||||
/* HTTP-header style cookie. If you use the Set-Cookie format and don't
|
||||
specify a domain then the cookie is sent for any domain and will not be
|
||||
modified, likely not what you intended. Starting in 7.43.0 any-domain
|
||||
cookies will not be exported either. For more information refer to the
|
||||
CURLOPT_COOKIELIST documentation.
|
||||
*/
|
||||
snprintf(nline, sizeof(nline),
|
||||
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
|
||||
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
|
||||
|
@@ -5,9 +5,12 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft
|
||||
*/
|
||||
/* <DESC>
|
||||
* use the libcurl in a gtk-threaded application
|
||||
* </DESC>
|
||||
*/
|
||||
/* Copyright (c) 2000 David Odin (aka DindinX) for MandrakeSoft */
|
||||
/* an attempt to use the curl library in concert with a gtk-threaded application */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@@ -9,7 +9,10 @@
|
||||
certificate presented during ssl session establishment.
|
||||
|
||||
*/
|
||||
|
||||
/* <DESC>
|
||||
* demonstrates use of SSL context callback, requires OpenSSL
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 The OpenEvidence Project. All rights reserved.
|
||||
@@ -490,7 +493,7 @@ int main(int argc, char **argv) {
|
||||
BIO_printf(p.errorbio,"the response has a correct mimetype : %s\n",
|
||||
response);
|
||||
else
|
||||
BIO_printf(p.errorbio,"the reponse doesn\'t has an acceptable "
|
||||
BIO_printf(p.errorbio,"the response doesn\'t have an acceptable "
|
||||
"mime type, it is %s instead of %s\n",
|
||||
response,mimetypeaccept);
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Show how CURLOPT_DEBUGFUNCTION can be used.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* multi socket interface together with libev
|
||||
* </DESC>
|
||||
*/
|
||||
/* Example application source code using the multi socket interface to
|
||||
* download many files at once.
|
||||
*
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,9 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/*
|
||||
* This is an example demonstrating how an application can pass in a custom
|
||||
/* <DESC>
|
||||
* An example demonstrating how an application can pass in a custom
|
||||
* socket to libcurl to use. This example also handles the connect itself.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -38,7 +39,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>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Upload to a file:// URL
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <curl/curl.h>
|
||||
#include <sys/stat.h>
|
||||
|
@@ -42,6 +42,10 @@
|
||||
*
|
||||
* This example requires libcurl 7.9.7 or later.
|
||||
*/
|
||||
/* <DESC>
|
||||
* implements an fopen() abstraction allowing reading from URLs
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -108,7 +112,7 @@ static size_t write_callback(char *buffer,
|
||||
size=rembuff;
|
||||
}
|
||||
else {
|
||||
/* realloc suceeded increase buffer size*/
|
||||
/* realloc succeeded increase buffer size*/
|
||||
url->buffer_len+=size - rembuff;
|
||||
url->buffer=newbuff;
|
||||
}
|
||||
@@ -128,9 +132,10 @@ 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
|
||||
* doesn't exceed required size already
|
||||
*/
|
||||
if((!file->still_running) || (file->buffer_pos > want))
|
||||
return 0;
|
||||
@@ -158,15 +163,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:
|
||||
@@ -184,14 +209,12 @@ static int fill_buffer(URL_FILE *file, size_t want)
|
||||
}
|
||||
|
||||
/* use to remove want bytes from the front of a files buffer */
|
||||
static int use_buffer(URL_FILE *file,int want)
|
||||
static int use_buffer(URL_FILE *file, size_t want)
|
||||
{
|
||||
/* sort out buffer */
|
||||
if((file->buffer_pos - want) <=0) {
|
||||
/* ditch buffer - write will recreate */
|
||||
if(file->buffer)
|
||||
free(file->buffer);
|
||||
|
||||
free(file->buffer);
|
||||
file->buffer=NULL;
|
||||
file->buffer_pos=0;
|
||||
file->buffer_len=0;
|
||||
@@ -210,7 +233,7 @@ static int use_buffer(URL_FILE *file,int want)
|
||||
URL_FILE *url_fopen(const char *url,const char *operation)
|
||||
{
|
||||
/* this code could check for URLs or types in the 'url' and
|
||||
basicly use the real fopen() for standard files */
|
||||
basically use the real fopen() for standard files */
|
||||
|
||||
URL_FILE *file;
|
||||
(void)operation;
|
||||
@@ -281,9 +304,7 @@ int url_fclose(URL_FILE *file)
|
||||
break;
|
||||
}
|
||||
|
||||
if(file->buffer)
|
||||
free(file->buffer);/* free any allocated buffer space */
|
||||
|
||||
free(file->buffer);/* free any allocated buffer space */
|
||||
free(file);
|
||||
|
||||
return ret;
|
||||
@@ -358,7 +379,7 @@ char *url_fgets(char *ptr, size_t size, URL_FILE *file)
|
||||
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
ptr = fgets(ptr,size,file->handle.file);
|
||||
ptr = fgets(ptr, (int)size, file->handle.file);
|
||||
break;
|
||||
|
||||
case CFTYPE_CURL:
|
||||
@@ -414,9 +435,7 @@ void url_rewind(URL_FILE *file)
|
||||
curl_multi_add_handle(multi_handle, file->handle.curl);
|
||||
|
||||
/* ditch buffer - write will recreate - resets stream pos*/
|
||||
if(file->buffer)
|
||||
free(file->buffer);
|
||||
|
||||
free(file->buffer);
|
||||
file->buffer=NULL;
|
||||
file->buffer_pos=0;
|
||||
file->buffer_len=0;
|
||||
@@ -436,7 +455,7 @@ int main(int argc, char *argv[])
|
||||
URL_FILE *handle;
|
||||
FILE *outf;
|
||||
|
||||
int nread;
|
||||
size_t nread;
|
||||
char buffer[256];
|
||||
const char *url;
|
||||
|
||||
@@ -484,7 +503,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
do {
|
||||
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
||||
nread = url_fread(buffer, 1, sizeof(buffer), handle);
|
||||
fwrite(buffer,1,nread,outf);
|
||||
} while(nread);
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* FTP wildcard pattern matching
|
||||
* </DESC>
|
||||
*/
|
||||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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
|
||||
@@ -23,11 +23,9 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
/*
|
||||
* This is an example showing how to get a single file from an FTP server.
|
||||
* It delays the actual destination file creation until the first write
|
||||
* callback so that it won't create an empty file in case the remote file
|
||||
* doesn't exist or something else fails.
|
||||
/* <DESC>
|
||||
* Get a single file from an FTP server.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
struct FtpFile {
|
||||
@@ -53,7 +51,7 @@ int main(void)
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
struct FtpFile ftpfile={
|
||||
"curl.tar.gz", /* name to store the file as if succesful */
|
||||
"curl.tar.gz", /* name to store the file as if successful */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
/*
|
||||
* This is an example showing how to check a single file's size and mtime
|
||||
* from an FTP server.
|
||||
/* <DESC>
|
||||
* Checks a single file's size and mtime from an FTP server.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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
|
||||
@@ -23,13 +23,11 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
/*
|
||||
* Similar to ftpget.c but this also stores the received response-lines
|
||||
/* <DESC>
|
||||
* Similar to ftpget.c but also stores the received response-lines
|
||||
* in a separate file using our own callback!
|
||||
*
|
||||
* This functionality was introduced in libcurl 7.9.3.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
static size_t
|
||||
write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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
|
||||
@@ -24,11 +24,9 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
/*
|
||||
* This is an example showing how to get a single file from an FTPS server.
|
||||
* It delays the actual destination file creation until the first write
|
||||
* callback so that it won't create an empty file in case the remote file
|
||||
* doesn't exist or something else fails.
|
||||
/* <DESC>
|
||||
* Get a single file from an FTPS server.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
struct FtpFile {
|
||||
@@ -55,7 +53,7 @@ int main(void)
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
struct FtpFile ftpfile={
|
||||
"yourfile.bin", /* name to store the file as if succesful */
|
||||
"yourfile.bin", /* name to store the file as if successful */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,11 +33,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This example shows an FTP upload, with a rename of the file just after
|
||||
* a successful upload.
|
||||
*
|
||||
* Example based on source code provided by Erick Nuwendam. Thanks!
|
||||
/* <DESC>
|
||||
* Performs an FTP upload and renames the file just after a successful
|
||||
* transfer.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#define LOCAL_FILE "/tmp/uploadthis.txt"
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,13 +19,9 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Upload to FTP, resuming failed transfers
|
||||
*
|
||||
* Compile for MinGW like this:
|
||||
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
|
||||
* -lcurl -lmsvcr70
|
||||
*
|
||||
* Written by Philip Bock
|
||||
/* <DESC>
|
||||
* Upload to FTP, resuming failed transfers.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* Use getinfo to get content-type after completed transfer.
|
||||
* </DESC>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
@@ -27,18 +31,14 @@ int main(void)
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_init.html */
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(CURLE_OK == res) {
|
||||
char *ct;
|
||||
/* ask for the content-type */
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html */
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
|
||||
|
||||
if((CURLE_OK == res) && ct)
|
||||
@@ -46,7 +46,6 @@ int main(void)
|
||||
}
|
||||
|
||||
/* always cleanup */
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_cleanup.html */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,8 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Example source code to show how the callback function can be used to
|
||||
* download data into a chunk of memory instead of storing it in a file.
|
||||
/* <DESC>
|
||||
* Shows how the write callback function can be used to download data into a
|
||||
* chunk of memory instead of storing it in a file.
|
||||
* </DESC>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -34,7 +36,6 @@ struct MemoryStruct {
|
||||
size_t size;
|
||||
};
|
||||
|
||||
|
||||
static size_t
|
||||
WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
@@ -55,7 +56,6 @@ WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
|
||||
return realsize;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl_handle;
|
||||
@@ -106,8 +106,7 @@ int main(void)
|
||||
/* cleanup curl stuff */
|
||||
curl_easy_cleanup(curl_handle);
|
||||
|
||||
if(chunk.memory)
|
||||
free(chunk.memory);
|
||||
free(chunk.memory);
|
||||
|
||||
/* we're done with libcurl, so clean it up */
|
||||
curl_global_cleanup();
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* multi socket API usage together with with glib2
|
||||
* </DESC>
|
||||
*/
|
||||
/* Example application source code using the multi socket interface to
|
||||
* download many files at once.
|
||||
*
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,6 +19,10 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* <DESC>
|
||||
* multi socket API usage with libevent 2
|
||||
* </DESC>
|
||||
*/
|
||||
/* Example application source code using the multi socket interface to
|
||||
download many files at once.
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2012 - 2015, 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,13 +20,13 @@
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* <DESC>
|
||||
* Uses the "Streaming HTML parser" to extract the href pieces in a streaming
|
||||
* manner from a downloaded HTML.
|
||||
* </DESC>
|
||||
*/
|
||||
/*
|
||||
* This example uses the "Streaming HTML parser" to extract the href pieces in
|
||||
* a streaming manner from a downloaded HTML. Kindly donated by Michał
|
||||
* Kowalczyk.
|
||||
*
|
||||
* The parser is found at
|
||||
* http://code.google.com/p/htmlstreamparser/
|
||||
* The HTML parser is found at http://code.google.com/p/htmlstreamparser/
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2015, 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,13 +19,12 @@
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/* Download a document and use libtidy to parse the HTML.
|
||||
* Written by Jeff Pohlmeyer
|
||||
*
|
||||
/* <DESC>
|
||||
* Download a document and use libtidy to parse the HTML.
|
||||
* </DESC>
|
||||
*/
|
||||
/*
|
||||
* LibTidy => http://tidy.sourceforge.net
|
||||
*
|
||||
* gcc -Wall -I/usr/local/include tidycurl.c -lcurl -ltidy -o tidycurl
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
288
docs/examples/http2-download.c
Normal file
288
docs/examples/http2-download.c
Normal file
@@ -0,0 +1,288 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2015, 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.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* somewhat unix-specific */
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* curl stuff */
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifndef CURLPIPE_MULTIPLEX
|
||||
/* This little trick will just make sure that we don't enable pipelining for
|
||||
libcurls old enough to not have this symbol. It is _not_ defined to zero in
|
||||
a recent libcurl header. */
|
||||
#define CURLPIPE_MULTIPLEX 0
|
||||
#endif
|
||||
|
||||
#define NUM_HANDLES 1000
|
||||
|
||||
void *curl_hnd[NUM_HANDLES];
|
||||
int num_transfers;
|
||||
|
||||
/* a handle to number lookup, highly ineffective when we do many
|
||||
transfers... */
|
||||
static int hnd2num(CURL *hnd)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i< num_transfers; i++) {
|
||||
if(curl_hnd[i] == hnd)
|
||||
return i;
|
||||
}
|
||||
return 0; /* weird, but just a fail-safe */
|
||||
}
|
||||
|
||||
static
|
||||
void dump(const char *text, int num, unsigned char *ptr, size_t size,
|
||||
char nohex)
|
||||
{
|
||||
size_t i;
|
||||
size_t c;
|
||||
|
||||
unsigned int width=0x10;
|
||||
|
||||
if(nohex)
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
|
||||
num, text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stderr, "%4.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
for(c = 0; c < width; c++)
|
||||
if(i+c < size)
|
||||
fprintf(stderr, "%02x ", ptr[i+c]);
|
||||
else
|
||||
fputs(" ", stderr);
|
||||
}
|
||||
|
||||
for(c = 0; (c < width) && (i+c < size); c++) {
|
||||
/* check for 0D0A; if found, skip past and start a new line of output */
|
||||
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
|
||||
i+=(c+2-width);
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "%c",
|
||||
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
|
||||
/* check again for 0D0A, to avoid an extra \n if it's at width */
|
||||
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
|
||||
i+=(c+3-width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fputc('\n', stderr); /* newline */
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size,
|
||||
void *userp)
|
||||
{
|
||||
const char *text;
|
||||
int num = hnd2num(handle);
|
||||
(void)handle; /* prevent compiler warning */
|
||||
(void)userp;
|
||||
switch (type) {
|
||||
case CURLINFO_TEXT:
|
||||
fprintf(stderr, "== %d Info: %s", num, data);
|
||||
default: /* in case a new one is introduced to shock us */
|
||||
return 0;
|
||||
|
||||
case CURLINFO_HEADER_OUT:
|
||||
text = "=> Send header";
|
||||
break;
|
||||
case CURLINFO_DATA_OUT:
|
||||
text = "=> Send data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_OUT:
|
||||
text = "=> Send SSL data";
|
||||
break;
|
||||
case CURLINFO_HEADER_IN:
|
||||
text = "<= Recv header";
|
||||
break;
|
||||
case CURLINFO_DATA_IN:
|
||||
text = "<= Recv data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_IN:
|
||||
text = "<= Recv SSL data";
|
||||
break;
|
||||
}
|
||||
|
||||
dump(text, num, (unsigned char *)data, size, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setup(CURL *hnd, int num)
|
||||
{
|
||||
FILE *out;
|
||||
char filename[128];
|
||||
|
||||
sprintf(filename, "dl-%d", num);
|
||||
|
||||
out = fopen(filename, "wb");
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
|
||||
|
||||
/* set the same URL */
|
||||
curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
|
||||
|
||||
/* send it verbose for max debuggaility */
|
||||
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
|
||||
/* HTTP/2 please */
|
||||
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||
|
||||
/* we use a self-signed test server, skip verification during debugging */
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
#if (CURLPIPE_MULTIPLEX > 0)
|
||||
/* wait for pipe connection to confirm */
|
||||
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
|
||||
#endif
|
||||
|
||||
curl_hnd[num] = hnd;
|
||||
}
|
||||
|
||||
/*
|
||||
* Simply download two files over HTTP/2, using the same physical connection!
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CURL *easy[NUM_HANDLES];
|
||||
CURLM *multi_handle;
|
||||
int i;
|
||||
int still_running; /* keep number of running handles */
|
||||
|
||||
if(argc > 1)
|
||||
/* if given a number, do that many transfers */
|
||||
num_transfers = atoi(argv[1]);
|
||||
|
||||
if(!num_transfers || (num_transfers > NUM_HANDLES))
|
||||
num_transfers = 3; /* a suitable low default */
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
||||
for(i=0; i<num_transfers; i++) {
|
||||
easy[i] = curl_easy_init();
|
||||
/* set options */
|
||||
setup(easy[i], i);
|
||||
|
||||
/* add the individual transfer */
|
||||
curl_multi_add_handle(multi_handle, easy[i]);
|
||||
}
|
||||
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
|
||||
/* set a suitable timeout to play around with */
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
/* select error */
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
} while(still_running);
|
||||
|
||||
curl_multi_cleanup(multi_handle);
|
||||
|
||||
for(i=0; i<num_transfers; i++)
|
||||
curl_easy_cleanup(easy[i]);
|
||||
|
||||
return 0;
|
||||
}
|
313
docs/examples/http2-serverpush.c
Normal file
313
docs/examples/http2-serverpush.c
Normal file
@@ -0,0 +1,313 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2015, 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.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* somewhat unix-specific */
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* curl stuff */
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifndef CURLPIPE_MULTIPLEX
|
||||
#error "too old libcurl, can't do HTTP/2 server push!"
|
||||
#endif
|
||||
|
||||
static
|
||||
void dump(const char *text, unsigned char *ptr, size_t size,
|
||||
char nohex)
|
||||
{
|
||||
size_t i;
|
||||
size_t c;
|
||||
|
||||
unsigned int width=0x10;
|
||||
|
||||
if(nohex)
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stderr, "%s, %ld bytes (0x%lx)\n",
|
||||
text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stderr, "%4.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
for(c = 0; c < width; c++)
|
||||
if(i+c < size)
|
||||
fprintf(stderr, "%02x ", ptr[i+c]);
|
||||
else
|
||||
fputs(" ", stderr);
|
||||
}
|
||||
|
||||
for(c = 0; (c < width) && (i+c < size); c++) {
|
||||
/* check for 0D0A; if found, skip past and start a new line of output */
|
||||
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
|
||||
i+=(c+2-width);
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "%c",
|
||||
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
|
||||
/* check again for 0D0A, to avoid an extra \n if it's at width */
|
||||
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
|
||||
i+=(c+3-width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fputc('\n', stderr); /* newline */
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size,
|
||||
void *userp)
|
||||
{
|
||||
const char *text;
|
||||
(void)handle; /* prevent compiler warning */
|
||||
(void)userp;
|
||||
switch (type) {
|
||||
case CURLINFO_TEXT:
|
||||
fprintf(stderr, "== Info: %s", data);
|
||||
default: /* in case a new one is introduced to shock us */
|
||||
return 0;
|
||||
|
||||
case CURLINFO_HEADER_OUT:
|
||||
text = "=> Send header";
|
||||
break;
|
||||
case CURLINFO_DATA_OUT:
|
||||
text = "=> Send data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_OUT:
|
||||
text = "=> Send SSL data";
|
||||
break;
|
||||
case CURLINFO_HEADER_IN:
|
||||
text = "<= Recv header";
|
||||
break;
|
||||
case CURLINFO_DATA_IN:
|
||||
text = "<= Recv data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_IN:
|
||||
text = "<= Recv SSL data";
|
||||
break;
|
||||
}
|
||||
|
||||
dump(text, (unsigned char *)data, size, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setup(CURL *hnd)
|
||||
{
|
||||
FILE *out = fopen("dl", "wb");
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
|
||||
|
||||
/* set the same URL */
|
||||
curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
|
||||
|
||||
/* send it verbose for max debuggaility */
|
||||
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
|
||||
/* HTTP/2 please */
|
||||
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||
|
||||
/* we use a self-signed test server, skip verification during debugging */
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
#if (CURLPIPE_MULTIPLEX > 0)
|
||||
/* wait for pipe connection to confirm */
|
||||
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* called when there's an incoming push */
|
||||
static int server_push_callback(CURL *parent,
|
||||
CURL *easy,
|
||||
size_t num_headers,
|
||||
struct curl_pushheaders *headers,
|
||||
void *userp)
|
||||
{
|
||||
char *headp;
|
||||
size_t i;
|
||||
int *transfers = (int *)userp;
|
||||
char filename[128];
|
||||
FILE *out;
|
||||
static unsigned int count = 0;
|
||||
|
||||
(void)parent; /* we have no use for this */
|
||||
|
||||
sprintf(filename, "push%u", count++);
|
||||
|
||||
/* here's a new stream, save it in a new file for each new push */
|
||||
out = fopen(filename, "wb");
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
|
||||
|
||||
fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n",
|
||||
count, (int)num_headers);
|
||||
|
||||
for(i=0; i<num_headers; i++) {
|
||||
headp = curl_pushheader_bynum(headers, i);
|
||||
fprintf(stderr, "**** header %u: %s\n", (int)i, headp);
|
||||
}
|
||||
|
||||
headp = curl_pushheader_byname(headers, ":path");
|
||||
if(headp) {
|
||||
fprintf(stderr, "**** The PATH is %s\n", headp /* skip :path + colon */ );
|
||||
}
|
||||
|
||||
(*transfers)++; /* one more */
|
||||
return CURL_PUSH_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Download a file over HTTP/2, take care of server push.
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
CURL *easy;
|
||||
CURLM *multi_handle;
|
||||
int still_running; /* keep number of running handles */
|
||||
int transfers=1; /* we start with one */
|
||||
struct CURLMsg *m;
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
||||
easy = curl_easy_init();
|
||||
|
||||
/* set options */
|
||||
setup(easy);
|
||||
|
||||
/* add the easy transfer */
|
||||
curl_multi_add_handle(multi_handle, easy);
|
||||
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_PUSHFUNCTION, server_push_callback);
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_PUSHDATA, &transfers);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
|
||||
/* set a suitable timeout to play around with */
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
if(mc != CURLM_OK) {
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
/* select error */
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* A little caution when doing server push is that libcurl itself has
|
||||
* created and added one or more easy handles but we need to clean them up
|
||||
* when we are done.
|
||||
*/
|
||||
|
||||
do {
|
||||
int msgq = 0;;
|
||||
m = curl_multi_info_read(multi_handle, &msgq);
|
||||
if(m && (m->msg == CURLMSG_DONE)) {
|
||||
CURL *e = m->easy_handle;
|
||||
transfers--;
|
||||
curl_multi_remove_handle(multi_handle, e);
|
||||
curl_easy_cleanup(e);
|
||||
}
|
||||
} while(m);
|
||||
|
||||
} while(transfers); /* as long as we have transfers going */
|
||||
|
||||
curl_multi_cleanup(multi_handle);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
352
docs/examples/http2-upload.c
Normal file
352
docs/examples/http2-upload.c
Normal file
@@ -0,0 +1,352 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2015, 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.
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* somewhat unix-specific */
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* curl stuff */
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifndef CURLPIPE_MULTIPLEX
|
||||
/* This little trick will just make sure that we don't enable pipelining for
|
||||
libcurls old enough to not have this symbol. It is _not_ defined to zero in
|
||||
a recent libcurl header. */
|
||||
#define CURLPIPE_MULTIPLEX 0
|
||||
#endif
|
||||
|
||||
#define NUM_HANDLES 1000
|
||||
|
||||
void *curl_hnd[NUM_HANDLES];
|
||||
int num_transfers;
|
||||
|
||||
/* a handle to number lookup, highly ineffective when we do many
|
||||
transfers... */
|
||||
static int hnd2num(CURL *hnd)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i< num_transfers; i++) {
|
||||
if(curl_hnd[i] == hnd)
|
||||
return i;
|
||||
}
|
||||
return 0; /* weird, but just a fail-safe */
|
||||
}
|
||||
|
||||
static
|
||||
void dump(const char *text, int num, unsigned char *ptr, size_t size,
|
||||
char nohex)
|
||||
{
|
||||
size_t i;
|
||||
size_t c;
|
||||
unsigned int width=0x10;
|
||||
|
||||
if(nohex)
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
|
||||
num, text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stderr, "%4.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
for(c = 0; c < width; c++)
|
||||
if(i+c < size)
|
||||
fprintf(stderr, "%02x ", ptr[i+c]);
|
||||
else
|
||||
fputs(" ", stderr);
|
||||
}
|
||||
|
||||
for(c = 0; (c < width) && (i+c < size); c++) {
|
||||
/* check for 0D0A; if found, skip past and start a new line of output */
|
||||
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
|
||||
i+=(c+2-width);
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "%c",
|
||||
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
|
||||
/* check again for 0D0A, to avoid an extra \n if it's at width */
|
||||
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
|
||||
i+=(c+3-width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fputc('\n', stderr); /* newline */
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size,
|
||||
void *userp)
|
||||
{
|
||||
char timebuf[20];
|
||||
const char *text;
|
||||
int num = hnd2num(handle);
|
||||
static time_t epoch_offset;
|
||||
static int known_offset;
|
||||
struct timeval tv;
|
||||
time_t secs;
|
||||
struct tm *now;
|
||||
|
||||
(void)handle; /* prevent compiler warning */
|
||||
(void)userp;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
if(!known_offset) {
|
||||
epoch_offset = time(NULL) - tv.tv_sec;
|
||||
known_offset = 1;
|
||||
}
|
||||
secs = epoch_offset + tv.tv_sec;
|
||||
now = localtime(&secs); /* not thread safe but we don't care */
|
||||
snprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
|
||||
now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
|
||||
|
||||
switch (type) {
|
||||
case CURLINFO_TEXT:
|
||||
fprintf(stderr, "%s [%d] Info: %s", timebuf, num, data);
|
||||
default: /* in case a new one is introduced to shock us */
|
||||
return 0;
|
||||
|
||||
case CURLINFO_HEADER_OUT:
|
||||
text = "=> Send header";
|
||||
break;
|
||||
case CURLINFO_DATA_OUT:
|
||||
text = "=> Send data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_OUT:
|
||||
text = "=> Send SSL data";
|
||||
break;
|
||||
case CURLINFO_HEADER_IN:
|
||||
text = "<= Recv header";
|
||||
break;
|
||||
case CURLINFO_DATA_IN:
|
||||
text = "<= Recv data";
|
||||
break;
|
||||
case CURLINFO_SSL_DATA_IN:
|
||||
text = "<= Recv SSL data";
|
||||
break;
|
||||
}
|
||||
|
||||
dump(text, num, (unsigned char *)data, size, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct input {
|
||||
FILE *in;
|
||||
size_t bytes_read; /* count up */
|
||||
CURL *hnd;
|
||||
};
|
||||
|
||||
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct input *i = userp;
|
||||
size_t retcode = fread(ptr, size, nmemb, i->in);
|
||||
i->bytes_read += retcode;
|
||||
return retcode;
|
||||
}
|
||||
|
||||
struct input indata[NUM_HANDLES];
|
||||
|
||||
static void setup(CURL *hnd, int num, const char *upload)
|
||||
{
|
||||
FILE *out;
|
||||
char url[256];
|
||||
char filename[128];
|
||||
struct stat file_info;
|
||||
curl_off_t uploadsize;
|
||||
|
||||
sprintf(filename, "dl-%d", num);
|
||||
out = fopen(filename, "wb");
|
||||
|
||||
sprintf(url, "https://localhost:8443/upload-%d", num);
|
||||
|
||||
/* get the file size of the local file */
|
||||
stat(upload, &file_info);
|
||||
uploadsize = file_info.st_size;
|
||||
|
||||
indata[num].in = fopen(upload, "rb");
|
||||
indata[num].hnd = hnd;
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
|
||||
|
||||
/* we want to use our own read function */
|
||||
curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback);
|
||||
/* read from this file */
|
||||
curl_easy_setopt(hnd, CURLOPT_READDATA, &indata[num]);
|
||||
/* provide the size of the upload */
|
||||
curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize);
|
||||
|
||||
/* send in the URL to store the upload as */
|
||||
curl_easy_setopt(hnd, CURLOPT_URL, url);
|
||||
|
||||
/* upload please */
|
||||
curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* send it verbose for max debuggaility */
|
||||
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
|
||||
/* HTTP/2 please */
|
||||
curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
|
||||
|
||||
/* we use a self-signed test server, skip verification during debugging */
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
#if (CURLPIPE_MULTIPLEX > 0)
|
||||
/* wait for pipe connection to confirm */
|
||||
curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
|
||||
#endif
|
||||
|
||||
curl_hnd[num] = hnd;
|
||||
}
|
||||
|
||||
/*
|
||||
* Upload all files over HTTP/2, using the same physical connection!
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CURL *easy[NUM_HANDLES];
|
||||
CURLM *multi_handle;
|
||||
int i;
|
||||
int still_running; /* keep number of running handles */
|
||||
const char *filename = "index.html";
|
||||
|
||||
if(argc > 1)
|
||||
/* if given a number, do that many transfers */
|
||||
num_transfers = atoi(argv[1]);
|
||||
|
||||
if(argc > 2)
|
||||
/* if given a file name, upload this! */
|
||||
filename = argv[2];
|
||||
|
||||
if(!num_transfers || (num_transfers > NUM_HANDLES))
|
||||
num_transfers = 3; /* a suitable low default */
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
||||
for(i=0; i<num_transfers; i++) {
|
||||
easy[i] = curl_easy_init();
|
||||
/* set options */
|
||||
setup(easy[i], i, filename);
|
||||
|
||||
/* add the individual transfer */
|
||||
curl_multi_add_handle(multi_handle, easy[i]);
|
||||
}
|
||||
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
|
||||
/* We do HTTP/2 so let's stick to one connection per host */
|
||||
curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
do {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
CURLMcode mc; /* curl_multi_fdset() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
|
||||
/* set a suitable timeout to play around with */
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
if(mc != CURLM_OK)
|
||||
{
|
||||
fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
|
||||
break;
|
||||
}
|
||||
|
||||
/* On success the value of maxfd is guaranteed to be >= -1. We call
|
||||
select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
|
||||
no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
|
||||
to sleep 100ms, which is the minimum suggested value in the
|
||||
curl_multi_fdset() doc. */
|
||||
|
||||
if(maxfd == -1) {
|
||||
#ifdef _WIN32
|
||||
Sleep(100);
|
||||
rc = 0;
|
||||
#else
|
||||
/* Portable sleep for platforms other than Windows. */
|
||||
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
rc = select(0, NULL, NULL, NULL, &wait);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
/* Note that on some platforms 'timeout' may be modified by select().
|
||||
If you need access to the original value save a copy beforehand. */
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
/* select error */
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
} while(still_running);
|
||||
|
||||
curl_multi_cleanup(multi_handle);
|
||||
|
||||
for(i=0; i<num_transfers; i++)
|
||||
curl_easy_cleanup(easy[i]);
|
||||
|
||||
return 0;
|
||||
}
|
@@ -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,
|
||||
|
@@ -60,7 +60,7 @@ int main(void)
|
||||
* they have mentioned in their server certificate's commonName (or
|
||||
* subjectAltName) fields, libcurl will refuse to connect. You can skip
|
||||
* this check, but this will make the connection less secure. */
|
||||
#ifdef SKIP_HOSTNAME_VERFICATION
|
||||
#ifdef SKIP_HOSTNAME_VERIFICATION
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
#endif
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -64,7 +64,7 @@ int main(void)
|
||||
curl = curl_easy_init();
|
||||
multi_handle = curl_multi_init();
|
||||
|
||||
/* initalize custom header list (stating that Expect: 100-continue is not
|
||||
/* initialize custom header list (stating that Expect: 100-continue is not
|
||||
wanted */
|
||||
headerlist = curl_slist_append(headerlist, buf);
|
||||
if(curl && multi_handle) {
|
||||
@@ -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 occurrence, then assume no file
|
||||
descriptors and no file descriptors to wait for means wait for 100
|
||||
milliseconds. */
|
||||
|
||||
if(!numfds) {
|
||||
repeats++; /* count number of repeated zero numfds */
|
||||
if(repeats > 1) {
|
||||
WAITMS(100); /* sleep 100 milliseconds */
|
||||
}
|
||||
}
|
||||
else
|
||||
repeats = 0;
|
||||
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
} while(still_running);
|
||||
|
||||
curl_multi_remove_handle(multi_handle, http_handle);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
|
||||
|
||||
/* This will retreive message 1 from the user's mailbox */
|
||||
/* This will retrieve message 1 from the user's mailbox */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
|
||||
|
||||
/* Tell the multi stack about our easy handle */
|
||||
@@ -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,
|
||||
|
@@ -39,7 +39,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
|
||||
|
||||
/* This will retreive message 1 from the user's mailbox */
|
||||
/* This will retrieve message 1 from the user's mailbox */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
|
||||
|
||||
/* Perform the retr */
|
||||
|
@@ -40,7 +40,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
|
||||
|
||||
/* This will retreive message 1 from the user's mailbox. Note the use of
|
||||
/* This will retrieve message 1 from the user's mailbox. Note the use of
|
||||
* pop3s:// rather than pop3:// to request a SSL based connection. */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1");
|
||||
|
||||
@@ -60,7 +60,7 @@ int main(void)
|
||||
* they have mentioned in their server certificate's commonName (or
|
||||
* subjectAltName) fields, libcurl will refuse to connect. You can skip
|
||||
* this check, but this will make the connection less secure. */
|
||||
#ifdef SKIP_HOSTNAME_VERFICATION
|
||||
#ifdef SKIP_HOSTNAME_VERIFICATION
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
#endif
|
||||
|
||||
|
@@ -40,7 +40,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
|
||||
|
||||
/* This will retreive message 1 from the user's mailbox */
|
||||
/* This will retrieve message 1 from the user's mailbox */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
|
||||
|
||||
/* In this example, we'll start with a plain text connection, and upgrade
|
||||
|
@@ -101,8 +101,7 @@ int main(void)
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
if(chunk.memory)
|
||||
free(chunk.memory);
|
||||
free(chunk.memory);
|
||||
|
||||
/* we're done with libcurl, so clean it up */
|
||||
curl_global_cleanup();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user