Compare commits
501 Commits
curl-7_16_
...
curl-7_17_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3bc11344de | ||
![]() |
3dbe708308 | ||
![]() |
621709c623 | ||
![]() |
9e241864e3 | ||
![]() |
cf613fdba4 | ||
![]() |
e6addcf624 | ||
![]() |
9e88343a17 | ||
![]() |
1ce732e9d6 | ||
![]() |
cc618e761c | ||
![]() |
24db40de7c | ||
![]() |
7350f9851a | ||
![]() |
d030dfa6e2 | ||
![]() |
14d6db0873 | ||
![]() |
0ff311aa1a | ||
![]() |
8147c3659d | ||
![]() |
73e91ce20c | ||
![]() |
8780ff879c | ||
![]() |
6fd1cfeab1 | ||
![]() |
9d0533056c | ||
![]() |
6c4f317f7f | ||
![]() |
21ed69b51e | ||
![]() |
3b819b3064 | ||
![]() |
3fa60164af | ||
![]() |
ac6e0501c6 | ||
![]() |
4f17c58315 | ||
![]() |
f6251734fc | ||
![]() |
9f44a95522 | ||
![]() |
4b60c3e9d3 | ||
![]() |
5d4c981e13 | ||
![]() |
da4a776758 | ||
![]() |
1b66c1da6c | ||
![]() |
5cb2ee878c | ||
![]() |
8cf0814a14 | ||
![]() |
523767660c | ||
![]() |
327c0d6b1c | ||
![]() |
870842ccee | ||
![]() |
68b215157f | ||
![]() |
a892cf2c12 | ||
![]() |
7cba40b218 | ||
![]() |
d994fcf2b1 | ||
![]() |
975fafdc49 | ||
![]() |
9537580ba2 | ||
![]() |
bc0adcef1f | ||
![]() |
7ffae92daf | ||
![]() |
abca03cf36 | ||
![]() |
374f0214b6 | ||
![]() |
4945b2454d | ||
![]() |
a5cb022407 | ||
![]() |
feb63efc31 | ||
![]() |
4cf3ad07e5 | ||
![]() |
557cc55f6f | ||
![]() |
2d8dba388b | ||
![]() |
91fd2c3bcd | ||
![]() |
d38891c950 | ||
![]() |
381e372939 | ||
![]() |
c347db2e0a | ||
![]() |
232a4553b8 | ||
![]() |
014f1bea9a | ||
![]() |
5b4f50857a | ||
![]() |
6f10a718e4 | ||
![]() |
658de40930 | ||
![]() |
2c06e7f8ef | ||
![]() |
fa1c916943 | ||
![]() |
b132e865b9 | ||
![]() |
77431568d2 | ||
![]() |
e16c1b8e28 | ||
![]() |
1a8d8aa227 | ||
![]() |
d4c4fd6272 | ||
![]() |
acb905231d | ||
![]() |
c915eac93c | ||
![]() |
72e675caee | ||
![]() |
e347cff0e4 | ||
![]() |
d79fdbc46e | ||
![]() |
ab13c2f814 | ||
![]() |
138ca334f9 | ||
![]() |
1aa82decea | ||
![]() |
014fe6971e | ||
![]() |
3217809294 | ||
![]() |
f3c7adcb54 | ||
![]() |
dcf698dc74 | ||
![]() |
54117be639 | ||
![]() |
5a79532aee | ||
![]() |
29ac001aa6 | ||
![]() |
ccba0d10b6 | ||
![]() |
7f7e42732d | ||
![]() |
ca410ec2ca | ||
![]() |
e5d8693865 | ||
![]() |
46c92c0b80 | ||
![]() |
7b5d148b1f | ||
![]() |
f4bc326670 | ||
![]() |
327598e7b4 | ||
![]() |
11caaad5f9 | ||
![]() |
3e0845e182 | ||
![]() |
a2c7abea6c | ||
![]() |
2f8f12e82e | ||
![]() |
5cdcc2b3aa | ||
![]() |
652e2cf57c | ||
![]() |
8ee5e95ab1 | ||
![]() |
22c61d8da6 | ||
![]() |
1b88990cbb | ||
![]() |
df3e8e19c1 | ||
![]() |
44dc36cc8f | ||
![]() |
6d3701318d | ||
![]() |
d0edb47896 | ||
![]() |
b238e0b1b4 | ||
![]() |
3f62bfb61d | ||
![]() |
c7a66d5af4 | ||
![]() |
1866b95b7f | ||
![]() |
668c204970 | ||
![]() |
af2d899d6b | ||
![]() |
d5ed9f787f | ||
![]() |
259f27b09f | ||
![]() |
c1b9356081 | ||
![]() |
c669e1ae45 | ||
![]() |
10203cada9 | ||
![]() |
58b0415d36 | ||
![]() |
ad9cb40b6f | ||
![]() |
2e60ca382d | ||
![]() |
25920f4a14 | ||
![]() |
160c302933 | ||
![]() |
dddc8e3374 | ||
![]() |
bccb1ee7cd | ||
![]() |
26af759732 | ||
![]() |
87fc4ad919 | ||
![]() |
b214298960 | ||
![]() |
1926f4573d | ||
![]() |
7fe65aaf5b | ||
![]() |
0d3d84e3ff | ||
![]() |
e789a3802c | ||
![]() |
4aabbc5ac2 | ||
![]() |
e7a50e37d6 | ||
![]() |
9fa05db83b | ||
![]() |
7ed58c4636 | ||
![]() |
f2f7c18245 | ||
![]() |
efaab37698 | ||
![]() |
869319ce4a | ||
![]() |
252f16db02 | ||
![]() |
72f5d6ba46 | ||
![]() |
5ec786b02e | ||
![]() |
035ee257c8 | ||
![]() |
188b08ca55 | ||
![]() |
6f750f3b57 | ||
![]() |
5a6dcdc36c | ||
![]() |
59c16a570f | ||
![]() |
50c10aa5bf | ||
![]() |
006878686c | ||
![]() |
bd100b2a51 | ||
![]() |
5b1bbffdff | ||
![]() |
16710a1c9b | ||
![]() |
ba5c71b79b | ||
![]() |
f3799462c2 | ||
![]() |
f01c6e51f4 | ||
![]() |
21d62118dc | ||
![]() |
de55038e33 | ||
![]() |
ea908c23ae | ||
![]() |
844cbc701a | ||
![]() |
f1fa7b8ba4 | ||
![]() |
86ff3194fa | ||
![]() |
d460b601f9 | ||
![]() |
48a06d1a7b | ||
![]() |
813a1107f4 | ||
![]() |
b3461bab1d | ||
![]() |
5ecd56d964 | ||
![]() |
cc44fb1dc8 | ||
![]() |
77b0efdbc2 | ||
![]() |
68653bcbdd | ||
![]() |
9af807a5ce | ||
![]() |
4bbcc47f3f | ||
![]() |
8ab495a088 | ||
![]() |
84e7bb85b1 | ||
![]() |
4fc7e13a98 | ||
![]() |
b465750041 | ||
![]() |
37dc0fa519 | ||
![]() |
000fdc6b99 | ||
![]() |
594fc0411e | ||
![]() |
94fcb4b09d | ||
![]() |
1a0034ac34 | ||
![]() |
e3377e637a | ||
![]() |
2ab854cafd | ||
![]() |
4a2f0fb2be | ||
![]() |
dca3564cfb | ||
![]() |
9d183bb7b1 | ||
![]() |
c7db74fe73 | ||
![]() |
5251c45187 | ||
![]() |
d9b5f327bf | ||
![]() |
ca1356702a | ||
![]() |
89d119646d | ||
![]() |
989dd9c34a | ||
![]() |
1d728aae2a | ||
![]() |
98b9349be7 | ||
![]() |
4706a93341 | ||
![]() |
b85b56a73d | ||
![]() |
1da3d402f6 | ||
![]() |
1da3192d2d | ||
![]() |
dab569d76c | ||
![]() |
598c589359 | ||
![]() |
15c8219340 | ||
![]() |
5ae21ebde9 | ||
![]() |
c7e0d8c30b | ||
![]() |
fee4f8c86d | ||
![]() |
1261c3feba | ||
![]() |
7fc300d5dc | ||
![]() |
88ce03e945 | ||
![]() |
5bed99c97d | ||
![]() |
46c699c483 | ||
![]() |
f7d6e147f1 | ||
![]() |
aad1d3ce14 | ||
![]() |
cf5378b366 | ||
![]() |
fea938cbcb | ||
![]() |
a67c8b4698 | ||
![]() |
49ce3e5160 | ||
![]() |
4a728747e6 | ||
![]() |
f5a6355172 | ||
![]() |
ffff8ddbef | ||
![]() |
cf86f8cb78 | ||
![]() |
a53ba060c8 | ||
![]() |
72bb5854f7 | ||
![]() |
0de56e5535 | ||
![]() |
0878b14f79 | ||
![]() |
7d56f35388 | ||
![]() |
d12759c73e | ||
![]() |
c0095d6dd9 | ||
![]() |
6a88eab067 | ||
![]() |
a4f36558fc | ||
![]() |
5e1cd407a3 | ||
![]() |
2a1345ae9f | ||
![]() |
cf61c8d659 | ||
![]() |
c39690486c | ||
![]() |
814b471d55 | ||
![]() |
5119fb16d6 | ||
![]() |
dc2c70be07 | ||
![]() |
19631f5d5f | ||
![]() |
a8d6b40736 | ||
![]() |
8026d94c07 | ||
![]() |
93bd512357 | ||
![]() |
04d3a8c714 | ||
![]() |
4b1782c371 | ||
![]() |
f84642197f | ||
![]() |
ec1b7a0eea | ||
![]() |
4b0e48cb4e | ||
![]() |
41df67fc2c | ||
![]() |
932d38323f | ||
![]() |
74ad8516d7 | ||
![]() |
ed4a16dbd1 | ||
![]() |
e2bac4fe6f | ||
![]() |
836ffbfc22 | ||
![]() |
7fd4f82a45 | ||
![]() |
598bc3968e | ||
![]() |
29357151af | ||
![]() |
6606ae6fe0 | ||
![]() |
9f21f74fbd | ||
![]() |
3760180320 | ||
![]() |
056af4c9ac | ||
![]() |
07bf3c86b6 | ||
![]() |
4182803bc2 | ||
![]() |
7509ef6b4e | ||
![]() |
70f8068d4d | ||
![]() |
a7513a8521 | ||
![]() |
3f7e541415 | ||
![]() |
f7e9a21c53 | ||
![]() |
f1537d45ca | ||
![]() |
5a051617f3 | ||
![]() |
55cd28283c | ||
![]() |
924665c84c | ||
![]() |
fcfffbe2f2 | ||
![]() |
54967d2a3a | ||
![]() |
667fd9a60b | ||
![]() |
892a24f4c4 | ||
![]() |
f7676e9667 | ||
![]() |
8727803cf8 | ||
![]() |
73e13ef19d | ||
![]() |
e983cd5cd3 | ||
![]() |
ca3e5a6322 | ||
![]() |
c4931601c6 | ||
![]() |
857492ac9e | ||
![]() |
afdfa4bed2 | ||
![]() |
3fc6faf1ae | ||
![]() |
c8a47bf662 | ||
![]() |
aed0cc6f2a | ||
![]() |
d500c468fc | ||
![]() |
5df5a2aa54 | ||
![]() |
9ca688c8e7 | ||
![]() |
8edbe262d9 | ||
![]() |
4cd7f85410 | ||
![]() |
edd35cab5c | ||
![]() |
a2060effed | ||
![]() |
33b9daaa4c | ||
![]() |
62f0f5571d | ||
![]() |
7a360de49d | ||
![]() |
1be4557694 | ||
![]() |
6a21738704 | ||
![]() |
974fa1242a | ||
![]() |
3dff58b3aa | ||
![]() |
abf8589f0d | ||
![]() |
b8d006b9d7 | ||
![]() |
af4edf10f5 | ||
![]() |
0f9e209534 | ||
![]() |
2aed8946b0 | ||
![]() |
03b03f7b60 | ||
![]() |
a1b650ad7b | ||
![]() |
d978f85d55 | ||
![]() |
6e7f47da5b | ||
![]() |
277bab0c7b | ||
![]() |
fc3c5dae87 | ||
![]() |
891dffb528 | ||
![]() |
f0b361ecc1 | ||
![]() |
df7eed16dd | ||
![]() |
61db4f3e2a | ||
![]() |
fe85ae15f3 | ||
![]() |
cc26cc5dcd | ||
![]() |
eb965e2a13 | ||
![]() |
4e35395d0e | ||
![]() |
b61b420cb8 | ||
![]() |
b0aa11fde7 | ||
![]() |
b691102ec7 | ||
![]() |
2785fe7f61 | ||
![]() |
db5d4bd811 | ||
![]() |
dc3b3c6916 | ||
![]() |
82d3f97659 | ||
![]() |
235632ed2c | ||
![]() |
68330c86e7 | ||
![]() |
f37dc9168a | ||
![]() |
17798ed740 | ||
![]() |
05ba9f9fcd | ||
![]() |
96f4af4db9 | ||
![]() |
3ec7f8a25a | ||
![]() |
375cdf89ad | ||
![]() |
ab7e7144ef | ||
![]() |
6f59e19b91 | ||
![]() |
7800b56dc8 | ||
![]() |
73c13220ee | ||
![]() |
99e0597c7b | ||
![]() |
3247ac1918 | ||
![]() |
c45d44fee9 | ||
![]() |
1e718a515a | ||
![]() |
d23d686de2 | ||
![]() |
c8677e9d3f | ||
![]() |
a32eaffa77 | ||
![]() |
1dcb99f0f7 | ||
![]() |
03bc2d34da | ||
![]() |
477e27f99d | ||
![]() |
6a84d492f1 | ||
![]() |
873d95a34c | ||
![]() |
1500e95839 | ||
![]() |
4f8ebd1673 | ||
![]() |
cd4e6fbcac | ||
![]() |
2fd2ca9dac | ||
![]() |
82d6240e7d | ||
![]() |
ad80490711 | ||
![]() |
38b490a310 | ||
![]() |
2ea052336f | ||
![]() |
3b9eefca89 | ||
![]() |
073a6cea45 | ||
![]() |
345ffd1163 | ||
![]() |
f0ffb35d55 | ||
![]() |
b4d2fbae6d | ||
![]() |
42a2138d11 | ||
![]() |
e86dfd9688 | ||
![]() |
a466b31574 | ||
![]() |
48064f8dee | ||
![]() |
e71378d3c8 | ||
![]() |
90d40aff72 | ||
![]() |
30808dca40 | ||
![]() |
8629620b1c | ||
![]() |
25d2a27c64 | ||
![]() |
b084dc8760 | ||
![]() |
2ae9536d32 | ||
![]() |
f5713dbb2e | ||
![]() |
b10ff9791b | ||
![]() |
86a25239ec | ||
![]() |
4c663ba9a8 | ||
![]() |
713c9f8602 | ||
![]() |
14b9b823e6 | ||
![]() |
6a674ded0e | ||
![]() |
2faba57c85 | ||
![]() |
79d59ec97b | ||
![]() |
a49e78d9b7 | ||
![]() |
9583b51d80 | ||
![]() |
670273968c | ||
![]() |
b6820b2674 | ||
![]() |
b9a6dfab03 | ||
![]() |
8bd7197a8f | ||
![]() |
ebb5e1db4b | ||
![]() |
4702807da8 | ||
![]() |
fe1fe64fd4 | ||
![]() |
9d904ee41b | ||
![]() |
fcc3e2ca34 | ||
![]() |
c25da51913 | ||
![]() |
05ab8d291c | ||
![]() |
70b1900dd1 | ||
![]() |
380e132da3 | ||
![]() |
f2eb3c1f79 | ||
![]() |
96c093f27c | ||
![]() |
a9d49769ff | ||
![]() |
d7616d8a0a | ||
![]() |
826bbfc01c | ||
![]() |
250f9670b7 | ||
![]() |
ed4936fd30 | ||
![]() |
4dd2628093 | ||
![]() |
8479785620 | ||
![]() |
0427e94465 | ||
![]() |
09fd3b4935 | ||
![]() |
3fef839f75 | ||
![]() |
ea43bb013b | ||
![]() |
b0a4c992e7 | ||
![]() |
85707460e5 | ||
![]() |
41ba7666f0 | ||
![]() |
4367e0513a | ||
![]() |
ed998270aa | ||
![]() |
1b7f00b2a6 | ||
![]() |
ad19f95f15 | ||
![]() |
bcfe3cb231 | ||
![]() |
805a5dcac8 | ||
![]() |
0b67ee7bad | ||
![]() |
9298037639 | ||
![]() |
f7472075d7 | ||
![]() |
9f72db13c4 | ||
![]() |
acc4868b78 | ||
![]() |
1afb67e31b | ||
![]() |
2f0539d880 | ||
![]() |
6f7d0a7cbd | ||
![]() |
3d513f7ab1 | ||
![]() |
6c8e6549d0 | ||
![]() |
eec105daba | ||
![]() |
19a80add95 | ||
![]() |
93844f64ef | ||
![]() |
60588b2455 | ||
![]() |
5187faeeb9 | ||
![]() |
1228ec9fbb | ||
![]() |
717adfeb96 | ||
![]() |
503557e5ce | ||
![]() |
f611f42dcf | ||
![]() |
7a0e0c36c5 | ||
![]() |
61edee979f | ||
![]() |
7a343a3f60 | ||
![]() |
b4d3c4a76c | ||
![]() |
f213d0db98 | ||
![]() |
6e835ef3aa | ||
![]() |
ed8cb57151 | ||
![]() |
9bdb05b4d6 | ||
![]() |
94b253fde7 | ||
![]() |
61d7e720a5 | ||
![]() |
17507eac85 | ||
![]() |
bc1ae973da | ||
![]() |
6a35841b2e | ||
![]() |
28dde78dde | ||
![]() |
37171809f6 | ||
![]() |
3398eca7c3 | ||
![]() |
3616912d22 | ||
![]() |
0abccc676d | ||
![]() |
a93af43974 | ||
![]() |
0bbc759c0c | ||
![]() |
56a5c49ac0 | ||
![]() |
02267eba4c | ||
![]() |
cea9695bcf | ||
![]() |
92039629c7 | ||
![]() |
c8d3327e92 | ||
![]() |
043070f90e | ||
![]() |
36626c4b6e | ||
![]() |
7f33aae067 | ||
![]() |
61022f3817 | ||
![]() |
bf648fcfc3 | ||
![]() |
b0e909329e | ||
![]() |
ae3d5949b8 | ||
![]() |
c234b9d04b | ||
![]() |
7a86740afd | ||
![]() |
8e719e3ef5 | ||
![]() |
66fc5498d2 | ||
![]() |
f30ae93a1f | ||
![]() |
365e8eb78e | ||
![]() |
76627b322e | ||
![]() |
827228bd69 | ||
![]() |
69c5506b69 | ||
![]() |
3a2e623fc8 | ||
![]() |
8aa9f01ed8 | ||
![]() |
b0b6a853f6 | ||
![]() |
0563a7a923 | ||
![]() |
945ba7cb7e | ||
![]() |
e3dab1bea2 | ||
![]() |
9c369c695d | ||
![]() |
011ccbc31a | ||
![]() |
f1596698ae | ||
![]() |
c60b52ab43 | ||
![]() |
71a0d50f48 | ||
![]() |
8d2a0fe85b | ||
![]() |
b039d883e5 | ||
![]() |
b3401ddbad | ||
![]() |
038fe54e21 | ||
![]() |
4b5a65455e | ||
![]() |
2566a5d4da | ||
![]() |
c38c339480 | ||
![]() |
ea74b4b8e1 | ||
![]() |
2364066be0 | ||
![]() |
b36376e12d | ||
![]() |
8aae15b630 | ||
![]() |
88bf2a2dc7 | ||
![]() |
45847c5324 | ||
![]() |
70cce4cddd | ||
![]() |
42c0ac2008 | ||
![]() |
70ddabbfb0 | ||
![]() |
e3716938bd |
835
CHANGES.1999
835
CHANGES.1999
@@ -1,835 +0,0 @@
|
|||||||
Daniel (28 December 1999):
|
|
||||||
- Tim Verhoeven correctly identified that curl
|
|
||||||
doesn't support URL formatted file names when getting ftp. Now, there's a
|
|
||||||
problem with getting very weird file names off FTP servers. RFC 959 defines
|
|
||||||
that the file name syntax to use should be the same as in the native OS of
|
|
||||||
the server. Since we don't know the peer server system we currently just
|
|
||||||
translate the URL syntax into plain letters. It is still better and with
|
|
||||||
the solaris 2.6-supplied ftp server it works with spaces in the file names.
|
|
||||||
|
|
||||||
Daniel (27 December 1999):
|
|
||||||
- When curl parsed cookies straight off a remote site, it corrupted the input
|
|
||||||
data, which, if the downloaded headers were stored made very odd characters
|
|
||||||
in the saved data. Correctly identified and reported by Paul Harrington.
|
|
||||||
|
|
||||||
Daniel (13 December 1999):
|
|
||||||
- General cleanups in the library interface. There had been some bad kludges
|
|
||||||
added during times of stress and I did my best to clean them off. It was
|
|
||||||
both regarding the lib API as well as include file confusions.
|
|
||||||
|
|
||||||
Daniel (3 December 1999):
|
|
||||||
- A small --stderr bug was reported by Eetu Ojanen...
|
|
||||||
|
|
||||||
- who also brought the suggestion of extending the -X flag to ftp list as
|
|
||||||
well. So, now it is and the long option is now --request instead. It is
|
|
||||||
only for ftp list for now (and the former http stuff too of course).
|
|
||||||
|
|
||||||
Lars J. Aas (24 November 1999):
|
|
||||||
- Patched curl to compile and build under BeOS. Doesn't work yet though!
|
|
||||||
|
|
||||||
- Corrected the Makefile.am files to allow putting object files in
|
|
||||||
different directories than the sources.
|
|
||||||
|
|
||||||
Version 6.3.1
|
|
||||||
|
|
||||||
Daniel (23 November 1999):
|
|
||||||
- I've had this major disk crash. My good old trust-worthy source disk died
|
|
||||||
along with the machine that hosted it. Thank goodness most of all the
|
|
||||||
things I've done are either backed up elsewhere or stored in this CVS
|
|
||||||
server!
|
|
||||||
|
|
||||||
- Michael S. Steuer pointed out a bug in the -F handling
|
|
||||||
that made curl hang if you posted an empty variable such as '-F name='. It
|
|
||||||
was one of those old bugs that never have worked properly...
|
|
||||||
|
|
||||||
- Jason Baietto pointed out a general flaw in the HTTP
|
|
||||||
download. Curl didn't complain if it was prematurely aborted before the
|
|
||||||
entire download was completed. It does now.
|
|
||||||
|
|
||||||
Daniel (19 November 1999):
|
|
||||||
- Chris Maltby very accurately criticized the lack of
|
|
||||||
return code checks on the fwrite() calls. I did a thorough check for all
|
|
||||||
occurrences and corrected this.
|
|
||||||
|
|
||||||
Daniel (17 November 1999):
|
|
||||||
- Paul Harrington pointed out that the -m/--max-time option
|
|
||||||
doesn't work for the slow system calls like gethostbyname()... I don't have
|
|
||||||
any good fix yet, just a slightly less bad one that makes curl exit hard
|
|
||||||
when the timeout is reached.
|
|
||||||
|
|
||||||
- Bjorn Reese helped me point out a possible problem that might be the reason
|
|
||||||
why Thomas Hurst experience problems in his Amiga version.
|
|
||||||
|
|
||||||
Daniel (12 November 1999):
|
|
||||||
- I found a crash in the new cookie file parser. It crashed when you gave
|
|
||||||
a plain http header file as input...
|
|
||||||
|
|
||||||
Version 6.3
|
|
||||||
|
|
||||||
Daniel (10 November 1999):
|
|
||||||
- I kind of found out that the HTTP time-conditional GETs (-z) aren't always
|
|
||||||
respected by the web server and the document is therefore sent in whole
|
|
||||||
again, even though it doesn't match the requested condition. After reading
|
|
||||||
section 13.3.4 of RFC 2616, I think I'm doing the right thing now when I do
|
|
||||||
my own check as well. If curl thinks the condition isn't met, the transfer
|
|
||||||
is aborted prematurely (after all the headers have been received).
|
|
||||||
|
|
||||||
- After comments from Robert Linden I also rewrote some parts of the man page
|
|
||||||
to better describe how the -F works.
|
|
||||||
|
|
||||||
- Michael Anti put up a new curl download mirror in
|
|
||||||
China: http://www.pshowing.com/curl/
|
|
||||||
|
|
||||||
- I added the list of download mirrors to the README file
|
|
||||||
|
|
||||||
- I did add more explanations to the man page
|
|
||||||
|
|
||||||
Daniel (8 November 1999):
|
|
||||||
- I made the -b/--cookie option capable of reading netscape formatted cookie
|
|
||||||
files as well as normal http-header files. It should be able to
|
|
||||||
transparently figure out what kind of file it got as input.
|
|
||||||
|
|
||||||
Daniel (29 October 1999):
|
|
||||||
- Another one of Sebastiaan van Erk's ideas (that has been requested before
|
|
||||||
but I seem to have forgotten who it was), is to add support for ranges in
|
|
||||||
FTP downloads. As usual, one request is just a request, when they're two
|
|
||||||
it is a demand. I've added simple support for X-Y style fetches. X has to
|
|
||||||
be the lower number, though you may omit one of the numbers. Use the -r/
|
|
||||||
--range switch (previously HTTP-only).
|
|
||||||
|
|
||||||
- Sebastiaan van Erk suggested that curl should be
|
|
||||||
able to show the file size of a specified file. I think this is a splendid
|
|
||||||
idea and the -I flag is now working for FTP. It displays the file size in
|
|
||||||
this manner:
|
|
||||||
Content-Length: XXXX
|
|
||||||
As it resembles normal headers, and leaves us the opportunity to add more
|
|
||||||
info in that display if we can come up with more in the future! It also
|
|
||||||
makes sense since if you access ftp through a HTTP proxy, you'd get the
|
|
||||||
file size the same way.
|
|
||||||
|
|
||||||
I changed the order of the QUOTE command executions. They're now executed
|
|
||||||
just after the login and before any other command. I made this to enable
|
|
||||||
quote commands to run before the -I stuff is done too.
|
|
||||||
|
|
||||||
- I found out that -D/--dump-header and -V/--version weren't documented in
|
|
||||||
the man page.
|
|
||||||
|
|
||||||
- Many HTTP/1.1 servers do not support ranges. Don't ask me why. I did add
|
|
||||||
some text about this in the man page for the range option. The thread in
|
|
||||||
the mailing list that started this was initiated by Michael Anti.
|
|
||||||
|
|
||||||
- I get reports about nroff crashes on solaris 2.6+ when displaying the curl
|
|
||||||
man page. Switch to gnroff instead, it is reported to work(!). Adam Barclay
|
|
||||||
reported and brought the suggestion.
|
|
||||||
|
|
||||||
- In a dialogue with Johannes G. Kristinsson we came
|
|
||||||
up with the idea to let -H/--header specified headers replace the
|
|
||||||
internally generated headers, if you happened to select to add a header
|
|
||||||
that curl normally uses by itself. The advantage with this is not entirely
|
|
||||||
obvious, but in Johannes' case it means that he can use another Host: than
|
|
||||||
the one curl would set.
|
|
||||||
|
|
||||||
Daniel (27 October 1999):
|
|
||||||
- Jongki Suwandi brought a nice patch for (yet another) crash when following
|
|
||||||
a location:. This time you had to follow a https:// server's redirect to
|
|
||||||
get the core.
|
|
||||||
|
|
||||||
Version 6.2
|
|
||||||
|
|
||||||
Daniel (21 October 1999):
|
|
||||||
- I think I managed to remove the suspicious (nil) that has been seen just
|
|
||||||
before the "Host:" in HTTP requests when -v was used.
|
|
||||||
- I found out that if you followed a location: when using a proxy, without
|
|
||||||
having specified http:// in the URL, the protocol part was added once again
|
|
||||||
when moving to the next URL! (The protocol part has to be added to the
|
|
||||||
URL when going through a proxy since it has no protocol-guessing system
|
|
||||||
such as curl has.)
|
|
||||||
- Benjamin Ritcey reported a core dump under solaris 2.6
|
|
||||||
with OpenSSL 0.9.4. It turned out this was due to a bad free() in main.c
|
|
||||||
that occurred after the download was done and completed.
|
|
||||||
- Benjamin found ftp downloads to show the first line of the download meter
|
|
||||||
to get written twice, and I removed that problem. It was introduced with
|
|
||||||
the multiple URL support.
|
|
||||||
- Dan Zitter correctly pointed out that curl 6.1 and earlier versions didn't
|
|
||||||
honor RFC 2616 chapter 4 section 2, "Message Headers": "...Field names are
|
|
||||||
case-insensitive..." HTTP header parsing assumed a certain casing. Dan
|
|
||||||
also provided me with a patch that corrected this, which I took the liberty
|
|
||||||
of editing slightly.
|
|
||||||
- Dan Zitter also provided a nice patch for config.guess to better recognize
|
|
||||||
the Mac OS X
|
|
||||||
- Dan also corrected a minor problem in the lib/Makefile that caused linking
|
|
||||||
to fail on OS X.
|
|
||||||
|
|
||||||
Daniel (19 October 1999):
|
|
||||||
- Len Marinaccio came up with some problems with curl. Since Windows has a
|
|
||||||
crippled shell, it can't redirect stderr and that causes trouble. I added
|
|
||||||
--stderr today which allows the user to redirect the stderr stream to a
|
|
||||||
file or stdout.
|
|
||||||
|
|
||||||
Daniel (18 October 1999):
|
|
||||||
- The configure script now understands the '--without-ssl' flag, which now
|
|
||||||
totally disable SSL/https support. Previously it wasn't possible to force
|
|
||||||
the configure script to leave SSL alone. The previous functionality has
|
|
||||||
been retained. Troy Engel helped test this new one.
|
|
||||||
|
|
||||||
Version 6.1
|
|
||||||
|
|
||||||
Daniel (17 October 1999):
|
|
||||||
- I ifdef'ed or commented all the zlib stuff in the sources and configure
|
|
||||||
script. It turned out we needed to mock more with zlib than I initially
|
|
||||||
thought, to make it capable of downloading compressed HTTP documents and
|
|
||||||
uncompress them on the fly. I didn't mean the zlib parts of curl to become
|
|
||||||
more than minor so this means I halt the zlib expedition for now and wait
|
|
||||||
until someone either writes the code or zlib gets updated and better
|
|
||||||
adjusted for this kind of usage. I won't get into details here, but a
|
|
||||||
short a summary is suitable:
|
|
||||||
- zlib can't automatically detect whether to use zlib or gzip
|
|
||||||
decompression methods.
|
|
||||||
- zlib is very neat for reading gzipped files from a file descriptor,
|
|
||||||
although not as nice for reading buffer-based data such as we would
|
|
||||||
want it.
|
|
||||||
- there are still some problems with the win32 version when reading from
|
|
||||||
a file descriptor if that is a socket
|
|
||||||
|
|
||||||
Daniel (14 October 1999):
|
|
||||||
- Moved the (external) include files for libcurl into a subdirectory named
|
|
||||||
curl and adjusted all #include lines to use <curl/XXXX> to maintain a
|
|
||||||
better name space and control of the headers. This has been requested.
|
|
||||||
|
|
||||||
Daniel (12 October 1999):
|
|
||||||
- I modified the 'maketgz' script to perform a 'make' too before a release
|
|
||||||
archive is put together in an attempt to make the time stamps better and
|
|
||||||
hopefully avoid the double configure-running that use to occur.
|
|
||||||
|
|
||||||
Daniel (11 October 1999):
|
|
||||||
- Applied J<>rn's patches that fixes zlib for mingw32 compiles as well as
|
|
||||||
some other missing zlib #ifdef and more text on the multiple URL docs in
|
|
||||||
the man page.
|
|
||||||
|
|
||||||
Version 6.1beta
|
|
||||||
|
|
||||||
Daniel (6 October 1999):
|
|
||||||
- Douglas E. Wegscheid sent me a patch that made the exact same thing as I
|
|
||||||
just made: the -d switch is now capable of reading post data from a named
|
|
||||||
file or stdin. Use it similarly to the -F. To read the post data from a
|
|
||||||
given file:
|
|
||||||
|
|
||||||
curl -d @path/to/filename www.postsite.com
|
|
||||||
|
|
||||||
or let curl read it out from stdin:
|
|
||||||
|
|
||||||
curl -d @- www.postit.com
|
|
||||||
|
|
||||||
J<>rn Hartroth (3 October 1999):
|
|
||||||
- Brought some more patches for multiple URL functionality. The MIME
|
|
||||||
separation ideas are almost scrapped now, and a custom separator is being
|
|
||||||
used instead. This is still compile-time "flagged".
|
|
||||||
|
|
||||||
Daniel
|
|
||||||
- Updated curl.1 with multiple URL info.
|
|
||||||
|
|
||||||
Daniel (30 September 1999):
|
|
||||||
- Felix von Leitner brought openssl-check fixes for configure.in to work
|
|
||||||
out-of-the-box when the openssl files are installed in the system default
|
|
||||||
dirs.
|
|
||||||
|
|
||||||
Daniel (28 September 1999)
|
|
||||||
- Added libz functionality. This should enable decompressing gzip, compress
|
|
||||||
or deflate encoding HTTP documents. It also makes curl send an accept that
|
|
||||||
it accepts that kind of encoding. Compressed contents usually shortens
|
|
||||||
download time. I *need* someone to tell me a site that uses compressed HTTP
|
|
||||||
documents so that I can test this out properly.
|
|
||||||
|
|
||||||
- As a result of the adding of zlib awareness, I changed the version string
|
|
||||||
a little. I plan to add openldap version reporting in there too.
|
|
||||||
|
|
||||||
Daniel (17 September 1999)
|
|
||||||
- Made the -F option allow stdin when specifying files. By using '-' instead
|
|
||||||
of file name, the data will be read from stdin.
|
|
||||||
|
|
||||||
Version 6.0
|
|
||||||
|
|
||||||
Daniel (13 September 1999)
|
|
||||||
- Added -X/--http-request <request> to enable any HTTP command to be sent.
|
|
||||||
Do not that your server has to support the exact string you enter. This
|
|
||||||
should possibly a string like DELETE or TRACE.
|
|
||||||
|
|
||||||
- Applied Douglas' mingw32-fixes for the makefiles.
|
|
||||||
|
|
||||||
Daniel (10 September 1999)
|
|
||||||
- Douglas E. Wegscheid pointed out a problem. Curl didn't check the FTP
|
|
||||||
servers return code properly after the --quote commands were issued. It
|
|
||||||
took anything non 200 as an error, when all 2XX codes should be accepted as
|
|
||||||
OK.
|
|
||||||
|
|
||||||
- Sending cookies to the same site in multiple lines like curl used to do
|
|
||||||
turned out to be bad and breaking the cookie specs. Curl now sends all
|
|
||||||
cookies on a single Cookie: line. Curl is not yet RFC 2109 compliant, but I
|
|
||||||
doubt that many servers do use that syntax (yet).
|
|
||||||
|
|
||||||
Daniel (8 September 1999)
|
|
||||||
- J<>rn helped me make sure it still compiles nicely with mingw32 under win32.
|
|
||||||
|
|
||||||
Daniel (7 September 1999)
|
|
||||||
- FTP upload through proxy is now turned into a HTTP PUT. Requested by
|
|
||||||
Stefan Kanthak.
|
|
||||||
|
|
||||||
- Added the ldap files to the .m32 makefile.
|
|
||||||
|
|
||||||
Daniel (3 September 1999)
|
|
||||||
- Made cookie matching work while using HTTP proxy.
|
|
||||||
|
|
||||||
Bjorn Reese (31 August 1999)
|
|
||||||
- Passed his ldap:// patch. Note that this requires the openldap shared
|
|
||||||
library to be installed and that LD_LIBRARY_PATH points to the
|
|
||||||
directory where the lib will be found when curl is run with a
|
|
||||||
ldap:// URL.
|
|
||||||
|
|
||||||
J<>rn Hartroth (31 August 1999)
|
|
||||||
- Made the Mingw32 makefiles into single files.
|
|
||||||
- Made file:// work for Win32. The same code is now used for unix as well for
|
|
||||||
performance reasons.
|
|
||||||
|
|
||||||
Douglas E. Wegscheid (30 August 1999)
|
|
||||||
- Patched the Mingw32 makefiles for SSL builds.
|
|
||||||
|
|
||||||
Matthew Clarke (30 August 1999)
|
|
||||||
- Made a cool patch for configure.in to allow --with-ssl to specify the
|
|
||||||
root dir of the openssl installation, as in
|
|
||||||
|
|
||||||
./configure --with-ssl=/usr/ssl_here
|
|
||||||
|
|
||||||
- Corrected the 'reconf' script to work better with some shells.
|
|
||||||
|
|
||||||
J<>rn Hartroth (26 August 1999)
|
|
||||||
- Fixed the Mingw32 makefiles in lib/ and corrected the file.c for win32
|
|
||||||
compiles.
|
|
||||||
|
|
||||||
Version 5.11
|
|
||||||
|
|
||||||
Daniel (25 August 1999)
|
|
||||||
- John Weismiller pointed out a bug in the header-line
|
|
||||||
realloc() system in download.c.
|
|
||||||
|
|
||||||
- I added lib/file.[ch] to offer a first, simple, file:// support. It
|
|
||||||
probably won't do much good on win32 system at this point, but I see it
|
|
||||||
as a start.
|
|
||||||
|
|
||||||
- Made the release archives get a Makefile in the root dir, which can be
|
|
||||||
used to start the compiling/building process easier. I haven't really
|
|
||||||
changed any INSTALL text yet, I wanted to get some feed-back on this
|
|
||||||
first.
|
|
||||||
|
|
||||||
Daniel (17 August 1999)
|
|
||||||
- Another Location: bug. Curl didn't do proper relative locations if the
|
|
||||||
original URL had cgi-parameters that contained a slash. Nusu's page
|
|
||||||
again.
|
|
||||||
|
|
||||||
- Corrected the NO_PROXY usage. It is a list of substrings that if one of
|
|
||||||
them matches the tail of the host name it should connect to, curl should
|
|
||||||
not use a proxy to connect there. Pointed out to me by Douglas
|
|
||||||
E. Wegscheid. I also changed the README text a little regarding this.
|
|
||||||
|
|
||||||
Daniel (16 August 1999)
|
|
||||||
- Fixed a memory bug with http-servers that sent Location: to a Location:
|
|
||||||
page. Nusu's page showed this too.
|
|
||||||
|
|
||||||
- Made cookies work a lot better. Setting the same cookie name several times
|
|
||||||
used to add more cookies instead of replacing the former one which it
|
|
||||||
should've. Nusu <nus at intergorj.ro> brought me an URL that made this
|
|
||||||
painfully visible...
|
|
||||||
|
|
||||||
Troy (15 August 1999)
|
|
||||||
- Brought new .spec files as well as a patch for configure.in that lets the
|
|
||||||
configure script find the openssl files better, even when the include
|
|
||||||
files are in /usr/include/openssl
|
|
||||||
|
|
||||||
Version 5.10
|
|
||||||
|
|
||||||
Daniel (13 August 1999)
|
|
||||||
- SSL_CTX_set_default_passwd_cb() has been modified in the 0.9.4 version of
|
|
||||||
OpenSSL. Now why couldn't they simply add a *new* function instead of
|
|
||||||
modifying the parameters of an already existing function? This way, we get
|
|
||||||
a compiler warning if compiling with 0.9.4 but not with earlier. So, I had
|
|
||||||
to come up with a #if construction that deals with this...
|
|
||||||
|
|
||||||
- Made curl output the SSL version number get displayed properly with 0.9.4.
|
|
||||||
|
|
||||||
Troy (12 August 1999)
|
|
||||||
- Added MingW32 (GCC-2.95) support under Win32. The INSTALL file was also
|
|
||||||
a bit rearranged.
|
|
||||||
|
|
||||||
Daniel (12 August 1999)
|
|
||||||
- I had to copy a good <arpa/telnet.h> include file into the curl source
|
|
||||||
tree to enable the silly win32 systems to compile. The distribution rights
|
|
||||||
allows us to do that as long as the file remains unmodified.
|
|
||||||
|
|
||||||
- I corrected a few minor things that made the compiler complain when
|
|
||||||
-Wall -pedantic was used.
|
|
||||||
|
|
||||||
- I'm moving the official curl web page to http://curl.haxx.nu. I think it
|
|
||||||
will make it easier to remember as it is a lot shorter and less cryptic.
|
|
||||||
The old one still works and shows the same info.
|
|
||||||
|
|
||||||
Daniel (11 August 1999)
|
|
||||||
- Albert Chin-A-Young mailed me another correction for NROFF in the
|
|
||||||
configure.in that is supposed to be better for IRIX users.
|
|
||||||
|
|
||||||
Daniel (10 August 1999)
|
|
||||||
- Albert Chin-A-Young helped me with some stupid Makefile things, as well as
|
|
||||||
some fiddling with the getdate.c stuff that he had problems with under
|
|
||||||
HP-UX v10. getdate.y will now be compiled into getdate.c if the appropriate
|
|
||||||
yacc or bison is found by the configure script. Since this is slightly new,
|
|
||||||
we need to test the output getdate.c with win32 systems to make sure it
|
|
||||||
still compiles there.
|
|
||||||
|
|
||||||
Daniel (5 August 1999)
|
|
||||||
- I've just setup a new mailing list with the intention to keep discussions
|
|
||||||
around libcurl development in it. I mainly expect it to be for thoughts and
|
|
||||||
brainstorming around a "next generation" library, rather than nitpicking
|
|
||||||
about the current implementation or details in the current libcurl.
|
|
||||||
|
|
||||||
To join our happy bunch of future-looking geeks, enter 'subscribe
|
|
||||||
<address>' in the body of a mail and send it to
|
|
||||||
libcurl-request@listserv.fts.frontec.se. Curl bug reports, the usual curl
|
|
||||||
talk and everything else should still be kept in this mailing list. I've
|
|
||||||
started to archive this mailing list and have put the libcurl web page at
|
|
||||||
www.fts.frontec.se/~dast/libcurl/.
|
|
||||||
|
|
||||||
- Stefan Kanthak contacted me regarding a few problems in the configure
|
|
||||||
script which he discovered when trying to make curl compile and build under
|
|
||||||
Siemens SINIX-Z V5.42B2004!
|
|
||||||
|
|
||||||
- Marcus Klein very accurately informed me that src/version.h was not present
|
|
||||||
in the CVS repository. Oh, how silly...
|
|
||||||
|
|
||||||
- Linus Nielsen rewrote the telnet:// part and now curl offers limited telnet
|
|
||||||
support. If you run curl like 'curl telnet://host' you'll get all output on
|
|
||||||
the screen and curl will read input from stdin. You'll be able to login and
|
|
||||||
run commands etc, but since the output is buffered, expect to get a little
|
|
||||||
weird output.
|
|
||||||
|
|
||||||
This is still in its infancy and it might get changed. We need your
|
|
||||||
feed-back and input in how this is best done.
|
|
||||||
|
|
||||||
WIN32 NOTE: I bet we'll get problems when trying to compile the current
|
|
||||||
lib/telnet.c on win32, but I think we can sort them out in time.
|
|
||||||
|
|
||||||
- David Sanderson reported that FORCE_ALLOCA_H or HAVE_ALLOCA_H must be
|
|
||||||
defined for getdate.c to compile properly on HP-UX 11.0. I updated the
|
|
||||||
configure script to check for alloca.h which should make it.
|
|
||||||
|
|
||||||
Daniel (4 August 1999)
|
|
||||||
- I finally got to understand Marcus Klein's ftp download resume problem,
|
|
||||||
which turns out to be due to different outputs from different ftp
|
|
||||||
servers. It makes ftp download resuming a little trickier, but I've made
|
|
||||||
some modifications I really believe will work for most ftp servers and I do
|
|
||||||
hope you report if you have problems with this!
|
|
||||||
|
|
||||||
- Added text about file transfer resuming to README.curl.
|
|
||||||
|
|
||||||
Daniel (2 August 1999)
|
|
||||||
- Applied a progress-bar patch from Lars J. Aas. It offers
|
|
||||||
a new styled progress bar enabled with -#/--progress-bar.
|
|
||||||
|
|
||||||
T. Yamada <tai at imasy.or.jp> (30 July 1999)
|
|
||||||
- It breaks with segfault when 1) curl is using .netrc to obtain
|
|
||||||
username/password (option '-n'), and 2) is automatically redirected to
|
|
||||||
another location (option '-L').
|
|
||||||
|
|
||||||
There is a small bug in lib/url.c (block starting from line 641), which
|
|
||||||
tries to take out username/password from user- supplied command-line
|
|
||||||
argument ('-u' option). This block is never executed on first attempt since
|
|
||||||
CONF_USERPWD bit isn't set at first, but curl later turns it on when it
|
|
||||||
checks for CONF_NETRC bit. So when curl tries to redo everything due to
|
|
||||||
redirection, it segfaults trying to access *data->userpwd.
|
|
||||||
|
|
||||||
Version 5.9.1
|
|
||||||
|
|
||||||
Daniel (30 July 1999)
|
|
||||||
- Steve Walch pointed out that there is a memory leak in the formdata
|
|
||||||
functions. I added a FormFree() function that is now used and supposed to
|
|
||||||
correct this flaw.
|
|
||||||
|
|
||||||
- Mark Wotton reported:
|
|
||||||
'curl -L https://www.cwa.com.au/' core dumps. I managed to cure this by
|
|
||||||
correcting the cleanup procedure. The bug seems to be gone with my OpenSSL
|
|
||||||
0.9.2b, although still occurs when I run the ~100 years old SSLeay 0.8.0. I
|
|
||||||
don't know whether it is curl or SSLeay that is to blame for that.
|
|
||||||
|
|
||||||
- Marcus Klein:
|
|
||||||
Reported an FTP upload resume bug that I really can't repeat nor understand.
|
|
||||||
I leave it here so that it won't be forgotten.
|
|
||||||
|
|
||||||
Daniel (29 July 1999)
|
|
||||||
- Costya Shulyupin suggested support for longer URLs when following Location:
|
|
||||||
and I could only agree and fix it!
|
|
||||||
|
|
||||||
- Leigh Purdie found a problem in the upload/POST department. It turned out
|
|
||||||
that http.c accidentaly cleared the pointer instead of the byte counter
|
|
||||||
when supposed to.
|
|
||||||
|
|
||||||
- Costya Shulyupin pointed out a problem with port numbers and Location:. If
|
|
||||||
you had a server at a non-standard port that redirected to an URL using a
|
|
||||||
standard port number, curl still used that first port number.
|
|
||||||
|
|
||||||
- Ralph Beckmann pointed out a problem when using both CONF_FOLLOWLOCATION
|
|
||||||
and CONF_FAILONERROR simultaneously. Since the CONF_FAILONERROR exits on
|
|
||||||
the 302-code that the follow location header outputs it will never show any
|
|
||||||
html on location: pages. I have now made it look for >=400 codes if
|
|
||||||
CONF_FOLLOWLOCATION is set.
|
|
||||||
|
|
||||||
- 'struct slist' is now renamed to 'struct curl_slist' (as suggested by Ralph
|
|
||||||
Beckmann).
|
|
||||||
|
|
||||||
- Joshua Swink and Rick Welykochy were the first to point out to me that the
|
|
||||||
latest OpenSSL package now have moved the standard include path. It is now
|
|
||||||
in /usr/local/ssl/include/openssl and I have now modified the --enable-ssl
|
|
||||||
option for the configure script to use that as the primary path, and I
|
|
||||||
leave the former path too to work with older packages of OpenSSL too.
|
|
||||||
|
|
||||||
Daniel (9 June 1999)
|
|
||||||
- I finally understood the IRIX problem and now it seem to compile on it!
|
|
||||||
I am gonna remove those #define strcasecmp() things once and for all now.
|
|
||||||
|
|
||||||
Daniel (4 June 1999)
|
|
||||||
- I adjusted the FTP reply 227 parser to make the PASV command work better
|
|
||||||
with more ftp servers. Appearantly the Roxen Challanger server replied
|
|
||||||
something curl 5.9 could deal with! :-( Reported by Ashley Reid-Montanaro
|
|
||||||
and Mark Butler brought a solution for it.
|
|
||||||
|
|
||||||
Daniel (26 May 1999)
|
|
||||||
- Rearranged. README is new, the old one is now README.curl and I added a
|
|
||||||
README.libcurl with text I got from Ralph Beckmann.
|
|
||||||
|
|
||||||
- I also updated the INSTALL text.
|
|
||||||
|
|
||||||
Daniel (25 May 1999)
|
|
||||||
- David Jonathan Lowsky correctly pointed out that curl didn't properly deal
|
|
||||||
with form posting where the variable shouldn't have any content, as in curl
|
|
||||||
-F "form=" www.site.com. It was now fixed.
|
|
||||||
|
|
||||||
Version 5.9
|
|
||||||
|
|
||||||
Daniel (22 May 1999)
|
|
||||||
- I've got a bug report from Aaron Scarisbrick in which he states he has some
|
|
||||||
problems with -L under FreeBSD 3.0. I have previously got another bug
|
|
||||||
report from Stefan Grether which points at an error with similar sympthoms
|
|
||||||
when using win32. I made the allocation of the new url string a bit faster
|
|
||||||
and different, don't know if it actually improves anything though...
|
|
||||||
|
|
||||||
Daniel (20 May 1999)
|
|
||||||
- Made the cookie parser deal with CRLF newlines too.
|
|
||||||
|
|
||||||
Daniel (19 May 1999)
|
|
||||||
- Download() didn't properly deal with failing return codes from the sread()
|
|
||||||
function. Adam Coyne found the problem in the win32 version, and Troy Engel
|
|
||||||
helped me out isolating it.
|
|
||||||
|
|
||||||
Daniel (16 May 1999)
|
|
||||||
- Richard Adams pointed out a bug I introduced in 5.8. --dump-header doesn't
|
|
||||||
work anymore! :-/ I fixed it now.
|
|
||||||
|
|
||||||
- After a suggestion by Joshua Swink I added -S / --show-error to force curl
|
|
||||||
to display the error message in case of an error, even if -s/--silent was
|
|
||||||
used.
|
|
||||||
|
|
||||||
Daniel (10 May 1999)
|
|
||||||
- I moved the stuff concerning HTTP, DICT and TELNET it their own source
|
|
||||||
files now. It is a beginning on my clean-up of the sources to make them
|
|
||||||
layer all those protocols better to enable more to be added easier in the
|
|
||||||
future!
|
|
||||||
|
|
||||||
- Leon Breedt sent me some files I've not put into the main curl
|
|
||||||
archive. They're for creating the Debian package thingie. He also sent me a
|
|
||||||
debian package that I've made available for download at the web page
|
|
||||||
|
|
||||||
Daniel (9 May 1999)
|
|
||||||
- Made it compile on cygwin too.
|
|
||||||
|
|
||||||
Troy Engel (7 May 1999)
|
|
||||||
- Brought a series of patches to allow curl to compile smoothly on MSVC++ 6
|
|
||||||
again!
|
|
||||||
|
|
||||||
Daniel (6 May 1999)
|
|
||||||
- I changed the #ifdef HAVE_STRFTIME placement for the -z code so that it
|
|
||||||
will be easier to discover systems that don't have that function and thus
|
|
||||||
can't use -z successfully. Made the strftime() get used if WIN32 is defined
|
|
||||||
too.
|
|
||||||
|
|
||||||
Version 5.8
|
|
||||||
|
|
||||||
Daniel (5 May 1999)
|
|
||||||
- I've had it with this autoconf/automake mess. It seems to work allright
|
|
||||||
for most people who don't have automake installed, but for those who have
|
|
||||||
there are problems all over.
|
|
||||||
|
|
||||||
I've got like five different bug reports on this only the last
|
|
||||||
week... Claudio Neves and Federico Bianchi and root <duggerj001 at
|
|
||||||
hawaii.rr.com> are some of them reporting this.
|
|
||||||
|
|
||||||
Currently, I have no really good fix since I want to use automake myself to
|
|
||||||
generate the Makefile.in files. I've found out that the @SHELL@-problems
|
|
||||||
can often be fixed by manually invoking 'automake' in the archive root
|
|
||||||
before you run ./configure... I've hacked my maketgz script now to fiddle
|
|
||||||
a bit with this and my tests seem to work better than before at least!
|
|
||||||
|
|
||||||
Daniel (4 May 1999)
|
|
||||||
- mkhelp.pl has been doing badly lately. I corrected a case problem in
|
|
||||||
the regexes.
|
|
||||||
|
|
||||||
- I've now remade the -o option to not touch the file unless it needs to.
|
|
||||||
I had to do this to make -z option really fine, since now you can make a
|
|
||||||
curl fetch and use a local copy's time when downloading to that file, as
|
|
||||||
in:
|
|
||||||
|
|
||||||
curl -z dump -o dump remote.site.com/file.html
|
|
||||||
|
|
||||||
This will only get the file if the remote one is newer than the local.
|
|
||||||
I'm aware that this alters previous behaviour a little. Some scripts out
|
|
||||||
there may depend on that the file is always touched...
|
|
||||||
|
|
||||||
- Corrected a bug in the SSLv2/v3 selection.
|
|
||||||
|
|
||||||
- Felix von Leitner requested that curl should be able to send
|
|
||||||
"If-Modified-Since" headers, which indeed is a fair idea. I implemented it
|
|
||||||
right away! Try -z <expression> where expression is a full GNU date
|
|
||||||
expression or a file name to get the date from!
|
|
||||||
|
|
||||||
Stephan Lagerholm (30 Apr 1999)
|
|
||||||
- Pointed out a problem with the src/Makefile for FreeBSD. The RM variable
|
|
||||||
isn't set and causes the make to fail.
|
|
||||||
|
|
||||||
Daniel (26 April 1999)
|
|
||||||
- Am I silly or what? Irving Wolfe pointed out to me that the curl version
|
|
||||||
number was not set properly. Hasn't been since 5.6. This was due to a bug
|
|
||||||
in my maketgz script!
|
|
||||||
|
|
||||||
David Eriksson (25 Apr 1999)
|
|
||||||
- Found a bug in cookies.c that made it crash at times.
|
|
||||||
|
|
||||||
Version 5.7.1
|
|
||||||
|
|
||||||
Doug Kaufman (23 Apr 1999)
|
|
||||||
- Brought two sunos 4 fixes. One of them being the hostip.c fix mentioned
|
|
||||||
below and the other one a correction in include/stdcheaders.h
|
|
||||||
|
|
||||||
- Added a paragraph about compiling with the US-version of openssl to the
|
|
||||||
INSTALL file.
|
|
||||||
|
|
||||||
Daniel
|
|
||||||
- New mailing list address. Info updated on the web page as well as in the
|
|
||||||
README file
|
|
||||||
|
|
||||||
Greg Onufer (20 Apr 1999)
|
|
||||||
- hostip.c didn't compile properly on SunOS 5.5.1.
|
|
||||||
It needs an #include <sys/types.h>
|
|
||||||
|
|
||||||
Version 5.7
|
|
||||||
|
|
||||||
Daniel (Apr 20 1999)
|
|
||||||
- Decided to upload a non-beta version right now!
|
|
||||||
|
|
||||||
- Made curl support any-length HTTP headers. The destination buffer is now
|
|
||||||
simply enlarged every time it turns out to be too small!
|
|
||||||
|
|
||||||
- Added the FAQ file to the archive. Still a bit smallish, but it is a
|
|
||||||
start.
|
|
||||||
|
|
||||||
Eric Thelin (15 Apr 1999)
|
|
||||||
- Made -D accept '-' instead of filename to write to stdout.
|
|
||||||
|
|
||||||
Version 5.6.3beta
|
|
||||||
|
|
||||||
Daniel (Apr 12 1999)
|
|
||||||
|
|
||||||
- Changed two #ifdef WIN32 to better #ifdef <errorcode> when connect()ing
|
|
||||||
in url.c and ftp.c. Makes cygwin32 deal with them better too. We should
|
|
||||||
try to get some decent win32-replacement there. Anyone?
|
|
||||||
|
|
||||||
- The old -3/--crlf option is now ONLY --crlf!
|
|
||||||
|
|
||||||
- I changed the "SSL fix" to a more lame one, but that doesn't remove as
|
|
||||||
much functionality. Now I've enabled the lib to select what SSL version it
|
|
||||||
should try first. Appearantly some older SSL-servers don't like when you
|
|
||||||
talk v3 with them so you need to be able to force curl to talk v2 from the
|
|
||||||
start. The fix dated April 6 and posted on the mailing list forced curl to
|
|
||||||
use v2 at all times using a modern OpenSSL version, but we don't really
|
|
||||||
want such a crippled solution.
|
|
||||||
|
|
||||||
- Marc Boucher sent me a patch that corrected a math error for the
|
|
||||||
"Curr.Speed" progress meter.
|
|
||||||
|
|
||||||
- Eric Thelin sent me a patch that enables '-K -' to read a config file from
|
|
||||||
stdin.
|
|
||||||
|
|
||||||
- I found out we didn't close the file properly before so I added it!
|
|
||||||
|
|
||||||
Daniel (Apr 9 1999)
|
|
||||||
- Yu Xin pointed out a problem with ftp download resume. It didn't work at
|
|
||||||
all! ;-O
|
|
||||||
|
|
||||||
Daniel (Apr 6 1999)
|
|
||||||
- Corrected the version string part generated for the SSL version.
|
|
||||||
|
|
||||||
- I found a way to make some other SSL page work with openssl 0.9.1+ that
|
|
||||||
previously didn't (ssleay 0.8.0 works with it though!). Trying to get
|
|
||||||
some real info from the OpenSSL guys to see how I should do to behave the
|
|
||||||
best way. SSLeay 0.8.0 shouldn't be that much in use anyway these days!
|
|
||||||
|
|
||||||
Version 5.6.2beta
|
|
||||||
|
|
||||||
Daniel (Apr 4 1999)
|
|
||||||
- Finally have curl more cookie "aware". Now read carefully. This is how
|
|
||||||
it works.
|
|
||||||
To make curl read cookies from an already existing file, in plain header-
|
|
||||||
format (like from the headers of a previous fetch) invoke curl with the
|
|
||||||
-b flag like:
|
|
||||||
|
|
||||||
curl -b file http://site/foo.html
|
|
||||||
|
|
||||||
Curl will then use all cookies it finds matching. The old style that sets
|
|
||||||
a single cookie with -b is still supported and is used if the string
|
|
||||||
following -b includes a '=' letter, as in "-b name=daniel".
|
|
||||||
|
|
||||||
To make curl read the cookies sent in combination with a location: (which
|
|
||||||
sites often do) point curl to read a non-existing file at first (i.e
|
|
||||||
to start with no existing cookies), like:
|
|
||||||
|
|
||||||
curl -b nowhere http://site/setcookieandrelocate.html
|
|
||||||
|
|
||||||
- Added a paragraph in the TODO file about the SSL problems recently
|
|
||||||
reported. Evidently, some kind of SSL-problem curl may need to address.
|
|
||||||
|
|
||||||
- Better "Location:" following.
|
|
||||||
|
|
||||||
Douglas E. Wegscheid (Tue, 30 Mar 1999)
|
|
||||||
- A subsecond display patch.
|
|
||||||
|
|
||||||
Daniel (Mar 14 1999)
|
|
||||||
- I've separated the version number of libcurl and curl now. To make
|
|
||||||
things a little easier, I decided to start the curl numbering from
|
|
||||||
5.6 and the former version number known as "curl" is now the one
|
|
||||||
set for libcurl.
|
|
||||||
|
|
||||||
- Removed the 'enable-no-pass' from configure, I doubt anyone wanted
|
|
||||||
that.
|
|
||||||
|
|
||||||
- Made lots of tiny adjustments to compile smoothly with cygwin under
|
|
||||||
win32. It's a killer for porting this to win32, bye bye VC++! ;-)
|
|
||||||
Compiles and builds out-of-the-box now. See the new wordings in
|
|
||||||
INSTALL for details.
|
|
||||||
|
|
||||||
- Beginning experiments with downloading multiple document from a http
|
|
||||||
server while remaining connected.
|
|
||||||
|
|
||||||
Version 5.6beta
|
|
||||||
|
|
||||||
Daniel (Mar 13 1999)
|
|
||||||
- Since I've changed so much, I thought I'd just go ahead and implement the
|
|
||||||
suggestion from Douglas E. Wegscheid. -D or --dump-header is now storing
|
|
||||||
HTTP headers separately in the specified file.
|
|
||||||
|
|
||||||
- Added new text to INSTALL on what to do to build this on win32 now.
|
|
||||||
|
|
||||||
- Aaargh. I had to take a step back and prefix the shared #include files
|
|
||||||
in the sources with "../include/" to please VC++...
|
|
||||||
|
|
||||||
Daniel (Mar 12 1999)
|
|
||||||
- Split the url.c source into many tiny sources for better readability
|
|
||||||
and smaller size.
|
|
||||||
|
|
||||||
Daniel (Mar 11 1999)
|
|
||||||
- Started to change stuff for a move to make libcurl and a more separate
|
|
||||||
curl application that uses the libcurl. Made the libcurl sources into
|
|
||||||
the new lib directory while the curl application will remain in src as
|
|
||||||
before. New makefiles, adjusted configure script and so.
|
|
||||||
|
|
||||||
libcurl.a built quickly and easily. I better make a better interface to
|
|
||||||
the lib functions though.
|
|
||||||
|
|
||||||
The new root dir include/ is supposed to contain the public information
|
|
||||||
about the new libcurl. It is a little ugly so far :-)
|
|
||||||
|
|
||||||
|
|
||||||
Daniel (Mar 1 1999)
|
|
||||||
- Todd Kaufmann sent me a good link to Netscape's cookie spec as well as the
|
|
||||||
info that RFC 2109 specifies how to use them. The link is now in the
|
|
||||||
README and the RFC in the RESOURCES.
|
|
||||||
|
|
||||||
Daniel (Feb 23 1999)
|
|
||||||
- Finally made configure accept --with-ssl to look for SSL libs and includes
|
|
||||||
in the "standard" place /usr/local/ssl...
|
|
||||||
|
|
||||||
Daniel (Feb 22 1999)
|
|
||||||
- Verified that curl linked fine with OpenSSL 0.9.1c which seems to be
|
|
||||||
the most recent.
|
|
||||||
|
|
||||||
Henri Gomez (Fri Feb 5 1999)
|
|
||||||
- Sent in an updated curl-ssl.spec. I still miss the script that builds an
|
|
||||||
RPM automatically...
|
|
||||||
|
|
||||||
Version 5.5.1
|
|
||||||
|
|
||||||
Mark Butler (27 Jan 1999)
|
|
||||||
- Corrected problems in Download().
|
|
||||||
|
|
||||||
Danitel Stenberg (25 Jan 1999)
|
|
||||||
- Jeremie Petit pointed out a few flaws in the source that prevented it from
|
|
||||||
compile warning free with the native compiler under Digital Unix v4.0d.
|
|
||||||
|
|
||||||
Version 5.5
|
|
||||||
|
|
||||||
Daniel Stenberg (15 Jan 1999)
|
|
||||||
- Added Bjorns small text to the README about the DICT protocol.
|
|
||||||
|
|
||||||
Daniel Stenberg (11 Jan 1999)
|
|
||||||
- <jswink at softcom.net> reported about the win32-versioin: "Doesn't use
|
|
||||||
ALL_PROXY environment variable". Turned out to be because of the static-
|
|
||||||
buffer nature of the win32 environment variable calls!
|
|
||||||
|
|
||||||
Bjorn Reese (10 Jan 1999)
|
|
||||||
- I have attached a simple addition for the DICT protocol (RFC 2229).
|
|
||||||
It performs dictionary lookups. The output still needs to be better
|
|
||||||
formatted.
|
|
||||||
|
|
||||||
To test it try (the exact format, and more examples are described in
|
|
||||||
the RFC)
|
|
||||||
|
|
||||||
dict://dict.org/m:hello
|
|
||||||
dict://dict.org/m:hello::soundex
|
|
||||||
|
|
||||||
|
|
||||||
Vicente Garcia (10 Jan 1999)
|
|
||||||
- Corrected the progress meter for files larger than 20MB.
|
|
||||||
|
|
||||||
Daniel Stenberg (7 Jan 1999)
|
|
||||||
- Corrected the -t and -T help texts. They claimed to be FTP only.
|
|
||||||
|
|
||||||
Version 5.4
|
|
||||||
|
|
||||||
Daniel Stenberg
|
|
||||||
(7 Jan 1999)
|
|
||||||
- Irving Wolfe reported that curl -s didn't always supress the progress
|
|
||||||
reporting. It was the form post that autoamtically always switched it on
|
|
||||||
again. This is now corrected!
|
|
||||||
|
|
||||||
(4 Jan 1999)
|
|
||||||
- Andreas Kostyrka suggested I'd add PUT and he helped me out to test it. If
|
|
||||||
you use -t or -T now on a http or https server, PUT will be used for file
|
|
||||||
upload.
|
|
||||||
|
|
||||||
I removed the former use of -T with HTTP. I doubt anyone ever really used
|
|
||||||
that.
|
|
||||||
|
|
||||||
(4 Jan 1999)
|
|
||||||
- Erik Jacobsen found a width bug in the mprintf() function. I corrected it
|
|
||||||
now.
|
|
||||||
|
|
||||||
(4 Jan 1999)
|
|
||||||
- As John V. Chow pointed out to me, curl accepted very limited URL sizes. It
|
|
||||||
should now accept path parts that are up to at least 4096 bytes.
|
|
||||||
|
|
||||||
- Somehow I screwed up when applying the AIX fix from Gilbert Ramirez, so
|
|
||||||
I redid that now.
|
|
||||||
|
|
1381
CHANGES.2000
1381
CHANGES.2000
File diff suppressed because it is too large
Load Diff
1957
CHANGES.2001
1957
CHANGES.2001
File diff suppressed because it is too large
Load Diff
1504
CHANGES.2002
1504
CHANGES.2002
File diff suppressed because it is too large
Load Diff
1572
CHANGES.2003
1572
CHANGES.2003
File diff suppressed because it is too large
Load Diff
1994
CHANGES.2004
1994
CHANGES.2004
File diff suppressed because it is too large
Load Diff
1183
CHANGES.2005
1183
CHANGES.2005
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@ html:
|
|||||||
pdf:
|
pdf:
|
||||||
cd docs; make pdf
|
cd docs; make pdf
|
||||||
|
|
||||||
check: test
|
check: test examples
|
||||||
|
|
||||||
if CROSSCOMPILING
|
if CROSSCOMPILING
|
||||||
test-full: test
|
test-full: test
|
||||||
@@ -71,6 +71,9 @@ test-torture:
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
examples:
|
||||||
|
@(cd docs/examples; $(MAKE) all)
|
||||||
|
|
||||||
#
|
#
|
||||||
# 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:
|
||||||
|
@@ -68,18 +68,22 @@ watcom-clean:
|
|||||||
wmake -f Makefile.Watcom clean
|
wmake -f Makefile.Watcom clean
|
||||||
|
|
||||||
mingw32:
|
mingw32:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32
|
||||||
|
$(MAKE) -C src -f Makefile.m32
|
||||||
|
|
||||||
|
mingw32-zlib:
|
||||||
$(MAKE) -C lib -f Makefile.m32 ZLIB=1
|
$(MAKE) -C lib -f Makefile.m32 ZLIB=1
|
||||||
$(MAKE) -C src -f Makefile.m32 ZLIB=1
|
$(MAKE) -C src -f Makefile.m32 ZLIB=1
|
||||||
|
|
||||||
mingw32-ssl:
|
mingw32-ssl-zlib:
|
||||||
$(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
|
$(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
|
||||||
$(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
|
$(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
|
||||||
|
|
||||||
mingw32-ssh2-ssl:
|
mingw32-ssh2-ssl-zlib:
|
||||||
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
|
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
|
||||||
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
|
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
|
||||||
|
|
||||||
mingw32-ssh2-ssl-sspi:
|
mingw32-ssh2-ssl-sspi-zlib:
|
||||||
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||||
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||||
|
|
||||||
@@ -234,6 +238,10 @@ netware-clean:
|
|||||||
$(MAKE) -C lib -f Makefile.netware clean
|
$(MAKE) -C lib -f Makefile.netware clean
|
||||||
$(MAKE) -C src -f Makefile.netware clean
|
$(MAKE) -C src -f Makefile.netware clean
|
||||||
|
|
||||||
|
netware-install:
|
||||||
|
$(MAKE) -C lib -f Makefile.netware install
|
||||||
|
$(MAKE) -C src -f Makefile.netware install
|
||||||
|
|
||||||
unix: all
|
unix: all
|
||||||
|
|
||||||
unix-ssl: ssl
|
unix-ssl: ssl
|
||||||
@@ -241,3 +249,8 @@ unix-ssl: ssl
|
|||||||
linux: all
|
linux: all
|
||||||
|
|
||||||
linux-ssl: ssl
|
linux-ssl: ssl
|
||||||
|
|
||||||
|
vc8:
|
||||||
|
echo "generate VC8 makefiles"
|
||||||
|
sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||||
|
sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||||
|
120
RELEASE-NOTES
120
RELEASE-NOTES
@@ -1,56 +1,58 @@
|
|||||||
Curl and libcurl 7.16.2
|
Curl and libcurl 7.17.0
|
||||||
|
|
||||||
Public curl release number: 98
|
Public curl release number: 101
|
||||||
Releases counted from the very beginning: 125
|
Releases counted from the very beginning: 127
|
||||||
Available command line options: 118
|
Available command line options: 118
|
||||||
Available curl_easy_setopt() options: 141
|
Available curl_easy_setopt() options: 143
|
||||||
Number of public functions in libcurl: 54
|
Number of public functions in libcurl: 55
|
||||||
Amount of public web site mirrors: 38
|
Amount of public web site mirrors: 42
|
||||||
Number of known libcurl bindings: 35
|
Number of known libcurl bindings: 36
|
||||||
Number of contributors: 539
|
Number of contributors: 572
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o added CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS
|
o support for OS/400 Secure Sockets Layer library
|
||||||
o added CURLOPT_HTTP_CONTENT_DECODING, CURLOPT_HTTP_TRANSFER_DECODING and
|
o curl_easy_setopt() now allocates strings passed to it
|
||||||
--raw
|
o SCP and SFTP support now requires libssh2 0.16 or later
|
||||||
o added support for using the NSS library for TLS/SSL
|
o LDAP libraries are now linked "regularly" and not with dlopen
|
||||||
o changed default anonymous FTP password
|
o HTTP transfers have the download size info "available" earlier
|
||||||
o changed the CURLOPT_FTP_SSL_CCC option to handle active and passive
|
o FTP transfers have the download size info "available" earlier
|
||||||
CCC shutdown
|
o builds and runs on OS/400
|
||||||
o added the --ftp-ssl-ccc-mode command line option
|
o several error codes and options were marked as obsolete and subject to
|
||||||
o includes VC8 Makefiles in the release archive
|
future removal (set CURL_NO_OLDIES to see if your application is using them)
|
||||||
o --ftp-ssl-control is now honoured on ftps:// URLs
|
o SFTP errors can return more specific error codes
|
||||||
o added experimental CURL_ACKNOWLEDGE_EINTR symbol definition check
|
|
||||||
o --key and new --pubkey options for SSH public key file logins
|
|
||||||
o --pass now works for a SSH public key file, too
|
|
||||||
o select (2) support no longer needed to build the library if poll() used
|
|
||||||
o CURLOPT_POSTQUOTE works for SFTP
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o in testsuite, update test cookies expiration from 2007-Feb-1 to year 2035
|
o test cases 31, 46, 61, 506, 517 now work in time zones that use leap seconds
|
||||||
o socks5 works
|
o problem with closed proxy connection during HTTP CONNECT auth negotiation
|
||||||
o builds fine with VC2005
|
o transfer-encoding skipping didn't ignore the 407 response bodies properly
|
||||||
o CURLOPT_RANGE set to NULL resets the range for FTP
|
o CURLOPT_SSL_VERIFYHOST set to 1
|
||||||
o curl_multi_remove_handle() rare crash
|
o CONNECT endless loop
|
||||||
o passive FTP transfers work with SOCKS
|
o krb5 support builds with Heimdal
|
||||||
o multi interface HTTPS connection re-use memory leak
|
o added returned error string for connection refused case
|
||||||
o libcurl.m4's --with-libcurl is improved
|
o re-use of dead FTP control connections
|
||||||
o curl-config --libs and libcurl.pc no longer list unnecessary dependencies
|
o login to FTP servers that don't require (nor understand) PASS after the
|
||||||
o fixed an issue with CCC not working on some servers
|
USER command
|
||||||
o several HTTP pipelining problems
|
o bad free of memory from libssh2
|
||||||
o HTTP CONNECT thru a proxy is now less blocking when the multi interface is
|
o the SFTP PWD command works
|
||||||
used
|
o HTTP Digest auth on a re-used connection
|
||||||
o HTTP Digest header parsing fix for unquoted last word ending with CRLF
|
o FTPS data connection close
|
||||||
o CURLOPT_PORT, HTTP proxy, re-using connections and non-HTTP protocols
|
o AIX 4 and 5 get to use non-blocking sockets
|
||||||
o CURLOPT_INTERFACE for ipv6
|
o small POST with NTLM
|
||||||
o use-after-free issue with HTTP transfers with the multi interface
|
o resumed file:// transfers
|
||||||
o the progress callback can get called more frequently
|
o CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE are 64 bit
|
||||||
o timeout would restart when signal caught while awaiting socket events
|
"clean"
|
||||||
o curl -f with user+password embedded in the URL
|
o memory leak when handling compressed data streams from broken servers
|
||||||
o 26 flaws identified by coverity.com
|
o no NTLM unicode response
|
||||||
o builds on QNX 6 again
|
o resume HTTP PUT using Digest authentication
|
||||||
|
o FTP NOBODY requests on directories sent "SIZE (null)"
|
||||||
|
o FTP NOBODY request on file crash
|
||||||
|
o excessively long FTP server responses and response lines
|
||||||
|
o file:// upload then FTP:// upload crash
|
||||||
|
o TFTP error 0 is no longer treated as success
|
||||||
|
o uploading empty file over FTP on re-used connection
|
||||||
|
o superfluous CWD command on re-used FTP connections without subdirs used
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -58,21 +60,29 @@ This release includes the following known bugs:
|
|||||||
|
|
||||||
Other curl-related news:
|
Other curl-related news:
|
||||||
|
|
||||||
o pycurl 7.16.1 was released: http://pycurl.sf.net/
|
o pycurl 7.16.4 was released http://pycurl.sf.net
|
||||||
|
o TclCurl 7.16.4 was released
|
||||||
|
http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
||||||
|
o curlpp 0.7.1 was released
|
||||||
|
http://rrette.com/textpattern/index.php?s=cURLpp
|
||||||
|
o A brand new binding for SP-Forth was written by ygrek:
|
||||||
|
http://www.forth.org.ru/~ac/lib/lin/curl/
|
||||||
|
|
||||||
New curl mirrors:
|
New curl mirrors:
|
||||||
|
|
||||||
o http://curl.basemirror.de is a new mirror in Germany
|
o http://curl.freeby.pctools.cl is a new mirror in Santiago, Chile
|
||||||
o http://curl.xxtracker.org is a new mirror in The Netherlands
|
o http://curl.site2nd.org is a new mirror in Dallas, Texas, USA
|
||||||
|
o http://curl.cheap.co.il is a new mirror in Tel-Aviv, Israel
|
||||||
|
o http://curl.digimirror.nl is a new mirror in Amsterdam, the Netherlands
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
Yang Tse, Manfred Schwarb, Michael Wallner, Jeff Pohlmeyer, Shmulik Regev,
|
Dan Fandrich, Song Ma, Daniel Black, Giancarlo Formicuccia, Shmulik Regev,
|
||||||
Rob Crittenden, Robert A. Monat, Dan Fandrich, Duncan Mac-Vicar Prett,
|
Daniel Cater, Colin Hogben, Jofell Gallardo, Daniel Johnson,
|
||||||
Michal Marek, Robson Braga Araujo, Ian Turner, Linus Nielsen Feltzing,
|
Ralf S. Engelschall, James Housley, Chris Flerackers, Patrick Monnerat,
|
||||||
Ravi Pratap, Adam D. Moss, Jose Kahan, Hang Kin Lau, Justin Fletcher,
|
Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev,
|
||||||
Robert Iakobashvili, Bryan Henderson, Eygene Ryabinkin, Daniel Johnson,
|
Scott Cantor, Allen Pulsifer, Andrew Wansink, Robson Braga Araujo,
|
||||||
Matt Kraai, Nick Zitzmann, Rob Jones
|
Christian Vogt
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
77
acinclude.m4
77
acinclude.m4
@@ -1107,7 +1107,7 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET],
|
|||||||
# define PLATFORM_SUNOS4
|
# define PLATFORM_SUNOS4
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4)
|
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||||
# define PLATFORM_AIX_V3
|
# define PLATFORM_AIX_V3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1830,81 +1830,6 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
|
|||||||
|
|
||||||
]) dnl end of AC_DEFUN()
|
]) dnl end of AC_DEFUN()
|
||||||
|
|
||||||
|
|
||||||
dnl Determine the name of the library to pass to dlopen() based on the name
|
|
||||||
dnl that would normally be given to AC_CHECK_LIB. The preprocessor symbol
|
|
||||||
dnl given is set to the quoted library file name.
|
|
||||||
dnl The standard dynamic library file name is first generated, based on the
|
|
||||||
dnl current system type, then a search is performed for that file on the
|
|
||||||
dnl standard dynamic library path. If it is a symbolic link, the destination
|
|
||||||
dnl of the link is used as the file name, after stripping off any minor
|
|
||||||
dnl version numbers. If a library file can't be found, a guess is made.
|
|
||||||
dnl This macro assumes AC_PROG_LIBTOOL has been called and requires perl
|
|
||||||
dnl to be available in the PATH, or $PERL to be set to its location.
|
|
||||||
dnl
|
|
||||||
dnl CURL_DLLIB_NAME(VARIABLE, library_name)
|
|
||||||
dnl e.g. CURL_DLLIB_NAME(LDAP_NAME, ldap) on a Linux system might result
|
|
||||||
dnl in LDAP_NAME holding the string "libldap.so.2".
|
|
||||||
|
|
||||||
AC_DEFUN([CURL_DLLIB_NAME],
|
|
||||||
[
|
|
||||||
AC_MSG_CHECKING([name of dynamic library $2])
|
|
||||||
dnl The shared library extension variable name changes from version to
|
|
||||||
dnl version of libtool. Try a few names then just set one statically.
|
|
||||||
test -z "$shared_ext" && eval shared_ext=\"$shrext_cmds\"
|
|
||||||
test -z "$shared_ext" && shared_ext="$std_shrext"
|
|
||||||
test -z "$shared_ext" && shared_ext="$shrext"
|
|
||||||
test -z "$shared_ext" && shared_ext=".so"
|
|
||||||
|
|
||||||
dnl Create the library link name of the correct form for this platform
|
|
||||||
LIBNAME_LINK_SPEC=`echo "$library_names_spec" | $SED 's/^.* //'`
|
|
||||||
DLGUESSLIB=`name=$2 eval echo "$libname_spec"`
|
|
||||||
DLGUESSFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$LIBNAME_LINK_SPEC"`
|
|
||||||
dnl Last resort in case libtool knows nothing about shared libs on this platform
|
|
||||||
test -z "$DLGUESSFILE" && DLGUESSFILE="$DLGUESSLIB$shared_ext"
|
|
||||||
|
|
||||||
dnl Synthesize a likely dynamic library name in case we can't find an actual one
|
|
||||||
SO_NAME_SPEC="$soname_spec"
|
|
||||||
dnl soname_spec undefined when identical to the 1st entry in library_names_spec
|
|
||||||
test -z "$SO_NAME_SPEC" && SO_NAME_SPEC=`echo "$library_names_spec" | $SED 's/ .*$//'`
|
|
||||||
DLGUESSSOFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$SO_NAME_SPEC"`
|
|
||||||
dnl Last resort in case libtool knows nothing about shared libs on this platform
|
|
||||||
test -z "$DLGUESSSOFILE" && DLGUESSSOFILE="$DLGUESSFILE"
|
|
||||||
|
|
||||||
if test "$cross_compiling" = yes; then
|
|
||||||
dnl Can't look at filesystem when cross-compiling
|
|
||||||
AC_DEFINE_UNQUOTED($1, "$DLGUESSSOFILE", [$2 dynamic library file])
|
|
||||||
AC_MSG_RESULT([$DLGUESSSOFILE (guess while cross-compiling)])
|
|
||||||
else
|
|
||||||
|
|
||||||
DLFOUNDFILE=""
|
|
||||||
if test "$sys_lib_dlsearch_path_spec" ; then
|
|
||||||
dnl Search for the link library name and see what it points to.
|
|
||||||
for direc in $sys_lib_dlsearch_path_spec ; do
|
|
||||||
DLTRYFILE="$direc/$DLGUESSFILE"
|
|
||||||
dnl Find where the symbolic link for this name points
|
|
||||||
changequote(<<, >>)dnl
|
|
||||||
<<
|
|
||||||
DLFOUNDFILE=`${PERL:-perl} -e 'use File::Basename; (basename(readlink($ARGV[0])) =~ /^(.*[^\d]\.\d+)[\d\.]*$/ && print ${1}) || exit 1;' "$DLTRYFILE" 2>&5`
|
|
||||||
>>
|
|
||||||
changequote([, ])dnl
|
|
||||||
if test "$?" -eq "0"; then
|
|
||||||
dnl Found the file link
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$DLFOUNDFILE" ; then
|
|
||||||
dnl Couldn't find a link library, so guess at a name.
|
|
||||||
DLFOUNDFILE="$DLGUESSSOFILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED($1, "$DLFOUNDFILE", [$2 dynamic library file])
|
|
||||||
AC_MSG_RESULT($DLFOUNDFILE)
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
# This is only a temporary fix. This macro is here to replace the broken one
|
# This is only a temporary fix. This macro is here to replace the broken one
|
||||||
# delivered by the automake project (including the 1.9.6 release). As soon as
|
# delivered by the automake project (including the 1.9.6 release). As soon as
|
||||||
# they ship a working version we SHOULD remove this work-around.
|
# they ship a working version we SHOULD remove this work-around.
|
||||||
|
@@ -20,3 +20,9 @@ Brad Spencer
|
|||||||
Ravi Pratap
|
Ravi Pratap
|
||||||
William Ahern
|
William Ahern
|
||||||
Bram Matthys
|
Bram Matthys
|
||||||
|
Michael Wallner
|
||||||
|
Vlad Dinulescu
|
||||||
|
Brad House
|
||||||
|
Shmulik Regev
|
||||||
|
Ashish Sharma
|
||||||
|
Brad Spencer
|
||||||
|
132
ares/CHANGES
132
ares/CHANGES
@@ -1,16 +1,140 @@
|
|||||||
Changelog for the c-ares project
|
Changelog for the c-ares project
|
||||||
|
|
||||||
* February 19
|
* July 14 2007 (Daniel Stenberg)
|
||||||
|
|
||||||
|
- Vlad Dinulescu fixed two outstanding valgrind reports:
|
||||||
|
|
||||||
|
|
||||||
|
1. In ares_query.c , in find_query_by_id we compare q->qid (which is a short
|
||||||
|
int variable) with qid, which is declared as an int variable. Moreover,
|
||||||
|
DNS_HEADER_SET_QID is used to set the value of qid, but DNS_HEADER_SET_QID
|
||||||
|
sets only the first two bytes of qid. I think that qid should be declared as
|
||||||
|
"unsigned short" in this function.
|
||||||
|
|
||||||
|
2. The same problem occurs in ares_process.c, process_answer() . query->qid
|
||||||
|
(an unsigned short integer variable) is compared with id, which is an
|
||||||
|
integer variable. Moreover, id is initialized from DNS_HEADER_QID which sets
|
||||||
|
only the first two bytes of id. I think that the id variable should be
|
||||||
|
declared as "unsigned short" in this function.
|
||||||
|
|
||||||
|
Even after declaring these variables as "unsigned short", the valgrind
|
||||||
|
errors are still there. Which brings us to the third problem.
|
||||||
|
|
||||||
|
3. The third problem is that Valgrind assumes that query->qid is not
|
||||||
|
initialised correctly. And it does that because query->qid is set from
|
||||||
|
DNS_HEADER_QID(qbuf); Valgrind says that qbuf has unitialised bytes. And
|
||||||
|
qbuf has uninitialised bytes because of channel->next_id . And next_id is
|
||||||
|
set by ares_init.c:ares__generate_new_id() . I found that putting short r=0
|
||||||
|
in this function (instead of short r) makes all Valgrind warnings go away.
|
||||||
|
I have studied ares__rc4() too, and this is the offending line:
|
||||||
|
|
||||||
|
buffer_ptr[counter] ^= state[xorIndex]; (ares_query.c:62)
|
||||||
|
|
||||||
|
This is what triggers Valgrind.. buffer_ptr is unitialised in this function,
|
||||||
|
and by applying ^= on it, it remains unitialised.
|
||||||
|
|
||||||
|
Version 1.4.0 (June 8, 2007)
|
||||||
|
|
||||||
|
* June 4 2007 (Daniel Stenberg)
|
||||||
|
|
||||||
|
- James Bursa reported a major memory problem when resolving multi-IP names
|
||||||
|
and I found and fixed the problem. It was added by Ashish Sharma's patch
|
||||||
|
two days ago.
|
||||||
|
|
||||||
|
When I then tried to verify multiple entries in /etc/hosts after my fix, I
|
||||||
|
got another segfault and decided this code was not ripe for inclusion and I
|
||||||
|
reverted the patch.
|
||||||
|
|
||||||
|
* June 2 2007
|
||||||
|
|
||||||
|
- Brad Spencer found and fixed three flaws in the code, found with the new
|
||||||
|
gcc 4.2.0 warning: -Waddress
|
||||||
|
|
||||||
|
- Brad House fixed VS2005 compiler warnings due to time_t being 64bit.
|
||||||
|
He also made recent Microsoft compilers use _strdup() instead of strdup().
|
||||||
|
|
||||||
|
- Brad House's man pages for ares_save_options() and ares_destroy_options()
|
||||||
|
were added.
|
||||||
|
|
||||||
|
- Ashish Sharma provided a patch for supporting multiple entries in the
|
||||||
|
/etc/hosts file. Patch edited for coding style and functionality by me
|
||||||
|
(Daniel).
|
||||||
|
|
||||||
|
* May 30 2007
|
||||||
|
|
||||||
|
- Shmulik Regev brought cryptographically secure transaction IDs:
|
||||||
|
|
||||||
|
The c-ares library implementation uses a DNS "Transaction ID" field that is
|
||||||
|
seeded with a pseudo random number (based on gettimeofday) which is
|
||||||
|
incremented (++) between consecutive calls and is therefore rather
|
||||||
|
predictable. In general, predictability of DNS Transaction ID is a well
|
||||||
|
known security problem (e.g.
|
||||||
|
http://bak.spc.org/dms/archive/dns_id_attack.txt) and makes a c-ares based
|
||||||
|
implementation vulnerable to DNS poisoning. Credit goes to Amit Klein
|
||||||
|
(Trusteer) for identifying this problem.
|
||||||
|
|
||||||
|
The patch I wrote changes the implementation to use a more secure way of
|
||||||
|
generating unique IDs. It starts by obtaining a key with reasonable entropy
|
||||||
|
which is used with an RC4 stream to generate the cryptographically secure
|
||||||
|
transaction IDs.
|
||||||
|
|
||||||
|
Note that the key generation code (in ares_init:randomize_key) has two
|
||||||
|
versions, the Windows specific one uses a cryptographically safe function
|
||||||
|
provided (but undocumented :) by the operating system (described at
|
||||||
|
http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx). The
|
||||||
|
default implementation is a bit naive and uses the standard 'rand'
|
||||||
|
function. Surely a better way to generate random keys exists for other
|
||||||
|
platforms.
|
||||||
|
|
||||||
|
The patch can be tested by using the adig utility and using the '-s' option.
|
||||||
|
|
||||||
|
- Brad House added ares_save_options() and ares_destroy_options() that can be
|
||||||
|
used to keep options for later re-usal when ares_init_options() is used.
|
||||||
|
|
||||||
|
Problem: Calling ares_init() for each lookup can be unnecessarily resource
|
||||||
|
intensive. On windows, it must LoadLibrary() or search the registry
|
||||||
|
on each call to ares_init(). On unix, it must read and parse
|
||||||
|
multiple files to obtain the necessary configuration information. In
|
||||||
|
a single-threaded environment, it would make sense to only
|
||||||
|
ares_init() once, but in a heavily multi-threaded environment, it is
|
||||||
|
undesirable to ares_init() and ares_destroy() for each thread created
|
||||||
|
and track that.
|
||||||
|
|
||||||
|
Solution: Create ares_save_options() and ares_destroy_options() functions to
|
||||||
|
retrieve and free options obtained from an initialized channel. The
|
||||||
|
options populated can be used to pass back into ares_init_options(),
|
||||||
|
it should populate all needed fields and not retrieve any information
|
||||||
|
from the system. Probably wise to destroy the cache every minute or
|
||||||
|
so to prevent the data from becoming stale.
|
||||||
|
|
||||||
|
- Daniel S added ares_process_fd() to allow applications to ask for processing
|
||||||
|
on specific sockets and thus avoiding select() and associated
|
||||||
|
functions/macros. This function will be used by upcoming libcurl releases
|
||||||
|
for this very reason. It also made me export the ares_socket_t type in the
|
||||||
|
public ares.h header file, since ares_process_fd() uses that type for two of
|
||||||
|
the arguments.
|
||||||
|
|
||||||
|
* May 25 2007
|
||||||
|
|
||||||
|
- Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
|
||||||
|
that could cause it to return a bad return code.
|
||||||
|
|
||||||
|
* April 16 2007
|
||||||
|
|
||||||
|
- Yang Tse: Provide ares_getopt() command-line parser function as a source
|
||||||
|
code helper function, not belonging to the actual c-ares library.
|
||||||
|
|
||||||
|
* February 19 2007
|
||||||
|
|
||||||
- Vlad Dinulescu added ares_parse_ns_reply().
|
- Vlad Dinulescu added ares_parse_ns_reply().
|
||||||
|
|
||||||
* February 13
|
* February 13 2007
|
||||||
|
|
||||||
- Yang Tse: Fix failure to get the search sequence of /etc/hosts and
|
- Yang Tse: Fix failure to get the search sequence of /etc/hosts and
|
||||||
DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when
|
DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when
|
||||||
/etc/resolv.conf did not exist or was unable to read it.
|
/etc/resolv.conf did not exist or was unable to read it.
|
||||||
|
|
||||||
* November 22
|
* November 22 2006
|
||||||
|
|
||||||
- Install ares_dns.h too
|
- Install ares_dns.h too
|
||||||
|
|
||||||
@@ -18,7 +142,7 @@
|
|||||||
struct, and there are domain/search entries in /etc/resolv.conf, the domains
|
struct, and there are domain/search entries in /etc/resolv.conf, the domains
|
||||||
of the options struct will be overridden.
|
of the options struct will be overridden.
|
||||||
|
|
||||||
* November 6
|
* November 6 2006
|
||||||
|
|
||||||
- Yang Tse removed a couple of potential zero size memory allocations.
|
- Yang Tse removed a couple of potential zero size memory allocations.
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/vc.dsw vc/ahost/ahost.dep \
|
|||||||
# adig and ahost are just sample programs and thus not mentioned with the
|
# adig and ahost are just sample programs and thus not mentioned with the
|
||||||
# regular sources and headers
|
# regular sources and headers
|
||||||
EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \
|
EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \
|
||||||
$(MSVCFILES) AUTHORS config-win32.h
|
$(MSVCFILES) AUTHORS config-win32.h RELEASE-NOTES libcares.pc.in
|
||||||
|
|
||||||
|
|
||||||
VER=-version-info 1:0:0
|
VER=-version-info 1:0:0
|
||||||
|
@@ -21,7 +21,7 @@ CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
|
|||||||
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
||||||
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
||||||
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
||||||
-UHAVE_CONFIG_H
|
-Dselect=select_s -UHAVE_CONFIG_H
|
||||||
|
|
||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
|
|
||||||
@@ -38,7 +38,6 @@ endif
|
|||||||
|
|
||||||
ifeq ($(USE_ZLIB),1)
|
ifeq ($(USE_ZLIB),1)
|
||||||
EX_LIBS += $(ZLIB_ROOT)/libz.a
|
EX_LIBS += $(ZLIB_ROOT)/libz.a
|
||||||
CFLAGS += -DUSE_MANUAL
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_IDNA),1)
|
ifeq ($(USE_IDNA),1)
|
||||||
@@ -55,10 +54,10 @@ all: $(OBJ_DIR) libcares.a ahost.exe adig.exe
|
|||||||
libcares.a: $(OBJECTS)
|
libcares.a: $(OBJECTS)
|
||||||
ar rs $@ $?
|
ar rs $@ $?
|
||||||
|
|
||||||
ahost.exe: ahost.c $(OBJ_HACK)
|
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||||
|
|
||||||
adig.exe: adig.c $(OBJ_HACK)
|
adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@@ -18,5 +18,5 @@ MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
|||||||
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.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_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
||||||
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
|
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
|
||||||
ares_getsock.3 ares_parse_ns_reply.3
|
ares_getsock.3 ares_parse_ns_reply.3 \
|
||||||
|
ares_destroy_options.3 ares_save_options.3
|
||||||
|
@@ -5,27 +5,30 @@
|
|||||||
## Use: make -f Makefile.m32 [demos]
|
## Use: make -f Makefile.m32 [demos]
|
||||||
##
|
##
|
||||||
## Quick hack by Guenter; comments to: /dev/nul
|
## Quick hack by Guenter; comments to: /dev/nul
|
||||||
|
#
|
||||||
CC = gcc
|
|
||||||
RANLIB = ranlib
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
## Nothing more to do below this line!
|
## Nothing more to do below this line!
|
||||||
|
|
||||||
LIB=libcares.a
|
LIB = libcares.a
|
||||||
CC=gcc
|
|
||||||
CFLAGS=-O2 -Wall
|
|
||||||
LDFLAGS=-s
|
|
||||||
LIBS=-lwsock32
|
|
||||||
|
|
||||||
MANPAGES := $(patsubst %.c,%.o,$(wildcard ares_*.3))
|
CC = gcc
|
||||||
|
LD = gcc
|
||||||
|
RANLIB = ranlib
|
||||||
|
#RM = rm -f
|
||||||
|
|
||||||
OBJS := $(patsubst %.c,%.o,$(wildcard ares_*.c))
|
CFLAGS = -O2 -Wall
|
||||||
OBJS += windows_port.o inet_ntop.o inet_net_pton.o bitncmp.o
|
LDFLAGS = -s
|
||||||
|
LIBS = -lwsock32
|
||||||
|
|
||||||
$(LIB): ${OBJS}
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||||
ar cru $@ ${OBJS}
|
include Makefile.inc
|
||||||
${RANLIB} $@
|
|
||||||
|
OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
|
||||||
|
|
||||||
|
|
||||||
|
$(LIB): $(OBJLIB)
|
||||||
|
ar cru $@ $^
|
||||||
|
$(RANLIB) $@
|
||||||
|
|
||||||
all: $(LIB) demos
|
all: $(LIB) demos
|
||||||
|
|
||||||
@@ -34,16 +37,13 @@ demos: adig.exe ahost.exe
|
|||||||
tags:
|
tags:
|
||||||
etags *.[ch]
|
etags *.[ch]
|
||||||
|
|
||||||
adig.exe: adig.o $(LIB)
|
%.exe: %.o ares_getopt.o $(LIB)
|
||||||
${CC} ${LDFLAGS} -o $@ adig.o $(LIB) ${LIBS}
|
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
ahost.exe: ahost.o $(LIB)
|
$(OBJLIB): ares.h ares_dns.h ares_private.h
|
||||||
${CC} ${LDFLAGS} -o $@ ahost.o $(LIB) ${LIBS}
|
|
||||||
|
|
||||||
${OBJS}: ares.h ares_dns.h ares_private.h
|
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
${CC} -c ${CFLAGS} $<
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
|
||||||
check:
|
check:
|
||||||
|
|
||||||
@@ -61,8 +61,8 @@ install:
|
|||||||
done)
|
done)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${OBJS} $(LIB) adig.o adig.exe ahost.o ahost.exe
|
$(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config.cache config.log config.status Makefile
|
$(RM) config.cache config.log config.status Makefile
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#################################################################
|
#################################################################
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
## Makefile for building libares (NetWare version - gnu make)
|
## Makefile for building libcares (NetWare version - gnu make)
|
||||||
## Use: make -f Makefile.netware
|
## Use: make -f Makefile.netware
|
||||||
##
|
##
|
||||||
## Comments to: Guenter Knauf http://www.gknw.de/phpbb
|
## Comments to: Guenter Knauf http://www.gknw.de/phpbb
|
||||||
@@ -35,10 +35,10 @@ ifndef LIBARCH
|
|||||||
LIBARCH = LIBC
|
LIBARCH = LIBC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# must be equal to DEBUG or NDEBUG
|
# must be equal to NDEBUG or DEBUG, CURLDEBUG
|
||||||
|
ifndef DB
|
||||||
DB = NDEBUG
|
DB = NDEBUG
|
||||||
# DB = DEBUG
|
endif
|
||||||
# DB = CURLDEBUG
|
|
||||||
# Optimization: -O<n> or debugging: -g
|
# Optimization: -O<n> or debugging: -g
|
||||||
ifeq ($(DB),NDEBUG)
|
ifeq ($(DB),NDEBUG)
|
||||||
OPT = -O2
|
OPT = -O2
|
||||||
@@ -51,12 +51,20 @@ endif
|
|||||||
# Include the version info retrieved from curlver.h
|
# Include the version info retrieved from curlver.h
|
||||||
-include $(OBJDIR)/version.inc
|
-include $(OBJDIR)/version.inc
|
||||||
|
|
||||||
# The following line defines your compiler.
|
# The following lines defines your compiler.
|
||||||
|
ifdef CWFolder
|
||||||
|
METROWERKS = $(CWFolder)
|
||||||
|
endif
|
||||||
ifdef METROWERKS
|
ifdef METROWERKS
|
||||||
|
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
|
||||||
|
MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
|
||||||
CC = mwccnlm
|
CC = mwccnlm
|
||||||
else
|
else
|
||||||
CC = gcc
|
CC = gcc
|
||||||
endif
|
endif
|
||||||
|
# a native win32 awk can be downloaded from here:
|
||||||
|
# http://www.gknw.net/development/prgtools/awk-20050424.zip
|
||||||
|
AWK = awk
|
||||||
YACC = bison -y
|
YACC = bison -y
|
||||||
CP = cp -afv
|
CP = cp -afv
|
||||||
# RM = rm -f
|
# RM = rm -f
|
||||||
@@ -70,10 +78,11 @@ CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
|||||||
|
|
||||||
ifeq ($(CC),mwccnlm)
|
ifeq ($(CC),mwccnlm)
|
||||||
LD = mwldnlm
|
LD = mwldnlm
|
||||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) $(<:.def=.o) -o $@ -commandfile
|
LDFLAGS = -nostdlib $(PRELUDE) $(OBJEXE) $(<:.def=.o) -o $@ -commandfile
|
||||||
AR = mwldnlm
|
AR = mwldnlm
|
||||||
ARFLAGS = -type library -w nocmdline $(OBJDIR)/*.o -o
|
ARFLAGS = -nostdlib -type library -o
|
||||||
LIBEXT = lib
|
LIBEXT = lib
|
||||||
|
#RANLIB =
|
||||||
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
|
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
|
||||||
CFLAGS += -relax_pointers
|
CFLAGS += -relax_pointers
|
||||||
#CFLAGS += -w on
|
#CFLAGS += -w on
|
||||||
@@ -81,8 +90,10 @@ ifeq ($(LIBARCH),LIBC)
|
|||||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||||
CFLAGS += -align 4
|
CFLAGS += -align 4
|
||||||
else
|
else
|
||||||
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o
|
||||||
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
|
||||||
|
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
|
||||||
|
# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
|
||||||
CFLAGS += -align 1
|
CFLAGS += -align 1
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@@ -91,12 +102,16 @@ LDFLAGS = -T
|
|||||||
AR = ar
|
AR = ar
|
||||||
ARFLAGS = -cq
|
ARFLAGS = -cq
|
||||||
LIBEXT = a
|
LIBEXT = a
|
||||||
|
RANLIB = ranlib
|
||||||
CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
|
CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
|
||||||
CFLAGS += -Wall -Wno-format -Wno-uninitialized # -pedantic
|
CFLAGS += -Wall -Wno-format -Wno-uninitialized # -pedantic
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||||
else
|
else
|
||||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
# PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||||
|
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
|
||||||
|
# http://www.gknw.net/development/mk_nlm/gcc_pre.zip
|
||||||
|
PRELUDE = $(NDK_ROOT)/pre/prelude.o
|
||||||
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
|
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -106,14 +121,17 @@ SDK_CLIB = $(NDK_ROOT)/nwsdk
|
|||||||
SDK_LIBC = $(NDK_ROOT)/libc
|
SDK_LIBC = $(NDK_ROOT)/libc
|
||||||
|
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
INCLUDES += -I$(SDK_LIBC)/include
|
||||||
|
# INCLUDES += -I$(SDK_LIBC)/include/nks
|
||||||
# INCLUDES += -I$(SDK_LIBC)/include/winsock
|
# INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||||
CFLAGS += -D_POSIX_SOURCE
|
CFLAGS += -D_POSIX_SOURCE
|
||||||
# CFLAGS += -D__ANSIC__
|
|
||||||
else
|
else
|
||||||
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
INCLUDES += -I$(SDK_CLIB)/include/nlm
|
||||||
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
|
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
|
||||||
CFLAGS += -DNETDB_USE_INTERNET
|
# INCLUDES += -I$(SDK_CLIB)/include
|
||||||
|
endif
|
||||||
|
ifeq ($(DB),CURLDEBUG)
|
||||||
|
INCLUDES += -I../include
|
||||||
endif
|
endif
|
||||||
CFLAGS += -I. $(INCLUDES)
|
CFLAGS += -I. $(INCLUDES)
|
||||||
|
|
||||||
@@ -132,18 +150,19 @@ endif
|
|||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES)))
|
OBJLIB := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES)))
|
||||||
|
OBJEXE = $(OBJLIB) $(OBJDIR)/ares_getopt.o
|
||||||
|
|
||||||
.PHONY: lib nlm prebuild dist install clean
|
.PHONY: lib nlm prebuild dist install clean
|
||||||
|
|
||||||
lib: prebuild $(LTARGET)
|
lib: prebuild $(LTARGET)
|
||||||
|
|
||||||
nlm: prebuild $(TARGETS)
|
nlm: prebuild $(TARGETS)
|
||||||
|
|
||||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
|
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
|
||||||
|
|
||||||
dist: all
|
dist: all
|
||||||
-$(RM) $(OBJS) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
|
-$(RM) $(OBJLIB) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
|
||||||
-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
|
-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
|
||||||
|
|
||||||
install: $(INSTDIR) all
|
install: $(INSTDIR) all
|
||||||
@@ -158,12 +177,15 @@ clean:
|
|||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
-$(RM) -r arpa
|
-$(RM) -r arpa
|
||||||
|
|
||||||
%.$(LIBEXT): $(OBJS)
|
%.$(LIBEXT): $(OBJLIB)
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(AR) $(ARFLAGS) $@ $^
|
@$(AR) $(ARFLAGS) $@ $^
|
||||||
|
ifdef RANLIB
|
||||||
|
@$(RANLIB) $@
|
||||||
|
endif
|
||||||
|
|
||||||
%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJS)
|
%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJEXE)
|
||||||
@echo Linking $@
|
@echo Linking $@
|
||||||
@-$(RM) $@
|
@-$(RM) $@
|
||||||
@$(LD) $(LDFLAGS) $<
|
@$(LD) $(LDFLAGS) $<
|
||||||
@@ -180,7 +202,7 @@ $(OBJDIR)/%.o: %.c
|
|||||||
|
|
||||||
$(OBJDIR)/version.inc: ares_version.h $(OBJDIR)
|
$(OBJDIR)/version.inc: ares_version.h $(OBJDIR)
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@awk -f ../packages/NetWare/get_ver.awk $< > $@
|
@$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
|
||||||
|
|
||||||
$(OBJDIR)/%.xdc: Makefile.netware
|
$(OBJDIR)/%.xdc: Makefile.netware
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@@ -247,7 +269,7 @@ ifdef IMPORTS
|
|||||||
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
ifeq ($(LD),nlmconv)
|
ifeq ($(LD),nlmconv)
|
||||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
@echo $(DL)input $(OBJEXE)$(DL) >> $@
|
||||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||||
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
@@ -261,25 +283,77 @@ config.h: Makefile.netware
|
|||||||
@echo $(DL)#ifndef NETWARE$(DL) >> $@
|
@echo $(DL)#ifndef NETWARE$(DL) >> $@
|
||||||
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
|
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
|
||||||
@echo $(DL)#endif$(DL) >> $@
|
@echo $(DL)#endif$(DL) >> $@
|
||||||
@echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
|
|
||||||
@echo $(DL)#define VERSION "$(LIBCARES_VERSION_STR)"$(DL) >> $@
|
@echo $(DL)#define VERSION "$(LIBCARES_VERSION_STR)"$(DL) >> $@
|
||||||
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
|
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
|
ifeq ($(LIBARCH),CLIB)
|
||||||
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@
|
@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
|
@echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@
|
||||||
|
@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
||||||
|
@echo $(DL)#define DL_LDAP_FILE "ldapsdk.nlm"$(DL) >> $@
|
||||||
|
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||||
|
@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@
|
||||||
|
@echo $(DL)#define strcasecmp stricmp$(DL) >> $@
|
||||||
|
else
|
||||||
|
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
|
@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
|
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
|
@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
|
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||||
|
@echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
|
||||||
|
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
||||||
|
@echo $(DL)#define DL_LDAP_FILE "lldapsdk.nlm"$(DL) >> $@
|
||||||
|
endif
|
||||||
|
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@
|
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@
|
||||||
@@ -290,46 +364,26 @@ config.h: Makefile.netware
|
|||||||
@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
|
@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
|
@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
|
||||||
|
@echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
|
@echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
|
@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
|
||||||
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
|
@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
|
||||||
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
|
|
||||||
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
|
||||||
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
|
|
||||||
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
|
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
|
||||||
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
|
||||||
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
|
||||||
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
|
|
||||||
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
|
|
||||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
|
||||||
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
|
||||||
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
||||||
|
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
|
||||||
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
|
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
|
||||||
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
|
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
|
||||||
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
|
|
||||||
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
|
||||||
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
|
|
||||||
ifdef NW_WINSOCK
|
ifdef NW_WINSOCK
|
||||||
@echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
|
@echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
|
||||||
else
|
else
|
||||||
|
@@ -124,11 +124,11 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
|||||||
@echo ares_gettimeofday >> $@
|
@echo ares_gettimeofday >> $@
|
||||||
@echo ares_parse_aaaa_reply >> $@
|
@echo ares_parse_aaaa_reply >> $@
|
||||||
|
|
||||||
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib
|
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||||
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS)
|
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
||||||
|
|
||||||
adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib
|
adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||||
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS)
|
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
|
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
|
||||||
@@ -216,7 +216,7 @@ $(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
|
|||||||
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
||||||
ares_ipv6.h
|
ares_ipv6.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
|
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
|
||||||
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
|
||||||
@@ -229,3 +229,5 @@ $(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h
|
|||||||
|
|
||||||
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
|
||||||
ares_ipv6.h inet_ntop.h
|
ares_ipv6.h inet_ntop.h
|
||||||
|
|
||||||
|
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
|
||||||
|
9
ares/RELEASE-NOTES
Normal file
9
ares/RELEASE-NOTES
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
This is what's new and changed in the c-ares 1.4.1 release:
|
||||||
|
|
||||||
|
o
|
||||||
|
|
||||||
|
Thanks go to these friendly people for their efforts and contributions:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Have fun!
|
11
ares/adig.c
11
ares/adig.c
@@ -32,9 +32,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_GETOPT_H
|
|
||||||
#include <getopt.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -45,6 +42,7 @@
|
|||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_dns.h"
|
#include "ares_dns.h"
|
||||||
#include "inet_ntop.h"
|
#include "inet_ntop.h"
|
||||||
|
#include "ares_getopt.h"
|
||||||
|
|
||||||
#ifdef WATT32
|
#ifdef WATT32
|
||||||
#undef WIN32 /* Redefined in MingW headers */
|
#undef WIN32 /* Redefined in MingW headers */
|
||||||
@@ -55,11 +53,6 @@
|
|||||||
#define T_SRV 33 /* server selection */
|
#define T_SRV 33 /* server selection */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef optind
|
|
||||||
extern int optind;
|
|
||||||
extern char *optarg;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct nv {
|
struct nv {
|
||||||
const char *name;
|
const char *name;
|
||||||
int value;
|
int value;
|
||||||
@@ -163,7 +156,7 @@ int main(int argc, char **argv)
|
|||||||
options.flags = ARES_FLAG_NOCHECKRESP;
|
options.flags = ARES_FLAG_NOCHECKRESP;
|
||||||
options.servers = NULL;
|
options.servers = NULL;
|
||||||
options.nservers = 0;
|
options.nservers = 0;
|
||||||
while ((c = getopt(argc, argv, "df:s:c:t:T:U:")) != -1)
|
while ((c = ares_getopt(argc, argv, "df:s:c:t:T:U:")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
|
12
ares/ahost.c
12
ares/ahost.c
@@ -34,19 +34,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_H
|
|
||||||
#include <getopt.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_dns.h"
|
#include "ares_dns.h"
|
||||||
#include "inet_ntop.h"
|
#include "inet_ntop.h"
|
||||||
#include "inet_net_pton.h"
|
#include "inet_net_pton.h"
|
||||||
|
#include "ares_getopt.h"
|
||||||
#ifndef optind
|
|
||||||
extern int optind;
|
|
||||||
extern char *optarg;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_IN6_ADDR
|
#ifndef HAVE_STRUCT_IN6_ADDR
|
||||||
struct in6_addr
|
struct in6_addr
|
||||||
@@ -73,7 +65,7 @@ int main(int argc, char **argv)
|
|||||||
WSAStartup(wVersionRequested, &wsaData);
|
WSAStartup(wVersionRequested, &wsaData);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((c = getopt(argc,argv,"dt:h")) != -1)
|
while ((c = ares_getopt(argc,argv,"dt:h")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
|
30
ares/ares.h
30
ares/ares.h
@@ -20,12 +20,15 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if defined(_AIX) || defined(NETWARE)
|
#if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||||
libc5-based Linux systems. Only include it on system that are known to
|
libc5-based Linux systems. Only include it on system that are known to
|
||||||
require it! */
|
require it! */
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
|
||||||
|
#include <sys/bsdskt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(WATT32)
|
#if defined(WATT32)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@@ -94,6 +97,7 @@ extern "C" {
|
|||||||
#define ARES_OPT_DOMAINS (1 << 7)
|
#define ARES_OPT_DOMAINS (1 << 7)
|
||||||
#define ARES_OPT_LOOKUPS (1 << 8)
|
#define ARES_OPT_LOOKUPS (1 << 8)
|
||||||
#define ARES_OPT_SOCK_STATE_CB (1 << 9)
|
#define ARES_OPT_SOCK_STATE_CB (1 << 9)
|
||||||
|
#define ARES_OPT_SORTLIST (1 << 10)
|
||||||
|
|
||||||
/* Nameinfo flag values */
|
/* Nameinfo flag values */
|
||||||
#define ARES_NI_NOFQDN (1 << 0)
|
#define ARES_NI_NOFQDN (1 << 0)
|
||||||
@@ -136,6 +140,22 @@ extern "C" {
|
|||||||
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
|
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
|
||||||
ARES_GETSOCK_MAXNUM)))
|
ARES_GETSOCK_MAXNUM)))
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Typedef our socket type
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ares_socket_typedef
|
||||||
|
#ifdef WIN32
|
||||||
|
typedef SOCKET ares_socket_t;
|
||||||
|
#define ARES_SOCKET_BAD INVALID_SOCKET
|
||||||
|
#else
|
||||||
|
typedef int ares_socket_t;
|
||||||
|
#define ARES_SOCKET_BAD -1
|
||||||
|
#endif
|
||||||
|
#define ares_socket_typedef
|
||||||
|
#endif /* ares_socket_typedef */
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
typedef void (*ares_sock_state_cb)(void *data,
|
typedef void (*ares_sock_state_cb)(void *data,
|
||||||
SOCKET socket,
|
SOCKET socket,
|
||||||
@@ -148,6 +168,8 @@ typedef void (*ares_sock_state_cb)(void *data,
|
|||||||
int writable);
|
int writable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct apattern;
|
||||||
|
|
||||||
struct ares_options {
|
struct ares_options {
|
||||||
int flags;
|
int flags;
|
||||||
int timeout;
|
int timeout;
|
||||||
@@ -162,6 +184,8 @@ struct ares_options {
|
|||||||
char *lookups;
|
char *lookups;
|
||||||
ares_sock_state_cb sock_state_cb;
|
ares_sock_state_cb sock_state_cb;
|
||||||
void *sock_state_cb_data;
|
void *sock_state_cb_data;
|
||||||
|
struct apattern *sortlist;
|
||||||
|
int nsort;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hostent;
|
struct hostent;
|
||||||
@@ -179,6 +203,8 @@ typedef void (*ares_nameinfo_callback)(void *arg, int status,
|
|||||||
int ares_init(ares_channel *channelptr);
|
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);
|
||||||
|
int ares_save_options(ares_channel channel, struct ares_options *options, int *optmask);
|
||||||
|
void ares_destroy_options(struct ares_options *options);
|
||||||
void ares_destroy(ares_channel channel);
|
void ares_destroy(ares_channel channel);
|
||||||
void ares_cancel(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,
|
||||||
@@ -200,6 +226,8 @@ int ares_getsock(ares_channel channel, int *socks, int numsocks);
|
|||||||
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||||
struct timeval *tv);
|
struct timeval *tv);
|
||||||
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
|
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
|
||||||
|
void ares_process_fd(ares_channel channel, ares_socket_t read_fd,
|
||||||
|
ares_socket_t write_fd);
|
||||||
|
|
||||||
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
|
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);
|
||||||
|
@@ -183,6 +183,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
|||||||
free(hostent->h_addr_list);
|
free(hostent->h_addr_list);
|
||||||
free(hostent);
|
free(hostent);
|
||||||
}
|
}
|
||||||
|
*host = NULL;
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,19 @@
|
|||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_private.h"
|
#include "ares_private.h"
|
||||||
|
|
||||||
|
void ares_destroy_options(struct ares_options *options)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
free(options->servers);
|
||||||
|
for (i = 0; i < options->ndomains; i++)
|
||||||
|
free(options->domains[i]);
|
||||||
|
free(options->domains);
|
||||||
|
if(options->sortlist)
|
||||||
|
free(options->sortlist);
|
||||||
|
free(options->lookups);
|
||||||
|
}
|
||||||
|
|
||||||
void ares_destroy(ares_channel channel)
|
void ares_destroy(ares_channel channel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
39
ares/ares_destroy_options.3
Normal file
39
ares/ares_destroy_options.3
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
.\" $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_DESTROY_OPTIONS 3 "1 June 2007"
|
||||||
|
.SH NAME
|
||||||
|
ares_destroy_options \- Destroy options initialized with ares_save_options
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B void ares_destroy_options(struct ares_options *\fIoptions\fP)
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B ares_destroy_options
|
||||||
|
function destroys the options struct identified by
|
||||||
|
.IR options ,
|
||||||
|
freeing all memory allocated by ares_save_options.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_save_options (3),
|
||||||
|
.BR ares_init_options (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Brad House
|
||||||
|
.br
|
||||||
|
Copyright 1998 by the Massachusetts Institute of Technology.
|
@@ -33,12 +33,13 @@ allocated by one of the functions \fIares_parse_a_reply(3)\fP,
|
|||||||
.SH NOTES
|
.SH NOTES
|
||||||
It is not necessary (and is not correct) to free the host structure passed to
|
It is not necessary (and is not correct) to free the host structure passed to
|
||||||
the callback functions for \fIares_gethostbyname(3)\fP or
|
the callback functions for \fIares_gethostbyname(3)\fP or
|
||||||
\fIares_gethostbyaddr(3)\fP. The ares library will automatically free such
|
\fIares_gethostbyaddr(3)\fP. c-ares will automatically free such host
|
||||||
host structures when the callback returns.
|
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_aaaa_reply (3),
|
.BR ares_parse_aaaa_reply (3),
|
||||||
.BR ares_parse_ptr_reply (3)
|
.BR ares_parse_ptr_reply (3),
|
||||||
|
.BR ares_parse_ns_reply (3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
|
@@ -33,7 +33,8 @@ void ares_free_hostent(struct hostent *host)
|
|||||||
for (p = host->h_aliases; *p; p++)
|
for (p = host->h_aliases; *p; p++)
|
||||||
free(*p);
|
free(*p);
|
||||||
free(host->h_aliases);
|
free(host->h_aliases);
|
||||||
free(host->h_addr_list[0]);
|
free(host->h_addr_list[0]); /* no matter if there is one or many entries,
|
||||||
|
there is only one malloc for all of them */
|
||||||
free(host->h_addr_list);
|
free(host->h_addr_list);
|
||||||
free(host);
|
free(host);
|
||||||
}
|
}
|
||||||
|
@@ -295,7 +295,11 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* Lets just hope the OS uses TLS! */
|
/* Lets just hope the OS uses TLS! */
|
||||||
|
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
|
||||||
|
sep = getservbyport(port, (char*)proto);
|
||||||
|
#else
|
||||||
sep = getservbyport(port, proto);
|
sep = getservbyport(port, proto);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (sep && sep->s_name)
|
if (sep && sep->s_name)
|
||||||
|
123
ares/ares_getopt.c
Normal file
123
ares/ares_getopt.c
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
* Original file name getopt.c Initial import into the c-ares source tree
|
||||||
|
* on 2007-04-11. Lifted from version 5.2 of the 'Open Mash' project with
|
||||||
|
* the modified BSD license, BSD license without the advertising clause.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* getopt.c --
|
||||||
|
*
|
||||||
|
* Standard UNIX getopt function. Code is from BSD.
|
||||||
|
*
|
||||||
|
* Copyright (c) 1987-2001 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* A. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* B. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* C. Neither the names of the copyright holders nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from this
|
||||||
|
* software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
||||||
|
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* #if !defined(lint)
|
||||||
|
* static char sccsid[] = "@(#)getopt.c 8.2 (Berkeley) 4/2/94";
|
||||||
|
* #endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "ares_getopt.h"
|
||||||
|
|
||||||
|
int opterr = 1, /* if error message should be printed */
|
||||||
|
optind = 1, /* index into parent argv vector */
|
||||||
|
optopt, /* character checked for validity */
|
||||||
|
optreset; /* reset getopt */
|
||||||
|
char *optarg; /* argument associated with option */
|
||||||
|
|
||||||
|
#define BADCH (int)'?'
|
||||||
|
#define BADARG (int)':'
|
||||||
|
#define EMSG (char *)""
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ares_getopt --
|
||||||
|
* Parse argc/argv argument vector.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
ares_getopt(int nargc, char * const nargv[], const char *ostr)
|
||||||
|
{
|
||||||
|
static char *place = EMSG; /* option letter processing */
|
||||||
|
char *oli; /* option letter list index */
|
||||||
|
|
||||||
|
if (optreset || !*place) { /* update scanning pointer */
|
||||||
|
optreset = 0;
|
||||||
|
if (optind >= nargc || *(place = nargv[optind]) != '-') {
|
||||||
|
place = EMSG;
|
||||||
|
return (EOF);
|
||||||
|
}
|
||||||
|
if (place[1] && *++place == '-') { /* found "--" */
|
||||||
|
++optind;
|
||||||
|
place = EMSG;
|
||||||
|
return (EOF);
|
||||||
|
}
|
||||||
|
} /* option letter okay? */
|
||||||
|
if ((optopt = (int)*place++) == (int)':' ||
|
||||||
|
!(oli = strchr(ostr, optopt))) {
|
||||||
|
/*
|
||||||
|
* if the user didn't specify '-' as an option,
|
||||||
|
* assume it means EOF.
|
||||||
|
*/
|
||||||
|
if (optopt == (int)'-')
|
||||||
|
return (EOF);
|
||||||
|
if (!*place)
|
||||||
|
++optind;
|
||||||
|
if (opterr && *ostr != ':')
|
||||||
|
(void)fprintf(stderr,
|
||||||
|
"%s: illegal option -- %c\n", __FILE__, optopt);
|
||||||
|
return (BADCH);
|
||||||
|
}
|
||||||
|
if (*++oli != ':') { /* don't need argument */
|
||||||
|
optarg = NULL;
|
||||||
|
if (!*place)
|
||||||
|
++optind;
|
||||||
|
}
|
||||||
|
else { /* need an argument */
|
||||||
|
if (*place) /* no white space */
|
||||||
|
optarg = place;
|
||||||
|
else if (nargc <= ++optind) { /* no arg */
|
||||||
|
place = EMSG;
|
||||||
|
if (*ostr == ':')
|
||||||
|
return (BADARG);
|
||||||
|
if (opterr)
|
||||||
|
(void)fprintf(stderr,
|
||||||
|
"%s: option requires an argument -- %c\n",
|
||||||
|
__FILE__, optopt);
|
||||||
|
return (BADCH);
|
||||||
|
}
|
||||||
|
else /* white space */
|
||||||
|
optarg = nargv[optind];
|
||||||
|
place = EMSG;
|
||||||
|
++optind;
|
||||||
|
}
|
||||||
|
return (optopt); /* dump back option letter */
|
||||||
|
}
|
41
ares/ares_getopt.h
Normal file
41
ares/ares_getopt.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef ARES_GETOPT_H
|
||||||
|
#define ARES_GETOPT_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 1987-2001 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* A. Redistributions of source code must retain the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer.
|
||||||
|
* B. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
* C. Neither the names of the copyright holders nor the names of its
|
||||||
|
* contributors may be used to endorse or promote products derived from this
|
||||||
|
* software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
||||||
|
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||||
|
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
int ares_getopt(int nargc, char * const nargv[], const char *ostr);
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
extern int optind;
|
||||||
|
extern int opterr;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* ARES_GETOPT_H */
|
199
ares/ares_init.c
199
ares/ares_init.c
@@ -23,7 +23,10 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -61,7 +64,7 @@
|
|||||||
#undef WIN32 /* Redefined in MingW/MSVC headers */
|
#undef WIN32 /* Redefined in MingW/MSVC headers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int init_by_options(ares_channel channel, struct ares_options *options,
|
static int init_by_options(ares_channel channel, const struct ares_options *options,
|
||||||
int optmask);
|
int optmask);
|
||||||
static int init_by_environment(ares_channel channel);
|
static int init_by_environment(ares_channel channel);
|
||||||
static int init_by_resolv_conf(ares_channel channel);
|
static int init_by_resolv_conf(ares_channel channel);
|
||||||
@@ -72,6 +75,8 @@ static int config_nameserver(struct server_state **servers, int *nservers,
|
|||||||
static int set_search(ares_channel channel, const char *str);
|
static int set_search(ares_channel channel, const char *str);
|
||||||
static int set_options(ares_channel channel, const char *str);
|
static int set_options(ares_channel channel, const char *str);
|
||||||
static const char *try_option(const char *p, const char *q, const char *opt);
|
static const char *try_option(const char *p, const char *q, const char *opt);
|
||||||
|
static void init_id_key(rc4_key* key,int key_data_len);
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
|
static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
|
||||||
static int ip_addr(const char *s, int len, struct in_addr *addr);
|
static int ip_addr(const char *s, int len, struct in_addr *addr);
|
||||||
@@ -84,6 +89,12 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
|||||||
static char *try_config(char *s, const char *opt);
|
static char *try_config(char *s, const char *opt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ARES_CONFIG_CHECK(x) (x->lookups && x->nsort > -1 && \
|
||||||
|
x->nservers > -1 && \
|
||||||
|
x->ndomains > -1 && \
|
||||||
|
x->ndots > -1 && x->timeout > -1 && \
|
||||||
|
x->tries > -1)
|
||||||
|
|
||||||
int ares_init(ares_channel *channelptr)
|
int ares_init(ares_channel *channelptr)
|
||||||
{
|
{
|
||||||
return ares_init_options(channelptr, NULL, 0);
|
return ares_init_options(channelptr, NULL, 0);
|
||||||
@@ -96,7 +107,6 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
int i;
|
int i;
|
||||||
int status = ARES_SUCCESS;
|
int status = ARES_SUCCESS;
|
||||||
struct server_state *server;
|
struct server_state *server;
|
||||||
struct timeval tv;
|
|
||||||
|
|
||||||
#ifdef CURLDEBUG
|
#ifdef CURLDEBUG
|
||||||
const char *env = getenv("CARES_MEMDEBUG");
|
const char *env = getenv("CARES_MEMDEBUG");
|
||||||
@@ -197,22 +207,85 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
server->qtail = NULL;
|
server->qtail = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Choose a somewhat random query ID. The main point is to avoid
|
init_id_key(&channel->id_key, ARES_ID_KEY_LEN);
|
||||||
* collisions with stale queries. An attacker trying to spoof a DNS
|
|
||||||
* answer also has to guess the query ID, but it's only a 16-bit
|
|
||||||
* field, so there's not much to be done about that.
|
|
||||||
*/
|
|
||||||
gettimeofday(&tv, NULL);
|
|
||||||
channel->next_id = (unsigned short)
|
|
||||||
((tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff);
|
|
||||||
|
|
||||||
|
channel->next_id = ares__generate_new_id(&channel->id_key);
|
||||||
channel->queries = NULL;
|
channel->queries = NULL;
|
||||||
|
|
||||||
*channelptr = channel;
|
*channelptr = channel;
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_by_options(ares_channel channel, struct ares_options *options,
|
/* Save options from initialized channel */
|
||||||
|
int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||||
|
int *optmask)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Zero everything out */
|
||||||
|
memset(options, 0, sizeof(struct ares_options));
|
||||||
|
|
||||||
|
if (!ARES_CONFIG_CHECK(channel))
|
||||||
|
return ARES_ENODATA;
|
||||||
|
|
||||||
|
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TIMEOUT|ARES_OPT_TRIES|ARES_OPT_NDOTS|
|
||||||
|
ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB|
|
||||||
|
ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS|
|
||||||
|
ARES_OPT_SORTLIST);
|
||||||
|
|
||||||
|
/* Copy easy stuff */
|
||||||
|
options->flags = channel->flags;
|
||||||
|
options->timeout = channel->timeout;
|
||||||
|
options->tries = channel->tries;
|
||||||
|
options->ndots = channel->ndots;
|
||||||
|
options->udp_port = channel->udp_port;
|
||||||
|
options->tcp_port = channel->tcp_port;
|
||||||
|
options->sock_state_cb = channel->sock_state_cb;
|
||||||
|
options->sock_state_cb_data = channel->sock_state_cb_data;
|
||||||
|
|
||||||
|
/* Copy servers */
|
||||||
|
options->servers =
|
||||||
|
malloc(channel->nservers * sizeof(struct server_state));
|
||||||
|
if (!options->servers && channel->nservers != 0)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
for (i = 0; i < channel->nservers; i++)
|
||||||
|
options->servers[i] = channel->servers[i].addr;
|
||||||
|
options->nservers = channel->nservers;
|
||||||
|
|
||||||
|
/* copy domains */
|
||||||
|
options->domains = malloc(channel->ndomains * sizeof(char *));
|
||||||
|
if (!options->domains)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
for (i = 0; i < channel->ndomains; i++)
|
||||||
|
{
|
||||||
|
options->ndomains = i;
|
||||||
|
options->domains[i] = strdup(channel->domains[i]);
|
||||||
|
if (!options->domains[i])
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
}
|
||||||
|
options->ndomains = channel->ndomains;
|
||||||
|
|
||||||
|
/* copy lookups */
|
||||||
|
options->lookups = strdup(channel->lookups);
|
||||||
|
if (!options->lookups)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
|
||||||
|
/* copy sortlist */
|
||||||
|
options->sortlist = malloc(channel->nsort * sizeof(struct apattern));
|
||||||
|
if (!options->sortlist)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
for (i = 0; i < channel->nsort; i++)
|
||||||
|
{
|
||||||
|
memcpy(&(options->sortlist[i]), &(channel->sortlist[i]),
|
||||||
|
sizeof(struct apattern));
|
||||||
|
}
|
||||||
|
options->nsort = channel->nsort;
|
||||||
|
|
||||||
|
return ARES_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int init_by_options(ares_channel channel,
|
||||||
|
const struct ares_options *options,
|
||||||
int optmask)
|
int optmask)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -282,6 +355,19 @@ static int init_by_options(ares_channel channel, struct ares_options *options,
|
|||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* copy sortlist */
|
||||||
|
if ((optmask & ARES_OPT_SORTLIST) && channel->nsort == -1)
|
||||||
|
{
|
||||||
|
channel->sortlist = malloc(options->nsort * sizeof(struct apattern));
|
||||||
|
if (!channel->sortlist)
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
for (i = 0; i < options->nsort; i++)
|
||||||
|
{
|
||||||
|
memcpy(&(channel->sortlist[i]), &(options->sortlist[i]), sizeof(struct apattern));
|
||||||
|
}
|
||||||
|
channel->nsort = options->nsort;
|
||||||
|
}
|
||||||
|
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,6 +641,10 @@ DhcpNameServer
|
|||||||
|
|
||||||
if (status == ARES_SUCCESS)
|
if (status == ARES_SUCCESS)
|
||||||
status = ARES_EOF;
|
status = ARES_EOF;
|
||||||
|
else
|
||||||
|
/* Catch the case when all the above checks fail (which happens when there
|
||||||
|
is no network card or the cable is unplugged) */
|
||||||
|
status = ARES_EFILE;
|
||||||
|
|
||||||
#elif defined(__riscos__)
|
#elif defined(__riscos__)
|
||||||
|
|
||||||
@@ -611,6 +701,10 @@ DhcpNameServer
|
|||||||
int linesize;
|
int linesize;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
/* Don't read resolv.conf and friends if we don't have to */
|
||||||
|
if (ARES_CONFIG_CHECK(channel))
|
||||||
|
return ARES_SUCCESS;
|
||||||
|
|
||||||
fp = fopen(PATH_RESOLV_CONF, "r");
|
fp = fopen(PATH_RESOLV_CONF, "r");
|
||||||
if (fp) {
|
if (fp) {
|
||||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
@@ -968,7 +1062,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
|||||||
ipbufpfx[0] = '\0';
|
ipbufpfx[0] = '\0';
|
||||||
/* Lets see if it is CIDR */
|
/* Lets see if it is CIDR */
|
||||||
/* First we'll try IPv6 */
|
/* First we'll try IPv6 */
|
||||||
if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx ? ipbufpfx : ipbuf,
|
if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx[0] ? ipbufpfx : ipbuf,
|
||||||
&pat.addr.addr6,
|
&pat.addr.addr6,
|
||||||
sizeof(pat.addr.addr6))) > 0)
|
sizeof(pat.addr.addr6))) > 0)
|
||||||
{
|
{
|
||||||
@@ -978,7 +1072,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
|||||||
if (!sortlist_alloc(sortlist, nsort, &pat))
|
if (!sortlist_alloc(sortlist, nsort, &pat))
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
if (ipbufpfx &&
|
if (ipbufpfx[0] &&
|
||||||
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4,
|
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4,
|
||||||
sizeof(pat.addr.addr4))) > 0)
|
sizeof(pat.addr.addr4))) > 0)
|
||||||
{
|
{
|
||||||
@@ -991,7 +1085,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
|||||||
/* See if it is just a regular IP */
|
/* See if it is just a regular IP */
|
||||||
else if (ip_addr(ipbuf, (int)(q-str), &pat.addr.addr4) == 0)
|
else if (ip_addr(ipbuf, (int)(q-str), &pat.addr.addr4) == 0)
|
||||||
{
|
{
|
||||||
if (ipbufpfx)
|
if (ipbufpfx[0])
|
||||||
{
|
{
|
||||||
memcpy(ipbuf, str, (int)(q-str));
|
memcpy(ipbuf, str, (int)(q-str));
|
||||||
ipbuf[(int)(q-str)] = '\0';
|
ipbuf[(int)(q-str)] = '\0';
|
||||||
@@ -1175,3 +1269,80 @@ static void natural_mask(struct apattern *pat)
|
|||||||
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET);
|
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* initialize an rc4 key. If possible a cryptographically secure random key
|
||||||
|
is generated using a suitable function (for example win32's RtlGenRandom as
|
||||||
|
described in
|
||||||
|
http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx
|
||||||
|
otherwise the code defaults to cross-platform albeit less secure mechanism
|
||||||
|
using rand
|
||||||
|
*/
|
||||||
|
static void randomize_key(unsigned char* key,int key_data_len)
|
||||||
|
{
|
||||||
|
int randomized = 0;
|
||||||
|
int counter=0;
|
||||||
|
#ifdef WIN32
|
||||||
|
HMODULE lib=LoadLibrary("ADVAPI32.DLL");
|
||||||
|
if (lib) {
|
||||||
|
BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
|
||||||
|
(BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(lib,"SystemFunction036");
|
||||||
|
if (pfn && pfn(key,key_data_len) )
|
||||||
|
randomized = 1;
|
||||||
|
|
||||||
|
FreeLibrary(lib);
|
||||||
|
}
|
||||||
|
#else /* !WIN32 */
|
||||||
|
#ifdef RANDOM_FILE
|
||||||
|
char buffer[256];
|
||||||
|
FILE *f = fopen(RANDOM_FILE, "rb");
|
||||||
|
if(f) {
|
||||||
|
size_t i;
|
||||||
|
size_t rc = fread(buffer, key_data_len, 1, f);
|
||||||
|
for(i=0; i<rc && counter < key_data_len; i++)
|
||||||
|
key[counter++]=buffer[i];
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* WIN32 */
|
||||||
|
|
||||||
|
if ( !randomized ) {
|
||||||
|
for (;counter<key_data_len;counter++)
|
||||||
|
key[counter]=rand() % 256;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init_id_key(rc4_key* key,int key_data_len)
|
||||||
|
{
|
||||||
|
unsigned char index1;
|
||||||
|
unsigned char index2;
|
||||||
|
unsigned char* state;
|
||||||
|
short counter;
|
||||||
|
unsigned char *key_data_ptr = 0;
|
||||||
|
|
||||||
|
key_data_ptr = calloc(1,key_data_len);
|
||||||
|
randomize_key(key->state,key_data_len);
|
||||||
|
state = &key->state[0];
|
||||||
|
for(counter = 0; counter < 256; counter++)
|
||||||
|
/* unnecessary AND but it keeps some compilers happier */
|
||||||
|
state[counter] = counter & 0xff;
|
||||||
|
key->x = 0;
|
||||||
|
key->y = 0;
|
||||||
|
index1 = 0;
|
||||||
|
index2 = 0;
|
||||||
|
for(counter = 0; counter < 256; counter++)
|
||||||
|
{
|
||||||
|
index2 = (key_data_ptr[index1] + state[counter] +
|
||||||
|
index2) % 256;
|
||||||
|
ARES_SWAP_BYTE(&state[counter], &state[index2]);
|
||||||
|
|
||||||
|
index1 = (index1 + 1) % key_data_len;
|
||||||
|
}
|
||||||
|
free(key_data_ptr);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
short ares__generate_new_id(rc4_key* key)
|
||||||
|
{
|
||||||
|
short r=0;
|
||||||
|
ares__rc4(key, (unsigned char *)&r, sizeof(r));
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
@@ -80,6 +80,8 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ARES_ID_KEY_LEN 31
|
||||||
|
|
||||||
#include "ares_ipv6.h"
|
#include "ares_ipv6.h"
|
||||||
|
|
||||||
struct send_request {
|
struct send_request {
|
||||||
@@ -156,6 +158,13 @@ struct apattern {
|
|||||||
unsigned short type;
|
unsigned short type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct rc4_key
|
||||||
|
{
|
||||||
|
unsigned char state[256];
|
||||||
|
unsigned char x;
|
||||||
|
unsigned char y;
|
||||||
|
} rc4_key;
|
||||||
|
|
||||||
struct ares_channeldata {
|
struct ares_channeldata {
|
||||||
/* Configuration data */
|
/* Configuration data */
|
||||||
int flags;
|
int flags;
|
||||||
@@ -176,6 +185,8 @@ struct ares_channeldata {
|
|||||||
|
|
||||||
/* ID to use for next query */
|
/* ID to use for next query */
|
||||||
unsigned short next_id;
|
unsigned short next_id;
|
||||||
|
/* key to use when generating new ids */
|
||||||
|
rc4_key id_key;
|
||||||
|
|
||||||
/* Active queries */
|
/* Active queries */
|
||||||
struct query *queries;
|
struct query *queries;
|
||||||
@@ -184,10 +195,15 @@ struct ares_channeldata {
|
|||||||
void *sock_state_cb_data;
|
void *sock_state_cb_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||||
void ares__send_query(ares_channel channel, struct query *query, time_t now);
|
void ares__send_query(ares_channel channel, struct query *query, time_t now);
|
||||||
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
||||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
||||||
int ares__read_line(FILE *fp, char **buf, int *bufsize);
|
int ares__read_line(FILE *fp, char **buf, int *bufsize);
|
||||||
|
short ares__generate_new_id(rc4_key* key);
|
||||||
|
|
||||||
|
#define ARES_SWAP_BYTE(a,b) \
|
||||||
|
{ unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
|
||||||
|
|
||||||
#define SOCK_STATE_CALLBACK(c, s, r, w) \
|
#define SOCK_STATE_CALLBACK(c, s, r, w) \
|
||||||
do { \
|
do { \
|
||||||
|
@@ -24,16 +24,16 @@ ares_process \- Process events for name resolution
|
|||||||
.B void ares_process(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
|
.B void ares_process(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
|
||||||
.B fd_set *\fIwrite_fds\fP)
|
.B fd_set *\fIwrite_fds\fP)
|
||||||
.fi
|
.fi
|
||||||
|
.PP
|
||||||
|
.B void ares_process_fd(ares_channel \fIchannel\fP,
|
||||||
|
.B ares_socket_t \fIread_fd\fP,
|
||||||
|
.B ares_socket_t \fIwrite_fd\fP)
|
||||||
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The \fBares_process(3)\fP function handles input/output events and timeouts
|
||||||
.B ares_process
|
associated with queries pending on the name service channel identified by
|
||||||
function handles input/output events and timeouts associated with
|
|
||||||
queries pending on the name service channel identified by
|
|
||||||
.IR channel .
|
.IR channel .
|
||||||
The file descriptor sets pointed to by
|
The file descriptor sets pointed to by \fIread_fds\fP and \fIwrite_fds\fP
|
||||||
.I read_fds
|
|
||||||
and
|
|
||||||
.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 \fIares_fds(3)\fP are ready for reading and writing.
|
descriptors specified by \fIares_fds(3)\fP are ready for reading and writing.
|
||||||
(The easiest way to determine this information is to invoke
|
(The easiest way to determine this information is to invoke
|
||||||
@@ -44,6 +44,11 @@ The
|
|||||||
.B ares_process
|
.B ares_process
|
||||||
function will invoke callbacks for pending queries if they complete
|
function will invoke callbacks for pending queries if they complete
|
||||||
successfully or fail.
|
successfully or fail.
|
||||||
|
|
||||||
|
\fBares_process_fd(3)\fP works the same way but acts and operates only on the
|
||||||
|
specific file descriptors (sockets) you pass in to the function. Use
|
||||||
|
ARES_SOCKET_BAD for "no action". This function is of course provided to allow
|
||||||
|
users of c-ares to void select() in their applications and within c-ares.
|
||||||
.SS EXAMPLE
|
.SS EXAMPLE
|
||||||
The following code fragment waits for all pending queries on a channel
|
The following code fragment waits for all pending queries on a channel
|
||||||
to complete:
|
to complete:
|
||||||
|
@@ -56,13 +56,14 @@
|
|||||||
|
|
||||||
static int try_again(int errnum);
|
static int try_again(int errnum);
|
||||||
static void write_tcp_data(ares_channel channel, fd_set *write_fds,
|
static void write_tcp_data(ares_channel channel, fd_set *write_fds,
|
||||||
time_t now);
|
ares_socket_t write_fd, time_t now);
|
||||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now);
|
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||||
|
ares_socket_t read_fd, time_t now);
|
||||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||||
time_t now);
|
ares_socket_t read_fd, time_t now);
|
||||||
static void process_timeouts(ares_channel channel, time_t now);
|
static void process_timeouts(ares_channel channel, time_t now);
|
||||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||||
int alen, int whichserver, int tcp, int now);
|
int alen, int whichserver, int tcp, time_t now);
|
||||||
static void handle_error(ares_channel channel, int whichserver, time_t now);
|
static void handle_error(ares_channel channel, int whichserver, time_t now);
|
||||||
static struct query *next_server(ares_channel channel, struct query *query, time_t now);
|
static struct query *next_server(ares_channel channel, struct query *query, time_t now);
|
||||||
static int open_tcp_socket(ares_channel channel, struct server_state *server);
|
static int open_tcp_socket(ares_channel channel, struct server_state *server);
|
||||||
@@ -80,12 +81,30 @@ void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
|
|||||||
time_t now;
|
time_t now;
|
||||||
|
|
||||||
time(&now);
|
time(&now);
|
||||||
write_tcp_data(channel, write_fds, now);
|
write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, now);
|
||||||
read_tcp_data(channel, read_fds, now);
|
read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||||
read_udp_packets(channel, read_fds, now);
|
read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||||
process_timeouts(channel, now);
|
process_timeouts(channel, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Something interesting happened on the wire, or there was a timeout.
|
||||||
|
* See what's up and respond accordingly.
|
||||||
|
*/
|
||||||
|
void ares_process_fd(ares_channel channel,
|
||||||
|
ares_socket_t read_fd, /* use ARES_SOCKET_BAD or valid
|
||||||
|
file descriptors */
|
||||||
|
ares_socket_t write_fd)
|
||||||
|
{
|
||||||
|
time_t now;
|
||||||
|
|
||||||
|
time(&now);
|
||||||
|
write_tcp_data(channel, NULL, write_fd, now);
|
||||||
|
read_tcp_data(channel, NULL, read_fd, now);
|
||||||
|
read_udp_packets(channel, NULL, read_fd, now);
|
||||||
|
process_timeouts(channel, now);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return 1 if the specified error number describes a readiness error, or 0
|
/* Return 1 if the specified error number describes a readiness error, or 0
|
||||||
* otherwise. This is mostly for HP-UX, which could return EAGAIN or
|
* otherwise. This is mostly for HP-UX, which could return EAGAIN or
|
||||||
* EWOULDBLOCK. See this man page
|
* EWOULDBLOCK. See this man page
|
||||||
@@ -114,7 +133,10 @@ static int try_again(int errnum)
|
|||||||
/* If any TCP sockets select true for writing, write out queued data
|
/* If any TCP sockets select true for writing, write out queued data
|
||||||
* we have for them.
|
* we have for them.
|
||||||
*/
|
*/
|
||||||
static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
|
static void write_tcp_data(ares_channel channel,
|
||||||
|
fd_set *write_fds,
|
||||||
|
ares_socket_t write_fd,
|
||||||
|
time_t now)
|
||||||
{
|
{
|
||||||
struct server_state *server;
|
struct server_state *server;
|
||||||
struct send_request *sendreq;
|
struct send_request *sendreq;
|
||||||
@@ -124,14 +146,27 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
|
|||||||
ssize_t wcount;
|
ssize_t wcount;
|
||||||
size_t n;
|
size_t n;
|
||||||
|
|
||||||
|
if(!write_fds && (write_fd == ARES_SOCKET_BAD))
|
||||||
|
/* no possible action */
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < channel->nservers; i++)
|
for (i = 0; i < channel->nservers; i++)
|
||||||
{
|
{
|
||||||
/* Make sure server has data to send and is selected in write_fds. */
|
/* Make sure server has data to send and is selected in write_fds or
|
||||||
|
write_fd. */
|
||||||
server = &channel->servers[i];
|
server = &channel->servers[i];
|
||||||
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD
|
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD)
|
||||||
|| !FD_ISSET(server->tcp_socket, write_fds))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(write_fds) {
|
||||||
|
if(!FD_ISSET(server->tcp_socket, write_fds))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(server->tcp_socket != write_fd)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Count the number of send queue items. */
|
/* Count the number of send queue items. */
|
||||||
n = 0;
|
n = 0;
|
||||||
for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
|
for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
|
||||||
@@ -218,20 +253,33 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
|
|||||||
* allocate a buffer if we finish reading the length word, and process
|
* allocate a buffer if we finish reading the length word, and process
|
||||||
* a packet if we finish reading one.
|
* a packet if we finish reading one.
|
||||||
*/
|
*/
|
||||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now)
|
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||||
|
ares_socket_t read_fd, time_t now)
|
||||||
{
|
{
|
||||||
struct server_state *server;
|
struct server_state *server;
|
||||||
int i;
|
int i;
|
||||||
ssize_t count;
|
ssize_t count;
|
||||||
|
|
||||||
|
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
|
||||||
|
/* no possible action */
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < channel->nservers; i++)
|
for (i = 0; i < channel->nservers; i++)
|
||||||
{
|
{
|
||||||
/* Make sure the server has a socket and is selected in read_fds. */
|
/* Make sure the server has a socket and is selected in read_fds. */
|
||||||
server = &channel->servers[i];
|
server = &channel->servers[i];
|
||||||
if (server->tcp_socket == ARES_SOCKET_BAD ||
|
if (server->tcp_socket == ARES_SOCKET_BAD)
|
||||||
!FD_ISSET(server->tcp_socket, read_fds))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(read_fds) {
|
||||||
|
if(!FD_ISSET(server->tcp_socket, read_fds))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(server->tcp_socket != read_fd)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (server->tcp_lenbuf_pos != 2)
|
if (server->tcp_lenbuf_pos != 2)
|
||||||
{
|
{
|
||||||
/* We haven't yet read a length word, so read that (or
|
/* We haven't yet read a length word, so read that (or
|
||||||
@@ -294,22 +342,34 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now)
|
|||||||
|
|
||||||
/* If any UDP sockets select true for reading, process them. */
|
/* If any UDP sockets select true for reading, process them. */
|
||||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||||
time_t now)
|
ares_socket_t read_fd, time_t now)
|
||||||
{
|
{
|
||||||
struct server_state *server;
|
struct server_state *server;
|
||||||
int i;
|
int i;
|
||||||
ssize_t count;
|
ssize_t count;
|
||||||
unsigned char buf[PACKETSZ + 1];
|
unsigned char buf[PACKETSZ + 1];
|
||||||
|
|
||||||
|
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
|
||||||
|
/* no possible action */
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < channel->nservers; i++)
|
for (i = 0; i < channel->nservers; i++)
|
||||||
{
|
{
|
||||||
/* Make sure the server has a socket and is selected in read_fds. */
|
/* Make sure the server has a socket and is selected in read_fds. */
|
||||||
server = &channel->servers[i];
|
server = &channel->servers[i];
|
||||||
|
|
||||||
if (server->udp_socket == ARES_SOCKET_BAD ||
|
if (server->udp_socket == ARES_SOCKET_BAD)
|
||||||
!FD_ISSET(server->udp_socket, read_fds))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(read_fds) {
|
||||||
|
if(!FD_ISSET(server->udp_socket, read_fds))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(server->udp_socket != read_fd)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
count = sread(server->udp_socket, buf, sizeof(buf));
|
count = sread(server->udp_socket, buf, sizeof(buf));
|
||||||
if (count == -1 && try_again(SOCKERRNO))
|
if (count == -1 && try_again(SOCKERRNO))
|
||||||
continue;
|
continue;
|
||||||
@@ -338,9 +398,10 @@ static void process_timeouts(ares_channel channel, time_t now)
|
|||||||
|
|
||||||
/* Handle an answer from a server. */
|
/* Handle an answer from a server. */
|
||||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||||
int alen, int whichserver, int tcp, int now)
|
int alen, int whichserver, int tcp, time_t now)
|
||||||
{
|
{
|
||||||
int id, tc, rcode;
|
int tc, rcode;
|
||||||
|
unsigned short id;
|
||||||
struct query *query;
|
struct query *query;
|
||||||
|
|
||||||
/* If there's no room in the answer for a header, we can't do much
|
/* If there's no room in the answer for a header, we can't do much
|
||||||
|
@@ -39,6 +39,64 @@ struct qquery {
|
|||||||
|
|
||||||
static void qcallback(void *arg, int status, unsigned char *abuf, int alen);
|
static void qcallback(void *arg, int status, unsigned char *abuf, int alen);
|
||||||
|
|
||||||
|
void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
|
||||||
|
{
|
||||||
|
unsigned char x;
|
||||||
|
unsigned char y;
|
||||||
|
unsigned char* state;
|
||||||
|
unsigned char xorIndex;
|
||||||
|
short counter;
|
||||||
|
|
||||||
|
x = key->x;
|
||||||
|
y = key->y;
|
||||||
|
|
||||||
|
state = &key->state[0];
|
||||||
|
for(counter = 0; counter < buffer_len; counter ++)
|
||||||
|
{
|
||||||
|
x = (x + 1) % 256;
|
||||||
|
y = (state[x] + y) % 256;
|
||||||
|
ARES_SWAP_BYTE(&state[x], &state[y]);
|
||||||
|
|
||||||
|
xorIndex = (state[x] + state[y]) % 256;
|
||||||
|
|
||||||
|
buffer_ptr[counter] ^= state[xorIndex];
|
||||||
|
}
|
||||||
|
key->x = x;
|
||||||
|
key->y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct query* find_query_by_id(ares_channel channel, int id)
|
||||||
|
{
|
||||||
|
unsigned short qid;
|
||||||
|
struct query* q;
|
||||||
|
DNS_HEADER_SET_QID(((unsigned char*)&qid), id);
|
||||||
|
|
||||||
|
/* Find the query corresponding to this packet. */
|
||||||
|
for (q = channel->queries; q; q = q->next)
|
||||||
|
{
|
||||||
|
if (q->qid == qid)
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* a unique query id is generated using an rc4 key. Since the id may already
|
||||||
|
be used by a running query (as infrequent as it may be), a lookup is
|
||||||
|
performed per id generation. In practice this search should happen only
|
||||||
|
once per newly generated id
|
||||||
|
*/
|
||||||
|
static int generate_unique_id(ares_channel channel)
|
||||||
|
{
|
||||||
|
int id;
|
||||||
|
|
||||||
|
do {
|
||||||
|
id = ares__generate_new_id(&channel->id_key);
|
||||||
|
} while (find_query_by_id(channel,id));
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||||
int type, ares_callback callback, void *arg)
|
int type, ares_callback callback, void *arg)
|
||||||
{
|
{
|
||||||
@@ -50,13 +108,14 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
|
|||||||
rd = !(channel->flags & ARES_FLAG_NORECURSE);
|
rd = !(channel->flags & ARES_FLAG_NORECURSE);
|
||||||
status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf,
|
status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf,
|
||||||
&qlen);
|
&qlen);
|
||||||
channel->next_id++;
|
|
||||||
if (status != ARES_SUCCESS)
|
if (status != ARES_SUCCESS)
|
||||||
{
|
{
|
||||||
callback(arg, status, NULL, 0);
|
callback(arg, status, NULL, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
channel->next_id = generate_unique_id(channel);
|
||||||
|
|
||||||
/* Allocate and fill in the query structure. */
|
/* Allocate and fill in the query structure. */
|
||||||
qquery = malloc(sizeof(struct qquery));
|
qquery = malloc(sizeof(struct qquery));
|
||||||
if (!qquery)
|
if (!qquery)
|
||||||
|
49
ares/ares_save_options.3
Normal file
49
ares/ares_save_options.3
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
.\" $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_SAVE_OPTIONS 3 "1 June 2007"
|
||||||
|
.SH NAME
|
||||||
|
ares_save_options \- Save configuration values obtained from initialized ares_channel
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B void ares_save_options(ares_channel \fIchannel\fP, struct ares_options *\fIoptions\fP, int *\fIoptmask\fP)
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B ares_save_options
|
||||||
|
function saves the channel data identified by
|
||||||
|
.IR channel ,
|
||||||
|
into the options struct identified by
|
||||||
|
.IR options ,
|
||||||
|
and saves the mask of options which are set to the integer
|
||||||
|
pointer (passed by reference) identified by
|
||||||
|
.IR optmask .
|
||||||
|
|
||||||
|
The resultant options and optmask are then able to be
|
||||||
|
passed directly to ares_init_options. When the options
|
||||||
|
are no longer needed, ares_destroy_options should be called
|
||||||
|
to free any associated memory.
|
||||||
|
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_destroy_options (3),
|
||||||
|
.BR ares_init_options (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Brad House
|
||||||
|
.br
|
||||||
|
Copyright 1998 by the Massachusetts Institute of Technology.
|
@@ -31,7 +31,8 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
|||||||
{
|
{
|
||||||
struct query *query;
|
struct query *query;
|
||||||
time_t now;
|
time_t now;
|
||||||
int offset, min_offset;
|
time_t offset, min_offset; /* these use time_t since some 32 bit systems
|
||||||
|
still use 64 bit time_t! (like VS2005) */
|
||||||
|
|
||||||
/* No queries, no timeout (and no fetch of the current time). */
|
/* No queries, no timeout (and no fetch of the current time). */
|
||||||
if (!channel->queries)
|
if (!channel->queries)
|
||||||
@@ -57,7 +58,7 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
|||||||
*/
|
*/
|
||||||
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
|
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
|
||||||
{
|
{
|
||||||
tvbuf->tv_sec = min_offset;
|
tvbuf->tv_sec = (long)min_offset;
|
||||||
tvbuf->tv_usec = 0;
|
tvbuf->tv_usec = 0;
|
||||||
return tvbuf;
|
return tvbuf;
|
||||||
}
|
}
|
||||||
|
@@ -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 3
|
#define ARES_VERSION_MINOR 4
|
||||||
#define ARES_VERSION_PATCH 3
|
#define ARES_VERSION_PATCH 1
|
||||||
#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.3.3-CVS"
|
#define ARES_VERSION_STR "1.4.1-CVS"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@@ -337,6 +337,7 @@ AC_CHECK_HEADERS(
|
|||||||
sys/select.h \
|
sys/select.h \
|
||||||
sys/socket.h \
|
sys/socket.h \
|
||||||
sys/ioctl.h \
|
sys/ioctl.h \
|
||||||
|
sys/param.h \
|
||||||
netdb.h \
|
netdb.h \
|
||||||
netinet/in.h \
|
netinet/in.h \
|
||||||
net/if.h \
|
net/if.h \
|
||||||
@@ -600,6 +601,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|||||||
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS( bitncmp \
|
AC_CHECK_FUNCS( bitncmp \
|
||||||
|
gettimeofday \
|
||||||
if_indextoname,
|
if_indextoname,
|
||||||
dnl if found
|
dnl if found
|
||||||
[],
|
[],
|
||||||
@@ -785,4 +787,20 @@ AC_C_BIGENDIAN(
|
|||||||
[AC_MSG_WARN([couldn't figure out endianess, assuming little endian!])]
|
[AC_MSG_WARN([couldn't figure out endianess, assuming little endian!])]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
dnl Check for user-specified random device
|
||||||
|
AC_ARG_WITH(random,
|
||||||
|
AC_HELP_STRING([--with-random=FILE],
|
||||||
|
[read randomness from FILE (default=/dev/urandom)]),
|
||||||
|
[ RANDOM_FILE="$withval" ],
|
||||||
|
[
|
||||||
|
dnl Check for random device
|
||||||
|
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
|
||||||
|
]
|
||||||
|
)
|
||||||
|
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
||||||
|
AC_SUBST(RANDOM_FILE)
|
||||||
|
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
|
||||||
|
[a suitable file/device to read random data from])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_OUTPUT(Makefile libcares.pc)
|
||||||
|
20
ares/libcares.pc.in
Normal file
20
ares/libcares.pc.in
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# Project ___ __ _ _ __ ___ ___
|
||||||
|
# / __|____ / _` | '__/ _ \/ __|
|
||||||
|
# | (_|_____| (_| | | | __/\__ \
|
||||||
|
# \___| \__,_|_| \___||___/
|
||||||
|
# $id: $
|
||||||
|
#
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: c-ares
|
||||||
|
URL: http://daniel.haxx.se/projects/c-ares/
|
||||||
|
Description: asyncronous DNS lookup library
|
||||||
|
Version: @VERSION@
|
||||||
|
Requires:
|
||||||
|
Requires.private:
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
Libs: -L${libdir} -lcares
|
@@ -32,7 +32,9 @@ struct iovec
|
|||||||
int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
|
int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
|
||||||
#define writev(s,vect,count) ares_writev(s,vect,count)
|
#define writev(s,vect,count) ares_writev(s,vect,count)
|
||||||
|
|
||||||
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
struct timezone { int dummy; };
|
struct timezone { int dummy; };
|
||||||
|
#endif
|
||||||
|
|
||||||
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
|
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||||
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)
|
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)
|
||||||
|
19
ares/setup.h
19
ares/setup.h
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright (C) 2004 - 2005 by Daniel Stenberg et al
|
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software and its
|
* Permission to use, copy, modify, and distribute this software and its
|
||||||
* documentation for any purpose and without fee is hereby granted, provided
|
* documentation for any purpose and without fee is hereby granted, provided
|
||||||
@@ -117,18 +117,6 @@
|
|||||||
#undef VERSION
|
#undef VERSION
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
|
|
||||||
/*
|
|
||||||
* Typedef our socket type
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef USE_WINSOCK
|
|
||||||
typedef SOCKET ares_socket_t;
|
|
||||||
#define ARES_SOCKET_BAD INVALID_SOCKET
|
|
||||||
#else
|
|
||||||
typedef int ares_socket_t;
|
|
||||||
#define ARES_SOCKET_BAD -1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assume a few thing unless they're set by configure
|
* Assume a few thing unless they're set by configure
|
||||||
*/
|
*/
|
||||||
@@ -156,6 +144,11 @@ int ares_strcasecmp(const char *s1, const char *s2);
|
|||||||
same */
|
same */
|
||||||
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
|
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
|
||||||
#define strcasecmp(a,b) ares_strcasecmp(a,b)
|
#define strcasecmp(a,b) ares_strcasecmp(a,b)
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# if _MSC_VER >= 1400
|
||||||
|
# define strdup(a) _strdup(a)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* IPv6 compatibility */
|
/* IPv6 compatibility */
|
||||||
|
@@ -337,5 +337,26 @@ typedef int sig_atomic_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(VMS) && \
|
||||||
|
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
|
||||||
|
#define getpwuid __32_getpwuid
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Macro argv_item_t hides platform details to code using it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef VMS
|
||||||
|
#define argv_item_t __char_ptr32
|
||||||
|
#else
|
||||||
|
#define argv_item_t char *
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* __SETUP_ONCE_H */
|
#endif /* __SETUP_ONCE_H */
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "adig - Win32 Debug"
|
!ELSEIF "$(CFG)" == "adig - Win32 Debug"
|
||||||
@@ -65,15 +65,15 @@ LINK32=link.exe
|
|||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
@@ -91,12 +91,16 @@ SOURCE=..\..\adig.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\getopt.c
|
SOURCE=..\..\ares_getopt.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\ares_getopt.h
|
||||||
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Resource Files"
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
@@ -7,19 +7,19 @@
|
|||||||
CFG=ahost - Win32 Debug
|
CFG=ahost - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "ahost.mak".
|
!MESSAGE NMAKE /f "ahost.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "ahost.mak" CFG="ahost - Win32 Debug"
|
!MESSAGE NMAKE /f "ahost.mak" CFG="ahost - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "ahost - Win32 Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "ahost - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "ahost - Win32 Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "ahost - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
@@ -48,7 +48,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ahost - Win32 Debug"
|
!ELSEIF "$(CFG)" == "ahost - Win32 Debug"
|
||||||
@@ -63,18 +63,18 @@ LINK32=link.exe
|
|||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir "Debug"
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
@@ -87,10 +87,18 @@ LINK32=link.exe
|
|||||||
|
|
||||||
SOURCE=..\..\ahost.c
|
SOURCE=..\..\ahost.c
|
||||||
# End Source File
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\ares_getopt.c
|
||||||
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Header Files"
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\ares_getopt.h
|
||||||
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Resource Files"
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
@@ -7,19 +7,19 @@
|
|||||||
CFG=areslib - Win32 Debug
|
CFG=areslib - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "areslib.mak".
|
!MESSAGE NMAKE /f "areslib.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "areslib.mak" CFG="areslib - Win32 Debug"
|
!MESSAGE NMAKE /f "areslib.mak" CFG="areslib - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "areslib - Win32 Release" (based on "Win32 (x86) Static Library")
|
!MESSAGE "areslib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||||
!MESSAGE "areslib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
!MESSAGE "areslib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
@@ -74,7 +74,7 @@ LIB32=link.exe -lib
|
|||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
|
272
configure.ac
272
configure.ac
@@ -29,7 +29,7 @@ AC_INIT(curl, [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
|
|||||||
|
|
||||||
dnl configure script copyright
|
dnl configure script copyright
|
||||||
AC_COPYRIGHT([Copyright (c) 1998 - 2006 Daniel Stenberg, <daniel@haxx.se>
|
AC_COPYRIGHT([Copyright (c) 1998 - 2006 Daniel Stenberg, <daniel@haxx.se>
|
||||||
This configure script may be copied, distributed and modified under the
|
This configure script may be copied, distributed and modified under the
|
||||||
terms of the curl license; see COPYING for more details])
|
terms of the curl license; see COPYING for more details])
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||||
@@ -89,6 +89,8 @@ dnl initialize all the info variables
|
|||||||
curl_manual_msg="no (--enable-manual)"
|
curl_manual_msg="no (--enable-manual)"
|
||||||
curl_verbose_msg="enabled (--disable-verbose)"
|
curl_verbose_msg="enabled (--disable-verbose)"
|
||||||
curl_sspi_msg="no (--enable-sspi)"
|
curl_sspi_msg="no (--enable-sspi)"
|
||||||
|
curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
|
||||||
|
curl_ldaps_msg="no (--enable-ldaps)"
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Save anything in $LIBS for later
|
dnl Save anything in $LIBS for later
|
||||||
@@ -118,12 +120,16 @@ AC_LIBTOOL_WIN32_DLL
|
|||||||
dnl skip libtool C++ and Fortran compiler checks
|
dnl skip libtool C++ and Fortran compiler checks
|
||||||
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
|
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
|
||||||
m4_defun([AC_PROG_CXX],[])
|
m4_defun([AC_PROG_CXX],[])
|
||||||
|
m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])])
|
||||||
|
m4_defun([AC_PROG_CXXCPP],[true])
|
||||||
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
|
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
|
||||||
m4_defun([AC_PROG_F77],[])
|
m4_defun([AC_PROG_F77],[])
|
||||||
|
|
||||||
dnl skip libtool C++ and Fortran linker checks
|
dnl skip libtool C++ and Fortran linker checks
|
||||||
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
|
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
|
||||||
m4_defun([AC_LIBTOOL_CXX],[])
|
m4_defun([AC_LIBTOOL_CXX],[])
|
||||||
|
m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])])
|
||||||
|
m4_defun([AC_LIBTOOL_CXXCPP],[true])
|
||||||
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
|
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
|
||||||
m4_defun([AC_LIBTOOL_F77],[])
|
m4_defun([AC_LIBTOOL_F77],[])
|
||||||
|
|
||||||
@@ -200,9 +206,12 @@ dnl The install stuff has already been taken care of by the automake stuff
|
|||||||
dnl AC_PROG_INSTALL
|
dnl AC_PROG_INSTALL
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
|
dnl check if there's a way to force code inline
|
||||||
|
AC_C_INLINE
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||||
dnl this specific header files. And do them before its results are used.
|
dnl this specific header files. And do them before its results are used.
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -277,6 +286,32 @@ AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
|
|||||||
esac ],
|
esac ],
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
)
|
)
|
||||||
|
AC_MSG_CHECKING([whether to support ldaps])
|
||||||
|
AC_ARG_ENABLE(ldaps,
|
||||||
|
AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
|
||||||
|
AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||||
|
;;
|
||||||
|
*) if test x$CURL_DISABLE_LDAP = x1 ; then
|
||||||
|
AC_MSG_RESULT(LDAP support needs to be enabled in order to enable LDAPS support!)
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
|
||||||
|
curl_ldaps_msg="enabled"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||||
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to support dict])
|
AC_MSG_CHECKING([whether to support dict])
|
||||||
AC_ARG_ENABLE(dict,
|
AC_ARG_ENABLE(dict,
|
||||||
AC_HELP_STRING([--enable-dict],[Enable DICT support])
|
AC_HELP_STRING([--enable-dict],[Enable DICT support])
|
||||||
@@ -412,6 +447,21 @@ then
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||||
|
then
|
||||||
|
dnl This is for Minix 3.1
|
||||||
|
AC_MSG_CHECKING([for gethostbyname for Minix 3])
|
||||||
|
AC_TRY_LINK([
|
||||||
|
/* Older Minix versions may need <net/gen/netdb.h> here instead */
|
||||||
|
#include <netdb.h>],
|
||||||
|
[gethostbyname("www.dummysite.com");],
|
||||||
|
[ dnl worked!
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
HAVE_GETHOSTBYNAME="1"],
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||||
then
|
then
|
||||||
dnl This is for eCos with a stubbed DNS implementation
|
dnl This is for eCos with a stubbed DNS implementation
|
||||||
@@ -478,55 +528,79 @@ AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl dl lib?
|
|
||||||
AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Check for the name of dynamic OpenLDAP libraries
|
dnl Check for LDAP
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|
||||||
LDAPLIBNAME=""
|
LDAPLIBNAME=""
|
||||||
AC_ARG_WITH(ldap-lib,
|
AC_ARG_WITH(ldap-lib,
|
||||||
AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of dynamic ldap lib file]),
|
AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
|
||||||
[LDAPLIBNAME="$withval"])
|
[LDAPLIBNAME="$withval"])
|
||||||
|
|
||||||
LBERLIBNAME=""
|
LBERLIBNAME=""
|
||||||
AC_ARG_WITH(lber-lib,
|
AC_ARG_WITH(lber-lib,
|
||||||
AC_HELP_STRING([--with-lber-lib=libname],[Specify name of dynamic lber lib file]),
|
AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
|
||||||
[LBERLIBNAME="$withval"])
|
[LBERLIBNAME="$withval"])
|
||||||
|
|
||||||
if test x$CURL_DISABLE_LDAP != x1 ; then
|
if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||||
|
|
||||||
if test -z "$LDAPLIBNAME" ; then
|
if test -z "$LDAPLIBNAME" ; then
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin | *-*-mingw* | *-*-pw32*)
|
*-*-cygwin* | *-*-mingw* | *-*-pw32*)
|
||||||
dnl Windows uses a single and unique OpenLDAP DLL name
|
dnl Windows uses a single and unique OpenLDAP DLL name
|
||||||
LDAPLIBNAME="wldap32.dll"
|
LDAPLIBNAME="wldap32"
|
||||||
LBERLIBNAME="no"
|
LBERLIBNAME="no"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$LDAPLIBNAME" ; then
|
if test "$LDAPLIBNAME" ; then
|
||||||
AC_DEFINE_UNQUOTED(DL_LDAP_FILE, "$LDAPLIBNAME")
|
AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
|
||||||
AC_MSG_CHECKING([name of dynamic library ldap])
|
AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
|
||||||
AC_MSG_RESULT($LDAPLIBNAME)
|
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAP, [1])])
|
||||||
else
|
else
|
||||||
dnl Try to find the right ldap library name for this system
|
dnl Try to find the right ldap library name for this system
|
||||||
CURL_DLLIB_NAME(DL_LDAP_FILE, ldap)
|
AC_SEARCH_LIBS(ldap_init, [ldap],, [
|
||||||
|
AC_MSG_WARN([Cannot find LDAP library: LDAP disabled])
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAP, [1])])
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||||
|
|
||||||
if test "$LBERLIBNAME" ; then
|
if test "$LBERLIBNAME" ; then
|
||||||
dnl If name is "no" then don't define this variable at all
|
dnl If name is "no" then don't define this library at all
|
||||||
dnl (it's only needed if libldap.so's dependencies are broken).
|
dnl (it's only needed if libldap.so's dependencies are broken).
|
||||||
if test "$LBERLIBNAME" != "no" ; then
|
if test "$LBERLIBNAME" != "no" ; then
|
||||||
AC_DEFINE_UNQUOTED(DL_LBER_FILE, "$LBERLIBNAME")
|
AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
|
||||||
|
AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAP, [1])])
|
||||||
fi
|
fi
|
||||||
AC_MSG_CHECKING([name of dynamic library lber])
|
|
||||||
AC_MSG_RESULT($LBERLIBNAME)
|
|
||||||
else
|
else
|
||||||
dnl Try to find the right lber library name for this system
|
dnl Try to find the right lber library name for this system
|
||||||
CURL_DLLIB_NAME(DL_LBER_FILE, lber)
|
AC_SEARCH_LIBS(ber_free, [lber],, [
|
||||||
|
AC_MSG_WARN([Cannot find a library defining ber_free(): LDAP disabled])
|
||||||
|
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||||
|
AC_SUBST(CURL_DISABLE_LDAP, [1])])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||||
|
AC_CHECK_FUNCS([ldap_url_parse])
|
||||||
|
|
||||||
|
if test "$LDAPLIBNAME" = "wldap32"; then
|
||||||
|
curl_ldap_msg="enabled (winldap)"
|
||||||
|
AC_DEFINE(CURL_LDAP_WIN, 1, [Use W$ LDAP implementation])
|
||||||
|
case $host in
|
||||||
|
*-*-cygwin* | *-*-pw32*)
|
||||||
|
AC_DEFINE(CURL_LDAP_HYBRID, 1, [W$ LDAP with non-W$ compiler])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
curl_ldap_msg="enabled (OpenLDAP)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -628,26 +702,26 @@ AC_MSG_CHECKING([if argv can be written to])
|
|||||||
AC_CACHE_VAL(curl_cv_writable_argv, [
|
AC_CACHE_VAL(curl_cv_writable_argv, [
|
||||||
AC_RUN_IFELSE([[
|
AC_RUN_IFELSE([[
|
||||||
int main(int argc, char ** argv) {
|
int main(int argc, char ** argv) {
|
||||||
argv[0][0] = ' ';
|
argv[0][0] = ' ';
|
||||||
return (argv[0][0] == ' ')?0:1;
|
return (argv[0][0] == ' ')?0:1;
|
||||||
}
|
}
|
||||||
]],
|
]],
|
||||||
curl_cv_writable_argv=yes,
|
curl_cv_writable_argv=yes,
|
||||||
curl_cv_writable_argv=no,
|
curl_cv_writable_argv=no,
|
||||||
curl_cv_writable_argv=cross)
|
curl_cv_writable_argv=cross)
|
||||||
])
|
])
|
||||||
case $curl_cv_writable_argv in
|
case $curl_cv_writable_argv in
|
||||||
yes)
|
yes)
|
||||||
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
|
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_WARN([the previous check could not be made default was used])
|
AC_MSG_WARN([the previous check could not be made default was used])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
@@ -770,7 +844,7 @@ if test x"$want_spnego" = xyes; then
|
|||||||
else
|
else
|
||||||
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
|
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_SPNEGO, 1,
|
AC_DEFINE(HAVE_SPNEGO, 1,
|
||||||
[Define this if you have the SPNEGO library fbopenssl])
|
[Define this if you have the SPNEGO library fbopenssl])
|
||||||
@@ -787,13 +861,13 @@ dnl **********************************************************************
|
|||||||
AC_ARG_WITH(gssapi-includes,
|
AC_ARG_WITH(gssapi-includes,
|
||||||
AC_HELP_STRING([--with-gssapi-includes=DIR],
|
AC_HELP_STRING([--with-gssapi-includes=DIR],
|
||||||
[Specify location of GSSAPI header]),
|
[Specify location of GSSAPI header]),
|
||||||
[ GSSAPI_INCS="-I$withval"
|
[ GSSAPI_INCS="-I$withval"
|
||||||
want_gss="yes" ]
|
want_gss="yes" ]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH(gssapi-libs,
|
AC_ARG_WITH(gssapi-libs,
|
||||||
AC_HELP_STRING([--with-gssapi-libs=DIR],
|
AC_HELP_STRING([--with-gssapi-libs=DIR],
|
||||||
[Specify location of GSSAPI libs]),
|
[Specify location of GSSAPI libs]),
|
||||||
[ GSSAPI_LIB_DIR="-L$withval"
|
[ GSSAPI_LIB_DIR="-L$withval"
|
||||||
want_gss="yes" ]
|
want_gss="yes" ]
|
||||||
)
|
)
|
||||||
@@ -803,7 +877,7 @@ AC_ARG_WITH(gssapi,
|
|||||||
[Where to look for GSSAPI]), [
|
[Where to look for GSSAPI]), [
|
||||||
GSSAPI_ROOT="$withval"
|
GSSAPI_ROOT="$withval"
|
||||||
if test x"$GSSAPI_ROOT" != xno; then
|
if test x"$GSSAPI_ROOT" != xno; then
|
||||||
want_gss="yes"
|
want_gss="yes"
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -835,10 +909,10 @@ if test x"$want_gss" = xyes; then
|
|||||||
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
|
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
dnl not found, check in gssapi/ subdir
|
dnl not found, check in gssapi/ subdir
|
||||||
AC_CHECK_HEADER(gssapi/gssapi.h,
|
AC_CHECK_HEADER(gssapi/gssapi.h,
|
||||||
[
|
[
|
||||||
dnl found
|
dnl found
|
||||||
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
|
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -848,7 +922,7 @@ if test x"$want_gss" = xyes; then
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@@ -865,7 +939,7 @@ if test x"$want_gss" = xyes; then
|
|||||||
elif test -z "$GSSAPI_LIB_DIR"; then
|
elif test -z "$GSSAPI_LIB_DIR"; then
|
||||||
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
|
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
|
||||||
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
|
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
|
||||||
LDFLAGS="$LDFLAGS $gss_ldflags"
|
LDFLAGS="$LDFLAGS $gss_ldflags"
|
||||||
elif test "$GSSAPI_ROOT" != "yes"; then
|
elif test "$GSSAPI_ROOT" != "yes"; then
|
||||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
|
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
|
||||||
else
|
else
|
||||||
@@ -877,7 +951,7 @@ if test x"$want_gss" = xyes; then
|
|||||||
else
|
else
|
||||||
CPPFLAGS="$save_CPPFLAGS"
|
CPPFLAGS="$save_CPPFLAGS"
|
||||||
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 **********************************************************************
|
||||||
@@ -888,7 +962,7 @@ dnl Default to no CA bundle
|
|||||||
ca="no"
|
ca="no"
|
||||||
AC_ARG_WITH(ssl,dnl
|
AC_ARG_WITH(ssl,dnl
|
||||||
AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
||||||
AC_HELP_STRING([--without-ssl], [disable SSL]),
|
AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
|
||||||
OPT_SSL=$withval)
|
OPT_SSL=$withval)
|
||||||
|
|
||||||
if test X"$OPT_SSL" != Xno; then
|
if test X"$OPT_SSL" != Xno; then
|
||||||
@@ -943,7 +1017,7 @@ if test X"$OPT_SSL" != Xno; then
|
|||||||
SSL_LDFLAGS=`$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`
|
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
|
||||||
|
|
||||||
LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
|
LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
|
||||||
|
|
||||||
dnl use the values pkg-config reported
|
dnl use the values pkg-config reported
|
||||||
LIBS="$LIBS $SSL_LIBS"
|
LIBS="$LIBS $SSL_LIBS"
|
||||||
@@ -957,7 +1031,7 @@ if test X"$OPT_SSL" != Xno; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl This is for Msys/Mingw
|
dnl This is for Msys/Mingw
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
|
dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
|
||||||
dnl to be added to LIBS and recorded in the .la file.
|
dnl to be added to LIBS and recorded in the .la file.
|
||||||
@@ -1029,7 +1103,7 @@ if test X"$OPT_SSL" != Xno; then
|
|||||||
dnl name
|
dnl name
|
||||||
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)
|
||||||
|
|
||||||
if test $ac_cv_header_x509_h = yes &&
|
if test $ac_cv_header_x509_h = yes &&
|
||||||
test $ac_cv_header_crypto_h = yes &&
|
test $ac_cv_header_crypto_h = yes &&
|
||||||
test $ac_cv_header_ssl_h = yes; then
|
test $ac_cv_header_ssl_h = yes; then
|
||||||
dnl three matches
|
dnl three matches
|
||||||
@@ -1089,7 +1163,7 @@ if test X"$OPT_SSL" != Xno; then
|
|||||||
#else
|
#else
|
||||||
Not the yaSSL OpenSSL compatibility header.
|
Not the yaSSL OpenSSL compatibility header.
|
||||||
#endif
|
#endif
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
|
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
|
||||||
[Define to 1 if using yaSSL in OpenSSL compatibility mode.])
|
[Define to 1 if using yaSSL in OpenSSL compatibility mode.])
|
||||||
@@ -1235,7 +1309,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
|
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(libssh2.h,
|
AC_CHECK_HEADERS(libssh2.h,
|
||||||
curl_ssh_msg="enabled (libSSH2)"
|
curl_ssh_msg="enabled (libSSH2)"
|
||||||
LIBSSH2_ENABLED=1
|
LIBSSH2_ENABLED=1
|
||||||
@@ -1260,7 +1334,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Check for the random seed preferences
|
dnl Check for the random seed preferences
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
|
|
||||||
if test X"$OPENSSL_ENABLED" = X"1"; then
|
if test X"$OPENSSL_ENABLED" = X"1"; then
|
||||||
@@ -1327,17 +1401,17 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
|||||||
|
|
||||||
CLEANLIBS="$LIBS"
|
CLEANLIBS="$LIBS"
|
||||||
CLEANCPPFLAGS="$CPPFLAGS"
|
CLEANCPPFLAGS="$CPPFLAGS"
|
||||||
|
|
||||||
LIBS="$LIBS $addlib"
|
LIBS="$LIBS $addlib"
|
||||||
if test "$addcflags" != "-I/usr/include"; then
|
if test "$addcflags" != "-I/usr/include"; then
|
||||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB(gnutls, gnutls_check_version,
|
AC_CHECK_LIB(gnutls, gnutls_check_version,
|
||||||
[
|
[
|
||||||
AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
|
AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
|
||||||
AC_SUBST(USE_GNUTLS, [1])
|
AC_SUBST(USE_GNUTLS, [1])
|
||||||
GNUTLS_ENABLED = 1
|
GNUTLS_ENABLED=1
|
||||||
USE_GNUTLS="yes"
|
USE_GNUTLS="yes"
|
||||||
curl_ssl_msg="enabled (GnuTLS)"
|
curl_ssl_msg="enabled (GnuTLS)"
|
||||||
],
|
],
|
||||||
@@ -1345,7 +1419,7 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
|||||||
LIBS="$CLEANLIBS"
|
LIBS="$CLEANLIBS"
|
||||||
CPPFLAGS="$CLEANCPPFLAGS"
|
CPPFLAGS="$CLEANCPPFLAGS"
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "x$USE_GNUTLS" = "xyes"; then
|
if test "x$USE_GNUTLS" = "xyes"; then
|
||||||
AC_MSG_NOTICE([detected GnuTLS version $version])
|
AC_MSG_NOTICE([detected GnuTLS version $version])
|
||||||
|
|
||||||
@@ -1391,7 +1465,7 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
|||||||
else
|
else
|
||||||
# Without pkg-config, we'll kludge in some defaults
|
# Without pkg-config, we'll kludge in some defaults
|
||||||
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||||
addcflags="-I$OPT_NSS/include"
|
addcflags="-I$OPT_NSS/include"
|
||||||
version="unknown"
|
version="unknown"
|
||||||
gtlsprefix=$OPT_GNUTLS
|
gtlsprefix=$OPT_GNUTLS
|
||||||
fi
|
fi
|
||||||
@@ -1399,12 +1473,12 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
|||||||
|
|
||||||
CLEANLIBS="$LIBS"
|
CLEANLIBS="$LIBS"
|
||||||
CLEANCPPFLAGS="$CPPFLAGS"
|
CLEANCPPFLAGS="$CPPFLAGS"
|
||||||
|
|
||||||
LIBS="$LIBS $addlib"
|
LIBS="$LIBS $addlib"
|
||||||
if test "$addcflags" != "-I/usr/include"; then
|
if test "$addcflags" != "-I/usr/include"; then
|
||||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB(nss3, NSS_Initialize,
|
AC_CHECK_LIB(nss3, NSS_Initialize,
|
||||||
[
|
[
|
||||||
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
|
AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
|
||||||
@@ -1417,7 +1491,7 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
|||||||
LIBS="$CLEANLIBS"
|
LIBS="$CLEANLIBS"
|
||||||
CPPFLAGS="$CLEANCPPFLAGS"
|
CPPFLAGS="$CLEANCPPFLAGS"
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "x$USE_NSS" = "xyes"; then
|
if test "x$USE_NSS" = "xyes"; then
|
||||||
AC_MSG_NOTICE([detected NSS version $version])
|
AC_MSG_NOTICE([detected NSS version $version])
|
||||||
|
|
||||||
@@ -1464,7 +1538,7 @@ AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
|
|||||||
|
|
||||||
if test "x$ca" != "xno"; then
|
if test "x$ca" != "xno"; then
|
||||||
CURL_CA_BUNDLE='"'$ca'"'
|
CURL_CA_BUNDLE='"'$ca'"'
|
||||||
AC_SUBST(CURL_CA_BUNDLE)
|
AC_SUBST(CURL_CA_BUNDLE)
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([$ca])
|
AC_MSG_RESULT([$ca])
|
||||||
fi dnl only done if some kind of SSL was enabled
|
fi dnl only done if some kind of SSL was enabled
|
||||||
@@ -1517,8 +1591,8 @@ case "$LIBIDN" in
|
|||||||
AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
|
AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
|
||||||
AC_CHECK_HEADERS( idn-free.h tld.h )
|
AC_CHECK_HEADERS( idn-free.h tld.h )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
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
|
||||||
@@ -1681,6 +1755,7 @@ AC_CHECK_HEADERS(
|
|||||||
assert.h \
|
assert.h \
|
||||||
unistd.h \
|
unistd.h \
|
||||||
stdlib.h \
|
stdlib.h \
|
||||||
|
ldap_ssl.h \
|
||||||
limits.h \
|
limits.h \
|
||||||
arpa/inet.h \
|
arpa/inet.h \
|
||||||
net/if.h \
|
net/if.h \
|
||||||
@@ -1694,7 +1769,6 @@ AC_CHECK_HEADERS(
|
|||||||
termio.h \
|
termio.h \
|
||||||
sgtty.h \
|
sgtty.h \
|
||||||
fcntl.h \
|
fcntl.h \
|
||||||
dlfcn.h \
|
|
||||||
alloca.h \
|
alloca.h \
|
||||||
time.h \
|
time.h \
|
||||||
io.h \
|
io.h \
|
||||||
@@ -1752,7 +1826,7 @@ AC_CHECK_SIZEOF(time_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])]
|
||||||
longlong="yes"
|
longlong="yes"
|
||||||
)
|
)
|
||||||
|
|
||||||
if test "xyes" = "x$longlong"; then
|
if test "xyes" = "x$longlong"; then
|
||||||
@@ -1836,7 +1910,6 @@ AC_CHECK_FUNCS( strtoll \
|
|||||||
strlcat \
|
strlcat \
|
||||||
getpwuid \
|
getpwuid \
|
||||||
geteuid \
|
geteuid \
|
||||||
dlopen \
|
|
||||||
utime \
|
utime \
|
||||||
sigsetjmp \
|
sigsetjmp \
|
||||||
basename \
|
basename \
|
||||||
@@ -1888,7 +1961,7 @@ if test "$ac_cv_func_select" = "no"; then
|
|||||||
#endif
|
#endif
|
||||||
],[
|
],[
|
||||||
select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
|
select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
|
||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
HAVE_SELECT="1"
|
HAVE_SELECT="1"
|
||||||
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
|
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
|
||||||
@@ -1981,11 +2054,11 @@ if test "$disable_poll" = "no"; then
|
|||||||
fi dnl poll()-check is not disabled
|
fi dnl poll()-check is not disabled
|
||||||
|
|
||||||
|
|
||||||
AC_PATH_PROG( PERL, perl, ,
|
AC_PATH_PROG( PERL, perl, ,
|
||||||
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
|
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
|
||||||
AC_SUBST(PERL)
|
AC_SUBST(PERL)
|
||||||
|
|
||||||
AC_PATH_PROGS( NROFF, gnroff nroff, ,
|
AC_PATH_PROGS( NROFF, gnroff nroff, ,
|
||||||
$PATH:/usr/bin/:/usr/local/bin )
|
$PATH:/usr/bin/:/usr/local/bin )
|
||||||
AC_SUBST(NROFF)
|
AC_SUBST(NROFF)
|
||||||
|
|
||||||
@@ -2031,10 +2104,10 @@ 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_MSG_CHECKING([whether to enable c-ares])
|
||||||
AC_ARG_ENABLE(ares,
|
AC_ARG_ENABLE(ares,
|
||||||
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])
|
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
|
||||||
AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
|
AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||||
[ case "$enableval" in
|
[ case "$enableval" in
|
||||||
no)
|
no)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -2042,10 +2115,10 @@ AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
|
|||||||
*) AC_MSG_RESULT(yes)
|
*) AC_MSG_RESULT(yes)
|
||||||
|
|
||||||
if test "x$IPV6_ENABLED" = "x1"; then
|
if test "x$IPV6_ENABLED" = "x1"; then
|
||||||
AC_MSG_NOTICE([ares may not work properly with ipv6])
|
AC_MSG_NOTICE([c-ares may not work properly with ipv6])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])
|
AC_DEFINE(USE_ARES, 1, [Define if you want to enable c-ares support])
|
||||||
dnl substitute HAVE_ARES for curl-config and similar
|
dnl substitute HAVE_ARES for curl-config and similar
|
||||||
HAVE_ARES="1"
|
HAVE_ARES="1"
|
||||||
AC_SUBST(HAVE_ARES)
|
AC_SUBST(HAVE_ARES)
|
||||||
@@ -2090,7 +2163,8 @@ void curl_domalloc() { }
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
ares_channel channel;
|
ares_channel channel;
|
||||||
ares_cancel(channel);
|
ares_cancel(channel); /* added in 1.2.0 */
|
||||||
|
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -2228,29 +2302,29 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi
|
|||||||
no)
|
no)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_CHECKING([whether $CC supports it])
|
AC_MSG_CHECKING([whether $CC supports it])
|
||||||
if test "$GCC" = yes ; then
|
if test "$GCC" = yes ; then
|
||||||
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
|
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
|
||||||
AC_SUBST(CURL_HIDDEN_SYMBOLS)
|
AC_SUBST(CURL_HIDDEN_SYMBOLS)
|
||||||
AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
|
AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
|
||||||
AC_SUBST(CURL_EXTERN_SYMBOL)
|
AC_SUBST(CURL_EXTERN_SYMBOL)
|
||||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
dnl Test for SunPro cc
|
dnl Test for SunPro cc
|
||||||
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
|
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
|
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
|
||||||
AC_SUBST(CURL_HIDDEN_SYMBOLS)
|
AC_SUBST(CURL_HIDDEN_SYMBOLS)
|
||||||
AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
|
AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
|
||||||
AC_SUBST(CURL_EXTERN_SYMBOL)
|
AC_SUBST(CURL_EXTERN_SYMBOL)
|
||||||
CFLAGS="$CFLAGS -xldscope=hidden"
|
CFLAGS="$CFLAGS -xldscope=hidden"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
@@ -2289,24 +2363,24 @@ LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
|
|||||||
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile \
|
AC_CONFIG_FILES([Makefile \
|
||||||
docs/Makefile \
|
docs/Makefile \
|
||||||
docs/examples/Makefile \
|
docs/examples/Makefile \
|
||||||
docs/libcurl/Makefile \
|
docs/libcurl/Makefile \
|
||||||
include/Makefile \
|
include/Makefile \
|
||||||
include/curl/Makefile \
|
include/curl/Makefile \
|
||||||
src/Makefile \
|
src/Makefile \
|
||||||
lib/Makefile \
|
lib/Makefile \
|
||||||
tests/Makefile \
|
tests/Makefile \
|
||||||
tests/data/Makefile \
|
tests/data/Makefile \
|
||||||
tests/server/Makefile \
|
tests/server/Makefile \
|
||||||
tests/libtest/Makefile \
|
tests/libtest/Makefile \
|
||||||
packages/Makefile \
|
packages/Makefile \
|
||||||
packages/Win32/Makefile \
|
packages/Win32/Makefile \
|
||||||
packages/Win32/cygwin/Makefile \
|
packages/Win32/cygwin/Makefile \
|
||||||
packages/Linux/Makefile \
|
packages/Linux/Makefile \
|
||||||
packages/Linux/RPM/Makefile \
|
packages/Linux/RPM/Makefile \
|
||||||
packages/Linux/RPM/curl.spec \
|
packages/Linux/RPM/curl.spec \
|
||||||
packages/Linux/RPM/curl-ssl.spec \
|
packages/Linux/RPM/curl-ssl.spec \
|
||||||
packages/Solaris/Makefile \
|
packages/Solaris/Makefile \
|
||||||
packages/DOS/Makefile \
|
packages/DOS/Makefile \
|
||||||
packages/EPM/curl.list \
|
packages/EPM/curl.list \
|
||||||
@@ -2335,9 +2409,11 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
|||||||
c-ares support: ${curl_ares_msg}
|
c-ares support: ${curl_ares_msg}
|
||||||
ipv6 support: ${curl_ipv6_msg}
|
ipv6 support: ${curl_ipv6_msg}
|
||||||
IDN support: ${curl_idn_msg}
|
IDN support: ${curl_idn_msg}
|
||||||
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
|
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
|
||||||
Built-in manual: ${curl_manual_msg}
|
Built-in manual: ${curl_manual_msg}
|
||||||
Verbose errors: ${curl_verbose_msg}
|
Verbose errors: ${curl_verbose_msg}
|
||||||
SSPI support: ${curl_sspi_msg}
|
SSPI support: ${curl_sspi_msg}
|
||||||
ca cert path: ${ca}
|
ca cert path: ${ca}
|
||||||
|
LDAP support: ${curl_ldap_msg}
|
||||||
|
LDAPS support: ${curl_ldaps_msg}
|
||||||
])
|
])
|
||||||
|
@@ -160,6 +160,10 @@ Smalltalk
|
|||||||
Smalltalk binding written by Danil Osipchuk
|
Smalltalk binding written by Danil Osipchuk
|
||||||
http://www.squeaksource.com/CurlPlugin/
|
http://www.squeaksource.com/CurlPlugin/
|
||||||
|
|
||||||
|
SP-Forth
|
||||||
|
SP-Forth binding by ygrek
|
||||||
|
http://www.forth.org.ru/~ac/lib/lin/curl/
|
||||||
|
|
||||||
SPL
|
SPL
|
||||||
|
|
||||||
SPL binding written by Clifford Wolf
|
SPL binding written by Clifford Wolf
|
||||||
|
@@ -8,7 +8,7 @@ $Id$
|
|||||||
BUGS
|
BUGS
|
||||||
|
|
||||||
Curl and libcurl have grown substantially since the beginning. At the time
|
Curl and libcurl have grown substantially since the beginning. At the time
|
||||||
of writing (August 2003), there are about 40000 lines of source code, and by
|
of writing (July 2007), there are about 47000 lines of source code, and by
|
||||||
the time you read this it has probably grown even more.
|
the time you read this it has probably grown even more.
|
||||||
|
|
||||||
Of course there are lots of bugs left. And lots of misfeatures.
|
Of course there are lots of bugs left. And lots of misfeatures.
|
||||||
@@ -39,6 +39,7 @@ WHAT TO REPORT
|
|||||||
- your operating system's name and version number (uname -a under a unix
|
- your operating system's name and version number (uname -a under a unix
|
||||||
is fine)
|
is fine)
|
||||||
- what version of curl you're using (curl -V is fine)
|
- what version of curl you're using (curl -V is fine)
|
||||||
|
- versions of the used libraries that libcurl is built to use
|
||||||
- what URL you were working with (if possible), at least which protocol
|
- what URL you were working with (if possible), at least which protocol
|
||||||
|
|
||||||
and anything and everything else you think matters. Tell us what you
|
and anything and everything else you think matters. Tell us what you
|
||||||
|
37
docs/FAQ
37
docs/FAQ
@@ -1,4 +1,4 @@
|
|||||||
Updated: February 11, 2007 (http://curl.haxx.se/docs/faq.html)
|
Updated: July 30, 2007 (http://curl.haxx.se/docs/faq.html)
|
||||||
_ _ ____ _
|
_ _ ____ _
|
||||||
___| | | | _ \| |
|
___| | | | _ \| |
|
||||||
/ __| | | | |_) | |
|
/ __| | | | |_) | |
|
||||||
@@ -68,6 +68,7 @@ FAQ
|
|||||||
4.12 Why do I get "certificate verify failed" ?
|
4.12 Why do I get "certificate verify failed" ?
|
||||||
4.13 Why is curl -R on Windows one hour off?
|
4.13 Why is curl -R on Windows one hour off?
|
||||||
4.14 Redirects work in browser but not with curl!
|
4.14 Redirects work in browser but not with curl!
|
||||||
|
4.15 FTPS doesn't work
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
5.1 Is libcurl thread-safe?
|
5.1 Is libcurl thread-safe?
|
||||||
@@ -289,13 +290,13 @@ FAQ
|
|||||||
|
|
||||||
Some facts to use as input to the math:
|
Some facts to use as input to the math:
|
||||||
|
|
||||||
curl packages are downloaded from the curl.haxx.se and mirrors almost one
|
curl packages are downloaded from the curl.haxx.se and mirrors over a
|
||||||
million times per year. curl is installed by default with most Linux
|
million times per year. curl is installed by default with most Linux
|
||||||
distributions. curl is installed by default with Mac OS X. curl and libcurl
|
distributions. curl is installed by default with Mac OS X. curl and libcurl
|
||||||
as used by numerous applications that include libcurl binaries in their
|
as used by numerous applications that include libcurl binaries in their
|
||||||
distribution packages (like Adobe Acrobat Reader and Google Earth).
|
distribution packages (like Adobe Acrobat Reader and Google Earth).
|
||||||
|
|
||||||
More than 60 known named companies use curl in commercial environments and
|
More than 70 known named companies use curl in commercial environments and
|
||||||
products. More than 100 known named open source projects depend on
|
products. More than 100 known named open source projects depend on
|
||||||
(lib)curl.
|
(lib)curl.
|
||||||
|
|
||||||
@@ -374,7 +375,7 @@ FAQ
|
|||||||
|
|
||||||
2.4 Does curl support Socks (RFC 1928) ?
|
2.4 Does curl support Socks (RFC 1928) ?
|
||||||
|
|
||||||
Yes, SOCKS5 is supported.
|
Yes, SOCKS 4 and 5 are supported.
|
||||||
|
|
||||||
|
|
||||||
3. Usage problems
|
3. Usage problems
|
||||||
@@ -446,6 +447,10 @@ FAQ
|
|||||||
|
|
||||||
curl -O ftp://download.com/coolfile -Q '-DELE coolfile'
|
curl -O ftp://download.com/coolfile -Q '-DELE coolfile'
|
||||||
|
|
||||||
|
or rename a file after upload:
|
||||||
|
|
||||||
|
curl -T infile ftp://upload.com/dir/ -Q "-RNFR infile" -Q "-RNTO newname"
|
||||||
|
|
||||||
3.8 How do I tell curl to follow HTTP redirects?
|
3.8 How do I tell curl to follow HTTP redirects?
|
||||||
|
|
||||||
Curl does not follow so-called redirects by default. The Location: header
|
Curl does not follow so-called redirects by default. The Location: header
|
||||||
@@ -755,7 +760,9 @@ FAQ
|
|||||||
4.9 Curl can't authenticate to the server that requires NTLM?
|
4.9 Curl can't authenticate to the server that requires NTLM?
|
||||||
|
|
||||||
This is supported in curl 7.10.6 or later. No earlier curl version knows
|
This is supported in curl 7.10.6 or later. No earlier curl version knows
|
||||||
of this magic.
|
of this magic. Later versions require the OpenSSL or Microsoft Windows
|
||||||
|
libraries to provide this functionality. Using GnuTLS or NSS libraries will
|
||||||
|
not provide NTLM authentication functionality in curl.
|
||||||
|
|
||||||
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
|
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
|
||||||
should not use such ones.
|
should not use such ones.
|
||||||
@@ -822,6 +829,20 @@ FAQ
|
|||||||
manually figure out what the page is set to do, or you write a script that
|
manually figure out what the page is set to do, or you write a script that
|
||||||
parses the results and fetches the new URL.
|
parses the results and fetches the new URL.
|
||||||
|
|
||||||
|
4.15 FTPS doesn't work
|
||||||
|
|
||||||
|
curl supports FTPS (sometimes known as FTP-SSL) both implicit and explicit
|
||||||
|
mode.
|
||||||
|
|
||||||
|
When a URL is used that starts with FTPS://, curl assumes implicit SSL on
|
||||||
|
the control connection and will therefore immediately connect and try to
|
||||||
|
speak SSL. FTPS:// connections default to port 990.
|
||||||
|
|
||||||
|
To use explicit FTPS, you use a FTP:// URL and the --ftp-ssl option (or one
|
||||||
|
of its related flavours). This is the most common method, and the one
|
||||||
|
mandated by RFC4217. This kind of connection then of course uses the
|
||||||
|
standard FTP port 21 by default.
|
||||||
|
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
|
|
||||||
@@ -1097,14 +1118,14 @@ FAQ
|
|||||||
In the cURL project we call this module PHP/CURL to differentiate it from
|
In the cURL project we call this module PHP/CURL to differentiate it from
|
||||||
curl the command line tool and libcurl the library. The PHP team however
|
curl the command line tool and libcurl the library. The PHP team however
|
||||||
does not refer to it like this (for unknown reasons). They call it plain
|
does not refer to it like this (for unknown reasons). They call it plain
|
||||||
CURL (often using all caps) which causes much confusion to users which in
|
CURL (often using all caps) or sometimes ext/curl, but both cause much
|
||||||
turn gives us a higher question load.
|
confusion to users which in turn gives us a higher question load.
|
||||||
|
|
||||||
7.2 Who write PHP/CURL?
|
7.2 Who write PHP/CURL?
|
||||||
|
|
||||||
PHP/CURL is a module that comes with the regular PHP package. It depends and
|
PHP/CURL is a module that comes with the regular PHP package. It depends and
|
||||||
uses libcurl, so you need to have libcurl installed properly first before
|
uses libcurl, so you need to have libcurl installed properly first before
|
||||||
PHP/CURL can be used. PHP/CURL is written by Sterling Hughes.
|
PHP/CURL can be used. PHP/CURL was initially written by Sterling Hughes.
|
||||||
|
|
||||||
7.3 Can I perform multiple requests using the same handle?
|
7.3 Can I perform multiple requests using the same handle?
|
||||||
|
|
||||||
|
@@ -33,6 +33,7 @@ libcurl supports
|
|||||||
- supports large files (>2GB and >4GB) both upload/download
|
- supports large files (>2GB and >4GB) both upload/download
|
||||||
- replacable memory functions (malloc, free, realloc, etc)
|
- replacable memory functions (malloc, free, realloc, etc)
|
||||||
- asynchronous name resolving (*6)
|
- asynchronous name resolving (*6)
|
||||||
|
- both a push and a pull style interface
|
||||||
|
|
||||||
HTTP
|
HTTP
|
||||||
- HTTP/1.1 compliant (optionally uses 1.0)
|
- HTTP/1.1 compliant (optionally uses 1.0)
|
||||||
@@ -40,6 +41,7 @@ HTTP
|
|||||||
- PUT
|
- PUT
|
||||||
- HEAD
|
- HEAD
|
||||||
- POST
|
- POST
|
||||||
|
- Pipelining
|
||||||
- multipart formpost (RFC1867-style)
|
- multipart formpost (RFC1867-style)
|
||||||
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
|
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
|
||||||
SPNEGO (*4) to server and proxy
|
SPNEGO (*4) to server and proxy
|
||||||
@@ -71,7 +73,7 @@ HTTPS (*1)
|
|||||||
FTP
|
FTP
|
||||||
- download
|
- download
|
||||||
- authentication
|
- authentication
|
||||||
- kerberos4 (*5)
|
- kerberos4 (*5), kerberos5 (*3)
|
||||||
- active/passive using PORT, EPRT, PASV or EPSV
|
- active/passive using PORT, EPRT, PASV or EPSV
|
||||||
- single file size information (compare to HTTP HEAD)
|
- single file size information (compare to HTTP HEAD)
|
||||||
- 'type=' URL support
|
- 'type=' URL support
|
||||||
@@ -94,6 +96,13 @@ FTPS (*1)
|
|||||||
- explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
|
- explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
|
||||||
connection to use SSL for both or one of the connections
|
connection to use SSL for both or one of the connections
|
||||||
|
|
||||||
|
SCP (*8)
|
||||||
|
- both password and public key auth
|
||||||
|
|
||||||
|
SFTP (*8)
|
||||||
|
- both password and public key auth
|
||||||
|
- with custom commands sent before/after the transfer
|
||||||
|
|
||||||
TFTP
|
TFTP
|
||||||
- download / upload
|
- download / upload
|
||||||
|
|
||||||
@@ -116,10 +125,11 @@ FILE
|
|||||||
FOOTNOTES
|
FOOTNOTES
|
||||||
=========
|
=========
|
||||||
|
|
||||||
*1 = requires OpenSSL, GnuTLS or NSS
|
*1 = requires OpenSSL, GnuTLS, NSS or yassl
|
||||||
*2 = requires OpenLDAP
|
*2 = requires OpenLDAP
|
||||||
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
||||||
*4 = requires FBopenssl
|
*4 = requires FBopenssl
|
||||||
*5 = requires a krb4 library, such as the MIT one or similar.
|
*5 = requires a krb4 library, such as the MIT one or similar.
|
||||||
*6 = requires c-ares
|
*6 = requires c-ares
|
||||||
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
|
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
|
||||||
|
*8 = requires libssh2
|
||||||
|
136
docs/INSTALL
136
docs/INSTALL
@@ -85,15 +85,6 @@ UNIX
|
|||||||
|
|
||||||
LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
||||||
|
|
||||||
Another option to the previous trick, is to set LD_LIBRARY_PATH or edit the
|
|
||||||
/etc/ld.so.conf file.
|
|
||||||
|
|
||||||
If your SSL library was compiled with rsaref (this was common in the past
|
|
||||||
when used in the United States), you may also need to set:
|
|
||||||
|
|
||||||
LIBS=-lRSAglue -lrsaref
|
|
||||||
(as suggested by Doug Kaufman)
|
|
||||||
|
|
||||||
MORE OPTIONS
|
MORE OPTIONS
|
||||||
|
|
||||||
To force configure to use the standard cc compiler if both cc and gcc are
|
To force configure to use the standard cc compiler if both cc and gcc are
|
||||||
@@ -143,6 +134,12 @@ UNIX
|
|||||||
To build with NSS support instead of OpenSSL for SSL/TLS, note that
|
To build with NSS support instead of OpenSSL for SSL/TLS, note that
|
||||||
you need to use both --without-ssl and --with-nss.
|
you need to use both --without-ssl and --with-nss.
|
||||||
|
|
||||||
|
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||||
|
Heimdal Kerberos 5 packages installed.
|
||||||
|
|
||||||
|
To get support for SCP and SFTP, build with --with-libssh2 and have
|
||||||
|
libssh2 0.16 or later installed.
|
||||||
|
|
||||||
|
|
||||||
Win32
|
Win32
|
||||||
=====
|
=====
|
||||||
@@ -173,9 +170,17 @@ Win32
|
|||||||
MingW32
|
MingW32
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Run the 'mingw32.bat' file to get the proper environment variables set,
|
Make sure that MinGW32's bin dir is in the search path, for example:
|
||||||
then run 'make mingw32' in the root dir. Use 'make mingw32-ssl' to build
|
|
||||||
curl SSL enabled.
|
set PATH=c:\mingw32\bin;%PATH%
|
||||||
|
|
||||||
|
then run 'mingw32-make mingw32' in the root dir. There are other
|
||||||
|
make targets available to build libcurl with more features, use:
|
||||||
|
'mingw32-make mingw32-zlib' to build with Zlib support;
|
||||||
|
'mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled;
|
||||||
|
'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib;
|
||||||
|
'mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib
|
||||||
|
and SSPI support.
|
||||||
|
|
||||||
If you have any problems linking libraries or finding header files, be sure
|
If you have any problems linking libraries or finding header files, be sure
|
||||||
to verify that the provided "Makefile.m32" files use the proper paths, and
|
to verify that the provided "Makefile.m32" files use the proper paths, and
|
||||||
@@ -183,19 +188,38 @@ Win32
|
|||||||
environment variables, for example:
|
environment variables, for example:
|
||||||
|
|
||||||
set ZLIB_PATH=c:\zlib-1.2.3
|
set ZLIB_PATH=c:\zlib-1.2.3
|
||||||
set OPENSSL_PATH=c:\openssl-0.9.8d
|
set OPENSSL_PATH=c:\openssl-0.9.8e
|
||||||
set LIBSSH2_PATH=c:\libssh2-0.15
|
set LIBSSH2_PATH=c:\libssh2-0.17
|
||||||
|
|
||||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||||
sources fetched from CVS - the current 0.14 release will NOT work!
|
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||||
Use 'make mingw32-ssh2-ssl' to build curl with SSH2 and SSL enabled.
|
Use 'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2 and SSL enabled.
|
||||||
|
|
||||||
|
It is now also possible to build with other LDAP SDKs than MS LDAP;
|
||||||
|
currently it is possible to build with native Win32 OpenLDAP, or with the
|
||||||
|
Novell CLDAP SDK. If you want to use these you need to set these vars:
|
||||||
|
|
||||||
|
set LDAP_SDK=c:\openldap
|
||||||
|
set USE_LDAP_OPENLDAP=1
|
||||||
|
|
||||||
|
or for using the Novell SDK:
|
||||||
|
|
||||||
|
set USE_LDAP_NOVELL=1
|
||||||
|
|
||||||
|
If you want to enable LDAPS support then set LDAPS=1.
|
||||||
|
|
||||||
|
- optional MingW32-built OpenlDAP SDK available from:
|
||||||
|
http://www.gknw.net/mirror/openldap/
|
||||||
|
- optional recent Novell CLDAP SDK available from:
|
||||||
|
http://developer.novell.com/ndk/cldap.htm
|
||||||
|
|
||||||
|
|
||||||
Cygwin
|
Cygwin
|
||||||
------
|
------
|
||||||
|
|
||||||
Almost identical to the unix installation. Run the configure script in the
|
Almost identical to the unix installation. Run the configure script in the
|
||||||
curl root with 'sh configure'. Make sure you have the sh executable in
|
curl root with 'sh configure'. Make sure you have the sh executable in
|
||||||
/bin/ or you'll see the configure fail towards the end.
|
/bin/ or you'll see the configure fail toward the end.
|
||||||
|
|
||||||
Run 'make'
|
Run 'make'
|
||||||
|
|
||||||
@@ -233,7 +257,7 @@ Win32
|
|||||||
Before running nmake define the OPENSSL_PATH environment variable with
|
Before running nmake define the OPENSSL_PATH environment variable with
|
||||||
the root/base directory of OpenSSL, for example:
|
the root/base directory of OpenSSL, for example:
|
||||||
|
|
||||||
set OPENSSL_PATH=c:\openssl-0.9.8d
|
set OPENSSL_PATH=c:\openssl-0.9.8e
|
||||||
|
|
||||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||||
@@ -307,6 +331,7 @@ Win32
|
|||||||
CURL_DISABLE_TELNET disables TELNET
|
CURL_DISABLE_TELNET disables TELNET
|
||||||
CURL_DISABLE_DICT disables DICT
|
CURL_DISABLE_DICT disables DICT
|
||||||
CURL_DISABLE_FILE disables FILE
|
CURL_DISABLE_FILE disables FILE
|
||||||
|
CURL_DISABLE_TFTP disables TFTP
|
||||||
|
|
||||||
If you want to set any of these defines you have the following
|
If you want to set any of these defines you have the following
|
||||||
possibilities:
|
possibilities:
|
||||||
@@ -399,7 +424,7 @@ VMS
|
|||||||
|
|
||||||
Facility - basically the program ID. A code assigned to the program
|
Facility - basically the program ID. A code assigned to the program
|
||||||
the name can be fetched from external or internal message libraries
|
the name can be fetched from external or internal message libraries
|
||||||
Errorcode - the errodes assigned by the application
|
Error code - the err codes assigned by the application
|
||||||
Sev. - severity: Even = error, off = non error
|
Sev. - severity: Even = error, off = non error
|
||||||
0 = Warning
|
0 = Warning
|
||||||
1 = Success
|
1 = Success
|
||||||
@@ -409,7 +434,7 @@ VMS
|
|||||||
<5-7> reserved.
|
<5-7> reserved.
|
||||||
|
|
||||||
This all presents itself with:
|
This all presents itself with:
|
||||||
%<FACILITY>-<SeV>-<Errorname>, <Error message>
|
%<FACILITY>-<Sev>-<Errorname>, <Error message>
|
||||||
|
|
||||||
See also the src/curlmsg.msg file, it has the source for the messages In
|
See also the src/curlmsg.msg file, it has the source for the messages In
|
||||||
src/main.c a section is devoted to message status values, the globalvalues
|
src/main.c a section is devoted to message status values, the globalvalues
|
||||||
@@ -484,18 +509,33 @@ NetWare
|
|||||||
http://www.gknw.net/development/prgtools/
|
http://www.gknw.net/development/prgtools/
|
||||||
- recent Novell LibC SDK available from:
|
- recent Novell LibC SDK available from:
|
||||||
http://developer.novell.com/ndk/libc.htm
|
http://developer.novell.com/ndk/libc.htm
|
||||||
- optional zlib sources (at the moment only dynamic linking with zlib.imp);
|
- or recent Novell CLib SDK available from:
|
||||||
|
http://developer.novell.com/ndk/clib.htm
|
||||||
|
- optional recent Novell CLDAP SDK available from:
|
||||||
|
http://developer.novell.com/ndk/cldap.htm
|
||||||
|
- optional zlib sources (static or dynamic linking with zlib.imp);
|
||||||
sources with NetWare Makefile can be obtained from:
|
sources with NetWare Makefile can be obtained from:
|
||||||
http://www.gknw.net/mirror/zlib/
|
http://www.gknw.net/mirror/zlib/
|
||||||
- optional OpenSSL sources (version 0.9.8 or later which builds with BSD);
|
- optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
|
||||||
|
you can find precompiled packages at:
|
||||||
|
http://www.gknw.net/development/ossl/netware/
|
||||||
|
for CLIB-based builds OpenSSL needs to be patched to build with BSD
|
||||||
|
sockets (currently only a winsock-based CLIB build is supported):
|
||||||
|
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8e/openssl-0.9.8e.diff
|
||||||
|
- optional SSH2 sources (version 0.17 or later);
|
||||||
|
|
||||||
Set a search path to your compiler, linker and tools; on Linux make
|
Set a search path to your compiler, linker and tools; on Linux make
|
||||||
sure that the var OSTYPE contains the string 'linux'; and then type
|
sure that the var OSTYPE contains the string 'linux'; set the var
|
||||||
'make netware' from the top source directory; other tagets available
|
NDKBASE to point to the base of your Novell NDK; and then type
|
||||||
|
'make netware' from the top source directory; other targets available
|
||||||
are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares';
|
are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares';
|
||||||
if you need other combinations you can control the build with the
|
if you need other combinations you can control the build with the
|
||||||
environment variables WITH_SSL, WITH_ZLIB, WITH_ARES and ENABLE_IPV6.
|
environment variables WITH_SSL, WITH_ZLIB, WITH_ARES, WITH_SSH2, and
|
||||||
I found on some Linux systems (RH9) that OS detection didnt work although
|
ENABLE_IPV6; you can set LINK_STATIC=1 to link curl.nlm statically.
|
||||||
|
By default LDAP support is enabled, however currently you will need a patch
|
||||||
|
in order to use the CLDAP NDK with BSD sockets (Novell Bug 300237):
|
||||||
|
http://www.gknw.net/test/curl/cldap_ndk/ldap_ndk.diff
|
||||||
|
I found on some Linux systems (RH9) that OS detection didn't work although
|
||||||
a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it
|
a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it
|
||||||
with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
|
with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
|
||||||
Any help in testing appreciated!
|
Any help in testing appreciated!
|
||||||
@@ -577,20 +617,42 @@ eCos
|
|||||||
|
|
||||||
Minix
|
Minix
|
||||||
=====
|
=====
|
||||||
curl can be compiled on Minix 3 using gcc (ACK has a few problems due
|
curl can be compiled on Minix 3 using gcc or ACK (starting with
|
||||||
to mismatched headers and libraries as of ver. 3.1.2). The gcc and bash
|
ver. 3.1.3). The default heap size allocated to several required
|
||||||
packages must be installed first. The default heap size allocated to
|
programs is inadequate for configuring and compiling curl and will
|
||||||
bash is inadequate for running configure and will result in out of memory
|
result in strange errors unless fixed (which only needs to be done
|
||||||
errors. Increase it with the command:
|
once).
|
||||||
|
|
||||||
|
ACK
|
||||||
|
---
|
||||||
|
Increase heap sizes with the commands:
|
||||||
|
|
||||||
|
chmem =1024000 /usr/lib/em_cemcom.ansi
|
||||||
|
chmem =512000 /usr/lib/i386/as
|
||||||
|
|
||||||
|
If you have bash installed:
|
||||||
|
|
||||||
chmem =2048000 /usr/local/bin/bash
|
chmem =2048000 /usr/local/bin/bash
|
||||||
|
|
||||||
Make sure gcc and bash are in the PATH then configure curl with a
|
Configure and compile with:
|
||||||
command like this:
|
|
||||||
|
|
||||||
./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap
|
./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
|
||||||
|
make
|
||||||
|
|
||||||
Then simply run 'make'.
|
GCC
|
||||||
|
---
|
||||||
|
If you have bash installed:
|
||||||
|
|
||||||
|
chmem =2048000 /usr/local/bin/bash
|
||||||
|
|
||||||
|
Make sure gcc is in your PATH with the command:
|
||||||
|
|
||||||
|
export PATH=/usr/gnu/bin:$PATH
|
||||||
|
|
||||||
|
then configure and compile curl with:
|
||||||
|
|
||||||
|
./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
CROSS COMPILE
|
CROSS COMPILE
|
||||||
@@ -705,6 +767,7 @@ PORTS
|
|||||||
- HP3000 MPE/iX
|
- HP3000 MPE/iX
|
||||||
- MIPS IRIX 6.2, 6.5
|
- MIPS IRIX 6.2, 6.5
|
||||||
- MIPS Linux
|
- MIPS Linux
|
||||||
|
- OS/400
|
||||||
- Pocket PC/Win CE 3.0
|
- Pocket PC/Win CE 3.0
|
||||||
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
|
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
|
||||||
- PowerPC Darwin 1.0
|
- PowerPC Darwin 1.0
|
||||||
@@ -719,6 +782,7 @@ PORTS
|
|||||||
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
||||||
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
|
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
|
||||||
- StrongARM NetBSD 1.4.1
|
- StrongARM NetBSD 1.4.1
|
||||||
|
- TPF
|
||||||
- Ultrix 4.3a
|
- Ultrix 4.3a
|
||||||
- UNICOS 9.0
|
- UNICOS 9.0
|
||||||
- i386 BeOS
|
- i386 BeOS
|
||||||
@@ -728,7 +792,7 @@ PORTS
|
|||||||
- i386 FreeBSD
|
- i386 FreeBSD
|
||||||
- i386 HURD
|
- i386 HURD
|
||||||
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
|
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
|
||||||
- i386 MINIX 3.1.2
|
- i386 MINIX 3.1
|
||||||
- i386 NetBSD
|
- i386 NetBSD
|
||||||
- i386 Novell NetWare
|
- i386 Novell NetWare
|
||||||
- i386 OS/2
|
- i386 OS/2
|
||||||
|
@@ -3,14 +3,31 @@ 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!
|
||||||
|
|
||||||
|
47. If a CONNECT response is larger than BUFSIZE when the connection is meant
|
||||||
|
to be kept alive, the function will return prematurely and will confuse the
|
||||||
|
rest of the HTTP protocol code.
|
||||||
|
|
||||||
|
46. If a CONNECT response is chunked-encoded, the function may return
|
||||||
|
prematurely and will confuse the rest of the HTTP protocol code.
|
||||||
|
|
||||||
|
45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
|
||||||
|
getaddrinfo() sorts the response list which effectively kills how libcurl
|
||||||
|
deals with round-robin DNS entries. All details:
|
||||||
|
http://curl.haxx.se/mail/lib-2007-07/0168.html
|
||||||
|
initial suggested function to use for randomizing the response:
|
||||||
|
http://curl.haxx.se/mail/lib-2007-07/0178.html
|
||||||
|
|
||||||
|
44. --ftp-method nocwd does not handle URLs ending with a slash properly (it
|
||||||
|
should list the contents of that directory). See test case 351.
|
||||||
|
|
||||||
|
43. There seems to be a problem when connecting to the Microsoft telnet server.
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=1720605
|
||||||
|
|
||||||
41. When doing an operation over FTP that requires the ACCT command (but not
|
41. When doing an operation over FTP that requires the ACCT command (but not
|
||||||
when logging in), the operation will fail since libcurl doesn't detect this
|
when logging in), the operation will fail since libcurl doesn't detect this
|
||||||
and thus fails to issue the correct command:
|
and thus fails to issue the correct command:
|
||||||
http://curl.haxx.se/bug/view.cgi?id=1693337
|
http://curl.haxx.se/bug/view.cgi?id=1693337
|
||||||
|
|
||||||
40. Mac OS X test failures (Daniel Johnson)
|
|
||||||
http://curl.haxx.se/mail/lib-2007-03/0095.html
|
|
||||||
|
|
||||||
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
|
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
|
||||||
http://curl.haxx.se/mail/lib-2007-01/0045.html
|
http://curl.haxx.se/mail/lib-2007-01/0045.html
|
||||||
|
|
||||||
@@ -53,7 +70,7 @@ may have been fixed since this was written!
|
|||||||
IPv6 numerical addresses in URLs.
|
IPv6 numerical addresses in URLs.
|
||||||
|
|
||||||
29. IPv6 URLs with zone ID is not supported.
|
29. IPv6 URLs with zone ID is not supported.
|
||||||
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt
|
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
|
||||||
specifies the use of a plus sign instead of a percent when specifying zone
|
specifies the use of a plus sign instead of a percent when specifying zone
|
||||||
IDs in URLs to get around the problem of percent signs being
|
IDs in URLs to get around the problem of percent signs being
|
||||||
special. According to the reporter, Firefox deals with the URL _with_ a
|
special. According to the reporter, Firefox deals with the URL _with_ a
|
||||||
@@ -68,7 +85,6 @@ may have been fixed since this was written!
|
|||||||
23. SOCKS-related problems:
|
23. SOCKS-related problems:
|
||||||
A) libcurl doesn't support SOCKS for IPv6.
|
A) libcurl doesn't support SOCKS for IPv6.
|
||||||
B) libcurl doesn't support FTPS over a SOCKS proxy.
|
B) libcurl doesn't support FTPS over a SOCKS proxy.
|
||||||
C) We don't have any test cases for SOCKS proxy.
|
|
||||||
E) libcurl doesn't support active FTP over a SOCKS proxy
|
E) libcurl doesn't support active FTP over a SOCKS proxy
|
||||||
|
|
||||||
We probably have even more bugs and lack of features when a SOCKS proxy is
|
We probably have even more bugs and lack of features when a SOCKS proxy is
|
||||||
|
15
docs/MANUAL
15
docs/MANUAL
@@ -809,18 +809,19 @@ CUSTOM OUTPUT
|
|||||||
|
|
||||||
curl -w 'We downloaded %{size_download} bytes\n' www.download.com
|
curl -w 'We downloaded %{size_download} bytes\n' www.download.com
|
||||||
|
|
||||||
KERBEROS4 FTP TRANSFER
|
KERBEROS FTP TRANSFER
|
||||||
|
|
||||||
Curl supports kerberos4 for FTP transfers. You need the kerberos package
|
Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
|
||||||
installed and used at curl build time for it to be used.
|
the kerberos package installed and used at curl build time for it to be
|
||||||
|
used.
|
||||||
|
|
||||||
First, get the krb-ticket the normal way, like with the kauth tool. Then use
|
First, get the krb-ticket the normal way, like with the kinit/kauth tool.
|
||||||
curl in way similar to:
|
Then use curl in way similar to:
|
||||||
|
|
||||||
curl --krb4 private ftp://krb4site.com -u username:fakepwd
|
curl --krb private ftp://krb4site.com -u username:fakepwd
|
||||||
|
|
||||||
There's no use for a password on the -u switch, but a blank one will make
|
There's no use for a password on the -u switch, but a blank one will make
|
||||||
curl ask for one and you already entered the real password to kauth.
|
curl ask for one and you already entered the real password to kinit/kauth.
|
||||||
|
|
||||||
TELNET
|
TELNET
|
||||||
|
|
||||||
|
@@ -20,3 +20,7 @@ README.win32
|
|||||||
command line similar to this in order to extract a separate text file:
|
command line similar to this in order to extract a separate text file:
|
||||||
|
|
||||||
curl -M >manual.txt
|
curl -M >manual.txt
|
||||||
|
|
||||||
|
Read the INSTALL file for instructions how to compile curl self.
|
||||||
|
|
||||||
|
|
||||||
|
35
docs/THANKS
35
docs/THANKS
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
If you have contributed but are missing here, please let us know!
|
If you have contributed but are missing here, please let us know!
|
||||||
|
|
||||||
|
Adam D. Moss
|
||||||
|
Adam Piggott
|
||||||
Adrian Schuur
|
Adrian Schuur
|
||||||
Alan Pinstein
|
Alan Pinstein
|
||||||
Albert Chin-A-Young
|
Albert Chin-A-Young
|
||||||
@@ -20,7 +22,9 @@ Alexander Zhuravlev
|
|||||||
Alexey Simak
|
Alexey Simak
|
||||||
Alexis Carvalho
|
Alexis Carvalho
|
||||||
Amol Pattekar
|
Amol Pattekar
|
||||||
|
Anders Gustafsson
|
||||||
Andi Jahja
|
Andi Jahja
|
||||||
|
Andre Guibert de Bruet
|
||||||
Andreas Damm
|
Andreas Damm
|
||||||
Andreas Ntaflos
|
Andreas Ntaflos
|
||||||
Andreas Olsson
|
Andreas Olsson
|
||||||
@@ -92,6 +96,8 @@ Dan Fandrich
|
|||||||
Dan Nelson
|
Dan Nelson
|
||||||
Dan Torop
|
Dan Torop
|
||||||
Dan Zitter
|
Dan Zitter
|
||||||
|
Daniel Black
|
||||||
|
Daniel Johnson
|
||||||
Daniel Stenberg
|
Daniel Stenberg
|
||||||
Daniel at touchtunes
|
Daniel at touchtunes
|
||||||
Darryl House
|
Darryl House
|
||||||
@@ -99,6 +105,7 @@ Dave Dribin
|
|||||||
Dave Halbakken
|
Dave Halbakken
|
||||||
Dave Hamilton
|
Dave Hamilton
|
||||||
Dave May
|
Dave May
|
||||||
|
Dave Vasilevsky
|
||||||
David Byron
|
David Byron
|
||||||
David Cohen
|
David Cohen
|
||||||
David Eriksson
|
David Eriksson
|
||||||
@@ -135,6 +142,7 @@ Douglas E. Wegscheid
|
|||||||
Douglas R. Horner
|
Douglas R. Horner
|
||||||
Dov Murik
|
Dov Murik
|
||||||
Duane Cathey
|
Duane Cathey
|
||||||
|
Duncan Mac-Vicar Prett
|
||||||
Dustin Boswell
|
Dustin Boswell
|
||||||
Dylan Ellicott
|
Dylan Ellicott
|
||||||
Dylan Salisbury
|
Dylan Salisbury
|
||||||
@@ -156,23 +164,28 @@ Erwan Legrand
|
|||||||
Erwin Authried
|
Erwin Authried
|
||||||
Eugene Kotlyarov
|
Eugene Kotlyarov
|
||||||
Evan Jordan
|
Evan Jordan
|
||||||
|
Eygene Ryabinkin
|
||||||
Fabrizio Ammollo
|
Fabrizio Ammollo
|
||||||
Fedor Karpelevitch
|
Fedor Karpelevitch
|
||||||
Felix von Leitner
|
Felix von Leitner
|
||||||
|
Feng Tu
|
||||||
Florian Schoppmann
|
Florian Schoppmann
|
||||||
Forrest Cahoon
|
Forrest Cahoon
|
||||||
|
Frank Hempel
|
||||||
Frank Keeney
|
Frank Keeney
|
||||||
Frank Ticheler
|
Frank Ticheler
|
||||||
Fred New
|
Fred New
|
||||||
Fred Noz
|
Fred Noz
|
||||||
Frederic Lepied
|
Frederic Lepied
|
||||||
Gautam Mani
|
Gautam Mani
|
||||||
|
Gavrie Philipson
|
||||||
Gaz Iqbal
|
Gaz Iqbal
|
||||||
Georg Horn
|
Georg Horn
|
||||||
Georg Huettenegger
|
Georg Huettenegger
|
||||||
Georg Wicherski
|
Georg Wicherski
|
||||||
Gerd v. Egidy
|
Gerd v. Egidy
|
||||||
Gerhard Herre
|
Gerhard Herre
|
||||||
|
Gerrit Bruchh<68>user
|
||||||
Giaslas Georgios
|
Giaslas Georgios
|
||||||
Gilad
|
Gilad
|
||||||
Gilbert Ramirez Jr.
|
Gilbert Ramirez Jr.
|
||||||
@@ -191,6 +204,7 @@ Gwenole Beauchesne
|
|||||||
G<EFBFBD>tz Babin-Ebell
|
G<EFBFBD>tz Babin-Ebell
|
||||||
G<EFBFBD>nter Knauf
|
G<EFBFBD>nter Knauf
|
||||||
Hamish Mackenzie
|
Hamish Mackenzie
|
||||||
|
Hang Kin Lau
|
||||||
Hanno Kranzhoff
|
Hanno Kranzhoff
|
||||||
Hans Steegers
|
Hans Steegers
|
||||||
Hardeep Singh
|
Hardeep Singh
|
||||||
@@ -200,6 +214,7 @@ Henrik Storner
|
|||||||
Hzhijun
|
Hzhijun
|
||||||
Ian Ford
|
Ian Ford
|
||||||
Ian Gulliver
|
Ian Gulliver
|
||||||
|
Ian Turner
|
||||||
Ian Wilkes
|
Ian Wilkes
|
||||||
Ignacio Vazquez-Abrams
|
Ignacio Vazquez-Abrams
|
||||||
Igor Polyakov
|
Igor Polyakov
|
||||||
@@ -224,6 +239,7 @@ Jan Kunder
|
|||||||
Jared Lundell
|
Jared Lundell
|
||||||
Jari Sundell
|
Jari Sundell
|
||||||
Jason S. Priebe
|
Jason S. Priebe
|
||||||
|
Jay Austin
|
||||||
Jaz Fresh
|
Jaz Fresh
|
||||||
Jean Jacques Drouin
|
Jean Jacques Drouin
|
||||||
Jean-Claude Chauve
|
Jean-Claude Chauve
|
||||||
@@ -254,6 +270,7 @@ Jonas Forsman
|
|||||||
Jonatan Lander
|
Jonatan Lander
|
||||||
Jonathan Hseu
|
Jonathan Hseu
|
||||||
Jongki Suwandi
|
Jongki Suwandi
|
||||||
|
Jose Kahan
|
||||||
Josh Kapell
|
Josh Kapell
|
||||||
Juan F. Codagnone
|
Juan F. Codagnone
|
||||||
Juan Ignacio Herv<72>s
|
Juan Ignacio Herv<72>s
|
||||||
@@ -262,6 +279,7 @@ Jukka Pihl
|
|||||||
Julian Noble
|
Julian Noble
|
||||||
Jun-ichiro itojun Hagino
|
Jun-ichiro itojun Hagino
|
||||||
Jurij Smakov
|
Jurij Smakov
|
||||||
|
Justin Fletcher
|
||||||
J<EFBFBD>rg Mueller-Tolk
|
J<EFBFBD>rg Mueller-Tolk
|
||||||
J<EFBFBD>rn Hartroth
|
J<EFBFBD>rn Hartroth
|
||||||
Kai Sommerfeld
|
Kai Sommerfeld
|
||||||
@@ -270,6 +288,7 @@ Kang-Jin Lee
|
|||||||
Karl Moerder
|
Karl Moerder
|
||||||
Karol Pietrzak
|
Karol Pietrzak
|
||||||
Katie Wang
|
Katie Wang
|
||||||
|
Kees Cook
|
||||||
Keith MacDonald
|
Keith MacDonald
|
||||||
Keith McGuigan
|
Keith McGuigan
|
||||||
Ken Hirsch
|
Ken Hirsch
|
||||||
@@ -284,6 +303,7 @@ Kjetil Jacobsen
|
|||||||
Klevtsov Vadim
|
Klevtsov Vadim
|
||||||
Kris Kennaway
|
Kris Kennaway
|
||||||
Krishnendu Majumdar
|
Krishnendu Majumdar
|
||||||
|
Kristian Gunstone
|
||||||
Kristian K<>hntopp
|
Kristian K<>hntopp
|
||||||
Kyle Sallee
|
Kyle Sallee
|
||||||
Lachlan O'Dea
|
Lachlan O'Dea
|
||||||
@@ -309,6 +329,7 @@ Luke Call
|
|||||||
Luong Dinh Dung
|
Luong Dinh Dung
|
||||||
Maciej Karpiuk
|
Maciej Karpiuk
|
||||||
Maciej W. Rozycki
|
Maciej W. Rozycki
|
||||||
|
Manfred Schwarb
|
||||||
Marc Boucher
|
Marc Boucher
|
||||||
Marcelo Juchem
|
Marcelo Juchem
|
||||||
Marcin Konicki
|
Marcin Konicki
|
||||||
@@ -330,6 +351,7 @@ Maruko
|
|||||||
Massimiliano Ziccardi
|
Massimiliano Ziccardi
|
||||||
Mathias Axelsson
|
Mathias Axelsson
|
||||||
Mats Lidell
|
Mats Lidell
|
||||||
|
Matt Kraai
|
||||||
Matt Veenstra
|
Matt Veenstra
|
||||||
Matt Witherspoon
|
Matt Witherspoon
|
||||||
Matthew Blain
|
Matthew Blain
|
||||||
@@ -364,6 +386,7 @@ Neil Spring
|
|||||||
Nic Roets
|
Nic Roets
|
||||||
Nick Gimbrone
|
Nick Gimbrone
|
||||||
Nick Humfrey
|
Nick Humfrey
|
||||||
|
Nick Zitzmann
|
||||||
Nico Baggus
|
Nico Baggus
|
||||||
Nicolas Berloquin
|
Nicolas Berloquin
|
||||||
Nicolas Croiset
|
Nicolas Croiset
|
||||||
@@ -394,6 +417,7 @@ Pete Su
|
|||||||
Peter Bray
|
Peter Bray
|
||||||
Peter Forret
|
Peter Forret
|
||||||
Peter Heuchert
|
Peter Heuchert
|
||||||
|
Peter O'Gorman
|
||||||
Peter Pentchev
|
Peter Pentchev
|
||||||
Peter Silva
|
Peter Silva
|
||||||
Peter Su
|
Peter Su
|
||||||
@@ -423,6 +447,7 @@ Rene Bernhardt
|
|||||||
Rene Rebe
|
Rene Rebe
|
||||||
Ricardo Cadime
|
Ricardo Cadime
|
||||||
Rich Gray
|
Rich Gray
|
||||||
|
Rich Rauenzahn
|
||||||
Richard Archer
|
Richard Archer
|
||||||
Richard Atterer
|
Richard Atterer
|
||||||
Richard Bramante
|
Richard Bramante
|
||||||
@@ -432,9 +457,13 @@ Richard Gorton
|
|||||||
Richard Prescott
|
Richard Prescott
|
||||||
Rick Jones
|
Rick Jones
|
||||||
Rick Richardson
|
Rick Richardson
|
||||||
|
Rob Crittenden
|
||||||
|
Rob Jones
|
||||||
Rob Stanzel
|
Rob Stanzel
|
||||||
|
Robert A. Monat
|
||||||
Robert D. Young
|
Robert D. Young
|
||||||
Robert Foreman
|
Robert Foreman
|
||||||
|
Robert Iakobashvili
|
||||||
Robert Olson
|
Robert Olson
|
||||||
Robert Weaver
|
Robert Weaver
|
||||||
Robin Kay
|
Robin Kay
|
||||||
@@ -469,6 +498,8 @@ Siddhartha Prakash Jain
|
|||||||
Simon Dick
|
Simon Dick
|
||||||
Simon Josefsson
|
Simon Josefsson
|
||||||
Simon Liu
|
Simon Liu
|
||||||
|
Song Ma
|
||||||
|
Sonia Subramanian
|
||||||
Spiridonoff A.V
|
Spiridonoff A.V
|
||||||
Stadler Stephan
|
Stadler Stephan
|
||||||
Stefan Esser
|
Stefan Esser
|
||||||
@@ -480,6 +511,7 @@ Stephen More
|
|||||||
Sterling Hughes
|
Sterling Hughes
|
||||||
Steve Green
|
Steve Green
|
||||||
Steve Lhomme
|
Steve Lhomme
|
||||||
|
Steve Little
|
||||||
Steve Marx
|
Steve Marx
|
||||||
Steve Oliphant
|
Steve Oliphant
|
||||||
Steven Bazyl
|
Steven Bazyl
|
||||||
@@ -490,6 +522,7 @@ S
|
|||||||
T. Bharath
|
T. Bharath
|
||||||
T. Yamada
|
T. Yamada
|
||||||
Temprimus
|
Temprimus
|
||||||
|
Thomas J. Moore
|
||||||
Thomas Klausner
|
Thomas Klausner
|
||||||
Thomas Schwinge
|
Thomas Schwinge
|
||||||
Thomas Tonino
|
Thomas Tonino
|
||||||
@@ -497,6 +530,7 @@ Tim Baker
|
|||||||
Tim Bartley
|
Tim Bartley
|
||||||
Tim Costello
|
Tim Costello
|
||||||
Tim Sneddon
|
Tim Sneddon
|
||||||
|
Tobias Rundstr<74>m
|
||||||
Toby Peterson
|
Toby Peterson
|
||||||
Todd Kulesza
|
Todd Kulesza
|
||||||
Todd Vierling
|
Todd Vierling
|
||||||
@@ -504,6 +538,7 @@ Tom Benoist
|
|||||||
Tom Lee
|
Tom Lee
|
||||||
Tom Mattison
|
Tom Mattison
|
||||||
Tom Moers
|
Tom Moers
|
||||||
|
Tom Regner
|
||||||
Tom Zerucha
|
Tom Zerucha
|
||||||
Tomas Pospisek
|
Tomas Pospisek
|
||||||
Tomas Szepe
|
Tomas Szepe
|
||||||
|
72
docs/TODO
72
docs/TODO
@@ -52,6 +52,10 @@ TODO
|
|||||||
that would risk collide with other apps that use libcurl and that runs
|
that would risk collide with other apps that use libcurl and that runs
|
||||||
configure).
|
configure).
|
||||||
|
|
||||||
|
Work on this has been started but hasn't been finished, and the initial
|
||||||
|
patch and some details are found here:
|
||||||
|
http://curl.haxx.se/mail/lib-2006-12/0084.html
|
||||||
|
|
||||||
LIBCURL - multi interface
|
LIBCURL - multi interface
|
||||||
|
|
||||||
* Make sure we don't ever loop because of non-blocking sockets return
|
* Make sure we don't ever loop because of non-blocking sockets return
|
||||||
@@ -72,19 +76,35 @@ TODO
|
|||||||
internally use and assume the multi interface. The select()-loop should use
|
internally use and assume the multi interface. The select()-loop should use
|
||||||
curl_multi_socket().
|
curl_multi_socket().
|
||||||
|
|
||||||
|
* curl_multi_handle_control() - this can control the easy handle (while)
|
||||||
|
added to a multi handle in various ways:
|
||||||
|
o RESTART, unconditionally restart this easy handle's transfer from the
|
||||||
|
start, re-init the state
|
||||||
|
o RESTART_COMPLETED, restart this easy handle's transfer but only if the
|
||||||
|
existing transfer has already completed and it is in a "finished state".
|
||||||
|
o STOP, just stop this transfer and consider it completed
|
||||||
|
o PAUSE?
|
||||||
|
o RESUME?
|
||||||
|
|
||||||
DOCUMENTATION
|
DOCUMENTATION
|
||||||
|
|
||||||
* More and better
|
* More and better
|
||||||
|
|
||||||
FTP
|
FTP
|
||||||
|
|
||||||
|
* PRET is a command that primarily "drftpd" supports, which could be useful
|
||||||
|
when using libcurl against such a server. It is a non-standard and a rather
|
||||||
|
oddly designed command, but...
|
||||||
|
http://curl.haxx.se/bug/feature.cgi?id=1729967
|
||||||
|
|
||||||
|
* When trying to connect passively to a server which only supports active
|
||||||
|
connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
|
||||||
|
connection. There could be a way to fallback to an active connection (and
|
||||||
|
vice versa). http://curl.haxx.se/bug/feature.cgi?id=1754793
|
||||||
|
|
||||||
* Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in
|
* Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in
|
||||||
the process to avoid doing a resolve and connect in vain.
|
the process to avoid doing a resolve and connect in vain.
|
||||||
|
|
||||||
* Support GSS/Kerberos 5 for ftp file transfer. This will allow user
|
|
||||||
authentication and file encryption. Possible libraries and example clients
|
|
||||||
are available from MIT or Heimdal. Requested by Markus Moeller.
|
|
||||||
|
|
||||||
* REST fix for servers not behaving well on >2GB requests. This should fail
|
* 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
|
if the server doesn't set the pointer to the requested index. The tricky
|
||||||
(impossible?) part is to figure out if the server did the right thing or
|
(impossible?) part is to figure out if the server did the right thing or
|
||||||
@@ -96,6 +116,7 @@ TODO
|
|||||||
|
|
||||||
* Make CURLOPT_FTPPORT support an additional port number on the IP/if/name,
|
* Make CURLOPT_FTPPORT support an additional port number on the IP/if/name,
|
||||||
like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]".
|
like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]".
|
||||||
|
http://curl.haxx.se/bug/feature.cgi?id=1505166
|
||||||
|
|
||||||
* FTP ASCII transfers do not follow RFC959. They don't convert the data
|
* FTP ASCII transfers do not follow RFC959. They don't convert the data
|
||||||
accordingly.
|
accordingly.
|
||||||
@@ -115,6 +136,9 @@ TODO
|
|||||||
never been reported as causing trouble to anyone, but should be considered
|
never been reported as causing trouble to anyone, but should be considered
|
||||||
to use the HTTP version the user has chosen.
|
to use the HTTP version the user has chosen.
|
||||||
|
|
||||||
|
* "Better" support for persistent connections over HTTP 1.0
|
||||||
|
http://curl.haxx.se/bug/feature.cgi?id=1089001
|
||||||
|
|
||||||
TELNET
|
TELNET
|
||||||
|
|
||||||
* Reading input (to send to the remote server) on stdin is a crappy solution
|
* Reading input (to send to the remote server) on stdin is a crappy solution
|
||||||
@@ -127,6 +151,9 @@ TODO
|
|||||||
|
|
||||||
SSL
|
SSL
|
||||||
|
|
||||||
|
* Provide an option that allows for disabling specific SSL versions, such as
|
||||||
|
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
|
||||||
|
|
||||||
* Provide a libcurl API for setting mutex callbacks in the underlying SSL
|
* Provide a libcurl API for setting mutex callbacks in the underlying SSL
|
||||||
library, so that the same application code can use mutex-locking
|
library, so that the same application code can use mutex-locking
|
||||||
independently of OpenSSL or GnutTLS being used.
|
independently of OpenSSL or GnutTLS being used.
|
||||||
@@ -198,6 +225,11 @@ TODO
|
|||||||
|
|
||||||
CLIENT
|
CLIENT
|
||||||
|
|
||||||
|
* Add option that is similar to -O but that takes the output file name from
|
||||||
|
the Content-Disposition: header, and/or uses the local file name used in
|
||||||
|
redirections for the cases the server bounces the request further to a
|
||||||
|
different file (name): http://curl.haxx.se/bug/feature.cgi?id=1364676
|
||||||
|
|
||||||
* "curl --sync http://example.com/feed[1-100].rss" or
|
* "curl --sync http://example.com/feed[1-100].rss" or
|
||||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||||
|
|
||||||
@@ -217,10 +249,10 @@ TODO
|
|||||||
|
|
||||||
* "curl ftp://site.com/*.txt"
|
* "curl ftp://site.com/*.txt"
|
||||||
|
|
||||||
* The client could be told to use maximum N simultaneous transfers and then
|
* The client could be told to use maximum N simultaneous parallel transfers
|
||||||
just make sure that happens. It should of course not make more than one
|
and then just make sure that happens. It should of course not make more
|
||||||
connection to the same remote host. This would require the client to use
|
than one connection to the same remote host. This would require the client
|
||||||
the multi interface.
|
to use the multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||||
|
|
||||||
* Extending the capabilities of the multipart formposting. How about leaving
|
* Extending the capabilities of the multipart formposting. How about leaving
|
||||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||||
@@ -265,9 +297,6 @@ TODO
|
|||||||
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
and FTP-SSL tests without the stunnel dependency, and it could allow us to
|
||||||
provide test tools built with either OpenSSL or GnuTLS
|
provide test tools built with either OpenSSL or GnuTLS
|
||||||
|
|
||||||
* Make the test servers able to serve multiple running test suites. Like if
|
|
||||||
two users run 'make test' at once.
|
|
||||||
|
|
||||||
* If perl wasn't found by the configure script, don't attempt to run the
|
* If perl wasn't found by the configure script, don't attempt to run the
|
||||||
tests but explain something nice why it doesn't.
|
tests but explain something nice why it doesn't.
|
||||||
|
|
||||||
@@ -277,6 +306,27 @@ TODO
|
|||||||
* Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
* Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
|
||||||
fork()s and it should become even more portable.
|
fork()s and it should become even more portable.
|
||||||
|
|
||||||
|
NEXT soname bump
|
||||||
|
|
||||||
|
* #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
|
||||||
|
from being output in NOBODY requests over ftp
|
||||||
|
|
||||||
|
* Combine some of the error codes to remove duplicates. The original
|
||||||
|
numbering should not be changed, and the old identifiers would be
|
||||||
|
macroed to the new ones in an CURL_NO_OLDIES section to help with
|
||||||
|
backward compatibility.
|
||||||
|
|
||||||
|
Candidates for removal and their replacements:
|
||||||
|
|
||||||
|
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||||
|
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
|
||||||
|
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
|
||||||
|
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
|
||||||
|
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
|
||||||
|
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
|
||||||
|
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
|
||||||
|
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
|
||||||
|
|
||||||
NEXT MAJOR RELEASE
|
NEXT MAJOR RELEASE
|
||||||
|
|
||||||
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
|
||||||
|
61
docs/curl.1
61
docs/curl.1
@@ -216,7 +216,8 @@ 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
|
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.
|
dirs it mentions already exist, no dir will be created.
|
||||||
|
|
||||||
To create remote directories when using FTP, try \fI--ftp-create-dirs\fP.
|
To create remote directories when using FTP or SFTP, 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).
|
||||||
|
|
||||||
@@ -370,7 +371,7 @@ normal cases when a HTTP server fails to deliver a document, it returns an
|
|||||||
HTML document stating so (which often also describes why and more). This flag
|
HTML document stating so (which often also describes why and more). This flag
|
||||||
will prevent curl from outputting that and return error 22.
|
will prevent curl from outputting that and return error 22.
|
||||||
|
|
||||||
This method is not fail-safe and there are occasions where non-succesful
|
This method is not fail-safe and there are occasions where non-successful
|
||||||
response codes will slip through, especially when authentication is involved
|
response codes will slip through, especially when authentication is involved
|
||||||
(response codes 401 and 407).
|
(response codes 401 and 407).
|
||||||
|
|
||||||
@@ -382,7 +383,7 @@ has been provided, this data is sent off using the ACCT command. (Added in
|
|||||||
|
|
||||||
If this option is used twice, the second will override the previous use.
|
If this option is used twice, the second will override the previous use.
|
||||||
.IP "--ftp-create-dirs"
|
.IP "--ftp-create-dirs"
|
||||||
(FTP) When an FTP URL/operation uses a path that doesn't currently exist on
|
(FTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on
|
||||||
the server, the standard behavior of curl is to fail. Using this option, curl
|
the server, the standard behavior of curl is to fail. Using this option, curl
|
||||||
will instead attempt to create missing directories.
|
will instead attempt to create missing directories.
|
||||||
|
|
||||||
@@ -592,13 +593,14 @@ private key is. DER, PEM and ENG are supported. If not specified, PEM is
|
|||||||
assumed.
|
assumed.
|
||||||
|
|
||||||
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 "--krb4 <level>"
|
.IP "--krb <level>"
|
||||||
(FTP) Enable kerberos4 authentication and use. The level must be entered and
|
(FTP) Enable Kerberos authentication and use. The level must be entered and
|
||||||
should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
|
should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
|
||||||
a level that is not one of these, 'private' will instead be used.
|
a level that is not one of these, 'private' will instead be used.
|
||||||
|
|
||||||
This option requires that the library was built with kerberos4 support. This
|
This option requires that the library was built with kerberos4 or GSSAPI
|
||||||
is not very common. Use \fI-V/--version\fP to see if your curl supports it.
|
(GSS-Negotiate) support. This is not very common. Use \fI-V/--version\fP to
|
||||||
|
see if your curl supports it.
|
||||||
|
|
||||||
If this option is used several times, the last one will be used.
|
If this option is used several times, the last one will be used.
|
||||||
.IP "-K/--config <config file>"
|
.IP "-K/--config <config file>"
|
||||||
@@ -657,6 +659,10 @@ Append this option to any ordinary curl command line, and you will get a
|
|||||||
libcurl-using source code written to the file that does the equivalent
|
libcurl-using source code written to the file that does the equivalent
|
||||||
operation of what your command line operation does!
|
operation of what your command line operation does!
|
||||||
|
|
||||||
|
NOTE: this does not properly support -F and the sending of multipart
|
||||||
|
formposts, so in those cases the output program will be missing necessary
|
||||||
|
calls to \fIcurl_formadd(3)\fP, and possibly more.
|
||||||
|
|
||||||
If this option is used several times, the last given file name will be used.
|
If this option is used several times, the last given file name will be used.
|
||||||
.IP "--limit-rate <speed>"
|
.IP "--limit-rate <speed>"
|
||||||
Specify the maximum transfer rate you want curl to use. This feature is useful
|
Specify the maximum transfer rate you want curl to use. This feature is useful
|
||||||
@@ -689,7 +695,7 @@ subdirectories and symbolic links.
|
|||||||
|
|
||||||
If this option is used twice, the second will again disable list only.
|
If this option is used twice, the second will again disable list only.
|
||||||
.IP "--local-port <num>[-num]"
|
.IP "--local-port <num>[-num]"
|
||||||
Set a prefered number or range of local port numbers to use for the
|
Set a preferred number or range of local port numbers to use for the
|
||||||
connection(s). Note that port numbers by nature is a scarce resource that
|
connection(s). Note that port numbers by nature is a scarce resource that
|
||||||
will be busy at times so setting this range to something too narrow might
|
will be busy at times so setting this range to something too narrow might
|
||||||
cause unnecessary connection setup failures. (Added in 7.15.2)
|
cause unnecessary connection setup failures. (Added in 7.15.2)
|
||||||
@@ -704,6 +710,11 @@ able to intercept the user+password. See also \fI--location-trusted\fP on how
|
|||||||
to change this. You can limit the amount of redirects to follow by using the
|
to change this. You can limit the amount of redirects to follow by using the
|
||||||
\fI--max-redirs\fP option.
|
\fI--max-redirs\fP option.
|
||||||
|
|
||||||
|
When curl follows a redirect and the request is not a plain GET (for example
|
||||||
|
POST or PUT), it will do the following request with a GET if the HTTP response
|
||||||
|
was 301, 302, or 303. If the response code was any other 3xx code, curl will
|
||||||
|
re-send the following request using the same unmodified method.
|
||||||
|
|
||||||
If this option is used twice, the second will again disable location following.
|
If this option is used twice, the second will again disable location following.
|
||||||
.IP "--location-trusted"
|
.IP "--location-trusted"
|
||||||
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
|
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
|
||||||
@@ -867,7 +878,7 @@ separate file.
|
|||||||
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 "-P/--ftp-port <address>"
|
.IP "-P/--ftp-port <address>"
|
||||||
(FTP) Reverses the initiator/listener roles when connecting with ftp. This
|
(FTP) Reverses the initiator/listener roles when connecting with ftp. This
|
||||||
switch makes Curl use the PORT command instead of PASV. In practice, PORT
|
switch makes Curl use the PORT command instead of PASV. In practise, PORT
|
||||||
tells the server to connect to the client's specified address and port, while
|
tells the server to connect to the client's specified address and port, while
|
||||||
PASV asks the server for an ip address and port to connect to. <address>
|
PASV asks the server for an ip address and port to connect to. <address>
|
||||||
should be one of:
|
should be one of:
|
||||||
@@ -891,14 +902,18 @@ If used as the first parameter on the command line, the \fIcurlrc\fP config
|
|||||||
file will not be read and used. See the \fI-K/--config\fP for details on the
|
file will not be read and used. See the \fI-K/--config\fP for details on the
|
||||||
default config file search path.
|
default config file search path.
|
||||||
.IP "-Q/--quote <command>"
|
.IP "-Q/--quote <command>"
|
||||||
(FTP) Send an arbitrary command to the remote FTP server. Quote commands are
|
(FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
|
||||||
sent BEFORE the transfer is taking place (just after the initial PWD command
|
commands are sent BEFORE the transfer is taking place (just after the
|
||||||
to be exact). To make commands take place after a successful transfer, prefix
|
initial PWD command in an FTP transfer, to be exact). To make commands
|
||||||
them with a dash '-'. To make commands get sent after libcurl has changed
|
take place after a successful transfer, prefix them with a dash '-'.
|
||||||
working directory, just before the transfer command(s), prefix the command
|
To make commands get sent after libcurl has changed working directory,
|
||||||
with '+'. You may specify any amount of commands. If the server returns
|
just before the transfer command(s), prefix the command with '+' (this
|
||||||
failure for one of the commands, the entire operation will be aborted. You
|
is only supported for FTP). You may specify any number of commands. If
|
||||||
must send syntactically correct FTP commands as RFC959 defines.
|
the server returns failure for one of the commands, the entire operation
|
||||||
|
will be aborted. You must send syntactically correct FTP commands as
|
||||||
|
RFC959 defines to FTP servers, or one of the following commands (with
|
||||||
|
appropriate arguments) to SFTP servers: chgrp, chmod, chown, ln, mkdir,
|
||||||
|
pwd, rename, rm, rmdir, symlink.
|
||||||
|
|
||||||
This option can be used multiple times.
|
This option can be used multiple times.
|
||||||
.IP "--random-file <file>"
|
.IP "--random-file <file>"
|
||||||
@@ -936,6 +951,10 @@ specifies two separate 100 bytes ranges(*)(H)
|
|||||||
(*) = NOTE that this will cause the server to reply with a multipart
|
(*) = NOTE that this will cause the server to reply with a multipart
|
||||||
response!
|
response!
|
||||||
|
|
||||||
|
Only digit characters (0-9) are valid in 'start' and 'stop' of range syntax
|
||||||
|
\&'start-stop'. If a non-digit character is given in the range, the server's
|
||||||
|
response will be indeterminable, depending on different server's configuration.
|
||||||
|
|
||||||
You should also be aware that many HTTP/1.1 servers do not have this feature
|
You should also be aware that many HTTP/1.1 servers do not have this feature
|
||||||
enabled, so that when you attempt to get a range, you'll instead get the whole
|
enabled, so that when you attempt to get a range, you'll instead get the whole
|
||||||
document.
|
document.
|
||||||
@@ -1082,7 +1101,7 @@ If this option is used several times, each occurrence will toggle it on/off.
|
|||||||
Specify user and password to use for server authentication. Overrides
|
Specify user and password to use for server authentication. Overrides
|
||||||
\fI-n/--netrc\fP and \fI--netrc-optional\fP.
|
\fI-n/--netrc\fP and \fI--netrc-optional\fP.
|
||||||
|
|
||||||
If you use an SSPI-enabled curl binary and do NTLM autentication, you can
|
If you use an SSPI-enabled curl binary and do NTLM authentication, you can
|
||||||
force curl to pick up the user name and password from your environment by
|
force curl to pick up the user name and password from your environment by
|
||||||
simply specifying a single colon with this option: "-u :".
|
simply specifying a single colon with this option: "-u :".
|
||||||
|
|
||||||
@@ -1090,7 +1109,7 @@ If this option is used several times, the last one will be used.
|
|||||||
.IP "-U/--proxy-user <user:password>"
|
.IP "-U/--proxy-user <user:password>"
|
||||||
Specify user and password to use for proxy authentication.
|
Specify user and password to use for proxy authentication.
|
||||||
|
|
||||||
If you use an SSPI-enabled curl binary and do NTLM autentication, you can
|
If you use an SSPI-enabled curl binary and do NTLM authentication, you can
|
||||||
force curl to pick up the user name and password from your environment by
|
force curl to pick up the user name and password from your environment by
|
||||||
simply specifying a single colon with this option: "-U :".
|
simply specifying a single colon with this option: "-U :".
|
||||||
|
|
||||||
@@ -1139,7 +1158,7 @@ Automatic decompression of compressed files over HTTP is supported.
|
|||||||
.IP "NTLM"
|
.IP "NTLM"
|
||||||
NTLM authentication is supported.
|
NTLM authentication is supported.
|
||||||
.IP "GSS-Negotiate"
|
.IP "GSS-Negotiate"
|
||||||
Negotiate authentication is supported.
|
Negotiate authentication and krb5 for ftp is supported.
|
||||||
.IP "Debug"
|
.IP "Debug"
|
||||||
This curl uses a libcurl built with Debug. This enables more error-tracking
|
This curl uses a libcurl built with Debug. This enables more error-tracking
|
||||||
and memory debugging etc. For curl-developers only!
|
and memory debugging etc. For curl-developers only!
|
||||||
@@ -1458,7 +1477,7 @@ Internal error. A function was called in a bad order.
|
|||||||
.IP 45
|
.IP 45
|
||||||
Interface error. A specified outgoing interface could not be used.
|
Interface error. A specified outgoing interface could not be used.
|
||||||
.IP 46
|
.IP 46
|
||||||
Bad password entered. An error was signaled when the password was entered.
|
Bad password entered. An error was signalled when the password was entered.
|
||||||
.IP 47
|
.IP 47
|
||||||
Too many redirects. When following redirects, curl hit the maximum amount.
|
Too many redirects. When following redirects, curl hit the maximum amount.
|
||||||
.IP 48
|
.IP 48
|
||||||
|
@@ -1,2 +1,30 @@
|
|||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
.deps
|
||||||
|
.libs
|
||||||
|
10-at-a-time
|
||||||
|
anyauthput
|
||||||
|
cookie_interface
|
||||||
|
debug
|
||||||
|
fileupload
|
||||||
|
fopen
|
||||||
|
ftpget
|
||||||
|
ftpgetresp
|
||||||
|
ftpupload
|
||||||
|
getinfo
|
||||||
|
getinmemory
|
||||||
|
http-post
|
||||||
|
httpput
|
||||||
|
https
|
||||||
|
multi-app
|
||||||
|
multi-debugcallback
|
||||||
|
multi-double
|
||||||
|
multi-post
|
||||||
|
multi-single
|
||||||
|
persistant
|
||||||
|
post-callback
|
||||||
|
postit2
|
||||||
|
sepheaders
|
||||||
|
simple
|
||||||
|
simplepost
|
||||||
|
simplessl
|
||||||
|
@@ -13,7 +13,10 @@
|
|||||||
* Written by Michael Wallner
|
* Written by Michael Wallner
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <curl/multi.h>
|
#include <curl/multi.h>
|
||||||
|
|
||||||
static const char *urls[] = {
|
static const char *urls[] = {
|
||||||
@@ -106,6 +109,10 @@ int main(void)
|
|||||||
|
|
||||||
cm = curl_multi_init();
|
cm = curl_multi_init();
|
||||||
|
|
||||||
|
/* we can optionally limit the total amount of connections this multi handle
|
||||||
|
uses */
|
||||||
|
curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, MAX);
|
||||||
|
|
||||||
for (C = 0; C < MAX; ++C) {
|
for (C = 0; C < MAX; ++C) {
|
||||||
init(cm, C);
|
init(cm, C);
|
||||||
}
|
}
|
||||||
@@ -123,20 +130,24 @@ int main(void)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return that maxfd is
|
|
||||||
bigger than -1 so that the call to select() below makes sense! */
|
|
||||||
|
|
||||||
if (curl_multi_timeout(cm, &L)) {
|
if (curl_multi_timeout(cm, &L)) {
|
||||||
fprintf(stderr, "E: curl_multi_timeout\n");
|
fprintf(stderr, "E: curl_multi_timeout\n");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (L == -1)
|
||||||
|
L = 100;
|
||||||
|
|
||||||
T.tv_sec = L/1000;
|
if (M == -1) {
|
||||||
T.tv_usec = (L%1000)*1000;
|
sleep(L / 1000);
|
||||||
|
} else {
|
||||||
|
T.tv_sec = L/1000;
|
||||||
|
T.tv_usec = (L%1000)*1000;
|
||||||
|
|
||||||
if (0 > select(M+1, &R, &W, &E, &T)) {
|
if (0 > select(M+1, &R, &W, &E, &T)) {
|
||||||
fprintf(stderr, "E: select\n");
|
fprintf(stderr, "E: select(%i,,,,%li): %i: %s\n",
|
||||||
return EXIT_FAILURE;
|
M+1, L, errno, strerror(errno));
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,6 +166,8 @@ int main(void)
|
|||||||
}
|
}
|
||||||
if (C < CNT) {
|
if (C < CNT) {
|
||||||
init(cm, C++);
|
init(cm, C++);
|
||||||
|
U++; /* just to prevent it from remaining at 0 if there are more
|
||||||
|
URLs to get */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,17 +2,29 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||||
|
|
||||||
EXTRA_DIST = README curlgtk.c sepheaders.c simple.c postit2.c \
|
EXTRA_DIST = README Makefile.example makefile.dj $(COMPLICATED_EXAMPLES)
|
||||||
persistant.c ftpget.c Makefile.example multithread.c getinmemory.c \
|
|
||||||
ftpupload.c httpput.c simplessl.c ftpgetresp.c http-post.c \
|
INCLUDES = -I$(top_srcdir)/include
|
||||||
post-callback.c multi-app.c multi-double.c multi-single.c \
|
|
||||||
multi-post.c fopen.c simplepost.c makefile.dj curlx.c https.c \
|
LIBDIR = $(top_builddir)/lib
|
||||||
multi-debugcallback.c fileupload.c getinfo.c ftp3rdparty.c debug.c \
|
|
||||||
anyauthput.c htmltitle.cc htmltidy.c opensslthreadlock.c \
|
# Dependencies
|
||||||
cookie_interface.c cacertinmem.c synctime.c sampleconv.c ftpuploadresume.c \
|
LDADD = $(LIBDIR)/libcurl.la
|
||||||
10-at-a-time.c hiperfifo.c ghiper.c
|
|
||||||
|
# These are all libcurl example programs to be test compiled
|
||||||
|
noinst_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||||
|
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
||||||
|
getinfo getinmemory http-post httpput \
|
||||||
|
https multi-app multi-debugcallback multi-double \
|
||||||
|
multi-post multi-single persistant post-callback \
|
||||||
|
postit2 sepheaders simple simplepost simplessl
|
||||||
|
|
||||||
|
# These examples require external dependencies that may not be commonly
|
||||||
|
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||||
|
COMPLICATED_EXAMPLES = \
|
||||||
|
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
|
||||||
|
ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||||
|
opensslthreadlock.c sampleconv.c synctime.c
|
||||||
|
|
||||||
all:
|
|
||||||
@echo "done"
|
|
||||||
|
@@ -29,9 +29,8 @@ LDFLAGS = -L/home/dast/lib -L/usr/local/ssl/lib
|
|||||||
# We need -lcurl for the curl stuff
|
# We need -lcurl for the curl stuff
|
||||||
# We need -lsocket and -lnsl when on Solaris
|
# We need -lsocket and -lnsl when on Solaris
|
||||||
# We need -lssl and -lcrypto when using libcurl with SSL support
|
# We need -lssl and -lcrypto when using libcurl with SSL support
|
||||||
# We need -ldl for dlopen() if that is in libdl
|
|
||||||
# We need -lpthread for the pthread example
|
# We need -lpthread for the pthread example
|
||||||
LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto -dl
|
LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
|
||||||
|
|
||||||
# Link the target with all objects and libraries
|
# Link the target with all objects and libraries
|
||||||
$(TARGET) : $(OBJS)
|
$(TARGET) : $(OBJS)
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -18,6 +19,10 @@
|
|||||||
#error "upgrade your libcurl to no less than 7.12.3"
|
#error "upgrade your libcurl to no less than 7.12.3"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef TRUE
|
||||||
|
#define TRUE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This example shows a HTTP PUT operation with authentiction using "any"
|
* This example shows a HTTP PUT operation with authentiction using "any"
|
||||||
* type. It PUTs a file given as a command line argument to the URL also given
|
* type. It PUTs a file given as a command line argument to the URL also given
|
||||||
@@ -52,7 +57,7 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* read callback function, fread() look alike */
|
/* read callback function, fread() look alike */
|
||||||
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
size_t retcode;
|
size_t retcode;
|
||||||
|
|
||||||
|
@@ -135,4 +135,5 @@ int main(void)
|
|||||||
|
|
||||||
curl_easy_cleanup(ch);
|
curl_easy_cleanup(ch);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@@ -74,7 +75,7 @@ main(void)
|
|||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
/* Netscape format cookie */
|
/* Netscape format cookie */
|
||||||
snprintf(nline, 256, "%s\t%s\t%s\t%s\t%u\t%s\t%s",
|
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
|
||||||
".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
|
".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
|
||||||
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
|
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
|
||||||
if (res != CURLE_OK) {
|
if (res != CURLE_OK) {
|
||||||
@@ -83,7 +84,7 @@ main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* HTTP-header style cookie */
|
/* HTTP-header style cookie */
|
||||||
snprintf(nline, 256,
|
snprintf(nline, sizeof(nline),
|
||||||
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
|
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
|
||||||
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
|
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
|
||||||
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
|
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
|
||||||
|
@@ -81,6 +81,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
#include <openssl/x509_vfy.h>
|
#include <openssl/x509_vfy.h>
|
||||||
@@ -94,13 +95,13 @@
|
|||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
static char *curlx_usage[]={
|
static const char *curlx_usage[]={
|
||||||
"usage: curlx args\n",
|
"usage: curlx args\n",
|
||||||
" -p12 arg - tia file ",
|
" -p12 arg - tia file ",
|
||||||
" -envpass arg - environement variable which content the tia private key password",
|
" -envpass arg - environement variable which content the tia private key password",
|
||||||
" -out arg - output file (response)- default stdout",
|
" -out arg - output file (response)- default stdout",
|
||||||
" -in arg - input file (request)- default stdin",
|
" -in arg - input file (request)- default stdin",
|
||||||
" -connect arg - URL of the server for the connection ex: www.openevidenve.org",
|
" -connect arg - URL of the server for the connection ex: www.openevidence.org",
|
||||||
" -mimetype arg - MIME type for data in ex : application/timestamp-query or application/dvcs -default application/timestamp-query",
|
" -mimetype arg - MIME type for data in ex : application/timestamp-query or application/dvcs -default application/timestamp-query",
|
||||||
" -acceptmime arg - MIME type acceptable for the response ex : application/timestamp-response or application/dvcs -default none",
|
" -acceptmime arg - MIME type acceptable for the response ex : application/timestamp-response or application/dvcs -default none",
|
||||||
" -accesstype arg - an Object identifier in an AIA/SIA method, e.g. AD_DVCS or ad_timestamping",
|
" -accesstype arg - an Object identifier in an AIA/SIA method, e.g. AD_DVCS or ad_timestamping",
|
||||||
@@ -268,19 +269,21 @@ int main(int argc, char **argv) {
|
|||||||
char* mimetype;
|
char* mimetype;
|
||||||
char* mimetypeaccept=NULL;
|
char* mimetypeaccept=NULL;
|
||||||
char* contenttype;
|
char* contenttype;
|
||||||
char** pp;
|
const char** pp;
|
||||||
unsigned char* hostporturl = NULL;
|
unsigned char* hostporturl = NULL;
|
||||||
binaryptr=(char*)malloc(tabLength);
|
|
||||||
BIO * p12bio ;
|
BIO * p12bio ;
|
||||||
char **args = argv + 1;
|
char **args = argv + 1;
|
||||||
unsigned char * serverurl;
|
unsigned char * serverurl;
|
||||||
sslctxparm p;
|
sslctxparm p;
|
||||||
char *response;
|
char *response;
|
||||||
p.verbose = 0;
|
|
||||||
|
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
struct curl_slist * headers=NULL;
|
struct curl_slist * headers=NULL;
|
||||||
|
int badarg=0;
|
||||||
|
|
||||||
|
binaryptr=(char*)malloc(tabLength);
|
||||||
|
|
||||||
|
p.verbose = 0;
|
||||||
p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE);
|
p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE);
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
@@ -292,7 +295,6 @@ int main(int argc, char **argv) {
|
|||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
|
|
||||||
|
|
||||||
int badarg=0;
|
|
||||||
|
|
||||||
while (*args && *args[0] == '-') {
|
while (*args && *args[0] == '-') {
|
||||||
if (!strcmp (*args, "-in")) {
|
if (!strcmp (*args, "-in")) {
|
||||||
@@ -407,10 +409,9 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */
|
else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */
|
||||||
if (!(serverurl = my_get_ext(p.usercert,p.accesstype,NID_info_access))) {
|
if (!(serverurl = my_get_ext(p.usercert,p.accesstype,NID_info_access))) {
|
||||||
|
int j=0;
|
||||||
BIO_printf(p.errorbio,"no service URL in user cert "
|
BIO_printf(p.errorbio,"no service URL in user cert "
|
||||||
"cherching in others certificats\n");
|
"cherching in others certificats\n");
|
||||||
int j=0;
|
|
||||||
int find=0;
|
|
||||||
for (j=0;j<sk_X509_num(p.ca);j++) {
|
for (j=0;j<sk_X509_num(p.ca);j++) {
|
||||||
if ((serverurl = my_get_ext(sk_X509_value(p.ca,j),p.accesstype,
|
if ((serverurl = my_get_ext(sk_X509_value(p.ca,j),p.accesstype,
|
||||||
NID_info_access)))
|
NID_info_access)))
|
||||||
|
@@ -17,7 +17,6 @@ int main(void)
|
|||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
curl_off_t size;
|
|
||||||
struct stat file_info;
|
struct stat file_info;
|
||||||
double speed_upload, total_time;
|
double speed_upload, total_time;
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
|
@@ -70,7 +70,7 @@ struct fcurl_data
|
|||||||
typedef struct fcurl_data URL_FILE;
|
typedef struct fcurl_data URL_FILE;
|
||||||
|
|
||||||
/* exported functions */
|
/* exported functions */
|
||||||
URL_FILE *url_fopen(char *url,const char *operation);
|
URL_FILE *url_fopen(const char *url,const char *operation);
|
||||||
int url_fclose(URL_FILE *file);
|
int url_fclose(URL_FILE *file);
|
||||||
int url_feof(URL_FILE *file);
|
int url_feof(URL_FILE *file);
|
||||||
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
|
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
|
||||||
@@ -93,11 +93,11 @@ write_callback(char *buffer,
|
|||||||
URL_FILE *url = (URL_FILE *)userp;
|
URL_FILE *url = (URL_FILE *)userp;
|
||||||
size *= nitems;
|
size *= nitems;
|
||||||
|
|
||||||
rembuff=url->buffer_len - url->buffer_pos;//remaining space in buffer
|
rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
|
||||||
|
|
||||||
if(size > rembuff)
|
if(size > rembuff)
|
||||||
{
|
{
|
||||||
//not enuf space in buffer
|
/* not enough space in buffer */
|
||||||
newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
|
newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
|
||||||
if(newbuff==NULL)
|
if(newbuff==NULL)
|
||||||
{
|
{
|
||||||
@@ -211,7 +211,7 @@ use_buffer(URL_FILE *file,int want)
|
|||||||
|
|
||||||
|
|
||||||
URL_FILE *
|
URL_FILE *
|
||||||
url_fopen(char *url,const char *operation)
|
url_fopen(const char *url,const char *operation)
|
||||||
{
|
{
|
||||||
/* this code could check for URLs or types in the 'url' and
|
/* this code could check for URLs or types in the 'url' and
|
||||||
basicly use the real fopen() for standard files */
|
basicly use the real fopen() for standard files */
|
||||||
@@ -236,7 +236,7 @@ url_fopen(char *url,const char *operation)
|
|||||||
|
|
||||||
curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
|
curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
|
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
|
||||||
curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, FALSE);
|
curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0);
|
||||||
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
|
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
|
||||||
|
|
||||||
if(!multi_handle)
|
if(!multi_handle)
|
||||||
@@ -466,7 +466,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
int nread;
|
int nread;
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
char *url;
|
const char *url;
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
{
|
{
|
||||||
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
|
|||||||
outf=fopen("fgets.test","w+");
|
outf=fopen("fgets.test","w+");
|
||||||
if(!outf)
|
if(!outf)
|
||||||
{
|
{
|
||||||
perror("couldnt open fgets output file\n");
|
perror("couldn't open fgets output file\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -508,7 +508,7 @@ main(int argc, char *argv[])
|
|||||||
outf=fopen("fread.test","w+");
|
outf=fopen("fread.test","w+");
|
||||||
if(!outf)
|
if(!outf)
|
||||||
{
|
{
|
||||||
perror("couldnt open fread output file\n");
|
perror("couldn't open fread output file\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ main(int argc, char *argv[])
|
|||||||
outf=fopen("rewind.test","w+");
|
outf=fopen("rewind.test","w+");
|
||||||
if(!outf)
|
if(!outf)
|
||||||
{
|
{
|
||||||
perror("couldnt open fread output file\n");
|
perror("couldn't open fread output file\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,103 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* _ _ ____ _
|
|
||||||
* Project ___| | | | _ \| |
|
|
||||||
* / __| | | | |_) | |
|
|
||||||
* | (__| |_| | _ <| |___
|
|
||||||
* \___|\___/|_| \_\_____|
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <curl/curl.h>
|
|
||||||
#include <curl/types.h>
|
|
||||||
#include <curl/easy.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is an example showing how to transfer a file between two remote hosts.
|
|
||||||
* 7.13.0 or later required.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
CURL *curl;
|
|
||||||
CURLcode res;
|
|
||||||
char source_url[] = "ftp://remotehost.com/path/to/source";
|
|
||||||
char target_url[] = "ftp://aotherserver.com/path/to/dest";
|
|
||||||
|
|
||||||
char sourceUserPass[] = "user:pass";
|
|
||||||
char targetUserPass[] = "user:pass";
|
|
||||||
char url[100];
|
|
||||||
|
|
||||||
struct curl_slist *source_pre_cmd = NULL;
|
|
||||||
struct curl_slist *target_pre_cmd = NULL;
|
|
||||||
struct curl_slist *source_post_cmd = NULL;
|
|
||||||
struct curl_slist *target_post_cmd = NULL;
|
|
||||||
char cmd[] = "PWD"; /* just to test */
|
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
|
||||||
|
|
||||||
curl = curl_easy_init();
|
|
||||||
if (curl) {
|
|
||||||
/* The ordinary URL is the target when speaking 3rd party transfers */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, target_url);
|
|
||||||
|
|
||||||
/* Set a source URL */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SOURCE_URL, source_url);
|
|
||||||
|
|
||||||
/* Set target user and password */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_USERPWD, targetUserPass);
|
|
||||||
|
|
||||||
/* Set source user and password */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SOURCE_USERPWD, sourceUserPass);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* FTPPORT enables PORT on the target side, instead of PASV. */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_FTPPORT, ""); /* optional */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* build a list of commands to pass to libcurl */
|
|
||||||
source_pre_cmd = curl_slist_append(source_pre_cmd, cmd);
|
|
||||||
/* Set a proxy pre-quote command */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SOURCE_PREQUOTE, source_pre_cmd);
|
|
||||||
|
|
||||||
/* build a list of commands to pass to libcurl */
|
|
||||||
target_pre_cmd = curl_slist_append(target_pre_cmd, cmd);
|
|
||||||
/* Set a pre-quote command */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_PREQUOTE, target_pre_cmd);
|
|
||||||
|
|
||||||
/* build a list of commands to pass to libcurl */
|
|
||||||
source_post_cmd = curl_slist_append(source_post_cmd, cmd);
|
|
||||||
/* Set a proxy post-quote command */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_SOURCE_POSTQUOTE, source_post_cmd);
|
|
||||||
|
|
||||||
/* build a list of commands to pass to libcurl */
|
|
||||||
target_post_cmd = curl_slist_append(target_post_cmd, cmd);
|
|
||||||
/* Set a post-quote command */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, target_post_cmd);
|
|
||||||
|
|
||||||
/* Switch on full protocol/debug output */
|
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
|
||||||
|
|
||||||
res = curl_easy_perform(curl);
|
|
||||||
|
|
||||||
/* clean up the FTP commands list */
|
|
||||||
curl_slist_free_all(source_pre_cmd);
|
|
||||||
curl_slist_free_all(target_pre_cmd);
|
|
||||||
curl_slist_free_all(source_post_cmd);
|
|
||||||
curl_slist_free_all(target_post_cmd);
|
|
||||||
|
|
||||||
/* always cleanup */
|
|
||||||
curl_easy_cleanup(curl);
|
|
||||||
|
|
||||||
if(CURLE_OK != res) {
|
|
||||||
/* we failed */
|
|
||||||
fprintf(stderr, "curl told us %d\n", res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
curl_global_cleanup();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@@ -22,11 +22,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct FtpFile {
|
struct FtpFile {
|
||||||
char *filename;
|
const char *filename;
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
|
static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
struct FtpFile *out=(struct FtpFile *)stream;
|
struct FtpFile *out=(struct FtpFile *)stream;
|
||||||
if(out && !out->stream) {
|
if(out && !out->stream) {
|
||||||
@@ -65,7 +65,7 @@ int main(void)
|
|||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
|
||||||
|
|
||||||
/* Switch on full protocol/debug output */
|
/* Switch on full protocol/debug output */
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
* This functionality was introduced in libcurl 7.9.3.
|
* This functionality was introduced in libcurl 7.9.3.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t
|
static size_t
|
||||||
write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
||||||
{
|
{
|
||||||
FILE *writehere = (FILE *)data;
|
FILE *writehere = (FILE *)data;
|
||||||
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
|
|||||||
CURLcode res;
|
CURLcode res;
|
||||||
FILE *ftpfile;
|
FILE *ftpfile;
|
||||||
FILE *respfile;
|
FILE *respfile;
|
||||||
|
|
||||||
/* local file name to store the file as */
|
/* local file name to store the file as */
|
||||||
ftpfile = fopen("ftp-list", "wb"); /* b is binary, needed on win32 */
|
ftpfile = fopen("ftp-list", "wb"); /* b is binary, needed on win32 */
|
||||||
|
|
||||||
@@ -46,6 +46,8 @@ int main(int argc, char **argv)
|
|||||||
/* Get a file listing from sunet */
|
/* Get a file listing from sunet */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
|
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
|
||||||
|
/* If you intend to use this on windows with a libcurl DLL, you must use
|
||||||
|
CURLOPT_WRITEFUNCTION as well */
|
||||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
|
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
|
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This example shows an FTP upload, with a rename of the file just after
|
* This example shows an FTP upload, with a rename of the file just after
|
||||||
@@ -31,14 +32,13 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
FILE *ftpfile;
|
|
||||||
FILE * hd_src ;
|
FILE * hd_src ;
|
||||||
int hd ;
|
int hd ;
|
||||||
struct stat file_info;
|
struct stat file_info;
|
||||||
|
|
||||||
struct curl_slist *headerlist=NULL;
|
struct curl_slist *headerlist=NULL;
|
||||||
char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
|
static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
|
||||||
char buf_2 [] = "RNTO " RENAME_FILE_TO;
|
static const char buf_2 [] = "RNTO " RENAME_FILE_TO;
|
||||||
|
|
||||||
/* get the file size of the local file */
|
/* get the file size of the local file */
|
||||||
hd = open(LOCAL_FILE, O_RDONLY) ;
|
hd = open(LOCAL_FILE, O_RDONLY) ;
|
||||||
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
|||||||
headerlist = curl_slist_append(headerlist, buf_2);
|
headerlist = curl_slist_append(headerlist, buf_2);
|
||||||
|
|
||||||
/* enable uploading */
|
/* enable uploading */
|
||||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
|
||||||
|
|
||||||
/* specify target */
|
/* specify target */
|
||||||
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);
|
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);
|
||||||
|
@@ -24,7 +24,9 @@
|
|||||||
|
|
||||||
/* The MinGW headers are missing a few Win32 function definitions,
|
/* The MinGW headers are missing a few Win32 function definitions,
|
||||||
you shouldn't need this if you use VC++ */
|
you shouldn't need this if you use VC++ */
|
||||||
|
#ifdef __MINGW32__
|
||||||
int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
|
int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* parse headers for Content-Length */
|
/* parse headers for Content-Length */
|
||||||
@@ -75,7 +77,7 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1);
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
|
curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
|
||||||
|
|
||||||
@@ -91,9 +93,9 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
|||||||
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
|
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */
|
curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1);
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
for (c = 0; (r != CURLE_OK) && (c < tries); c++) {
|
for (c = 0; (r != CURLE_OK) && (c < tries); c++) {
|
||||||
/* are we resuming? */
|
/* are we resuming? */
|
||||||
@@ -108,22 +110,22 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
|||||||
* because HEADER will dump the headers to stdout
|
* because HEADER will dump the headers to stdout
|
||||||
* without it.
|
* without it.
|
||||||
*/
|
*/
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1);
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1);
|
||||||
|
|
||||||
r = curl_easy_perform(curlhandle);
|
r = curl_easy_perform(curlhandle);
|
||||||
if (r != CURLE_OK)
|
if (r != CURLE_OK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, FALSE);
|
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0);
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, FALSE);
|
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0);
|
||||||
|
|
||||||
fseek(f, uploaded_len, SEEK_SET);
|
fseek(f, uploaded_len, SEEK_SET);
|
||||||
|
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, TRUE);
|
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1);
|
||||||
}
|
}
|
||||||
else { /* no */
|
else { /* no */
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, FALSE);
|
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = curl_easy_perform(curlhandle);
|
r = curl_easy_perform(curlhandle);
|
||||||
|
@@ -26,7 +26,7 @@ struct MemoryStruct {
|
|||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
void *myrealloc(void *ptr, size_t size)
|
static void *myrealloc(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
/* There might be a realloc() out there that doesn't like reallocing
|
/* There might be a realloc() out there that doesn't like reallocing
|
||||||
NULL pointers, so we take care of it here */
|
NULL pointers, so we take care of it here */
|
||||||
@@ -36,7 +36,7 @@ void *myrealloc(void *ptr, size_t size)
|
|||||||
return malloc(size);
|
return malloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
static size_t
|
||||||
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
||||||
{
|
{
|
||||||
size_t realsize = size * nmemb;
|
size_t realsize = size * nmemb;
|
||||||
|
@@ -91,9 +91,9 @@ typedef struct _SockInfo {
|
|||||||
|
|
||||||
|
|
||||||
/* Die if we get a bad CURLMcode somewhere */
|
/* Die if we get a bad CURLMcode somewhere */
|
||||||
static void mcode_or_die(char *where, CURLMcode code) {
|
static void mcode_or_die(const char *where, CURLMcode code) {
|
||||||
if ( CURLM_OK != code ) {
|
if ( CURLM_OK != code ) {
|
||||||
char *s;
|
const char *s;
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||||
case CURLM_OK: s="CURLM_OK"; break;
|
case CURLM_OK: s="CURLM_OK"; break;
|
||||||
@@ -259,7 +259,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||||||
{
|
{
|
||||||
GlobalInfo *g = (GlobalInfo*) cbp;
|
GlobalInfo *g = (GlobalInfo*) cbp;
|
||||||
SockInfo *fdp = (SockInfo*) sockp;
|
SockInfo *fdp = (SockInfo*) sockp;
|
||||||
char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
|
static const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
|
||||||
|
|
||||||
MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
|
MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
|
||||||
if (what == CURL_POLL_REMOVE) {
|
if (what == CURL_POLL_REMOVE) {
|
||||||
@@ -402,7 +402,7 @@ static gboolean fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data)
|
|||||||
int init_fifo(void)
|
int init_fifo(void)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fifo = "hiper.fifo";
|
const char *fifo = "hiper.fifo";
|
||||||
int socket;
|
int socket;
|
||||||
|
|
||||||
if (lstat (fifo, &st) == 0) {
|
if (lstat (fifo, &st) == 0) {
|
||||||
|
@@ -92,18 +92,15 @@ typedef struct _SockInfo {
|
|||||||
|
|
||||||
|
|
||||||
/* Update the event timer after curl_multi library calls */
|
/* Update the event timer after curl_multi library calls */
|
||||||
static void update_timeout(GlobalInfo *g)
|
static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
||||||
{
|
{
|
||||||
long timeout_ms;
|
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
|
|
||||||
curl_multi_timeout(g->multi, &timeout_ms);
|
|
||||||
if(timeout_ms < 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
timeout.tv_sec = timeout_ms/1000;
|
timeout.tv_sec = timeout_ms/1000;
|
||||||
timeout.tv_usec = (timeout_ms%1000)*1000;
|
timeout.tv_usec = (timeout_ms%1000)*1000;
|
||||||
|
fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
|
||||||
evtimer_add(&g->timer_event, &timeout);
|
evtimer_add(&g->timer_event, &timeout);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -185,9 +182,7 @@ static void event_cb(int fd, short kind, void *userp)
|
|||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||||
mcode_or_die("event_cb: curl_multi_socket", rc);
|
mcode_or_die("event_cb: curl_multi_socket", rc);
|
||||||
check_run_count(g);
|
check_run_count(g);
|
||||||
if(g->still_running) {
|
if ( g->still_running <= 0 ) {
|
||||||
update_timeout(g);
|
|
||||||
} else {
|
|
||||||
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
||||||
if (evtimer_pending(&g->timer_event, NULL)) {
|
if (evtimer_pending(&g->timer_event, NULL)) {
|
||||||
evtimer_del(&g->timer_event);
|
evtimer_del(&g->timer_event);
|
||||||
@@ -210,7 +205,6 @@ static void timer_cb(int fd, short kind, void *userp)
|
|||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||||
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
||||||
check_run_count(g);
|
check_run_count(g);
|
||||||
if ( g->still_running ) { update_timeout(g); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -258,7 +252,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
|||||||
{
|
{
|
||||||
GlobalInfo *g = (GlobalInfo*) cbp;
|
GlobalInfo *g = (GlobalInfo*) cbp;
|
||||||
SockInfo *fdp = (SockInfo*) sockp;
|
SockInfo *fdp = (SockInfo*) sockp;
|
||||||
char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
|
const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
|
||||||
|
|
||||||
fprintf(MSG_OUT,
|
fprintf(MSG_OUT,
|
||||||
"socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
|
"socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
|
||||||
@@ -363,7 +357,7 @@ void fifo_cb(int fd, short event, void *arg) {
|
|||||||
/* Create a named pipe and tell libevent to monitor it */
|
/* Create a named pipe and tell libevent to monitor it */
|
||||||
int init_fifo (GlobalInfo *g) {
|
int init_fifo (GlobalInfo *g) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *fifo = "hiper.fifo";
|
static const char *fifo = "hiper.fifo";
|
||||||
int socket;
|
int socket;
|
||||||
|
|
||||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||||
@@ -406,10 +400,11 @@ int main(int argc, char **argv)
|
|||||||
evtimer_set(&g.timer_event, timer_cb, &g);
|
evtimer_set(&g.timer_event, timer_cb, &g);
|
||||||
curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
|
curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
|
||||||
curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
|
curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
|
||||||
|
curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
|
||||||
|
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
||||||
do {
|
do {
|
||||||
rc = curl_multi_socket_all(g.multi, &g.still_running);
|
rc = curl_multi_socket_all(g.multi, &g.still_running);
|
||||||
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
||||||
update_timeout(&g);
|
|
||||||
event_dispatch();
|
event_dispatch();
|
||||||
curl_multi_cleanup(g.multi);
|
curl_multi_cleanup(g.multi);
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
* http://www.apacheweek.com/features/put
|
* http://www.apacheweek.com/features/put
|
||||||
*/
|
*/
|
||||||
|
|
||||||
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
size_t retcode;
|
size_t retcode;
|
||||||
|
|
||||||
@@ -75,10 +76,10 @@ int main(int argc, char **argv)
|
|||||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||||
|
|
||||||
/* enable uploading */
|
/* enable uploading */
|
||||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
|
||||||
|
|
||||||
/* HTTP PUT please */
|
/* HTTP PUT please */
|
||||||
curl_easy_setopt(curl, CURLOPT_PUT, TRUE);
|
curl_easy_setopt(curl, CURLOPT_PUT, 1);
|
||||||
|
|
||||||
/* specify target URL, and note that this URL should include a file
|
/* specify target URL, and note that this URL should include a file
|
||||||
name, not only a directory */
|
name, not only a directory */
|
||||||
|
@@ -31,7 +31,7 @@ int main(void)
|
|||||||
* default bundle, then the CURLOPT_CAPATH option might come handy for
|
* default bundle, then the CURLOPT_CAPATH option might come handy for
|
||||||
* you.
|
* you.
|
||||||
*/
|
*/
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SKIP_HOSTNAME_VERFICATION
|
#ifdef SKIP_HOSTNAME_VERFICATION
|
||||||
|
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
|||||||
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
|
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
|
||||||
|
|
||||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
|
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
|
||||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, TRUE);
|
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1);
|
||||||
|
|
||||||
/* init a multi stack */
|
/* init a multi stack */
|
||||||
multi_handle = curl_multi_init();
|
multi_handle = curl_multi_init();
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
|
||||||
|
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
int still_running;
|
int still_running;
|
||||||
@@ -27,7 +26,7 @@ int main(int argc, char *argv[])
|
|||||||
struct curl_httppost *formpost=NULL;
|
struct curl_httppost *formpost=NULL;
|
||||||
struct curl_httppost *lastptr=NULL;
|
struct curl_httppost *lastptr=NULL;
|
||||||
struct curl_slist *headerlist=NULL;
|
struct curl_slist *headerlist=NULL;
|
||||||
char buf[] = "Expect:";
|
static const char buf[] = "Expect:";
|
||||||
|
|
||||||
/* Fill in the file upload field. This makes libcurl load data from
|
/* Fill in the file upload field. This makes libcurl load data from
|
||||||
the given file name when curl_easy_perform() is called. */
|
the given file name when curl_easy_perform() is called. */
|
||||||
@@ -58,7 +57,6 @@ int main(int argc, char *argv[])
|
|||||||
wanted */
|
wanted */
|
||||||
headerlist = curl_slist_append(headerlist, buf);
|
headerlist = curl_slist_append(headerlist, buf);
|
||||||
if(curl && multi_handle) {
|
if(curl && multi_handle) {
|
||||||
int perform=0;
|
|
||||||
|
|
||||||
/* what URL that receives this POST */
|
/* what URL that receives this POST */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL,
|
curl_easy_setopt(curl, CURLOPT_URL,
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
|
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
|
||||||
|
|
||||||
*/
|
*/
|
||||||
char *urls[]= {
|
const char *urls[]= {
|
||||||
"http://curl.haxx.se/",
|
"http://curl.haxx.se/",
|
||||||
"ftp://cool.haxx.se/",
|
"ftp://cool.haxx.se/",
|
||||||
"http://www.contactor.se/",
|
"http://www.contactor.se/",
|
||||||
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
|
|||||||
error = pthread_create(&tid[i],
|
error = pthread_create(&tid[i],
|
||||||
NULL, /* default attributes please */
|
NULL, /* default attributes please */
|
||||||
pull_one_url,
|
pull_one_url,
|
||||||
urls[i]);
|
(void *)urls[i]);
|
||||||
if(0 != error)
|
if(0 != error)
|
||||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||||
else
|
else
|
||||||
|
@@ -16,6 +16,11 @@
|
|||||||
* Author: Jeremy Brown
|
* Author: Jeremy Brown
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <openssl/err.h>
|
||||||
|
|
||||||
#define MUTEX_TYPE pthread_mutex_t
|
#define MUTEX_TYPE pthread_mutex_t
|
||||||
#define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL)
|
#define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL)
|
||||||
#define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x))
|
#define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x))
|
||||||
@@ -25,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void handle_error(const char *file, int lineno, const char *msg){
|
void handle_error(const char *file, int lineno, const char *msg){
|
||||||
fprintf(stderr, ** %s:%i %s\n, file, lineno, msg);
|
fprintf(stderr, "** %s:%d %s\n", file, lineno, msg);
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
/* exit(-1); */
|
/* exit(-1); */
|
||||||
}
|
}
|
||||||
|
@@ -15,14 +15,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
char data[]="this is what we post to the silly web server";
|
const char data[]="this is what we post to the silly web server";
|
||||||
|
|
||||||
struct WriteThis {
|
struct WriteThis {
|
||||||
char *readptr;
|
const char *readptr;
|
||||||
int sizeleft;
|
int sizeleft;
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
{
|
{
|
||||||
struct WriteThis *pooh = (struct WriteThis *)userp;
|
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ int main(void)
|
|||||||
curl_easy_setopt(curl, CURLOPT_URL,
|
curl_easy_setopt(curl, CURLOPT_URL,
|
||||||
"http://receivingsite.com.pooh/index.cgi");
|
"http://receivingsite.com.pooh/index.cgi");
|
||||||
/* Now specify we want to POST data */
|
/* Now specify we want to POST data */
|
||||||
curl_easy_setopt(curl, CURLOPT_POST, TRUE);
|
curl_easy_setopt(curl, CURLOPT_POST, 1);
|
||||||
|
|
||||||
/* we want to use our own read function */
|
/* we want to use our own read function */
|
||||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||||
|
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
|
|||||||
struct curl_httppost *formpost=NULL;
|
struct curl_httppost *formpost=NULL;
|
||||||
struct curl_httppost *lastptr=NULL;
|
struct curl_httppost *lastptr=NULL;
|
||||||
struct curl_slist *headerlist=NULL;
|
struct curl_slist *headerlist=NULL;
|
||||||
char buf[] = "Expect:";
|
static const char buf[] = "Expect:";
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#include <curl/types.h>
|
#include <curl/types.h>
|
||||||
#include <curl/easy.h>
|
#include <curl/easy.h>
|
||||||
|
|
||||||
size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
int written = fwrite(ptr, size, nmemb, (FILE *)stream);
|
int written = fwrite(ptr, size, nmemb, (FILE *)stream);
|
||||||
return written;
|
return written;
|
||||||
@@ -25,9 +25,9 @@ size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
char *headerfilename = "head.out";
|
static const char *headerfilename = "head.out";
|
||||||
FILE *headerfile;
|
FILE *headerfile;
|
||||||
char *bodyfilename = "body.out";
|
static const char *bodyfilename = "body.out";
|
||||||
FILE *bodyfile;
|
FILE *bodyfile;
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
@@ -16,7 +17,7 @@ int main(void)
|
|||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
|
||||||
char *postthis="moo mooo moo moo";
|
static const char *postthis="moo mooo moo moo";
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
|
@@ -38,9 +38,10 @@ int main(int argc, char **argv)
|
|||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
FILE *headerfile;
|
FILE *headerfile;
|
||||||
|
const char *pPassphrase = NULL;
|
||||||
|
|
||||||
const char *pCertFile = "testcert.pem";
|
static const char *pCertFile = "testcert.pem";
|
||||||
const char *pCACertFile="cacert.pem";
|
static const char *pCACertFile="cacert.pem";
|
||||||
|
|
||||||
const char *pKeyName;
|
const char *pKeyName;
|
||||||
const char *pKeyType;
|
const char *pKeyType;
|
||||||
@@ -57,8 +58,6 @@ int main(int argc, char **argv)
|
|||||||
pEngine = NULL;
|
pEngine = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *pPassphrase = NULL;
|
|
||||||
|
|
||||||
headerfile = fopen("dumpit", "w");
|
headerfile = fopen("dumpit", "w");
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
@@ -96,7 +95,7 @@ int main(int argc, char **argv)
|
|||||||
/* sorry, for engine we must set the passphrase
|
/* sorry, for engine we must set the passphrase
|
||||||
(if the key has one...) */
|
(if the key has one...) */
|
||||||
if (pPassphrase)
|
if (pPassphrase)
|
||||||
curl_easy_setopt(curl,CURLOPT_SSLKEYPASSWD,pPassphrase);
|
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,pPassphrase);
|
||||||
|
|
||||||
/* if we use a key stored in a crypto engine,
|
/* if we use a key stored in a crypto engine,
|
||||||
we must set the key type to "ENG" */
|
we must set the key type to "ENG" */
|
||||||
|
@@ -87,7 +87,7 @@ typedef struct
|
|||||||
char timeserver[MAX_STRING1];
|
char timeserver[MAX_STRING1];
|
||||||
} conf_t;
|
} conf_t;
|
||||||
|
|
||||||
char DefaultTimeServer[4][MAX_STRING1] =
|
const char DefaultTimeServer[4][MAX_STRING1] =
|
||||||
{
|
{
|
||||||
"http://nist.time.gov/timezone.cgi?UTC/s/0",
|
"http://nist.time.gov/timezone.cgi?UTC/s/0",
|
||||||
"http://www.google.com/",
|
"http://www.google.com/",
|
||||||
@@ -95,9 +95,9 @@ char DefaultTimeServer[4][MAX_STRING1] =
|
|||||||
"http://www.worldtime.com/cgi-bin/wt.cgi"
|
"http://www.worldtime.com/cgi-bin/wt.cgi"
|
||||||
};
|
};
|
||||||
|
|
||||||
char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
||||||
char *MthStr[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
const char *MthStr[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
|
||||||
|
|
||||||
int ShowAllHeader;
|
int ShowAllHeader;
|
||||||
int AutoSyncTime;
|
int AutoSyncTime;
|
||||||
|
@@ -1,8 +1,27 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\" $Id$
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2007, 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_easy_cleanup 3 "12 Oct 2006" "libcurl 7.7" "libcurl Manual"
|
.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_cleanup - End a libcurl easy session
|
curl_easy_cleanup - End a libcurl easy session
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -19,11 +38,12 @@ This will effectively close all connections this handle has used and possibly
|
|||||||
has kept open until now. Don't call this function if you intend to transfer
|
has kept open until now. Don't call this function if you intend to transfer
|
||||||
more files.
|
more files.
|
||||||
|
|
||||||
When you've called this, you can safely remove all the strings you've
|
|
||||||
previously told libcurl to use, as it won't use them anymore now.
|
|
||||||
|
|
||||||
Any uses of the \fBhandle\fP after this function has been called are
|
Any uses of the \fBhandle\fP after this function has been called are
|
||||||
illegal. This kills the handle and all memory associated with it!
|
illegal. This kills the handle and all memory associated with it!
|
||||||
|
|
||||||
|
With libcurl versions prior to 7.17.: when you've called this, you can safely
|
||||||
|
remove all the strings you've previously told libcurl to use, as it won't use
|
||||||
|
them anymore now.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
None
|
None
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
@@ -39,7 +39,7 @@ this function AFTER a performed transfer if you want to get transfer- oriented
|
|||||||
data.
|
data.
|
||||||
|
|
||||||
You should not free the memory returned by this function unless it is
|
You should not free the memory returned by this function unless it is
|
||||||
explictly mentioned below.
|
explicitly mentioned below.
|
||||||
.SH AVAILABLE INFORMATION
|
.SH AVAILABLE INFORMATION
|
||||||
The following information can be extracted:
|
The following information can be extracted:
|
||||||
.IP CURLINFO_EFFECTIVE_URL
|
.IP CURLINFO_EFFECTIVE_URL
|
||||||
@@ -133,7 +133,9 @@ protocol used doesn't support this.
|
|||||||
.IP CURLINFO_PRIVATE
|
.IP CURLINFO_PRIVATE
|
||||||
Pass a pointer to a 'char *' to receive the pointer to the private data
|
Pass a pointer to a 'char *' to receive the pointer to the private data
|
||||||
associated with the curl handle (set with the CURLOPT_PRIVATE option to
|
associated with the curl handle (set with the CURLOPT_PRIVATE option to
|
||||||
\fIcurl_easy_setopt(3)\fP). (Added in 7.10.3)
|
\fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
|
||||||
|
value is returned as a 'char *', although effectively being a 'void *'.
|
||||||
|
(Added in 7.10.3)
|
||||||
.IP CURLINFO_HTTPAUTH_AVAIL
|
.IP CURLINFO_HTTPAUTH_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. The meaning of the bits is explained in the
|
method(s) available. The meaning of the bits is explained in the
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
.\" * $Id$
|
.\" * $Id$
|
||||||
.\" **************************************************************************
|
.\" **************************************************************************
|
||||||
.\"
|
.\"
|
||||||
.TH curl_easy_setopt 3 "22 Feb 2007" "libcurl 7.16.2" "libcurl Manual"
|
.TH curl_easy_setopt 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_setopt \- set options for a curl easy handle
|
curl_easy_setopt \- set options for a curl easy handle
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -44,11 +44,13 @@ between transfers, so if you want subsequent transfers with different options,
|
|||||||
you must change them between the transfers. You can optionally reset all
|
you must change them between the transfers. You can optionally reset all
|
||||||
options back to internal default with \fIcurl_easy_reset(3)\fP.
|
options back to internal default with \fIcurl_easy_reset(3)\fP.
|
||||||
|
|
||||||
Strings passed to libcurl as 'char *' arguments, will not be copied by the
|
Strings passed to libcurl as 'char *' arguments, are copied by the library;
|
||||||
library. Instead you should keep them available until libcurl no longer needs
|
thus the string storage associated to the pointer argument may be overwritten
|
||||||
them. Failing to do so will cause very odd behavior or even crashes. libcurl
|
after curl_easy_setopt() returns. Exceptions to this rule are described in
|
||||||
will need them until you call \fIcurl_easy_cleanup(3)\fP or you set the same
|
the option details below.
|
||||||
option again to use a different pointer.
|
|
||||||
|
NOTE: before 7.17.0 strings were not copied. Instead the user was forced keep
|
||||||
|
them available until libcurl no longer needed them.
|
||||||
|
|
||||||
The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
|
The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
|
||||||
\fIcurl_easy_duphandle(3)\fP call.
|
\fIcurl_easy_duphandle(3)\fP call.
|
||||||
@@ -194,8 +196,7 @@ this callback will cause libcurl to abort the transfer and return
|
|||||||
|
|
||||||
If you transfer data with the multi interface, this function will not be
|
If you transfer data with the multi interface, this function will not be
|
||||||
called during periods of idleness unless you call the appropriate libcurl
|
called during periods of idleness unless you call the appropriate libcurl
|
||||||
function that performs transfers. Usage of the \fBCURLOPT_PROGRESSFUNCTION\fP
|
function that performs transfers.
|
||||||
callback is not recommended when using the multi interface.
|
|
||||||
|
|
||||||
\fICURLOPT_NOPROGRESS\fP must be set to FALSE to make this function actually
|
\fICURLOPT_NOPROGRESS\fP must be set to FALSE to make this function actually
|
||||||
get called.
|
get called.
|
||||||
@@ -330,6 +331,12 @@ system.
|
|||||||
Pass a char * to a buffer that the libcurl may store human readable error
|
Pass a char * to a buffer that the libcurl may store human readable error
|
||||||
messages in. This may be more helpful than just the return code from
|
messages in. This may be more helpful than just the return code from
|
||||||
\fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
|
\fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
|
||||||
|
Although this argument is a 'char *', it does not describe an input string.
|
||||||
|
Therefore the (probably undefined) contents of the buffer is NOT copied
|
||||||
|
by the library. You should keep the associated storage available until
|
||||||
|
libcurl no longer needs it. Failing to do so will cause very odd behavior
|
||||||
|
or even crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP
|
||||||
|
or you set the same option again to use a different pointer.
|
||||||
|
|
||||||
Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
|
Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
|
||||||
debug/trace why errors happen.
|
debug/trace why errors happen.
|
||||||
@@ -345,7 +352,7 @@ A non-zero parameter tells the library to fail silently if the HTTP code
|
|||||||
returned is equal to or larger than 400. The default action would be to return
|
returned is equal to or larger than 400. The default action would be to return
|
||||||
the page normally, ignoring that code.
|
the page normally, ignoring that code.
|
||||||
|
|
||||||
This method is not fail-safe and there are occasions where non-succesful
|
This method is not fail-safe and there are occasions where non-successful
|
||||||
response codes will slip through, especially when authentication is involved
|
response codes will slip through, especially when authentication is involved
|
||||||
(response codes 401 and 407).
|
(response codes 401 and 407).
|
||||||
|
|
||||||
@@ -445,7 +452,7 @@ not an order. You cannot be guaranteed to actually get the given size. (Added
|
|||||||
in 7.10)
|
in 7.10)
|
||||||
|
|
||||||
This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it
|
This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it
|
||||||
only makse sense to use this option if you want it smaller.
|
only makes sense to use this option if you want it smaller.
|
||||||
.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.
|
||||||
@@ -649,7 +656,7 @@ When setting \fICURLOPT_POST\fP to a non-zero value, it will automatically set
|
|||||||
\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
|
\fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
|
||||||
|
|
||||||
If you issue a POST request and then want to make a HEAD or GET using the same
|
If you issue a POST request and then want to make a HEAD or GET using the same
|
||||||
re-used handle, you must explictly set the new request type using
|
re-used handle, you must explicitly set the new request type using
|
||||||
\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
|
\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
|
||||||
.IP CURLOPT_POSTFIELDS
|
.IP CURLOPT_POSTFIELDS
|
||||||
Pass a char * as parameter, which should be the full data to post in an HTTP
|
Pass a char * as parameter, which should be the full data to post in an HTTP
|
||||||
@@ -662,6 +669,12 @@ set that Content-Type by default when this option is used), which is the most
|
|||||||
commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
|
commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
|
||||||
\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
|
\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
|
||||||
|
|
||||||
|
If you want to do a zero-byte POST, you need to set
|
||||||
|
\fICURLOPT_POSTFIELDSIZE\fP explicitly to zero, as simply setting
|
||||||
|
\fICURLOPT_POSTFIELDS\fP to NULL or "" just effectively disables the sending
|
||||||
|
of the specified string. libcurl will instead assume that you'll send the POST
|
||||||
|
data using the read callback!
|
||||||
|
|
||||||
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
|
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
|
||||||
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
|
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
|
||||||
|
|
||||||
@@ -736,10 +749,9 @@ 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.
|
||||||
|
|
||||||
The alias itself is not parsed for any version strings. So if your alias is
|
The alias itself is not parsed for any version strings. Before libcurl 7.16.3,
|
||||||
\&"MYHTTP/9.9", Libcurl will not treat the server as responding with HTTP
|
Libcurl used the value set by option \fICURLOPT_HTTP_VERSION\fP, but starting
|
||||||
version 9.9. Instead Libcurl will use the value set by option
|
with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
|
||||||
\fICURLOPT_HTTP_VERSION\fP.
|
|
||||||
.IP CURLOPT_COOKIE
|
.IP CURLOPT_COOKIE
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||||
set a cookie in the http request. The format of the string should be
|
set a cookie in the http request. The format of the string should be
|
||||||
@@ -752,7 +764,7 @@ multiple cookies in one string like this: "name1=content1; name2=content2;"
|
|||||||
etc.
|
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.
|
previous ones.
|
||||||
.IP CURLOPT_COOKIEFILE
|
.IP CURLOPT_COOKIEFILE
|
||||||
Pass a pointer to a zero terminated string as parameter. It should contain the
|
Pass a pointer to a zero terminated string as parameter. It should contain the
|
||||||
name of your file holding cookie data to read. The cookie data may be in
|
name of your file holding cookie data to read. The cookie data may be in
|
||||||
@@ -811,6 +823,7 @@ it thinks fit.
|
|||||||
Enforce HTTP 1.0 requests.
|
Enforce HTTP 1.0 requests.
|
||||||
.IP CURL_HTTP_VERSION_1_1
|
.IP CURL_HTTP_VERSION_1_1
|
||||||
Enforce HTTP 1.1 requests.
|
Enforce HTTP 1.1 requests.
|
||||||
|
.RE
|
||||||
.IP CURLOPT_IGNORE_CONTENT_LENGTH
|
.IP CURLOPT_IGNORE_CONTENT_LENGTH
|
||||||
Ignore the Content-Length header. This is useful for Apache 1.x (and similar
|
Ignore the Content-Length header. This is useful for Apache 1.x (and similar
|
||||||
servers) which will report incorrect content length for files over 2
|
servers) which will report incorrect content length for files over 2
|
||||||
@@ -827,7 +840,6 @@ Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
|
|||||||
transfer decoding will be disabled, if set to 1 it is enabled
|
transfer decoding will be disabled, if set to 1 it is enabled
|
||||||
(default). libcurl does chunked transfer decoding by default unless this
|
(default). libcurl does chunked transfer decoding by default unless this
|
||||||
option is set to zero. (added in 7.16.2)
|
option is set to zero. (added in 7.16.2)
|
||||||
.RE
|
|
||||||
.SH FTP OPTIONS
|
.SH FTP OPTIONS
|
||||||
.IP CURLOPT_FTPPORT
|
.IP CURLOPT_FTPPORT
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||||
@@ -840,19 +852,22 @@ address. Default FTP operations are passive, and thus won't use PORT.
|
|||||||
You disable PORT again and go back to using the passive version by setting
|
You disable PORT again and go back to using the passive version by setting
|
||||||
this option to NULL.
|
this option to NULL.
|
||||||
.IP CURLOPT_QUOTE
|
.IP CURLOPT_QUOTE
|
||||||
Pass a pointer to a linked list of FTP commands to pass to the server prior to
|
Pass a pointer to a linked list of FTP or SFTP commands to pass to
|
||||||
your ftp request. This will be done before any other FTP commands are issued
|
the server prior to your ftp request. This will be done before any
|
||||||
(even before the CWD command). The linked list should be a fully valid list of
|
other commands are issued (even before the CWD command for FTP). The
|
||||||
'struct curl_slist' structs properly filled in. Use \fIcurl_slist_append(3)\fP
|
linked list should be a fully valid list of 'struct curl_slist' structs
|
||||||
to append strings (commands) to the list, and clear the entire list afterwards
|
properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
|
||||||
with \fIcurl_slist_free_all(3)\fP. Disable this operation again by setting a
|
to append strings (commands) to the list, and clear the entire list
|
||||||
NULL to this option.
|
afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation
|
||||||
|
again by setting a NULL to this option.
|
||||||
|
The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd,
|
||||||
|
rename, rm, rmdir, symlink. (SFTP support added in 7.16.3)
|
||||||
.IP CURLOPT_POSTQUOTE
|
.IP CURLOPT_POSTQUOTE
|
||||||
Pass a pointer to a linked list of FTP commands to pass to the server after
|
Pass a pointer to a linked list of FTP or SFTP commands to pass to the
|
||||||
your ftp transfer request. The linked list should be a fully valid list of
|
server after your ftp transfer request. The linked list should be a
|
||||||
struct curl_slist structs properly filled in as described for
|
fully valid list of struct curl_slist structs properly filled in as
|
||||||
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
|
described for \fICURLOPT_QUOTE\fP. Disable this operation again by
|
||||||
option.
|
setting a NULL to this option.
|
||||||
.IP CURLOPT_PREQUOTE
|
.IP CURLOPT_PREQUOTE
|
||||||
Pass a pointer to a linked list of FTP commands to pass to the server after
|
Pass a pointer to a linked list of FTP commands to pass to the server after
|
||||||
the transfer type is set. The linked list should be a fully valid list of
|
the transfer type is set. The linked list should be a fully valid list of
|
||||||
@@ -860,17 +875,21 @@ struct curl_slist structs properly filled in as described for
|
|||||||
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
|
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
|
||||||
option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
|
option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
|
||||||
this option didn't work.
|
this option didn't work.
|
||||||
.IP CURLOPT_FTPLISTONLY
|
.IP CURLOPT_DIRLISTONLY
|
||||||
A non-zero parameter tells the library to just list the names of an ftp
|
A non-zero parameter tells the library to just list the names of files in a
|
||||||
directory, instead of doing a full directory listing that would include file
|
directory, instead of doing a full directory listing that would include file
|
||||||
sizes, dates etc.
|
sizes, dates etc. This works for FTP and SFTP URLs.
|
||||||
|
|
||||||
This causes an FTP NLST command to be sent. Beware that some FTP servers list
|
This causes an FTP NLST command to be sent on an FTP server. Beware
|
||||||
only files in their response to NLST; they might not include subdirectories
|
that some FTP servers list only files in their response to NLST; they
|
||||||
and symbolic links.
|
might not include subdirectories and symbolic links.
|
||||||
.IP CURLOPT_FTPAPPEND
|
|
||||||
|
(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
|
||||||
|
.IP CURLOPT_APPEND
|
||||||
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 an ftp site.
|
overwrite it. This is only useful when uploading to an ftp site.
|
||||||
|
|
||||||
|
(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
|
||||||
.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
|
||||||
@@ -890,6 +909,11 @@ If the server is an IPv6 host, this option will have no effect as of 7.12.3.
|
|||||||
Pass a long. If the value is non-zero, curl will attempt to create any remote
|
Pass a long. If the value is non-zero, curl will attempt to create any remote
|
||||||
directory that it fails to CWD into. CWD is the command that changes working
|
directory that it fails to CWD into. CWD is the command that changes working
|
||||||
directory. (Added in 7.10.7)
|
directory. (Added in 7.10.7)
|
||||||
|
|
||||||
|
This setting also applies to SFTP-connections. curl will attempt to create
|
||||||
|
the remote directory if it can't obtain a handle to the target-location. The
|
||||||
|
creation will fail if a file of the same name as the directory to create
|
||||||
|
already exists or lack of permissions prevents creation. (Added in 7.16.3)
|
||||||
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
|
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
|
||||||
Pass a long. Causes curl to set a timeout period (in seconds) on the amount
|
Pass a long. Causes curl to set a timeout period (in seconds) on the amount
|
||||||
of time that the server is allowed to take in order to generate a response
|
of time that the server is allowed to take in order to generate a response
|
||||||
@@ -912,18 +936,21 @@ same IP address it already uses for the control connection. But it will use
|
|||||||
the port number from the 227-response. (Added in 7.14.2)
|
the port number from the 227-response. (Added in 7.14.2)
|
||||||
|
|
||||||
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
|
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
|
||||||
.IP CURLOPT_FTP_SSL
|
.IP CURLOPT_USE_SSL
|
||||||
Pass a long using one of the values from below, to make libcurl use your
|
Pass a long using one of the values from below, to make libcurl use your
|
||||||
desired level of SSL for the ftp transfer. (Added in 7.11.0)
|
desired level of SSL for the ftp transfer. (Added in 7.11.0)
|
||||||
|
|
||||||
|
(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
|
||||||
|
were known as CURLFTPSSL_*)
|
||||||
.RS
|
.RS
|
||||||
.IP CURLFTPSSL_NONE
|
.IP CURLUSESSL_NONE
|
||||||
Don't attempt to use SSL.
|
Don't attempt to use SSL.
|
||||||
.IP CURLFTPSSL_TRY
|
.IP CURLUSESSL_TRY
|
||||||
Try using SSL, proceed as normal otherwise.
|
Try using SSL, proceed as normal otherwise.
|
||||||
.IP CURLFTPSSL_CONTROL
|
.IP CURLUSESSL_CONTROL
|
||||||
Require SSL for the control connection or fail with \fICURLE_FTP_SSL_FAILED\fP.
|
Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||||
.IP CURLFTPSSL_ALL
|
.IP CURLUSESSL_ALL
|
||||||
Require SSL for all communication or fail with \fICURLE_FTP_SSL_FAILED\fP.
|
Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||||
.RE
|
.RE
|
||||||
.IP CURLOPT_FTPSSLAUTH
|
.IP CURLOPT_FTPSSLAUTH
|
||||||
Pass a long using one of the values from below, to alter how libcurl issues
|
Pass a long using one of the values from below, to alter how libcurl issues
|
||||||
@@ -1036,6 +1063,9 @@ When uploading a file to a remote site, this option should be used to tell
|
|||||||
libcurl what the expected size of the infile is. This value should be passed
|
libcurl what the expected size of the infile is. This value should be passed
|
||||||
as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
|
as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
|
||||||
|
|
||||||
|
For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE\fP is
|
||||||
|
mandatory.
|
||||||
|
|
||||||
Note that this option does not limit how much data libcurl will actually send,
|
Note that this option does not limit how much data libcurl will actually send,
|
||||||
as that is controlled entirely by what the read callback returns.
|
as that is controlled entirely by what the read callback returns.
|
||||||
.IP CURLOPT_INFILESIZE_LARGE
|
.IP CURLOPT_INFILESIZE_LARGE
|
||||||
@@ -1043,6 +1073,8 @@ When uploading a file to a remote site, this option should be used to tell
|
|||||||
libcurl what the expected size of the infile is. This value should be passed
|
libcurl what the expected size of the infile is. This value should be passed
|
||||||
as a curl_off_t. (Added in 7.11.0)
|
as a curl_off_t. (Added in 7.11.0)
|
||||||
|
|
||||||
|
For uploading using SCP, this option or \fICURLOPT_INFILESIZE\fP is mandatory.
|
||||||
|
|
||||||
Note that this option does not limit how much data libcurl will actually send,
|
Note that this option does not limit how much data libcurl will actually send,
|
||||||
as that is controlled entirely by what the read callback returns.
|
as that is controlled entirely by what the read callback returns.
|
||||||
.IP CURLOPT_UPLOAD
|
.IP CURLOPT_UPLOAD
|
||||||
@@ -1124,10 +1156,10 @@ speed. (Added in 7.15.5)
|
|||||||
.IP CURLOPT_MAXCONNECTS
|
.IP CURLOPT_MAXCONNECTS
|
||||||
Pass a long. The set number will be the persistent connection cache size. The
|
Pass a long. The set number will be the persistent connection cache size. The
|
||||||
set amount will be the maximum amount of simultaneously open connections that
|
set amount will be the maximum amount of simultaneously open connections that
|
||||||
libcurl may cache. Default is 5, and there isn't much point in changing this
|
libcurl may cache in this easy handle. Default is 5, and there isn't much
|
||||||
value unless you are perfectly aware of how this work and changes libcurl's
|
point in changing this value unless you are perfectly aware of how this work
|
||||||
behaviour. This concerns connection using any of the protocols that support
|
and changes libcurl's behaviour. This concerns connection using any of the
|
||||||
persistent connections.
|
protocols that support persistent connections.
|
||||||
|
|
||||||
When reaching the maximum limit, curl closes the oldest one in the cache to
|
When reaching the maximum limit, curl closes the oldest one in the cache to
|
||||||
prevent the number of open connections to increase.
|
prevent the number of open connections to increase.
|
||||||
@@ -1135,6 +1167,10 @@ prevent the number of open connections to increase.
|
|||||||
If you already have performed transfers with this curl handle, setting a
|
If you already have performed transfers with this curl handle, setting a
|
||||||
smaller MAXCONNECTS than before may cause open connections to get closed
|
smaller MAXCONNECTS than before may cause open connections to get closed
|
||||||
unnecessarily.
|
unnecessarily.
|
||||||
|
|
||||||
|
Note that if you add this easy handle to a multi handle, this setting is not
|
||||||
|
being acknowledged, but you must instead use \fIcurl_multi_setopt(3)\fP and
|
||||||
|
the \fICURLMOPT_MAXCONNECTS\fP option.
|
||||||
.IP CURLOPT_CLOSEPOLICY
|
.IP CURLOPT_CLOSEPOLICY
|
||||||
(Obsolete) This option does nothing.
|
(Obsolete) This option does nothing.
|
||||||
.IP CURLOPT_FRESH_CONNECT
|
.IP CURLOPT_FRESH_CONNECT
|
||||||
@@ -1196,13 +1232,6 @@ with.
|
|||||||
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 certificate. Supported formats are "PEM" and "DER". (Added
|
the format of your certificate. Supported formats are "PEM" and "DER". (Added
|
||||||
in 7.9.3)
|
in 7.9.3)
|
||||||
.IP CURLOPT_SSLCERTPASSWD
|
|
||||||
Pass a pointer to a zero terminated string as parameter. It will be used as
|
|
||||||
the password required to use the \fICURLOPT_SSLCERT\fP certificate.
|
|
||||||
|
|
||||||
This option is replaced by \fICURLOPT_SSLKEYPASSWD\fP and should only be used
|
|
||||||
for backward compatibility. You never needed a pass phrase to load a
|
|
||||||
certificate but you need one to load your private key.
|
|
||||||
.IP CURLOPT_SSLKEY
|
.IP CURLOPT_SSLKEY
|
||||||
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 file name of your private key. The default format is "PEM" and can be
|
the file name of your private key. The default format is "PEM" and can be
|
||||||
@@ -1215,10 +1244,15 @@ 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 the
|
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.
|
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.
|
\&"DER" format key file currently does not work because of a bug in OpenSSL.
|
||||||
.IP CURLOPT_SSLKEYPASSWD
|
.IP CURLOPT_KEYPASSWD
|
||||||
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 or
|
the password required to use the \fICURLOPT_SSLKEY\fP or
|
||||||
\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
|
\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
|
||||||
|
You never needed a pass phrase to load a certificate but you need one to
|
||||||
|
load your private key.
|
||||||
|
|
||||||
|
(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
|
||||||
|
CURLOPT_SSLCERTPASSWD up to 7.9.2)
|
||||||
.IP CURLOPT_SSLENGINE
|
.IP CURLOPT_SSLENGINE
|
||||||
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 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
|
||||||
@@ -1356,27 +1390,32 @@ this to 1 to enable it. By default all transfers are done using the
|
|||||||
cache. Note that while nothing ever should get hurt by attempting to reuse SSL
|
cache. Note that while nothing ever should get hurt by attempting to reuse SSL
|
||||||
session-IDs, there seem to be broken SSL implementations in the wild that may
|
session-IDs, there seem to be broken SSL implementations in the wild that may
|
||||||
require you to disable this in order for you to succeed. (Added in 7.16.0)
|
require you to disable this in order for you to succeed. (Added in 7.16.0)
|
||||||
.IP CURLOPT_KRB4LEVEL
|
.IP CURLOPT_KRBLEVEL
|
||||||
Pass a char * as parameter. Set the krb4 security level, this also enables
|
Pass a char * as parameter. Set the kerberos security level for FTP; this
|
||||||
krb4 awareness. This is a string, 'clear', 'safe', 'confidential' or
|
also enables kerberos awareness. This is a string, 'clear', 'safe',
|
||||||
\&'private'. If the string is set but doesn't match one of these, 'private'
|
'confidential' or \&'private'. If the string is set but doesn't match one
|
||||||
will be used. Set the string to NULL to disable kerberos4. The kerberos
|
of these, 'private' will be used. Set the string to NULL to disable kerberos
|
||||||
support only works for FTP.
|
support for FTP.
|
||||||
|
|
||||||
|
(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
|
||||||
.SH SSH OPTIONS
|
.SH SSH OPTIONS
|
||||||
.IP CURLOPT_SSH_AUTH_TYPES
|
.IP CURLOPT_SSH_AUTH_TYPES
|
||||||
Pass a long set to a bitmask consisting of one or more of
|
Pass a long set to a bitmask consisting of one or more of
|
||||||
CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
|
CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
|
||||||
CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
|
CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
|
||||||
|
(Added in 7.16.1)
|
||||||
.IP CURLOPT_SSH_PUBLIC_KEYFILE
|
.IP CURLOPT_SSH_PUBLIC_KEYFILE
|
||||||
Pass a char * pointing to a file name for your public key. If not used,
|
Pass a char * pointing to a file name for your public key. If not used,
|
||||||
libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
|
libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
|
||||||
|
(Added in 7.16.1)
|
||||||
.IP CURLOPT_SSH_PRIVATE_KEYFILE
|
.IP CURLOPT_SSH_PRIVATE_KEYFILE
|
||||||
Pass a char * pointing to a file name for your private key. If not used,
|
Pass a char * pointing to a file name for your private key. If not used,
|
||||||
libcurl defaults to using \fB~/.ssh/id_dsa\fP.
|
libcurl defaults to using \fB~/.ssh/id_dsa\fP.
|
||||||
If the file is password-protected, set the password with \fICURLOPT_SSLKEYPASSWD\fP.
|
If the file is password-protected, set the password with \fICURLOPT_KEYPASSWD\fP.
|
||||||
|
(Added in 7.16.1)
|
||||||
.SH OTHER OPTIONS
|
.SH OTHER OPTIONS
|
||||||
.IP CURLOPT_PRIVATE
|
.IP CURLOPT_PRIVATE
|
||||||
Pass a char * as parameter, pointing to data that should be associated with
|
Pass a void * as parameter, pointing to data that should be associated with
|
||||||
this curl handle. The pointer can subsequently be retrieved using
|
this curl handle. The pointer can subsequently be retrieved using
|
||||||
\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
|
\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
|
||||||
does nothing with this data. (Added in 7.10.3)
|
does nothing with this data. (Added in 7.10.3)
|
||||||
@@ -1387,6 +1426,17 @@ this curl handle use the data from the shared handle instead of keeping the
|
|||||||
data to itself. This enables several curl handles to share data. If the curl
|
data to itself. This enables several curl handles to share data. If the curl
|
||||||
handles are used simultaneously, you \fBMUST\fP use the locking methods in the
|
handles are used simultaneously, you \fBMUST\fP use the locking methods in the
|
||||||
share handle. See \fIcurl_share_setopt(3)\fP for details.
|
share handle. See \fIcurl_share_setopt(3)\fP for details.
|
||||||
|
.IP CURLOPT_NEW_FILE_PERMS
|
||||||
|
Pass a long as a parameter, containing the value of the permissions that will
|
||||||
|
be assigned to newly created files on the remote server. The default value is
|
||||||
|
\fI0644\fP, but any valid value can be used. The only protocols that can use
|
||||||
|
this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP. (Added in 7.16.4)
|
||||||
|
.IP CURLOPT_NEW_DIRECTORY_PERMS
|
||||||
|
Pass a long as a parameter, containing the value of the permissions that will
|
||||||
|
be assigned to newly created directories on the remote server. The default
|
||||||
|
value is \fI0755\fP, but any valid value can be used. The only protocols that
|
||||||
|
can use this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP.
|
||||||
|
(Added in 7.16.4)
|
||||||
.SH TELNET OPTIONS
|
.SH TELNET OPTIONS
|
||||||
.IP CURLOPT_TELNETOPTIONS
|
.IP CURLOPT_TELNETOPTIONS
|
||||||
Provide a pointer to a curl_slist with variables to pass to the telnet
|
Provide a pointer to a curl_slist with variables to pass to the telnet
|
||||||
|
@@ -25,8 +25,8 @@ queue so calling this function again will not return the same message
|
|||||||
again. It will instead return new messages at each new invoke until the queue
|
again. It will instead return new messages at each new invoke until the queue
|
||||||
is emptied.
|
is emptied.
|
||||||
|
|
||||||
The data the returned pointer points to will not survive calling
|
\fBWARNING:\fP The data the returned pointer points to will not survive
|
||||||
\fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
|
calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
|
||||||
\fIcurl_easy_cleanup(3)\fP.
|
\fIcurl_easy_cleanup(3)\fP.
|
||||||
|
|
||||||
The 'CURLMsg' struct is very simple and only contain very basic information.
|
The 'CURLMsg' struct is very simple and only contain very basic information.
|
||||||
|
@@ -56,6 +56,22 @@ Pass a pointer to whatever you want passed to the
|
|||||||
\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is
|
\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is
|
||||||
not used by libcurl but only passed-thru as-is. Set the callback pointer with
|
not used by libcurl but only passed-thru as-is. Set the callback pointer with
|
||||||
\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0)
|
\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0)
|
||||||
|
.IP CURLMOPT_MAXCONNECTS
|
||||||
|
Pass a long. The set number will be used as the maximum amount of
|
||||||
|
simultaneously open connections that libcurl may cache. Default is 10, and
|
||||||
|
libcurl will enlarge the size for each added easy handle to make it fit 4
|
||||||
|
times the number of added easy handles.
|
||||||
|
|
||||||
|
By setting this option, you can prevent the cache size to grow beyond the
|
||||||
|
limit set by you.
|
||||||
|
|
||||||
|
When the cache is full, curl closes the oldest one in the cache to prevent the
|
||||||
|
number of open connections to increase.
|
||||||
|
|
||||||
|
This option is for the multi handle's use only, when using the easy interface
|
||||||
|
you should instead use the \fICURLOPT_MAXCONNECTS\fP option.
|
||||||
|
|
||||||
|
(Added in 7.16.3)
|
||||||
.SH RETURNS
|
.SH RETURNS
|
||||||
The standard CURLMcode for multi interface error codes. Note that it returns a
|
The standard CURLMcode for multi interface error codes. Note that it returns a
|
||||||
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
|
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
|
||||||
|
@@ -4,29 +4,40 @@
|
|||||||
.SH NAME
|
.SH NAME
|
||||||
curl_multi_socket \- reads/writes available data
|
curl_multi_socket \- reads/writes available data
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
|
||||||
|
curl_socket_t sockfd, int ev_bitmask,
|
||||||
|
int *running_handles);
|
||||||
|
|
||||||
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
|
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
|
||||||
int *running_handles);
|
int *running_handles);
|
||||||
|
|
||||||
CURLMcode curl_multi_socket_all(CURLM *multi_handle,
|
CURLMcode curl_multi_socket_all(CURLM *multi_handle,
|
||||||
int *running_handles);
|
int *running_handles);
|
||||||
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Alternative versions of \fIcurl_multi_perform(3)\fP that allows the
|
Alternative versions of \fIcurl_multi_perform(3)\fP that allows the
|
||||||
application to pass in one of the file descriptors/sockets that have been
|
application to pass in the file descriptor/socket that has been detected to
|
||||||
detected to have \&"action" on them and let libcurl perform. This allows
|
have \&"action" on it and let libcurl perform. This allows libcurl to not have
|
||||||
libcurl to not have to scan through all possible file descriptors to check for
|
to scan through all possible file descriptors to check for action. When the
|
||||||
action. When the application has detected action on a socket handled by
|
application has detected action on a socket handled by libcurl, it should call
|
||||||
libcurl, it should call \fIcurl_multi_socket(3)\fP with the \fBsockfd\fP
|
\fIcurl_multi_socket_action(3)\fP with the \fBsockfd\fP argument set to the
|
||||||
argument set to the socket with the action.
|
socket with the action. When the events on a socket are known, they can be
|
||||||
|
passed as an events bitmask \fBev_bitmask\fP by first setting \fBev_bitmask\fP
|
||||||
|
to 0, and then adding using bitwise OR (|) any combination of events to be
|
||||||
|
choosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the
|
||||||
|
events on a socket are unknown, pass 0 instead, and libcurl will test the
|
||||||
|
descriptor internally.
|
||||||
|
|
||||||
At return, the int \fBrunning_handles\fP points to will contain the number of
|
At return, the int \fBrunning_handles\fP points to will contain the number of
|
||||||
still running easy handles within the multi handle. When this number reaches
|
still running easy handles within the multi handle. When this number reaches
|
||||||
zero, all transfers are complete/done. Note that when you call
|
zero, all transfers are complete/done. Note that when you call
|
||||||
\fIcurl_multi_socket(3)\fP on a specific socket and the counter decreases by
|
\fIcurl_multi_socket_action(3)\fP on a specific socket and the counter
|
||||||
one, it DOES NOT necessarily mean that this exact socket/transfer is the one
|
decreases by one, it DOES NOT necessarily mean that this exact socket/transfer
|
||||||
that completed. Use \fIcurl_multi_info_read(3)\fP to figure out which easy
|
is the one that completed. Use \fIcurl_multi_info_read(3)\fP to figure out
|
||||||
handle that completed.
|
which easy handle that completed.
|
||||||
|
|
||||||
The curl_multi_socket functions inform the application about updates in the
|
The curl_multi_socket functions inform the application about updates in the
|
||||||
socket (file descriptor) status by doing none, one or multiple calls to the
|
socket (file descriptor) status by doing none, one or multiple calls to the
|
||||||
@@ -44,6 +55,10 @@ wait for socket actions \- at most \- before doing the timeout action: call
|
|||||||
the \fBcurl_multi_socket(3)\fP function with the \fBsockfd\fP argument set to
|
the \fBcurl_multi_socket(3)\fP function with the \fBsockfd\fP argument set to
|
||||||
CURL_SOCKET_TIMEOUT.
|
CURL_SOCKET_TIMEOUT.
|
||||||
|
|
||||||
|
Usage of \fIcurl_multi_socket(3)\fP is depricated, whereas the function is
|
||||||
|
equivalent to \fIcurl_multi_socket_action(3)\fP, when \fBev_bitmask\fP is set
|
||||||
|
to 0.
|
||||||
|
|
||||||
.SH "CALLBACK DETAILS"
|
.SH "CALLBACK DETAILS"
|
||||||
|
|
||||||
The socket \fBcallback\fP function uses a prototype like this
|
The socket \fBcallback\fP function uses a prototype like this
|
||||||
@@ -91,7 +106,7 @@ The \fIuserp\fP argument is a private pointer you have previously set with
|
|||||||
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 basically 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 wait for more actions
|
should call \fIcurl_multi_socket(3)\fP again, before you wait for more actions
|
||||||
on libcurl's sockets. You don't have to do it immediately, but the return code
|
on libcurl's sockets. 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
|
means that libcurl may have more data available to return or that there may be
|
||||||
more data to send off before it is "satisfied".
|
more data to send off before it is "satisfied".
|
||||||
@@ -104,23 +119,32 @@ function returns OK.
|
|||||||
|
|
||||||
2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
|
2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
|
||||||
|
|
||||||
3. Add easy handles
|
3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what
|
||||||
|
timeout value to use when waiting for socket activities.
|
||||||
|
|
||||||
4. Call curl_multi_socket_all() first once
|
4. Add easy handles
|
||||||
|
|
||||||
5. Setup a "collection" of sockets to supervise when your socket
|
5. Call curl_multi_socket_all() first once
|
||||||
callback is called.
|
|
||||||
|
|
||||||
6. Use curl_multi_timeout() to figure out how long to wait for action
|
6. Provide some means to manage the sockets libcurl is using, so you can check
|
||||||
|
them for activity. This can be done through your application code, or by way
|
||||||
|
of an external library such as libevent or glib.
|
||||||
|
|
||||||
7. Wait for action on any of libcurl's sockets
|
7. Wait for activity on any of libcurl's sockets, use the timeout value your
|
||||||
|
calback has been told
|
||||||
|
|
||||||
8, When action happens, call curl_multi_socket() for the socket(s) that got
|
8, When activity is detected, call curl_multi_socket_action() for the
|
||||||
action.
|
socket(s) that got action. If no activity is detected and the timeout expires,
|
||||||
|
call \fIcurl_multi_socket(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
|
||||||
|
|
||||||
9. Go back to step 6.
|
9. Go back to step 7.
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
This function was added in libcurl 7.15.4, although not deemed stable yet.
|
This function was added in libcurl 7.15.4, although deemed stable since
|
||||||
|
7.16.0.
|
||||||
|
|
||||||
|
\fIcurl_multi_socket(3)\fP is deprecated, use
|
||||||
|
\fIcurl_multi_socket_action(3)\fP instead!
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
|
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
|
||||||
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3)"
|
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
|
||||||
|
.BR "the hiperfifo.c example"
|
||||||
|
@@ -1,8 +1,27 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\" $Id$
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2007, 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 libcurl-errors 3 "9 Feb 2005" "libcurl 7.13.1" "libcurl errors"
|
.TH libcurl-errors 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl errors"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libcurl-errors \- error codes in libcurl
|
libcurl-errors \- error codes in libcurl
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@@ -29,8 +48,6 @@ Very early initialization code failed. This is likely to be an internal error
|
|||||||
or problem.
|
or problem.
|
||||||
.IP "CURLE_URL_MALFORMAT (3)"
|
.IP "CURLE_URL_MALFORMAT (3)"
|
||||||
The URL was not properly formatted.
|
The URL was not properly formatted.
|
||||||
.IP "CURLE_URL_MALFORMAT_USER (4)"
|
|
||||||
This is never returned by current libcurl.
|
|
||||||
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
|
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
|
||||||
Couldn't resolve proxy. The given proxy host could not be resolved.
|
Couldn't resolve proxy. The given proxy host could not be resolved.
|
||||||
.IP "CURLE_COULDNT_RESOLVE_HOST (6)"
|
.IP "CURLE_COULDNT_RESOLVE_HOST (6)"
|
||||||
@@ -41,17 +58,12 @@ Failed to connect() to host or proxy.
|
|||||||
After connecting to an FTP server, libcurl expects to get a certain reply
|
After connecting to an FTP server, libcurl expects to get a certain reply
|
||||||
back. This error code implies that it got a strange or bad reply. The given
|
back. This error code implies that it got a strange or bad reply. The given
|
||||||
remote server is probably not an OK FTP server.
|
remote server is probably not an OK FTP server.
|
||||||
.IP "CURLE_FTP_ACCESS_DENIED (9)"
|
.IP "CURLE_REMOTE_ACCESS_DENIED (9)"
|
||||||
We were denied access when trying to login to an FTP server or when trying to
|
We were denied access to the resource given in the URL. For FTP, this occurs
|
||||||
change working directory to the one given in the URL.
|
while trying to change to the remote directory.
|
||||||
.IP "CURLE_FTP_USER_PASSWORD_INCORRECT (10)"
|
|
||||||
This is never returned by current libcurl.
|
|
||||||
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
|
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
|
||||||
After having sent the FTP password to the server, libcurl expects a proper
|
After having sent the FTP password to the server, libcurl expects a proper
|
||||||
reply. This error code indicates that an unexpected code was returned.
|
reply. This error code indicates that an unexpected code was returned.
|
||||||
.IP "CURLE_FTP_WEIRD_USER_REPLY (12)"
|
|
||||||
After having sent user name to the FTP server, libcurl expects a proper
|
|
||||||
reply. This error code indicates that an unexpected code was returned.
|
|
||||||
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
|
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
|
||||||
libcurl failed to get a sensible result back from the server as a response to
|
libcurl failed to get a sensible result back from the server as a response to
|
||||||
either a PASV or a EPSV command. The server is flawed.
|
either a PASV or a EPSV command. The server is flawed.
|
||||||
@@ -60,11 +72,8 @@ FTP servers return a 227-line as a response to a PASV command. If libcurl
|
|||||||
fails to parse that line, this return code is passed back.
|
fails to parse that line, this return code is passed back.
|
||||||
.IP "CURLE_FTP_CANT_GET_HOST (15)"
|
.IP "CURLE_FTP_CANT_GET_HOST (15)"
|
||||||
An internal failure to lookup the host used for the new connection.
|
An internal failure to lookup the host used for the new connection.
|
||||||
.IP "CURLE_FTP_CANT_RECONNECT (16)"
|
.IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
|
||||||
A bad return code on either PASV or EPSV was sent by the FTP server,
|
Received an error when trying to set the transfer mode to binary or ascii.
|
||||||
preventing libcurl from being able to continue.
|
|
||||||
.IP "CURLE_FTP_COULDNT_SET_BINARY (17)"
|
|
||||||
Received an error when trying to set the transfer mode to binary.
|
|
||||||
.IP "CURLE_PARTIAL_FILE (18)"
|
.IP "CURLE_PARTIAL_FILE (18)"
|
||||||
A file transfer was shorter or larger than expected. This happens when the
|
A file transfer was shorter or larger than expected. This happens when the
|
||||||
server first reports an expected transfer size, and then delivers data that
|
server first reports an expected transfer size, and then delivers data that
|
||||||
@@ -72,45 +81,38 @@ doesn't match the previously given size.
|
|||||||
.IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
|
.IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
|
||||||
This was either a weird reply to a 'RETR' command or a zero byte transfer
|
This was either a weird reply to a 'RETR' command or a zero byte transfer
|
||||||
complete.
|
complete.
|
||||||
.IP "CURLE_FTP_WRITE_ERROR (20)"
|
.IP "CURLE_QUOTE_ERROR (21)"
|
||||||
After a completed file transfer, the FTP server did not respond a proper
|
|
||||||
\"transfer successful\" code.
|
|
||||||
.IP "CURLE_FTP_QUOTE_ERROR (21)"
|
|
||||||
When sending custom "QUOTE" commands to the remote server, one of the commands
|
When sending custom "QUOTE" commands to the remote server, one of the commands
|
||||||
returned an error code that was 400 or higher.
|
returned an error code that was 400 or higher (for FTP) or otherwise
|
||||||
|
indicated unsuccessful completion of the command.
|
||||||
.IP "CURLE_HTTP_RETURNED_ERROR (22)"
|
.IP "CURLE_HTTP_RETURNED_ERROR (22)"
|
||||||
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
|
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
|
||||||
returns an error code that is >= 400.
|
returns an error code that is >= 400. (This error code was formerly known as
|
||||||
|
CURLE_HTTP_NOT_FOUND.)
|
||||||
.IP "CURLE_WRITE_ERROR (23)"
|
.IP "CURLE_WRITE_ERROR (23)"
|
||||||
An error occurred when writing received data to a local file, or an error was
|
An error occurred when writing received data to a local file, or an error was
|
||||||
returned to libcurl from a write callback.
|
returned to libcurl from a write callback.
|
||||||
.IP "CURLE_MALFORMAT_USER (24)"
|
.IP "CURLE_UPLOAD_FAILED (25)"
|
||||||
This is never returned by current libcurl.
|
Failed starting the upload. For FTP, the server typically denied the STOR
|
||||||
.IP "CURLE_FTP_COULDNT_STOR_FILE (25)"
|
command. The error buffer usually contains the server's explanation to this.
|
||||||
FTP couldn't STOR file. The server denied the STOR operation. The error buffer
|
(This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
|
||||||
usually contains the server's explanation to this.
|
|
||||||
.IP "CURLE_READ_ERROR (26)"
|
.IP "CURLE_READ_ERROR (26)"
|
||||||
There was a problem reading a local file or an error returned by the read
|
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
|
A memory allocation request failed. This is serious badness and
|
||||||
things are severely screwed up if this ever occur.
|
things are severely screwed up if this ever occur.
|
||||||
.IP "CURLE_OPERATION_TIMEOUTED (28)"
|
.IP "CURLE_OPERATION_TIMEDOUT (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.
|
||||||
.IP "CURLE_FTP_COULDNT_SET_ASCII (29)"
|
|
||||||
libcurl failed to set ASCII transfer type (TYPE A).
|
|
||||||
.IP "CURLE_FTP_PORT_FAILED (30)"
|
.IP "CURLE_FTP_PORT_FAILED (30)"
|
||||||
The FTP PORT command returned error. This mostly happen when you haven't
|
The FTP PORT command returned error. This mostly happen when you haven't
|
||||||
specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
|
specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
|
||||||
.IP "CURLE_FTP_COULDNT_USE_REST (31)"
|
.IP "CURLE_FTP_COULDNT_USE_REST (31)"
|
||||||
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_RANGE_ERROR (33)"
|
||||||
The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is
|
The server does not support or accept range requests.
|
||||||
an extension and not all servers support it. This is not a surprising error.
|
|
||||||
.IP "CURLE_HTTP_RANGE_ERROR (33)"
|
|
||||||
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)"
|
||||||
@@ -127,22 +129,17 @@ path doesn't identify an existing file. Did you check file permissions?
|
|||||||
LDAP cannot bind. LDAP bind operation failed.
|
LDAP cannot bind. LDAP bind operation failed.
|
||||||
.IP "CURLE_LDAP_SEARCH_FAILED (39)"
|
.IP "CURLE_LDAP_SEARCH_FAILED (39)"
|
||||||
LDAP search failed.
|
LDAP search failed.
|
||||||
.IP "CURLE_LIBRARY_NOT_FOUND (40)"
|
|
||||||
Library not found. The LDAP library was not found.
|
|
||||||
.IP "CURLE_FUNCTION_NOT_FOUND (41)"
|
.IP "CURLE_FUNCTION_NOT_FOUND (41)"
|
||||||
Function not found. A required LDAP function was not found.
|
Function not found. A required zlib function was not found.
|
||||||
.IP "CURLE_ABORTED_BY_CALLBACK (42)"
|
.IP "CURLE_ABORTED_BY_CALLBACK (42)"
|
||||||
Aborted by callback. A callback returned "abort" to libcurl.
|
Aborted by callback. A callback returned "abort" to libcurl.
|
||||||
.IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
|
.IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
|
||||||
Internal error. A function was called with a bad parameter.
|
Internal error. A function was called with a bad parameter.
|
||||||
.IP "CURLE_BAD_CALLING_ORDER (44)"
|
.IP "CURLE_INTERFACE_FAILED (45)"
|
||||||
This is never returned by current libcurl.
|
|
||||||
.IP "CURLE_HTTP_PORT_FAILED (45)"
|
|
||||||
Interface error. A specified outgoing interface could not be used. Set which
|
Interface error. A specified outgoing interface could not be used. Set which
|
||||||
interface to use for outgoing connections' source IP address with
|
interface to use for outgoing connections' source IP address with
|
||||||
CURLOPT_INTERFACE.
|
CURLOPT_INTERFACE. (This error code was formerly known as
|
||||||
.IP "CURLE_BAD_PASSWORD_ENTERED (46)"
|
CURLE_HTTP_PORT_FAILED.)
|
||||||
This is never returned by current libcurl.
|
|
||||||
.IP "CURLE_TOO_MANY_REDIRECTS (47)"
|
.IP "CURLE_TOO_MANY_REDIRECTS (47)"
|
||||||
Too many redirects. When following redirects, libcurl hit the maximum amount.
|
Too many redirects. When following redirects, libcurl hit the maximum amount.
|
||||||
Set your limit with CURLOPT_MAXREDIRS.
|
Set your limit with CURLOPT_MAXREDIRS.
|
||||||
@@ -151,9 +148,6 @@ An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
|
|||||||
the appropriate documentation.
|
the appropriate documentation.
|
||||||
.IP "CURLE_TELNET_OPTION_SYNTAX (49)"
|
.IP "CURLE_TELNET_OPTION_SYNTAX (49)"
|
||||||
A telnet option string was Illegally formatted.
|
A telnet option string was Illegally formatted.
|
||||||
.IP "CURLE_OBSOLETE (50)"
|
|
||||||
This is not an error. This used to be another error code in an old libcurl
|
|
||||||
version and is currently unused.
|
|
||||||
.IP "CURLE_SSL_PEER_CERTIFICATE (51)"
|
.IP "CURLE_SSL_PEER_CERTIFICATE (51)"
|
||||||
The remote server's SSL certificate was deemed not OK.
|
The remote server's SSL certificate was deemed not OK.
|
||||||
.IP "CURLE_GOT_NOTHING (52)"
|
.IP "CURLE_GOT_NOTHING (52)"
|
||||||
@@ -167,21 +161,19 @@ 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_SHARE_IN_USE (57)"
|
|
||||||
Share is in use
|
|
||||||
.IP "CURLE_SSL_CERTPROBLEM (58)"
|
.IP "CURLE_SSL_CERTPROBLEM (58)"
|
||||||
problem with the local client certificate
|
problem with the local client certificate
|
||||||
.IP "CURLE_SSL_CIPHER (59)"
|
.IP "CURLE_SSL_CIPHER (59)"
|
||||||
couldn't use specified cipher
|
Couldn't use specified cipher
|
||||||
.IP "CURLE_SSL_CACERT (60)"
|
.IP "CURLE_SSL_CACERT (60)"
|
||||||
peer certificate cannot be authenticated with known CA certificates
|
Peer certificate cannot be authenticated with known CA certificates
|
||||||
.IP "CURLE_BAD_CONTENT_ENCODING (61)"
|
.IP "CURLE_BAD_CONTENT_ENCODING (61)"
|
||||||
Unrecognized transfer encoding
|
Unrecognized transfer encoding
|
||||||
.IP "CURLE_LDAP_INVALID_URL (62)"
|
.IP "CURLE_LDAP_INVALID_URL (62)"
|
||||||
Invalid LDAP URL
|
Invalid LDAP URL
|
||||||
.IP "CURLE_FILESIZE_EXCEEDED (63)"
|
.IP "CURLE_FILESIZE_EXCEEDED (63)"
|
||||||
Maximum file size exceeded
|
Maximum file size exceeded
|
||||||
.IP "CURLE_FTP_SSL_FAILED (64)"
|
.IP "CURLE_USE_SSL_FAILED (64)"
|
||||||
Requested FTP SSL level failed
|
Requested FTP SSL level failed
|
||||||
.IP "CURLE_SEND_FAIL_REWIND (65)"
|
.IP "CURLE_SEND_FAIL_REWIND (65)"
|
||||||
When doing a send operation curl had to rewind the data to retransmit, but the
|
When doing a send operation curl had to rewind the data to retransmit, but the
|
||||||
@@ -192,24 +184,33 @@ Initiating the SSL Engine failed
|
|||||||
The remote server denied curl to login (Added in 7.13.1)
|
The remote server denied curl to login (Added in 7.13.1)
|
||||||
.IP "CURLE_TFTP_NOTFOUND (68)"
|
.IP "CURLE_TFTP_NOTFOUND (68)"
|
||||||
File not found on TFTP server
|
File not found on TFTP server
|
||||||
.IP "CURLE_TFTP_PERM (69"
|
.IP "CURLE_TFTP_PERM (69)"
|
||||||
Permission problem on TFTP server
|
Permission problem on TFTP server
|
||||||
.IP "CURLE_TFTP_DISKFULL (70)"
|
.IP "CURLE_REMOTE_DISK_FULL (70)"
|
||||||
Out of disk space on TFTP server
|
Out of disk space on the server
|
||||||
.IP "CURLE_TFTP_ILLEGAL (71)"
|
.IP "CURLE_TFTP_ILLEGAL (71)"
|
||||||
Illegal TFTP operation
|
Illegal TFTP operation
|
||||||
.IP "CURLE_TFTP_UNKNOWNID (72)"
|
.IP "CURLE_TFTP_UNKNOWNID (72)"
|
||||||
Unknown TFTP transfer ID
|
Unknown TFTP transfer ID
|
||||||
.IP "CURLE_TFTP_EXISTS (73)"
|
.IP "CURLE_REMOTE_FILE_EXISTS (73)"
|
||||||
TFTP File already exists
|
File already exists and will not be overwritten
|
||||||
.IP "CURLE_TFTP_NOSUCHUSER (74)"
|
.IP "CURLE_TFTP_NOSUCHUSER (74)"
|
||||||
No such TFTP user
|
This error should never be returned by a properly functioning TFTP server
|
||||||
.IP "CURLE_CONV_FAILED (75)"
|
.IP "CURLE_CONV_FAILED (75)"
|
||||||
Character conversion failed
|
Character conversion failed
|
||||||
.IP "CURLE_CONV_REQD (76)"
|
.IP "CURLE_CONV_REQD (76)"
|
||||||
Caller must register conversion callbacks
|
Caller must register conversion callbacks
|
||||||
.IP "CURLE_SSL_CACERT_BADFILE (77)"
|
.IP "CURLE_SSL_CACERT_BADFILE (77)"
|
||||||
Problem with reading the SSL CA cert (path? access rights?)
|
Problem with reading the SSL CA cert (path? access rights?)
|
||||||
|
.IP "CURLE_REMOTE_FILE_NOT_FOUND (78)"
|
||||||
|
The resource referenced in the URL does not exist
|
||||||
|
.IP "CURLE_SSH (79)"
|
||||||
|
An unspecified error occurred during the SSH session
|
||||||
|
.IP "CURLE_SSL_SHUTDOWN_FAILED (80)"
|
||||||
|
Failed to shut down the SSL connection
|
||||||
|
.IP "CURLE_OBSOLETE*"
|
||||||
|
These error codes will never be returned. They used to be used in an old libcurl
|
||||||
|
version and are currently unused.
|
||||||
.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. Also consider \fIcurl_multi_strerror(3)\fP.
|
interface. Also consider \fIcurl_multi_strerror(3)\fP.
|
||||||
@@ -231,6 +232,9 @@ This can only be returned if libcurl bugs. Please report it to us!
|
|||||||
.IP "CURLM_BAD_SOCKET (5)"
|
.IP "CURLM_BAD_SOCKET (5)"
|
||||||
The passed-in socket is not a valid one that libcurl already knows about.
|
The passed-in socket is not a valid one that libcurl already knows about.
|
||||||
(Added in 7.15.4)
|
(Added in 7.15.4)
|
||||||
|
.IP "CURLM_UNKNOWN_OPTION (6)"
|
||||||
|
curl_multi_setopt() with unsupported option
|
||||||
|
(Added in 7.15.4)
|
||||||
.SH "CURLSHcode"
|
.SH "CURLSHcode"
|
||||||
The "share" interface will return a CURLSHcode to indicate when an error has
|
The "share" interface will return a CURLSHcode to indicate when an error has
|
||||||
occurred. Also consider \fIcurl_share_strerror(3)\fP.
|
occurred. Also consider \fIcurl_share_strerror(3)\fP.
|
||||||
@@ -242,4 +246,6 @@ An invalid option was passed to the function.
|
|||||||
The share object is currently in use.
|
The share object is currently in use.
|
||||||
.IP "CURLSHE_INVALID (3)"
|
.IP "CURLSHE_INVALID (3)"
|
||||||
An invalid share object was passed to the function.
|
An invalid share object was passed to the function.
|
||||||
|
.IP "CURLSHE_NOMEM (4)"
|
||||||
|
Not enough memory was available.
|
||||||
|
(Added in 7.12.0)
|
||||||
|
@@ -104,6 +104,12 @@ get more messages until the message queue is empty. The information you
|
|||||||
receive there includes an easy handle pointer which you may use to identify
|
receive there includes an easy handle pointer which you may use to identify
|
||||||
which easy handle the information regards.
|
which easy handle the information regards.
|
||||||
|
|
||||||
|
When a single transfer is completed, the easy handle is still left added to
|
||||||
|
the multi stack. You need to first remove the easy handle with
|
||||||
|
\fIcurl_multi_remove_handle(3)\fP and then close it with
|
||||||
|
\fIcurl_easy_cleanup(3)\fP, or possibly set new options to it and add it again
|
||||||
|
with \fIcurl_multi_add_handle(3)\fP to start another transfer.
|
||||||
|
|
||||||
When all transfers in the multi stack are done, cleanup the multi handle with
|
When all transfers in the multi stack are done, cleanup the multi handle with
|
||||||
\fIcurl_multi_cleanup(3)\fP. Be careful and please note that you \fBMUST\fP
|
\fIcurl_multi_cleanup(3)\fP. Be careful and please note that you \fBMUST\fP
|
||||||
invoke separate \fIcurl_easy_cleanup(3)\fP calls on every single easy handle
|
invoke separate \fIcurl_easy_cleanup(3)\fP calls on every single easy handle
|
||||||
@@ -125,10 +131,11 @@ A few areas in the code are still using blocking code, even when used from the
|
|||||||
multi interface. While we certainly want and intend for these to get fixed in
|
multi interface. While we certainly want and intend for these to get fixed in
|
||||||
the future, you should be aware of the following current restrictions:
|
the future, you should be aware of the following current restrictions:
|
||||||
|
|
||||||
|
.nf
|
||||||
- Name resolves on non-windows unless c-ares is used
|
- Name resolves on non-windows unless c-ares is used
|
||||||
- GnuTLS SSL connections
|
- GnuTLS SSL connections
|
||||||
- Active FTP connections
|
- Active FTP connections
|
||||||
- HTTP proxy CONNECT operations
|
- HTTP proxy CONNECT operations
|
||||||
- SCP and SFTP connections
|
- TFTP transfers
|
||||||
- SFTP transfers
|
|
||||||
- file:// transfers
|
- file:// transfers
|
||||||
|
.fi
|
||||||
|
@@ -415,7 +415,7 @@ you're using an SSL private key for secure transfers.
|
|||||||
|
|
||||||
To pass the known private key password to libcurl:
|
To pass the known private key password to libcurl:
|
||||||
|
|
||||||
curl_easy_setopt(easyhandle, CURLOPT_SSLKEYPASSWD, "keypassword");
|
curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
|
||||||
|
|
||||||
.SH "HTTP Authentication"
|
.SH "HTTP Authentication"
|
||||||
The previous chapter showed how to set user name and password for getting
|
The previous chapter showed how to set user name and password for getting
|
||||||
@@ -931,7 +931,7 @@ would instead be called CURLOPT_POSTQUOTE and used the exact same way.
|
|||||||
The custom FTP command will be issued to the server in the same order they are
|
The custom FTP command will be issued to the server in the same order they are
|
||||||
added to the list, and if a command gets an error code returned back from the
|
added to the list, and if a command gets an error code returned back from the
|
||||||
server, no more commands will be issued and libcurl will bail out with an
|
server, no more commands will be issued and libcurl will bail out with an
|
||||||
error code (CURLE_FTP_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
|
error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
|
||||||
commands before a transfer, no transfer will actually take place when a quote
|
commands before a transfer, no transfer will actually take place when a quote
|
||||||
command has failed.
|
command has failed.
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user