Compare commits
554 Commits
curl-7_11_
...
curl-7_12_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
39626d8cfd | ||
![]() |
67ad29e716 | ||
![]() |
8bbf9b13af | ||
![]() |
cb21851c74 | ||
![]() |
8d611bec6e | ||
![]() |
1de1dc7314 | ||
![]() |
aca79af7de | ||
![]() |
da6eea9b38 | ||
![]() |
dcf7310b2d | ||
![]() |
c2e8ba0fba | ||
![]() |
a5360255ba | ||
![]() |
5690a2b493 | ||
![]() |
ff0429a802 | ||
![]() |
46cdc83b81 | ||
![]() |
76dfef7117 | ||
![]() |
de2aeb9fc2 | ||
![]() |
17a5b44205 | ||
![]() |
f99e347878 | ||
![]() |
f5a0c17322 | ||
![]() |
8442c3942d | ||
![]() |
15cd35f67f | ||
![]() |
459801d6e0 | ||
![]() |
2c43d64302 | ||
![]() |
fd802db39f | ||
![]() |
765754d39d | ||
![]() |
f7f6b288eb | ||
![]() |
11ee9540bf | ||
![]() |
f6319bd706 | ||
![]() |
0912015a5c | ||
![]() |
4e7575fc7a | ||
![]() |
6531a6116d | ||
![]() |
9a33561e80 | ||
![]() |
88229a0f2a | ||
![]() |
120394cc45 | ||
![]() |
1adfe0fe18 | ||
![]() |
d57c178a62 | ||
![]() |
6faa83bc6a | ||
![]() |
9fb4e019fa | ||
![]() |
74551597b1 | ||
![]() |
37c269d0ba | ||
![]() |
5d8b526b80 | ||
![]() |
83dcc3e061 | ||
![]() |
4ed58463f7 | ||
![]() |
85b2056dc7 | ||
![]() |
94ca911dc1 | ||
![]() |
24420c2191 | ||
![]() |
59f904d8de | ||
![]() |
755f98e768 | ||
![]() |
aadc797225 | ||
![]() |
5c882bdfa3 | ||
![]() |
60f9450594 | ||
![]() |
ff52ba7f7b | ||
![]() |
0fbcea45d6 | ||
![]() |
ca6d430561 | ||
![]() |
91601b3bf4 | ||
![]() |
cdd70596df | ||
![]() |
7e186f9a63 | ||
![]() |
a94e117ede | ||
![]() |
662cb30372 | ||
![]() |
bd3aba5d6a | ||
![]() |
29ed6d24bf | ||
![]() |
e2c5c20896 | ||
![]() |
7c4b6cb0d9 | ||
![]() |
aced2904ff | ||
![]() |
17eb1fca7c | ||
![]() |
2511d1193a | ||
![]() |
e9056f5f95 | ||
![]() |
a9893ca79a | ||
![]() |
f39f7c28f0 | ||
![]() |
a807065ccc | ||
![]() |
67532e916c | ||
![]() |
3920b4dae8 | ||
![]() |
d70a335dce | ||
![]() |
8001921112 | ||
![]() |
d7cb09bd18 | ||
![]() |
e11710714c | ||
![]() |
5b0bfc298f | ||
![]() |
0383f7f19d | ||
![]() |
23a43c6e0f | ||
![]() |
eb946690d2 | ||
![]() |
c090fdbdf1 | ||
![]() |
de279099e5 | ||
![]() |
6bd8db3c99 | ||
![]() |
6176f14141 | ||
![]() |
512e54ff85 | ||
![]() |
a5aa569fe3 | ||
![]() |
e2e593a036 | ||
![]() |
9ce0a7b49d | ||
![]() |
4ab0d74250 | ||
![]() |
b5f85ba77d | ||
![]() |
b6ee33c6e1 | ||
![]() |
1c69b15c7c | ||
![]() |
54cd2bee58 | ||
![]() |
5bf02b16a0 | ||
![]() |
594cb8507b | ||
![]() |
78aba6e4cd | ||
![]() |
ccdcdb2a46 | ||
![]() |
b121e41ec3 | ||
![]() |
05d8e56ffd | ||
![]() |
4345c7a712 | ||
![]() |
12d5e33dc9 | ||
![]() |
6d70a82757 | ||
![]() |
47d52d4eca | ||
![]() |
4973b0f88a | ||
![]() |
d1542bf549 | ||
![]() |
2b7727aad1 | ||
![]() |
fd775454ca | ||
![]() |
8e09a389c4 | ||
![]() |
aa3ae01878 | ||
![]() |
c123676825 | ||
![]() |
d60c22572b | ||
![]() |
1d7ce36791 | ||
![]() |
34e8baab9a | ||
![]() |
a219d774fe | ||
![]() |
005042e973 | ||
![]() |
d301d69fbf | ||
![]() |
34af02caca | ||
![]() |
91025d1dd6 | ||
![]() |
c9bab31a7f | ||
![]() |
2f60e91a9b | ||
![]() |
018affe6d0 | ||
![]() |
aeb27ccfdb | ||
![]() |
939866faab | ||
![]() |
98f968f2ee | ||
![]() |
864f1a3366 | ||
![]() |
f42b10242f | ||
![]() |
853134017d | ||
![]() |
d3999e06d1 | ||
![]() |
0b0b37cffe | ||
![]() |
a13f5888d5 | ||
![]() |
c8807438ce | ||
![]() |
3f106afd00 | ||
![]() |
d925057e11 | ||
![]() |
bbafb2eb27 | ||
![]() |
434bc13812 | ||
![]() |
5c592f7dd9 | ||
![]() |
9bf1ba2f7e | ||
![]() |
724e4a3585 | ||
![]() |
f69711fc78 | ||
![]() |
04e2520dbb | ||
![]() |
7a35fb5403 | ||
![]() |
63f97b38eb | ||
![]() |
b8541929c8 | ||
![]() |
329f17ac7c | ||
![]() |
5dcab07c54 | ||
![]() |
1f798affb9 | ||
![]() |
a2ecdf4249 | ||
![]() |
71fdc063bd | ||
![]() |
887d78a9ad | ||
![]() |
00557a5475 | ||
![]() |
e18d27b78a | ||
![]() |
228fea4628 | ||
![]() |
e64dacb40e | ||
![]() |
fff01f24bf | ||
![]() |
e55dee3807 | ||
![]() |
8c2ce33c0b | ||
![]() |
135394f511 | ||
![]() |
fe065dc851 | ||
![]() |
445c7791a7 | ||
![]() |
686ba84128 | ||
![]() |
3394c01826 | ||
![]() |
d67ea8c7ad | ||
![]() |
535046430a | ||
![]() |
9aebdff219 | ||
![]() |
90da930131 | ||
![]() |
fbdc1b1e3d | ||
![]() |
e942df755b | ||
![]() |
91c8be3628 | ||
![]() |
d56c03840b | ||
![]() |
d3d5cdf305 | ||
![]() |
af43ce73e5 | ||
![]() |
84b52e92f4 | ||
![]() |
0aa7d11cc9 | ||
![]() |
933f7cecae | ||
![]() |
8e73e55336 | ||
![]() |
55c015c136 | ||
![]() |
bde6c6685e | ||
![]() |
58387b91f9 | ||
![]() |
6f74820cfc | ||
![]() |
af72f198ba | ||
![]() |
3fc831f9eb | ||
![]() |
9f660862ec | ||
![]() |
1354671c90 | ||
![]() |
1175a226e3 | ||
![]() |
358b72bb12 | ||
![]() |
6c408c885a | ||
![]() |
9cf04dff6a | ||
![]() |
6bdcfecbcf | ||
![]() |
3f21fe60fc | ||
![]() |
b2c290e40e | ||
![]() |
bc5b2fa12c | ||
![]() |
32a9554c92 | ||
![]() |
afc1ed60f7 | ||
![]() |
91018f4f24 | ||
![]() |
fb086b57a8 | ||
![]() |
3fc39a6efb | ||
![]() |
6062ac7c37 | ||
![]() |
caf7854a3c | ||
![]() |
6def0892ea | ||
![]() |
1c0744bde6 | ||
![]() |
7591e07b7c | ||
![]() |
35ab93f484 | ||
![]() |
dcf5e52b62 | ||
![]() |
aae521d086 | ||
![]() |
78e6508e22 | ||
![]() |
4d9517f0b4 | ||
![]() |
a331aa0221 | ||
![]() |
679cabb532 | ||
![]() |
7332350e85 | ||
![]() |
69f4dda74a | ||
![]() |
c19c3bd15a | ||
![]() |
76ff92b811 | ||
![]() |
4250637e7d | ||
![]() |
08d1da106e | ||
![]() |
9e31a0536e | ||
![]() |
2960d37d71 | ||
![]() |
c63af5fc01 | ||
![]() |
fc6eff13b5 | ||
![]() |
e7ee1ccf45 | ||
![]() |
98bf69f8f1 | ||
![]() |
0363fbc411 | ||
![]() |
e3bc92ae53 | ||
![]() |
27e76021e9 | ||
![]() |
93dde29979 | ||
![]() |
d42dcd60cd | ||
![]() |
ade89799f5 | ||
![]() |
6e118ce50f | ||
![]() |
34be9df773 | ||
![]() |
7356a67780 | ||
![]() |
f77949ef3b | ||
![]() |
26b8b3fc53 | ||
![]() |
38cc79a54f | ||
![]() |
ec113aefb9 | ||
![]() |
913e1570bd | ||
![]() |
e2aaf22d5d | ||
![]() |
3304589043 | ||
![]() |
0247642bb6 | ||
![]() |
19f5aa165c | ||
![]() |
1756499b11 | ||
![]() |
15f9a93c25 | ||
![]() |
e99287734b | ||
![]() |
8349dde0f1 | ||
![]() |
59907ebc0e | ||
![]() |
da91d6ac66 | ||
![]() |
7548115a0e | ||
![]() |
8ca37dd1c7 | ||
![]() |
31e9e4bb76 | ||
![]() |
84a322ab23 | ||
![]() |
707f217b2d | ||
![]() |
e6b45a66ec | ||
![]() |
b34c40dcf5 | ||
![]() |
699ebe2f0b | ||
![]() |
e1c6f216c2 | ||
![]() |
630b73bfa8 | ||
![]() |
877f16e5a5 | ||
![]() |
fbe1fa9dcc | ||
![]() |
5b65cc55a2 | ||
![]() |
97769737d0 | ||
![]() |
5b0a5c4050 | ||
![]() |
4b9f8e766d | ||
![]() |
96002646f1 | ||
![]() |
5ef6904ec3 | ||
![]() |
2f53da5e7a | ||
![]() |
58f1cc0b5f | ||
![]() |
98c70b73f2 | ||
![]() |
6bd02a3ab5 | ||
![]() |
372e7a6cd4 | ||
![]() |
211004bb0d | ||
![]() |
80d2fff1a1 | ||
![]() |
cf3cf413c8 | ||
![]() |
e218811ca3 | ||
![]() |
a9f2274bd8 | ||
![]() |
92179ff990 | ||
![]() |
4aac210a83 | ||
![]() |
245e3122df | ||
![]() |
ffc5fa3a2b | ||
![]() |
f5042cce34 | ||
![]() |
712c67b4ae | ||
![]() |
5dcfb8ad66 | ||
![]() |
673ff5eb2c | ||
![]() |
92fc3f07ba | ||
![]() |
cff90cf3f9 | ||
![]() |
a33c53a36b | ||
![]() |
2370d4fa02 | ||
![]() |
f128d904a5 | ||
![]() |
fb1039f2ab | ||
![]() |
923ce98e42 | ||
![]() |
8e935b58a2 | ||
![]() |
c93e972543 | ||
![]() |
1cb66f5262 | ||
![]() |
648e82f05d | ||
![]() |
1dbe60b8b7 | ||
![]() |
9631fa7407 | ||
![]() |
9befc682ee | ||
![]() |
fbeb674479 | ||
![]() |
af641d20a7 | ||
![]() |
d02587750c | ||
![]() |
241a4b3d45 | ||
![]() |
496e81a25a | ||
![]() |
f39b081253 | ||
![]() |
c96f7f13da | ||
![]() |
1bdc4b2006 | ||
![]() |
3915fecf80 | ||
![]() |
f94f06825c | ||
![]() |
2ddbf8975a | ||
![]() |
68a3cbe384 | ||
![]() |
b9432d1296 | ||
![]() |
e202a29a9a | ||
![]() |
3755bffcc2 | ||
![]() |
2a0a305300 | ||
![]() |
70e2aadc18 | ||
![]() |
a1c8aaf666 | ||
![]() |
8ee470aaeb | ||
![]() |
37e4858cd0 | ||
![]() |
a27072bebb | ||
![]() |
47059f45fe | ||
![]() |
daced8041d | ||
![]() |
b053ae6a65 | ||
![]() |
42f60ecb36 | ||
![]() |
550862f41a | ||
![]() |
6838f74fe0 | ||
![]() |
2ff30d067c | ||
![]() |
84406b3e2c | ||
![]() |
c323969bdd | ||
![]() |
43cbbdbea0 | ||
![]() |
1d3f76df71 | ||
![]() |
33cb93ad0b | ||
![]() |
4dc9179f4b | ||
![]() |
26a5ec9aa0 | ||
![]() |
883ea3113c | ||
![]() |
62b7c08bb3 | ||
![]() |
a85fa66cc8 | ||
![]() |
9ba010c629 | ||
![]() |
3ef3f2b6f0 | ||
![]() |
1401d909e8 | ||
![]() |
3233322622 | ||
![]() |
e373f1fd73 | ||
![]() |
dc25cd6f3a | ||
![]() |
0e31d41d4e | ||
![]() |
b7a7600465 | ||
![]() |
111a2f3057 | ||
![]() |
760cecac8d | ||
![]() |
6f8b4395ec | ||
![]() |
5506f8767c | ||
![]() |
5887945828 | ||
![]() |
25e98179be | ||
![]() |
78ebe3fa5a | ||
![]() |
a8e8e51b14 | ||
![]() |
f97d194934 | ||
![]() |
4661cc7403 | ||
![]() |
bc11929395 | ||
![]() |
caf37bc92e | ||
![]() |
5de447b0cb | ||
![]() |
5dbaced4a2 | ||
![]() |
43f8a1f5de | ||
![]() |
f57efa1899 | ||
![]() |
592522ceaf | ||
![]() |
4f84e6d9e2 | ||
![]() |
6f08903f07 | ||
![]() |
220cd010bd | ||
![]() |
68e8a0f0d9 | ||
![]() |
b23dbf9f34 | ||
![]() |
1d0b5b507a | ||
![]() |
b83d8104cd | ||
![]() |
bf6e1053cf | ||
![]() |
c3dd928e29 | ||
![]() |
aba6c2b89d | ||
![]() |
9c0a386246 | ||
![]() |
bba3bb7556 | ||
![]() |
c1422864b5 | ||
![]() |
31a693b99a | ||
![]() |
804534fbc9 | ||
![]() |
1bc6532c16 | ||
![]() |
b48bf7470d | ||
![]() |
1ca9ce5ef4 | ||
![]() |
789f2ecbe7 | ||
![]() |
ee7d1d0701 | ||
![]() |
4e3aa250c4 | ||
![]() |
3647a6ddcd | ||
![]() |
79aaa85a51 | ||
![]() |
392a543eff | ||
![]() |
eb6345de60 | ||
![]() |
0fd3b7a00a | ||
![]() |
bd51b80fa5 | ||
![]() |
15c900839b | ||
![]() |
2fd463e979 | ||
![]() |
de8660a96a | ||
![]() |
1e9cb272f1 | ||
![]() |
72b1144b8c | ||
![]() |
348fe0e210 | ||
![]() |
cf1f46e1ca | ||
![]() |
f052cbee19 | ||
![]() |
1f5e8670e1 | ||
![]() |
3b491d0f73 | ||
![]() |
26a2b8d26d | ||
![]() |
a7fd6f9007 | ||
![]() |
8ed44e8dfb | ||
![]() |
f617c1131a | ||
![]() |
5ca47f19d7 | ||
![]() |
9044fcbb5f | ||
![]() |
7a82810b59 | ||
![]() |
0ccdf3d0e6 | ||
![]() |
ca7f0852df | ||
![]() |
780b962336 | ||
![]() |
bbeb840916 | ||
![]() |
f4ec465bfc | ||
![]() |
57c86a953d | ||
![]() |
0fff8656e9 | ||
![]() |
7b929636ee | ||
![]() |
76835a2e00 | ||
![]() |
1b171b02ac | ||
![]() |
a8dc362572 | ||
![]() |
7c72f8ee6c | ||
![]() |
c39a54609b | ||
![]() |
ce6b767b47 | ||
![]() |
7ba4d3464f | ||
![]() |
03def138fe | ||
![]() |
9d99af5329 | ||
![]() |
c8d850dbad | ||
![]() |
01ea357744 | ||
![]() |
ad9e83a90f | ||
![]() |
6c9d96e811 | ||
![]() |
f840e5192c | ||
![]() |
ba9272dd05 | ||
![]() |
675db3a211 | ||
![]() |
1fc7ff878e | ||
![]() |
b643d148b1 | ||
![]() |
5804c995e1 | ||
![]() |
13a6f85320 | ||
![]() |
8b4582f111 | ||
![]() |
cd3bf7c56f | ||
![]() |
ee1595dcd5 | ||
![]() |
310086deed | ||
![]() |
5d27f50f2f | ||
![]() |
9d0330d5bd | ||
![]() |
d5074f74bb | ||
![]() |
ea0cf7c87b | ||
![]() |
a56164c8e0 | ||
![]() |
cd95bb22ea | ||
![]() |
1745ecd8ac | ||
![]() |
75d66b9c62 | ||
![]() |
2ff9f55001 | ||
![]() |
ce446dbdc2 | ||
![]() |
dd2add82ee | ||
![]() |
40d9855df2 | ||
![]() |
ecf7adba15 | ||
![]() |
931c847e2b | ||
![]() |
8230d9bff8 | ||
![]() |
64cc14e9e6 | ||
![]() |
d5b8971ff3 | ||
![]() |
7ea837a18c | ||
![]() |
b8b8473b6d | ||
![]() |
894dbae455 | ||
![]() |
2c11425868 | ||
![]() |
a2ea0abf7f | ||
![]() |
be8f8e66a4 | ||
![]() |
9fadfffb9d | ||
![]() |
76f23acfa1 | ||
![]() |
6950aeafcc | ||
![]() |
cd160a66c9 | ||
![]() |
a7376968d2 | ||
![]() |
fd96a2af34 | ||
![]() |
a90cd1a45c | ||
![]() |
8e92600ddd | ||
![]() |
5e75c310ba | ||
![]() |
20cab07c29 | ||
![]() |
f466d7a6f1 | ||
![]() |
dc46f535ae | ||
![]() |
27fd5d6d6a | ||
![]() |
18a3c3302f | ||
![]() |
97959a00d7 | ||
![]() |
5e92b2906b | ||
![]() |
126ed14313 | ||
![]() |
712d0374f7 | ||
![]() |
4b49b2e3cf | ||
![]() |
d85c21994f | ||
![]() |
6b33a5f954 | ||
![]() |
ed22afe5fb | ||
![]() |
843391c745 | ||
![]() |
ad6699e0c4 | ||
![]() |
43137cf595 | ||
![]() |
db6dc49b0b | ||
![]() |
593170d1de | ||
![]() |
0eace2fefe | ||
![]() |
abd65e21c6 | ||
![]() |
e21104a865 | ||
![]() |
3ecf63fa66 | ||
![]() |
762dcf0780 | ||
![]() |
75ee9b5333 | ||
![]() |
e161bdc5be | ||
![]() |
bb3d6e8552 | ||
![]() |
189c2f4989 | ||
![]() |
f28389c87b | ||
![]() |
7461592a16 | ||
![]() |
50b0e72f7b | ||
![]() |
76e73cfec8 | ||
![]() |
5d8ec172a6 | ||
![]() |
0953140b53 | ||
![]() |
6c2825997a | ||
![]() |
accc6eb91a | ||
![]() |
eab8cdc640 | ||
![]() |
dc9d0f256d | ||
![]() |
b60d6404d8 | ||
![]() |
08fe4b3210 | ||
![]() |
0e60a118d0 | ||
![]() |
4b78b4124e | ||
![]() |
0d6d9af7ab | ||
![]() |
41cd36b830 | ||
![]() |
242be55771 | ||
![]() |
7cf47ea5b5 | ||
![]() |
6fb0012833 | ||
![]() |
9d1ce9c0df | ||
![]() |
5947e4e9fd | ||
![]() |
e992aa6a54 | ||
![]() |
2cf218610e | ||
![]() |
fe6f0aeb26 | ||
![]() |
bd04c6fb67 | ||
![]() |
c5637baa06 | ||
![]() |
f8426a2c44 | ||
![]() |
0c791d1e76 | ||
![]() |
c4a89d29f6 | ||
![]() |
306ff5649a | ||
![]() |
1c652dfc5d | ||
![]() |
1f61e7f8f4 | ||
![]() |
1a5f190e47 | ||
![]() |
570033448c | ||
![]() |
f44b655513 | ||
![]() |
0aa720fa26 | ||
![]() |
d44f3f84f8 | ||
![]() |
d426db3d27 | ||
![]() |
0fd88d7c8f | ||
![]() |
4e84ac4db8 | ||
![]() |
da5c8a121f | ||
![]() |
76c36688d0 | ||
![]() |
651c8d3bc4 | ||
![]() |
a8a946d71d | ||
![]() |
c5c005609e | ||
![]() |
97886f9353 | ||
![]() |
a784bd0797 | ||
![]() |
4aacf65678 | ||
![]() |
dd1ba7633e | ||
![]() |
a4ea5a4054 | ||
![]() |
69060b1382 | ||
![]() |
a6562ea77d | ||
![]() |
ad3563096a | ||
![]() |
c5f02c1986 | ||
![]() |
7ef5d20cad | ||
![]() |
98b619c3a7 | ||
![]() |
5b75919f95 | ||
![]() |
20b76e09e3 | ||
![]() |
67fca4cb01 | ||
![]() |
606715b2cd | ||
![]() |
ce04b35032 | ||
![]() |
ec7f244ee9 |
1572
CHANGES.2003
Normal file
1572
CHANGES.2003
Normal file
File diff suppressed because it is too large
Load Diff
@@ -54,6 +54,9 @@ test:
|
|||||||
test-full:
|
test-full:
|
||||||
@(cd tests; $(MAKE) all full-test)
|
@(cd tests; $(MAKE) all full-test)
|
||||||
|
|
||||||
|
test-torture:
|
||||||
|
@(cd tests; $(MAKE) all torture-test)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||||
# must contain the following line:
|
# must contain the following line:
|
||||||
|
@@ -82,8 +82,8 @@ amiga:
|
|||||||
cd ./src && make -f makefile.amiga
|
cd ./src && make -f makefile.amiga
|
||||||
|
|
||||||
netware:
|
netware:
|
||||||
cd lib && make -f Makefile.netware
|
cd lib && make -f Makefile.netware
|
||||||
cd src && make -f Makefile.netware
|
cd src && make -f Makefile.netware
|
||||||
|
|
||||||
unix: all
|
unix: all
|
||||||
|
|
||||||
|
32
README
32
README
@@ -17,7 +17,9 @@ README
|
|||||||
|
|
||||||
You find answers to the most frequent questions we get in the FAQ document.
|
You find answers to the most frequent questions we get in the FAQ document.
|
||||||
|
|
||||||
Study the COPYING file for distribution terms and similar.
|
Study the COPYING file for distribution terms and similar. If you distribute
|
||||||
|
curl binaries or other binaries that involve libcurl, you might enjoy the
|
||||||
|
LICENSE-MIXING document.
|
||||||
|
|
||||||
CONTACT
|
CONTACT
|
||||||
|
|
||||||
@@ -32,42 +34,44 @@ WEB SITE
|
|||||||
|
|
||||||
Sweden -- http://curl.haxx.se/
|
Sweden -- http://curl.haxx.se/
|
||||||
Australia -- http://curl.planetmirror.com/
|
Australia -- http://curl.planetmirror.com/
|
||||||
Estonia -- http://curl.dope-brothers.com/
|
Denmark -- http://curl.cofman.dk/
|
||||||
|
Estonia -- http://curl.wildyou.net/
|
||||||
Germany -- http://curl.mirror.at.stealer.net/
|
Germany -- http://curl.mirror.at.stealer.net/
|
||||||
|
Germany -- http://curl.netmirror.org/
|
||||||
Russia -- http://curl.tsuren.net/
|
Russia -- http://curl.tsuren.net/
|
||||||
Thailand -- http://curl.siamu.ac.th/
|
Thailand -- http://curl.siamu.ac.th/
|
||||||
US (CA) -- http://curl.mirror.redwire.net/
|
US (CA) -- http://curl.mirror.redwire.net/
|
||||||
|
US -- http://curl.signal42.com/
|
||||||
|
|
||||||
DOWNLOAD
|
DOWNLOAD
|
||||||
|
|
||||||
The official download mirror sites are:
|
The official download mirror sites are:
|
||||||
|
|
||||||
Australia -- http://curl.planetmirror.com/download/
|
Australia -- http://curl.planetmirror.com/download.html
|
||||||
Estonia -- http://curl.dope-brothers.com/download/
|
Estonia -- http://curl.wildyou.net/download.html
|
||||||
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
|
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
|
||||||
|
Germany -- http://curl.mirror.at.stealer.net/download.html
|
||||||
|
Germany -- http://curl.netmirror.org/download.html
|
||||||
|
Germany -- http://www.mirrorspace.org/curl/
|
||||||
Hongkong -- http://www.execve.net/curl/
|
Hongkong -- http://www.execve.net/curl/
|
||||||
Russia -- http://curl.tsuren.net/download/
|
Russia -- http://curl.tsuren.net/download.html
|
||||||
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
|
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
|
||||||
Sweden -- http://cool.haxx.se/curl/
|
Sweden -- http://cool.haxx.se/curl/
|
||||||
Thailand -- http://curl.siamu.ac.th/download/
|
Thailand -- http://curl.siamu.ac.th/download.html
|
||||||
US (CA) -- http://curl.mirror.redwire.net/download/
|
US (CA) -- http://curl.mirror.redwire.net/download.html
|
||||||
|
|
||||||
CVS
|
CVS
|
||||||
|
|
||||||
To download the very latest source off the CVS server do this:
|
To download the very latest source off the CVS server do this:
|
||||||
|
|
||||||
cvs -d :pserver:cvsread@cvs.php.net:/repository login
|
cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl login
|
||||||
|
|
||||||
(enter "phpfi" when asked for password)
|
(just press enter when asked for password)
|
||||||
|
|
||||||
cvs -d :pserver:cvsread@cvs.php.net:/repository co curl
|
cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl co curl
|
||||||
|
|
||||||
(you'll get a directory named curl created, filled with the source code)
|
(you'll get a directory named curl created, filled with the source code)
|
||||||
|
|
||||||
cvs -d :pserver:cvsread@cvs.php.net:/repository logout
|
|
||||||
|
|
||||||
(you're off the hook!)
|
|
||||||
|
|
||||||
NOTICE
|
NOTICE
|
||||||
|
|
||||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||||
|
119
RELEASE-NOTES
119
RELEASE-NOTES
@@ -1,89 +1,62 @@
|
|||||||
Curl and libcurl 7.11.1. A bugfix release.
|
Curl and libcurl 7.12.0.
|
||||||
|
|
||||||
Public curl release number: 79
|
Public curl release number: 81
|
||||||
Releases counted from the very beginning: 106
|
Releases counted from the very beginning: 108
|
||||||
Available command line options: 94
|
Available command line options: 96
|
||||||
Available curl_easy_setopt() options: 112
|
Available curl_easy_setopt() options: 113
|
||||||
|
Number of public functions in libcurl: 36
|
||||||
|
|
||||||
|
A special thanks to:
|
||||||
|
|
||||||
|
archivas.com and Alan Pinstein, for paying me to focus on their requests
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o CURLOPT_POSTFIELDSIZE_LARGE added to offer POSTs larger than 2GB
|
o added ability to "upload" to file:// URLs
|
||||||
o CURL_VERSION_LARGEFILE is a feature bit returned by libcurls that feature
|
o added curl_global_init_mem()
|
||||||
large file support
|
o removed curl_formparse()
|
||||||
o libcurl only requires winsock 1.1 on windows now
|
o the MSVC project file in the release archive is automatically built
|
||||||
o when doing FTP, curl now sends QUIT before disconnecting
|
o curl --proxy-digest is a new command line option
|
||||||
o name resolves can now timeout on windows too
|
o the Windows version of libcurl can use wldap32.dll for LDAP
|
||||||
o $HOME is now recognized better when looking for .netrc files
|
o added curl_easy_strerror(), curl_multi_strerror() and curl_share_strerror()
|
||||||
o now re-uses the ares handle when re-using curl handles
|
o IPv6-enabled Windows hosts now resolves names threaded/asynch as well
|
||||||
o SO_BINDTODEVICE is used for network interface binding
|
o configure --with-libidn can be used to point out the root dir of a libidn
|
||||||
o configure --disable-manual disables the built-in huge manual from the
|
installation (version 0.4.5 or later) for curl to use, then libcurl can
|
||||||
command line tool
|
resolve and use IDNA names (domain names with "international" letters)
|
||||||
o the default Accept: header used in HTTP requests changed
|
|
||||||
o asynch dns lookups now require the c-ares library
|
|
||||||
o curl --socks can be used to set a SOCKS5 proxy to use
|
|
||||||
o response-headers received after a (proxy) CONNECT request are now passed
|
|
||||||
to the header callback just like other headers
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o builds and runs on Novell NetWare
|
o incoming cookies with domains set with a prefixed dot now works better
|
||||||
o Windows builds now report OS as "i386-pc-win32"
|
o CURLOPT_COOKIEFILE and CURLOPT_COOKIE can be used in the same request
|
||||||
o received signals during SSL connect is handled better
|
o improved peer certificate name verification
|
||||||
o improved PUT/POST with NTLM/Digest authentication
|
o allocation failures cause no leaks nor crashes
|
||||||
o following redirects and doing NTLM/Digest (where the first connection gets
|
o the progress meter display now handles file sizes up to full 8 exabytes
|
||||||
closed) with the multi interface work better now
|
(which is as high a signed 64 bit number can reach)
|
||||||
o file: progress meter and getinfo variables work now
|
o general HTTP authentication improvements
|
||||||
o CURLOPT_FRESH_CONNECT and CURLAUTH_NTLM now work when set together
|
o HTTP Digest authentication with the proxy works
|
||||||
o share interface usage without (un)lock functions segfaulted
|
o mulipart formposting with -F and file names with spaces work again
|
||||||
o --limit-rate no longer cripples the --speed-limit feature
|
o curl_easy_duphandle() now works when ares-enabled
|
||||||
o fixed verbose output problem with ipv6-enabled re-used connections
|
o HTTP Digest authentication works a lot more like the RFC says
|
||||||
o fixed the socks5 code to check version in the socks response properly
|
o curl works with telnet and stdin properly on Windows
|
||||||
o dns cache bug - fixed the 'inuse' counter
|
o configure --without-ssl works even when pkg-config has OpenSSL details
|
||||||
o large file fix for Content-Length
|
o src/hugehelp.c builds correct again in non-configure build environments
|
||||||
o better docs for the share interface
|
|
||||||
o several configure fixes for mingw/msys
|
|
||||||
o setting a Host: header is no longer affecting the Host: header used when
|
|
||||||
libcurl follows a Location:
|
|
||||||
o fixed numerous compiler warnings on several operating systems and compilers
|
|
||||||
o PUTing from stdin couldn't disable chunked transfer-encoding
|
|
||||||
o corrected the mingw makefiles
|
|
||||||
o improved the configure libz detection
|
|
||||||
o fixed EPRT/PORT use when doing FTP on ipv6-enabled AIX hosts
|
|
||||||
o *nroff commands that only support -mandoc and not -man are now supported
|
|
||||||
(for the built-in manual text in the command line tool)
|
|
||||||
o fixed the unconditional #include of config.h in hugehelp.c
|
|
||||||
o builds fine on MPE/iX
|
|
||||||
o upload using chunked transfer-encoding now sends the last chunk properly
|
|
||||||
teriminated with an extra CRLF
|
|
||||||
o Fixed the progress meter display for files >2GB
|
|
||||||
o persistant connections over a proxy messed up the proxy name/password
|
|
||||||
o the socks5 code segfaulted if no username/password was set
|
|
||||||
o the *_LARGE options now take curl_off_t types as parameters and this will
|
|
||||||
make it possible to handle large files on windows too
|
|
||||||
o builds with large file support even on systems without strtoll()
|
|
||||||
|
|
||||||
Other curl-related news since the previous public release:
|
Other curl-related news since the previous public release:
|
||||||
|
|
||||||
o Many platforms are being used to autobuild and autotest curl on a daily
|
o The CVS repository was moved to cool.haxx.se
|
||||||
basis. Please join in and test curl on your systems:
|
o AdacURL 7.11.2 was released: http://www.almroth.com/adacurl/
|
||||||
http://curl.haxx.se/auto/
|
o PycURL 7.11.3 was released: http://pycurl.sourceforge.net
|
||||||
o the curl mailing lists moved, (re-)subscribe to the new ones from here:
|
o A new German download mirror: http://www.mirrorspace.org/curl/
|
||||||
http://curl.haxx.se/mail/
|
o Two new mailing lists are available:
|
||||||
o c-ares 1.1.0 was relased: http://daniel.haxx.se/projects/c-ares/
|
curl-and-python - for python programmers using pycurl or curl
|
||||||
o TclCurl 0.11.0 was released:
|
curl-perl-commmits - receives commits done to the curl-perl CVS module
|
||||||
http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
|
||||||
o PycURL 7.11.0 was released: http://pycurl.sourceforge.net/
|
|
||||||
o the libcurl D binding was released:
|
|
||||||
http://www.atari-soldiers.com/libcurl.html
|
|
||||||
o new Estonian web site mirror: http://curl.dope-brothers.com/
|
|
||||||
|
|
||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Gisle Vanem, Vincent Bronner, Richard Bramante, Dirk Manske, Dan Fandrich,
|
Gisle Vanem, Tommy Tam, Luca Altea, James Bursa, Mihai Ionescu, Michael
|
||||||
Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen,
|
Benedict, Andr<64>s Garc<72>a, Joe Halpin, Seshubabu Pasam, Peter Sylvester, Robert
|
||||||
Andr<EFBFBD>s Garc<72>a, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner,
|
D. Young, Jesse Noller, David Byron, Massimiliano Ziccardi, Mohun Biswas,
|
||||||
Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David
|
Renaud Duhaut
|
||||||
Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer, G<>nter Knauf
|
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
46
TODO-RELEASE
46
TODO-RELEASE
@@ -3,51 +3,11 @@ Issues not sorted in any particular order.
|
|||||||
UNASSIGNED means that no person has publicly stated to work on the issue.
|
UNASSIGNED means that no person has publicly stated to work on the issue.
|
||||||
DELETE means the issue is subject for dismissal
|
DELETE means the issue is subject for dismissal
|
||||||
|
|
||||||
To get fixed in 7.11.1 (planned release in March 2004)
|
To get fixed in 7.12.0 (planned release: June 2004)
|
||||||
======================
|
======================
|
||||||
|
|
||||||
To get fixed in 7.11.2 (planned release May/June 2004)
|
To get fixed in 7.12.1 (planned release: August 2004)
|
||||||
======================
|
======================
|
||||||
|
|
||||||
6. REST fix for servers not behaving well on >2GB requests. This should fail
|
* FTP 3rd party transfers
|
||||||
if the server doesn't set the pointer to the requested index. The tricky
|
|
||||||
part is to figure out if the server did the right thing or not.
|
|
||||||
UNASSIGNED
|
|
||||||
|
|
||||||
10. Anton Fedorov's "dumpcert" patch UNASSIGNED
|
|
||||||
http://curl.haxx.se/mail/lib-2004-03/0088.html
|
|
||||||
|
|
||||||
14. Evaluate/apply Gertjan van Wingerde's SSL patches, UNASSIGNED
|
|
||||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
|
||||||
|
|
||||||
23. Peter Sylvester's "Most Significant Common Name" change. Feedback welcome.
|
|
||||||
At least the UTF8 conversion and comparison should be done. Patch?
|
|
||||||
UNASSIGNED
|
|
||||||
|
|
||||||
24. Make the progress meter use one digit more for the hour time fields.
|
|
||||||
Accomplish this by removing one of the times displayed.
|
|
||||||
|
|
||||||
27. Put the version defines in their own header file, so that lib/libcurl.rc
|
|
||||||
can include only that to reduce problems with MSVC.
|
|
||||||
|
|
||||||
28. Optimize the way libcurl uses CWD on each new request over a persistent
|
|
||||||
connection (on FTP) even if it doesn't have to.
|
|
||||||
|
|
||||||
29. Define USE_NTRESPONSES in the NTLM code to work properly with >14 letter
|
|
||||||
passwords against IIS servers. Requires test cases to be updated
|
|
||||||
accordingly. #915609
|
|
||||||
|
|
||||||
30. Digest re-negotiation is not supported, we wrongly assume a new 401
|
|
||||||
response to signify an authenticaion error. We need to detect the
|
|
||||||
difference between a 401 due to a bad Digest authorization header and a
|
|
||||||
401 because the server wants to re-negotiate.
|
|
||||||
|
|
||||||
Mitz Wark provided details and traces here:
|
|
||||||
http://curl.haxx.se/mail/lib-2004-03/0299.html
|
|
||||||
|
|
||||||
To get fixed in 7.12.0
|
|
||||||
======================
|
|
||||||
|
|
||||||
25. curl_easy_strerror() curl_multi_strerror() curl_share_strerror()
|
|
||||||
|
|
||||||
26. i18n of error messages
|
|
||||||
|
180
acinclude.m4
180
acinclude.m4
@@ -64,7 +64,7 @@ dnl the code was bad, try a different program now, test 3
|
|||||||
],[
|
],[
|
||||||
/* ioctlsocket source code */
|
/* ioctlsocket source code */
|
||||||
int socket;
|
int socket;
|
||||||
int flags = ioctlsocket(socket, FIONBIO, &flags);
|
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||||
],[
|
],[
|
||||||
dnl ioctlsocket test was good
|
dnl ioctlsocket test was good
|
||||||
nonblock="ioctlsocket"
|
nonblock="ioctlsocket"
|
||||||
@@ -245,7 +245,8 @@ AC_DEFUN([CURL_CHECK_WORKING_GETADDRINFO],[
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
void main(void) {
|
int main(void)
|
||||||
|
{
|
||||||
struct addrinfo hints, *ai;
|
struct addrinfo hints, *ai;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
@@ -254,11 +255,9 @@ void main(void) {
|
|||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||||
if (error) {
|
if (error) {
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
|
||||||
else {
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
],[
|
],[
|
||||||
ac_cv_working_getaddrinfo="yes"
|
ac_cv_working_getaddrinfo="yes"
|
||||||
@@ -276,10 +275,72 @@ if test "$ac_cv_working_getaddrinfo" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl ************************************************************
|
||||||
|
dnl check for working NI_WITHSCOPEID in getnameinfo()
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID],[
|
||||||
|
AC_CACHE_CHECK(for working NI_WITHSCOPEID, ac_cv_working_ni_withscopeid,[
|
||||||
|
|
||||||
|
AC_RUN_IFELSE([[
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
#ifdef NI_WITHSCOPEID
|
||||||
|
struct sockaddr_storage ss;
|
||||||
|
int sslen = sizeof(ss);
|
||||||
|
int rc;
|
||||||
|
char hbuf[NI_MAXHOST];
|
||||||
|
int fd = socket(AF_INET6, SOCK_STREAM, 0);
|
||||||
|
if(fd < 0) {
|
||||||
|
perror("socket()");
|
||||||
|
return 1; /* couldn't create socket of either kind */
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = getsockname(fd, (struct sockaddr *)&ss, &sslen);
|
||||||
|
if(rc) {
|
||||||
|
perror("getsockname()");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf),
|
||||||
|
NULL, 0,
|
||||||
|
NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID);
|
||||||
|
|
||||||
|
if(rc) {
|
||||||
|
printf("rc = %s\n", gai_strerror(rc));
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0; /* everything works fine, use NI_WITHSCOPEID! */
|
||||||
|
#else
|
||||||
|
return 4; /* we don't seem to have the definition, don't use it */
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
dnl program worked:
|
||||||
|
[ ac_cv_working_ni_withscopeid="yes" ],
|
||||||
|
dnl program failed:
|
||||||
|
[ ac_cv_working_ni_withscopeid="no" ],
|
||||||
|
dnl we cross-compile:
|
||||||
|
[ ac_cv_working_ni_withscopeid="yes" ]
|
||||||
|
) dnl end of AC_RUN_IFELSE
|
||||||
|
|
||||||
|
]) dnl end of AC_CACHE_CHECK
|
||||||
|
|
||||||
|
if test "$ac_cv_working_ni_withscopeid" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_NI_WITHSCOPEID, 1,
|
||||||
|
[Define if NI_WITHSCOPEID exists and works])
|
||||||
|
fi
|
||||||
|
|
||||||
|
]) dnl end of AC_DEFUN
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_LOCALTIME_R],
|
AC_DEFUN([CURL_CHECK_LOCALTIME_R],
|
||||||
[
|
[
|
||||||
dnl check for a few thread-safe functions
|
dnl check for localtime_r
|
||||||
AC_CHECK_FUNCS(localtime_r,[
|
AC_CHECK_FUNCS(localtime_r,[
|
||||||
AC_MSG_CHECKING(whether localtime_r is declared)
|
AC_MSG_CHECKING(whether localtime_r is declared)
|
||||||
AC_EGREP_CPP(localtime_r,[
|
AC_EGREP_CPP(localtime_r,[
|
||||||
@@ -295,6 +356,103 @@ AC_DEFUN([CURL_CHECK_LOCALTIME_R],
|
|||||||
AC_MSG_RESULT(no))])])
|
AC_MSG_RESULT(no))])])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl This function checks for strerror_r(). If it isn't found at first, it
|
||||||
|
dnl retries with _THREAD_SAFE defined, as that is what AIX seems to require
|
||||||
|
dnl in order to find this function.
|
||||||
|
dnl
|
||||||
|
dnl If the function is found, it will then proceed to check how the function
|
||||||
|
dnl actually works: glibc-style or POSIX-style.
|
||||||
|
dnl
|
||||||
|
dnl glibc:
|
||||||
|
dnl char *strerror_r(int errnum, char *buf, size_t n);
|
||||||
|
dnl
|
||||||
|
dnl What this one does is to return the error string (no surprises there),
|
||||||
|
dnl but it doesn't usually copy anything into buf! The 'buf' and 'n'
|
||||||
|
dnl parameters are only meant as an optional working area, in case strerror_r
|
||||||
|
dnl needs it. A quick test on a few systems shows that it's generally not
|
||||||
|
dnl touched at all.
|
||||||
|
dnl
|
||||||
|
dnl POSIX:
|
||||||
|
dnl int strerror_r(int errnum, char *buf, size_t n);
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([CURL_CHECK_STRERROR_R],
|
||||||
|
[
|
||||||
|
dnl determine of strerror_r is present
|
||||||
|
AC_CHECK_FUNCS(strerror_r,[
|
||||||
|
AC_MSG_CHECKING(whether strerror_r is declared)
|
||||||
|
AC_EGREP_CPP(strerror_r,[
|
||||||
|
#include <string.h>],[
|
||||||
|
strerror_r="yes"
|
||||||
|
AC_MSG_RESULT(yes)],[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING(whether strerror_r with -D_THREAD_SAFE is declared)
|
||||||
|
AC_EGREP_CPP(strerror_r,[
|
||||||
|
#define _THREAD_SAFE
|
||||||
|
#include <string.h>],[
|
||||||
|
strerror_r="yes"
|
||||||
|
CPPFLAGS="-D_THREAD_SAFE $CPPFLAGS"
|
||||||
|
AC_MSG_RESULT(yes)],
|
||||||
|
AC_MSG_RESULT(no))])])
|
||||||
|
|
||||||
|
if test "x$strerror_r" = "xyes"; then
|
||||||
|
|
||||||
|
dnl check if strerror_r is properly declared in the headers
|
||||||
|
AC_CHECK_DECL(strerror_r, ,
|
||||||
|
AC_DEFINE(HAVE_NO_STRERROR_R_DECL, 1, [we have no strerror_r() proto])
|
||||||
|
,
|
||||||
|
[#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl determine if this strerror_r() is glibc or POSIX
|
||||||
|
AC_MSG_CHECKING([for a glibc strerror_r API])
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024]; /* big enough to play with */
|
||||||
|
char *string =
|
||||||
|
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||||
|
/* this should've returned a string */
|
||||||
|
if(!string || !string[0])
|
||||||
|
return 99;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
|
||||||
|
AC_MSG_RESULT([yes]),
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for a POSIX strerror_r API])
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024]; /* big enough to play with */
|
||||||
|
int error =
|
||||||
|
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||||
|
/* This should've returned zero, and written an error string in the
|
||||||
|
buffer.*/
|
||||||
|
if(!buffer[0] || error)
|
||||||
|
return 99;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
AC_DEFINE(HAVE_POSIX_STRERROR_R, 1, [we have a POSIX-style strerror_r()])
|
||||||
|
AC_MSG_RESULT([yes]),
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
)
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_INET_NTOA_R],
|
AC_DEFUN([CURL_CHECK_INET_NTOA_R],
|
||||||
[
|
[
|
||||||
dnl determine if function definition for inet_ntoa_r exists.
|
dnl determine if function definition for inet_ntoa_r exists.
|
||||||
@@ -511,10 +669,11 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
|
|||||||
dnl "invalid format string conversion"
|
dnl "invalid format string conversion"
|
||||||
dnl * 279 warns on static conditions in while expressions
|
dnl * 279 warns on static conditions in while expressions
|
||||||
dnl * 981 warns on "operands are evaluated in unspecified order"
|
dnl * 981 warns on "operands are evaluated in unspecified order"
|
||||||
|
dnl * 1418 "external definition with no prior declaration"
|
||||||
dnl * 1419 warns on "external declaration in primary source file"
|
dnl * 1419 warns on "external declaration in primary source file"
|
||||||
dnl which we know and do on purpose.
|
dnl which we know and do on purpose.
|
||||||
|
|
||||||
WARN="-wd279,269,1419,981"
|
WARN="-wd279,269,981,1418,1419"
|
||||||
|
|
||||||
if test "$gccnum" -gt "600"; then
|
if test "$gccnum" -gt "600"; then
|
||||||
dnl icc 6.0 and older doesn't have the -Wall flag
|
dnl icc 6.0 and older doesn't have the -Wall flag
|
||||||
@@ -550,6 +709,11 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
|
|||||||
WARN="$WARN -Wendif-labels -Wstrict-prototypes"
|
WARN="$WARN -Wendif-labels -Wstrict-prototypes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$gccnum" -ge "304"; then
|
||||||
|
# try -Wunreachable-code on gcc 3.4
|
||||||
|
WARN="$WARN -Wunreachable-code"
|
||||||
|
fi
|
||||||
|
|
||||||
for flag in $CPPFLAGS; do
|
for flag in $CPPFLAGS; do
|
||||||
case "$flag" in
|
case "$flag" in
|
||||||
-I*)
|
-I*)
|
||||||
|
34
ares/CHANGES
34
ares/CHANGES
@@ -1,3 +1,35 @@
|
|||||||
|
Changelog for the c-ares project
|
||||||
|
|
||||||
|
* May 11
|
||||||
|
- Nico Stappenbelt reported that when processing domain and search lines in
|
||||||
|
the resolv.conf file, the first entry encountered is processed and used as
|
||||||
|
the search list. According to the manual pages for both Linux, Solaris and
|
||||||
|
Tru64, the last entry of either a domain or a search field is used.
|
||||||
|
|
||||||
|
This is now adjusted in the code
|
||||||
|
|
||||||
|
Version 1.2.0 (April 13, 2004)
|
||||||
|
|
||||||
|
* April 2, 2004
|
||||||
|
- Updated various man pages to look nicer when converted to HTML on the web
|
||||||
|
site.
|
||||||
|
|
||||||
|
* April 1, 2004
|
||||||
|
- Dirk Manske provided a new function that is now named ares_cancel(). It is
|
||||||
|
used to cancel/cleanup a resolve/request made using ares functions on the
|
||||||
|
given ares channel. It does not destroy/kill the ares channel itself.
|
||||||
|
|
||||||
|
- Dominick Meglio cleaned up the formatting in several man pages.
|
||||||
|
|
||||||
|
* March 30, 2004
|
||||||
|
- Dominick Meglio's new ares_expand_string. A helper function when decoding
|
||||||
|
incoming DNS packages.
|
||||||
|
|
||||||
|
- Daniel Stenberg modified the Makefile.in to use a for loop for the man page
|
||||||
|
installation to improve overview and make it easier to add man pages.
|
||||||
|
|
||||||
|
Version 1.1.0 (March 11, 2004)
|
||||||
|
|
||||||
* March 9, 2004
|
* March 9, 2004
|
||||||
- Gisle Vanem improved build on Windows.
|
- Gisle Vanem improved build on Windows.
|
||||||
|
|
||||||
@@ -74,3 +106,5 @@ Version 1.0-pre1 (8 October 2003)
|
|||||||
- Daniel Stenberg adjusted the windows port
|
- Daniel Stenberg adjusted the windows port
|
||||||
|
|
||||||
- liren at vivisimo.com made the initial windows port
|
- liren at vivisimo.com made the initial windows port
|
||||||
|
|
||||||
|
* Imported the sources from ares 1.1.1
|
||||||
|
@@ -21,8 +21,6 @@ vc/adig/adig.dsp
|
|||||||
vc/adig/adig.mak
|
vc/adig/adig.mak
|
||||||
vc/adig/adig.plg
|
vc/adig/adig.plg
|
||||||
vc/vc.dsw
|
vc/vc.dsw
|
||||||
vc/vc.ncb
|
|
||||||
vc/vc.opt
|
|
||||||
vc/ahost/ahost.dep
|
vc/ahost/ahost.dep
|
||||||
vc/ahost/ahost.dsp
|
vc/ahost/ahost.dsp
|
||||||
vc/ahost/ahost.mak
|
vc/ahost/ahost.mak
|
||||||
|
@@ -25,7 +25,15 @@ OBJS= ares__close_sockets.o ares__get_hostent.o ares__read_line.o \
|
|||||||
ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o \
|
ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o \
|
||||||
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o \
|
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o \
|
||||||
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o \
|
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o \
|
||||||
ares_send.o ares_strerror.o ares_timeout.o ares_version.o
|
ares_send.o ares_strerror.o ares_timeout.o ares_version.o \
|
||||||
|
ares_expand_string.o ares_cancel.o
|
||||||
|
|
||||||
|
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
||||||
|
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
|
||||||
|
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
|
||||||
|
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
|
||||||
|
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
||||||
|
ares_version.3 ares_cancel.3
|
||||||
|
|
||||||
$(LIB): ${OBJS}
|
$(LIB): ${OBJS}
|
||||||
ar cru $@ ${OBJS}
|
ar cru $@ ${OBJS}
|
||||||
@@ -60,31 +68,9 @@ install:
|
|||||||
chmod u-w ${DESTDIR}${libdir}/$(LIB)
|
chmod u-w ${DESTDIR}${libdir}/$(LIB)
|
||||||
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
|
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
|
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_destroy.3 ${DESTDIR}${mandir}/man3
|
(for man in $(MANPAGES); do \
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_expand_name.3 ${DESTDIR}${mandir}/man3
|
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_fds.3 ${DESTDIR}${mandir}/man3
|
done)
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_free_hostent.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_free_string.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_gethostbyaddr.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_gethostbyname.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_init.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_init_options.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_mkquery.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_parse_a_reply.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_parse_ptr_reply.3 \
|
|
||||||
${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_process.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_query.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_search.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_send.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_strerror.3 ${DESTDIR}${mandir}/man3
|
|
||||||
${INSTALL} -m 444 ${srcdir}/ares_timeout.3 ${DESTDIR}${mandir}/man3
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${OBJS} $(LIB) adig.o adig ahost.o ahost
|
rm -f ${OBJS} $(LIB) adig.o adig ahost.o ahost
|
||||||
|
@@ -1,19 +1,21 @@
|
|||||||
|
c-ares
|
||||||
|
======
|
||||||
|
|
||||||
This package is based on ares 1.1.1 (written by Greg Hudson). I've decided to
|
This package is based on ares 1.1.1 (written by Greg Hudson). I decided to
|
||||||
put together and release my own ares archives since the ares maintainer
|
fork and release a separate project since the ares author didn't want the
|
||||||
doesn't want these improvements.
|
improvements that were vital for our use of it.
|
||||||
|
|
||||||
The package is thus dubbed 'c-ares' since I (Daniel Stenberg) want this for
|
This package is dubbed 'c-ares' since I (Daniel Stenberg) wanted this for use
|
||||||
use within the curl project (hence the letter C) and it makes a nice
|
within the curl project (hence the letter C) and it makes a nice pun. Also,
|
||||||
pun. Also, c-ares will not remain API compatible with the original ares, so
|
c-ares is not API compatible with ares: a new name makes that more obvious to
|
||||||
picking a new name makes it more obvious to the public.
|
the public.
|
||||||
|
|
||||||
The full source code is available in the 'c-ares' release archives, and in the
|
The full source code is available in the 'c-ares' release archives, and in the
|
||||||
'ares' subdir of the curl CVS source repostitory.
|
'ares' subdir of the curl CVS source repostitory.
|
||||||
|
|
||||||
If you find bugs, correct flaws, have questions or have comments in general in
|
If you find bugs, correct flaws, have questions or have comments in general in
|
||||||
regard to c-ares (or by all means the original ares too), get in touch with us
|
regard to c-ares (or by all means the original ares too), get in touch with us
|
||||||
on the curl-library mailing list.
|
on the c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares
|
||||||
|
|
||||||
c-ares is of course distributed under the same MIT-style license as the
|
c-ares is of course distributed under the same MIT-style license as the
|
||||||
original ares.
|
original ares.
|
||||||
|
@@ -55,6 +55,7 @@
|
|||||||
#define ARES_EFILE 14
|
#define ARES_EFILE 14
|
||||||
#define ARES_ENOMEM 15
|
#define ARES_ENOMEM 15
|
||||||
#define ARES_EDESTRUCTION 16
|
#define ARES_EDESTRUCTION 16
|
||||||
|
#define ARES_EBADSTR 17
|
||||||
|
|
||||||
/* Flag values */
|
/* Flag values */
|
||||||
#define ARES_FLAG_USEVC (1 << 0)
|
#define ARES_FLAG_USEVC (1 << 0)
|
||||||
@@ -104,7 +105,7 @@ int ares_init(ares_channel *channelptr);
|
|||||||
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||||
int optmask);
|
int optmask);
|
||||||
void ares_destroy(ares_channel channel);
|
void ares_destroy(ares_channel channel);
|
||||||
|
void ares_cancel(ares_channel channel);
|
||||||
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||||
ares_callback callback, void *arg);
|
ares_callback callback, void *arg);
|
||||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||||
@@ -125,6 +126,8 @@ int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
|
|||||||
int rd, unsigned char **buf, int *buflen);
|
int rd, unsigned char **buf, int *buflen);
|
||||||
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
||||||
int alen, char **s, long *enclen);
|
int alen, char **s, long *enclen);
|
||||||
|
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
|
||||||
|
int alen, unsigned char **s, long *enclen);
|
||||||
int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||||
struct hostent **host);
|
struct hostent **host);
|
||||||
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||||
|
@@ -143,25 +143,29 @@ int ares__get_hostent(FILE *fp, struct hostent **host)
|
|||||||
free(line);
|
free(line);
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
free(line);
|
if(line)
|
||||||
|
free(line);
|
||||||
|
|
||||||
if (status == ARES_SUCCESS)
|
if (status == ARES_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Memory allocation failure; clean up. */
|
/* Memory allocation failure; clean up. */
|
||||||
if (hostent)
|
if (hostent)
|
||||||
{
|
{
|
||||||
free((char *) hostent->h_name);
|
if(hostent->h_name)
|
||||||
|
free((char *) hostent->h_name);
|
||||||
if (hostent->h_aliases)
|
if (hostent->h_aliases)
|
||||||
{
|
{
|
||||||
for (alias = hostent->h_aliases; *alias; alias++)
|
for (alias = hostent->h_aliases; *alias; alias++)
|
||||||
free(*alias);
|
free(*alias);
|
||||||
}
|
}
|
||||||
free(hostent->h_aliases);
|
if(hostent->h_aliases)
|
||||||
if (hostent->h_addr_list)
|
free(hostent->h_aliases);
|
||||||
|
if (hostent->h_addr_list && hostent->h_addr_list[0])
|
||||||
free(hostent->h_addr_list[0]);
|
free(hostent->h_addr_list[0]);
|
||||||
free(hostent->h_addr_list);
|
if(hostent->h_addr_list)
|
||||||
|
free(hostent->h_addr_list);
|
||||||
|
free(hostent);
|
||||||
}
|
}
|
||||||
free(hostent);
|
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
37
ares/ares_cancel.3
Normal file
37
ares/ares_cancel.3
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_CANCEL 3 "31 March 2004"
|
||||||
|
.SH NAME
|
||||||
|
ares_cancel \- Cancel a resolve
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B int ares_cancel(ares_channel \fIchannel\fP)
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The \fBares_cancel\fP function cancels all lookups/requests made on the the
|
||||||
|
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
|
||||||
|
the callbacks for each pending query on the channel, passing a status of
|
||||||
|
.BR ARES_ETIMEOUT .
|
||||||
|
These calls give the callbacks a chance to clean up any state which
|
||||||
|
might have been stored in their arguments.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_init (3)
|
||||||
|
.BR ares_destroy (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Dirk Manske
|
44
ares/ares_cancel.c
Normal file
44
ares/ares_cancel.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ares.h"
|
||||||
|
#include "ares_private.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ares_cancel() cancels a ongoing request/resolve that might be going on on
|
||||||
|
* the given channel. It does NOT kill the channel, use ares_destroy() for
|
||||||
|
* that.
|
||||||
|
*/
|
||||||
|
void ares_cancel(ares_channel channel)
|
||||||
|
{
|
||||||
|
struct query *query, *next;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (query = channel->queries; query; query = next)
|
||||||
|
{
|
||||||
|
next = query->next;
|
||||||
|
query->callback(query->arg, ARES_ETIMEOUT, NULL, 0);
|
||||||
|
free(query->tcpbuf);
|
||||||
|
free(query->skip_server);
|
||||||
|
free(query);
|
||||||
|
}
|
||||||
|
channel->queries = NULL;
|
||||||
|
if (!(channel->flags & ARES_FLAG_STAYOPEN))
|
||||||
|
{
|
||||||
|
for (i = 0; i < channel->nservers; i++)
|
||||||
|
ares__close_sockets(&channel->servers[i]);
|
||||||
|
}
|
||||||
|
}
|
@@ -36,7 +36,8 @@ status of
|
|||||||
These calls give the callbacks a chance to clean up any state which
|
These calls give the callbacks a chance to clean up any state which
|
||||||
might have been stored in their arguments.
|
might have been stored in their arguments.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_init (3)
|
.BR ares_init (3),
|
||||||
|
.BR ares_cancel (3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
62
ares/ares_expand_string.3
Normal file
62
ares/ares_expand_string.3
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_EXPAND_NAME 3 "23 July 1998"
|
||||||
|
.SH NAME
|
||||||
|
ares_expand_string \- Expand a length encoded string
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B int ares_expand_string(const unsigned char *\fIencoded\fP,
|
||||||
|
.B const unsigned char *\fIabuf\fP, int \fIalen\fP, unsigned char **\fIs\fP,
|
||||||
|
.B int *\fIenclen\fP)
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B ares_expand_string
|
||||||
|
function converts a length encoded string to a NULL terminated C
|
||||||
|
string. The argument
|
||||||
|
.I encoded
|
||||||
|
gives the beginning of the encoded string, and the arguments
|
||||||
|
.I abuf
|
||||||
|
and
|
||||||
|
.I alen
|
||||||
|
give the containing message buffer (necessary for the processing of
|
||||||
|
indirection pointers within the encoded domain name). The result is
|
||||||
|
placed in a NUL-terminated allocated buffer, a pointer to which is
|
||||||
|
stored in the variable pointed to by
|
||||||
|
.IR s .
|
||||||
|
The length of the encoded string is stored in the variable pointed to by
|
||||||
|
.I enclen
|
||||||
|
so that the caller can advance past the encoded string to read
|
||||||
|
further data in the message.
|
||||||
|
.SH RETURN VALUES
|
||||||
|
.B ares_expand_string
|
||||||
|
can return any of the following values:
|
||||||
|
.TP 15
|
||||||
|
.B ARES_SUCCESS
|
||||||
|
Expansion of the encoded string succeeded.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_EBADSTR
|
||||||
|
The encoded string was malformed and could not be expanded.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_ENOMEM
|
||||||
|
Memory was exhausted.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_free_string (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Dominick Meglio
|
65
ares/ares_expand_string.c
Normal file
65
ares/ares_expand_string.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include "nameser.h"
|
||||||
|
#else
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/nameser.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "ares.h"
|
||||||
|
#include "ares_private.h" /* for the memdebug */
|
||||||
|
|
||||||
|
/* Simply decodes a length-encoded character string. The first byte of the
|
||||||
|
* input is the length of the string to be returned and the bytes thereafter
|
||||||
|
* are the characters of the string. The returned result will be NULL
|
||||||
|
* terminated.
|
||||||
|
*/
|
||||||
|
int ares_expand_string(const unsigned char *encoded,
|
||||||
|
const unsigned char *abuf,
|
||||||
|
int alen,
|
||||||
|
unsigned char **s,
|
||||||
|
long *enclen)
|
||||||
|
{
|
||||||
|
unsigned char *q;
|
||||||
|
long len;
|
||||||
|
if (encoded == abuf+alen)
|
||||||
|
return ARES_EBADSTR;
|
||||||
|
|
||||||
|
len = *encoded;
|
||||||
|
if (encoded+len+1 > abuf+alen)
|
||||||
|
return ARES_EBADSTR;
|
||||||
|
|
||||||
|
encoded++;
|
||||||
|
|
||||||
|
*s = malloc(len+1);
|
||||||
|
if (*s == NULL)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
q = *s;
|
||||||
|
strncpy((char *)q, (char *)encoded, len);
|
||||||
|
q[len] = '\0';
|
||||||
|
|
||||||
|
*s = q;
|
||||||
|
|
||||||
|
*enclen = len+1;
|
||||||
|
|
||||||
|
return ARES_SUCCESS;
|
||||||
|
}
|
||||||
|
|
@@ -28,21 +28,16 @@ The
|
|||||||
.I ares_free_hostent
|
.I ares_free_hostent
|
||||||
function frees a
|
function frees a
|
||||||
.B struct hostent
|
.B struct hostent
|
||||||
allocated by one of the functions
|
allocated by one of the functions \fIares_parse_a_reply(3)\fP or
|
||||||
.I ares_parse_a_reply
|
\fIares_parse_ptr_reply(3)\fP.
|
||||||
or
|
.SH NOTES
|
||||||
.IR ares_parse_ptr_reply .
|
It is not necessary (and is not correct) to free the host structure passed to
|
||||||
|
the callback functions for \fIares_gethostbyname(3)\fP or
|
||||||
|
\fIares_gethostbyaddr(3)\fP. The ares library will automatically free such
|
||||||
|
host structures when the callback returns.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_parse_a_reply (3),
|
.BR ares_parse_a_reply (3),
|
||||||
.BR ares_parse_ptr_reply (3)
|
.BR ares_parse_ptr_reply (3)
|
||||||
.SH NOTES
|
|
||||||
It is not necessary (and is not correct) to free the host structure
|
|
||||||
passed to the callback functions for
|
|
||||||
.I ares_gethostbyname
|
|
||||||
or
|
|
||||||
.IR ares_gethostbyaddr .
|
|
||||||
The ares library will automatically free such host structures when the
|
|
||||||
callback returns.
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
@@ -26,11 +26,10 @@ ares_free_string \- Free strings allocated by ares functions
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
.I ares_free_string
|
.I ares_free_string
|
||||||
function frees a string allocated by the
|
function frees a string allocated by an ares function.
|
||||||
.I ares_mkquery
|
|
||||||
function.
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_mkquery (3)
|
.BR ares_mkquery (3)
|
||||||
|
.BR ares_expand_string (3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
@@ -40,14 +40,10 @@ and
|
|||||||
.I addrlen
|
.I addrlen
|
||||||
give the address as a series of bytes, and
|
give the address as a series of bytes, and
|
||||||
.I family
|
.I family
|
||||||
gives the type of address. When the query is complete or has failed,
|
gives the type of address. When the query is complete or has failed, the ares
|
||||||
the ares library will invoke
|
library will invoke \fIcallback\fP. Completion or failure of the query may
|
||||||
.IR callback .
|
happen immediately, or may happen during a later call to
|
||||||
Completion or failure of the query may happen immediately, or may
|
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
|
||||||
happen during a later call to
|
|
||||||
.BR ares_process (3)
|
|
||||||
or
|
|
||||||
.BR ares_destroy (3).
|
|
||||||
.PP
|
.PP
|
||||||
The callback argument
|
The callback argument
|
||||||
.I arg
|
.I arg
|
||||||
@@ -93,7 +89,8 @@ did not complete successfully,
|
|||||||
will be
|
will be
|
||||||
.BR NULL .
|
.BR NULL .
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_process (3)
|
.BR ares_process (3),
|
||||||
|
.BR ares_gethostbyname (3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
@@ -87,10 +87,10 @@ static void next_lookup(struct addr_query *aquery)
|
|||||||
{
|
{
|
||||||
case 'b':
|
case 'b':
|
||||||
addr = ntohl(aquery->addr.s_addr);
|
addr = ntohl(aquery->addr.s_addr);
|
||||||
a1 = (int)(addr >> 24) & 0xff;
|
a1 = (int)((addr >> 24) & 0xff);
|
||||||
a2 = (int)(addr >> 16) & 0xff;
|
a2 = (int)((addr >> 16) & 0xff);
|
||||||
a3 = (int)(addr >> 8) & 0xff;
|
a3 = (int)((addr >> 8) & 0xff);
|
||||||
a4 = (int)addr & 0xff;
|
a4 = (int)(addr & 0xff);
|
||||||
sprintf(name, "%d.%d.%d.%d.in-addr.arpa", a4, a3, a2, a1);
|
sprintf(name, "%d.%d.%d.%d.in-addr.arpa", a4, a3, a2, a1);
|
||||||
aquery->remaining_lookups = p + 1;
|
aquery->remaining_lookups = p + 1;
|
||||||
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,
|
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,
|
||||||
|
@@ -37,14 +37,11 @@ The parameter
|
|||||||
.I name
|
.I name
|
||||||
gives the hostname as a NUL-terminated C string, and
|
gives the hostname as a NUL-terminated C string, and
|
||||||
.I family
|
.I family
|
||||||
gives the desired type of address for the resulting host entry. When
|
gives the desired type of address for the resulting host entry. When the
|
||||||
the query is complete or has failed, the ares library will invoke
|
query is complete or has failed, the ares library will invoke \fIcallback\fP.
|
||||||
.IR callback .
|
Completion or failure of the query may happen immediately, or may happen
|
||||||
Completion or failure of the query may happen immediately, or may
|
during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or
|
||||||
happen during a later call to
|
\fIares_cancel(3)\fP.
|
||||||
.BR ares_process (3)
|
|
||||||
or
|
|
||||||
.BR ares_destroy (3).
|
|
||||||
.PP
|
.PP
|
||||||
The callback argument
|
The callback argument
|
||||||
.I arg
|
.I arg
|
||||||
@@ -96,7 +93,8 @@ did not complete successfully,
|
|||||||
will be
|
will be
|
||||||
.BR NULL .
|
.BR NULL .
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_process (3)
|
.BR ares_process (3),
|
||||||
|
.BR ares_gethostbyaddr (3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
@@ -85,6 +85,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
channel->nsort = -1;
|
channel->nsort = -1;
|
||||||
channel->lookups = NULL;
|
channel->lookups = NULL;
|
||||||
channel->queries = NULL;
|
channel->queries = NULL;
|
||||||
|
channel->domains = NULL;
|
||||||
|
channel->sortlist = NULL;
|
||||||
|
|
||||||
/* Initialize configuration by each of the four sources, from highest
|
/* Initialize configuration by each of the four sources, from highest
|
||||||
* precedence to lowest.
|
* precedence to lowest.
|
||||||
@@ -101,15 +103,16 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
/* Something failed; clean up memory we may have allocated. */
|
/* Something failed; clean up memory we may have allocated. */
|
||||||
if (channel->nservers != -1)
|
if (channel->nservers != -1)
|
||||||
free(channel->servers);
|
free(channel->servers);
|
||||||
if (channel->ndomains != -1)
|
if (channel->domains)
|
||||||
{
|
{
|
||||||
for (i = 0; i < channel->ndomains; i++)
|
for (i = 0; i < channel->ndomains; i++)
|
||||||
free(channel->domains[i]);
|
free(channel->domains[i]);
|
||||||
free(channel->domains);
|
free(channel->domains);
|
||||||
}
|
}
|
||||||
if (channel->nsort != -1)
|
if (channel->sortlist)
|
||||||
free(channel->sortlist);
|
free(channel->sortlist);
|
||||||
free(channel->lookups);
|
if(channel->lookups)
|
||||||
|
free(channel->lookups);
|
||||||
free(channel);
|
free(channel);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -436,11 +439,11 @@ DhcpNameServer
|
|||||||
return (errno == ENOENT) ? ARES_SUCCESS : ARES_EFILE;
|
return (errno == ENOENT) ? ARES_SUCCESS : ARES_EFILE;
|
||||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
{
|
{
|
||||||
if ((p = try_config(line, "domain")) && channel->ndomains == -1)
|
if ((p = try_config(line, "domain")))
|
||||||
status = config_domain(channel, p);
|
status = config_domain(channel, p);
|
||||||
else if ((p = try_config(line, "lookup")) && !channel->lookups)
|
else if ((p = try_config(line, "lookup")) && !channel->lookups)
|
||||||
status = config_lookup(channel, p);
|
status = config_lookup(channel, p);
|
||||||
else if ((p = try_config(line, "search")) && channel->ndomains == -1)
|
else if ((p = try_config(line, "search")))
|
||||||
status = set_search(channel, p);
|
status = set_search(channel, p);
|
||||||
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
|
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
|
||||||
status = config_nameserver(&servers, &nservers, p);
|
status = config_nameserver(&servers, &nservers, p);
|
||||||
@@ -453,7 +456,8 @@ DhcpNameServer
|
|||||||
if (status != ARES_SUCCESS)
|
if (status != ARES_SUCCESS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(line);
|
if(line)
|
||||||
|
free(line);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,8 +466,10 @@ DhcpNameServer
|
|||||||
/* Handle errors. */
|
/* Handle errors. */
|
||||||
if (status != ARES_EOF)
|
if (status != ARES_EOF)
|
||||||
{
|
{
|
||||||
if (servers != NULL) free(servers);
|
if (servers != NULL)
|
||||||
if (sortlist != NULL) free(sortlist);
|
free(servers);
|
||||||
|
if (sortlist != NULL)
|
||||||
|
free(sortlist);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -701,6 +707,14 @@ static int set_search(ares_channel channel, const char *str)
|
|||||||
int n;
|
int n;
|
||||||
const char *p, *q;
|
const char *p, *q;
|
||||||
|
|
||||||
|
if(channel->ndomains != -1) {
|
||||||
|
/* if we already have some domains present, free them first */
|
||||||
|
for(n=0; n < channel->ndomains; n++)
|
||||||
|
free(channel->domains[n]);
|
||||||
|
free(channel->domains);
|
||||||
|
channel->ndomains = -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Count the domains given. */
|
/* Count the domains given. */
|
||||||
n = 0;
|
n = 0;
|
||||||
p = str;
|
p = str;
|
||||||
|
@@ -21,11 +21,9 @@ ares_mkquery \- Compose a single-question DNS query buffer
|
|||||||
.nf
|
.nf
|
||||||
.B #include <ares.h>
|
.B #include <ares.h>
|
||||||
.PP
|
.PP
|
||||||
.B
|
.B int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP,
|
||||||
int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP,
|
.B unsigned short \fIid\fP, int \fIrd\fP, char **\fIbuf\fP,
|
||||||
.B
|
.B int *\fIbuflen\fP)
|
||||||
unsigned short \fIid\fP, int \fIrd\fP, char **\fIbuf\fP,
|
|
||||||
int *\fIbuflen\fP)
|
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
@@ -52,8 +50,7 @@ stored in the variable pointed to by
|
|||||||
and the length of which will be stored in the variable pointed to by
|
and the length of which will be stored in the variable pointed to by
|
||||||
.IR buflen .
|
.IR buflen .
|
||||||
It is the caller's responsibility to free this buffer using
|
It is the caller's responsibility to free this buffer using
|
||||||
.B ares_free_string
|
\fIares_free_string(3)\fP when it is no longer needed.
|
||||||
when it is no longer needed.
|
|
||||||
.SH RETURN VALUES
|
.SH RETURN VALUES
|
||||||
.B ares_mkquery
|
.B ares_mkquery
|
||||||
can return any of the following values:
|
can return any of the following values:
|
||||||
|
@@ -21,9 +21,8 @@ ares_parse_a_reply \- Parse a reply to a DNS query of type A into a hostent
|
|||||||
.nf
|
.nf
|
||||||
.B #include <ares.h>
|
.B #include <ares.h>
|
||||||
.PP
|
.PP
|
||||||
.B
|
.B int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
|
||||||
int ares_parse_a_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
|
.B struct hostent **\fIhost\fP);
|
||||||
.B struct hostent **\fIhost\fB);
|
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
|
@@ -21,11 +21,9 @@ ares_parse_ptr_reply \- Parse a reply to a DNS query of type PTR into a hostent
|
|||||||
.nf
|
.nf
|
||||||
.B #include <ares.h>
|
.B #include <ares.h>
|
||||||
.PP
|
.PP
|
||||||
.B
|
.B int ares_parse_ptr_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
|
||||||
int ares_parse_ptr_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
|
.B const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP,
|
||||||
.B
|
.B struct hostent **\fIhost\fP);
|
||||||
const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP,
|
|
||||||
.B struct hostent **\fIhost\fB);
|
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
|
@@ -35,13 +35,10 @@ The file descriptor sets pointed to by
|
|||||||
and
|
and
|
||||||
.I write_fds
|
.I write_fds
|
||||||
should have file descriptors set in them according to whether the file
|
should have file descriptors set in them according to whether the file
|
||||||
descriptors specified by
|
descriptors specified by \fIares_fds(3)\fP are ready for reading and writing.
|
||||||
.BR ares_fds (3)
|
(The easiest way to determine this information is to invoke
|
||||||
are ready for reading and writing. (The easiest way to determine this
|
|
||||||
information is to invoke
|
|
||||||
.B select
|
.B select
|
||||||
with a timeout no greater than the timeout given by
|
with a timeout no greater than the timeout given by \fIares_timeout(3)\fP ).
|
||||||
.BR ares_timeout (3)).
|
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B ares_process
|
.B ares_process
|
||||||
|
@@ -124,7 +124,12 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
|
|||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
/* failed, free the malloc()ed memory */
|
||||||
|
free(squery->name);
|
||||||
|
free(squery);
|
||||||
callback(arg, status, NULL, 0);
|
callback(arg, status, NULL, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,8 +24,7 @@ ares_send \- Initiate a DNS query
|
|||||||
.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP,
|
.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP,
|
||||||
.B unsigned char *\fIabuf\fP, int \fIalen\fP)
|
.B unsigned char *\fIabuf\fP, int \fIalen\fP)
|
||||||
.PP
|
.PP
|
||||||
.B
|
.B void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP,
|
||||||
void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP,
|
|
||||||
.B int \fIqlen\fP, ares_callback \fIcallback\fP, void *\fIarg\fP)
|
.B int \fIqlen\fP, ares_callback \fIcallback\fP, void *\fIarg\fP)
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@@ -35,7 +35,9 @@ const char *ares_strerror(int code)
|
|||||||
"Timeout while contacting DNS servers",
|
"Timeout while contacting DNS servers",
|
||||||
"End of file",
|
"End of file",
|
||||||
"Error reading file",
|
"Error reading file",
|
||||||
"Out of memory"
|
"Out of memory",
|
||||||
|
"Channel is being destroyed",
|
||||||
|
"Misformatted string"
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
|
assert(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
|
||||||
|
@@ -27,10 +27,8 @@ ares_fds \- Get file descriptors to select on for name service
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The
|
||||||
.B ares_timeout
|
.B ares_timeout
|
||||||
function determines the maximum time for which the caller should wait
|
function determines the maximum time for which the caller should wait before
|
||||||
before invoking
|
invoking \fIares_process(3)\fP to process timeouts. The parameter
|
||||||
.BR ares_process (3)
|
|
||||||
to process timeouts. The parameter
|
|
||||||
.I maxtv
|
.I maxtv
|
||||||
specifies a existing maximum timeout, or
|
specifies a existing maximum timeout, or
|
||||||
.B NULL
|
.B NULL
|
||||||
|
@@ -4,12 +4,12 @@
|
|||||||
#define ARES__VERSION_H
|
#define ARES__VERSION_H
|
||||||
|
|
||||||
#define ARES_VERSION_MAJOR 1
|
#define ARES_VERSION_MAJOR 1
|
||||||
#define ARES_VERSION_MINOR 0
|
#define ARES_VERSION_MINOR 2
|
||||||
#define ARES_VERSION_PATCH 0
|
#define ARES_VERSION_PATCH 0
|
||||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||||
(ARES_VERSION_MINOR<<8)|\
|
(ARES_VERSION_MINOR<<8)|\
|
||||||
(ARES_VERSION_PATCH))
|
(ARES_VERSION_PATCH))
|
||||||
#define ARES_VERSION_STR "1.0.0"
|
#define ARES_VERSION_STR "1.2.0"
|
||||||
|
|
||||||
const char *ares_version(int *version);
|
const char *ares_version(int *version);
|
||||||
|
|
||||||
|
4
ares/buildconf
Executable file
4
ares/buildconf
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
aclocal
|
||||||
|
autoconf
|
@@ -96,3 +96,5 @@ for(@entries) {
|
|||||||
`gzip -9 $name-$version.tar`;
|
`gzip -9 $name-$version.tar`;
|
||||||
# remove the dir
|
# remove the dir
|
||||||
`rm -rf $name-$version`;
|
`rm -rf $name-$version`;
|
||||||
|
|
||||||
|
print "NOTE: now cvs tag this release!\n";
|
||||||
|
BIN
ares/vc/vc.ncb
BIN
ares/vc/vc.ncb
Binary file not shown.
BIN
ares/vc/vc.opt
BIN
ares/vc/vc.opt
Binary file not shown.
16
buildconf
16
buildconf
@@ -67,7 +67,7 @@ echo "buildconf: autoheader version $ah_version (ok)"
|
|||||||
# automake 1.7 or newer
|
# automake 1.7 or newer
|
||||||
#
|
#
|
||||||
need_automake="1.7"
|
need_automake="1.7"
|
||||||
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
|
||||||
if test -z "$am_version"; then
|
if test -z "$am_version"; then
|
||||||
echo "buildconf: automake not found."
|
echo "buildconf: automake not found."
|
||||||
echo " You need automake version $need_automake or newer installed."
|
echo " You need automake version $need_automake or newer installed."
|
||||||
@@ -157,27 +157,27 @@ fi
|
|||||||
# run the correct scripts now
|
# run the correct scripts now
|
||||||
|
|
||||||
echo "buildconf: running libtoolize"
|
echo "buildconf: running libtoolize"
|
||||||
${LIBTOOLIZE:-libtoolize} --copy --automake --force || die "The command '${LIBTOOLIZE:-libtoolize} --copy --automake --force' failed"
|
${LIBTOOLIZE:-libtoolize} --copy --automake --force || die "The libtool command failed"
|
||||||
echo "buildconf: running aclocal"
|
echo "buildconf: running aclocal"
|
||||||
${ACLOCAL:-aclocal} || die "The command '${AUTOHEADER:-aclocal}' failed"
|
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||||
echo "buildconf: running aclocal hack to convert all mv to mv -f"
|
echo "buildconf: running aclocal hack to convert all mv to mv -f"
|
||||||
perl -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
|
perl -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
|
||||||
echo "buildconf: running autoheader"
|
echo "buildconf: running autoheader"
|
||||||
${AUTOHEADER:-autoheader} || die "The command '${AUTOHEADER:-autoheader}' failed"
|
${AUTOHEADER:-autoheader} || die "The autoheader command failed"
|
||||||
echo "buildconf: running autoconf"
|
echo "buildconf: running autoconf"
|
||||||
${AUTOCONF:-autoconf} || die "The command '${AUTOCONF:-autoconf}' failed"
|
${AUTOCONF:-autoconf} || die "The autoconf command failed"
|
||||||
|
|
||||||
if test -d ares; then
|
if test -d ares; then
|
||||||
cd ares
|
cd ares
|
||||||
echo "buildconf: running aclocal in the ares directory"
|
echo "buildconf: running aclocal in the ares directory"
|
||||||
${ACLOCAL:-aclocal} || die "The command '${ACLOCAL:-aclocal}' failed"
|
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The ares aclocal command failed"
|
||||||
echo "buildconf: running autoconf in the ares directory"
|
echo "buildconf: running autoconf in the ares directory"
|
||||||
${AUTOCONF:-autoconf} || die "The command '${AUTOCONF:-autoconf}' failed"
|
${AUTOCONF:-autoconf} || die "The ares autoconf command failed"
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "buildconf: running automake"
|
echo "buildconf: running automake"
|
||||||
${AUTOMAKE:-automake} -a || die "The command '${AUTOMAKE:-automake} -a' failed"
|
${AUTOMAKE:-automake} -a || die "The automake command failed"
|
||||||
|
|
||||||
echo "buildconf: OK"
|
echo "buildconf: OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
320
configure.ac
320
configure.ac
@@ -16,22 +16,34 @@ AM_CONFIG_HEADER(lib/config.h src/config.h)
|
|||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
dnl SED is needed by some of the tools
|
dnl SED is needed by some of the tools
|
||||||
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
|
AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure,
|
||||||
|
$PATH:/usr/bin:/usr/local/bin)
|
||||||
AC_SUBST(SED)
|
AC_SUBST(SED)
|
||||||
|
|
||||||
|
if test "x$SED" = "xsed-was-not-found-by-configure"; then
|
||||||
|
AC_MSG_WARN([sed was not found, this may ruin your chances to build fine])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl AR is used by libtool, and try the odd Solaris path too
|
dnl AR is used by libtool, and try the odd Solaris path too
|
||||||
AC_PATH_PROG( AR, ar, , $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
|
dnl we use AC_CHECK_TOOL since this should make a library for the target
|
||||||
|
dnl platform
|
||||||
|
AC_CHECK_TOOL(AR, ar,
|
||||||
|
ar-was-not-found-by-configure,
|
||||||
|
$PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
|
||||||
AC_SUBST(AR)
|
AC_SUBST(AR)
|
||||||
|
if test "x$AR" = "xar-was-not-found-by-configure"; then
|
||||||
|
AC_MSG_WARN([ar was not found, this may ruin your chances to build fine])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl figure out the libcurl version
|
dnl figure out the libcurl version
|
||||||
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
|
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
|
||||||
AM_INIT_AUTOMAKE(curl,$VERSION)
|
AM_INIT_AUTOMAKE(curl,$VERSION)
|
||||||
AC_MSG_CHECKING([curl version])
|
AC_MSG_CHECKING([curl version])
|
||||||
AC_MSG_RESULT($VERSION)
|
AC_MSG_RESULT($VERSION)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl we extract the numerical version for curl-config only
|
dnl we extract the numerical version for curl-config only
|
||||||
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h`
|
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
|
||||||
AC_SUBST(VERSIONNUM)
|
AC_SUBST(VERSIONNUM)
|
||||||
|
|
||||||
dnl Solaris pkgadd support definitions
|
dnl Solaris pkgadd support definitions
|
||||||
@@ -42,6 +54,17 @@ AC_SUBST(PKGADD_PKG)
|
|||||||
AC_SUBST(PKGADD_NAME)
|
AC_SUBST(PKGADD_NAME)
|
||||||
AC_SUBST(PKGADD_VENDOR)
|
AC_SUBST(PKGADD_VENDOR)
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl initialize all the info variables to 'no'
|
||||||
|
curl_ssl_msg="no (--with-ssl)"
|
||||||
|
curl_zlib_msg="no (--with-zlib)"
|
||||||
|
curl_krb4_msg="no (--with-krb4*)"
|
||||||
|
curl_gss_msg="no (--with-gssapi)"
|
||||||
|
curl_spnego_msg="no (--with-spnego)"
|
||||||
|
curl_ares_msg="no (--enable-ares)"
|
||||||
|
curl_ipv6_msg="no (--enable-ipv6)"
|
||||||
|
curl_idn_msg="no (--with-libidn)"
|
||||||
|
curl_manual_msg="no (--enable-manual)"
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Detect the canonical host and target build environment
|
dnl Detect the canonical host and target build environment
|
||||||
@@ -258,7 +281,7 @@ dnl At least one system has been identified to require BOTH nsl and socket
|
|||||||
dnl libs at the same time to link properly.
|
dnl libs at the same time to link properly.
|
||||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||||
then
|
then
|
||||||
AC_MSG_CHECKING([trying gethostbyname with both nsl and socket libs])
|
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
|
||||||
my_ac_save_LIBS=$LIBS
|
my_ac_save_LIBS=$LIBS
|
||||||
LIBS="-lnsl -lsocket $LIBS"
|
LIBS="-lnsl -lsocket $LIBS"
|
||||||
AC_TRY_LINK( ,
|
AC_TRY_LINK( ,
|
||||||
@@ -383,7 +406,11 @@ main()
|
|||||||
))
|
))
|
||||||
|
|
||||||
if test "$ipv6" = "yes"; then
|
if test "$ipv6" = "yes"; then
|
||||||
|
curl_ipv6_msg="enabled"
|
||||||
|
|
||||||
CURL_CHECK_WORKING_GETADDRINFO
|
CURL_CHECK_WORKING_GETADDRINFO
|
||||||
|
|
||||||
|
CURL_CHECK_NI_WITHSCOPEID
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -547,6 +574,8 @@ then
|
|||||||
KRB4_ENABLED=1
|
KRB4_ENABLED=1
|
||||||
AC_SUBST(KRB4_ENABLED)
|
AC_SUBST(KRB4_ENABLED)
|
||||||
|
|
||||||
|
curl_krb4_msg="enabled"
|
||||||
|
|
||||||
dnl the krb4 stuff needs a strlcpy()
|
dnl the krb4 stuff needs a strlcpy()
|
||||||
AC_CHECK_FUNCS(strlcpy)
|
AC_CHECK_FUNCS(strlcpy)
|
||||||
|
|
||||||
@@ -580,7 +609,9 @@ if test x"$want_spnego" = xyes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SPNEGO, 1, [Define this if you have the SPNEGO library fbopenssl])
|
AC_DEFINE(HAVE_SPNEGO, 1,
|
||||||
|
[Define this if you have the SPNEGO library fbopenssl])
|
||||||
|
curl_spnego_msg="enabled"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -636,6 +667,8 @@ if test x"$want_gss" = xyes; then
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
|
AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
|
||||||
|
|
||||||
|
curl_gss_msg="enabled"
|
||||||
|
|
||||||
if test -n "$GSSAPI_INCS"; then
|
if test -n "$GSSAPI_INCS"; then
|
||||||
# cut off the preceding -I from the include path
|
# cut off the preceding -I from the include path
|
||||||
GSSAPI_INCS=`echo $GSSAPI_INCS | sed -e s/^-I//g`
|
GSSAPI_INCS=`echo $GSSAPI_INCS | sed -e s/^-I//g`
|
||||||
@@ -651,33 +684,6 @@ else
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl Detect the pkg-config tool, as it may have extra info about the
|
|
||||||
dnl openssl installation we can use. I *believe* this is what we are
|
|
||||||
dnl expected to do on really recent Redhat Linux hosts.
|
|
||||||
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
|
|
||||||
if test "$PKGCONFIG" != "no" ; then
|
|
||||||
AC_MSG_CHECKING([for OpenSSL options using pkg-config])
|
|
||||||
|
|
||||||
$PKGCONFIG --exists openssl
|
|
||||||
SSL_EXISTS=$?
|
|
||||||
|
|
||||||
if test "$SSL_EXISTS" -eq "0"; then
|
|
||||||
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
|
|
||||||
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
|
|
||||||
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
|
|
||||||
|
|
||||||
LIBS="$LIBS $SSL_LIBS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
|
|
||||||
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
|
|
||||||
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Check for the presence of SSL libraries and headers
|
dnl Check for the presence of SSL libraries and headers
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -693,14 +699,39 @@ AC_HELP_STRING([--without-ssl], [disable SSL]),
|
|||||||
|
|
||||||
if test X"$OPT_SSL" = Xno
|
if test X"$OPT_SSL" = Xno
|
||||||
then
|
then
|
||||||
AC_MSG_WARN(SSL/https support disabled)
|
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more])
|
||||||
else
|
else
|
||||||
|
|
||||||
dnl Check for and handle argument to --with-ssl.
|
dnl backup the pre-ssl variables
|
||||||
|
|
||||||
dnl save the pre-ssl check flags for a while
|
|
||||||
CLEANLDFLAGS="$LDFLAGS"
|
CLEANLDFLAGS="$LDFLAGS"
|
||||||
CLEANCPPFLAGS="$CPPFLAGS"
|
CLEANCPPFLAGS="$CPPFLAGS"
|
||||||
|
CLEANLIBS="$LIBS"
|
||||||
|
|
||||||
|
dnl Detect the pkg-config tool, as it may have extra info about the openssl
|
||||||
|
dnl installation we can use. I *believe* this is what we are expected to do
|
||||||
|
dnl on really recent Redhat Linux hosts.
|
||||||
|
|
||||||
|
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
|
||||||
|
if test "$PKGCONFIG" != "no" ; then
|
||||||
|
AC_MSG_CHECKING([OpenSSL options with pkg-config])
|
||||||
|
|
||||||
|
$PKGCONFIG --exists openssl
|
||||||
|
SSL_EXISTS=$?
|
||||||
|
|
||||||
|
if test "$SSL_EXISTS" -eq "0"; then
|
||||||
|
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
|
||||||
|
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
|
||||||
|
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
|
||||||
|
|
||||||
|
dnl use the values pkg-config reported
|
||||||
|
LIBS="$LIBS $SSL_LIBS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
|
||||||
|
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
|
||||||
|
AC_MSG_RESULT([found])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
case "$OPT_SSL" in
|
case "$OPT_SSL" in
|
||||||
yes)
|
yes)
|
||||||
@@ -718,14 +749,13 @@ else
|
|||||||
AC_CHECK_LIB(crypto, CRYPTO_lock,[
|
AC_CHECK_LIB(crypto, CRYPTO_lock,[
|
||||||
HAVECRYPTO="yes"
|
HAVECRYPTO="yes"
|
||||||
],[
|
],[
|
||||||
OLDLDFLAGS="$LDFLAGS"
|
|
||||||
OLDCPPFLAGS="$CPPFLAGS"
|
|
||||||
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
|
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
|
||||||
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
||||||
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
|
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
|
||||||
HAVECRYPTO="yes" ], [
|
HAVECRYPTO="yes" ], [
|
||||||
LDFLAGS="$OLDLDFLAGS"
|
LDFLAGS="$CLEANLDFLAGS"
|
||||||
CPPFLAGS="$OLDCPPFLAGS"
|
CPPFLAGS="$CLEANCPPFLAGS"
|
||||||
|
LIBS="$CLEANLIBS"
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -770,10 +800,12 @@ else
|
|||||||
dnl Check for SSLeay headers
|
dnl Check for SSLeay headers
|
||||||
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
|
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
|
||||||
openssl/pem.h openssl/ssl.h openssl/err.h,
|
openssl/pem.h openssl/ssl.h openssl/err.h,
|
||||||
|
curl_ssl_msg="enabled"
|
||||||
OPENSSL_ENABLED=1)
|
OPENSSL_ENABLED=1)
|
||||||
|
|
||||||
if test $ac_cv_header_openssl_x509_h = no; then
|
if test $ac_cv_header_openssl_x509_h = no; then
|
||||||
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
|
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
|
||||||
|
curl_ssl_msg="enabled"
|
||||||
OPENSSL_ENABLED=1)
|
OPENSSL_ENABLED=1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -894,6 +926,7 @@ case "$OPT_ZLIB" in
|
|||||||
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
|
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
|
||||||
AMFIXLIB="1"
|
AMFIXLIB="1"
|
||||||
AC_MSG_NOTICE([found both libz and libz.h header])
|
AC_MSG_NOTICE([found both libz and libz.h header])
|
||||||
|
curl_zlib_msg="enabled"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -901,6 +934,43 @@ esac
|
|||||||
dnl set variable for use in automakefile(s)
|
dnl set variable for use in automakefile(s)
|
||||||
AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
|
AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to build with libidn])
|
||||||
|
AC_ARG_WITH(libidn,
|
||||||
|
AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
|
||||||
|
AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
|
||||||
|
[LIBIDN="$withval"])
|
||||||
|
|
||||||
|
case "$LIBIDN" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
|
||||||
|
[
|
||||||
|
dnl if there was a given path, try it
|
||||||
|
nolibidn="true"
|
||||||
|
if test "x$LIBIDN" != "xyes"; then
|
||||||
|
nolibidn="" dnl reset to test again
|
||||||
|
oldLDFLAGS=$LDFLAGS
|
||||||
|
oldCPPFLAGS=$CPPFLAGS
|
||||||
|
LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
|
||||||
|
AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
|
||||||
|
nolibidn="true"
|
||||||
|
LDFLAGS=$oldLDFLAGS
|
||||||
|
CPPFLAGS=$oldCPPFLAGS)
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test "x$nolibidn" != "xtrue"; then
|
||||||
|
curl_idn_msg="enabled"
|
||||||
|
dnl different versions of libidn have different setups of these:
|
||||||
|
AC_CHECK_FUNCS( idn_free )
|
||||||
|
AC_CHECK_HEADERS( idn-free.h )
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl Default is to try the thread-safe versions of a few functions
|
dnl Default is to try the thread-safe versions of a few functions
|
||||||
OPT_THREAD=on
|
OPT_THREAD=on
|
||||||
|
|
||||||
@@ -915,6 +985,7 @@ printf("just fine");
|
|||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[ AC_MSG_RESULT([yes])
|
[ AC_MSG_RESULT([yes])
|
||||||
|
RECENTAIX=yes
|
||||||
OPT_THREAD=off ],
|
OPT_THREAD=off ],
|
||||||
[ AC_MSG_RESULT([no]) ]
|
[ AC_MSG_RESULT([no]) ]
|
||||||
)
|
)
|
||||||
@@ -952,10 +1023,31 @@ else
|
|||||||
dnl is there a localtime_r()
|
dnl is there a localtime_r()
|
||||||
CURL_CHECK_LOCALTIME_R()
|
CURL_CHECK_LOCALTIME_R()
|
||||||
|
|
||||||
AC_CHECK_FUNCS( gmtime_r )
|
dnl is there a strerror_r()
|
||||||
|
CURL_CHECK_STRERROR_R()
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS( gmtime_r )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl for recent AIX versions, we skip all the thread-safe checks above since
|
||||||
|
dnl they claim a thread-safe libc using the standard API. But there are
|
||||||
|
dnl some functions still not thread-safe. Check for these!
|
||||||
|
|
||||||
|
dnl Let's hope this split URL remains working:
|
||||||
|
dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
|
||||||
|
dnl genprogc/thread_quick_ref.htm
|
||||||
|
|
||||||
|
if test "x$RECENTAIX" = "xyes"; then
|
||||||
|
dnl is there a localtime_r()
|
||||||
|
CURL_CHECK_LOCALTIME_R()
|
||||||
|
|
||||||
|
dnl is there a strerror_r()
|
||||||
|
CURL_CHECK_STRERROR_R()
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS( gmtime_r )
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Back to "normal" configuring
|
dnl Back to "normal" configuring
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -979,6 +1071,7 @@ AC_CHECK_HEADERS(
|
|||||||
arpa/inet.h \
|
arpa/inet.h \
|
||||||
net/if.h \
|
net/if.h \
|
||||||
netinet/in.h \
|
netinet/in.h \
|
||||||
|
netinet/tcp.h \
|
||||||
netdb.h \
|
netdb.h \
|
||||||
sys/sockio.h \
|
sys/sockio.h \
|
||||||
sys/stat.h \
|
sys/stat.h \
|
||||||
@@ -1015,6 +1108,9 @@ dnl default includes
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1027,6 +1123,7 @@ AC_CHECK_SIZEOF(curl_off_t, ,[
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "$srcdir/include/curl/curl.h"
|
#include "$srcdir/include/curl/curl.h"
|
||||||
])
|
])
|
||||||
|
AC_CHECK_SIZEOF(size_t)
|
||||||
|
|
||||||
AC_CHECK_TYPE(long long,
|
AC_CHECK_TYPE(long long,
|
||||||
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])])
|
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])])
|
||||||
@@ -1164,15 +1261,84 @@ dnl manual
|
|||||||
|
|
||||||
if test "$USE_MANUAL" = "1"; then
|
if test "$USE_MANUAL" = "1"; then
|
||||||
AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
|
AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
|
||||||
|
curl_manual_msg="enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl set variable for use in automakefile(s)
|
dnl set variable for use in automakefile(s)
|
||||||
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to enable ares])
|
||||||
|
AC_ARG_ENABLE(ares,
|
||||||
|
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])
|
||||||
|
AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
|
if test "x$IPV6_ENABLED" = "x1"; then
|
||||||
dnl $PATH:/usr/bin/:/usr/local/bin )
|
AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares])
|
||||||
dnl AC_SUBST(RANLIB)
|
fi
|
||||||
|
|
||||||
|
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])
|
||||||
|
dnl substitute HAVE_ARES for curl-config and similar
|
||||||
|
HAVE_ARES="1"
|
||||||
|
AC_SUBST(HAVE_ARES)
|
||||||
|
curl_ares_msg="enabled"
|
||||||
|
|
||||||
|
LIBS="$LIBS -lcares"
|
||||||
|
|
||||||
|
dnl For backwards compatibility default to includes/lib in srcdir/ares
|
||||||
|
dnl If a value is specified it is assumed that the libs are in $val/lib
|
||||||
|
dnl and the includes are in $val/include. This is the default setup for
|
||||||
|
dnl ares so it should not be a problem.
|
||||||
|
if test "x$enableval" = "xyes" ; then
|
||||||
|
if test -d "$srcdir/ares"; then
|
||||||
|
aresembedded="yes"
|
||||||
|
AC_CONFIG_SUBDIRS(ares)
|
||||||
|
aresinc=`cd $srcdir/ares && pwd`
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
||||||
|
|
||||||
|
dnl the pwd= below cannot 'cd' into the ares dir to get the full
|
||||||
|
dnl path to it, since it may not exist yet if we build outside of
|
||||||
|
dnl the source tree
|
||||||
|
pwd=`pwd`
|
||||||
|
LDFLAGS="$LDFLAGS -L$pwd/ares"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L$enableval/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$aresembedded"; then
|
||||||
|
dnl verify that a sufficient c-ares is here if we have pointed one
|
||||||
|
dnl out and don't use the "embedded" ares dir (in which case we don't
|
||||||
|
dnl check it because it might not have been built yet)
|
||||||
|
AC_MSG_CHECKING([that c-ares is good and recent enough])
|
||||||
|
AC_LINK_IFELSE( [
|
||||||
|
#include <ares.h>
|
||||||
|
/* provide a set of dummy functions in case c-ares was built with debug */
|
||||||
|
void curl_dofree() { }
|
||||||
|
void curl_sclose() { }
|
||||||
|
void curl_domalloc() { }
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
ares_channel channel;
|
||||||
|
ares_cancel(channel);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_ERROR([c-ares library defective or too old])
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
dnl lame option to switch on debug options
|
dnl lame option to switch on debug options
|
||||||
@@ -1199,52 +1365,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable ares])
|
|
||||||
AC_ARG_ENABLE(ares,
|
|
||||||
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])
|
|
||||||
AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
|
|
||||||
[ case "$enableval" in
|
|
||||||
no)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
*) AC_MSG_RESULT(yes)
|
|
||||||
|
|
||||||
if test "x$IPV6_ENABLED" = "x1"; then
|
|
||||||
AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])
|
|
||||||
dnl substitute HAVE_ARES for curl-config and similar
|
|
||||||
HAVE_ARES="1"
|
|
||||||
AC_SUBST(HAVE_ARES)
|
|
||||||
|
|
||||||
LIBS="$LIBS -lcares"
|
|
||||||
|
|
||||||
dnl For backwards compatibility default to includes/lib in srcdir/ares
|
|
||||||
dnl If a value is specified it is assumed that the libs are in $val/lib
|
|
||||||
dnl and the includes are in $val/include. This is the default setup for
|
|
||||||
dnl ares so it should not be a problem.
|
|
||||||
if test "x$enableval" = "xyes" ; then
|
|
||||||
if test -d "$srcdir/ares"; then
|
|
||||||
AC_CONFIG_SUBDIRS(ares)
|
|
||||||
aresinc=`cd $srcdir/ares && pwd`
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
|
||||||
|
|
||||||
dnl the pwd= below cannot 'cd' into the ares dir to get the full
|
|
||||||
dnl path to it, since it may not exist yet if we build outside of
|
|
||||||
dnl the source tree
|
|
||||||
pwd=`pwd`
|
|
||||||
LDFLAGS="$LDFLAGS -L$pwd/ares"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
|
||||||
LDFLAGS="$LDFLAGS -L$enableval/lib"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac ],
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
)
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile \
|
AC_CONFIG_FILES([Makefile \
|
||||||
docs/Makefile \
|
docs/Makefile \
|
||||||
docs/examples/Makefile \
|
docs/examples/Makefile \
|
||||||
@@ -1272,3 +1392,21 @@ AC_CONFIG_FILES([Makefile \
|
|||||||
curl-config
|
curl-config
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||||
|
|
||||||
|
curl version: ${VERSION}
|
||||||
|
Host setup: ${host}
|
||||||
|
Install prefix: ${prefix}
|
||||||
|
Compiler: ${CC}
|
||||||
|
SSL support: ${curl_ssl_msg}
|
||||||
|
zlib support: ${curl_zlib_msg}
|
||||||
|
krb4 support: ${curl_krb4_msg}
|
||||||
|
GSSAPI support: ${curl_gss_msg}
|
||||||
|
SNPEGO support: ${curl_spnego_msg}
|
||||||
|
c-ares support: ${curl_ares_msg}
|
||||||
|
ipv6 support: ${curl_ipv6_msg}
|
||||||
|
IDN support: ${curl_idn_msg}
|
||||||
|
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
|
||||||
|
Built-in manual: ${curl_manual_msg}
|
||||||
|
])
|
||||||
|
@@ -2,17 +2,8 @@
|
|||||||
;;;; $Id$
|
;;;; $Id$
|
||||||
|
|
||||||
;;; The curl hacker's C conventions.
|
;;; The curl hacker's C conventions.
|
||||||
|
;;; See the sample.emacs file on how this file can be made to take
|
||||||
;;; After loading this file and added the mode-hook you can in C
|
;;; effect automatically when editing curl source files.
|
||||||
;;; files, put something like this to use the curl style
|
|
||||||
;;; automatically:
|
|
||||||
;;
|
|
||||||
;; /* -----------------------------------------------------------------
|
|
||||||
;; * local variables:
|
|
||||||
;; * eval: (set c-file-style "curl")
|
|
||||||
;; * end:
|
|
||||||
;; */
|
|
||||||
;;
|
|
||||||
|
|
||||||
(defconst curl-c-style
|
(defconst curl-c-style
|
||||||
'((c-basic-offset . 2)
|
'((c-basic-offset . 2)
|
||||||
@@ -37,12 +28,15 @@
|
|||||||
(setq tab-width 8
|
(setq tab-width 8
|
||||||
indent-tabs-mode nil ; Use spaces. Not tabs.
|
indent-tabs-mode nil ; Use spaces. Not tabs.
|
||||||
comment-column 40
|
comment-column 40
|
||||||
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t"))
|
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode"))
|
||||||
)
|
)
|
||||||
;; keybindings for C, C++, and Objective-C. We can put these in
|
;; keybindings for C, C++, and Objective-C. We can put these in
|
||||||
;; c-mode-base-map because of inheritance ...
|
;; c-mode-base-map because of inheritance ...
|
||||||
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
|
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
|
||||||
|
(define-key c-mode-base-map "\M-m" 'delete-trailing-whitespace)
|
||||||
(setq c-recognize-knr-p nil)
|
(setq c-recognize-knr-p nil)
|
||||||
|
;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
|
||||||
|
(setq show-trailing-whitespace t)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Set this is in your .emacs if you want to use the c-mode-hook as
|
;; Set this is in your .emacs if you want to use the c-mode-hook as
|
||||||
|
@@ -3,8 +3,13 @@ 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
|
changelog of the current development status, as one or more of these problems
|
||||||
may have been fixed since this was written!
|
may have been fixed since this was written!
|
||||||
|
|
||||||
* NTLM authentication with passwords longer than 14 letters fail. There is
|
* If you use a very large amount of file descriptors (more than FD_SETSIZE)
|
||||||
a known fix for this, planned to come in curl 7.11.2
|
and then use libcurl, it might crash on its use of select() which then
|
||||||
|
stores data out of bounds. Bug report #948950.
|
||||||
|
|
||||||
|
* --limit-rate using -d or -F does not work. This is because the limit logic
|
||||||
|
is provided by the curl app in its read/write callbacks, and when doing
|
||||||
|
-d/-F the callbacks aren't used! Bug report #921395.
|
||||||
|
|
||||||
* Doing resumed upload over HTTP does not work with '-C -', because curl
|
* Doing resumed upload over HTTP does not work with '-C -', because curl
|
||||||
doesn't do a HEAD first to get the initial size. This needs to be done
|
doesn't do a HEAD first to get the initial size. This needs to be done
|
||||||
@@ -22,13 +27,6 @@ may have been fixed since this was written!
|
|||||||
indicate that the user wants to reach the root dir (this exception SHALL
|
indicate that the user wants to reach the root dir (this exception SHALL
|
||||||
remain even when this bug is fixed).
|
remain even when this bug is fixed).
|
||||||
|
|
||||||
* 1) libcurl does a POST
|
|
||||||
2) receives a 100-continue
|
|
||||||
3) sends away the POST
|
|
||||||
Now, if nothing else is returned from the server, libcurl MUST return
|
|
||||||
CURLE_GOT_NOTHING, but it seems it returns CURLE_OK as it seems to count
|
|
||||||
the 100-continue reply as a good enough reply.
|
|
||||||
|
|
||||||
* libcurl doesn't treat the content-length of compressed data properly, as
|
* libcurl doesn't treat the content-length of compressed data properly, as
|
||||||
it seems HTTP servers send the *uncompressed* length in that header and
|
it seems HTTP servers send the *uncompressed* length in that header and
|
||||||
libcurl thinks of it as the *compressed* lenght. Some explanations are here:
|
libcurl thinks of it as the *compressed* lenght. Some explanations are here:
|
||||||
@@ -38,9 +36,6 @@ may have been fixed since this was written!
|
|||||||
locally, which is because libcurl doesn't call the write callback with zero
|
locally, which is because libcurl doesn't call the write callback with zero
|
||||||
bytes. Explained here: http://curl.haxx.se/mail/archive-2003-04/0143.html
|
bytes. Explained here: http://curl.haxx.se/mail/archive-2003-04/0143.html
|
||||||
|
|
||||||
* Using CURLOPT_FAILONERROR (-f/--fail) will make authentication to stop
|
|
||||||
working if you use anything but plain Basic auth.
|
|
||||||
|
|
||||||
* IPv6 support on AIX 4.3.3 doesn't work due to a missing sockaddr_storage
|
* IPv6 support on AIX 4.3.3 doesn't work due to a missing sockaddr_storage
|
||||||
struct. It has been reported to work on AIX 5.1 though.
|
struct. It has been reported to work on AIX 5.1 though.
|
||||||
|
|
||||||
|
83
docs/LICENSE-MIXING
Normal file
83
docs/LICENSE-MIXING
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
License Mixing with apps, libcurl and Third Party Libraries
|
||||||
|
===========================================================
|
||||||
|
|
||||||
|
libcurl can be built to use a fair amount of various third party libraries,
|
||||||
|
libraries that are written and provided by other parties that are distributed
|
||||||
|
using their own licenses. Even libcurl itself contains code that may cause
|
||||||
|
problems to some. This document attempts to describe what licenses libcurl and
|
||||||
|
the other libraries use and what possible dilemmas linking and mixing them all
|
||||||
|
can lead to for end users.
|
||||||
|
|
||||||
|
I am not a lawyer and this is not legal advice!
|
||||||
|
|
||||||
|
One common dilemma is that GPL[*]-licensed code is not allowed to be linked
|
||||||
|
with code licensed under the Original BSD license (with the announcement
|
||||||
|
clause, unless there's a specified exception in the GPL-licensed module). You
|
||||||
|
may still build your own copies that use them all, but distributing them as
|
||||||
|
binaries would be to violate the GPL license. This particular problem was
|
||||||
|
addressed when the Modified BSD license was created, which does not have the
|
||||||
|
annoncement 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!
|
||||||
|
|
||||||
|
OpenSSL http://www.openssl.org/source/license.html
|
||||||
|
|
||||||
|
Uses an Original BSD-style license with an announement 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).
|
||||||
|
|
||||||
|
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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 Original BSD-licensed with the announcement clause. Some
|
||||||
|
of the code in libcurl that is written to deal with Kerberos4 likewise
|
||||||
|
have such a license.
|
||||||
|
|
||||||
|
GSSAPI
|
||||||
|
|
||||||
|
While nothing in particular says that a GSS/Kerberos5 library must use
|
||||||
|
any particular license, the one I've used (Heimdal) is Original BSD-
|
||||||
|
licensed with the announcement clause.
|
||||||
|
|
||||||
|
fbopenssl
|
||||||
|
|
||||||
|
Unclear license. Based on its name, I assume that it uses the OpenSSL
|
||||||
|
license and thus shares the same issues as described for OpenSSL
|
||||||
|
above.
|
||||||
|
|
||||||
|
libidn http://www.gnu.org/licenses/lgpl.html
|
||||||
|
|
||||||
|
Uses the GNU Lesser General Public License. LGPL is a variation of GPL
|
||||||
|
with slightly less aggressive "copyleft". This license requires more
|
||||||
|
requirements to be met when distributing binaries, see the license for
|
||||||
|
details. Also note that if you distribute a binary that includes this
|
||||||
|
library, you must also include the full LGPL license text. Please
|
||||||
|
properly point out what parts of the distributed package that the
|
||||||
|
license addresses.
|
||||||
|
|
||||||
|
OpenLDAP http://www.openldap.org/software/release/license.html
|
||||||
|
|
||||||
|
Uses a Modified BSD-style license. Since libcurl uses OpenLDAP as a
|
||||||
|
shared library only, I have not heard of anyone that ships OpenLDAP
|
||||||
|
linked with libcurl in an app.
|
||||||
|
|
||||||
|
|
||||||
|
[*] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html
|
11
docs/MANUAL
11
docs/MANUAL
@@ -63,6 +63,11 @@ USING PASSWORDS
|
|||||||
|
|
||||||
curl -u name:passwd ftp://machine.domain:port/full/path/to/file
|
curl -u name:passwd ftp://machine.domain:port/full/path/to/file
|
||||||
|
|
||||||
|
FTPS
|
||||||
|
|
||||||
|
It is just like for FTP, but you may also want to specify and use
|
||||||
|
SSL-specific options for certificates etc.
|
||||||
|
|
||||||
HTTP
|
HTTP
|
||||||
|
|
||||||
The HTTP URL doesn't support user and password in the URL string. Curl
|
The HTTP URL doesn't support user and password in the URL string. Curl
|
||||||
@@ -75,6 +80,12 @@ USING PASSWORDS
|
|||||||
|
|
||||||
curl -u name:passwd http://machine.domain/full/path/to/file
|
curl -u name:passwd http://machine.domain/full/path/to/file
|
||||||
|
|
||||||
|
HTTP offers many different methods of authentication and curl supports
|
||||||
|
several: Basic, Digest, NTLM and Negotiate. Without telling which method to
|
||||||
|
use, curl defaults to Basic. You can also ask curl to pick the most secure
|
||||||
|
ones out of the ones that the server accepts for the given URL, by using
|
||||||
|
--anyauth.
|
||||||
|
|
||||||
NOTE! Since HTTP URLs don't support user and password, you can't use that
|
NOTE! Since HTTP URLs don't support user and password, you can't use that
|
||||||
style when using Curl via a proxy. You _must_ use the -u style fetch
|
style when using Curl via a proxy. You _must_ use the -u style fetch
|
||||||
during such circumstances.
|
during such circumstances.
|
||||||
|
@@ -4,28 +4,20 @@
|
|||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
man_MANS = \
|
man_MANS = curl.1 curl-config.1
|
||||||
curl.1 \
|
GENHTMLPAGES = curl.html curl-config.html
|
||||||
curl-config.1
|
PDFPAGES = curl.pdf curl-config.pdf
|
||||||
|
|
||||||
GENHTMLPAGES = \
|
|
||||||
curl.html \
|
|
||||||
curl-config.html
|
|
||||||
|
|
||||||
HTMLPAGES = $(GENHTMLPAGES) index.html
|
HTMLPAGES = $(GENHTMLPAGES) index.html
|
||||||
|
|
||||||
PDFPAGES = \
|
|
||||||
curl.pdf \
|
|
||||||
curl-config.pdf
|
|
||||||
|
|
||||||
SUBDIRS = examples libcurl
|
SUBDIRS = examples libcurl
|
||||||
|
|
||||||
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
|
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
|
||||||
|
|
||||||
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
||||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \
|
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
||||||
VERSIONS KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) \
|
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
||||||
HISTORY INSTALL libcurl-the-guide $(PDFPAGES)
|
libcurl-the-guide $(PDFPAGES) LICENSE-MIXING
|
||||||
|
|
||||||
MAN2HTML= roffit < $< >$@
|
MAN2HTML= roffit < $< >$@
|
||||||
|
|
||||||
|
@@ -28,6 +28,12 @@ server, do one of the following:
|
|||||||
|
|
||||||
With the curl command tool: --cacert [file]
|
With the curl command tool: --cacert [file]
|
||||||
|
|
||||||
|
3. Add the CA cert for your server to the existing default CA cert bundle.
|
||||||
|
The default path of the CA bundle installed with the curl package is:
|
||||||
|
/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running
|
||||||
|
configure with the --with-ca-bundle option pointing out the path of your
|
||||||
|
choice.
|
||||||
|
|
||||||
Neglecting to use one of the above menthods when dealing with a server using a
|
Neglecting to use one of the above menthods when dealing with a server using a
|
||||||
certficate that isn't signed by one of the certficates in the installed CA
|
certficate that isn't signed by one of the certficates in the installed CA
|
||||||
cert bundle, will cause SSL to report an error ("certificate verify failed")
|
cert bundle, will cause SSL to report an error ("certificate verify failed")
|
||||||
@@ -40,7 +46,3 @@ connections that previously weren't really secure. It turned out many people
|
|||||||
were using previous versions of curl/libcurl without realizing the need for
|
were using previous versions of curl/libcurl without realizing the need for
|
||||||
the CA cert options to get truly secure SSL connections.
|
the CA cert options to get truly secure SSL connections.
|
||||||
|
|
||||||
The default path of the CA bundle installed with the curl package is:
|
|
||||||
/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running
|
|
||||||
configure with the --with-ca-bundle option pointing out the path of your
|
|
||||||
choice.
|
|
||||||
|
41
docs/TODO
41
docs/TODO
@@ -36,6 +36,10 @@ TODO
|
|||||||
* Option to set the SO_KEEPALIVE socket option to make libcurl notice and
|
* Option to set the SO_KEEPALIVE socket option to make libcurl notice and
|
||||||
disconnect very long time idle connections.
|
disconnect very long time idle connections.
|
||||||
|
|
||||||
|
* When posting multipart forms, we should _not_ create the whole data chunk
|
||||||
|
in memory before the upload starts but do it in a "streaming" manner to
|
||||||
|
allow uploads that are way larger than the amount of system memory.
|
||||||
|
|
||||||
LIBCURL - multi interface
|
LIBCURL - multi interface
|
||||||
|
|
||||||
* Add curl_multi_timeout() to make libcurl's ares-functionality better.
|
* Add curl_multi_timeout() to make libcurl's ares-functionality better.
|
||||||
@@ -57,6 +61,13 @@ TODO
|
|||||||
|
|
||||||
FTP
|
FTP
|
||||||
|
|
||||||
|
* Optimize the way libcurl uses CWD on each new request over a persistent
|
||||||
|
connection (on FTP) even if it doesn't have to.
|
||||||
|
|
||||||
|
* REST fix for servers not behaving well on >2GB requests. This should fail
|
||||||
|
if the server doesn't set the pointer to the requested index. The tricky
|
||||||
|
part is to figure out if the server did the right thing or not.
|
||||||
|
|
||||||
* Support the most common FTP proxies, Philip Newton provided a list
|
* Support the most common FTP proxies, Philip Newton provided a list
|
||||||
allegedly from ncftp:
|
allegedly from ncftp:
|
||||||
http://curl.haxx.se/mail/archive-2003-04/0126.html
|
http://curl.haxx.se/mail/archive-2003-04/0126.html
|
||||||
@@ -70,10 +81,16 @@ TODO
|
|||||||
* Since USERPWD always override the user and password specified in URLs, we
|
* Since USERPWD always override the user and password specified in URLs, we
|
||||||
might need another way to specify user+password for anonymous ftp logins.
|
might need another way to specify user+password for anonymous ftp logins.
|
||||||
|
|
||||||
|
* The FTP code should get a way of returning errors that is known to still
|
||||||
|
have the control connection alive and sound. Currently, a returned error
|
||||||
|
from within ftp-functions does not tell if the control connection is still
|
||||||
|
OK to use or not. This causes libcurl to fail to re-use connections
|
||||||
|
slightly too often.
|
||||||
|
|
||||||
HTTP
|
HTTP
|
||||||
|
|
||||||
* Digest and GSS-Negotiate support for HTTP proxies. They only work on
|
* GSS-Negotiate support for HTTP proxies. They only work on direct
|
||||||
direct-connections to the server.
|
connections to the server.
|
||||||
|
|
||||||
* Pipelining. Sending multiple requests before the previous one(s) are done.
|
* Pipelining. Sending multiple requests before the previous one(s) are done.
|
||||||
This could possibly be implemented using the multi interface to queue
|
This could possibly be implemented using the multi interface to queue
|
||||||
@@ -91,6 +108,12 @@ TODO
|
|||||||
|
|
||||||
SSL
|
SSL
|
||||||
|
|
||||||
|
* Anton Fedorov's "dumpcert" patch:
|
||||||
|
http://curl.haxx.se/mail/lib-2004-03/0088.html
|
||||||
|
|
||||||
|
* Evaluate/apply Gertjan van Wingerde's SSL patches:
|
||||||
|
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||||
|
|
||||||
* If you really want to improve the SSL situation, you should probably have a
|
* If you really want to improve the SSL situation, you should probably have a
|
||||||
look at SSL cafile loading as well - quick traces look to me like these are
|
look at SSL cafile loading as well - quick traces look to me like these are
|
||||||
done on every request as well, when they should only be necessary once per
|
done on every request as well, when they should only be necessary once per
|
||||||
@@ -158,6 +181,18 @@ TODO
|
|||||||
* --data-encode that URL encodes the data before posting
|
* --data-encode that URL encodes the data before posting
|
||||||
http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested)
|
http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested)
|
||||||
|
|
||||||
|
* Provide a way to make options bound to a specific URL among several on the
|
||||||
|
command line. Possibly by adding a new option that separates options
|
||||||
|
between URLs, similar to this:
|
||||||
|
|
||||||
|
curl --data foo --url url.com --optionseparator
|
||||||
|
--url url2.com --optionseparator \
|
||||||
|
--url url3.com --data foo3
|
||||||
|
|
||||||
|
(--optionseparator used to show my point, it would need a better name)
|
||||||
|
|
||||||
|
The example would do a POST-GET-POST combination on a single command line.
|
||||||
|
|
||||||
BUILD
|
BUILD
|
||||||
|
|
||||||
* Consider extending 'roffit' to produce decent ASCII output, and use that
|
* Consider extending 'roffit' to produce decent ASCII output, and use that
|
||||||
@@ -185,8 +220,6 @@ TODO
|
|||||||
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||||
CURLMcode. These should be changed to be the same.
|
CURLMcode. These should be changed to be the same.
|
||||||
|
|
||||||
* curl_formparse() should be removed
|
|
||||||
|
|
||||||
* remove obsolete defines from curl/curl.h
|
* remove obsolete defines from curl/curl.h
|
||||||
|
|
||||||
* remove the following functions from the public API:
|
* remove the following functions from the public API:
|
||||||
|
65
docs/curl.1
65
docs/curl.1
@@ -1,8 +1,27 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man curl.1
|
.\" * _ _ ____ _
|
||||||
.\" Written by Daniel Stenberg
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2004, 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.
|
||||||
|
.\" *
|
||||||
|
.\" * $Id$
|
||||||
|
.\" **************************************************************************
|
||||||
.\"
|
.\"
|
||||||
.TH curl 1 "5 Mar 2004" "Curl 7.11.1" "Curl Manual"
|
.TH curl 1 "3 May 2004" "Curl 7.12" "Curl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl \- transfer a URL
|
curl \- transfer a URL
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -37,9 +56,10 @@ or you can get sequences of alphanumeric series by using [] as in:
|
|||||||
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
|
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
|
||||||
ftp://ftp.letters.com/file[a-z].txt
|
ftp://ftp.letters.com/file[a-z].txt
|
||||||
|
|
||||||
No nesting of the sequences is supported at the moment:
|
No nesting of the sequences is supported at the moment, but you can use
|
||||||
|
several ones next to each other:
|
||||||
|
|
||||||
http://www.any.org/archive[1996-1999]/volume[1-4]part{a,b,c,index}.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
|
You can specify any amount of URLs on the command line. They will be fetched
|
||||||
in a sequential manner in the specified order.
|
in a sequential manner in the specified order.
|
||||||
@@ -123,7 +143,7 @@ If this option is used several times, each occurrence will toggle it on/off.
|
|||||||
.IP "--connect-timeout <seconds>"
|
.IP "--connect-timeout <seconds>"
|
||||||
Maximum time in seconds that you allow the connection to the server to take.
|
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
|
This only limits the connection phase, once curl has connected this option is
|
||||||
of no more use. See also the \fI--max-time\fP option.
|
of no more use. See also the \fI-m/--max-time\fP option.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "-c/--cookie-jar <file name>"
|
.IP "-c/--cookie-jar <file name>"
|
||||||
@@ -153,8 +173,12 @@ transfer. It then uses the given output/input files to figure that out.
|
|||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "--create-dirs"
|
.IP "--create-dirs"
|
||||||
When used in conjunction with the -o option, curl will create the necessary
|
When used in conjunction with the -o option, curl will create the necessary
|
||||||
local directory hierarchy as needed.
|
local directory hierarchy as needed. This option creates the dirs mentioned
|
||||||
|
with the -o option, nothing else. If the -o file name uses no dir or if the
|
||||||
|
dirs it mentions already exist, no dir will be created.
|
||||||
|
|
||||||
|
To create remote directories when using FTP, try \fI--ftp-create-dirs\fP.
|
||||||
.IP "--crlf"
|
.IP "--crlf"
|
||||||
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||||
|
|
||||||
@@ -589,11 +613,23 @@ You may use this option as many times as you have number of URLs.
|
|||||||
(SSL) Pass phrase for the private key
|
(SSL) Pass phrase for the private key
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
|
.IP "--proxy-basic"
|
||||||
|
Tells curl to use HTTP Basic authentication when communicating with the given
|
||||||
|
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
|
||||||
|
the default authentication method curl uses with proxies.
|
||||||
|
|
||||||
|
If this option is used twice, the second will again disable proxy HTTP Basic
|
||||||
|
authentication.
|
||||||
|
.IP "--proxy-digest"
|
||||||
|
Tells curl to use HTTP Digest authentication when communicating with the given
|
||||||
|
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
||||||
|
|
||||||
|
If this option is used twice, the second will again disable proxy HTTP Digest.
|
||||||
.IP "--proxy-ntlm"
|
.IP "--proxy-ntlm"
|
||||||
Tells curl to use NTLM authentication when communicating with the given
|
Tells curl to use HTTP NTLM authentication when communicating with the given
|
||||||
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
|
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
|
||||||
|
|
||||||
If this option is used twice, the second will again disable proxy NTLM.
|
If this option is used twice, the second will again disable proxy HTTP NTLM.
|
||||||
.IP "-p/--proxytunnel"
|
.IP "-p/--proxytunnel"
|
||||||
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
|
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
|
||||||
protocols to attempt to tunnel through the proxy instead of merely using it to
|
protocols to attempt to tunnel through the proxy instead of merely using it to
|
||||||
@@ -707,6 +743,11 @@ is a plain '-', it is instead written to stdout. This option has no point when
|
|||||||
you're using a shell with decent redirecting capabilities.
|
you're using a shell with decent redirecting capabilities.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
|
.IP "--tcp-nodelay"
|
||||||
|
Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
|
||||||
|
details about this option. (Added in 7.11.2)
|
||||||
|
|
||||||
|
If this option is used several times, each occurance toggles this on/off.
|
||||||
.IP "-t/--telnet-option <OPT=val>"
|
.IP "-t/--telnet-option <OPT=val>"
|
||||||
Pass options to the telnet protocol. Supported options are:
|
Pass options to the telnet protocol. Supported options are:
|
||||||
|
|
||||||
@@ -816,6 +857,8 @@ This curl uses asynchronous name resolves.
|
|||||||
SPNEGO Negotiate authenticaion is supported.
|
SPNEGO Negotiate authenticaion is supported.
|
||||||
.IP "Largefile"
|
.IP "Largefile"
|
||||||
This curl supports transfers of large files, files larger than 2GB.
|
This curl supports transfers of large files, files larger than 2GB.
|
||||||
|
.IP "IDN"
|
||||||
|
This curl supports IDN - international domain names.
|
||||||
.RE
|
.RE
|
||||||
.IP "-w/--write-out <format>"
|
.IP "-w/--write-out <format>"
|
||||||
Defines what to display after a completed and successful operation. The format
|
Defines what to display after a completed and successful operation. The format
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
EXTRA_DIST = README curlgtk.c sepheaders.c simple.c postit2.c \
|
EXTRA_DIST = README curlgtk.c sepheaders.c simple.c postit2.c \
|
||||||
persistant.c ftpget.c Makefile.example \
|
persistant.c ftpget.c Makefile.example multithread.c getinmemory.c \
|
||||||
multithread.c getinmemory.c ftpupload.c httpput.c \
|
ftpupload.c httpput.c simplessl.c ftpgetresp.c http-post.c \
|
||||||
simplessl.c ftpgetresp.c http-post.c post-callback.c \
|
post-callback.c multi-app.c multi-double.c multi-single.c \
|
||||||
multi-app.c multi-double.c multi-single.c multi-post.c \
|
multi-post.c fopen.c simplepost.c makefile.dj curlx.c https.c \
|
||||||
fopen.c simplepost.c makefile.dj curlx.c
|
multi-debugcallback.c fileupload.c
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@echo "done"
|
@echo "done"
|
||||||
|
65
docs/examples/fileupload.c
Normal file
65
docs/examples/fileupload.c
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
curl_off_t size;
|
||||||
|
struct stat file_info;
|
||||||
|
double speed_upload, total_time;
|
||||||
|
FILE *fd;
|
||||||
|
|
||||||
|
fd = fopen("debugit", "r"); /* open file to upload */
|
||||||
|
if(!fd) {
|
||||||
|
|
||||||
|
return 1; /* can't continue */
|
||||||
|
}
|
||||||
|
|
||||||
|
stat("debugit", &file_info); /* to get the file size */
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
/* upload to this place */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL,
|
||||||
|
"file:///home/dast/src/curl/debug/new");
|
||||||
|
|
||||||
|
/* tell it to "upload" to the URL */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
|
||||||
|
|
||||||
|
/* set where to read from (on Windows you need to use READFUNCTION too) */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
|
||||||
|
|
||||||
|
/* and give the size of the upload (optional) */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||||
|
(curl_off_t)file_info.st_size);
|
||||||
|
|
||||||
|
/* enable verbose for easier tracing */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* now extract transfer info */
|
||||||
|
curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
|
||||||
|
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
|
||||||
|
|
||||||
|
fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
|
||||||
|
speed_upload, total_time);
|
||||||
|
|
||||||
|
/* always cleanup */
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
|
|||||||
close(hd) ;
|
close(hd) ;
|
||||||
|
|
||||||
/* get a FILE * of the same file, could also be made with
|
/* get a FILE * of the same file, could also be made with
|
||||||
fdopen() from the previous descriptor, but hey this is just
|
fdopen() from the previous descriptor, but hey this is just
|
||||||
an example! */
|
an example! */
|
||||||
hd_src = fopen(LOCAL_FILE, "rb");
|
hd_src = fopen(LOCAL_FILE, "rb");
|
||||||
|
|
||||||
|
@@ -62,6 +62,10 @@ int main(int argc, char **argv)
|
|||||||
/* we pass our 'chunk' struct to the callback function */
|
/* we pass our 'chunk' struct to the callback function */
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
|
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
|
||||||
|
|
||||||
|
/* some servers don't like requests that are made without a user-agent
|
||||||
|
field, so we provide one */
|
||||||
|
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
|
||||||
|
|
||||||
/* get it! */
|
/* get it! */
|
||||||
curl_easy_perform(curl_handle);
|
curl_easy_perform(curl_handle);
|
||||||
|
|
||||||
|
53
docs/examples/https.c
Normal file
53
docs/examples/https.c
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
|
||||||
|
|
||||||
|
#ifdef SKIP_PEER_VERIFICATION
|
||||||
|
/*
|
||||||
|
* If you want to connect to a site who isn't using a certificate that is
|
||||||
|
* signed by one of the certs in the CA bundle you have, you can skip the
|
||||||
|
* verification of the server's certificate. This makes the connection
|
||||||
|
* A LOT LESS SECURE.
|
||||||
|
*
|
||||||
|
* If you have a CA cert for the server stored someplace else than in the
|
||||||
|
* default bundle, then the CURLOPT_CAPATH option might come handy for
|
||||||
|
* you.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SKIP_HOSTNAME_VERFICATION
|
||||||
|
/*
|
||||||
|
* If the site you're connecting to uses a different host name that what
|
||||||
|
* they have mentioned in their server certificate's commonName (or
|
||||||
|
* subjectAltName) fields, libcurl will refuse to connect. You can skip
|
||||||
|
* this check, but this will make the connection less secure.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* always cleanup */
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
178
docs/examples/multi-debugcallback.c
Normal file
178
docs/examples/multi-debugcallback.c
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* This is a very simple example using the multi interface and the debug
|
||||||
|
* callback.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/* somewhat unix-specific */
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/* curl stuff */
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
typedef char bool;
|
||||||
|
#define TRUE 1
|
||||||
|
|
||||||
|
static
|
||||||
|
void dump(const char *text,
|
||||||
|
FILE *stream, unsigned char *ptr, size_t size,
|
||||||
|
bool 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(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
|
||||||
|
|
||||||
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
|
fprintf(stream, "%04zx: ", i);
|
||||||
|
|
||||||
|
if(!nohex) {
|
||||||
|
/* hex not disabled, show it */
|
||||||
|
for(c = 0; c < width; c++)
|
||||||
|
if(i+c < size)
|
||||||
|
fprintf(stream, "%02x ", ptr[i+c]);
|
||||||
|
else
|
||||||
|
fputs(" ", stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
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(stream, "%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', stream); /* newline */
|
||||||
|
}
|
||||||
|
fflush(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
int my_trace(CURL *handle, curl_infotype type,
|
||||||
|
unsigned char *data, size_t size,
|
||||||
|
void *userp)
|
||||||
|
{
|
||||||
|
const char *text;
|
||||||
|
|
||||||
|
(void)handle; /* prevent compiler warning */
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case CURLINFO_TEXT:
|
||||||
|
fprintf(stderr, "== Info: %s", data);
|
||||||
|
default: /* in case a new one is introduced to shock us */
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case CURLINFO_HEADER_OUT:
|
||||||
|
text = "=> Send header";
|
||||||
|
break;
|
||||||
|
case CURLINFO_DATA_OUT:
|
||||||
|
text = "=> Send data";
|
||||||
|
break;
|
||||||
|
case CURLINFO_HEADER_IN:
|
||||||
|
text = "<= Recv header";
|
||||||
|
break;
|
||||||
|
case CURLINFO_DATA_IN:
|
||||||
|
text = "<= Recv data";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
dump(text, stderr, data, size, TRUE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Simply download a HTTP file.
|
||||||
|
*/
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
CURL *http_handle;
|
||||||
|
CURLM *multi_handle;
|
||||||
|
|
||||||
|
int still_running; /* keep number of running handles */
|
||||||
|
|
||||||
|
http_handle = curl_easy_init();
|
||||||
|
|
||||||
|
/* set the options (I left out a few, you'll get the point anyway) */
|
||||||
|
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
||||||
|
|
||||||
|
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||||
|
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, TRUE);
|
||||||
|
|
||||||
|
/* init a multi stack */
|
||||||
|
multi_handle = curl_multi_init();
|
||||||
|
|
||||||
|
/* add the individual transfers */
|
||||||
|
curl_multi_add_handle(multi_handle, http_handle);
|
||||||
|
|
||||||
|
/* we start some action by calling perform right away */
|
||||||
|
while(CURLM_CALL_MULTI_PERFORM ==
|
||||||
|
curl_multi_perform(multi_handle, &still_running));
|
||||||
|
|
||||||
|
while(still_running) {
|
||||||
|
struct timeval timeout;
|
||||||
|
int rc; /* select() return code */
|
||||||
|
|
||||||
|
fd_set fdread;
|
||||||
|
fd_set fdwrite;
|
||||||
|
fd_set fdexcep;
|
||||||
|
int maxfd;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/* get file descriptors from the transfers */
|
||||||
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
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 */
|
||||||
|
while(CURLM_CALL_MULTI_PERFORM ==
|
||||||
|
curl_multi_perform(multi_handle, &still_running));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_multi_cleanup(multi_handle);
|
||||||
|
|
||||||
|
curl_easy_cleanup(http_handle);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
@@ -70,6 +70,8 @@ int main(int argc, char **argv)
|
|||||||
switch(rc) {
|
switch(rc) {
|
||||||
case -1:
|
case -1:
|
||||||
/* select error */
|
/* select error */
|
||||||
|
still_running = 0;
|
||||||
|
printf("select() returns error, this is badness\n");
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
|
@@ -33,8 +33,8 @@ int main(int argc, char *argv[])
|
|||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
|
||||||
struct HttpPost *formpost=NULL;
|
struct curl_httppost *formpost=NULL;
|
||||||
struct HttpPost *lastptr=NULL;
|
struct curl_httppost *lastptr=NULL;
|
||||||
struct curl_slist *headerlist=NULL;
|
struct curl_slist *headerlist=NULL;
|
||||||
char buf[] = "Expect:";
|
char buf[] = "Expect:";
|
||||||
|
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
<HTML>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<HEAD>
|
<html><head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
<TITLE>Index to Curl documentation</TITLE>
|
<title>Index to Curl documentation</title>
|
||||||
</HEAD>
|
</head>
|
||||||
|
|
||||||
<BODY>
|
<body>
|
||||||
<H1 ALIGN="CENTER">Index to Curl documentation</H1>
|
<h1 align="center">Index to Curl documentation</h1>
|
||||||
|
|
||||||
<H2>Programs</H2>
|
<h2>Programs</h2>
|
||||||
<a href="curl-config.html">curl-config</A>
|
<a href="curl-config.html">curl-config</A>
|
||||||
<br><a href="curl.html">curl</A>
|
<br><a href="curl.html">curl</A>
|
||||||
|
|
||||||
@@ -17,5 +17,4 @@
|
|||||||
<h2>libcurl</h2>
|
<h2>libcurl</h2>
|
||||||
See the <a href="libcurl/index.html">libcurl section</a>
|
See the <a href="libcurl/index.html">libcurl section</a>
|
||||||
|
|
||||||
</BODY>
|
</body></html>
|
||||||
</HTML>
|
|
||||||
|
@@ -4,119 +4,48 @@
|
|||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
man_MANS = \
|
man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
|
||||||
curl_easy_cleanup.3 \
|
curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \
|
||||||
curl_easy_getinfo.3 \
|
curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \
|
||||||
curl_easy_init.3 \
|
curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \
|
||||||
curl_easy_perform.3 \
|
curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \
|
||||||
curl_easy_setopt.3 \
|
curl_strequal.3 curl_mprintf.3 curl_global_init.3 \
|
||||||
curl_easy_duphandle.3 \
|
curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \
|
||||||
curl_formparse.3 \
|
curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \
|
||||||
curl_formadd.3 \
|
curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \
|
||||||
curl_formfree.3 \
|
curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \
|
||||||
curl_getdate.3 \
|
libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \
|
||||||
curl_getenv.3 \
|
curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3
|
||||||
curl_slist_append.3 \
|
|
||||||
curl_slist_free_all.3 \
|
|
||||||
curl_version.3 \
|
|
||||||
curl_version_info.3 \
|
|
||||||
curl_escape.3 \
|
|
||||||
curl_unescape.3 \
|
|
||||||
curl_free.3 \
|
|
||||||
curl_strequal.3 \
|
|
||||||
curl_strnequal.3 \
|
|
||||||
curl_mprintf.3 \
|
|
||||||
curl_global_init.3 \
|
|
||||||
curl_global_cleanup.3 \
|
|
||||||
curl_multi_add_handle.3 \
|
|
||||||
curl_multi_cleanup.3 \
|
|
||||||
curl_multi_fdset.3 \
|
|
||||||
curl_multi_info_read.3 \
|
|
||||||
curl_multi_init.3 \
|
|
||||||
curl_multi_perform.3 \
|
|
||||||
curl_multi_remove_handle.3 \
|
|
||||||
curl_share_cleanup.3 curl_share_init.3 curl_share_setopt.3 \
|
|
||||||
libcurl.3 \
|
|
||||||
libcurl-easy.3 \
|
|
||||||
libcurl-multi.3 \
|
|
||||||
libcurl-share.3 \
|
|
||||||
libcurl-errors.3
|
|
||||||
|
|
||||||
HTMLPAGES = \
|
HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
|
||||||
curl_easy_cleanup.html \
|
curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
|
||||||
curl_easy_getinfo.html \
|
curl_easy_duphandle.html curl_formadd.html curl_formfree.html \
|
||||||
curl_easy_init.html \
|
curl_getdate.html curl_getenv.html curl_slist_append.html \
|
||||||
curl_easy_perform.html \
|
curl_slist_free_all.html curl_version.html curl_version_info.html \
|
||||||
curl_easy_setopt.html \
|
curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \
|
||||||
curl_easy_duphandle.html \
|
curl_mprintf.html curl_global_init.html curl_global_cleanup.html \
|
||||||
curl_formadd.html \
|
curl_multi_add_handle.html curl_multi_cleanup.html \
|
||||||
curl_formparse.html \
|
curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \
|
||||||
curl_formfree.html \
|
curl_multi_perform.html curl_multi_remove_handle.html \
|
||||||
curl_getdate.html \
|
curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \
|
||||||
curl_getenv.html \
|
libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \
|
||||||
curl_slist_append.html \
|
libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \
|
||||||
curl_slist_free_all.html \
|
curl_share_strerror.html curl_global_init_mem.html
|
||||||
curl_version.html \
|
|
||||||
curl_version_info.html \
|
|
||||||
curl_escape.html \
|
|
||||||
curl_unescape.html \
|
|
||||||
curl_free.html \
|
|
||||||
curl_strequal.html \
|
|
||||||
curl_strnequal.html \
|
|
||||||
curl_mprintf.html \
|
|
||||||
curl_global_init.html \
|
|
||||||
curl_global_cleanup.html \
|
|
||||||
curl_multi_add_handle.html \
|
|
||||||
curl_multi_cleanup.html \
|
|
||||||
curl_multi_fdset.html \
|
|
||||||
curl_multi_info_read.html \
|
|
||||||
curl_multi_init.html \
|
|
||||||
curl_multi_perform.html \
|
|
||||||
curl_multi_remove_handle.html \
|
|
||||||
curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \
|
|
||||||
libcurl.html \
|
|
||||||
libcurl-multi.html \
|
|
||||||
libcurl-easy.html \
|
|
||||||
libcurl-share.html \
|
|
||||||
libcurl-errors.html
|
|
||||||
|
|
||||||
PDFPAGES = \
|
PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
|
||||||
curl_easy_cleanup.pdf \
|
curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
|
||||||
curl_easy_getinfo.pdf \
|
curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \
|
||||||
curl_easy_init.pdf \
|
curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \
|
||||||
curl_easy_perform.pdf \
|
curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \
|
||||||
curl_easy_setopt.pdf \
|
curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \
|
||||||
curl_easy_duphandle.pdf \
|
curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \
|
||||||
curl_formadd.pdf \
|
curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \
|
||||||
curl_formparse.pdf \
|
curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \
|
||||||
curl_formfree.pdf \
|
curl_multi_remove_handle.pdf curl_share_cleanup.pdf \
|
||||||
curl_getdate.pdf \
|
curl_share_init.pdf curl_share_setopt.pdf libcurl.pdf \
|
||||||
curl_getenv.pdf \
|
libcurl-multi.pdf libcurl-easy.pdf libcurl-share.pdf \
|
||||||
curl_slist_append.pdf \
|
libcurl-errors.pdf curl_easy_strerror.pdf curl_multi_strerror.pdf \
|
||||||
curl_slist_free_all.pdf \
|
curl_share_strerror.pdf curl_global_init_mem.pdf
|
||||||
curl_version.pdf \
|
|
||||||
curl_version_info.pdf \
|
|
||||||
curl_escape.pdf \
|
|
||||||
curl_unescape.pdf \
|
|
||||||
curl_free.pdf \
|
|
||||||
curl_strequal.pdf \
|
|
||||||
curl_strnequal.pdf \
|
|
||||||
curl_mprintf.pdf \
|
|
||||||
curl_global_init.pdf \
|
|
||||||
curl_global_cleanup.pdf \
|
|
||||||
curl_multi_add_handle.pdf \
|
|
||||||
curl_multi_cleanup.pdf \
|
|
||||||
curl_multi_fdset.pdf \
|
|
||||||
curl_multi_info_read.pdf \
|
|
||||||
curl_multi_init.pdf \
|
|
||||||
curl_multi_perform.pdf \
|
|
||||||
curl_multi_remove_handle.pdf \
|
|
||||||
curl_share_cleanup.pdf curl_share_init.pdf curl_share_setopt.pdf \
|
|
||||||
libcurl.pdf \
|
|
||||||
libcurl-multi.pdf \
|
|
||||||
libcurl-easy.pdf \
|
|
||||||
libcurl-share.pdf \
|
|
||||||
libcurl-errors.pdf
|
|
||||||
|
|
||||||
CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
|
CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
|
||||||
|
|
||||||
|
@@ -31,5 +31,4 @@ If this function returns NULL, something went wrong and no valid handle was
|
|||||||
returned.
|
returned.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)
|
.BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)
|
||||||
.SH BUGS
|
|
||||||
Surely there are some, you tell me!
|
|
||||||
|
@@ -20,7 +20,7 @@ filled in accordingly and can be relied upon only if the function returns
|
|||||||
CURLE_OK. This function is intended to get used *AFTER* a performed transfer,
|
CURLE_OK. This function is intended to get used *AFTER* a performed transfer,
|
||||||
all results from this function are undefined until the transfer is completed.
|
all results from this function are undefined until the transfer is completed.
|
||||||
.SH AVAILABLE INFORMATION
|
.SH AVAILABLE INFORMATION
|
||||||
These are informations that can be extracted:
|
The following information can be extracted:
|
||||||
.IP CURLINFO_EFFECTIVE_URL
|
.IP CURLINFO_EFFECTIVE_URL
|
||||||
Pass a pointer to a 'char *' to receive the last used effective URL.
|
Pass a pointer to a 'char *' to receive the last used effective URL.
|
||||||
.IP CURLINFO_RESPONSE_CODE
|
.IP CURLINFO_RESPONSE_CODE
|
||||||
@@ -51,7 +51,7 @@ pre-transfer commands and negotiations that are specific to the particular
|
|||||||
protocol(s) involved.
|
protocol(s) involved.
|
||||||
.IP CURLINFO_STARTTRANSFER_TIME
|
.IP CURLINFO_STARTTRANSFER_TIME
|
||||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||||
start until the first byte is just about to be transfered. This includes
|
start until the first byte is just about to be transferred. This includes
|
||||||
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
|
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
|
||||||
the result.
|
the result.
|
||||||
.IP CURLINFO_REDIRECT_TIME
|
.IP CURLINFO_REDIRECT_TIME
|
||||||
@@ -106,7 +106,7 @@ method(s) available. The meaning of the bits is explained in the
|
|||||||
CURLOPT_HTTPAUTH option for \fIcurl_easy_setopt(3)\fP. (Added in 7.10.8)
|
CURLOPT_HTTPAUTH option for \fIcurl_easy_setopt(3)\fP. (Added in 7.10.8)
|
||||||
.IP CURLINFO_PROXYAUTH_AVAIL
|
.IP CURLINFO_PROXYAUTH_AVAIL
|
||||||
Pass a pointer to a long to receive a bitmask indicating the authentication
|
Pass a pointer to a long to receive a bitmask indicating the authentication
|
||||||
method(s) available for your proxy athentication. (Added in 7.10.8)
|
method(s) available for your proxy authentication. (Added in 7.10.8)
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
If the operation was successful, CURLE_OK is returned. Otherwise an
|
If the operation was successful, CURLE_OK is returned. Otherwise an
|
||||||
appropriate error code will be returned.
|
appropriate error code will be returned.
|
||||||
|
@@ -13,7 +13,7 @@ curl_easy_init - Start a libcurl easy session
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function must be the first function to call, and it returns a CURL easy
|
This function must be the first function to call, and it returns a CURL easy
|
||||||
handle that you must use as input to other easy-functions. curl_easy_init
|
handle that you must use as input to other easy-functions. curl_easy_init
|
||||||
intializes curl and this call \fBMUST\fP have a corresponding call to
|
initializes curl and this call \fBMUST\fP have a corresponding call to
|
||||||
\fIcurl_easy_cleanup(3)\fP when the operation is complete.
|
\fIcurl_easy_cleanup(3)\fP when the operation is complete.
|
||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
@@ -21,5 +21,3 @@ If this function returns NULL, something went wrong and you cannot use the
|
|||||||
other curl functions.
|
other curl functions.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR curl_easy_cleanup "(3), " curl_global_init "(3)
|
.BR curl_easy_cleanup "(3), " curl_global_init "(3)
|
||||||
.SH BUGS
|
|
||||||
Surely there are some, you tell me!
|
|
||||||
|
@@ -85,7 +85,7 @@ lookups. It enables nice timeouts for name resolves without signals.
|
|||||||
.IP CURLOPT_WRITEFUNCTION
|
.IP CURLOPT_WRITEFUNCTION
|
||||||
Function pointer that should match the following prototype: \fBsize_t
|
Function pointer that should match the following prototype: \fBsize_t
|
||||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
||||||
function gets called by libcurl as soon as there is data reveiced that needs
|
function gets called by libcurl as soon as there is data received that needs
|
||||||
to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
||||||
multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
|
multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
|
||||||
of bytes actually taken care of. If that amount differs from the amount passed
|
of bytes actually taken care of. If that amount differs from the amount passed
|
||||||
@@ -165,7 +165,7 @@ Function pointer that should match the following prototype: \fIint
|
|||||||
curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);\fP
|
curl_debug_callback (CURL *, curl_infotype, char *, size_t, void *);\fP
|
||||||
\fICURLOPT_DEBUGFUNCTION\fP replaces the standard debug function used when
|
\fICURLOPT_DEBUGFUNCTION\fP replaces the standard debug function used when
|
||||||
\fICURLOPT_VERBOSE \fP is in effect. This callback receives debug information,
|
\fICURLOPT_VERBOSE \fP is in effect. This callback receives debug information,
|
||||||
as specified with the \fBcurl_infotype\fP argument. This funtion must return
|
as specified with the \fBcurl_infotype\fP argument. This function must return
|
||||||
0. The data pointed to by the char * passed to this function WILL NOT be zero
|
0. The data pointed to by the char * passed to this function WILL NOT be zero
|
||||||
terminated, but will be exactly of the size as told by the size_t argument.
|
terminated, but will be exactly of the size as told by the size_t argument.
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ Function pointer that should match the following prototype: \fBCURLcode
|
|||||||
sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function gets called
|
sslctxfun(CURL *curl, void *sslctx, void *parm);\fP This function gets called
|
||||||
by libcurl just before the initialization of an SSL connection after having
|
by libcurl just before the initialization of an SSL connection after having
|
||||||
processed all other SSL related options to give a last chance to an
|
processed all other SSL related options to give a last chance to an
|
||||||
application to modify the behaviour of openssl's ssl initilaization. The
|
application to modify the behaviour of openssl's ssl initialization. The
|
||||||
\fIsslctx\fP parameter is actually a pointer to an openssl \fISSL_CTX\fP. If
|
\fIsslctx\fP parameter is actually a pointer to an openssl \fISSL_CTX\fP. If
|
||||||
an error is returned no attempt to establish a connection is made and the
|
an error is returned no attempt to establish a connection is made and the
|
||||||
perform operation will return the error code from this callback function. Set
|
perform operation will return the error code from this callback function. Set
|
||||||
@@ -249,8 +249,8 @@ be prefixed with [protocol]:// since any such prefix will be ignored. The
|
|||||||
proxy's port number may optionally be specified with the separate option
|
proxy's port number may optionally be specified with the separate option
|
||||||
\fICURLOPT_PROXYPORT\fP.
|
\fICURLOPT_PROXYPORT\fP.
|
||||||
|
|
||||||
\fBNOTE:\fP when you tell the library to use a HTTP proxy, libcurl will
|
\fBNOTE:\fP when you tell the library to use an HTTP proxy, libcurl will
|
||||||
transparently convert operations to HTTP even if you specify a FTP URL
|
transparently convert operations to HTTP even if you specify an FTP URL
|
||||||
etc. This may have an impact on what other features of the library you can
|
etc. This may have an impact on what other features of the library you can
|
||||||
use, such as \fICURLOPT_QUOTE\fP and similar FTP specifics that don't work
|
use, such as \fICURLOPT_QUOTE\fP and similar FTP specifics that don't work
|
||||||
unless you tunnel through the HTTP proxy. Such tunneling is activated with
|
unless you tunnel through the HTTP proxy. Such tunneling is activated with
|
||||||
@@ -282,19 +282,35 @@ libcurl caches this info for 60 seconds.
|
|||||||
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
|
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
|
||||||
Pass a long. If the value is non-zero, it tells curl to use a global DNS cache
|
Pass a long. If the value is non-zero, it tells curl to use a global DNS cache
|
||||||
that will survive between easy handle creations and deletions. This is not
|
that will survive between easy handle creations and deletions. This is not
|
||||||
thread-safe and this will use a global varible.
|
thread-safe and this will use a global variable.
|
||||||
|
|
||||||
\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
|
\fBWARNING:\fP this option is considered obsolete. Stop using it. Switch over
|
||||||
to using the share interface instead! See \fICURLOPT_SHARE\fP and
|
to using the share interface instead! See \fICURLOPT_SHARE\fP and
|
||||||
\fIcurl_share_init(3)\fP.
|
\fIcurl_share_init(3)\fP.
|
||||||
.IP CURLOPT_BUFFERSIZE
|
.IP CURLOPT_BUFFERSIZE
|
||||||
Pass a long specifying your prefered size for the receive buffer in libcurl.
|
Pass a long specifying your preferred size for the receive buffer in libcurl.
|
||||||
The main point of this would be that the write callback gets called more often
|
The main point of this would be that the write callback gets called more often
|
||||||
and with smaller chunks. This is just treated as a request, not an order. You
|
and with smaller chunks. This is just treated as a request, not an order. You
|
||||||
cannot be guaranteed to actually get the given size. (Added in 7.10)
|
cannot be guaranteed to actually get the given size. (Added in 7.10)
|
||||||
.IP CURLOPT_PORT
|
.IP CURLOPT_PORT
|
||||||
Pass a long specifying what remote port number to connect to, instead of the
|
Pass a long specifying what remote port number to connect to, instead of the
|
||||||
one specified in the URL or the default port for the used protocol.
|
one specified in the URL or the default port for the used protocol.
|
||||||
|
.IP CURLOPT_TCP_NODELAY
|
||||||
|
Pass a long specifying whether the TCP_NODELAY option should be set or
|
||||||
|
cleared (1 = set, 0 = clear). The option is cleared by default. This
|
||||||
|
will have no effect after the connection has been established.
|
||||||
|
|
||||||
|
Setting this option will disable TCP's Nagle algorithm. The purpose of
|
||||||
|
this algorithm is to try to minimize the number of small packets on
|
||||||
|
the network (where "small packets" means TCP segments less than the
|
||||||
|
Maximum Segment Size (MSS) for the network).
|
||||||
|
|
||||||
|
Maximizing the amount of data sent per TCP segment is good because it
|
||||||
|
amortizes the overhead of the send. However, in some cases (most
|
||||||
|
notably telnet or rlogin) small segments may need to be sent
|
||||||
|
without delay. This is less efficient than sending larger amounts of
|
||||||
|
data at a time, and can contribute to congestion on the network if
|
||||||
|
overdone.
|
||||||
.SH NAMES and PASSWORDS OPTIONS (Authentication)
|
.SH NAMES and PASSWORDS OPTIONS (Authentication)
|
||||||
.IP CURLOPT_NETRC
|
.IP CURLOPT_NETRC
|
||||||
This parameter controls the preference of libcurl between using user names and
|
This parameter controls the preference of libcurl between using user names and
|
||||||
@@ -324,7 +340,7 @@ This value tells the library that use of the file is required,
|
|||||||
to ignore the information in the URL,
|
to ignore the information in the URL,
|
||||||
and to search the file with the host only.
|
and to search the file with the host only.
|
||||||
.RE
|
.RE
|
||||||
Only machine name, user name and password are taken into account
|
Only machine name, user name and password are taken into account
|
||||||
(init macros and similar things aren't supported).
|
(init macros and similar things aren't supported).
|
||||||
|
|
||||||
\fBNote:\fP libcurl does not verify that the file has the correct properties
|
\fBNote:\fP libcurl does not verify that the file has the correct properties
|
||||||
@@ -370,7 +386,7 @@ regular old-fashioned Basic method.
|
|||||||
.IP CURLAUTH_GSSNEGOTIATE
|
.IP CURLAUTH_GSSNEGOTIATE
|
||||||
HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain
|
HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain
|
||||||
"Negotiate") method was designed by Microsoft and is used in their web
|
"Negotiate") method was designed by Microsoft and is used in their web
|
||||||
aplications. It is primarily meant as a support for Kerberos5 authentication
|
applications. It is primarily meant as a support for Kerberos5 authentication
|
||||||
but may be also used along with another authentication methods. For more
|
but may be also used along with another authentication methods. For more
|
||||||
information see IETF draft draft-brezak-spnego-http-04.txt.
|
information see IETF draft draft-brezak-spnego-http-04.txt.
|
||||||
|
|
||||||
@@ -379,17 +395,17 @@ this to work.
|
|||||||
.IP CURLAUTH_NTLM
|
.IP CURLAUTH_NTLM
|
||||||
HTTP NTLM authentication. A proprietary protocol invented and used by
|
HTTP NTLM authentication. A proprietary protocol invented and used by
|
||||||
Microsoft. It uses a challenge-response and hash concept similar to Digest, to
|
Microsoft. It uses a challenge-response and hash concept similar to Digest, to
|
||||||
prevent the password from being evesdropped.
|
prevent the password from being eavesdropped.
|
||||||
|
|
||||||
\fBNOTE\fP that you need to build libcurl with SSL support for this option to
|
\fBNOTE\fP that you need to build libcurl with SSL support for this option to
|
||||||
work.
|
work.
|
||||||
.IP CURLAUTH_ANY
|
.IP CURLAUTH_ANY
|
||||||
This is a convenience macro that sets all bits and thus makes libcurl pick any
|
This is a convenience macro that sets all bits and thus makes libcurl pick any
|
||||||
it finds suitable. libcurl will automaticly select the one it finds most
|
it finds suitable. libcurl will automatically select the one it finds most
|
||||||
secure.
|
secure.
|
||||||
.IP CURLAUTH_ANYSAFE
|
.IP CURLAUTH_ANYSAFE
|
||||||
This is a convenience macro that sets all bits except Basic and thus makes
|
This is a convenience macro that sets all bits except Basic and thus makes
|
||||||
libcurl pick any it finds suitable. libcurl will automaticly select the one it
|
libcurl pick any it finds suitable. libcurl will automatically select the one it
|
||||||
finds most secure.
|
finds most secure.
|
||||||
.RE
|
.RE
|
||||||
.IP CURLOPT_PROXYAUTH
|
.IP CURLOPT_PROXYAUTH
|
||||||
@@ -405,7 +421,7 @@ this writing, only Basic and NTLM work. (Added in 7.10.7)
|
|||||||
.SH HTTP OPTIONS
|
.SH HTTP OPTIONS
|
||||||
.IP CURLOPT_AUTOREFERER
|
.IP CURLOPT_AUTOREFERER
|
||||||
Pass a non-zero parameter to enable this. When enabled, libcurl will
|
Pass a non-zero parameter to enable this. When enabled, libcurl will
|
||||||
automaticly set the Referer: field in requests where it follows a Location:
|
automatically set the Referer: field in requests where it follows a Location:
|
||||||
redirect.
|
redirect.
|
||||||
.IP CURLOPT_ENCODING
|
.IP CURLOPT_ENCODING
|
||||||
Sets the contents of the Accept-Encoding: header sent in an HTTP
|
Sets the contents of the Accept-Encoding: header sent in an HTTP
|
||||||
@@ -422,7 +438,7 @@ encoding done by the server is ignored. See the special file
|
|||||||
lib/README.encoding for details.
|
lib/README.encoding for details.
|
||||||
.IP CURLOPT_FOLLOWLOCATION
|
.IP CURLOPT_FOLLOWLOCATION
|
||||||
A non-zero parameter tells the library to follow any Location: header that the
|
A non-zero parameter tells the library to follow any Location: header that the
|
||||||
server sends as part of a HTTP header.
|
server sends as part of an HTTP header.
|
||||||
|
|
||||||
\fBNOTE:\fP this means that the library will re-send the same request on the
|
\fBNOTE:\fP this means that the library will re-send the same request on the
|
||||||
new location and follow new Location: headers all the way until no more such
|
new location and follow new Location: headers all the way until no more such
|
||||||
@@ -447,7 +463,7 @@ one by HTML forms. See the \fICURLOPT_POSTFIELDS\fP option for how to specify
|
|||||||
the data to post and \fICURLOPT_POSTFIELDSIZE\fP in how to set the data
|
the data to post and \fICURLOPT_POSTFIELDSIZE\fP in how to set the data
|
||||||
size. Using the \fICURLOPT_POSTFIELDS\fP option implies this option.
|
size. Using the \fICURLOPT_POSTFIELDS\fP option implies this option.
|
||||||
.IP CURLOPT_POSTFIELDS
|
.IP CURLOPT_POSTFIELDS
|
||||||
Pass a char * as parameter, which should be the full data to post in a HTTP
|
Pass a char * as parameter, which should be the full data to post in an HTTP
|
||||||
post operation. You need to make sure that the data is formatted the way you
|
post operation. You need to make sure that the data is formatted the way you
|
||||||
want the server to receive it. libcurl will not convert or encode it for
|
want the server to receive it. libcurl will not convert or encode it for
|
||||||
you. Most web servers will assume this data to be url-encoded. Take note.
|
you. Most web servers will assume this data to be url-encoded. Take note.
|
||||||
@@ -506,7 +522,7 @@ The first line in a request (usually containing a GET or POST) is not a header
|
|||||||
and cannot be replaced using this option. Only the lines following the
|
and cannot be replaced using this option. Only the lines following the
|
||||||
request-line are headers.
|
request-line are headers.
|
||||||
|
|
||||||
\fBNOTE:\fPThe most commonly replaced headers have "shortcuts" in the options
|
\fBNOTE:\fP The most commonly replaced headers have "shortcuts" in the options
|
||||||
\fICURLOPT_COOKIE\fP, \fICURLOPT_USERAGENT\fP and \fICURLOPT_REFERER\fP.
|
\fICURLOPT_COOKIE\fP, \fICURLOPT_USERAGENT\fP and \fICURLOPT_REFERER\fP.
|
||||||
.IP CURLOPT_HTTP200ALIASES
|
.IP CURLOPT_HTTP200ALIASES
|
||||||
Pass a pointer to a linked list of aliases to be treated as valid HTTP 200
|
Pass a pointer to a linked list of aliases to be treated as valid HTTP 200
|
||||||
@@ -519,7 +535,7 @@ The linked list should be a fully valid list of struct curl_slist structs, and
|
|||||||
be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
|
be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
|
||||||
\fIcurl_slist_free_all(3)\fP to clean up an entire list.
|
\fIcurl_slist_free_all(3)\fP to clean up an entire list.
|
||||||
|
|
||||||
\fBNOTE:\fPThe alias itself is not parsed for any version strings. So if your
|
\fBNOTE:\fP The alias itself is not parsed for any version strings. So if your
|
||||||
alias is "MYHTTP/9.9", Libcurl will not treat the server as responding with
|
alias is "MYHTTP/9.9", Libcurl will not treat the server as responding with
|
||||||
HTTP version 9.9. Instead Libcurl will use the value set by option
|
HTTP version 9.9. Instead Libcurl will use the value set by option
|
||||||
\fICURLOPT_HTTP_VERSION\fP.
|
\fICURLOPT_HTTP_VERSION\fP.
|
||||||
@@ -529,9 +545,10 @@ set a cookie in the http request. The format of the string should be
|
|||||||
NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
|
NAME=CONTENTS, where NAME is the cookie name and CONTENTS is what the cookie
|
||||||
should contain.
|
should contain.
|
||||||
|
|
||||||
If you need to set mulitple cookies, you need to set them all using a single
|
If you need to set multiple cookies, you need to set them all using a single
|
||||||
option and thus you need to concat them all in one single string. Set multiple
|
option and thus you need to concatenate them all in one single string. Set
|
||||||
cookies in one string like this: "name1=content1; name2=content2;" etc.
|
multiple cookies in one string like this: "name1=content1; name2=content2;"
|
||||||
|
etc.
|
||||||
|
|
||||||
Using this option multiple times will only make the latest string override the
|
Using this option multiple times will only make the latest string override the
|
||||||
previously ones.
|
previously ones.
|
||||||
@@ -622,7 +639,7 @@ only files in their response to NLST; they might not include subdirectories
|
|||||||
and symbolic links.
|
and symbolic links.
|
||||||
.IP CURLOPT_FTPAPPEND
|
.IP CURLOPT_FTPAPPEND
|
||||||
A non-zero parameter tells the library to append to the remote file instead of
|
A non-zero parameter tells the library to append to the remote file instead of
|
||||||
overwrite it. This is only useful when uploading to a ftp site.
|
overwrite it. This is only useful when uploading to an ftp site.
|
||||||
.IP CURLOPT_FTP_USE_EPRT
|
.IP CURLOPT_FTP_USE_EPRT
|
||||||
Pass a long. If the value is non-zero, it tells curl to use the EPRT (and
|
Pass a long. If the value is non-zero, it tells curl to use the EPRT (and
|
||||||
LPRT) command when doing active FTP downloads (which is enabled by
|
LPRT) command when doing active FTP downloads (which is enabled by
|
||||||
@@ -684,16 +701,16 @@ Pass an curl_off_t as parameter. It contains the offset in number of bytes
|
|||||||
that you want the transfer to start from. (Added in 7.11.0)
|
that you want the transfer to start from. (Added in 7.11.0)
|
||||||
.IP CURLOPT_CUSTOMREQUEST
|
.IP CURLOPT_CUSTOMREQUEST
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be user
|
Pass a pointer to a zero terminated string as parameter. It will be user
|
||||||
instead of GET or HEAD when doing a HTTP request, or instead of LIST or NLST
|
instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
|
||||||
when doing an ftp directory listing. This is useful for doing DELETE or other
|
when doing an ftp directory listing. This is useful for doing DELETE or other
|
||||||
more or less obscure HTTP requests. Don't do this at will, make sure your
|
more or less obscure HTTP requests. Don't do this at will, make sure your
|
||||||
server supports the command first.
|
server supports the command first.
|
||||||
|
|
||||||
NOTE: many people have wrongly used this option to replace the entire request
|
\fBNOTE:\fP Many people have wrongly used this option to replace the entire
|
||||||
with their own, including multiple headers and POST contents. While that might
|
request with their own, including multiple headers and POST contents. While
|
||||||
work in many cases, it will cause libcurl to send invalid requests and it
|
that might work in many cases, it will cause libcurl to send invalid requests
|
||||||
could possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and
|
and it could possibly confuse the remote server badly. Use \fICURLOPT_POST\fP
|
||||||
\fICURLOPT_POSTFIELDS\fP to set POST data. Use \fICURLOPT_HTTPHEADER\fP to
|
and \fICURLOPT_POSTFIELDS\fP to set POST data. Use \fICURLOPT_HTTPHEADER\fP to
|
||||||
replace or extend the set of headers sent by libcurl. Use
|
replace or extend the set of headers sent by libcurl. Use
|
||||||
\fICURLOPT_HTTP_VERSION\fP to change HTTP version.
|
\fICURLOPT_HTTP_VERSION\fP to change HTTP version.
|
||||||
.IP CURLOPT_FILETIME
|
.IP CURLOPT_FILETIME
|
||||||
@@ -723,29 +740,29 @@ Pass a long as parameter. This allows you to specify the maximum size (in
|
|||||||
bytes) of a file to download. If the file requested is larger than this value,
|
bytes) of a file to download. If the file requested is larger than this value,
|
||||||
the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
|
the transfer will not start and CURLE_FILESIZE_EXCEEDED will be returned.
|
||||||
|
|
||||||
NOTE: The file size is not always known prior to download, and for such files
|
\fBNOTE:\fP The file size is not always known prior to download, and for such
|
||||||
this option has no effect even if the file transfer ends up being larger than
|
files this option has no effect even if the file transfer ends up being larger
|
||||||
this given limit. This concerns both FTP and HTTP transfers.
|
than this given limit. This concerns both FTP and HTTP transfers.
|
||||||
.IP CURLOPT_MAXFILESIZE_LARGE
|
.IP CURLOPT_MAXFILESIZE_LARGE
|
||||||
Pass a curl_off_t as parameter. This allows you to specify the maximum size
|
Pass a curl_off_t as parameter. This allows you to specify the maximum size
|
||||||
(in bytes) of a file to download. If the file requested is larger than this
|
(in bytes) of a file to download. If the file requested is larger than this
|
||||||
value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will be
|
value, the transfer will not start and \fICURLE_FILESIZE_EXCEEDED\fP will be
|
||||||
returned. (Added in 7.11.0)
|
returned. (Added in 7.11.0)
|
||||||
|
|
||||||
NOTE: The file size is not always known prior to download, and for such files
|
\fBNOTE:\fP The file size is not always known prior to download, and for such
|
||||||
this option has no effect even if the file transfer ends up being larger than
|
files this option has no effect even if the file transfer ends up being larger
|
||||||
this given limit. This concerns both FTP and HTTP transfers.
|
than this given limit. This concerns both FTP and HTTP transfers.
|
||||||
.IP CURLOPT_TIMECONDITION
|
.IP CURLOPT_TIMECONDITION
|
||||||
Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
|
Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
|
||||||
value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
|
value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
|
||||||
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP and FTP.
|
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP and FTP.
|
||||||
|
|
||||||
NOTE: The last modification time of a file is not always known and in such
|
\fBNOTE:\fP The last modification time of a file is not always known and in such
|
||||||
instances this feature will have no effect even if the given time condition
|
instances this feature will have no effect even if the given time condition
|
||||||
would have not been met.
|
would have not been met.
|
||||||
.IP CURLOPT_TIMEVALUE
|
.IP CURLOPT_TIMEVALUE
|
||||||
Pass a long as parameter. This should be the time in seconds since 1 jan 1970,
|
Pass a long as parameter. This should be the time in seconds since 1 jan 1970,
|
||||||
and the time will be used in a condition as specified with
|
and the time will be used in a condition as specified with
|
||||||
\fICURLOPT_TIMECONDITION\fP.
|
\fICURLOPT_TIMECONDITION\fP.
|
||||||
.SH CONNECTION OPTIONS
|
.SH CONNECTION OPTIONS
|
||||||
.IP CURLOPT_TIMEOUT
|
.IP CURLOPT_TIMEOUT
|
||||||
@@ -849,9 +866,10 @@ changed with \fICURLOPT_SSLKEYTYPE\fP.
|
|||||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||||
the format of your private key. Supported formats are "PEM", "DER" and "ENG".
|
the format of your private key. Supported formats are "PEM", "DER" and "ENG".
|
||||||
|
|
||||||
\fBNOTE:\fPThe format "ENG" enables you to load the private key from a crypto
|
\fBNOTE:\fP The format "ENG" enables you to load the private key from a crypto
|
||||||
engine. in this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to
|
engine. In this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to
|
||||||
the engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
|
the engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
|
||||||
|
\&"DER" format key file currently does not work because of a bug in OpenSSL.
|
||||||
.IP CURLOPT_SSLKEYPASSWD
|
.IP CURLOPT_SSLKEYPASSWD
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be used as
|
Pass a pointer to a zero terminated string as parameter. It will be used as
|
||||||
the password required to use the \fICURLOPT_SSLKEY\fP private key.
|
the password required to use the \fICURLOPT_SSLKEY\fP private key.
|
||||||
@@ -860,13 +878,13 @@ Pass a pointer to a zero terminated string as parameter. It will be used as
|
|||||||
the identifier for the crypto engine you want to use for your private
|
the identifier for the crypto engine you want to use for your private
|
||||||
key.
|
key.
|
||||||
|
|
||||||
\fBNOTE:\fPIf the crypto device cannot be loaded,
|
\fBNOTE:\fP If the crypto device cannot be loaded,
|
||||||
\fICURLE_SSL_ENGINE_NOTFOUND\fP is returned.
|
\fICURLE_SSL_ENGINE_NOTFOUND\fP is returned.
|
||||||
.IP CURLOPT_SSLENGINE_DEFAULT
|
.IP CURLOPT_SSLENGINE_DEFAULT
|
||||||
Sets the actual crypto engine as the default for (asymetric) crypto
|
Sets the actual crypto engine as the default for (asymmetric) crypto
|
||||||
operations.
|
operations.
|
||||||
|
|
||||||
\fBNOTE:\fPIf the crypto device cannot be set,
|
\fBNOTE:\fP If the crypto device cannot be set,
|
||||||
\fICURLE_SSL_ENGINE_SETFAILED\fP is returned.
|
\fICURLE_SSL_ENGINE_SETFAILED\fP is returned.
|
||||||
.IP CURLOPT_SSLVERSION
|
.IP CURLOPT_SSLVERSION
|
||||||
Pass a long as parameter. Set what version of SSL to attempt to use, 2 or
|
Pass a long as parameter. Set what version of SSL to attempt to use, 2 or
|
||||||
@@ -904,8 +922,8 @@ in the SSL handshake, set 1 to check existence, 2 to ensure that it matches
|
|||||||
the provided hostname. This is by default set to 2. (default changed in 7.10)
|
the provided hostname. This is by default set to 2. (default changed in 7.10)
|
||||||
.IP CURLOPT_SSL_CIPHER_LIST
|
.IP CURLOPT_SSL_CIPHER_LIST
|
||||||
Pass a char *, pointing to a zero terminated string holding the list of
|
Pass a char *, pointing to a zero terminated string holding the list of
|
||||||
ciphers to use for the SSL connection. The list must be syntactly correct, it
|
ciphers to use for the SSL connection. The list must be syntactically correct,
|
||||||
consists of one or more cipher strings separated by colons. Commas or spaces
|
it consists of one or more cipher strings separated by colons. Commas or spaces
|
||||||
are also acceptable separators but colons are normally used, \!, \- and \+ can
|
are also acceptable separators but colons are normally used, \!, \- and \+ can
|
||||||
be used as operators. Valid examples of cipher lists include 'RC4-SHA',
|
be used as operators. Valid examples of cipher lists include 'RC4-SHA',
|
||||||
\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
|
\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
|
||||||
|
18
docs/libcurl/curl_easy_strerror.3
Normal file
18
docs/libcurl/curl_easy_strerror.3
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
.\" You can view this file with:
|
||||||
|
.\" nroff -man [file]
|
||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
|
.SH NAME
|
||||||
|
curl_easy_strerror - return string describing error code
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <curl/curl.h>
|
||||||
|
.BI "const char *curl_easy_strerror(CURLcode " errornum ");"
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The curl_easy_strerror() function returns a string describing the CURLcode
|
||||||
|
error code passed in the argument \fIerrornum\fP.
|
||||||
|
.SH RETURN VALUE
|
||||||
|
A pointer to a zero terminated string.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR libcurl-errors "(3), " curl_multi_strerror "(3), " curl_share_strerror "(3)"
|
@@ -13,7 +13,7 @@ curl_formadd - add a section to a multipart/formdata HTTP POST
|
|||||||
.ad
|
.ad
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
curl_formadd() is used to append sections when building a multipart/formdata
|
curl_formadd() is used to append sections when building a multipart/formdata
|
||||||
HTTP POST (sometimes refered to as rfc1867-style posts). Append one section at
|
HTTP POST (sometimes referred to as rfc1867-style posts). Append one section at
|
||||||
a time until you've added all the sections you want included and then you pass
|
a time until you've added all the sections you want included and then you pass
|
||||||
the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
|
the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
|
||||||
\fIlastitem\fP is set after each call and on repeated invokes it should be
|
\fIlastitem\fP is set after each call and on repeated invokes it should be
|
||||||
@@ -81,7 +81,7 @@ internally chosen one.
|
|||||||
|
|
||||||
.B CURLFORM_FILENAME
|
.B CURLFORM_FILENAME
|
||||||
followed by a pointer to a string to a name, will make libcurl use the given
|
followed by a pointer to a string to a name, will make libcurl use the given
|
||||||
name in the file upload part, intead of the actual file name given to
|
name in the file upload part, instead of the actual file name given to
|
||||||
\fICURLFORM_FILE\fP.
|
\fICURLFORM_FILE\fP.
|
||||||
|
|
||||||
.B BCURLFORM_BUFFER
|
.B BCURLFORM_BUFFER
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
.\" You can view this file with:
|
|
||||||
.\" nroff -man [file]
|
|
||||||
.\" $Id$
|
|
||||||
.\"
|
|
||||||
.TH curl_formparse 3 "17 Dec 2001" "libcurl 7.9.2" "libcurl Manual"
|
|
||||||
.SH NAME
|
|
||||||
curl_formparse - add a section to a multipart/formdata HTTP POST:
|
|
||||||
deprecated (use curl_formadd instead)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B #include <curl/curl.h>
|
|
||||||
.sp
|
|
||||||
.BI "CURLcode curl_formparse(char * " string, " struct HttpPost ** " firstitem,
|
|
||||||
.BI "struct HttpPost ** " lastitem ");"
|
|
||||||
.ad
|
|
||||||
.SH DESCRIPTION
|
|
||||||
This has been removed deliberately. The \fBcurl_formadd\fP has been introduced
|
|
||||||
to replace this function. Do not use this. Convert to the new function
|
|
||||||
now. curl_formparse() will be removed from a future version of libcurl.
|
|
@@ -36,7 +36,7 @@ This string specifies the time on a given day. Syntax supported includes:
|
|||||||
.TP
|
.TP
|
||||||
.B time zone items
|
.B time zone items
|
||||||
Specifies international time zone. There are a few acronyms supported, but in
|
Specifies international time zone. There are a few acronyms supported, but in
|
||||||
general you should instead use the specific realtive time compared to
|
general you should instead use the specific relative time compared to
|
||||||
UTC. Supported formats include: -1200, MST, +0100.
|
UTC. Supported formats include: -1200, MST, +0100.
|
||||||
.TP
|
.TP
|
||||||
.B day of the week items
|
.B day of the week items
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
.\" You can view this file with:
|
|
||||||
.\" nroff -man [file]
|
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_getenv 3 "15 August 2001" "libcurl 7.8.1" "libcurl Manual"
|
.TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_getenv - return value for environment name
|
curl_getenv - return value for environment name
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -14,6 +12,10 @@ curl_getenv - return value for environment name
|
|||||||
curl_getenv() is a portable wrapper for the getenv() function, meant to
|
curl_getenv() is a portable wrapper for the getenv() function, meant to
|
||||||
emulate its behaviour and provide an identical interface for all operating
|
emulate its behaviour and provide an identical interface for all operating
|
||||||
systems libcurl builds on (including win32).
|
systems libcurl builds on (including win32).
|
||||||
|
.SH AVAILABILITY
|
||||||
|
This function will be removed from the public libcurl API in a near future. It
|
||||||
|
will instead be made "available" by source code access only, and then as
|
||||||
|
curlx_getenv().
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
If successful, curl_getenv() returns a pointer to the value of the specified
|
If successful, curl_getenv() returns a pointer to the value of the specified
|
||||||
environment. The memory it refers to is malloc()ed why the application must
|
environment. The memory it refers to is malloc()ed why the application must
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
.\" nroff -man [file]
|
.\" nroff -man [file]
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual"
|
.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_global_init - Global libcurl initialisation
|
curl_global_init - Global libcurl initialisation
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -42,6 +42,5 @@ Initialise nothing extra. This sets no bit.
|
|||||||
If this function returns non-zero, something went wrong and you cannot use the
|
If this function returns non-zero, something went wrong and you cannot use the
|
||||||
other curl functions.
|
other curl functions.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
.BR curl_global_init_mem "(3), "
|
||||||
.BR curl_global_cleanup "(3), "
|
.BR curl_global_cleanup "(3), "
|
||||||
|
|
||||||
|
|
||||||
|
42
docs/libcurl/curl_global_init_mem.3
Normal file
42
docs/libcurl/curl_global_init_mem.3
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
.\" You can view this file with:
|
||||||
|
.\" nroff -man [file]
|
||||||
|
.\"
|
||||||
|
.TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
|
||||||
|
.SH NAME
|
||||||
|
curl_global_init_mem - Global libcurl initialisation with memory callbacks
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B #include <curl/curl.h>
|
||||||
|
.nf
|
||||||
|
.B "CURLcode curl_global_init_mem(long " flags,
|
||||||
|
.B " curl_malloc_callback "m,
|
||||||
|
.B " curl_free_callback "f,
|
||||||
|
.B " curl_realloc_callback "r,
|
||||||
|
.B " curl_strdup_callback "s,
|
||||||
|
.B " curl_calloc_callback "c ");"
|
||||||
|
.SH DESCRIPTION
|
||||||
|
This function works exactly as \fIcurl_global_init(3)\fP with one addition: it
|
||||||
|
allows the application to set callbacks to replace the otherwise used internal
|
||||||
|
memory functions.
|
||||||
|
|
||||||
|
This man page only adds documentation for the callbacks, see the
|
||||||
|
\fIcurl_global_init(3)\fP man page for all the rest. When you use this
|
||||||
|
function, all callback arguments must be set to valid function pointers.
|
||||||
|
|
||||||
|
The prototypes for the given callbacks should match these:
|
||||||
|
.IP "void *malloc_callback(size_t size);"
|
||||||
|
To replace malloc()
|
||||||
|
.IP "void free_callback(void *ptr);"
|
||||||
|
To replace free()
|
||||||
|
.IP "void *realloc_callback(void *ptr, size_t size);"
|
||||||
|
To replace realloc()
|
||||||
|
.IP "char *strdup_callback(const char *str);"
|
||||||
|
To replace strdup()
|
||||||
|
.IP "void *calloc_callback(size_t nmemb, size_t size);"
|
||||||
|
To replace calloc()
|
||||||
|
.SH "CAUTION"
|
||||||
|
Manipulating these gives considerable powers to the application to severly
|
||||||
|
screw things up for libcurl. Take care!
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR curl_global_init "(3), "
|
||||||
|
.BR curl_global_cleanup "(3), "
|
||||||
|
|
@@ -1,8 +1,6 @@
|
|||||||
.\" You can view this file with:
|
|
||||||
.\" nroff -man [file]
|
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_printf 3 "20 April 2001" "libcurl 7.7.2" "libcurl Manual"
|
.TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
|
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
|
||||||
curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
|
curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
|
||||||
@@ -42,7 +40,7 @@ See this table for notable exceptions.
|
|||||||
Normal printf() clone.
|
Normal printf() clone.
|
||||||
.TP
|
.TP
|
||||||
.B curl_mfprintf()
|
.B curl_mfprintf()
|
||||||
Normal fprinf() clone.
|
Normal fprintf() clone.
|
||||||
.TP
|
.TP
|
||||||
.B curl_msprintf()
|
.B curl_msprintf()
|
||||||
Normal sprintf() clone.
|
Normal sprintf() clone.
|
||||||
@@ -79,6 +77,10 @@ To easily use all these cloned functions instead of the normal ones, #define
|
|||||||
_MPRINTF_REPLACE before you include the <curl/mprintf.h> file. Then all the
|
_MPRINTF_REPLACE before you include the <curl/mprintf.h> file. Then all the
|
||||||
normal names like printf, fprintf, sprintf etc will use the curl-functions
|
normal names like printf, fprintf, sprintf etc will use the curl-functions
|
||||||
instead.
|
instead.
|
||||||
|
.SH AVAILABILITY
|
||||||
|
These function will be removed from the public libcurl API in a near
|
||||||
|
future. They will instead be made "available" by source code access only, and
|
||||||
|
then as curlx_-prefixed functions. See lib/README.curlx for further details.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
The \fBcurl_maprintf\fP and \fBcurl_mvaprintf\fP functions return a pointer to
|
The \fBcurl_maprintf\fP and \fBcurl_mvaprintf\fP functions return a pointer to
|
||||||
a newly allocated string, or NULL it it failed.
|
a newly allocated string, or NULL it it failed.
|
||||||
|
@@ -14,6 +14,17 @@ this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
|
|||||||
|
|
||||||
When an easy handle has been added to a multi stack, you can not and you must
|
When an easy handle has been added to a multi stack, you can not and you must
|
||||||
not use \fIcurl_easy_perform(3)\fP on that handle!
|
not use \fIcurl_easy_perform(3)\fP on that handle!
|
||||||
|
|
||||||
|
The easy handle will remain added until you remove it again with
|
||||||
|
\fIcurl_multi_remove_handle(3)\fP. You should remove the easy handle from the
|
||||||
|
multi stack before you terminate first the easy handle and then the multi
|
||||||
|
handle:
|
||||||
|
|
||||||
|
1 - \fIcurl_multi_remove_handle(3)\fP
|
||||||
|
|
||||||
|
2 - \fIcurl_easy_cleanup(3)\fP
|
||||||
|
|
||||||
|
3 - \fIcurl_multi_cleanup(3)\fP
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
CURLMcode type, general libcurl multi interface error code.
|
CURLMcode type, general libcurl multi interface error code.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
@@ -11,7 +11,16 @@ curl_multi_cleanup - close down a multi session
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Cleans up and removes a whole multi stack. It does not free or touch any
|
Cleans up and removes a whole multi stack. It does not free or touch any
|
||||||
individual easy handles in any way - they still need to be closed
|
individual easy handles in any way - they still need to be closed
|
||||||
individually, using the usual \fIcurl_easy_cleanup(3)\fP way.
|
individually, using the usual \fIcurl_easy_cleanup(3)\fP way. The order of
|
||||||
|
cleaning up should be:
|
||||||
|
|
||||||
|
1 - \fIcurl_multi_remove_handle(3)\fP before any easy handles are cleaned up
|
||||||
|
|
||||||
|
2 - \fIcurl_easy_cleanup(3)\fP can now be called independently since the easy
|
||||||
|
handle is no longer connected to the multi handle
|
||||||
|
|
||||||
|
3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
|
||||||
|
removed
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
CURLMcode type, general libcurl multi interface error code.
|
CURLMcode type, general libcurl multi interface error code.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_multi_fdset 3 "3 May 2002" "libcurl 7.9.5" "libcurl Manual"
|
.TH curl_multi_fdset 3 "15 Apr 2004" "libcurl 7.9.5" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_multi_fdset - extracts file descriptor information from a multi handle
|
curl_multi_fdset - extracts file descriptor information from a multi handle
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||||
@@ -14,15 +15,21 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
|||||||
.ad
|
.ad
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function extracts file descriptor information from a given multi_handle.
|
This function extracts file descriptor information from a given multi_handle.
|
||||||
libcurl returns its fd_set sets. The application can use these to select() or
|
libcurl returns its fd_set sets. The application can use these to select()
|
||||||
poll() on. The curl_multi_perform() function should be called as soon as one
|
on. The \fIcurl_multi_perform(3)\fI function should be called as soon as one
|
||||||
of them are ready to be read from or written to.
|
of them are ready to be read from or written to.
|
||||||
|
|
||||||
NOTE that once this call is made, you must not remove the sets you point to,
|
NOTE that once this call is made, you must not remove the sets you point to,
|
||||||
as libcurl will need to be able to read them. It needs them after select()
|
as libcurl will need to be able to read them. It needs them after select()
|
||||||
calls, to know if certain sockets are readable or writable.
|
calls, to know if certain sockets are readable or writable.
|
||||||
|
|
||||||
|
You should also be aware that when doing select(), you should consider using a
|
||||||
|
rather small (single-digit number of seconds) timeout and call
|
||||||
|
\fIcurl_multi_perform\fP regularly - even if no activity has been seen on the
|
||||||
|
fd_sets - as otherwise libcurl-internal retries and timeouts may not work as
|
||||||
|
you'd think.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
CURLMcode type, general libcurl multi interface error code. See
|
CURLMcode type, general libcurl multi interface error code. See
|
||||||
\fIlibcurl-errors.3\fP
|
\fIlibcurl-errors(3)\fP
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
||||||
|
@@ -23,7 +23,7 @@ remaining messages after this function was called.
|
|||||||
The data the returned pointer points to will not survive calling
|
The data the returned pointer points to will not survive calling
|
||||||
\fIcurl_multi_cleanup(3)\fP.
|
\fIcurl_multi_cleanup(3)\fP.
|
||||||
|
|
||||||
The 'CURLMsg' struct is very simple and only contain very basic informations.
|
The 'CURLMsg' struct is very simple and only contain very basic information.
|
||||||
If more involved information is wanted, the particular "easy handle" in
|
If more involved information is wanted, the particular "easy handle" in
|
||||||
present in that struct and can thus be used in subsequent regular
|
present in that struct and can thus be used in subsequent regular
|
||||||
\fIcurl_easy_getinfo(3)\fP calls (or similar):
|
\fIcurl_easy_getinfo(3)\fP calls (or similar):
|
||||||
|
@@ -10,7 +10,7 @@ curl_multi_init - create a multi handle
|
|||||||
.ad
|
.ad
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function returns a CURLM handle to be used as input to all the other
|
This function returns a CURLM handle to be used as input to all the other
|
||||||
multi-functions, sometimes refered to as a multi handle on some places in the
|
multi-functions, sometimes referred to as a multi handle on some places in the
|
||||||
documentation. This init call MUST have a corresponding call to
|
documentation. This init call MUST have a corresponding call to
|
||||||
\fIcurl_multi_cleanup(3)\fP when the operation is complete.
|
\fIcurl_multi_cleanup(3)\fP when the operation is complete.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
@@ -19,14 +19,14 @@ integer-pointer.
|
|||||||
.SH "RETURN VALUE"
|
.SH "RETURN VALUE"
|
||||||
CURLMcode type, general libcurl multi interface error code.
|
CURLMcode type, general libcurl multi interface error code.
|
||||||
|
|
||||||
If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basicly means that you
|
If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you
|
||||||
should call \fIcurl_multi_perform\fP again, before you select() on more
|
should call \fIcurl_multi_perform\fP again, before you select() on more
|
||||||
actions. You don't have to do it immediately, but the return code means that
|
actions. You don't have to do it immediately, but the return code means that
|
||||||
libcurl may have more data available to return or that there may be more data
|
libcurl may have more data available to return or that there may be more data
|
||||||
to send off before it is "satisfied".
|
to send off before it is "satisfied".
|
||||||
|
|
||||||
NOTE that this only returns errors etc regarding the whole multi stack. There
|
NOTE that this only returns errors etc regarding the whole multi stack. There
|
||||||
might still have occurred problems on invidual transfers even when this
|
might still have occurred problems on individual transfers even when this
|
||||||
function returns OK.
|
function returns OK.
|
||||||
.SH "TYPICAL USAGE"
|
.SH "TYPICAL USAGE"
|
||||||
Most application will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
|
Most application will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
|
||||||
|
18
docs/libcurl/curl_multi_strerror.3
Normal file
18
docs/libcurl/curl_multi_strerror.3
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
.\" You can view this file with:
|
||||||
|
.\" nroff -man [file]
|
||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.TH curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
|
.SH NAME
|
||||||
|
curl_multi_strerror - return string describing error code
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <curl/curl.h>
|
||||||
|
.BI "const char *curl_multi_strerror(CURLMcode " errornum ");"
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The curl_multi_strerror() function returns a string describing the CURLMcode
|
||||||
|
error code passed in the argument \fIerrornum\fP.
|
||||||
|
.SH RETURN VALUE
|
||||||
|
A pointer to a zero terminated string.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR libcurl-errors "(3), " curl_easy_strerror "(3), " curl_share_strerror "(3)"
|
@@ -10,7 +10,7 @@ curl_share_init - Create a shared object
|
|||||||
.ad
|
.ad
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function returns a CURLSH handle to be used as input to all the other
|
This function returns a CURLSH handle to be used as input to all the other
|
||||||
share-functions, sometimes refered to as a share handle on some places in the
|
share-functions, sometimes referred to as a share handle on some places in the
|
||||||
documentation. This init call MUST have a corresponding call to
|
documentation. This init call MUST have a corresponding call to
|
||||||
\fIcurl_share_cleanup\fP when all operations using the share are complete.
|
\fIcurl_share_cleanup\fP when all operations using the share are complete.
|
||||||
|
|
||||||
|
18
docs/libcurl/curl_share_strerror.3
Normal file
18
docs/libcurl/curl_share_strerror.3
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
.\" You can view this file with:
|
||||||
|
.\" nroff -man [file]
|
||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.TH curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
|
.SH NAME
|
||||||
|
curl_share_strerror - return string describing error code
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <curl/curl.h>
|
||||||
|
.BI "const char *curl_share_strerror(CURLSHcode " errornum ");"
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The curl_share_strerror() function returns a string describing the CURLSHcode
|
||||||
|
error code passed in the argument \fIerrornum\fP.
|
||||||
|
.SH RETURN VALUE
|
||||||
|
A pointer to a zero terminated string.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR libcurl-errors "(3), " curl_multi_strerror "(3), " curl_easy_strerror "(3)"
|
@@ -1,8 +1,6 @@
|
|||||||
.\" You can view this file with:
|
|
||||||
.\" nroff -man [file]
|
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_strequal 3 "20 April 2001" "libcurl 7.7.2" "libcurl Manual"
|
.TH curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_strequal, curl_strnequal - case insensitive string comparisons
|
curl_strequal, curl_strnequal - case insensitive string comparisons
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -24,6 +22,10 @@ first \fIlen\fP characters of \fIstr1\fP.
|
|||||||
These functions are provided by libcurl to enable applications to compare
|
These functions are provided by libcurl to enable applications to compare
|
||||||
strings in a truly portable manner. There are no standard portable case
|
strings in a truly portable manner. There are no standard portable case
|
||||||
insensitive string comparison functions. These two works on all platforms.
|
insensitive string comparison functions. These two works on all platforms.
|
||||||
|
.SH AVAILABILITY
|
||||||
|
These functions will be removed from the public libcurl API in a near
|
||||||
|
future. They will instead be made "available" by source code access only, and
|
||||||
|
then as curlx_strequal() and curlx_strenqual().
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
Non-zero if the strings are identical. Zero if they're not.
|
Non-zero if the strings are identical. Zero if they're not.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
@@ -1 +1 @@
|
|||||||
.so curl_strequal.3
|
.so man3/curl_strequal.3
|
||||||
|
@@ -13,9 +13,8 @@ curl_unescape - URL decodes the given string
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function will convert the given URL encoded input string to a "plain
|
This function will convert the given URL encoded input string to a "plain
|
||||||
string" and return that as a new allocated string. All input characters that
|
string" and return that as a new allocated string. All input characters that
|
||||||
are URL encoded (%XX where XX is a two-digit hexadecimal number, or +) will be
|
are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
|
||||||
converted to their plain text versions (up to a ? letter, no + letters to the
|
converted to their plain text versions.
|
||||||
right of a ? letter will be converted).
|
|
||||||
|
|
||||||
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
|
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
|
||||||
input 'url' string to find out the size.
|
input 'url' string to find out the size.
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
.\" nroff -man [file]
|
.\" nroff -man [file]
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH curl_version_info 3 "19 Sep 2003" "libcurl 7.10.8" "libcurl Manual"
|
.TH curl_version_info 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_version_info - returns run-time libcurl version info
|
curl_version_info - returns run-time libcurl version info
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -28,22 +28,32 @@ The curl_version_info_data struct looks like this
|
|||||||
|
|
||||||
.nf
|
.nf
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CURLversion age; /* 0 - this kind of struct */
|
CURLversion age; /* see description below */
|
||||||
|
|
||||||
|
/* when 'age' is 0 or higher, the members below also exist: */
|
||||||
const char *version; /* human readable string */
|
const char *version; /* human readable string */
|
||||||
unsigned int version_num; /* numeric representation */
|
unsigned int version_num; /* numeric representation */
|
||||||
const char *host; /* human readable string */
|
const char *host; /* human readable string */
|
||||||
int features; /* bitmask, see below */
|
int features; /* bitmask, see below */
|
||||||
char *ssl_version; /* human readable string */
|
char *ssl_version; /* human readable string */
|
||||||
long ssl_version_num; /* number */
|
long ssl_version_num; /* number */
|
||||||
char *libz_version; /* human readable string */
|
const char *libz_version; /* human readable string */
|
||||||
const char *protocols[]; /* list of protocols */
|
const char **protocols; /* list of protocols */
|
||||||
|
|
||||||
|
/* when 'age' is 1 or higher, the members below also exist: */
|
||||||
|
const char *ares; /* human readable string */
|
||||||
|
int ares_num; /* number */
|
||||||
|
|
||||||
|
/* when 'age' is 2 or higher, the member below also exists: */
|
||||||
|
const char *libidn; /* human readable string */
|
||||||
|
|
||||||
} curl_version_info_data;
|
} curl_version_info_data;
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
\fIage\fP describes what kind of struct this is. It is always 0 now. In a
|
\fIage\fP describes what age of this struct this is. The number depends on how
|
||||||
future libcurl, if this struct changes, this age counter may be increased, and
|
new libcurl you're using. You are however guaranteed to get a struct that you
|
||||||
then the struct for number 1 will look different (except for this first struct
|
have a matching struct for in the header, as you tell libcurl your "age" with
|
||||||
field).
|
the input argument.
|
||||||
|
|
||||||
\fIversion\fP is just an ascii string for the libcurl version.
|
\fIversion\fP is just an ascii string for the libcurl version.
|
||||||
|
|
||||||
@@ -57,38 +67,35 @@ environment.
|
|||||||
|
|
||||||
\fIfeatures\fP can have none, one or more bits set, and the currently defined
|
\fIfeatures\fP can have none, one or more bits set, and the currently defined
|
||||||
bits are:
|
bits are:
|
||||||
.TP 5.5
|
.RS
|
||||||
.B CURL_VERSION_IPV6
|
.IP CURL_VERSION_IPV6
|
||||||
supports IPv6
|
supports IPv6
|
||||||
.TP
|
.IP CURL_VERSION_KERBEROS4
|
||||||
.B CURL_VERSION_KERBEROS4
|
|
||||||
supports kerberos4 (when using FTP)
|
supports kerberos4 (when using FTP)
|
||||||
.TP
|
.IP CURL_VERSION_SSL
|
||||||
.B CURL_VERSION_SSL
|
|
||||||
supports SSL (HTTPS/FTPS)
|
supports SSL (HTTPS/FTPS)
|
||||||
.TP
|
.IP CURL_VERSION_LIBZ
|
||||||
.B CURL_VERSION_LIBZ
|
|
||||||
supports HTTP deflate using libz
|
supports HTTP deflate using libz
|
||||||
.TP
|
.IP CURL_VERSION_NTLM
|
||||||
.B CURL_VERSION_NTLM
|
|
||||||
supports HTTP NTLM (added in 7.10.6)
|
supports HTTP NTLM (added in 7.10.6)
|
||||||
.TP
|
.IP CURL_VERSION_GSSNEGOTIATE
|
||||||
.B CURL_VERSION_GSSNEGOTIATE
|
|
||||||
supports HTTP GSS-Negotiate (added in 7.10.6)
|
supports HTTP GSS-Negotiate (added in 7.10.6)
|
||||||
.TP
|
.IP CURL_VERSION_DEBUG
|
||||||
.B CURL_VERSION_DEBUG
|
|
||||||
libcurl was built with extra debug capabilities built-in. This is mainly of
|
libcurl was built with extra debug capabilities built-in. This is mainly of
|
||||||
interest for libcurl hackers. (added in 7.10.6)
|
interest for libcurl hackers. (added in 7.10.6)
|
||||||
.TP
|
.IP CURL_VERSION_ASYNCHDNS
|
||||||
.B CURL_VERSION_ASYNCHDNS
|
|
||||||
libcurl was built with support for asynchronous name lookups, which allows
|
libcurl was built with support for asynchronous name lookups, which allows
|
||||||
more exact timeouts (even on Windows) and less blocking when using the multi
|
more exact timeouts (even on Windows) and less blocking when using the multi
|
||||||
interface. (added in 7.10.7)
|
interface. (added in 7.10.7)
|
||||||
.TP
|
.IP CURL_VERSION_SPNEGO
|
||||||
.B CURL_VERSION_SPNEGO
|
|
||||||
libcurl was built with support for SPNEGO authentication (Simple and Protected
|
libcurl was built with support for SPNEGO authentication (Simple and Protected
|
||||||
GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
|
GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
|
||||||
.PP
|
.IP CURL_VERSION_LARGEFILE
|
||||||
|
libcurl was built with support for large files.
|
||||||
|
.IP CURL_VERSION_IDN
|
||||||
|
libcurl was built with support for IDNA, domain names with international
|
||||||
|
letters.
|
||||||
|
.RE
|
||||||
\fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
|
\fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
|
||||||
has no SSL support, this is NULL.
|
has no SSL support, this is NULL.
|
||||||
|
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
<HTML>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<HEAD>
|
<html><head>
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||||
<TITLE>Index to libcurl documentation</TITLE>
|
<title>Index to libcurl documentation</title>
|
||||||
</HEAD>
|
</head>
|
||||||
|
|
||||||
<BODY>
|
<body>
|
||||||
<H1 ALIGN="CENTER">Index to libcurl documentation</H1>
|
<h1 align="center">Index to libcurl documentation</h1>
|
||||||
|
|
||||||
<H2>Programs</H2>
|
<h2>Programs</h2>
|
||||||
<P><A HREF="../index.html">curl and tools</A>
|
<p><a href="../index.html">curl and tools</a>
|
||||||
|
|
||||||
<h2>Overviews</h2>
|
<h2>Overviews</h2>
|
||||||
<A HREF="libcurl.html">libcurl</A>
|
<A HREF="libcurl.html">libcurl</A>
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
<br><a href="curl_easy_init.html">curl_easy_init</A>
|
<br><a href="curl_easy_init.html">curl_easy_init</A>
|
||||||
<br><a href="curl_easy_perform.html">curl_easy_perform</A>
|
<br><a href="curl_easy_perform.html">curl_easy_perform</A>
|
||||||
<br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
|
<br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
|
||||||
|
<br><a href="curl_easy_strerror.html">curl_easy_strerror</A>
|
||||||
<br><a href="curl_escape.html">curl_escape</A>
|
<br><a href="curl_escape.html">curl_escape</A>
|
||||||
<br><a href="curl_formadd.html">curl_formadd</A>
|
<br><a href="curl_formadd.html">curl_formadd</A>
|
||||||
<br><a href="curl_formfree.html">curl_formfree</A>
|
<br><a href="curl_formfree.html">curl_formfree</A>
|
||||||
<br><a href="curl_formparse.html">curl_formparse</A>
|
|
||||||
<br><a href="curl_free.html">curl_free</A>
|
<br><a href="curl_free.html">curl_free</A>
|
||||||
<br><a href="curl_getdate.html">curl_getdate</A>
|
<br><a href="curl_getdate.html">curl_getdate</A>
|
||||||
<br><a href="curl_getenv.html">curl_getenv</A>
|
<br><a href="curl_getenv.html">curl_getenv</A>
|
||||||
@@ -42,16 +42,16 @@
|
|||||||
<br><a href="curl_multi_init.html">curl_multi_init</a>
|
<br><a href="curl_multi_init.html">curl_multi_init</a>
|
||||||
<br><a href="curl_multi_perform.html">curl_multi_perform</a>
|
<br><a href="curl_multi_perform.html">curl_multi_perform</a>
|
||||||
<br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
|
<br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
|
||||||
|
<br><a href="curl_multi_strerror.html">curl_multi_strerror.html</a>
|
||||||
<br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
|
<br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
|
||||||
<br><a href="curl_share_init.html">curl_share_init</A>
|
<br><a href="curl_share_init.html">curl_share_init</A>
|
||||||
<br><a href="curl_share_setopt.html">curl_share_setopt</A>
|
<br><a href="curl_share_setopt.html">curl_share_setopt</A>
|
||||||
|
<br><a href="curl_share_strerror.html">curl_share_strerror.html</a>
|
||||||
<br><a href="curl_slist_append.html">curl_slist_append</A>
|
<br><a href="curl_slist_append.html">curl_slist_append</A>
|
||||||
<br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
|
<br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
|
||||||
<br><a href="curl_strequal.html">curl_strequal</A>
|
<br><a href="curl_strequal.html">curl_strequal and curl_strnequal</A>
|
||||||
<br><a href="curl_strnequal.html">curl_strnequal</A>
|
|
||||||
<br><a href="curl_unescape.html">curl_unescape</A>
|
<br><a href="curl_unescape.html">curl_unescape</A>
|
||||||
<br><a href="curl_version.html">curl_version</A>
|
<br><a href="curl_version.html">curl_version</A>
|
||||||
<br><a href="curl_version_info.html">curl_version_info</A>
|
<br><a href="curl_version_info.html">curl_version_info</A>
|
||||||
|
|
||||||
</BODY>
|
</body></html>
|
||||||
</HTML>
|
|
||||||
|
@@ -7,9 +7,8 @@
|
|||||||
libcurl-easy \- easy interface overview
|
libcurl-easy \- easy interface overview
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
When using libcurl's "easy" interface you init your session and get a handle
|
When using libcurl's "easy" interface you init your session and get a handle
|
||||||
(often referred to as an "easy handle" in various docs and sources), which you
|
(often referred to as an "easy handle"), which you use as input to the easy
|
||||||
use as input to the easy interface functions you use. Use
|
interface functions you use. Use \fIcurl_easy_init(3)\fP to get the handle.
|
||||||
\fIcurl_easy_init(3)\fP to get the handle.
|
|
||||||
|
|
||||||
You continue by setting all the options you want in the upcoming transfer, the
|
You continue by setting all the options you want in the upcoming transfer, the
|
||||||
most important among them is the URL itself (you can't transfer anything
|
most important among them is the URL itself (you can't transfer anything
|
||||||
@@ -23,7 +22,7 @@ return until it is done (successfully or not).
|
|||||||
|
|
||||||
After the transfer has been made, you can set new options and make another
|
After the transfer has been made, you can set new options and make another
|
||||||
transfer, or if you're done, cleanup the session by calling
|
transfer, or if you're done, cleanup the session by calling
|
||||||
\fIcurl_easy_cleanup(3)\fP. If you want persistant connections, you don't
|
\fIcurl_easy_cleanup(3)\fP. If you want persistent connections, you don't
|
||||||
cleanup immediately, but instead run ahead and perform other transfers using
|
cleanup immediately, but instead run ahead and perform other transfers using
|
||||||
the same easy handle.
|
the same easy handle.
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
.\" nroff -man [file]
|
.\" nroff -man [file]
|
||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.TH libcurl-errors 3 "8 Mar 2004" "libcurl 7.11.0" "libcurl errors"
|
.TH libcurl-errors 3 "27 Apr 2004" "libcurl 7.12" "libcurl errors"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libcurl-errors \- error codes in libcurl
|
libcurl-errors \- error codes in libcurl
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@@ -10,9 +10,11 @@ This man page includes most, if not all, available error codes in libcurl.
|
|||||||
Why they occur and possibly what you can do to fix the problem.
|
Why they occur and possibly what you can do to fix the problem.
|
||||||
.SH "CURLcode"
|
.SH "CURLcode"
|
||||||
Almost all "easy" interface functions return a CURLcode error code. No matter
|
Almost all "easy" interface functions return a CURLcode error code. No matter
|
||||||
what, using \fICURLOPT_ERRORBUFFER\fP is a good idea as it will give you a
|
what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
|
||||||
human readable error string that may offer more details about the error cause
|
a good idea as it will give you a human readable error string that may offer
|
||||||
than just the error code does.
|
more details about the error cause than just the error code
|
||||||
|
does. \fIcurl_easy_strerror(3)\fP can be called to get an error string from a
|
||||||
|
given CURLcode number.
|
||||||
|
|
||||||
CURLcode is one of the following:
|
CURLcode is one of the following:
|
||||||
.IP "CURLE_OK (0)"
|
.IP "CURLE_OK (0)"
|
||||||
@@ -36,7 +38,7 @@ Couldn't resolve host. The given remote host was not resolved.
|
|||||||
.IP "CURLE_COULDNT_CONNECT (7)"
|
.IP "CURLE_COULDNT_CONNECT (7)"
|
||||||
Failed to connect() to host or proxy.
|
Failed to connect() to host or proxy.
|
||||||
.IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
|
.IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
|
||||||
After connecting to a FTP server, libcurl expects to get a certain reply back.
|
After connecting to an FTP server, libcurl expects to get a certain reply back.
|
||||||
This error code implies that it god a strange or bad reply. The given remote
|
This error code implies that it god a strange or bad reply. The given remote
|
||||||
server is probably not an OK FTP server.
|
server is probably not an OK FTP server.
|
||||||
.IP "CURLE_FTP_ACCESS_DENIED (9)"
|
.IP "CURLE_FTP_ACCESS_DENIED (9)"
|
||||||
@@ -93,7 +95,7 @@ There was a problem reading a local file or an error returned by the read
|
|||||||
callback.
|
callback.
|
||||||
.IP "CURLE_OUT_OF_MEMORY (27)"
|
.IP "CURLE_OUT_OF_MEMORY (27)"
|
||||||
Out of memory. A memory allocation request failed. This is serious badness and
|
Out of memory. A memory allocation request failed. This is serious badness and
|
||||||
things are severly screwed up if this ever occur.
|
things are severely screwed up if this ever occur.
|
||||||
.IP "CURLE_OPERATION_TIMEOUTED (28)"
|
.IP "CURLE_OPERATION_TIMEOUTED (28)"
|
||||||
Operation timeout. The specified time-out period was reached according to the
|
Operation timeout. The specified time-out period was reached according to the
|
||||||
conditions.
|
conditions.
|
||||||
@@ -106,14 +108,14 @@ specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
|
|||||||
The FTP REST command returned error. This should never happen if the server is
|
The FTP REST command returned error. This should never happen if the server is
|
||||||
sane.
|
sane.
|
||||||
.IP "CURLE_FTP_COULDNT_GET_SIZE (32)"
|
.IP "CURLE_FTP_COULDNT_GET_SIZE (32)"
|
||||||
The FTP SIZE command returned errror. SIZE is not a kosher FTP command, it is
|
The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is
|
||||||
an extension and not all servers support it. This is not a surprising error.
|
an extension and not all servers support it. This is not a surprising error.
|
||||||
.IP "CURLE_HTTP_RANGE_ERROR (33)"
|
.IP "CURLE_HTTP_RANGE_ERROR (33)"
|
||||||
The HTTP server does not support or accept range requests.
|
The HTTP server does not support or accept range requests.
|
||||||
.IP "CURLE_HTTP_POST_ERROR (34)"
|
.IP "CURLE_HTTP_POST_ERROR (34)"
|
||||||
This is an odd error that mainly occurs due to internal confusion.
|
This is an odd error that mainly occurs due to internal confusion.
|
||||||
.IP "CURLE_SSL_CONNECT_ERROR (35)"
|
.IP "CURLE_SSL_CONNECT_ERROR (35)"
|
||||||
A problem occured somewhere in the SSL/TLS handshake. You really want the
|
A problem occurred somewhere in the SSL/TLS handshake. You really want the
|
||||||
error buffer and read the message there as it pinpoints the problem slightly
|
error buffer and read the message there as it pinpoints the problem slightly
|
||||||
more. Could be certificates (file formats, paths, permissions), passwords, and
|
more. Could be certificates (file formats, paths, permissions), passwords, and
|
||||||
others.
|
others.
|
||||||
@@ -168,8 +170,8 @@ Failed setting the selected SSL crypto engine as default!
|
|||||||
Failed sending network data.
|
Failed sending network data.
|
||||||
.IP "CURLE_RECV_ERROR (56)"
|
.IP "CURLE_RECV_ERROR (56)"
|
||||||
Failure with receiving network data.
|
Failure with receiving network data.
|
||||||
.IP "CURLE_RECV_ERROR (57)"
|
.IP "CURLE_SHARE_IN_USE (57)"
|
||||||
Failure with receiving network data.
|
Share is in use
|
||||||
.IP "CURLE_SSL_CERTPROBLEM (58)"
|
.IP "CURLE_SSL_CERTPROBLEM (58)"
|
||||||
problem with the local certificate
|
problem with the local certificate
|
||||||
.IP "CURLE_SSL_CIPHER (59)"
|
.IP "CURLE_SSL_CIPHER (59)"
|
||||||
@@ -186,12 +188,24 @@ Maximum file size exceeded
|
|||||||
Requested FTP SSL level failed
|
Requested FTP SSL level failed
|
||||||
.SH "CURLMcode"
|
.SH "CURLMcode"
|
||||||
This is the generic return code used by functions in the libcurl multi
|
This is the generic return code used by functions in the libcurl multi
|
||||||
interface.
|
interface. Also consider \fIcurl_multi_strerror(3)\fI.
|
||||||
|
|
||||||
This is left to be documented.
|
.IP "CURLM_CALL_MULTI_PERFORM (-1)"
|
||||||
|
This is not really an error. It means you should call
|
||||||
|
\fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
|
||||||
|
.IP "CURLM_OK (0)"
|
||||||
|
Things are fine.
|
||||||
|
.IP "CURLM_BAD_HANDLE (1)"
|
||||||
|
The passed-in handle is not a valid CURLM handle.
|
||||||
|
.IP "CURLM_BAD_EASY_HANDLE (2)"
|
||||||
|
An easy handle was not good/valid.
|
||||||
|
.IP "CURLM_OUT_OF_MEMORY (3)"
|
||||||
|
You are doomed.
|
||||||
|
.IP "CURLM_INTERNAL_ERROR (4)"
|
||||||
|
This can only be returned if libcurl bugs. Please report it to us!
|
||||||
.SH "CURLSHcode"
|
.SH "CURLSHcode"
|
||||||
The "share" interface will return a CURLSHcode to indicate when an
|
The "share" interface will return a CURLSHcode to indicate when an error has
|
||||||
error has occurred.
|
occurred. Also consider \fIcurl_share_strerror(3)\fI.
|
||||||
|
|
||||||
CURLSHcode is one of the following:
|
CURLSHcode is one of the following:
|
||||||
.IP "CURLSHE_OK (0)"
|
.IP "CURLSHE_OK (0)"
|
||||||
|
@@ -71,7 +71,7 @@ timeout every now and then, should you want that.
|
|||||||
|
|
||||||
A little note here about the return codes from the multi functions, and
|
A little note here about the return codes from the multi functions, and
|
||||||
especially the \fIcurl_multi_perform(3)\fP: if you receive
|
especially the \fIcurl_multi_perform(3)\fP: if you receive
|
||||||
\fICURLM_CALL_MULTI_PERFORM\fP, this basicly means that you should call
|
\fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you should call
|
||||||
\fIcurl_multi_perform(3)\fP again, before you select() on more actions. You
|
\fIcurl_multi_perform(3)\fP again, before you select() on more actions. You
|
||||||
don't have to do it immediately, but the return code means that libcurl may
|
don't have to do it immediately, but the return code means that libcurl may
|
||||||
have more data available to return or that there may be more data to send off
|
have more data available to return or that there may be more data to send off
|
||||||
@@ -97,4 +97,4 @@ to clean them up properly.
|
|||||||
|
|
||||||
If you want to re-use an easy handle that was added to the multi handle for
|
If you want to re-use an easy handle that was added to the multi handle for
|
||||||
transfer, you must first remove it from the multi stack and then re-add it
|
transfer, you must first remove it from the multi stack and then re-add it
|
||||||
again (possbily after having altered some options at your own choice).
|
again (possibly after having altered some options at your own choice).
|
||||||
|
@@ -21,8 +21,8 @@ libcurl is complete, it \fBmust\fP call \fIcurl_global_cleanup(3)\fP. In
|
|||||||
between those two calls, you can use libcurl as described below.
|
between those two calls, you can use libcurl as described below.
|
||||||
|
|
||||||
To transfer files, you always set up an "easy handle" using
|
To transfer files, you always set up an "easy handle" using
|
||||||
\fIcurl_easy_init(3)\fP, but when you want the file(s) transfered you have the
|
\fIcurl_easy_init(3)\fP, but when you want the file(s) transferred you have
|
||||||
option of using the "easy" interface, or the "multi" interface.
|
the option of using the "easy" interface, or the "multi" interface.
|
||||||
|
|
||||||
The easy interface is a synchronous interface with which you call
|
The easy interface is a synchronous interface with which you call
|
||||||
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
|
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
|
||||||
@@ -30,48 +30,31 @@ completed, the function return and you can continue. More details are found in
|
|||||||
the \fIlibcurl-easy(3)\fP man page.
|
the \fIlibcurl-easy(3)\fP man page.
|
||||||
|
|
||||||
The multi interface on the other hand is an asynchronous interface, that you
|
The multi interface on the other hand is an asynchronous interface, that you
|
||||||
call and that performs only a little piece of the tranfer on each invoke. It
|
call and that performs only a little piece of the transfer on each invoke. It
|
||||||
is perfect if you want to do things while the transfer is in progress, or
|
is perfect if you want to do things while the transfer is in progress, or
|
||||||
similar. The multi interface allows you to select() on libcurl action, and
|
similar. The multi interface allows you to select() on libcurl action, and
|
||||||
even to easily download multiple files simultaneously using a single thread.
|
even to easily download multiple files simultaneously using a single thread. See further deails in the \fIlibcurl-multi(3)\fP man page.
|
||||||
|
|
||||||
You can have multiple easy handles share certain data, even if they are used
|
You can have multiple easy handles share certain data, even if they are used
|
||||||
in different threads. This magic is setup using the share interface, as
|
in different threads. This magic is setup using the share interface, as
|
||||||
described in the \fIlibcurl-share(3)\fP man page.
|
described in the \fIlibcurl-share(3)\fP man page.
|
||||||
|
|
||||||
There is also a series of other helpful functions to use. They are:
|
There is also a series of other helpful functions to use, including these:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
.TP 10
|
.IP curl_version_info()
|
||||||
.B curl_version()
|
gets detailed libcurl (and other used libraries) version info
|
||||||
displays the libcurl version
|
.IP curl_getdate()
|
||||||
.TP
|
|
||||||
.B curl_getdate()
|
|
||||||
converts a date string to time_t
|
converts a date string to time_t
|
||||||
.TP
|
.IP curl_easy_getinfo()
|
||||||
.B curl_getenv()
|
|
||||||
portable environment variable reader
|
|
||||||
.TP
|
|
||||||
.B curl_easy_getinfo()
|
|
||||||
get information about a performed transfer
|
get information about a performed transfer
|
||||||
.TP
|
.IP curl_formadd()
|
||||||
.B curl_formadd()
|
helps building an HTTP form POST
|
||||||
helps building a HTTP form POST
|
.IP curl_formfree()
|
||||||
.TP
|
|
||||||
.B curl_formfree()
|
|
||||||
free a list built with \fIcurl_formadd(3)\fP
|
free a list built with \fIcurl_formadd(3)\fP
|
||||||
.TP
|
.IP curl_slist_append()
|
||||||
.B curl_slist_append()
|
|
||||||
builds a linked list
|
builds a linked list
|
||||||
.TP
|
.IP curl_slist_free_all()
|
||||||
.B curl_slist_free_all()
|
|
||||||
frees a whole curl_slist
|
frees a whole curl_slist
|
||||||
.TP
|
|
||||||
.B curl_mprintf()
|
|
||||||
portable printf() functions
|
|
||||||
.TP
|
|
||||||
.B curl_strequal()
|
|
||||||
portable case insensitive string comparisons
|
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.SH "LINKING WITH LIBCURL"
|
.SH "LINKING WITH LIBCURL"
|
||||||
@@ -82,13 +65,17 @@ curl-config is added to make it easier for applications to link with libcurl
|
|||||||
and developers to learn about libcurl and how to use it.
|
and developers to learn about libcurl and how to use it.
|
||||||
|
|
||||||
Run 'curl-config --libs' to get the (additional) linker options you need to
|
Run 'curl-config --libs' to get the (additional) linker options you need to
|
||||||
link with the particular version of libcurl you've installed.
|
link with the particular version of libcurl you've installed. See the
|
||||||
|
\fIcurl-config(1)\fP man page for further details.
|
||||||
|
|
||||||
|
Unix-like operating system that ship libcurl as part of their distributions
|
||||||
|
often don't provide the curl-config tool, but simply install the library and
|
||||||
|
headers in the common path for this purpose.
|
||||||
|
|
||||||
For details, see the curl-config.1 man page.
|
|
||||||
.SH "LIBCURL SYMBOL NAMES"
|
.SH "LIBCURL SYMBOL NAMES"
|
||||||
All public functions in the libcurl interface are prefixed with 'curl_' (with
|
All public functions in the libcurl interface are prefixed with 'curl_' (with
|
||||||
a lowercase c). You can find other functions in the library source code, but
|
a lowercase c). You can find other functions in the library source code, but
|
||||||
other prefixes indicate the functions are private and may change without
|
other prefixes indicate that the functions are private and may change without
|
||||||
further notice in the next release.
|
further notice in the next release.
|
||||||
|
|
||||||
Only use documented functions and functionality!
|
Only use documented functions and functionality!
|
||||||
|
@@ -1,8 +1,5 @@
|
|||||||
pkginclude_HEADERS = \
|
pkginclude_HEADERS = \
|
||||||
curl.h \
|
curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h
|
||||||
easy.h \
|
|
||||||
mprintf.h \
|
|
||||||
stdcheaders.h \
|
|
||||||
types.h \
|
|
||||||
multi.h
|
|
||||||
pkgincludedir= $(includedir)/curl
|
pkgincludedir= $(includedir)/curl
|
||||||
|
|
||||||
|
CLEANFILES = *dist
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#ifndef __CURL_CURL_H
|
#ifndef __CURL_CURL_H
|
||||||
#define __CURL_CURL_H
|
#define __CURL_CURL_H
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
*
|
*
|
||||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
* copies of the Software, and permit persons to whom the Software is
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
* furnished to do so, under the terms of the COPYING file.
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
@@ -27,31 +27,7 @@
|
|||||||
http://curl.haxx.se/libcurl/
|
http://curl.haxx.se/libcurl/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* This is the version number of the libcurl package from which this header
|
#include "curlver.h" /* the libcurl version defines */
|
||||||
file origins: */
|
|
||||||
#define LIBCURL_VERSION "7.11.0-CVS"
|
|
||||||
|
|
||||||
/* This is the numeric version of the libcurl version number, meant for easier
|
|
||||||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
|
||||||
always follow this syntax:
|
|
||||||
|
|
||||||
0xXXYYZZ
|
|
||||||
|
|
||||||
Where XX, YY and ZZ are the main version, release and patch numbers in
|
|
||||||
hexadecimal. All three numbers are always represented using two digits. 1.2
|
|
||||||
would appear as "0x010200" while version 9.11.7 appears as "0x090b07".
|
|
||||||
|
|
||||||
This 6-digit hexadecimal number does not show pre-release number, and it is
|
|
||||||
always a greater number in a more recent release. It makes comparisons with
|
|
||||||
greater than and less than work.
|
|
||||||
*/
|
|
||||||
#define LIBCURL_VERSION_NUM 0x070b00
|
|
||||||
|
|
||||||
/* The numeric version number is also available "in parts" by using these
|
|
||||||
defines: */
|
|
||||||
#define LIBCURL_VERSION_MAJOR 7
|
|
||||||
#define LIBCURL_VERSION_MINOR 11
|
|
||||||
#define LIBCURL_VERSION_PATCH 0
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -65,7 +41,7 @@
|
|||||||
# include <time.h>
|
# include <time.h>
|
||||||
#endif /* defined (vms) */
|
#endif /* defined (vms) */
|
||||||
|
|
||||||
#include "types.h"
|
typedef void CURL;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -178,6 +154,18 @@ typedef int (*curl_passwd_callback)(void *clientp,
|
|||||||
char *buffer,
|
char *buffer,
|
||||||
int buflen);
|
int buflen);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following typedef's are signatures of malloc, free, realloc, strdup and
|
||||||
|
* calloc respectively. Function pointers of these types can be passed to the
|
||||||
|
* curl_global_init_mem() function to set user defined memory management
|
||||||
|
* callback routines.
|
||||||
|
*/
|
||||||
|
typedef void *(*curl_malloc_callback)(size_t size);
|
||||||
|
typedef void (*curl_free_callback)(void *ptr);
|
||||||
|
typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
|
||||||
|
typedef char *(*curl_strdup_callback)(const char *str);
|
||||||
|
typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
|
||||||
|
|
||||||
/* the kind of data that is passed to information_callback*/
|
/* the kind of data that is passed to information_callback*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CURLINFO_TEXT = 0,
|
CURLINFO_TEXT = 0,
|
||||||
@@ -194,7 +182,7 @@ typedef int (*curl_debug_callback)
|
|||||||
char *data, /* points to the data */
|
char *data, /* points to the data */
|
||||||
size_t size, /* size of the data pointed to */
|
size_t size, /* size of the data pointed to */
|
||||||
void *userptr); /* whatever the user please */
|
void *userptr); /* whatever the user please */
|
||||||
|
|
||||||
/* All possible error codes from all sorts of curl functions. Future versions
|
/* All possible error codes from all sorts of curl functions. Future versions
|
||||||
may return other values, stay prepared.
|
may return other values, stay prepared.
|
||||||
|
|
||||||
@@ -207,7 +195,7 @@ typedef enum {
|
|||||||
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
|
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
|
||||||
CURLE_FAILED_INIT, /* 2 */
|
CURLE_FAILED_INIT, /* 2 */
|
||||||
CURLE_URL_MALFORMAT, /* 3 */
|
CURLE_URL_MALFORMAT, /* 3 */
|
||||||
CURLE_URL_MALFORMAT_USER, /* 4 */
|
CURLE_URL_MALFORMAT_USER, /* 4 (NOT USED) */
|
||||||
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
|
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
|
||||||
CURLE_COULDNT_RESOLVE_HOST, /* 6 */
|
CURLE_COULDNT_RESOLVE_HOST, /* 6 */
|
||||||
CURLE_COULDNT_CONNECT, /* 7 */
|
CURLE_COULDNT_CONNECT, /* 7 */
|
||||||
@@ -227,7 +215,7 @@ typedef enum {
|
|||||||
CURLE_FTP_QUOTE_ERROR, /* 21 */
|
CURLE_FTP_QUOTE_ERROR, /* 21 */
|
||||||
CURLE_HTTP_RETURNED_ERROR, /* 22 */
|
CURLE_HTTP_RETURNED_ERROR, /* 22 */
|
||||||
CURLE_WRITE_ERROR, /* 23 */
|
CURLE_WRITE_ERROR, /* 23 */
|
||||||
CURLE_MALFORMAT_USER, /* 24 - user name is illegally specified */
|
CURLE_MALFORMAT_USER, /* 24 - NOT USED */
|
||||||
CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */
|
CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */
|
||||||
CURLE_READ_ERROR, /* 26 - could open/read from file */
|
CURLE_READ_ERROR, /* 26 - could open/read from file */
|
||||||
CURLE_OUT_OF_MEMORY, /* 27 */
|
CURLE_OUT_OF_MEMORY, /* 27 */
|
||||||
@@ -247,13 +235,13 @@ typedef enum {
|
|||||||
CURLE_FUNCTION_NOT_FOUND, /* 41 */
|
CURLE_FUNCTION_NOT_FOUND, /* 41 */
|
||||||
CURLE_ABORTED_BY_CALLBACK, /* 42 */
|
CURLE_ABORTED_BY_CALLBACK, /* 42 */
|
||||||
CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
|
CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
|
||||||
CURLE_BAD_CALLING_ORDER, /* 44 */
|
CURLE_BAD_CALLING_ORDER, /* 44 - NOT USED */
|
||||||
CURLE_HTTP_PORT_FAILED, /* 45 - HTTP Interface operation failed */
|
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
|
||||||
CURLE_BAD_PASSWORD_ENTERED, /* 46 - my_getpass() returns fail */
|
CURLE_BAD_PASSWORD_ENTERED, /* 46 - NOT USED */
|
||||||
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
|
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
|
||||||
CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */
|
CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */
|
||||||
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
|
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
|
||||||
CURLE_OBSOLETE, /* 50 - removed after 7.7.3 */
|
CURLE_OBSOLETE, /* 50 - NOT USED */
|
||||||
CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */
|
CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */
|
||||||
CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
|
CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
|
||||||
CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
|
CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
|
||||||
@@ -268,7 +256,7 @@ typedef enum {
|
|||||||
CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */
|
CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */
|
||||||
CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
|
CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
|
||||||
CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
|
CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
|
||||||
CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
|
CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
|
||||||
|
|
||||||
CURL_LAST /* never use! */
|
CURL_LAST /* never use! */
|
||||||
} CURLcode;
|
} CURLcode;
|
||||||
@@ -280,7 +268,10 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
|
|||||||
|
|
||||||
/* Make a spelling correction for the operation timed-out define */
|
/* Make a spelling correction for the operation timed-out define */
|
||||||
#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED
|
#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED
|
||||||
|
|
||||||
|
/* backwards compatibility with older names */
|
||||||
#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
|
#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
|
||||||
|
#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CURLPROXY_HTTP = 0,
|
CURLPROXY_HTTP = 0,
|
||||||
@@ -373,7 +364,7 @@ typedef enum {
|
|||||||
|
|
||||||
/* Name of proxy to use. */
|
/* Name of proxy to use. */
|
||||||
CINIT(PROXY, OBJECTPOINT, 4),
|
CINIT(PROXY, OBJECTPOINT, 4),
|
||||||
|
|
||||||
/* "name:password" to use when fetching. */
|
/* "name:password" to use when fetching. */
|
||||||
CINIT(USERPWD, OBJECTPOINT, 5),
|
CINIT(USERPWD, OBJECTPOINT, 5),
|
||||||
|
|
||||||
@@ -430,7 +421,7 @@ typedef enum {
|
|||||||
/* If the download receives less than "low speed limit" bytes/second
|
/* If the download receives less than "low speed limit" bytes/second
|
||||||
* during "low speed time" seconds, the operations is aborted.
|
* during "low speed time" seconds, the operations is aborted.
|
||||||
* You could i.e if you have a pretty high speed connection, abort if
|
* You could i.e if you have a pretty high speed connection, abort if
|
||||||
* it is less than 2000 bytes/sec during 20 seconds.
|
* it is less than 2000 bytes/sec during 20 seconds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Set the "low speed limit" */
|
/* Set the "low speed limit" */
|
||||||
@@ -463,7 +454,7 @@ typedef enum {
|
|||||||
CINIT(SSLCERTPASSWD, OBJECTPOINT, 26),
|
CINIT(SSLCERTPASSWD, OBJECTPOINT, 26),
|
||||||
/* password for the SSL private key */
|
/* password for the SSL private key */
|
||||||
CINIT(SSLKEYPASSWD, OBJECTPOINT, 26),
|
CINIT(SSLKEYPASSWD, OBJECTPOINT, 26),
|
||||||
|
|
||||||
/* send TYPE parameter? */
|
/* send TYPE parameter? */
|
||||||
CINIT(CRLF, LONG, 27),
|
CINIT(CRLF, LONG, 27),
|
||||||
|
|
||||||
@@ -562,14 +553,14 @@ typedef enum {
|
|||||||
|
|
||||||
/* Set if we should verify the peer in ssl handshake, set 1 to verify. */
|
/* Set if we should verify the peer in ssl handshake, set 1 to verify. */
|
||||||
CINIT(SSL_VERIFYPEER, LONG, 64),
|
CINIT(SSL_VERIFYPEER, LONG, 64),
|
||||||
|
|
||||||
/* The CApath or CAfile used to validate the peer certificate
|
/* The CApath or CAfile used to validate the peer certificate
|
||||||
this option is used only if SSL_VERIFYPEER is true */
|
this option is used only if SSL_VERIFYPEER is true */
|
||||||
CINIT(CAINFO, OBJECTPOINT, 65),
|
CINIT(CAINFO, OBJECTPOINT, 65),
|
||||||
|
|
||||||
/* 66 = OBSOLETE */
|
/* 66 = OBSOLETE */
|
||||||
/* 67 = OBSOLETE */
|
/* 67 = OBSOLETE */
|
||||||
|
|
||||||
/* Maximum number of http redirects to follow */
|
/* Maximum number of http redirects to follow */
|
||||||
CINIT(MAXREDIRS, LONG, 68),
|
CINIT(MAXREDIRS, LONG, 68),
|
||||||
|
|
||||||
@@ -638,7 +629,7 @@ typedef enum {
|
|||||||
|
|
||||||
/* Specificly switch on or off the FTP engine's use of the EPSV command. By
|
/* Specificly switch on or off the FTP engine's use of the EPSV command. By
|
||||||
default, that one will always be attempted before the more traditional
|
default, that one will always be attempted before the more traditional
|
||||||
PASV command. */
|
PASV command. */
|
||||||
CINIT(FTP_USE_EPSV, LONG, 85),
|
CINIT(FTP_USE_EPSV, LONG, 85),
|
||||||
|
|
||||||
/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
|
/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
|
||||||
@@ -687,7 +678,7 @@ typedef enum {
|
|||||||
timeouts. This option is useful for multi-threaded applications.
|
timeouts. This option is useful for multi-threaded applications.
|
||||||
See libcurl-the-guide for more background information. */
|
See libcurl-the-guide for more background information. */
|
||||||
CINIT(NOSIGNAL, LONG, 99),
|
CINIT(NOSIGNAL, LONG, 99),
|
||||||
|
|
||||||
/* Provide a CURLShare for mutexing non-ts data */
|
/* Provide a CURLShare for mutexing non-ts data */
|
||||||
CINIT(SHARE, OBJECTPOINT, 100),
|
CINIT(SHARE, OBJECTPOINT, 100),
|
||||||
|
|
||||||
@@ -698,7 +689,7 @@ typedef enum {
|
|||||||
/* Set the Accept-Encoding string. Use this to tell a server you would like
|
/* Set the Accept-Encoding string. Use this to tell a server you would like
|
||||||
the response to be compressed. */
|
the response to be compressed. */
|
||||||
CINIT(ENCODING, OBJECTPOINT, 102),
|
CINIT(ENCODING, OBJECTPOINT, 102),
|
||||||
|
|
||||||
/* Set pointer to private data */
|
/* Set pointer to private data */
|
||||||
CINIT(PRIVATE, OBJECTPOINT, 103),
|
CINIT(PRIVATE, OBJECTPOINT, 103),
|
||||||
|
|
||||||
@@ -712,7 +703,7 @@ typedef enum {
|
|||||||
|
|
||||||
/* Specificly switch on or off the FTP engine's use of the EPRT command ( it
|
/* Specificly switch on or off the FTP engine's use of the EPRT command ( it
|
||||||
also disables the LPRT attempt). By default, those ones will always be
|
also disables the LPRT attempt). By default, those ones will always be
|
||||||
attempted before the good old traditional PORT command. */
|
attempted before the good old traditional PORT command. */
|
||||||
CINIT(FTP_USE_EPRT, LONG, 106),
|
CINIT(FTP_USE_EPRT, LONG, 106),
|
||||||
|
|
||||||
/* Set this to a bitmask value to enable the particular authentications
|
/* Set this to a bitmask value to enable the particular authentications
|
||||||
@@ -737,7 +728,7 @@ typedef enum {
|
|||||||
Note that setting multiple bits may cause extra network round-trips. */
|
Note that setting multiple bits may cause extra network round-trips. */
|
||||||
CINIT(PROXYAUTH, LONG, 111),
|
CINIT(PROXYAUTH, LONG, 111),
|
||||||
|
|
||||||
/* FTP option that changes the timeout, in seconds, associated with
|
/* FTP option that changes the timeout, in seconds, associated with
|
||||||
getting a response. This is different from transfer timeout time and
|
getting a response. This is different from transfer timeout time and
|
||||||
essentially places a demand on the FTP server to acknowledge commands
|
essentially places a demand on the FTP server to acknowledge commands
|
||||||
in a timely manner. */
|
in a timely manner. */
|
||||||
@@ -786,6 +777,9 @@ typedef enum {
|
|||||||
/* The _LARGE version of the standard POSTFIELDSIZE option */
|
/* The _LARGE version of the standard POSTFIELDSIZE option */
|
||||||
CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
|
CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
|
||||||
|
|
||||||
|
/* Enable/disable the TCP Nagle algorithm */
|
||||||
|
CINIT(TCP_NODELAY, LONG, 121),
|
||||||
|
|
||||||
CURLOPT_LASTENTRY /* the last unused */
|
CURLOPT_LASTENTRY /* the last unused */
|
||||||
} CURLoption;
|
} CURLoption;
|
||||||
|
|
||||||
@@ -799,21 +793,20 @@ typedef enum {
|
|||||||
|
|
||||||
/* three convenient "aliases" that follow the name scheme better */
|
/* three convenient "aliases" that follow the name scheme better */
|
||||||
#define CURLOPT_WRITEDATA CURLOPT_FILE
|
#define CURLOPT_WRITEDATA CURLOPT_FILE
|
||||||
#define CURLOPT_READDATA CURLOPT_INFILE
|
#define CURLOPT_READDATA CURLOPT_INFILE
|
||||||
#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
|
#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
|
||||||
|
|
||||||
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
||||||
the obsolete stuff removed! */
|
the obsolete stuff removed! */
|
||||||
#define CURLOPT_HTTPREQUEST 0
|
#define CURLOPT_HTTPREQUEST -1
|
||||||
#define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT
|
#define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT
|
||||||
#define CURLOPT_MUTE 0
|
#define CURLOPT_MUTE -2
|
||||||
#define CURLOPT_PASSWDFUNCTION 0
|
#define CURLOPT_PASSWDFUNCTION -3
|
||||||
#define CURLOPT_PASSWDDATA 0
|
#define CURLOPT_PASSWDDATA -4
|
||||||
#define CURLOPT_CLOSEFUNCTION 0
|
#define CURLOPT_CLOSEFUNCTION -5
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* This is set if CURL_NO_OLDIES is defined at compile-time */
|
/* This is set if CURL_NO_OLDIES is defined at compile-time */
|
||||||
#define curl_formparse "curl_formparse is obsolete"
|
|
||||||
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
|
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -825,7 +818,7 @@ enum {
|
|||||||
for us! */
|
for us! */
|
||||||
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
||||||
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
||||||
|
|
||||||
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -866,23 +859,11 @@ typedef enum {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* These functions are in libcurl, they're here for portable reasons and they
|
/* curl_strequal() and curl_strnequal() are subject for removal in a future
|
||||||
are used by the 'curl' client. They really should be moved to some kind of
|
libcurl, see lib/README.curlx for details */
|
||||||
"portability library" since it has nothing to do with file transfers and
|
|
||||||
might be usable to other programs...
|
|
||||||
|
|
||||||
NOTE: they return TRUE if the strings match *case insensitively*.
|
|
||||||
*/
|
|
||||||
extern int (curl_strequal)(const char *s1, const char *s2);
|
extern int (curl_strequal)(const char *s1, const char *s2);
|
||||||
extern int (curl_strnequal)(const char *s1, const char *s2, size_t n);
|
extern int (curl_strnequal)(const char *s1, const char *s2, size_t n);
|
||||||
|
|
||||||
#ifdef CURL_OLDSTYLE
|
|
||||||
/* DEPRECATED function to build formdata. Stop using this, it will cease
|
|
||||||
to exist. */
|
|
||||||
int curl_formparse(char *, struct curl_httppost **,
|
|
||||||
struct curl_httppost **_post);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* name is uppercase CURLFORM_<name> */
|
/* name is uppercase CURLFORM_<name> */
|
||||||
#ifdef CFINIT
|
#ifdef CFINIT
|
||||||
#undef CFINIT
|
#undef CFINIT
|
||||||
@@ -897,7 +878,7 @@ int curl_formparse(char *, struct curl_httppost **,
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CFINIT(NOTHING), /********* the first one is unused ************/
|
CFINIT(NOTHING), /********* the first one is unused ************/
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
CFINIT(COPYNAME),
|
CFINIT(COPYNAME),
|
||||||
CFINIT(PTRNAME),
|
CFINIT(PTRNAME),
|
||||||
@@ -933,7 +914,7 @@ struct curl_forms {
|
|||||||
|
|
||||||
/* use this for multipart formpost building */
|
/* use this for multipart formpost building */
|
||||||
/* Returns code for curl_formadd()
|
/* Returns code for curl_formadd()
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* CURL_FORMADD_OK on success
|
* CURL_FORMADD_OK on success
|
||||||
* CURL_FORMADD_MEMORY if the FormInfo allocation fails
|
* CURL_FORMADD_MEMORY if the FormInfo allocation fails
|
||||||
@@ -988,7 +969,7 @@ void curl_formfree(struct curl_httppost *form);
|
|||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
*
|
*
|
||||||
* Returns a malloc()'ed string that MUST be curl_free()ed after usage is
|
* Returns a malloc()'ed string that MUST be curl_free()ed after usage is
|
||||||
* complete.
|
* complete. DEPRECATED - see lib/README.curlx
|
||||||
*/
|
*/
|
||||||
char *curl_getenv(const char *variable);
|
char *curl_getenv(const char *variable);
|
||||||
|
|
||||||
@@ -1043,6 +1024,26 @@ void curl_free(void *p);
|
|||||||
*/
|
*/
|
||||||
CURLcode curl_global_init(long flags);
|
CURLcode curl_global_init(long flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NAME curl_global_init_mem()
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* curl_global_init() or curl_global_init_mem() should be invoked exactly once
|
||||||
|
* for each application that uses libcurl. This function can be used to
|
||||||
|
* initialize libcurl and set user defined memory management callback
|
||||||
|
* functions. Users can implement memory management routines to check for
|
||||||
|
* memory leaks, check for mis-use of the curl library etc. User registered
|
||||||
|
* callback routines with be invoked by this library instead of the system
|
||||||
|
* memory management routines like malloc, free etc.
|
||||||
|
*/
|
||||||
|
CURLcode curl_global_init_mem(long flags,
|
||||||
|
curl_malloc_callback m,
|
||||||
|
curl_free_callback f,
|
||||||
|
curl_realloc_callback r,
|
||||||
|
curl_strdup_callback s,
|
||||||
|
curl_calloc_callback c);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NAME curl_global_cleanup()
|
* NAME curl_global_cleanup()
|
||||||
*
|
*
|
||||||
@@ -1090,7 +1091,6 @@ void curl_slist_free_all(struct curl_slist *);
|
|||||||
*/
|
*/
|
||||||
time_t curl_getdate(const char *p, const time_t *now);
|
time_t curl_getdate(const char *p, const time_t *now);
|
||||||
|
|
||||||
|
|
||||||
#define CURLINFO_STRING 0x100000
|
#define CURLINFO_STRING 0x100000
|
||||||
#define CURLINFO_LONG 0x200000
|
#define CURLINFO_LONG 0x200000
|
||||||
#define CURLINFO_DOUBLE 0x300000
|
#define CURLINFO_DOUBLE 0x300000
|
||||||
@@ -1140,7 +1140,7 @@ typedef enum {
|
|||||||
CURLCLOSEPOLICY_LEAST_TRAFFIC,
|
CURLCLOSEPOLICY_LEAST_TRAFFIC,
|
||||||
CURLCLOSEPOLICY_SLOWEST,
|
CURLCLOSEPOLICY_SLOWEST,
|
||||||
CURLCLOSEPOLICY_CALLBACK,
|
CURLCLOSEPOLICY_CALLBACK,
|
||||||
|
|
||||||
CURLCLOSEPOLICY_LAST /* last, never use this */
|
CURLCLOSEPOLICY_LAST /* last, never use this */
|
||||||
} curl_closepolicy;
|
} curl_closepolicy;
|
||||||
|
|
||||||
@@ -1162,7 +1162,7 @@ typedef enum {
|
|||||||
* the locking is just made to change the internal state of the share
|
* the locking is just made to change the internal state of the share
|
||||||
* itself.
|
* itself.
|
||||||
*/
|
*/
|
||||||
CURL_LOCK_DATA_SHARE,
|
CURL_LOCK_DATA_SHARE,
|
||||||
CURL_LOCK_DATA_COOKIE,
|
CURL_LOCK_DATA_COOKIE,
|
||||||
CURL_LOCK_DATA_DNS,
|
CURL_LOCK_DATA_DNS,
|
||||||
CURL_LOCK_DATA_SSL_SESSION,
|
CURL_LOCK_DATA_SSL_SESSION,
|
||||||
@@ -1193,6 +1193,7 @@ typedef enum {
|
|||||||
CURLSHE_BAD_OPTION, /* 1 */
|
CURLSHE_BAD_OPTION, /* 1 */
|
||||||
CURLSHE_IN_USE, /* 2 */
|
CURLSHE_IN_USE, /* 2 */
|
||||||
CURLSHE_INVALID, /* 3 */
|
CURLSHE_INVALID, /* 3 */
|
||||||
|
CURLSHE_NOMEM, /* out of memory */
|
||||||
CURLSHE_LAST /* never use */
|
CURLSHE_LAST /* never use */
|
||||||
} CURLSHcode;
|
} CURLSHcode;
|
||||||
|
|
||||||
@@ -1218,6 +1219,7 @@ CURLSHcode curl_share_cleanup(CURLSH *);
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
CURLVERSION_FIRST,
|
CURLVERSION_FIRST,
|
||||||
CURLVERSION_SECOND,
|
CURLVERSION_SECOND,
|
||||||
|
CURLVERSION_THIRD,
|
||||||
CURLVERSION_LAST /* never actually use this */
|
CURLVERSION_LAST /* never actually use this */
|
||||||
} CURLversion;
|
} CURLversion;
|
||||||
|
|
||||||
@@ -1226,7 +1228,7 @@ typedef enum {
|
|||||||
meant to be a built-in version number for what kind of struct the caller
|
meant to be a built-in version number for what kind of struct the caller
|
||||||
expects. If the struct ever changes, we redfine the NOW to another enum
|
expects. If the struct ever changes, we redfine the NOW to another enum
|
||||||
from above. */
|
from above. */
|
||||||
#define CURLVERSION_NOW CURLVERSION_SECOND
|
#define CURLVERSION_NOW CURLVERSION_THIRD
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CURLversion age; /* age of the returned struct */
|
CURLversion age; /* age of the returned struct */
|
||||||
@@ -1243,18 +1245,22 @@ typedef struct {
|
|||||||
/* The fields below this were added in CURLVERSION_SECOND */
|
/* The fields below this were added in CURLVERSION_SECOND */
|
||||||
const char *ares;
|
const char *ares;
|
||||||
int ares_num;
|
int ares_num;
|
||||||
|
|
||||||
|
/* This field was aded in CURLVERSION_THIRD */
|
||||||
|
const char *libidn;
|
||||||
} curl_version_info_data;
|
} curl_version_info_data;
|
||||||
|
|
||||||
#define CURL_VERSION_IPV6 (1<<0)
|
#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
|
||||||
#define CURL_VERSION_KERBEROS4 (1<<1)
|
#define CURL_VERSION_KERBEROS4 (1<<1) /* kerberos auth is supported */
|
||||||
#define CURL_VERSION_SSL (1<<2)
|
#define CURL_VERSION_SSL (1<<2) /* SSL options are present */
|
||||||
#define CURL_VERSION_LIBZ (1<<3)
|
#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */
|
||||||
#define CURL_VERSION_NTLM (1<<4)
|
#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */
|
||||||
#define CURL_VERSION_GSSNEGOTIATE (1<<5)
|
#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth support */
|
||||||
#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */
|
#define CURL_VERSION_DEBUG (1<<6) /* built with debug capabilities */
|
||||||
#define CURL_VERSION_ASYNCHDNS (1<<7)
|
#define CURL_VERSION_ASYNCHDNS (1<<7) /* asynchronous dns resolves */
|
||||||
#define CURL_VERSION_SPNEGO (1<<8)
|
#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth */
|
||||||
#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */
|
#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */
|
||||||
|
#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NAME curl_version_info()
|
* NAME curl_version_info()
|
||||||
@@ -1266,6 +1272,28 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
curl_version_info_data *curl_version_info(CURLversion);
|
curl_version_info_data *curl_version_info(CURLversion);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NAME curl_easy_strerror()
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* The curl_easy_strerror function may be used to turn a CURLcode value
|
||||||
|
* into the equivalent human readable error string. This is useful
|
||||||
|
* for printing meaningful error messages.
|
||||||
|
*/
|
||||||
|
const char *curl_easy_strerror(CURLcode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NAME curl_share_strerror()
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* The curl_share_strerror function may be used to turn a CURLSHcode value
|
||||||
|
* into the equivalent human readable error string. This is useful
|
||||||
|
* for printing meaningful error messages.
|
||||||
|
*/
|
||||||
|
const char *curl_share_strerror(CURLSHcode);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
55
include/curl/curlver.h
Normal file
55
include/curl/curlver.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
#ifndef __CURL_CURLVER_H
|
||||||
|
#define __CURL_CURLVER_H
|
||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2004, 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.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/* This header file contains nothing but libcurl version info, generated by
|
||||||
|
a script at release-time. This was made its own header file in 7.11.2 */
|
||||||
|
|
||||||
|
/* This is the version number of the libcurl package from which this header
|
||||||
|
file origins: */
|
||||||
|
#define LIBCURL_VERSION "7.12.0-CVS"
|
||||||
|
|
||||||
|
/* This is the numeric version of the libcurl version number, meant for easier
|
||||||
|
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
||||||
|
always follow this syntax:
|
||||||
|
|
||||||
|
0xXXYYZZ
|
||||||
|
|
||||||
|
Where XX, YY and ZZ are the main version, release and patch numbers in
|
||||||
|
hexadecimal. All three numbers are always represented using two digits. 1.2
|
||||||
|
would appear as "0x010200" while version 9.11.7 appears as "0x090b07".
|
||||||
|
|
||||||
|
This 6-digit hexadecimal number does not show pre-release number, and it is
|
||||||
|
always a greater number in a more recent release. It makes comparisons with
|
||||||
|
greater than and less than work.
|
||||||
|
*/
|
||||||
|
#define LIBCURL_VERSION_NUM 0x070c00
|
||||||
|
|
||||||
|
/* The numeric version number is also available "in parts" by using these
|
||||||
|
defines: */
|
||||||
|
#define LIBCURL_VERSION_MAJOR 7
|
||||||
|
#define LIBCURL_VERSION_MINOR 12
|
||||||
|
#define LIBCURL_VERSION_PATCH 0
|
||||||
|
|
||||||
|
#endif /* __CURL_CURLVER_H */
|
@@ -203,6 +203,17 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
|||||||
CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
||||||
int *msgs_in_queue);
|
int *msgs_in_queue);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NAME curl_multi_strerror()
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* The curl_multi_strerror function may be used to turn a CURLMcode value
|
||||||
|
* into the equivalent human readable error string. This is useful
|
||||||
|
* for printing meaningful error messages.
|
||||||
|
*/
|
||||||
|
const char *curl_multi_strerror(CURLMcode);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* end of extern "C" */
|
} /* end of extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,28 +1 @@
|
|||||||
#ifndef __CURL_TYPES_H
|
/* not used */
|
||||||
#define __CURL_TYPES_H
|
|
||||||
/***************************************************************************
|
|
||||||
* _ _ ____ _
|
|
||||||
* Project ___| | | | _ \| |
|
|
||||||
* / __| | | | |_) | |
|
|
||||||
* | (__| |_| | _ <| |___
|
|
||||||
* \___|\___/|_| \_\_____|
|
|
||||||
*
|
|
||||||
* Copyright (C) 1998 - 2004, 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.
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
***************************************************************************/
|
|
||||||
typedef void CURL;
|
|
||||||
typedef void CURLconnect;
|
|
||||||
|
|
||||||
#endif /* __CURL_TYPES_H */
|
|
||||||
|
112
lib/Makefile.am
112
lib/Makefile.am
@@ -1,17 +1,39 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2004, 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.
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||||
|
|
||||||
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
DSP = curllib.dsp
|
||||||
Makefile.vc6 Makefile.riscos libcurl.def curllib.dsp \
|
|
||||||
curllib.dsw config-vms.h config-win32.h config-riscos.h config-mac.h \
|
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
||||||
config.h.in ca-bundle.crt README.encoding README.memoryleak \
|
Makefile.vc6 Makefile.riscos libcurl.def $(DSP) curllib.dsw \
|
||||||
README.ares makefile.dj config.dj \
|
config-vms.h config-win32.h config-riscos.h config-mac.h config.h.in \
|
||||||
libcurl.framework.make libcurl.plist libcurl.rc \
|
ca-bundle.crt README.encoding README.memoryleak README.ares \
|
||||||
config-amigaos.h amigaos.c amigaos.h makefile.amiga config-netware.h \
|
README.curlx makefile.dj config.dj libcurl.framework.make \
|
||||||
Makefile.netware nwlib.c libcurl.imp
|
libcurl.plist libcurl.rc config-amigaos.h amigaos.c amigaos.h \
|
||||||
|
makefile.amiga config-netware.h Makefile.netware nwlib.c libcurl.imp \
|
||||||
|
msvcproj.head msvcproj.foot
|
||||||
|
|
||||||
|
CLEANFILES = $(DSP)
|
||||||
|
|
||||||
lib_LTLIBRARIES = libcurl.la
|
lib_LTLIBRARIES = libcurl.la
|
||||||
|
|
||||||
@@ -20,7 +42,7 @@ lib_LTLIBRARIES = libcurl.la
|
|||||||
# we use srcdir/lib for the lib-private header files
|
# we use srcdir/lib for the lib-private header files
|
||||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
|
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
|
||||||
|
|
||||||
VERSION=-version-info 2:2:0
|
VERSION=-version-info 3:0:0
|
||||||
|
|
||||||
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
||||||
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
||||||
@@ -38,16 +60,16 @@ VERSION=-version-info 2:2:0
|
|||||||
# that the current interface number gets larger faster.
|
# that the current interface number gets larger faster.
|
||||||
#
|
#
|
||||||
# 3.If the library source code has changed at all since the last update, then
|
# 3.If the library source code has changed at all since the last update, then
|
||||||
# increment revision (c:r:a becomes c:r+1:a).
|
# increment revision (c:r+1:a)
|
||||||
#
|
#
|
||||||
# 4.If any interfaces have been added, removed, or changed since the last
|
# 4.If any interfaces have been added, removed, or changed since the last
|
||||||
# update, increment current, and set revision to 0.
|
# update, increment current, and set revision to 0. (c+1:r=0:a)
|
||||||
#
|
#
|
||||||
# 5.If any interfaces have been added since the last public release, then
|
# 5.If any interfaces have been added since the last public release, then
|
||||||
# increment age.
|
# increment age. (c:r:a+1)
|
||||||
#
|
#
|
||||||
# 6.If any interfaces have been removed since the last public release, then
|
# 6.If any interfaces have been removed since the last public release, then
|
||||||
# set age to 0.
|
# set age to 0. (c:r:a=0)
|
||||||
#
|
#
|
||||||
|
|
||||||
if NO_UNDEFINED
|
if NO_UNDEFINED
|
||||||
@@ -63,22 +85,29 @@ endif
|
|||||||
|
|
||||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
|
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
|
||||||
|
|
||||||
libcurl_la_SOURCES = arpa_telnet.h file.c netrc.h timeval.c \
|
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h base64.h hostip.h \
|
||||||
base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c \
|
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
||||||
hostip.h progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c \
|
if2ip.h speedcheck.h urldata.h getdate.h ldap.h ssluse.h escape.h \
|
||||||
http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h \
|
telnet.h getinfo.h strequal.h security.h krb4.h memdebug.h \
|
||||||
getdate.c if2ip.h speedcheck.h urldata.h getdate.h ldap.c ssluse.c \
|
inet_ntoa_r.h http_chunks.h strtok.h connect.h llist.h hash.h \
|
||||||
version.c getenv.c ldap.h ssluse.h escape.c mprintf.c telnet.c escape.h \
|
content_encoding.h share.h md5.h http_digest.h http_negotiate.h \
|
||||||
netrc.c telnet.h getinfo.c getinfo.h transfer.c strequal.c \
|
http_ntlm.h ca-bundle.h inet_pton.h strtoofft.h strerror.h \
|
||||||
strequal.h easy.c security.h security.c krb4.c krb4.h memdebug.c \
|
inet_ntop.h curlx.h memory.h setup.h transfer.h
|
||||||
memdebug.h inet_ntoa_r.h http_chunks.c http_chunks.h strtok.c strtok.h \
|
|
||||||
connect.c connect.h llist.c llist.h hash.c hash.h multi.c \
|
|
||||||
content_encoding.c content_encoding.h share.c share.h http_digest.c \
|
|
||||||
md5.c md5.h http_digest.h http_negotiate.c http_negotiate.h \
|
|
||||||
http_ntlm.c http_ntlm.h ca-bundle.h inet_pton.c inet_pton.h \
|
|
||||||
strtoofft.c strtoofft.h
|
|
||||||
|
|
||||||
noinst_HEADERS = setup.h transfer.h
|
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
||||||
|
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \
|
||||||
|
getdate.c ldap.c ssluse.c version.c getenv.c escape.c mprintf.c \
|
||||||
|
telnet.c netrc.c getinfo.c transfer.c strequal.c easy.c security.c \
|
||||||
|
krb4.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c \
|
||||||
|
multi.c content_encoding.c share.c http_digest.c md5.c \
|
||||||
|
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
|
||||||
|
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
|
||||||
|
inet_ntop.c
|
||||||
|
|
||||||
|
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
||||||
|
|
||||||
|
WIN32SOURCES = $(CSOURCES)
|
||||||
|
WIN32HEADERS = $(HHEADERS) config-win32.h
|
||||||
|
|
||||||
BUILT_SOURCES = $(srcdir)/getdate.c $(top_builddir)/lib/ca-bundle.h
|
BUILT_SOURCES = $(srcdir)/getdate.c $(top_builddir)/lib/ca-bundle.h
|
||||||
|
|
||||||
@@ -110,3 +139,26 @@ install-data-hook:
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
chmod 0644 $(distdir)/ca-bundle.h
|
chmod 0644 $(distdir)/ca-bundle.h
|
||||||
echo "/* ca bundle path set in here*/" > $(distdir)/ca-bundle.h
|
echo "/* ca bundle path set in here*/" > $(distdir)/ca-bundle.h
|
||||||
|
|
||||||
|
DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
|
||||||
|
|
||||||
|
$(DSP): msvcproj.head msvcproj.foot Makefile.am
|
||||||
|
echo "creating $(DSP)"
|
||||||
|
@(cp msvcproj.head $(DSP); \
|
||||||
|
echo "# Begin Group \"Source Files\"" $(DSPOUT); \
|
||||||
|
for file in $(WIN32SOURCES); do \
|
||||||
|
echo "# Begin Source File" $(DSPOUT); \
|
||||||
|
echo "" $(DSPOUT); \
|
||||||
|
echo "SOURCE=.\\"$$file $(DSPOUT); \
|
||||||
|
echo "# End Source File" $(DSPOUT); \
|
||||||
|
done; \
|
||||||
|
echo "# End Group" $(DSPOUT); \
|
||||||
|
echo "# Begin Group \"Header Files\"" $(DSPOUT); \
|
||||||
|
for file in $(WIN32HEADERS); do \
|
||||||
|
echo "# Begin Source File" $(DSPOUT); \
|
||||||
|
echo "" $(DSPOUT); \
|
||||||
|
echo "SOURCE=.\\"$$file $(DSPOUT); \
|
||||||
|
echo "# End Source File" $(DSPOUT); \
|
||||||
|
done; \
|
||||||
|
echo "# End Group" $(DSPOUT); \
|
||||||
|
cat msvcproj.foot $(DSPOUT) )
|
||||||
|
@@ -12,7 +12,7 @@ AR = ar
|
|||||||
RM = rm -f
|
RM = rm -f
|
||||||
RANLIB = ranlib
|
RANLIB = ranlib
|
||||||
STRIP = strip -g
|
STRIP = strip -g
|
||||||
OPENSSL_PATH = ../../openssl-0.9.7c
|
OPENSSL_PATH = ../../openssl-0.9.7d
|
||||||
ZLIB_PATH = ../../zlib-1.2.1
|
ZLIB_PATH = ../../zlib-1.2.1
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
@@ -19,16 +19,7 @@
|
|||||||
# files in the "cfg" directory, but then the make file
|
# files in the "cfg" directory, but then the make file
|
||||||
# in \src would need to be changed.
|
# in \src would need to be changed.
|
||||||
#
|
#
|
||||||
##############################################################
|
# $Id: Makefile.vc6,v 1.17 2004/01/13 08:57:01 bagder Exp $
|
||||||
# CHANGE LOG
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# 05.11.2001 John Lask Initial Release
|
|
||||||
# 02.05.2002 Miklos Nemeth OPENSSL_PATH environment; no need
|
|
||||||
# for OpenSSL libraries when creating a
|
|
||||||
# static libcurl.lib
|
|
||||||
# 10.14.2003 Added a target release-libcurl-ssl-dll which
|
|
||||||
# is intended to allow static linking of libcurl with dynamic
|
|
||||||
# linking of openssl
|
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
LIB_NAME = libcurl
|
LIB_NAME = libcurl
|
||||||
@@ -37,18 +28,32 @@ LIB_NAME_DEBUG = libcurld
|
|||||||
OPENSSL_PATH = ../../openssl-0.9.7a
|
OPENSSL_PATH = ../../openssl-0.9.7a
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IFNDEF ZLIB_PATH
|
||||||
|
ZLIB_PATH = ../../zlib-1.1.4
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Use the high resolution time by default. Comment this out to use low
|
||||||
|
# resolution time and not require winmm.lib
|
||||||
|
USEMM_LIBS = YES
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
## Nothing more to do below this line!
|
## Nothing more to do below this line!
|
||||||
|
|
||||||
CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
|
CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
|
||||||
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
|
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
|
||||||
CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
|
CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
|
||||||
CFLAGS = /I "." /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
|
CFLAGSZLIB = /D "HAVE_ZLIB_H" /D "HAVE_ZLIB" /D "HAVE_LIBZ" /I "$(ZLIB_PATH)"
|
||||||
|
CFLAGS = /I "." /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
|
||||||
LNKDLL = link.exe /DLL /def:libcurl.def
|
LNKDLL = link.exe /DLL /def:libcurl.def
|
||||||
LNKLIB = link.exe /lib
|
LNKLIB = link.exe /lib
|
||||||
LFLAGS = /nologo
|
LFLAGS = /nologo
|
||||||
SSLLIBS = libeay32.lib ssleay32.lib
|
SSLLIBS = libeay32.lib ssleay32.lib
|
||||||
|
!IFDEF USEMM_LIBS
|
||||||
|
WINLIBS = wsock32.lib winmm.lib
|
||||||
|
!ELSE
|
||||||
|
WINLIBS = wsock32.lib
|
||||||
|
CFLAGS = $(CFLAGS) /D "WITHOUT_MM_LIB"
|
||||||
|
!ENDIF
|
||||||
# RSAglue.lib was formerly needed in the SSLLIBS
|
# RSAglue.lib was formerly needed in the SSLLIBS
|
||||||
CFGSET = FALSE
|
CFGSET = FALSE
|
||||||
|
|
||||||
@@ -63,6 +68,18 @@ CC = $(CCNODBG)
|
|||||||
CFGSET = TRUE
|
CFGSET = TRUE
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
######################
|
||||||
|
# release-zlib
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "release-zlib"
|
||||||
|
TARGET =$(LIB_NAME).lib
|
||||||
|
DIROBJ =.\$(CFG)
|
||||||
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||||
|
LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(TARGET)
|
||||||
|
CC = $(CCNODBG) $(CFLAGSZLIB)
|
||||||
|
CFGSET = TRUE
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# release-dll
|
# release-dll
|
||||||
|
|
||||||
@@ -94,19 +111,31 @@ CFGSET = TRUE
|
|||||||
TARGET =$(LIB_NAME).dll
|
TARGET =$(LIB_NAME).dll
|
||||||
DIROBJ =.\$(CFG)
|
DIROBJ =.\$(CFG)
|
||||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
||||||
LNK = $(LNKDLL) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
LNK = $(LNKDLL) $(SSLLIBS) $(WINLIBS) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
||||||
CC = $(CCNODBG) $(CFLAGSSSL)
|
CC = $(CCNODBG) $(CFLAGSSSL)
|
||||||
CFGSET = TRUE
|
CFGSET = TRUE
|
||||||
RESOURCE = $(DIROBJ)\libcurl.res
|
RESOURCE = $(DIROBJ)\libcurl.res
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
######################
|
||||||
|
# release-ssl-zlib
|
||||||
|
!IF "$(CFG)" == "release-ssl-zlib"
|
||||||
|
TARGET =$(LIB_NAME).lib
|
||||||
|
DIROBJ =.\$(CFG)
|
||||||
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32"
|
||||||
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||||
|
LNK = $(LNKLIB) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(TARGET)
|
||||||
|
CC = $(CCNODBG) $(CFLAGSSSL) $(CFLAGSZLIB)
|
||||||
|
CFGSET = TRUE
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# release-libcurl-ssl-dll
|
# release-libcurl-ssl-dll
|
||||||
!IF "$(CFG)" == "release-libcurl-ssl-dll"
|
!IF "$(CFG)" == "release-libcurl-ssl-dll"
|
||||||
TARGET =$(LIB_NAME).lib
|
TARGET =$(LIB_NAME).lib
|
||||||
DIROBJ =.\$(CFG)
|
DIROBJ =.\$(CFG)
|
||||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
||||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
LNK = $(LNKLIB) $(SSLLIBS) $(LFLAGSSSL) /out:$(TARGET)
|
||||||
CC = $(CCNODBG) $(CFLAGSSSL)
|
CC = $(CCNODBG) $(CFLAGSSSL)
|
||||||
CFGSET = TRUE
|
CFGSET = TRUE
|
||||||
RESOURCE = $(DIROBJ)\libcurl.res
|
RESOURCE = $(DIROBJ)\libcurl.res
|
||||||
@@ -147,6 +176,17 @@ CC = $(CCDEBUG) $(CFLAGSSSL)
|
|||||||
CFGSET = TRUE
|
CFGSET = TRUE
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
######################
|
||||||
|
# debug-zlib
|
||||||
|
!IF "$(CFG)" == "debug-zlib"
|
||||||
|
TARGET = $(LIB_NAME_DEBUG).lib
|
||||||
|
DIROBJ =.\$(CFG)
|
||||||
|
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||||
|
LNK = $(LNKLIB) $(LFLAGSZLIB) /out:$(TARGET)
|
||||||
|
CC = $(CCDEBUG) $(CFLAGSZLIB)
|
||||||
|
CFGSET = TRUE
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# debug-ssl-dll
|
# debug-ssl-dll
|
||||||
|
|
||||||
@@ -168,11 +208,14 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
|||||||
!MESSAGE where <config> is one of:
|
!MESSAGE where <config> is one of:
|
||||||
!MESSAGE release - release static library
|
!MESSAGE release - release static library
|
||||||
!MESSAGE release-dll - release dll
|
!MESSAGE release-dll - release dll
|
||||||
|
!MESSAGE release-zlib - release static library with zlib
|
||||||
!MESSAGE release-ssl - release static library with ssl
|
!MESSAGE release-ssl - release static library with ssl
|
||||||
|
!MESSAGE release-ssl-zlib - release static library with ssl and zlib
|
||||||
!MESSAGE release-ssl-dll - release dll library with ssl
|
!MESSAGE release-ssl-dll - release dll library with ssl
|
||||||
!MESSAGE release-libcurl-ssl-dll - static libcurl with shared ssl
|
!MESSAGE release-libcurl-ssl-dll - static libcurl with shared ssl
|
||||||
!MESSAGE debug - debug static library
|
!MESSAGE debug - debug static library
|
||||||
!MESSAGE debug-dll - debug dll
|
!MESSAGE debug-dll - debug dll
|
||||||
|
!MESSAGE debug-zlib - debug static library with zlib
|
||||||
!MESSAGE debug-ssl - debug static library with ssl
|
!MESSAGE debug-ssl - debug static library with ssl
|
||||||
!MESSAGE debug-ssl-dll - debug dll library with ssl
|
!MESSAGE debug-ssl-dll - debug dll library with ssl
|
||||||
!MESSAGE <target> can be left blank in which case all is assumed
|
!MESSAGE <target> can be left blank in which case all is assumed
|
||||||
@@ -197,6 +240,13 @@ X_OBJS= \
|
|||||||
$(DIROBJ)\getenv.obj \
|
$(DIROBJ)\getenv.obj \
|
||||||
$(DIROBJ)\inet_pton.obj \
|
$(DIROBJ)\inet_pton.obj \
|
||||||
$(DIROBJ)\hostip.obj \
|
$(DIROBJ)\hostip.obj \
|
||||||
|
$(DIROBJ)\hostasyn.obj \
|
||||||
|
$(DIROBJ)\hostsyn.obj \
|
||||||
|
$(DIROBJ)\hostares.obj \
|
||||||
|
$(DIROBJ)\hostthre.obj \
|
||||||
|
$(DIROBJ)\hostip4.obj \
|
||||||
|
$(DIROBJ)\hostip6.obj \
|
||||||
|
$(DIROBJ)\inet_ntop.obj \
|
||||||
$(DIROBJ)\if2ip.obj \
|
$(DIROBJ)\if2ip.obj \
|
||||||
$(DIROBJ)\mprintf.obj \
|
$(DIROBJ)\mprintf.obj \
|
||||||
$(DIROBJ)\netrc.obj \
|
$(DIROBJ)\netrc.obj \
|
||||||
@@ -222,6 +272,8 @@ X_OBJS= \
|
|||||||
$(DIROBJ)\http_negotiate.obj \
|
$(DIROBJ)\http_negotiate.obj \
|
||||||
$(DIROBJ)\http_ntlm.obj \
|
$(DIROBJ)\http_ntlm.obj \
|
||||||
$(DIROBJ)\md5.obj \
|
$(DIROBJ)\md5.obj \
|
||||||
|
$(DIROBJ)\strerror.obj \
|
||||||
|
$(DIROBJ)\content_encoding.obj \
|
||||||
$(RESOURCE)
|
$(RESOURCE)
|
||||||
|
|
||||||
all : $(TARGET)
|
all : $(TARGET)
|
||||||
|
@@ -5,56 +5,53 @@ $Id$
|
|||||||
| (__| |_| | _ <| |___
|
| (__| |_| | _ <| |___
|
||||||
\___|\___/|_| \_\_____|
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
How To Build libcurl to Use ares For Asynch Name Resolves
|
How To Build libcurl to Use c-ares For Asynch Name Resolves
|
||||||
=========================================================
|
===========================================================
|
||||||
|
|
||||||
ares:
|
c-ares:
|
||||||
ftp://athena-dist.mit.edu/pub/ATHENA/ares/ares-1.1.1.tar.gz
|
http://daniel.haxx.se/projects/c-ares/
|
||||||
http://curl.haxx.se/dev/ares-1.1.1.tar.gz
|
|
||||||
http://curl.sourceforge.net/dev/ares-1.1.1.tar.gz
|
|
||||||
http://curl.planetmirror.com/dev/ares-1.1.1.tar.gz
|
|
||||||
http://curl.tsuren.net/dev/ares-1.1.1.tar.gz
|
|
||||||
|
|
||||||
c-ares: (a patched and improved version of ares)
|
|
||||||
http://curl.haxx.se/beta/arescurl-1.0-pre1.tar.gz
|
|
||||||
|
|
||||||
NOTE
|
NOTE
|
||||||
libcurl works with ares 1.1.1, but several patches and improvements have
|
libcurl 7.11.1 builds with c-ares 1.1.0, but 7.11.2 and later require c-ares
|
||||||
been put into the c-ares package which has made it more portable and better
|
1.2.0 or alter.
|
||||||
working on several platforms.
|
|
||||||
|
|
||||||
Build ares
|
Once upon the time libcurl built fine with the "original" ares. That is no
|
||||||
==========
|
longer true. You need to use c-ares. c-ares is based on ares but improved.
|
||||||
|
|
||||||
1. unpack the ares archive
|
Build c-ares
|
||||||
2. cd ares-dir
|
============
|
||||||
|
|
||||||
|
1. unpack the c-ares archive
|
||||||
|
2. cd c-ares-dir
|
||||||
3. ./configure
|
3. ./configure
|
||||||
4. make
|
4. make
|
||||||
|
|
||||||
Build libcurl to use ares in the curl source tree
|
Build libcurl to use c-ares in the curl source tree
|
||||||
=================================================
|
===================================================
|
||||||
|
|
||||||
1. name the ares source directory 'ares' in the curl source directory
|
1. name the c-ares source directory 'ares' in the curl source directory
|
||||||
|
(if you have checked out the curl sources from CVS, you will already have
|
||||||
|
c-ares in a directory named ares).
|
||||||
2. ./configure --enable-ares
|
2. ./configure --enable-ares
|
||||||
3. make
|
3. make
|
||||||
|
|
||||||
Build libcurl to use an installed ares
|
Build libcurl to use an installed c-ares
|
||||||
======================================
|
========================================
|
||||||
|
|
||||||
1. ./configure --enable-ares=/path/to/ares/install
|
1. ./configure --enable-ares=/path/to/ares/install
|
||||||
2. make
|
2. make
|
||||||
|
|
||||||
Ares and ipv6
|
c-ares and ipv6
|
||||||
=============
|
===============
|
||||||
|
|
||||||
If the configure script enables IPv6 support you need to explicitly disable
|
If the configure script enables IPv6 support you need to explicitly disable
|
||||||
that (--disable-ipv6) since ares isn't IPv6 compatible (yet).
|
that (--disable-ipv6) since c-ares isn't IPv6 compatible (yet).
|
||||||
|
|
||||||
Ares on win32
|
c-ares on win32
|
||||||
=============
|
===============
|
||||||
(description brought by Dominick Meglio)
|
(description brought by Dominick Meglio)
|
||||||
|
|
||||||
First I compiled curl-ares. I changed the default C runtime library to be the
|
First I compiled c-ares. I changed the default C runtime library to be the
|
||||||
single-threaded rather than the multi-threaded (this seems to be required to
|
single-threaded rather than the multi-threaded (this seems to be required to
|
||||||
prevent linking errors later on). Then I simply build the areslib project (the
|
prevent linking errors later on). Then I simply build the areslib project (the
|
||||||
other projects adig/ahost seem to fail under MSVC).
|
other projects adig/ahost seem to fail under MSVC).
|
||||||
|
62
lib/README.curlx
Normal file
62
lib/README.curlx
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
$Id$
|
||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
Source Code Functions Apps Might Use
|
||||||
|
====================================
|
||||||
|
|
||||||
|
The libcurl source code offers a few functions by source only. They are not
|
||||||
|
part of the official libcurl API, but the source files might be useful for
|
||||||
|
others so apps can optionally compile/build with these sources to gain
|
||||||
|
additional functions.
|
||||||
|
|
||||||
|
We provide them through a single header file for easy access for apps:
|
||||||
|
"curlx.h"
|
||||||
|
|
||||||
|
curlx_strtoofft()
|
||||||
|
|
||||||
|
A macro that converts a string containing a number to a curl_off_t number.
|
||||||
|
This might use the curlx_strtoll() function which is provided as source
|
||||||
|
code in strtoofft.c. Note that the function is only provided if no
|
||||||
|
strtoll() (or equivalent) function exist on your platform. If curl_off_t
|
||||||
|
is only a 32 bit number on your platform, this macro uses strtol().
|
||||||
|
|
||||||
|
curlx_tvnow()
|
||||||
|
|
||||||
|
returns a struct timeval for the current time.
|
||||||
|
|
||||||
|
curlx_tvdiff()
|
||||||
|
|
||||||
|
returns the difference between two timeval structs, in number of
|
||||||
|
milliseconds.
|
||||||
|
|
||||||
|
curlx_tvdiff_secs()
|
||||||
|
|
||||||
|
returns the same as curlx_tvdiff but with full usec resolution (as a
|
||||||
|
double)
|
||||||
|
|
||||||
|
FUTURE
|
||||||
|
======
|
||||||
|
|
||||||
|
Several functions will be removed from the public curl_ name space in a
|
||||||
|
future libcurl release. They will then only become available as curlx_
|
||||||
|
functions instead. To make the transition easier, we already today provide
|
||||||
|
these functions with the curlx_ prefix to allow sources to get built properly
|
||||||
|
with the new function names. The functions this concerns are:
|
||||||
|
|
||||||
|
curlx_getenv
|
||||||
|
curlx_strequal
|
||||||
|
curlx_strnequal
|
||||||
|
curlx_mvsnprintf
|
||||||
|
curlx_msnprintf
|
||||||
|
curlx_maprintf
|
||||||
|
curlx_mvaprintf
|
||||||
|
curlx_msprintf
|
||||||
|
curlx_mprintf
|
||||||
|
curlx_mfprintf
|
||||||
|
curlx_mvsprintf
|
||||||
|
curlx_mvprintf
|
||||||
|
curlx_mvfprintf
|
@@ -41,10 +41,11 @@
|
|||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
|
#include "memory.h"
|
||||||
|
|
||||||
#ifdef CURLDEBUG
|
/* include memdebug.h last */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
static void decodeQuantum(unsigned char *dest, const char *src)
|
static void decodeQuantum(unsigned char *dest, const char *src)
|
||||||
{
|
{
|
||||||
@@ -131,6 +132,8 @@ size_t Curl_base64_encode(const char *inp, size_t insize, char **outptr)
|
|||||||
|
|
||||||
char *indata = (char *)inp;
|
char *indata = (char *)inp;
|
||||||
|
|
||||||
|
*outptr = NULL; /* set to NULL in case of failure before we reach the end */
|
||||||
|
|
||||||
if(0 == insize)
|
if(0 == insize)
|
||||||
insize = strlen(indata);
|
insize = strlen(indata);
|
||||||
|
|
||||||
|
@@ -25,10 +25,12 @@
|
|||||||
#define HAVE_IO_H 1
|
#define HAVE_IO_H 1
|
||||||
#define HAVE_IOCTLSOCKET 1
|
#define HAVE_IOCTLSOCKET 1
|
||||||
#define HAVE_INET_PTON 1
|
#define HAVE_INET_PTON 1
|
||||||
|
#define HAVE_LONGLONG 1
|
||||||
#define HAVE_MALLOC_H 1
|
#define HAVE_MALLOC_H 1
|
||||||
#define HAVE_MEMORY_H 1
|
#define HAVE_MEMORY_H 1
|
||||||
#define HAVE_NETDB_H 1
|
#define HAVE_NETDB_H 1
|
||||||
#define HAVE_NETINET_IN_H 1
|
#define HAVE_NETINET_IN_H 1
|
||||||
|
#define HAVE_NETINET_TCP_H 1
|
||||||
#define HAVE_NET_IF_H 1
|
#define HAVE_NET_IF_H 1
|
||||||
#define HAVE_PERROR 1
|
#define HAVE_PERROR 1
|
||||||
#define HAVE_SELECT 1
|
#define HAVE_SELECT 1
|
||||||
@@ -38,12 +40,14 @@
|
|||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SIGACTION 1
|
||||||
#define HAVE_SIGSETJMP 1
|
#define HAVE_SIGSETJMP 1
|
||||||
#define HAVE_SOCKET 1
|
#define HAVE_SOCKET 1
|
||||||
|
#define HAVE_SPNEGO 1
|
||||||
#define HAVE_STRCASECMP 1
|
#define HAVE_STRCASECMP 1
|
||||||
#define HAVE_STRDUP 1
|
#define HAVE_STRDUP 1
|
||||||
#define HAVE_STRFTIME 1
|
#define HAVE_STRFTIME 1
|
||||||
#define HAVE_STRICMP 1
|
#define HAVE_STRICMP 1
|
||||||
#define HAVE_STRSTR 1
|
#define HAVE_STRSTR 1
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
|
#define HAVE_SYS_IOCTL_H 1
|
||||||
#define HAVE_SYS_SOCKET_H 1
|
#define HAVE_SYS_SOCKET_H 1
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
@@ -53,9 +57,13 @@
|
|||||||
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
||||||
#define HAVE_VPRINTF 1
|
#define HAVE_VPRINTF 1
|
||||||
|
|
||||||
|
#if (DJGPP_MINOR >= 4)
|
||||||
|
#define HAVE_STRLCAT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
#define SIZEOF_LONG_DOUBLE 16
|
#define SIZEOF_LONG_DOUBLE 16
|
||||||
#define SIZEOF_LONG_LONG 8
|
#define SIZEOF_CURL_OFF_T 4 /* no huge file support */
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
#define TIME_WITH_SYS_TIME 1
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user