Compare commits
1190 Commits
curl-7_20_
...
curl-7_21_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8da5da9b65 | ||
![]() |
42c6b7577f | ||
![]() |
e5010ec3ff | ||
![]() |
5c314c6bb4 | ||
![]() |
9016958aa8 | ||
![]() |
1614dc0745 | ||
![]() |
af6dcc92d5 | ||
![]() |
57064e4a0d | ||
![]() |
d9e71809cb | ||
![]() |
a7cc54a5a8 | ||
![]() |
c9a82f39e2 | ||
![]() |
e4bca6a01c | ||
![]() |
56e5302b53 | ||
![]() |
4cbc6fc6ab | ||
![]() |
c9f16e67ef | ||
![]() |
f851f76857 | ||
![]() |
0126b4a959 | ||
![]() |
49a8fe5142 | ||
![]() |
8fc4be9e7b | ||
![]() |
70eee054f2 | ||
![]() |
0aedccc18a | ||
![]() |
85881f9f35 | ||
![]() |
84e13f2e07 | ||
![]() |
832e827518 | ||
![]() |
a6fa7fc38e | ||
![]() |
b122f8be61 | ||
![]() |
950fb3efcc | ||
![]() |
ee015947d4 | ||
![]() |
a2a2863306 | ||
![]() |
b688f2c260 | ||
![]() |
c4dd8df081 | ||
![]() |
0f7bea7c3a | ||
![]() |
d5cc77b744 | ||
![]() |
36a22f9074 | ||
![]() |
6e0dd48f97 | ||
![]() |
cb2f300364 | ||
![]() |
7530a28878 | ||
![]() |
e8d73c9c2d | ||
![]() |
8a3c0fe56c | ||
![]() |
f551aa5c16 | ||
![]() |
377f88364e | ||
![]() |
c0b9dd27b5 | ||
![]() |
6aff805942 | ||
![]() |
b772f3a321 | ||
![]() |
7559b77727 | ||
![]() |
4f170ee8f9 | ||
![]() |
fba00c9f7b | ||
![]() |
10a7d05be3 | ||
![]() |
9776f3445d | ||
![]() |
adeac15d8e | ||
![]() |
5d4e5593d5 | ||
![]() |
c2eb8c932d | ||
![]() |
a6f14e17b7 | ||
![]() |
b3740f0e09 | ||
![]() |
2a31dde76c | ||
![]() |
bf749bb2c5 | ||
![]() |
65a9fa59dc | ||
![]() |
9eea43dce2 | ||
![]() |
910d7953aa | ||
![]() |
970117ef2d | ||
![]() |
aa76dec33a | ||
![]() |
d6bb8dcc23 | ||
![]() |
685359d4c3 | ||
![]() |
a689072f33 | ||
![]() |
3d64ed25df | ||
![]() |
ecfe0b5b18 | ||
![]() |
9460896cbe | ||
![]() |
a87102c792 | ||
![]() |
2e7a2027f1 | ||
![]() |
ae677edf90 | ||
![]() |
f5d78919af | ||
![]() |
f3d77f772d | ||
![]() |
7dd449d843 | ||
![]() |
f461c6e61d | ||
![]() |
3c9ff41a1f | ||
![]() |
c8c8816a97 | ||
![]() |
5d39dea3b3 | ||
![]() |
9f390a356e | ||
![]() |
017ee34bba | ||
![]() |
340228cc81 | ||
![]() |
edf282c096 | ||
![]() |
a947a9ac62 | ||
![]() |
9b5343054a | ||
![]() |
b735717606 | ||
![]() |
ec33742d1b | ||
![]() |
2ea31b0e6f | ||
![]() |
de70ddb749 | ||
![]() |
a41c7f9736 | ||
![]() |
512b2f7740 | ||
![]() |
8bdc48eddb | ||
![]() |
328600e02b | ||
![]() |
e2747ebbc0 | ||
![]() |
41ebda02b2 | ||
![]() |
30c9799f72 | ||
![]() |
bed6b89a2f | ||
![]() |
3e70c28ce5 | ||
![]() |
79cc6c244a | ||
![]() |
d30ddd9977 | ||
![]() |
8b849265d8 | ||
![]() |
fce7276f54 | ||
![]() |
004d84fcc1 | ||
![]() |
02f3ff3b0a | ||
![]() |
3f6ffcd26d | ||
![]() |
3912e7bde3 | ||
![]() |
488521427f | ||
![]() |
e83816bfcf | ||
![]() |
b578534508 | ||
![]() |
5db30a1d8c | ||
![]() |
664ff30650 | ||
![]() |
873d70a6d8 | ||
![]() |
6dfa16c3c4 | ||
![]() |
60f0ebbdc9 | ||
![]() |
b5d170b551 | ||
![]() |
d4e000906a | ||
![]() |
bb7ff942d3 | ||
![]() |
48a40f0402 | ||
![]() |
0c8e6f598a | ||
![]() |
2ef7a28a71 | ||
![]() |
2a02c07a15 | ||
![]() |
212d8c8f65 | ||
![]() |
b996b202c4 | ||
![]() |
32001ac414 | ||
![]() |
9c629e5348 | ||
![]() |
f0612f166a | ||
![]() |
e34131db78 | ||
![]() |
335dfa793c | ||
![]() |
574aecee20 | ||
![]() |
51075a6777 | ||
![]() |
4508ea103f | ||
![]() |
558f997e99 | ||
![]() |
fda0985bfd | ||
![]() |
93ec4555ff | ||
![]() |
61877b569f | ||
![]() |
dc15a88076 | ||
![]() |
adae5926dd | ||
![]() |
ade337d79e | ||
![]() |
365db94e0a | ||
![]() |
d4ebf3c6b0 | ||
![]() |
f78fa6a57d | ||
![]() |
038a631274 | ||
![]() |
7d94af497d | ||
![]() |
a490961b10 | ||
![]() |
821301de15 | ||
![]() |
3440f4d374 | ||
![]() |
f83c36934f | ||
![]() |
c4bc1d473f | ||
![]() |
5b7e1f9efe | ||
![]() |
c33aee1667 | ||
![]() |
3b1b26578f | ||
![]() |
2cbe885c1a | ||
![]() |
4a42e5cdaa | ||
![]() |
53ef3493bf | ||
![]() |
cbd98b2c28 | ||
![]() |
4685db9462 | ||
![]() |
45de057920 | ||
![]() |
aa87f0ab15 | ||
![]() |
6a6981503e | ||
![]() |
889d1e973f | ||
![]() |
1b758b01c1 | ||
![]() |
7ddcc8fea4 | ||
![]() |
068d656c6d | ||
![]() |
92f722017c | ||
![]() |
9869668884 | ||
![]() |
b903186fa0 | ||
![]() |
592eda8e3f | ||
![]() |
6d013b0aab | ||
![]() |
bcc29cda8e | ||
![]() |
4235457129 | ||
![]() |
e9542ccab6 | ||
![]() |
7de2f9271c | ||
![]() |
24d84da073 | ||
![]() |
ca015f1a45 | ||
![]() |
722f286f80 | ||
![]() |
f20b4606de | ||
![]() |
c985a8df51 | ||
![]() |
a0fad3017e | ||
![]() |
2a05025510 | ||
![]() |
d8373cb992 | ||
![]() |
17df5d8caa | ||
![]() |
210278d9a1 | ||
![]() |
5942362847 | ||
![]() |
7d86e467fa | ||
![]() |
7609b32e7c | ||
![]() |
1702a2c08d | ||
![]() |
9230be0797 | ||
![]() |
7872c8d5a2 | ||
![]() |
37b9fe104a | ||
![]() |
3242abd87a | ||
![]() |
1b6df743f6 | ||
![]() |
c2c8948190 | ||
![]() |
c6a0abdd97 | ||
![]() |
9039d19f01 | ||
![]() |
c828646f60 | ||
![]() |
eb65a49bef | ||
![]() |
b2140a09f8 | ||
![]() |
519bec7c91 | ||
![]() |
24e5a40156 | ||
![]() |
2d1b6242f2 | ||
![]() |
a5db4a46ac | ||
![]() |
65aadf2118 | ||
![]() |
24667466f0 | ||
![]() |
5aae3c13e2 | ||
![]() |
8e4fb01e64 | ||
![]() |
ebb37eac8b | ||
![]() |
9d191a6a40 | ||
![]() |
be973b6f91 | ||
![]() |
2db6f7e703 | ||
![]() |
0790b27910 | ||
![]() |
e80b957789 | ||
![]() |
213939c8ba | ||
![]() |
82ecc85d9e | ||
![]() |
84f809e7a8 | ||
![]() |
cae351e9f5 | ||
![]() |
909acfbbba | ||
![]() |
a5ee8d50c3 | ||
![]() |
c91c48723a | ||
![]() |
b40c8f9249 | ||
![]() |
714215f283 | ||
![]() |
6cfbf21acf | ||
![]() |
72da921942 | ||
![]() |
6ff4ebbc80 | ||
![]() |
fa81193bf0 | ||
![]() |
fb80a0a082 | ||
![]() |
e84730948d | ||
![]() |
996630d5ed | ||
![]() |
fde795894f | ||
![]() |
6710970bce | ||
![]() |
f01df19798 | ||
![]() |
b2e06ea166 | ||
![]() |
c66b0b32fb | ||
![]() |
2064ea9612 | ||
![]() |
1a6e7da13d | ||
![]() |
23544f35fd | ||
![]() |
2f6924032a | ||
![]() |
aeb214f3e8 | ||
![]() |
89fa3b3efb | ||
![]() |
e9afbe2a65 | ||
![]() |
c48849ef97 | ||
![]() |
d54668eb00 | ||
![]() |
ee4c1206de | ||
![]() |
c22c258029 | ||
![]() |
6eb484942b | ||
![]() |
5b716b7c91 | ||
![]() |
01f05d0c75 | ||
![]() |
8321a367ee | ||
![]() |
8e9e19b0d5 | ||
![]() |
db59b6202d | ||
![]() |
e7837bfd03 | ||
![]() |
e71642003c | ||
![]() |
02dbfa2192 | ||
![]() |
9d1e914a56 | ||
![]() |
d3408d0593 | ||
![]() |
318c5c802b | ||
![]() |
c2459c4328 | ||
![]() |
c37ad9e909 | ||
![]() |
5eda4bf726 | ||
![]() |
e02c90dc19 | ||
![]() |
f1c6cd42f4 | ||
![]() |
2a0c7ea4cc | ||
![]() |
4913a08cb6 | ||
![]() |
2531cd94a5 | ||
![]() |
40256ec4d3 | ||
![]() |
11c2db2aa2 | ||
![]() |
d02f444759 | ||
![]() |
cc9e4321d3 | ||
![]() |
970587567e | ||
![]() |
3a158f30b5 | ||
![]() |
67eb679264 | ||
![]() |
9680df4807 | ||
![]() |
0addc57188 | ||
![]() |
34ef39015e | ||
![]() |
252d70a1ed | ||
![]() |
a374d8f85d | ||
![]() |
058fb33557 | ||
![]() |
0355e33b5f | ||
![]() |
e765afccb6 | ||
![]() |
8702ebff74 | ||
![]() |
0f07142509 | ||
![]() |
3a87dd8b20 | ||
![]() |
7f57fb359d | ||
![]() |
663a52c2f8 | ||
![]() |
4b51484a68 | ||
![]() |
89d412b5e7 | ||
![]() |
92774ac1f3 | ||
![]() |
0c05ee3a33 | ||
![]() |
ef1c18b952 | ||
![]() |
409867e62b | ||
![]() |
929aeed386 | ||
![]() |
42d95bcc44 | ||
![]() |
93290f69d0 | ||
![]() |
e38a7880e1 | ||
![]() |
e114648991 | ||
![]() |
b8118dd495 | ||
![]() |
025b9368f8 | ||
![]() |
521e88e009 | ||
![]() |
88e825de86 | ||
![]() |
14e8b13a45 | ||
![]() |
36cb24ec19 | ||
![]() |
806dbb022b | ||
![]() |
5a433a033f | ||
![]() |
511f491cf2 | ||
![]() |
cc228ea6f6 | ||
![]() |
211504ba8a | ||
![]() |
2bbaddb05a | ||
![]() |
13b64d7558 | ||
![]() |
8831000bc0 | ||
![]() |
ed8749e308 | ||
![]() |
7711086536 | ||
![]() |
fdaa8da75d | ||
![]() |
c40ae2cbd2 | ||
![]() |
3e00af34c8 | ||
![]() |
3eac14b43c | ||
![]() |
60406ff7f8 | ||
![]() |
6c5448d59f | ||
![]() |
ca37692bf4 | ||
![]() |
176092d760 | ||
![]() |
e649a7baae | ||
![]() |
c8fba59731 | ||
![]() |
4d1d1b8518 | ||
![]() |
05ebc6f0cc | ||
![]() |
6f0ee717c3 | ||
![]() |
0718b7e31e | ||
![]() |
60172a0446 | ||
![]() |
c042340b2a | ||
![]() |
b847818740 | ||
![]() |
bec9692a77 | ||
![]() |
a07a865d5d | ||
![]() |
cccba72920 | ||
![]() |
7612ca2a7e | ||
![]() |
029136da60 | ||
![]() |
1aeb635cdd | ||
![]() |
70cb3f204d | ||
![]() |
9da4698fd2 | ||
![]() |
08221e738d | ||
![]() |
16dcd13a2a | ||
![]() |
8a26a8d833 | ||
![]() |
a9aeedcdbe | ||
![]() |
d6b9f76943 | ||
![]() |
9e60d8fd9e | ||
![]() |
a8f30fa555 | ||
![]() |
0354cd5f77 | ||
![]() |
0d0f8084e3 | ||
![]() |
3d3735d9a1 | ||
![]() |
29f0898525 | ||
![]() |
0e74e1d8d8 | ||
![]() |
3f7b7dea1e | ||
![]() |
c9ee341bfb | ||
![]() |
c60a6153be | ||
![]() |
80225b08cd | ||
![]() |
bfc491a2d2 | ||
![]() |
fb199cd29d | ||
![]() |
a8aab6e7d4 | ||
![]() |
32aedf1d3d | ||
![]() |
8511b6436c | ||
![]() |
17de1cc382 | ||
![]() |
5719e56168 | ||
![]() |
d7846237a4 | ||
![]() |
386afdf607 | ||
![]() |
2345c1dd66 | ||
![]() |
7aa2d10e0d | ||
![]() |
10cea49a46 | ||
![]() |
073ce06379 | ||
![]() |
0b8cdc0635 | ||
![]() |
9f8e960a1a | ||
![]() |
06fc3569d2 | ||
![]() |
dd3760f2eb | ||
![]() |
45ca048f44 | ||
![]() |
c4369f34b9 | ||
![]() |
d85cae9225 | ||
![]() |
05895927f5 | ||
![]() |
d9805c5b2b | ||
![]() |
2f421f9aa1 | ||
![]() |
4c33b0a200 | ||
![]() |
1c3c0162c6 | ||
![]() |
a40f58d2ef | ||
![]() |
66582c04b1 | ||
![]() |
fae0e2f968 | ||
![]() |
a12918bc28 | ||
![]() |
827f0a318c | ||
![]() |
b66eeb8bf8 | ||
![]() |
c3a6116dc9 | ||
![]() |
f19ace8d33 | ||
![]() |
c2dff28c41 | ||
![]() |
e36c039a07 | ||
![]() |
96ea650ec7 | ||
![]() |
3bb1291fbd | ||
![]() |
61fc9044c7 | ||
![]() |
311bd4c7b1 | ||
![]() |
39d0d787d2 | ||
![]() |
3cffcba3d0 | ||
![]() |
ae7fe3b7f4 | ||
![]() |
b370fcd300 | ||
![]() |
5348e8f276 | ||
![]() |
266bcb06d7 | ||
![]() |
fe165c69de | ||
![]() |
4e2ac742c9 | ||
![]() |
0696260122 | ||
![]() |
54d9f060b4 | ||
![]() |
2cacd82661 | ||
![]() |
ec7978c512 | ||
![]() |
0e9626ba39 | ||
![]() |
73eb9965cf | ||
![]() |
08a77025c6 | ||
![]() |
7a4b5079c6 | ||
![]() |
7a53c77cb5 | ||
![]() |
b89122a2bf | ||
![]() |
99dcb11ed8 | ||
![]() |
819dfddc58 | ||
![]() |
32a050ec7e | ||
![]() |
76ac6b94ed | ||
![]() |
28c830efd8 | ||
![]() |
7ba5e88053 | ||
![]() |
ef19e30985 | ||
![]() |
2d356ba168 | ||
![]() |
dc0a7161f8 | ||
![]() |
77cbfe2274 | ||
![]() |
20690e412d | ||
![]() |
dbcaa00657 | ||
![]() |
4b837a7e15 | ||
![]() |
73b518f269 | ||
![]() |
3427bece89 | ||
![]() |
e79c1e39e9 | ||
![]() |
77f0fcae0e | ||
![]() |
03be2c99ba | ||
![]() |
b77a3b9a35 | ||
![]() |
c0a2ee65a4 | ||
![]() |
4ba3d8bd00 | ||
![]() |
511031c8d8 | ||
![]() |
59cf93ccdb | ||
![]() |
4f13340ab8 | ||
![]() |
b0940753c6 | ||
![]() |
b35622f387 | ||
![]() |
ce24fdaa2c | ||
![]() |
02c99899a2 | ||
![]() |
7fcbdd68b9 | ||
![]() |
fc77790bcd | ||
![]() |
ef46fcdd90 | ||
![]() |
0243aa9eb0 | ||
![]() |
8fa7b8cb9b | ||
![]() |
fd6b4b3e9b | ||
![]() |
1da65c3d4d | ||
![]() |
d541085407 | ||
![]() |
c73e5e839d | ||
![]() |
db2e425346 | ||
![]() |
6aa5206042 | ||
![]() |
61623b74e3 | ||
![]() |
5f7d34811a | ||
![]() |
42f5e8a0f1 | ||
![]() |
c5d9cd5c1b | ||
![]() |
b5cc77bd25 | ||
![]() |
3d81320426 | ||
![]() |
308db9d780 | ||
![]() |
03ea06b8e3 | ||
![]() |
08a65b10fb | ||
![]() |
1238edaeaf | ||
![]() |
a9cd4f4ed4 | ||
![]() |
1d28efb9d1 | ||
![]() |
9ba42a023d | ||
![]() |
ebb9c7ae04 | ||
![]() |
53014175e8 | ||
![]() |
651c0bcdf2 | ||
![]() |
d45ed0ecf5 | ||
![]() |
e21b103c3e | ||
![]() |
0029b2f042 | ||
![]() |
7c5d888ea6 | ||
![]() |
adb49ad8bb | ||
![]() |
a2c8966d50 | ||
![]() |
d8f6d1c334 | ||
![]() |
1e52ea92eb | ||
![]() |
28888a0b41 | ||
![]() |
1022e754f4 | ||
![]() |
703573c72b | ||
![]() |
7af54ef9a5 | ||
![]() |
1602ed6ba1 | ||
![]() |
9e46318a03 | ||
![]() |
c0c89cd44e | ||
![]() |
6cf35852ad | ||
![]() |
83e9fb21aa | ||
![]() |
5c42b2ceae | ||
![]() |
82aa386732 | ||
![]() |
c43ad0f972 | ||
![]() |
53640a3ce0 | ||
![]() |
35e1d6538a | ||
![]() |
45cea71968 | ||
![]() |
569202c9a4 | ||
![]() |
2b3fbc8cdb | ||
![]() |
1ad5764feb | ||
![]() |
ae29142198 | ||
![]() |
cd045e24a0 | ||
![]() |
0dc8479b89 | ||
![]() |
420eac5542 | ||
![]() |
15aeb94f3f | ||
![]() |
b6a3e2be8e | ||
![]() |
9f64bbd6d8 | ||
![]() |
879914def3 | ||
![]() |
6076549304 | ||
![]() |
49465fffdb | ||
![]() |
5825aa149d | ||
![]() |
7dc9393d3b | ||
![]() |
2dded8fedb | ||
![]() |
be16b227b7 | ||
![]() |
e6d99f4ba7 | ||
![]() |
16c4314a21 | ||
![]() |
375aa41ba1 | ||
![]() |
5f829456c1 | ||
![]() |
a834e00454 | ||
![]() |
0e944fb24e | ||
![]() |
f37d681166 | ||
![]() |
30bd7427ea | ||
![]() |
71ab0ceaa0 | ||
![]() |
9acac91960 | ||
![]() |
af54fbbcb5 | ||
![]() |
1e739e781e | ||
![]() |
8d569c7bb0 | ||
![]() |
7f3b87d878 | ||
![]() |
6b5dc72575 | ||
![]() |
8ab137b2bc | ||
![]() |
bcfb9ea34c | ||
![]() |
f0aad0089e | ||
![]() |
d2395f962d | ||
![]() |
476b1a079b | ||
![]() |
9583b4af90 | ||
![]() |
8219bc9e19 | ||
![]() |
57523e3578 | ||
![]() |
37a22d4749 | ||
![]() |
1df74d886d | ||
![]() |
76c54bd129 | ||
![]() |
8f50a404f9 | ||
![]() |
f6ebae65d6 | ||
![]() |
a0a70dc21d | ||
![]() |
5e37689a1a | ||
![]() |
c75a9fef59 | ||
![]() |
9035709e25 | ||
![]() |
b88ead62e7 | ||
![]() |
b998b04c02 | ||
![]() |
68b2a9818b | ||
![]() |
a7cf30f808 | ||
![]() |
be312336f6 | ||
![]() |
6761cf49f2 | ||
![]() |
108d7693a4 | ||
![]() |
00a5bd41be | ||
![]() |
6d7d0eba6d | ||
![]() |
a865bd9fba | ||
![]() |
0fd439ebac | ||
![]() |
012f9b7f04 | ||
![]() |
573a2900cd | ||
![]() |
c28443c551 | ||
![]() |
0b5901bec6 | ||
![]() |
5965d4554d | ||
![]() |
34127c7adc | ||
![]() |
315e5277dc | ||
![]() |
5c7c9a768d | ||
![]() |
bf1c102b80 | ||
![]() |
2271b60b71 | ||
![]() |
c2bfe60086 | ||
![]() |
63598059cd | ||
![]() |
c1901f7ed0 | ||
![]() |
9c4ff4874e | ||
![]() |
46a0062dff | ||
![]() |
d97fa56fd4 | ||
![]() |
d534cd0027 | ||
![]() |
afd6e738f7 | ||
![]() |
de670efeab | ||
![]() |
421d918da3 | ||
![]() |
99a07a1fdf | ||
![]() |
81c16c2e30 | ||
![]() |
dd5d3518e4 | ||
![]() |
07f60235b0 | ||
![]() |
5580fb2b9c | ||
![]() |
7e3f0bffe5 | ||
![]() |
5d47bf3776 | ||
![]() |
11cddb68e0 | ||
![]() |
1b2b93e074 | ||
![]() |
c328214a2d | ||
![]() |
f6f5d7874f | ||
![]() |
5db0a412ff | ||
![]() |
cbe67a1b71 | ||
![]() |
23245ca83a | ||
![]() |
3590874999 | ||
![]() |
e39ab6f203 | ||
![]() |
c9081a8280 | ||
![]() |
5088e3709d | ||
![]() |
c2ba8ca81f | ||
![]() |
ef24ecde68 | ||
![]() |
e8bc33d0a3 | ||
![]() |
5087f89ac8 | ||
![]() |
b3d39275f5 | ||
![]() |
1d75d30816 | ||
![]() |
6fe18add71 | ||
![]() |
d212fe43af | ||
![]() |
13d537e404 | ||
![]() |
46041ee918 | ||
![]() |
1bb05ac16f | ||
![]() |
091c52fef7 | ||
![]() |
a83870ef9d | ||
![]() |
a768e39b2d | ||
![]() |
1c4fa240be | ||
![]() |
5046dd02b9 | ||
![]() |
4d6c0bdf74 | ||
![]() |
cbf4961bf3 | ||
![]() |
add5766dd4 | ||
![]() |
8d59d69449 | ||
![]() |
465865c3cb | ||
![]() |
c539b83138 | ||
![]() |
0a2edfc348 | ||
![]() |
64520e43d4 | ||
![]() |
c79f816c32 | ||
![]() |
c8a7df108f | ||
![]() |
8636742256 | ||
![]() |
a1f32ffee5 | ||
![]() |
fec5f03e22 | ||
![]() |
2b2ac9068e | ||
![]() |
890425ecd7 | ||
![]() |
1df1032444 | ||
![]() |
b1e4dce671 | ||
![]() |
0b20de0194 | ||
![]() |
d596a523b9 | ||
![]() |
592df29f9c | ||
![]() |
f1db21218b | ||
![]() |
892cacef43 | ||
![]() |
12b2412c52 | ||
![]() |
7d8343934b | ||
![]() |
7cebf22d57 | ||
![]() |
c6b97a8278 | ||
![]() |
f96a2641fc | ||
![]() |
fc6c4c10f9 | ||
![]() |
152578fb33 | ||
![]() |
0a41318f1d | ||
![]() |
4bde456f73 | ||
![]() |
689ee8345c | ||
![]() |
5d4355f19b | ||
![]() |
710ecb6946 | ||
![]() |
1b24b89cca | ||
![]() |
dc3e7df1c9 | ||
![]() |
1171bc5c8a | ||
![]() |
3adb68c605 | ||
![]() |
34498c13be | ||
![]() |
517d3eb0a4 | ||
![]() |
6a07e704ca | ||
![]() |
95719fbea6 | ||
![]() |
fbf51696ef | ||
![]() |
1786950759 | ||
![]() |
87374a47c9 | ||
![]() |
368f5a8547 | ||
![]() |
68a485b00a | ||
![]() |
7b823badbc | ||
![]() |
b0fd03f5b8 | ||
![]() |
4b2fbe1e97 | ||
![]() |
afecd1aa13 | ||
![]() |
68cde058f6 | ||
![]() |
809a748124 | ||
![]() |
542318b113 | ||
![]() |
909e711e74 | ||
![]() |
d95b67f409 | ||
![]() |
96945c98d5 | ||
![]() |
1db61aca3b | ||
![]() |
bbb6eb3aaa | ||
![]() |
a4765b0551 | ||
![]() |
29de7dd288 | ||
![]() |
52e3c60c86 | ||
![]() |
282b41c69b | ||
![]() |
13e9571dd0 | ||
![]() |
36420330de | ||
![]() |
cc87913294 | ||
![]() |
ca9f9cb875 | ||
![]() |
0c8e5f7e6a | ||
![]() |
59db31902c | ||
![]() |
c36b00a166 | ||
![]() |
59f07ddf28 | ||
![]() |
e214cd4a73 | ||
![]() |
5997f54a71 | ||
![]() |
e8c442952d | ||
![]() |
98d9dc7840 | ||
![]() |
6164d40fce | ||
![]() |
65ca4b547b | ||
![]() |
d09a905751 | ||
![]() |
0152dbbe23 | ||
![]() |
2261ddf9db | ||
![]() |
295496fa34 | ||
![]() |
09a2d93a0f | ||
![]() |
b0ccd24a72 | ||
![]() |
11e131c9f9 | ||
![]() |
4b0c411ce6 | ||
![]() |
0f2e35b305 | ||
![]() |
0cb3d7913c | ||
![]() |
7e46061cac | ||
![]() |
7b79c8bf96 | ||
![]() |
04ae23afff | ||
![]() |
987168d6b9 | ||
![]() |
ea07fde40b | ||
![]() |
e3df610ada | ||
![]() |
72d9c96ad5 | ||
![]() |
d371458348 | ||
![]() |
ecd624b8e7 | ||
![]() |
81f151c912 | ||
![]() |
b804906414 | ||
![]() |
2869b6ea2b | ||
![]() |
2d3c7b7e01 | ||
![]() |
edf9566c3b | ||
![]() |
331531f70e | ||
![]() |
51b8d30dc4 | ||
![]() |
450c994a49 | ||
![]() |
6a43ffa0d5 | ||
![]() |
6a90aa3f3d | ||
![]() |
1998de9993 | ||
![]() |
61f4cdb73a | ||
![]() |
cda02fb78b | ||
![]() |
a5f96b49d1 | ||
![]() |
18e7b52e8e | ||
![]() |
6d272e53a2 | ||
![]() |
9bce615f46 | ||
![]() |
81e107010e | ||
![]() |
70e8814e44 | ||
![]() |
fc137ee272 | ||
![]() |
79cd7ef9ab | ||
![]() |
4b69f641a6 | ||
![]() |
2ae6c47d5d | ||
![]() |
15622e69a9 | ||
![]() |
8500586251 | ||
![]() |
3aef3ed8f6 | ||
![]() |
488f9545a2 | ||
![]() |
588402585b | ||
![]() |
750c9179ca | ||
![]() |
5f0ae7a062 | ||
![]() |
8fa519dce4 | ||
![]() |
5fb4279ec7 | ||
![]() |
67c83eb9eb | ||
![]() |
9e1083488f | ||
![]() |
dfaaa99ded | ||
![]() |
87badbef84 | ||
![]() |
e3811ed7c3 | ||
![]() |
dacc44ddc2 | ||
![]() |
fc9f369829 | ||
![]() |
bfbc4c7e00 | ||
![]() |
05b72a6af2 | ||
![]() |
1e2056fecb | ||
![]() |
5df13c3173 | ||
![]() |
ed4eecc05e | ||
![]() |
7e1a45e224 | ||
![]() |
e329586489 | ||
![]() |
397e61128f | ||
![]() |
578e833d3b | ||
![]() |
4d58f97f60 | ||
![]() |
33c3bb057b | ||
![]() |
6bf2014745 | ||
![]() |
a10f5b34ff | ||
![]() |
b1df37c60e | ||
![]() |
31d59fb2cc | ||
![]() |
562d40e671 | ||
![]() |
612832e4c0 | ||
![]() |
3c69a08e3b | ||
![]() |
5ea9e78bd7 | ||
![]() |
69d7c48072 | ||
![]() |
7d4f8c2809 | ||
![]() |
d23c59ecfc | ||
![]() |
1d95a48fe9 | ||
![]() |
512a82d395 | ||
![]() |
fbb38de415 | ||
![]() |
0006cdddee | ||
![]() |
b684ccd8b1 | ||
![]() |
3f64d05d34 | ||
![]() |
e4128f90ba | ||
![]() |
e991a3536d | ||
![]() |
8665d4e593 | ||
![]() |
0e36bb71f2 | ||
![]() |
19f45eaa79 | ||
![]() |
70a025f3df | ||
![]() |
95e230c591 | ||
![]() |
5fcc4332d6 | ||
![]() |
7d84113e1d | ||
![]() |
f3df524b62 | ||
![]() |
c47148f142 | ||
![]() |
8a00c94b0f | ||
![]() |
9de4b26643 | ||
![]() |
3208757c1a | ||
![]() |
fae19aed8d | ||
![]() |
c59dba338e | ||
![]() |
a76f852ca4 | ||
![]() |
3880dd3741 | ||
![]() |
d8041a7ea5 | ||
![]() |
abde4c9d84 | ||
![]() |
6d88d58dd5 | ||
![]() |
fbefd816e4 | ||
![]() |
296b246b9c | ||
![]() |
5393f08df8 | ||
![]() |
b5da54e6c9 | ||
![]() |
22085f7d6e | ||
![]() |
2c1b4e74e4 | ||
![]() |
aca67e2775 | ||
![]() |
8e2f16e66f | ||
![]() |
a7f6747019 | ||
![]() |
c3c4626fab | ||
![]() |
9808480860 | ||
![]() |
6ce76e6996 | ||
![]() |
64f12a3b9f | ||
![]() |
18a758d907 | ||
![]() |
7aea2d522d | ||
![]() |
f3e3f5f1b2 | ||
![]() |
62ef465262 | ||
![]() |
c6fa1952a1 | ||
![]() |
d47bd396ce | ||
![]() |
6882ae8dee | ||
![]() |
a00297158e | ||
![]() |
413cbdce3c | ||
![]() |
864d5add0d | ||
![]() |
3238ef5b69 | ||
![]() |
ca10e28f06 | ||
![]() |
5e92015711 | ||
![]() |
ce00c2ef5d | ||
![]() |
0db9140747 | ||
![]() |
55c266de6d | ||
![]() |
3af696f7c4 | ||
![]() |
09cee1633b | ||
![]() |
8d121b6f8f | ||
![]() |
892d6930e7 | ||
![]() |
200e9b5dd1 | ||
![]() |
b0873cb657 | ||
![]() |
19d2bf4ee4 | ||
![]() |
ae467115bb | ||
![]() |
f43ecac175 | ||
![]() |
d2a7fd2fe6 | ||
![]() |
29439acfeb | ||
![]() |
a049528e94 | ||
![]() |
2fbbddbe85 | ||
![]() |
ecb3fe63d7 | ||
![]() |
6ed72fd7fa | ||
![]() |
40e1623649 | ||
![]() |
53151db167 | ||
![]() |
cb64c987a0 | ||
![]() |
67d1616018 | ||
![]() |
65629f2915 | ||
![]() |
795107453d | ||
![]() |
201637d468 | ||
![]() |
6b6a3bcb61 | ||
![]() |
0cbdcd07a8 | ||
![]() |
d106189a47 | ||
![]() |
ddb810ab70 | ||
![]() |
77ba147e76 | ||
![]() |
bed311eda2 | ||
![]() |
9a0b6e42af | ||
![]() |
cfdc4aca45 | ||
![]() |
ab6681c2c8 | ||
![]() |
eeb2cb05a1 | ||
![]() |
daa96f9928 | ||
![]() |
f37affab8c | ||
![]() |
dc4adc484f | ||
![]() |
d0dea8f869 | ||
![]() |
ab81f6c7c4 | ||
![]() |
ebbe694e78 | ||
![]() |
70baf46d8d | ||
![]() |
280d2cff2e | ||
![]() |
ac20f52ed3 | ||
![]() |
59842d4d5f | ||
![]() |
2b6208a6de | ||
![]() |
2f0532a072 | ||
![]() |
6b490ed33c | ||
![]() |
4d703ee100 | ||
![]() |
13b8fc46a3 | ||
![]() |
9f4a174698 | ||
![]() |
8f6189600f | ||
![]() |
41572648db | ||
![]() |
b980c9a027 | ||
![]() |
9124bfba45 | ||
![]() |
232ad6549a | ||
![]() |
03da3ba1c0 | ||
![]() |
4d53dc5d80 | ||
![]() |
5907777153 | ||
![]() |
72da720b4a | ||
![]() |
a6e088e855 | ||
![]() |
4342a2087a | ||
![]() |
8249b0522d | ||
![]() |
a43201e578 | ||
![]() |
3c2ee9c341 | ||
![]() |
8d31d70114 | ||
![]() |
9754b20adb | ||
![]() |
17c1e3bcba | ||
![]() |
6cf90c6a7b | ||
![]() |
67d76dd520 | ||
![]() |
8348dd96dd | ||
![]() |
2596eb6d19 | ||
![]() |
625932d398 | ||
![]() |
37201e3c36 | ||
![]() |
06869597c3 | ||
![]() |
517f3a1b8f | ||
![]() |
495d3e07d4 | ||
![]() |
44e5e37f38 | ||
![]() |
1d594772fd | ||
![]() |
ff26895b5c | ||
![]() |
d7134036b2 | ||
![]() |
7115245f88 | ||
![]() |
dc2157a087 | ||
![]() |
5d5dd08e77 | ||
![]() |
cfbdbf9783 | ||
![]() |
b24e872502 | ||
![]() |
50a1d5ee1c | ||
![]() |
6ccbd1bee4 | ||
![]() |
1267719735 | ||
![]() |
c49e9683b8 | ||
![]() |
6ea043a504 | ||
![]() |
af4eae77ac | ||
![]() |
7d342c723c | ||
![]() |
5c2b6b2d3e | ||
![]() |
11958ed331 | ||
![]() |
15201da4ca | ||
![]() |
59bad26bb2 | ||
![]() |
f91d578674 | ||
![]() |
9df8257301 | ||
![]() |
992ceae386 | ||
![]() |
364fd2f1ad | ||
![]() |
1cbe66fbc8 | ||
![]() |
f8cf037ecf | ||
![]() |
6028fdb305 | ||
![]() |
45456135d5 | ||
![]() |
52beeb2c9f | ||
![]() |
544f15af98 | ||
![]() |
000ac0c975 | ||
![]() |
fc308282ac | ||
![]() |
e9f3513264 | ||
![]() |
a1a5ba3d0a | ||
![]() |
687df5c8c3 | ||
![]() |
40253e32fe | ||
![]() |
f97a7eb400 | ||
![]() |
3cf658fc24 | ||
![]() |
5247266df6 | ||
![]() |
dfa6ee890d | ||
![]() |
bd5df39a29 | ||
![]() |
6f3dc2a726 | ||
![]() |
b01fb30f9c | ||
![]() |
f38e52071e | ||
![]() |
811fcccfc9 | ||
![]() |
b552ca223e | ||
![]() |
a93522f68d | ||
![]() |
425060fed1 | ||
![]() |
fbee86a9e2 | ||
![]() |
2f0c118577 | ||
![]() |
53e47ca947 | ||
![]() |
314117cbf1 | ||
![]() |
d296dd4ee8 | ||
![]() |
04eff9beb9 | ||
![]() |
b5c3feda17 | ||
![]() |
01c309e186 | ||
![]() |
d873c820bd | ||
![]() |
41cf1f4090 | ||
![]() |
6ad0acb608 | ||
![]() |
cfbb351e22 | ||
![]() |
11f53b9a18 | ||
![]() |
eb33f5d1f8 | ||
![]() |
cef30e0924 | ||
![]() |
a13128596c | ||
![]() |
6d2ccfed48 | ||
![]() |
7738b15977 | ||
![]() |
0fa4b41c2b | ||
![]() |
7d166b0ef6 | ||
![]() |
affff47b3d | ||
![]() |
d6981cb508 | ||
![]() |
40ecd6c9b8 | ||
![]() |
181b08babb | ||
![]() |
7abf3b97fe | ||
![]() |
4a1384a8b4 | ||
![]() |
d76874a665 | ||
![]() |
c8d42b2f1c | ||
![]() |
84332b60b9 | ||
![]() |
bc0699f226 | ||
![]() |
157e6d4e7e | ||
![]() |
d4e6404135 | ||
![]() |
3992309285 | ||
![]() |
241b704e1f | ||
![]() |
1dbb9a0ba4 | ||
![]() |
e7743aa7b4 | ||
![]() |
915032ea02 | ||
![]() |
e01cc7737c | ||
![]() |
bd36927f18 | ||
![]() |
0417d34533 | ||
![]() |
a57611e308 | ||
![]() |
12533bb184 | ||
![]() |
9be951a415 | ||
![]() |
7239538d9a | ||
![]() |
18a9ee6bdf | ||
![]() |
f3b77e5611 | ||
![]() |
89924a897d | ||
![]() |
bcefe839c7 | ||
![]() |
458dd4550b | ||
![]() |
f7ae7b3623 | ||
![]() |
31dd8ab1d6 | ||
![]() |
8da56e12c6 | ||
![]() |
0a04078916 | ||
![]() |
1182c8bdcd | ||
![]() |
55d2460fc3 | ||
![]() |
a89d7997b7 | ||
![]() |
d8383220ec | ||
![]() |
8e7ec794f5 | ||
![]() |
bd5d478dd4 | ||
![]() |
1b15b31c86 | ||
![]() |
e6d85923c1 | ||
![]() |
614bae813e | ||
![]() |
bd6a695545 | ||
![]() |
d63bdba097 | ||
![]() |
43edcc4a2e | ||
![]() |
01c2b397aa | ||
![]() |
51a757c11b | ||
![]() |
7a99672042 | ||
![]() |
7eecfb536a | ||
![]() |
a09814138a | ||
![]() |
42432d67cc | ||
![]() |
e91d167ff8 | ||
![]() |
88af6fbf98 | ||
![]() |
6b6fe2a4d5 | ||
![]() |
54aca3c5ec | ||
![]() |
0a9cf4365a | ||
![]() |
343c4c7072 | ||
![]() |
6a0d3233ff | ||
![]() |
d3714b016d | ||
![]() |
da6e992e1d | ||
![]() |
bb60fe0c1a | ||
![]() |
feecf63a96 | ||
![]() |
cbdd1cbcde | ||
![]() |
b3d7161642 | ||
![]() |
3b47d231ac | ||
![]() |
7977bc3dfa | ||
![]() |
00fdafb0a1 | ||
![]() |
f737e94164 | ||
![]() |
a0dd9df9ab | ||
![]() |
4724b9d966 | ||
![]() |
8098d9417c | ||
![]() |
605207a3a6 | ||
![]() |
43d20d81a5 | ||
![]() |
bc0f3dd15e | ||
![]() |
475c19c42b | ||
![]() |
c072bd4609 | ||
![]() |
684830cb2a | ||
![]() |
51248a9bdd | ||
![]() |
3b24076c3b | ||
![]() |
077125e4a2 | ||
![]() |
df06182d86 | ||
![]() |
d939e0f410 | ||
![]() |
69d07feb14 | ||
![]() |
1c4538610b | ||
![]() |
2c72732ebf | ||
![]() |
e1c2c9be1a | ||
![]() |
89da532445 | ||
![]() |
b38189c7b4 | ||
![]() |
1bb04927f3 | ||
![]() |
3fd01be648 | ||
![]() |
5ae6db321f | ||
![]() |
0546d448ce | ||
![]() |
b4fa27ae4b | ||
![]() |
12043e3c9c | ||
![]() |
a324fa7b97 | ||
![]() |
a9483b1f4a | ||
![]() |
40f8aaedb7 | ||
![]() |
374f48675b | ||
![]() |
20ae9d4f71 | ||
![]() |
35955179c6 | ||
![]() |
b1c1b9bb76 | ||
![]() |
123f80ae54 | ||
![]() |
c54ab4dca7 | ||
![]() |
233ec511db | ||
![]() |
4b96e5c70f | ||
![]() |
75743b009b | ||
![]() |
01459828ef | ||
![]() |
99179da4cc | ||
![]() |
645bdd837a | ||
![]() |
c03cbb38ad | ||
![]() |
63661d8e83 | ||
![]() |
4a0493f789 | ||
![]() |
eadeb5bd9a | ||
![]() |
9190e2876e | ||
![]() |
b4f0e1291f | ||
![]() |
dd8568739c | ||
![]() |
97b497a75f | ||
![]() |
d3c813e726 | ||
![]() |
9e480973eb | ||
![]() |
2e056353b0 | ||
![]() |
606b933a4f | ||
![]() |
d17709da31 | ||
![]() |
0bb6deda72 | ||
![]() |
0a29e2445c | ||
![]() |
700335103e | ||
![]() |
368fd5d27b | ||
![]() |
81239edb89 | ||
![]() |
22f3b01478 | ||
![]() |
5f53c9d94a | ||
![]() |
04cfef24a1 | ||
![]() |
1d26151d5f | ||
![]() |
aabd27d9aa | ||
![]() |
dcc061543a | ||
![]() |
2ffe834bff | ||
![]() |
027ceb37a1 | ||
![]() |
510836f80b | ||
![]() |
e4af5d6efc | ||
![]() |
43b816538f | ||
![]() |
77cfeadfa6 | ||
![]() |
ea521cf617 | ||
![]() |
a82c5a39c4 | ||
![]() |
7764795c06 | ||
![]() |
d6706294e0 | ||
![]() |
83305cbf9f | ||
![]() |
76255cfdc9 | ||
![]() |
ad6bc4d82e | ||
![]() |
147609ca6e | ||
![]() |
7871fbad4d | ||
![]() |
46b9719bbb | ||
![]() |
a1a98d5908 | ||
![]() |
a799162bc7 | ||
![]() |
d62ce21249 | ||
![]() |
0825cd80a6 | ||
![]() |
04cb15ae9d | ||
![]() |
bc8fc9803f | ||
![]() |
016ce4b1da | ||
![]() |
3e759f4fb6 | ||
![]() |
2e8b21833a | ||
![]() |
54b0e87796 | ||
![]() |
a784ed6065 | ||
![]() |
d2621445f1 | ||
![]() |
adaf87530d | ||
![]() |
8914857092 | ||
![]() |
aca0fff4e1 | ||
![]() |
d64bd82bdc | ||
![]() |
cb6647ce1c | ||
![]() |
51427e1947 | ||
![]() |
1de6b97a76 | ||
![]() |
f09340de8b | ||
![]() |
82b55efdba | ||
![]() |
16f575ee6c | ||
![]() |
38d2afcefb | ||
![]() |
7f616eb513 | ||
![]() |
fe818c8076 | ||
![]() |
a7b9452a6b | ||
![]() |
2c1b0624ac | ||
![]() |
107146676e | ||
![]() |
79dc74e84d | ||
![]() |
6be508dcc2 | ||
![]() |
82e9b78a38 | ||
![]() |
07f45946b5 | ||
![]() |
7fb7f24131 | ||
![]() |
5b40c11c2f | ||
![]() |
9d6a394c44 | ||
![]() |
d7b82baf97 | ||
![]() |
36e245658b | ||
![]() |
d487ade72c | ||
![]() |
71be565cf4 | ||
![]() |
81512cc02b | ||
![]() |
32236dad5e | ||
![]() |
b30ce34d84 | ||
![]() |
2164b6b463 | ||
![]() |
7af5e3c39e | ||
![]() |
42930155ab | ||
![]() |
e5b3246d0a | ||
![]() |
47dda4a1d4 | ||
![]() |
a5b7e3205d | ||
![]() |
dfce37da23 | ||
![]() |
14bfcb96f5 | ||
![]() |
87fbcb4494 | ||
![]() |
4bfe07640c | ||
![]() |
5d93525f30 | ||
![]() |
b7848e4a72 | ||
![]() |
99ec359b4d | ||
![]() |
dfad8a6dad | ||
![]() |
d841ab82b8 | ||
![]() |
d6be52d80e | ||
![]() |
c0111460b0 | ||
![]() |
93981bb9b5 | ||
![]() |
8f136288c5 | ||
![]() |
9799dbebd6 | ||
![]() |
b025ac16a6 | ||
![]() |
5d43c75c66 | ||
![]() |
15fa5dcfe6 | ||
![]() |
516dfd1705 | ||
![]() |
743bd81e64 | ||
![]() |
520cee3fb7 | ||
![]() |
fa7341143a | ||
![]() |
313a5b05c2 | ||
![]() |
01fc53e027 | ||
![]() |
0a4ccce054 | ||
![]() |
c2888604d7 | ||
![]() |
6632d957e7 | ||
![]() |
c5e539c312 | ||
![]() |
0338994c6a | ||
![]() |
2056ca9fea | ||
![]() |
cca192e58f | ||
![]() |
f3d4b17a9c | ||
![]() |
5bd38b70dd | ||
![]() |
44f1bef668 | ||
![]() |
f38510f4b5 | ||
![]() |
689b6929c3 | ||
![]() |
68aae7f579 | ||
![]() |
a76fa17681 | ||
![]() |
72411118ec | ||
![]() |
5a16df5e04 | ||
![]() |
5a814f6f2c |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -5,6 +5,7 @@
|
|||||||
*.dll
|
*.dll
|
||||||
*.exe
|
*.exe
|
||||||
*.obj
|
*.obj
|
||||||
|
*.asc
|
||||||
.*.swp
|
.*.swp
|
||||||
Debug
|
Debug
|
||||||
Release
|
Release
|
||||||
@@ -26,6 +27,9 @@ curl-config
|
|||||||
libcurl.pc
|
libcurl.pc
|
||||||
missing
|
missing
|
||||||
curl-*.tar.gz
|
curl-*.tar.gz
|
||||||
|
curl-*.tar.bz2
|
||||||
|
curl-*.tar.lzma
|
||||||
|
curl-*.zip
|
||||||
INSTALL
|
INSTALL
|
||||||
install-sh
|
install-sh
|
||||||
*.o
|
*.o
|
||||||
@@ -36,3 +40,4 @@ tags
|
|||||||
TAGS
|
TAGS
|
||||||
*~
|
*~
|
||||||
aclocal.m4.bak
|
aclocal.m4.bak
|
||||||
|
CHANGES.dist
|
||||||
|
54
Android.mk
54
Android.mk
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Place the curl source (including this makefile) into external/curl/ in the
|
# Place the curl source (including this makefile) into external/curl/ in the
|
||||||
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
|
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
|
||||||
# from the Android root. Tested with Android 1.5
|
# from the Android root. Tested with Android 1.5 and 2.1
|
||||||
#
|
#
|
||||||
# Note: you must first create a curl_config.h file by running configure in the
|
# Note: you must first create a curl_config.h file by running configure in the
|
||||||
# Android environment. The only way I've found to do this is tricky. Perform a
|
# Android environment. The only way I've found to do this is tricky. Perform a
|
||||||
@@ -12,26 +12,37 @@
|
|||||||
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
||||||
# command with flags that match what Android itself uses. This will mean
|
# command with flags that match what Android itself uses. This will mean
|
||||||
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
||||||
# -D options into CPPFLAGS, putting the -m, -f, -O and -nostdlib options into
|
# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
|
||||||
# CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the path
|
# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
|
||||||
# to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o. Remember
|
# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
|
||||||
# that the paths must be absolute since you will not be running configure from
|
# Remember that the paths must be absolute since you will not be running
|
||||||
# the same directory as the Android make. The normal cross-compiler options
|
# configure from the same directory as the Android make. The normal
|
||||||
# must also be set.
|
# cross-compiler options must also be set. Note that the -c, -o, -MD and
|
||||||
|
# similar flags must not be set.
|
||||||
|
#
|
||||||
|
# To see all the LIBS options, you'll need to do the "showcommands" trick on an
|
||||||
|
# executable that's already buildable and watch what flags Android uses to link
|
||||||
|
# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
|
||||||
|
# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
|
||||||
|
# directories so that additional libraries can be found and used by curl.
|
||||||
#
|
#
|
||||||
# The end result will be a configure command that looks something like this
|
# The end result will be a configure command that looks something like this
|
||||||
# (the environment variable A is set to the Android root path):
|
# (the environment variable A is set to the Android root path which makes the
|
||||||
|
# command shorter):
|
||||||
#
|
#
|
||||||
# A=`realpath ../..` && \
|
# A=`realpath ../..` && \
|
||||||
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
||||||
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
||||||
# CPPFLAGS="-I $A/system/core/include ..." \
|
# CPPFLAGS="-I $A/system/core/include ..." \
|
||||||
# CFLAGS="-fno-exceptions -Wno-multichar ..." \
|
# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
|
||||||
# LIB="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
# LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
||||||
# /interwork/libgcc.a ..." \
|
# /interwork/libgcc.a ..."
|
||||||
|
#
|
||||||
|
# Finally, copy the file COPYING to NOTICE so that the curl license gets put
|
||||||
|
# into the right place (but see the note about this below).
|
||||||
#
|
#
|
||||||
# Dan Fandrich
|
# Dan Fandrich
|
||||||
# September 2009
|
# August 2010
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
@@ -51,8 +62,7 @@ CURL_HEADERS := \
|
|||||||
mprintf.h \
|
mprintf.h \
|
||||||
multi.h \
|
multi.h \
|
||||||
stdcheaders.h \
|
stdcheaders.h \
|
||||||
typecheck-gcc.h \
|
typecheck-gcc.h
|
||||||
types.h
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
|
LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
|
||||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
|
||||||
@@ -62,6 +72,15 @@ LOCAL_COPY_HEADERS_TO := libcurl/curl
|
|||||||
LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
|
LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
|
||||||
|
|
||||||
LOCAL_MODULE:= libcurl
|
LOCAL_MODULE:= libcurl
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
|
||||||
|
# Copy the licence to a place where Android will find it.
|
||||||
|
# Actually, this doesn't quite work because the build system searches
|
||||||
|
# for NOTICE files before it gets to this point, so it will only be seen
|
||||||
|
# on subsequent builds.
|
||||||
|
ALL_PREBUILT += $(LOCAL_PATH)/NOTICE
|
||||||
|
$(LOCAL_PATH)/NOTICE: $(LOCAL_PATH)/COPYING | $(ACP)
|
||||||
|
$(copy-file-to-target)
|
||||||
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
@@ -71,16 +90,17 @@ include $(BUILD_STATIC_LIBRARY)
|
|||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
include $(LOCAL_PATH)/src/Makefile.inc
|
include $(LOCAL_PATH)/src/Makefile.inc
|
||||||
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
|
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
|
||||||
|
|
||||||
LOCAL_MODULE := curl
|
LOCAL_MODULE := curl
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
LOCAL_STATIC_LIBRARIES := libcurl
|
LOCAL_STATIC_LIBRARIES := libcurl
|
||||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
||||||
|
|
||||||
# This will also need to include $(CURLX_ONES) in order to correctly build
|
# This may also need to include $(CURLX_ONES) in order to correctly link
|
||||||
# a dynamic library
|
# if libcurl is changed to be built as a dynamic library
|
||||||
LOCAL_CFLAGS += $(common_CFLAGS)
|
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
@@ -1,44 +0,0 @@
|
|||||||
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
|
|
||||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
|
||||||
|
|
||||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif /* HAVE_SYS_TYPES_H */
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
|
||||||
# include <sys/socket.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <winsock2.h>
|
|
||||||
# include <ws2tcpip.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
|
||||||
# include <stdint.h>
|
|
||||||
#endif /* HAVE_STDINT_H */
|
|
||||||
|
|
||||||
#ifdef HAVE_STDDEF_H
|
|
||||||
# include <stddef.h>
|
|
||||||
#endif /* HAVE_STDDEF_H */
|
|
||||||
|
|
||||||
@CHECK_TYPE_SIZE_PREMAIN@
|
|
||||||
|
|
||||||
#ifdef __CLASSIC_C__
|
|
||||||
int main(){
|
|
||||||
int ac;
|
|
||||||
char*av[];
|
|
||||||
#else
|
|
||||||
int main(int ac, char*av[]){
|
|
||||||
#endif
|
|
||||||
if(ac > 1000){return *av[0];}
|
|
||||||
return sizeof(CHECK_TYPE_SIZE_TYPE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* CHECK_TYPE_SIZE_TYPE */
|
|
||||||
|
|
||||||
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
|
|
||||||
|
|
||||||
#endif /* CHECK_TYPE_SIZE_TYPE */
|
|
@@ -1,57 +0,0 @@
|
|||||||
# - Check sizeof a type
|
|
||||||
# CHECK_TYPE_SIZE(TYPE VARIABLE)
|
|
||||||
# Check if the type exists and determine size of type. if the type
|
|
||||||
# exists, the size will be stored to the variable.
|
|
||||||
#
|
|
||||||
# VARIABLE - variable to store size if the type exists.
|
|
||||||
# HAVE_${VARIABLE} - does the variable exists or not
|
|
||||||
|
|
||||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
|
||||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
|
||||||
if(NOT DEFINED ${VARIABLE})
|
|
||||||
if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
|
||||||
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
|
||||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
|
||||||
"${CMAKE_REQUIRED_FLAGS}")
|
|
||||||
foreach(def HAVE_SYS_TYPES_H
|
|
||||||
HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
|
|
||||||
if("${def}")
|
|
||||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
|
||||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
|
||||||
endif("${def}")
|
|
||||||
endforeach(def)
|
|
||||||
set(CHECK_TYPE_SIZE_PREMAIN)
|
|
||||||
foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
|
||||||
set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
|
||||||
endforeach(def)
|
|
||||||
configure_file(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
IMMEDIATE @ONLY)
|
|
||||||
file(READ
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
|
||||||
message(STATUS "Check size of ${TYPE}")
|
|
||||||
if(CMAKE_REQUIRED_LIBRARIES)
|
|
||||||
set(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
|
||||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
|
||||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
|
||||||
try_run(${VARIABLE} HAVE_${VARIABLE}
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
|
||||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
if(HAVE_${VARIABLE})
|
|
||||||
message(STATUS "Check size of ${TYPE} - done")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
||||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
|
||||||
else(HAVE_${VARIABLE})
|
|
||||||
message(STATUS "Check size of ${TYPE} - failed")
|
|
||||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
||||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
|
||||||
endif(HAVE_${VARIABLE})
|
|
||||||
endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
|
||||||
endif(NOT DEFINED ${VARIABLE})
|
|
||||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
|
||||||
endmacro(CHECK_TYPE_SIZE)
|
|
@@ -1,3 +1,24 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
/* Time with sys/time test */
|
/* Time with sys/time test */
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ include(Utilities)
|
|||||||
|
|
||||||
project( CURL C )
|
project( CURL C )
|
||||||
|
|
||||||
|
|
||||||
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
|
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
|
||||||
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
|
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
|
||||||
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
|
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
|
||||||
@@ -120,16 +119,11 @@ if(WIN32)
|
|||||||
if( NOT HAVE_WLDAP32)
|
if( NOT HAVE_WLDAP32)
|
||||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||||
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
||||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" OFF)
|
option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
|
||||||
else()
|
else()
|
||||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
|
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
|
||||||
endif()
|
endif()
|
||||||
mark_as_advanced(CURL_LDAP_WIN)
|
mark_as_advanced(CURL_LDAP_WIN)
|
||||||
set(CURL_LDAP_HYBRID OFF)
|
|
||||||
else()
|
|
||||||
option(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
|
|
||||||
mark_as_advanced(CURL_LDAP_HYBRID)
|
|
||||||
set(CURL_LDAP_WIN OFF)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HTTP_ONLY)
|
if(HTTP_ONLY)
|
||||||
@@ -188,13 +182,7 @@ include (CheckIncludeFile)
|
|||||||
include (CheckIncludeFiles)
|
include (CheckIncludeFiles)
|
||||||
include (CheckLibraryExists)
|
include (CheckLibraryExists)
|
||||||
include (CheckSymbolExists)
|
include (CheckSymbolExists)
|
||||||
# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
|
include (CheckTypeSize)
|
||||||
# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
|
|
||||||
if(CMAKE_CROSSCOMPILING)
|
|
||||||
include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
|
|
||||||
else(CMAKE_CROSSCOMPILING)
|
|
||||||
include (CheckTypeSize)
|
|
||||||
endif(CMAKE_CROSSCOMPILING)
|
|
||||||
|
|
||||||
# On windows preload settings
|
# On windows preload settings
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -202,12 +190,12 @@ if(WIN32)
|
|||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
# This macro checks if the symbol exists in the library and if it
|
# This macro checks if the symbol exists in the library and if it
|
||||||
# does, it appends library to the list.
|
# does, it prepends library to the list.
|
||||||
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||||
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
|
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||||
${VARIABLE})
|
${VARIABLE})
|
||||||
if(${VARIABLE})
|
if(${VARIABLE})
|
||||||
set(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
|
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||||
endif(${VARIABLE})
|
endif(${VARIABLE})
|
||||||
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||||
|
|
||||||
@@ -235,25 +223,6 @@ check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
|||||||
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||||
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
|
||||||
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
|
||||||
mark_as_advanced(CMAKE_USE_OPENSSL)
|
|
||||||
if(CMAKE_USE_OPENSSL)
|
|
||||||
if(WIN32)
|
|
||||||
find_package(OpenSSL)
|
|
||||||
if(OPENSSL_FOUND)
|
|
||||||
set(USE_SSLEAY TRUE)
|
|
||||||
set(USE_OPENSSL TRUE)
|
|
||||||
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
|
|
||||||
else()
|
|
||||||
set(CMAKE_USE_OPENSSL FALSE)
|
|
||||||
message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
|
|
||||||
endif()
|
|
||||||
else(WIN32)
|
|
||||||
check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
|
|
||||||
check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
|
|
||||||
endif(WIN32)
|
|
||||||
endif(CMAKE_USE_OPENSSL)
|
|
||||||
|
|
||||||
# Check for idn
|
# Check for idn
|
||||||
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
||||||
|
|
||||||
@@ -282,6 +251,25 @@ if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
||||||
|
mark_as_advanced(CMAKE_USE_OPENSSL)
|
||||||
|
if(CMAKE_USE_OPENSSL)
|
||||||
|
if(WIN32)
|
||||||
|
find_package(OpenSSL)
|
||||||
|
if(OPENSSL_FOUND)
|
||||||
|
set(USE_SSLEAY TRUE)
|
||||||
|
set(USE_OPENSSL TRUE)
|
||||||
|
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
|
||||||
|
else()
|
||||||
|
set(CMAKE_USE_OPENSSL FALSE)
|
||||||
|
message(STATUS "OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL")
|
||||||
|
endif()
|
||||||
|
else(WIN32)
|
||||||
|
check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
|
||||||
|
check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
|
||||||
|
endif(WIN32)
|
||||||
|
endif(CMAKE_USE_OPENSSL)
|
||||||
|
|
||||||
# If we have features.h, then do the _BSD_SOURCE magic
|
# If we have features.h, then do the _BSD_SOURCE magic
|
||||||
check_include_file("features.h" HAVE_FEATURES_H)
|
check_include_file("features.h" HAVE_FEATURES_H)
|
||||||
|
|
||||||
@@ -786,7 +774,13 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
|||||||
|
|
||||||
if(HAVE_SOCKLEN_T)
|
if(HAVE_SOCKLEN_T)
|
||||||
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
|
||||||
|
elseif(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
|
||||||
|
endif()
|
||||||
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
||||||
@@ -836,7 +830,7 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
|
|||||||
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
|
||||||
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*\n)" "SET(\\1 \\2)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||||
|
|
||||||
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
|
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
|
||||||
@@ -857,3 +851,14 @@ endif()
|
|||||||
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||||
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Installation.
|
||||||
|
# First, install generated curlbuild.h
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h"
|
||||||
|
DESTINATION include/curl )
|
||||||
|
# Next, install other headers excluding curlbuild.h
|
||||||
|
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
|
||||||
|
DESTINATION include
|
||||||
|
FILES_MATCHING PATTERN "*.h"
|
||||||
|
PATTERN "curlbuild.h" EXCLUDE)
|
||||||
|
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
|||||||
COPYRIGHT AND PERMISSION NOTICE
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>.
|
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
118
MacOSX-Framework
118
MacOSX-Framework
@@ -1,26 +1,76 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This script performs all of the steps needed to build a
|
# This script performs all of the steps needed to build a
|
||||||
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||||
|
#
|
||||||
|
# Hendrik Visage:
|
||||||
|
# Generalizations added since Snowleopard (10.6) do not include
|
||||||
|
# the 10.4u SDK.
|
||||||
|
#
|
||||||
|
# Also note:
|
||||||
|
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
|
||||||
|
#If you need to have PPC64 support then change below to 1
|
||||||
|
PPC64_NEEDED=0
|
||||||
|
|
||||||
|
# For me the default is to develop for the platform I am on, and if you
|
||||||
|
#desire compatibility with older versions then change USE_OLD to 1 :)
|
||||||
|
USE_OLD=0
|
||||||
|
|
||||||
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||||
|
FRAMEWORK_VERSION=Versions/Release-$VERSION
|
||||||
|
|
||||||
SDK32='/Developer/SDKs/MacOSX10.4u.sdk'
|
#I also wanted to "copy over" the system, and thus the reason I added the
|
||||||
|
# version to Versions/Release-7.20.1 etc.
|
||||||
|
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
|
||||||
|
# and setup the right paths to this version, leaving the system version
|
||||||
|
# "intact", so you can "fix" it later with the links to Versions/A/...
|
||||||
|
|
||||||
MINVER32='-mmacosx-version-min=10.4'
|
|
||||||
|
|
||||||
ARCHES32='-arch ppc -arch i386'
|
OLD_SDK=`ls /Developer/SDKs|head -1`
|
||||||
|
NEW_SDK=`ls -r /Developer/SDKs|head -1`
|
||||||
|
|
||||||
SDK64='/Developer/SDKs/MacOSX10.5.sdk'
|
if test "0"$USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK32=$OLD_SDK
|
||||||
|
else
|
||||||
|
SDK32=$NEW_SDK
|
||||||
|
fi
|
||||||
|
|
||||||
MINVER64='-mmacosx-version-min=10.5'
|
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
ARCHES64='-arch ppc64 -arch x86_64'
|
SDK32_DIR='/Developer/SDKs/'$SDK32
|
||||||
|
MINVER32='-mmacosx-version-min='$MACVER
|
||||||
|
ARCHES32='-arch i386 -arch ppc'
|
||||||
|
|
||||||
if test -d $SDK32; then
|
|
||||||
|
if test $PPC64_NEEDED -gt 0
|
||||||
|
then
|
||||||
|
SDK64=10.5
|
||||||
|
ARCHES64='-arch x86_64 -arch ppc64'
|
||||||
|
SDK64=`ls /Developer/SDKs|grep 10.5|head -1`
|
||||||
|
else
|
||||||
|
ARCHES64='-arch x86_64'
|
||||||
|
#We "know" that 10.4 and earlier do not support 64bit
|
||||||
|
OLD_SDK64=`ls /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
|
||||||
|
NEW_SDK64=`ls -r /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
|
||||||
|
if test $USE_OLD -gt 0
|
||||||
|
then
|
||||||
|
SDK64=$OLD_SDK64
|
||||||
|
else
|
||||||
|
SDK64=$NEW_SDK64
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
SDK64_DIR='/Developer/SDKs/'$SDK64
|
||||||
|
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||||
|
|
||||||
|
MINVER64='-mmacosx-version-min='$MACVER64
|
||||||
|
|
||||||
|
if test ! -z $SDK32; then
|
||||||
echo "----Configuring libcurl for 32 bit universal framework..."
|
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||||
|
make clean
|
||||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||||
CFLAGS="-Os -isysroot $SDK32 $ARCHES32 $MINVER32" \
|
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32 $MINVER32" \
|
||||||
LDFLAGS="-Wl,-syslibroot,$SDK32 $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
|
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
|
||||||
CC=$CC
|
CC=$CC
|
||||||
|
|
||||||
echo "----Building 32 bit libcurl..."
|
echo "----Building 32 bit libcurl..."
|
||||||
@@ -28,40 +78,43 @@ if test -d $SDK32; then
|
|||||||
|
|
||||||
echo "----Creating 32 bit framework..."
|
echo "----Creating 32 bit framework..."
|
||||||
rm -r libcurl.framework
|
rm -r libcurl.framework
|
||||||
mkdir -p libcurl.framework/Versions/A/Resources
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
|
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
|
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||||
mkdir -p libcurl.framework/Versions/A/Headers/curl
|
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
cp include/curl/*.h libcurl.framework/Versions/A/Headers/curl
|
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||||
pushd libcurl.framework
|
pushd libcurl.framework
|
||||||
ln -fs Versions/A/libcurl libcurl
|
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
|
||||||
ln -fs Versions/A/Resources Resources
|
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
|
||||||
ln -fs Versions/A/Headers Headers
|
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
|
||||||
cd Versions
|
cd Versions
|
||||||
ln -fs A Current
|
ln -fs ${FRAMEWORK_VERSION} Current
|
||||||
|
|
||||||
if test -d $SDK64; then
|
echo TEsting for SDK64
|
||||||
|
if test -d $SDK64_DIR; then
|
||||||
|
echo entering...
|
||||||
popd
|
popd
|
||||||
make clean
|
make clean
|
||||||
echo "----Configuring libcurl for 64 bit universal framework..."
|
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||||
CFLAGS="-Os -isysroot $SDK64 $ARCHES64 $MINVER64" \
|
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64 $MINVER64" \
|
||||||
LDFLAGS="-Wl,-syslibroot,$SDK64 $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
|
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
|
||||||
CC=$CC
|
CC=$CC
|
||||||
|
|
||||||
echo "----Building 64 bit libcurl..."
|
echo "----Building 64 bit libcurl..."
|
||||||
make
|
make
|
||||||
|
|
||||||
echo "----Appending 64 bit framework to 32 bit framework..."
|
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl64
|
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl64
|
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
cp libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl32
|
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||||
lipo libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64 -create -output libcurl.framework/Versions/A/libcurl
|
pwd
|
||||||
rm libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64
|
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
cp libcurl.framework/Versions/A/Headers/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild32.h
|
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||||
cp include/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild64.h
|
cp libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild32.h
|
||||||
cat >libcurl.framework/Versions/A/Headers/curl/curlbuild.h <<EOF
|
cp include/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild64.h
|
||||||
|
cat >libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h <<EOF
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
#include "curl/curlbuild64.h"
|
#include "curl/curlbuild64.h"
|
||||||
#else
|
#else
|
||||||
@@ -70,9 +123,10 @@ if test -d $SDK32; then
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lipo -info libcurl.framework/Versions/A/libcurl
|
pwd
|
||||||
|
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||||
echo "libcurl.framework is built and can now be included in other projects."
|
echo "libcurl.framework is built and can now be included in other projects."
|
||||||
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||||
else
|
else
|
||||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
|
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
|
||||||
fi
|
fi
|
||||||
|
24
Makefile.am
24
Makefile.am
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -24,20 +24,24 @@ AUTOMAKE_OPTIONS = foreign
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
|
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||||
CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake \
|
CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
|
||||||
CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake \
|
CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
|
||||||
CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||||
|
|
||||||
|
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
|
||||||
|
winbuild/MakefileBuild.vc winbuild/Makefile.vc
|
||||||
|
|
||||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||||
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST) \
|
||||||
|
Makefile.msvc.names $(WINBUILD_DIST)
|
||||||
|
|
||||||
bin_SCRIPTS = curl-config
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
SUBDIRS = lib src
|
SUBDIRS = lib src include
|
||||||
DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
|
DIST_SUBDIRS = $(SUBDIRS) tests packages docs
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libcurl.pc
|
pkgconfig_DATA = libcurl.pc
|
||||||
@@ -151,3 +155,7 @@ ca-bundle: lib/mk-ca-bundle.pl
|
|||||||
ca-firefox: lib/firefox-db2pem.sh
|
ca-firefox: lib/firefox-db2pem.sh
|
||||||
@echo "generate a fresh ca-bundle.crt"
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||||
|
|
||||||
|
checksrc:
|
||||||
|
cd lib && $(MAKE) checksrc
|
||||||
|
cd src && $(MAKE) checksrc
|
||||||
|
115
Makefile.dist
115
Makefile.dist
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -32,71 +32,63 @@ ssl:
|
|||||||
|
|
||||||
borland:
|
borland:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32
|
$(MAKE) -f Makefile.b32
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32
|
$(MAKE) -f Makefile.b32
|
||||||
|
|
||||||
borland-ssl:
|
borland-ssl:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 WITH_SSL=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 WITH_SSL=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||||
|
|
||||||
borland-ssl-zlib:
|
borland-ssl-zlib:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||||
|
|
||||||
borland-clean:
|
borland-clean:
|
||||||
cd lib
|
cd lib
|
||||||
make -f Makefile.b32 clean
|
$(MAKE) -f Makefile.b32 clean
|
||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 clean
|
$(MAKE) -f Makefile.b32 clean
|
||||||
|
|
||||||
watcom:
|
watcom: .SYMBOLIC
|
||||||
cd lib
|
cd lib && $(MAKE) -u -f Makefile.Watcom
|
||||||
wmake -f Makefile.Watcom
|
cd src && $(MAKE) -u -f Makefile.Watcom
|
||||||
cd ..\src
|
|
||||||
wmake -f Makefile.Watcom
|
|
||||||
|
|
||||||
watcom-clean:
|
watcom-clean: .SYMBOLIC
|
||||||
cd lib
|
cd lib && $(MAKE) -u -f Makefile.Watcom clean
|
||||||
wmake -f Makefile.Watcom clean
|
cd src && $(MAKE) -u -f Makefile.Watcom clean
|
||||||
cd ..\src
|
|
||||||
wmake -f Makefile.Watcom clean
|
watcom-vclean: .SYMBOLIC
|
||||||
|
cd lib && $(MAKE) -u -f Makefile.Watcom vclean
|
||||||
|
cd src && $(MAKE) -u -f Makefile.Watcom vclean
|
||||||
|
|
||||||
mingw32:
|
mingw32:
|
||||||
$(MAKE) -C lib -f Makefile.m32
|
$(MAKE) -C lib -f Makefile.m32
|
||||||
$(MAKE) -C src -f Makefile.m32
|
$(MAKE) -C src -f Makefile.m32
|
||||||
|
|
||||||
mingw32-zlib:
|
|
||||||
$(MAKE) -C lib -f Makefile.m32 ZLIB=1
|
|
||||||
$(MAKE) -C src -f Makefile.m32 ZLIB=1
|
|
||||||
|
|
||||||
mingw32-ssl-zlib:
|
|
||||||
$(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
|
|
||||||
$(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
|
|
||||||
|
|
||||||
mingw32-ssh2-ssl-zlib:
|
|
||||||
$(MAKE) -C lib -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-zlib:
|
|
||||||
$(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
|
|
||||||
|
|
||||||
mingw32-clean:
|
mingw32-clean:
|
||||||
$(MAKE) -C lib -f Makefile.m32 clean
|
$(MAKE) -C lib -f Makefile.m32 clean
|
||||||
$(MAKE) -C src -f Makefile.m32 clean
|
$(MAKE) -C src -f Makefile.m32 clean
|
||||||
|
|
||||||
vc-clean:
|
mingw32-vclean mingw32-distclean:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32 vclean
|
||||||
|
$(MAKE) -C src -f Makefile.m32 vclean
|
||||||
|
|
||||||
|
mingw32%:
|
||||||
|
$(MAKE) -C lib -f Makefile.m32 CFG=$@
|
||||||
|
$(MAKE) -C src -f Makefile.m32 CFG=$@
|
||||||
|
|
||||||
|
vc-clean: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake -f Makefile.$(VC) clean
|
nmake -f Makefile.$(VC) clean
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake -f Makefile.$(VC) clean
|
nmake -f Makefile.$(VC) clean
|
||||||
|
|
||||||
vc-all:
|
vc-all: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake -f Makefile.$(VC) cfg=release
|
nmake -f Makefile.$(VC) cfg=release
|
||||||
nmake -f Makefile.$(VC) cfg=release-ssl
|
nmake -f Makefile.$(VC) cfg=release-ssl
|
||||||
@@ -121,85 +113,85 @@ vc-all:
|
|||||||
nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
|
nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
|
||||||
nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
|
nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
|
||||||
|
|
||||||
vc:
|
vc: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release
|
nmake /f Makefile.$(VC) cfg=release
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC)
|
nmake /f Makefile.$(VC)
|
||||||
|
|
||||||
vc-x64:
|
vc-x64: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||||
|
|
||||||
vc-zlib:
|
vc-zlib: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||||
|
|
||||||
vc-ssl:
|
vc-ssl: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||||
|
|
||||||
vc-ssl-zlib:
|
vc-ssl-zlib: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||||
|
|
||||||
vc-x64-ssl-zlib:
|
vc-x64-ssl-zlib: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||||
|
|
||||||
vc-ssl-dll:
|
vc-ssl-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||||
|
|
||||||
vc-dll-ssl-dll:
|
vc-dll-ssl-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||||
|
|
||||||
vc-dll:
|
vc-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll
|
nmake /f Makefile.$(VC) cfg=release-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll
|
nmake /f Makefile.$(VC) cfg=release-dll
|
||||||
|
|
||||||
vc-dll-zlib-dll:
|
vc-dll-zlib-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||||
|
|
||||||
vc-dll-ssl-dll-zlib-dll:
|
vc-dll-ssl-dll-zlib-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||||
|
|
||||||
vc-ssl-dll-zlib-dll:
|
vc-ssl-dll-zlib-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||||
|
|
||||||
vc-zlib-dll:
|
vc-zlib-dll: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||||
|
|
||||||
vc-sspi:
|
vc-sspi: $(VC)
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||||
cd ..\src
|
cd ..\src
|
||||||
@@ -261,27 +253,40 @@ linux: all
|
|||||||
|
|
||||||
linux-ssl: ssl
|
linux-ssl: ssl
|
||||||
|
|
||||||
|
# We don't need to do anything for vc6.
|
||||||
|
vc6:
|
||||||
|
|
||||||
vc8: lib/Makefile.vc8 src/Makefile.vc8
|
vc8: lib/Makefile.vc8 src/Makefile.vc8
|
||||||
|
|
||||||
lib/Makefile.vc8: lib/Makefile.vc6
|
lib/Makefile.vc8: lib/Makefile.vc6
|
||||||
@echo "generate $@"
|
@echo "generate $@"
|
||||||
@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/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||||
|
|
||||||
src/Makefile.vc8: src/Makefile.vc6
|
src/Makefile.vc8: src/Makefile.vc6
|
||||||
@echo "generate $@"
|
@echo "generate $@"
|
||||||
@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
|
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||||
|
|
||||||
# VC9 makefiles are for use with VS2008
|
# VC9 makefiles are for use with VS2008
|
||||||
vc9: lib/Makefile.vc9 src/Makefile.vc9
|
vc9: lib/Makefile.vc9 src/Makefile.vc9
|
||||||
|
|
||||||
lib/Makefile.vc9: lib/Makefile.vc6
|
lib/Makefile.vc9: lib/Makefile.vc6
|
||||||
@echo "generate $@"
|
@echo "generate $@"
|
||||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
||||||
|
|
||||||
src/Makefile.vc9: src/Makefile.vc6
|
src/Makefile.vc9: src/Makefile.vc6
|
||||||
@echo "generate $@"
|
@echo "generate $@"
|
||||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
||||||
|
|
||||||
|
# VC10 makefiles are for use with VS2010
|
||||||
|
vc10: lib/Makefile.vc10 src/Makefile.vc10
|
||||||
|
|
||||||
|
lib/Makefile.vc10: lib/Makefile.vc6
|
||||||
|
@echo "generate $@"
|
||||||
|
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" lib/Makefile.vc6 > lib/Makefile.vc10
|
||||||
|
|
||||||
|
src/Makefile.vc10: src/Makefile.vc6
|
||||||
|
@echo "generate $@"
|
||||||
|
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" src/Makefile.vc6 > src/Makefile.vc10
|
||||||
|
|
||||||
ca-bundle: lib/mk-ca-bundle.pl
|
ca-bundle: lib/mk-ca-bundle.pl
|
||||||
@echo "generate a fresh ca-bundle.crt"
|
@echo "generate a fresh ca-bundle.crt"
|
||||||
|
81
Makefile.msvc.names
Normal file
81
Makefile.msvc.names
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1999 - 2010, 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.
|
||||||
|
#
|
||||||
|
#***************************************************************************
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file is included from MSVC makefiles located in lib and src,
|
||||||
|
# providing libcurl common file names required by these makefiles.
|
||||||
|
#
|
||||||
|
|
||||||
|
# ------------------
|
||||||
|
# libcurl base name
|
||||||
|
# ------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME) || "$(LIB_NAME)" == ""
|
||||||
|
LIB_NAME = libcurl
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# libcurl static and dynamic libraries common base
|
||||||
|
# file names for release and debug configurations
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_STA_REL) || "$(LIB_NAME_STA_REL)" == ""
|
||||||
|
LIB_NAME_STA_REL = $(LIB_NAME)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_STA_DBG) || "$(LIB_NAME_STA_DBG)" == ""
|
||||||
|
LIB_NAME_STA_DBG = $(LIB_NAME_STA_REL)d
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_DYN_REL) || "$(LIB_NAME_DYN_REL)" == ""
|
||||||
|
LIB_NAME_DYN_REL = $(LIB_NAME)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_DYN_DBG) || "$(LIB_NAME_DYN_DBG)" == ""
|
||||||
|
LIB_NAME_DYN_DBG = $(LIB_NAME_DYN_REL)d
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# --------------------------------------------
|
||||||
|
# Base names for libcurl DLL import libraries
|
||||||
|
# --------------------------------------------
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_IMP_REL) || "$(LIB_NAME_IMP_REL)" == ""
|
||||||
|
LIB_NAME_IMP_REL = $(LIB_NAME_DYN_REL)_imp
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IF !DEFINED(LIB_NAME_IMP_DBG) || "$(LIB_NAME_IMP_DBG)" == ""
|
||||||
|
LIB_NAME_IMP_DBG = $(LIB_NAME_DYN_DBG)_imp
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# --------------------------------------
|
||||||
|
# File names with extension and no path
|
||||||
|
# --------------------------------------
|
||||||
|
|
||||||
|
LIBCURL_STA_LIB_REL = $(LIB_NAME_STA_REL).lib
|
||||||
|
LIBCURL_STA_LIB_DBG = $(LIB_NAME_STA_DBG).lib
|
||||||
|
LIBCURL_DYN_LIB_REL = $(LIB_NAME_DYN_REL).dll
|
||||||
|
LIBCURL_DYN_LIB_DBG = $(LIB_NAME_DYN_DBG).dll
|
||||||
|
LIBCURL_IMP_LIB_REL = $(LIB_NAME_IMP_REL).lib
|
||||||
|
LIBCURL_IMP_LIB_DBG = $(LIB_NAME_IMP_DBG).lib
|
||||||
|
LIBCURL_DYN_LIB_PDB = $(LIB_NAME_IMP_DBG).pdb
|
||||||
|
|
||||||
|
# End of Makefile.msvc.names
|
@@ -1,51 +1,38 @@
|
|||||||
Curl and libcurl 7.20.1
|
Curl and libcurl 7.21.7
|
||||||
|
|
||||||
Public curl releases: 115
|
Public curl releases: 123
|
||||||
Command line options: 136
|
Command line options: 144
|
||||||
curl_easy_setopt() options: 174
|
curl_easy_setopt() options: 186
|
||||||
Public functions in libcurl: 58
|
Public functions in libcurl: 58
|
||||||
Known libcurl bindings: 39
|
Known libcurl bindings: 39
|
||||||
Contributors: 776
|
Contributors: 868
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o The 'ares' subtree has been removed from the source repository
|
o recognize the [protocol]:// prefix in proxy hosts where the protocol is one
|
||||||
o smoother rate limiting
|
of socks4, socks4a, socks5 or socks5h.
|
||||||
o allow user+password in the URL for all protocols
|
o Added CURLOPT_CLOSESOCKETFUNCTION and CURLOPT_CLOSESOCKETDATA
|
||||||
o POP3: Get message listing if no mailbox in URL
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o VMS builder bad behavior when used in a batch job
|
o SECURITY ADVISORY: inappropriate GSSAPI delegation. Full details at
|
||||||
o multiple recepients with SMTP
|
http://curl.haxx.se/docs/adv_20110623.html
|
||||||
o fixed the CURL_FORMAT_* defines when building with cmake
|
o NTLM: work with unicode
|
||||||
o missing quote in libcurl.m4
|
o fix connect with SOCKS proxy when using the multi interface
|
||||||
o SMTP: now waits for 250 after the DATA transfer
|
o anyauthput.c: stdint.h must not be included unconditionally
|
||||||
o SMTP: use angle brackets in RCPT TO
|
o CMake: improved build
|
||||||
o curl --trace-time not using local time
|
o SCP/SFTP enable non-blocking earlier
|
||||||
o off-by-one in the chunked encoding trailer parser
|
o GnuTLS handshake: fix timeout
|
||||||
o superfluous blocking for OpenSSL-based SSL connects and multi interface
|
o cyassl: build without filesystem
|
||||||
o TFTP upload
|
o HTTPS over HTTP proxy using the multi interface
|
||||||
o FTP timeouts after file transferred completely
|
o speedcheck: invalid timeout event on a reused handle
|
||||||
o skip poll() on Interix
|
o Force connection close for HTTP 200 OK when time condition matched
|
||||||
o CURLOPT_CERTINFO memory leak
|
o curl_formget: fix FILE * leak
|
||||||
o sub-second timeouts improvements
|
o configure: improved OpenSSL detection
|
||||||
o configure fixes for GSSAPI
|
o Android build: support gingerbread
|
||||||
o threaded resolver double free when closing curl handle
|
o CURLFORM_STREAM: acknowledge CURLFORM_FILENAME
|
||||||
o configure fixes for building with the clang compiler
|
o windows build: use correct MS CRT
|
||||||
o easy interix rate limiting logic
|
o pop3: remove extra space in LIST command
|
||||||
o curl_multi_remove_handle() caused use after free
|
|
||||||
o TFTP improved error codes
|
|
||||||
o TFTP fixed TSIZE handling for uploads
|
|
||||||
o SSL possible double free when reusing curl handle
|
|
||||||
o alarm()-based DNS timeout bug
|
|
||||||
o re-used FTP connection multi interface crash
|
|
||||||
o chunked-encoding with Content-Length: header problem
|
|
||||||
o multi interface HTTP POST over a proxy using PROXYTUNNEL
|
|
||||||
o RTSP GET_PARAMETER
|
|
||||||
o timeout after last data chunk was handled
|
|
||||||
o SFTP download hang
|
|
||||||
o FTP quote commands prefixed with '*' now can fail without aborting
|
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -54,11 +41,9 @@ This release includes the following known bugs:
|
|||||||
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:
|
||||||
|
|
||||||
Steven M. Schweda, Yang Tse, Jack Zhang, Tom Donovan, Martin Hager,
|
Dan Fandrich, Guenter Knauf, Vsevolod Novikov, Zmey Petroff,
|
||||||
Daniel Fandrich, Patrick Monnerat, Pat Ray, Wesley Miaw, Ben Greear,
|
Dagobert Michelsen, Jeff Pohlmeyer, Dmitri Shubin, Matteo Rocco,
|
||||||
Ryan Chan, Markus Duft, Andrei Benea, Jacob Moshenko, Daniel Johnson,
|
Aaron Orenstein, Yang Tse, Kamil Dudka, Amr Shahin, Josue Andrade Gomes,
|
||||||
Constantine Sapuntzakis, Douglas Steinwand, Thomas Lopatic, Hauke Duden,
|
Ori Avtalion, Richard Silverman, Julien Chaffraix
|
||||||
Akos Pasztory, Kenny To, Christopher Conroy, Massimo Callegari,
|
|
||||||
Bob Richmond, Matt Wixson
|
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
15
TODO-RELEASE
15
TODO-RELEASE
@@ -1,4 +1,15 @@
|
|||||||
To be addressed in 7.20.1 (planned release: April 2010)
|
To be addressed in 7.21.6
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
261 -
|
284 - bug 3172608 "No re-authentication when HTTP connecton is closed"
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=3172608
|
||||||
|
Would be nice if someone could verify the suggested patch
|
||||||
|
|
||||||
|
285 - bug 3163118 "Allow programatic use of telnet on Windows"
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=3163118
|
||||||
|
Would appreciate a Windows developer to give it a look before we apply
|
||||||
|
the suggested patch
|
||||||
|
|
||||||
|
287 - bug 3215314 Post quote operation to rename fails in Windows
|
||||||
|
|
||||||
|
289 -
|
||||||
|
69
acinclude.m4
69
acinclude.m4
@@ -5,7 +5,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -1663,7 +1663,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
|
|||||||
for recvfrom_arg2 in 'char *' 'void *'; do
|
for recvfrom_arg2 in 'char *' 'void *'; do
|
||||||
for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
|
||||||
for recvfrom_arg4 in 'int' 'unsigned int'; do
|
for recvfrom_arg4 in 'int' 'unsigned int'; do
|
||||||
for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do
|
for recvfrom_arg5 in 'struct sockaddr *' 'void *' 'const struct sockaddr *'; do
|
||||||
for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
|
for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
|
||||||
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
|
if test "$curl_cv_func_recvfrom_args" = "unknown"; then
|
||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
@@ -1731,7 +1731,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
|
|||||||
shift
|
shift
|
||||||
#
|
#
|
||||||
recvfrom_ptrt_arg2=$[2]
|
recvfrom_ptrt_arg2=$[2]
|
||||||
recvfrom_ptrt_arg5=$[5]
|
recvfrom_qual_ptrt_arg5=$[5]
|
||||||
recvfrom_ptrt_arg6=$[6]
|
recvfrom_ptrt_arg6=$[6]
|
||||||
#
|
#
|
||||||
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
|
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
|
||||||
@@ -1753,12 +1753,25 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
#
|
#
|
||||||
|
case "$recvfrom_qual_ptrt_arg5" in
|
||||||
|
const*)
|
||||||
|
recvfrom_qual_arg5=const
|
||||||
|
recvfrom_ptrt_arg5=`echo $recvfrom_qual_ptrt_arg5 | sed 's/^const //'`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
recvfrom_qual_arg5=
|
||||||
|
recvfrom_ptrt_arg5=$recvfrom_qual_ptrt_arg5
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
#
|
||||||
recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
|
recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
|
||||||
recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
|
recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
|
||||||
recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
|
recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
|
||||||
#
|
#
|
||||||
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2,
|
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2,
|
||||||
[Define to the type pointed by arg 2 for recvfrom.])
|
[Define to the type pointed by arg 2 for recvfrom.])
|
||||||
|
AC_DEFINE_UNQUOTED(RECVFROM_QUAL_ARG5, $recvfrom_qual_arg5,
|
||||||
|
[Define to the type qualifier pointed by arg 5 for recvfrom.])
|
||||||
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5,
|
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5,
|
||||||
[Define to the type pointed by arg 5 for recvfrom.])
|
[Define to the type pointed by arg 5 for recvfrom.])
|
||||||
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
|
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
|
||||||
@@ -2145,6 +2158,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
|||||||
else
|
else
|
||||||
LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
|
LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
|
||||||
fi
|
fi
|
||||||
|
CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
|
||||||
AC_MSG_RESULT([$curl_cv_gclk_LIBS])
|
AC_MSG_RESULT([$curl_cv_gclk_LIBS])
|
||||||
ac_cv_func_clock_gettime="yes"
|
ac_cv_func_clock_gettime="yes"
|
||||||
;;
|
;;
|
||||||
@@ -2842,7 +2856,7 @@ AC_DEFUN([DO_CURL_OFF_T_CHECK], [
|
|||||||
tmp_includes=""
|
tmp_includes=""
|
||||||
tmp_source=""
|
tmp_source=""
|
||||||
tmp_fmt=""
|
tmp_fmt=""
|
||||||
case AS_TR_SH([$1]) in
|
case XC_SH_TR_SH([$1]) in
|
||||||
int64_t)
|
int64_t)
|
||||||
tmp_includes="$curl_includes_inttypes"
|
tmp_includes="$curl_includes_inttypes"
|
||||||
tmp_source="char f@<:@@:>@ = PRId64;"
|
tmp_source="char f@<:@@:>@ = PRId64;"
|
||||||
@@ -2900,7 +2914,7 @@ AC_DEFUN([DO_CURL_OFF_T_SUFFIX_CHECK], [
|
|||||||
curl_suffix_curl_off_t="unknown"
|
curl_suffix_curl_off_t="unknown"
|
||||||
curl_suffix_curl_off_tu="unknown"
|
curl_suffix_curl_off_tu="unknown"
|
||||||
#
|
#
|
||||||
case AS_TR_SH([$1]) in
|
case XC_SH_TR_SH([$1]) in
|
||||||
long_long | __longlong | __longlong_t)
|
long_long | __longlong | __longlong_t)
|
||||||
tst_suffixes="LL::"
|
tst_suffixes="LL::"
|
||||||
;;
|
;;
|
||||||
@@ -3072,7 +3086,7 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
|
|||||||
curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
|
curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
|
||||||
else
|
else
|
||||||
x_pull_headers="no"
|
x_pull_headers="no"
|
||||||
case AS_TR_SH([$curl_typeof_curl_off_t]) in
|
case XC_SH_TR_SH([$curl_typeof_curl_off_t]) in
|
||||||
long_long | __longlong | __longlong_t)
|
long_long | __longlong | __longlong_t)
|
||||||
curl_format_curl_off_t="lld"
|
curl_format_curl_off_t="lld"
|
||||||
curl_format_curl_off_tu="llu"
|
curl_format_curl_off_tu="llu"
|
||||||
@@ -3180,7 +3194,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
|
|||||||
;;
|
;;
|
||||||
win32_small_files)
|
win32_small_files)
|
||||||
AC_MSG_RESULT([yes (large file disabled)])
|
AC_MSG_RESULT([yes (large file disabled)])
|
||||||
AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
|
AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
|
||||||
[Define to 1 if you are building a Windows target without large file support.])
|
[Define to 1 if you are building a Windows target without large file support.])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -3245,3 +3259,44 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CURL_GENERATE_CONFIGUREHELP_PM
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Generate test harness configurehelp.pm module, defining and
|
||||||
|
dnl initializing some perl variables with values which are known
|
||||||
|
dnl when the configure script runs. For portability reasons, test
|
||||||
|
dnl harness needs information on how to run the C preprocessor.
|
||||||
|
|
||||||
|
AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [
|
||||||
|
AC_REQUIRE([AC_PROG_CPP])dnl
|
||||||
|
tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
|
||||||
|
if test -z "$tmp_cpp"; then
|
||||||
|
tmp_cpp='cpp'
|
||||||
|
fi
|
||||||
|
cat >./tests/configurehelp.pm <<_EOF
|
||||||
|
[@%:@] This is a generated file. Do not edit.
|
||||||
|
|
||||||
|
package configurehelp;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Exporter;
|
||||||
|
|
||||||
|
use vars qw(
|
||||||
|
@ISA
|
||||||
|
@EXPORT_OK
|
||||||
|
\$Cpreprocessor
|
||||||
|
);
|
||||||
|
|
||||||
|
@ISA = qw(Exporter);
|
||||||
|
|
||||||
|
@EXPORT_OK = qw(
|
||||||
|
\$Cpreprocessor
|
||||||
|
);
|
||||||
|
|
||||||
|
\$Cpreprocessor = '$tmp_cpp';
|
||||||
|
|
||||||
|
1;
|
||||||
|
_EOF
|
||||||
|
])
|
||||||
|
30
buildconf
30
buildconf
@@ -6,7 +6,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -33,6 +33,17 @@ die(){
|
|||||||
findtool(){
|
findtool(){
|
||||||
file="$1"
|
file="$1"
|
||||||
|
|
||||||
|
if { echo $file | grep "/" >/dev/null 2>&1; } then
|
||||||
|
# we only check for the explicit file name if the file is given
|
||||||
|
# including a slash. Use ./ for current dir. Previously this would
|
||||||
|
# otherwise always cause findtool to search the local dir first, which
|
||||||
|
# is wrong.
|
||||||
|
if test -f "$file"; then
|
||||||
|
echo "$file"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
old_IFS=$IFS; IFS=':'
|
old_IFS=$IFS; IFS=':'
|
||||||
for path in $PATH
|
for path in $PATH
|
||||||
do
|
do
|
||||||
@@ -237,13 +248,17 @@ fi
|
|||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# m4 check
|
# m4 check
|
||||||
#
|
#
|
||||||
m4=`${M4:-m4} --version 2>/dev/null|head -n 1`;
|
m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`;
|
||||||
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
||||||
|
|
||||||
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
|
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
|
||||||
echo "buildconf: GNU m4 version $m4_version (ok)"
|
echo "buildconf: GNU m4 version $m4_version (ok)"
|
||||||
else
|
else
|
||||||
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
|
if test -z "$m4"; then
|
||||||
|
echo "buildconf: m4 version not recognized. You need a GNU m4 installed!"
|
||||||
|
else
|
||||||
|
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
|
||||||
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -278,6 +293,7 @@ for fname in .deps \
|
|||||||
config.status \
|
config.status \
|
||||||
config.sub \
|
config.sub \
|
||||||
configure \
|
configure \
|
||||||
|
configurehelp.pm \
|
||||||
curl-config \
|
curl-config \
|
||||||
curlbuild.h \
|
curlbuild.h \
|
||||||
depcomp \
|
depcomp \
|
||||||
@@ -349,6 +365,12 @@ if test ! -f ./config.guess; then
|
|||||||
else
|
else
|
||||||
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
||||||
case $buildhost in
|
case $buildhost in
|
||||||
|
*-*-darwin*)
|
||||||
|
need_lt_major=1
|
||||||
|
need_lt_minor=5
|
||||||
|
need_lt_patch=26
|
||||||
|
need_lt_check="yes"
|
||||||
|
;;
|
||||||
*-*-hpux*)
|
*-*-hpux*)
|
||||||
need_lt_major=1
|
need_lt_major=1
|
||||||
need_lt_minor=5
|
need_lt_minor=5
|
||||||
@@ -389,7 +411,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Finished succesfully.
|
# Finished successfully.
|
||||||
#
|
#
|
||||||
|
|
||||||
echo "buildconf: OK"
|
echo "buildconf: OK"
|
||||||
|
718
configure.ac
718
configure.ac
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 2001 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -32,6 +32,7 @@ Usage: curl-config [OPTION]
|
|||||||
|
|
||||||
Available values for OPTION include:
|
Available values for OPTION include:
|
||||||
|
|
||||||
|
--built-shared says 'yes' if libcurl was built shared
|
||||||
--ca ca bundle install path
|
--ca ca bundle install path
|
||||||
--cc compiler
|
--cc compiler
|
||||||
--cflags pre-processor and compiler flags
|
--cflags pre-processor and compiler flags
|
||||||
@@ -64,6 +65,10 @@ while test $# -gt 0; do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--built-shared)
|
||||||
|
echo @ENABLE_SHARED@
|
||||||
|
;;
|
||||||
|
|
||||||
--ca)
|
--ca)
|
||||||
echo "@CURL_CA_BUNDLE@"
|
echo "@CURL_CA_BUNDLE@"
|
||||||
;;
|
;;
|
||||||
@@ -87,8 +92,9 @@ while test $# -gt 0; do
|
|||||||
echo "$protocol"
|
echo "$protocol"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--version)
|
--version)
|
||||||
echo libcurl @VERSION@
|
echo libcurl @CURLVERSION@
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -107,7 +113,7 @@ while test $# -gt 0; do
|
|||||||
# silent success
|
# silent success
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "requested version $checkfor is newer than existing @VERSION@"
|
echo "requested version $checkfor is newer than existing @CURLVERSION@"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
2
docs/.gitignore
vendored
Normal file
2
docs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.html
|
||||||
|
*.pdf
|
@@ -29,9 +29,11 @@
|
|||||||
2.11 Test Cases
|
2.11 Test Cases
|
||||||
|
|
||||||
3. Pushing Out Your Changes
|
3. Pushing Out Your Changes
|
||||||
|
3.1 Write Access to git Repository
|
||||||
3.2 How To Make a Patch with git
|
3.2 How To Make a Patch with git
|
||||||
3.3 How To Make a Patch without git
|
3.3 How To Make a Patch without git
|
||||||
3.4 How to get your changes into the main sources
|
3.4 How to get your changes into the main sources
|
||||||
|
3.5 Write good commit messages
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -114,7 +116,7 @@
|
|||||||
|
|
||||||
2.4 Line Lengths
|
2.4 Line Lengths
|
||||||
|
|
||||||
We try to keep source lines shorter than 80 columns.
|
We write source lines shorter than 80 columns.
|
||||||
|
|
||||||
2.5 General Style
|
2.5 General Style
|
||||||
|
|
||||||
@@ -187,7 +189,7 @@
|
|||||||
|
|
||||||
3.2 How To Make a Patch with git
|
3.2 How To Make a Patch with git
|
||||||
|
|
||||||
You need to first checkout the respository:
|
You need to first checkout the repository:
|
||||||
|
|
||||||
git clone git://github.com/bagder/curl.git
|
git clone git://github.com/bagder/curl.git
|
||||||
|
|
||||||
@@ -197,7 +199,8 @@
|
|||||||
git commit [file]
|
git commit [file]
|
||||||
|
|
||||||
As usual, group your commits so that you commit all changes that at once that
|
As usual, group your commits so that you commit all changes that at once that
|
||||||
constitutes a logical change.
|
constitutes a logical change. See also section "3.5 Write good commit
|
||||||
|
messages".
|
||||||
|
|
||||||
Once you have done all your commits and you're happy with what you see, you
|
Once you have done all your commits and you're happy with what you see, you
|
||||||
can make patches out of your changes that are suitable for mailing:
|
can make patches out of your changes that are suitable for mailing:
|
||||||
@@ -230,28 +233,46 @@
|
|||||||
|
|
||||||
For unix-like operating systems:
|
For unix-like operating systems:
|
||||||
|
|
||||||
http://www.gnu.org/software/patch/patch.html
|
http://www.gnu.org/software/patch/patch.html
|
||||||
http://www.gnu.org/directory/diffutils.html
|
http://www.gnu.org/directory/diffutils.html
|
||||||
|
|
||||||
For Windows:
|
For Windows:
|
||||||
|
|
||||||
http://gnuwin32.sourceforge.net/packages/patch.htm
|
http://gnuwin32.sourceforge.net/packages/patch.htm
|
||||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm
|
http://gnuwin32.sourceforge.net/packages/diffutils.htm
|
||||||
|
|
||||||
3.4 How to get your changes into the main sources
|
3.4 How to get your changes into the main sources
|
||||||
|
|
||||||
1. Submit your patch to the curl-library mailing list
|
Submit your patch to the curl-library mailing list.
|
||||||
|
|
||||||
2. Make the patch against as recent sources as possible.
|
Make the patch against as recent sources as possible.
|
||||||
|
|
||||||
3. Make sure your patch adheres to the source indent and coding style of
|
Make sure your patch adheres to the source indent and coding style of already
|
||||||
already existing source code. Failing to do so just adds more work for me.
|
existing source code. Failing to do so just adds more work for me.
|
||||||
|
|
||||||
4. Respond to replies on the list about the patch and answer questions and/or
|
Respond to replies on the list about the patch and answer questions and/or
|
||||||
fix nits/flaws. This is very important. I will take lack of replies as a
|
fix nits/flaws. This is very important. I will take lack of replies as a sign
|
||||||
sign that you're not very anxious to get your patch accepted and I tend to
|
that you're not very anxious to get your patch accepted and I tend to simply
|
||||||
simply drop such patches from my TODO list.
|
drop such patches from my TODO list.
|
||||||
|
|
||||||
|
If you've followed the above paragraphs and your patch still hasn't been
|
||||||
|
incorporated after some weeks, consider resubmitting it to the list.
|
||||||
|
|
||||||
|
3.5 Write good commit messages
|
||||||
|
|
||||||
|
A short guide to how to do fine commit messages in the curl project.
|
||||||
|
|
||||||
|
---- start ----
|
||||||
|
[area]: [short line describing the main effect]
|
||||||
|
|
||||||
|
[separate the above single line from the rest with an empty line]
|
||||||
|
|
||||||
|
[full description, no wider than 72 columns that describe as much as
|
||||||
|
possible as to why this change is made, and possibly what things
|
||||||
|
it fixes and everything else that is related]
|
||||||
|
---- stop ----
|
||||||
|
|
||||||
|
Don't forget to use commit --author="" if you commit someone else's work,
|
||||||
|
and make sure that you have your own user and email setup correctly in git
|
||||||
|
before you commit
|
||||||
|
|
||||||
5. If you've followed the above mentioned paragraphs and your patch still
|
|
||||||
hasn't been incorporated after some weeks, consider resubmitting it to the
|
|
||||||
list.
|
|
||||||
|
280
docs/FAQ
280
docs/FAQ
@@ -1,4 +1,4 @@
|
|||||||
Updated: Nov 7, 2009 (http://curl.haxx.se/docs/faq.html)
|
Updated: March 8, 2011 (http://curl.haxx.se/docs/faq.html)
|
||||||
_ _ ____ _
|
_ _ ____ _
|
||||||
___| | | | _ \| |
|
___| | | | _ \| |
|
||||||
/ __| | | | |_) | |
|
/ __| | | | |_) | |
|
||||||
@@ -20,6 +20,8 @@ FAQ
|
|||||||
1.10 How many are using curl?
|
1.10 How many are using curl?
|
||||||
1.11 Why don't you update ca-bundle.crt
|
1.11 Why don't you update ca-bundle.crt
|
||||||
1.12 I have a problem who can I chat with?
|
1.12 I have a problem who can I chat with?
|
||||||
|
1.13 curl's ECCN number?
|
||||||
|
1.14 How do I submit my patch?
|
||||||
|
|
||||||
2. Install Related Problems
|
2. Install Related Problems
|
||||||
2.1 configure doesn't find OpenSSL even when it is installed
|
2.1 configure doesn't find OpenSSL even when it is installed
|
||||||
@@ -34,7 +36,7 @@ FAQ
|
|||||||
3.2 How do I tell curl to resume a transfer?
|
3.2 How do I tell curl to resume a transfer?
|
||||||
3.3 Why doesn't my posting using -F work?
|
3.3 Why doesn't my posting using -F work?
|
||||||
3.4 How do I tell curl to run custom FTP commands?
|
3.4 How do I tell curl to run custom FTP commands?
|
||||||
3.5 How can I disable the Pragma: nocache header?
|
3.5 How can I disable the Accept: */* header?
|
||||||
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
|
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
|
||||||
3.7 Can I use curl to delete/rename a file through FTP?
|
3.7 Can I use curl to delete/rename a file through FTP?
|
||||||
3.8 How do I tell curl to follow HTTP redirects?
|
3.8 How do I tell curl to follow HTTP redirects?
|
||||||
@@ -48,6 +50,9 @@ FAQ
|
|||||||
3.16 What certificates do I need when I use SSL?
|
3.16 What certificates do I need when I use SSL?
|
||||||
3.17 How do I list the root dir of an FTP server?
|
3.17 How do I list the root dir of an FTP server?
|
||||||
3.18 Can I use curl to send a POST/PUT and not wait for a response?
|
3.18 Can I use curl to send a POST/PUT and not wait for a response?
|
||||||
|
3.19 How do I get HTTP from a host using a specific IP address?
|
||||||
|
3.20 How to SFTP from my user's home directory?
|
||||||
|
3.21 Protocol xxx not supported or disabled in libcurl
|
||||||
|
|
||||||
4. Running Problems
|
4. Running Problems
|
||||||
4.1 Problems connecting to SSL servers.
|
4.1 Problems connecting to SSL servers.
|
||||||
@@ -74,6 +79,7 @@ FAQ
|
|||||||
4.16 My HTTP POST or PUT requests are slow!
|
4.16 My HTTP POST or PUT requests are slow!
|
||||||
4.17 Non-functional connect timeouts on Windows
|
4.17 Non-functional connect timeouts on Windows
|
||||||
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
||||||
|
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
5.1 Is libcurl thread-safe?
|
5.1 Is libcurl thread-safe?
|
||||||
@@ -83,7 +89,7 @@ FAQ
|
|||||||
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
|
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
|
||||||
5.6 What about Keep-Alive or persistent connections?
|
5.6 What about Keep-Alive or persistent connections?
|
||||||
5.7 Link errors when building libcurl on Windows!
|
5.7 Link errors when building libcurl on Windows!
|
||||||
5.8 libcurl.so.3: open failed: No such file or directory
|
5.8 libcurl.so.X: open failed: No such file or directory
|
||||||
5.9 How does libcurl resolve host names?
|
5.9 How does libcurl resolve host names?
|
||||||
5.10 How do I prevent libcurl from writing the response to stdout?
|
5.10 How do I prevent libcurl from writing the response to stdout?
|
||||||
5.11 How do I make libcurl not receive the whole HTTP response?
|
5.11 How do I make libcurl not receive the whole HTTP response?
|
||||||
@@ -103,7 +109,7 @@ FAQ
|
|||||||
|
|
||||||
7. PHP/CURL Issues
|
7. PHP/CURL Issues
|
||||||
7.1 What is PHP/CURL?
|
7.1 What is PHP/CURL?
|
||||||
7.2 Who write PHP/CURL?
|
7.2 Who wrote PHP/CURL?
|
||||||
7.3 Can I perform multiple requests using the same handle?
|
7.3 Can I perform multiple requests using the same handle?
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
@@ -122,8 +128,10 @@ FAQ
|
|||||||
|
|
||||||
libcurl
|
libcurl
|
||||||
|
|
||||||
A free and easy-to-use client-side URL transfer library, supporting FTP,
|
A free and easy-to-use client-side URL transfer library, supporting DICT,
|
||||||
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP and LDAPS.
|
FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
|
||||||
|
POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
|
||||||
|
|
||||||
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
|
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
|
||||||
kerberos, HTTP form based upload, proxies, cookies, user+password
|
kerberos, HTTP form based upload, proxies, cookies, user+password
|
||||||
authentication, file transfer resume, http proxy tunneling and more!
|
authentication, file transfer resume, http proxy tunneling and more!
|
||||||
@@ -141,9 +149,8 @@ FAQ
|
|||||||
|
|
||||||
A command line tool for getting or sending files using URL syntax.
|
A command line tool for getting or sending files using URL syntax.
|
||||||
|
|
||||||
Since curl uses libcurl, it supports a range of common Internet protocols,
|
Since curl uses libcurl, curl supports the same wide range of common
|
||||||
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS,
|
Internet protocols that libcurl does.
|
||||||
DICT, TELNET and FILE.
|
|
||||||
|
|
||||||
We pronounce curl and cURL with an initial k sound: [kurl].
|
We pronounce curl and cURL with an initial k sound: [kurl].
|
||||||
|
|
||||||
@@ -307,9 +314,9 @@ FAQ
|
|||||||
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 90 known named companies use curl in commercial environments and
|
More than a hundred known named companies use curl in commercial
|
||||||
products. More than 100 known named open source projects depend on
|
environments and products and more than a hundred known named open source
|
||||||
(lib)curl.
|
projects depend on (lib)curl.
|
||||||
|
|
||||||
In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
|
In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
|
||||||
estimated a user base of one million users or more.
|
estimated a user base of one million users or more.
|
||||||
@@ -319,6 +326,12 @@ FAQ
|
|||||||
based web servers. A guess is that a fair amount of these Linux
|
based web servers. A guess is that a fair amount of these Linux
|
||||||
installations have curl installed.
|
installations have curl installed.
|
||||||
|
|
||||||
|
The Debian project maintains statistics on packages installed by people
|
||||||
|
who have voluntarily run their package counting application. In mid-2010,
|
||||||
|
libcurl3 was installed on over 55000 such systems (62% of reporting systems)
|
||||||
|
and was one of the 320 most popular installed packages (out of about 107000
|
||||||
|
possible packages).
|
||||||
|
|
||||||
All this taken together, there is no doubt that there are millions of
|
All this taken together, there is no doubt that there are millions of
|
||||||
(lib)curl users.
|
(lib)curl users.
|
||||||
|
|
||||||
@@ -327,6 +340,7 @@ FAQ
|
|||||||
http://curl.haxx.se/libcurl/using/apps.html
|
http://curl.haxx.se/libcurl/using/apps.html
|
||||||
http://counter.li.org/estimates.php
|
http://counter.li.org/estimates.php
|
||||||
http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
|
http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
|
||||||
|
http://qa.debian.org/popcon.php?package=curl
|
||||||
|
|
||||||
1.11 Why don't you update ca-bundle.crt
|
1.11 Why don't you update ca-bundle.crt
|
||||||
|
|
||||||
@@ -357,6 +371,41 @@ FAQ
|
|||||||
IRC network irc.freenode.net. If you're polite and nice, chances are big
|
IRC network irc.freenode.net. If you're polite and nice, chances are big
|
||||||
that you can get -- or provide -- help instantly.
|
that you can get -- or provide -- help instantly.
|
||||||
|
|
||||||
|
1.13 curl's ECCN number?
|
||||||
|
|
||||||
|
The US government restricts exports of software that contains or uses
|
||||||
|
cryptography. When doing so, the Export Control Classification Number (ECCN)
|
||||||
|
is used to identify the level of export control etc.
|
||||||
|
|
||||||
|
ASF gives a good explanation at http://www.apache.org/dev/crypto.html
|
||||||
|
|
||||||
|
We believe curl's number might be ECCN 5D002, another possibility is
|
||||||
|
5D992. It seems necessary to write them, asking to confirm.
|
||||||
|
|
||||||
|
Comprehensible explanations of the meaning of such numbers and how to
|
||||||
|
obtain them (resp.) are here
|
||||||
|
|
||||||
|
http://www.bis.doc.gov/licensing/exportingbasics.htm
|
||||||
|
http://www.bis.doc.gov/licensing/do_i_needaneccn.html
|
||||||
|
|
||||||
|
An incomprehensible description of the two numbers above is here
|
||||||
|
http://www.access.gpo.gov/bis/ear/pdf/ccl5-pt2.pdf
|
||||||
|
|
||||||
|
1.14 How do I submit my patch?
|
||||||
|
|
||||||
|
When you have made a patch or a change of whatever sort, and want to submit
|
||||||
|
that to the project, there are a few different ways we prefer:
|
||||||
|
|
||||||
|
o send a patch to the curl-library mailing list. We're many subscribers
|
||||||
|
there and there are lots of people who can review patches, comment on them
|
||||||
|
and "receive" them properly.
|
||||||
|
|
||||||
|
o if your patch changes or fixes a bug, you can also opt to submit a bug
|
||||||
|
report in the bug tracker and attach your patch there. There are less
|
||||||
|
people involved there.
|
||||||
|
|
||||||
|
Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
|
||||||
|
|
||||||
|
|
||||||
2. Install Related Problems
|
2. Install Related Problems
|
||||||
|
|
||||||
@@ -399,10 +448,10 @@ FAQ
|
|||||||
|
|
||||||
2.2 Does curl work/build with other SSL libraries?
|
2.2 Does curl work/build with other SSL libraries?
|
||||||
|
|
||||||
Curl has been written to use OpenSSL, GnuTLS, yassl or NSS, although there
|
Curl has been written to use OpenSSL, GnuTLS, yassl, NSS, PolarSSL, axTLS or
|
||||||
should not be many problems using a different library. If anyone does "port"
|
qssl, although there should not be many problems using a different
|
||||||
curl to use a different SSL library, we are of course very interested in
|
library. If anyone does "port" curl to use a different SSL library, we are
|
||||||
getting the patch!
|
of course very interested in getting the patch!
|
||||||
|
|
||||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||||
|
|
||||||
@@ -423,9 +472,13 @@ FAQ
|
|||||||
3.1 curl: (1) SSL is disabled, https: not supported
|
3.1 curl: (1) SSL is disabled, https: not supported
|
||||||
|
|
||||||
If you get this output when trying to get anything from a https:// server,
|
If you get this output when trying to get anything from a https:// server,
|
||||||
it means that the configure script couldn't find all libs and include files
|
it means that the instance of curl/libcurl that you're using was built
|
||||||
it requires for SSL to work. If the configure script fails to find them,
|
without support for this protocol.
|
||||||
curl is simply built without SSL support.
|
|
||||||
|
This could've happened if the configure script that was run at build time
|
||||||
|
couldn't find all libs and include files curl requires for SSL to work. If
|
||||||
|
the configure script fails to find them, curl is simply built without SSL
|
||||||
|
support.
|
||||||
|
|
||||||
To get the https:// support into a curl that was previously built but that
|
To get the https:// support into a curl that was previously built but that
|
||||||
reports that https:// is not supported, you should dig through the document
|
reports that https:// is not supported, you should dig through the document
|
||||||
@@ -438,7 +491,6 @@ FAQ
|
|||||||
3.2 How do I tell curl to resume a transfer?
|
3.2 How do I tell curl to resume a transfer?
|
||||||
|
|
||||||
Curl supports resumed transfers both ways on both FTP and HTTP.
|
Curl supports resumed transfers both ways on both FTP and HTTP.
|
||||||
|
|
||||||
Try the -C option.
|
Try the -C option.
|
||||||
|
|
||||||
3.3 Why doesn't my posting using -F work?
|
3.3 Why doesn't my posting using -F work?
|
||||||
@@ -464,11 +516,11 @@ FAQ
|
|||||||
FTP commands without transferring anything. Therefore you must always specify
|
FTP commands without transferring anything. Therefore you must always specify
|
||||||
a URL to transfer to/from even when doing custom FTP commands.
|
a URL to transfer to/from even when doing custom FTP commands.
|
||||||
|
|
||||||
3.5 How can I disable the Pragma: nocache header?
|
3.5 How can I disable the Accept: */* header?
|
||||||
|
|
||||||
You can change all internally generated headers by adding a replacement with
|
You can change all internally generated headers by adding a replacement with
|
||||||
the -H/--header option. By adding a header with empty contents you safely
|
the -H/--header option. By adding a header with empty contents you safely
|
||||||
disable that one. Use -H "Pragma:" to disable that specific header.
|
disable that one. Use -H "Accept:" to disable that specific header.
|
||||||
|
|
||||||
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
|
3.6 Does curl support ASP, XML, XHTML or HTML version Y?
|
||||||
|
|
||||||
@@ -512,6 +564,12 @@ FAQ
|
|||||||
install and use them, in the libcurl section of the curl web site:
|
install and use them, in the libcurl section of the curl web site:
|
||||||
http://curl.haxx.se/libcurl/
|
http://curl.haxx.se/libcurl/
|
||||||
|
|
||||||
|
All the various bindings to libcurl are made by other projects and people,
|
||||||
|
outside of the cURL project. The cURL project itself only produces libcurl
|
||||||
|
with its plain C API. If you don't find anywhere else to ask you can ask
|
||||||
|
about bindings on the curl-library list too, but be prepared that people on
|
||||||
|
that list may not know anything about bindings.
|
||||||
|
|
||||||
In October 2009, there were interfaces available for the following
|
In October 2009, there were interfaces available for the following
|
||||||
languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
|
languages: Ada95, Basic, C, C++, Ch, Cocoa, D, Dylan, Eiffel, Euphoria,
|
||||||
Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
|
Ferite, Gambas, glib/GTK+, Haskell, ILE/RPG, Java, Lisp, Lua, Mono, .NET,
|
||||||
@@ -614,6 +672,9 @@ FAQ
|
|||||||
provide this in order to prove that you actually are who you claim to be.
|
provide this in order to prove that you actually are who you claim to be.
|
||||||
If the server doesn't require this, you don't need a client certificate.
|
If the server doesn't require this, you don't need a client certificate.
|
||||||
|
|
||||||
|
A client certificate is always used together with a private key, and the
|
||||||
|
private key has a pass phrase that protects it.
|
||||||
|
|
||||||
- Server certificate. The server you communicate with has a server
|
- Server certificate. The server you communicate with has a server
|
||||||
certificate. You can and should verify this certificate to make sure that
|
certificate. You can and should verify this certificate to make sure that
|
||||||
you are truly talking to the real server and not a server impersonating
|
you are truly talking to the real server and not a server impersonating
|
||||||
@@ -621,8 +682,9 @@ FAQ
|
|||||||
|
|
||||||
- Certificate Authority certificate ("CA cert"). You often have several CA
|
- Certificate Authority certificate ("CA cert"). You often have several CA
|
||||||
certs in a CA cert bundle that can be used to verify a server certificate
|
certs in a CA cert bundle that can be used to verify a server certificate
|
||||||
that was signed by one of the authorities in the bundle. curl comes with a
|
that was signed by one of the authorities in the bundle. curl does not
|
||||||
default CA cert bundle. You can override the default.
|
come with a CA cert bundle but most curl installs provide one. You can
|
||||||
|
also override the default.
|
||||||
|
|
||||||
The server certificate verification process is made by using a Certificate
|
The server certificate verification process is made by using a Certificate
|
||||||
Authority certificate ("CA cert") that was used to sign the server
|
Authority certificate ("CA cert") that was used to sign the server
|
||||||
@@ -653,6 +715,46 @@ FAQ
|
|||||||
|
|
||||||
But you could easily write your own program using libcurl to do such stunts.
|
But you could easily write your own program using libcurl to do such stunts.
|
||||||
|
|
||||||
|
3.19 How do I get HTTP from a host using a specific IP address?
|
||||||
|
|
||||||
|
For example, you may be trying out a web site installation that isn't yet in
|
||||||
|
the DNS. Or you have a site using multiple IP addresses for a given host
|
||||||
|
name and you want to address a specific one out of the set.
|
||||||
|
|
||||||
|
Set a custom Host: header that identifies the server name you want to reach
|
||||||
|
but use the target IP address in the URL:
|
||||||
|
|
||||||
|
curl --header "Host: www.example.com" http://127.0.0.1/
|
||||||
|
|
||||||
|
3.20 How to SFTP from my user's home directory?
|
||||||
|
|
||||||
|
Contrary to how FTP works, SFTP and SCP URLs specify the exact directory to
|
||||||
|
work with. It means that if you don't specify that you want the user's home
|
||||||
|
directory, you get the actual root directory.
|
||||||
|
|
||||||
|
To specify a file in your user's home directory, you need to use the correct
|
||||||
|
URL syntax which for sftp might look similar to:
|
||||||
|
|
||||||
|
curl -O -u user:password sftp://example.com/~/file.txt
|
||||||
|
|
||||||
|
and for SCP it is just a different protocol prefix:
|
||||||
|
|
||||||
|
curl -O -u user:password scp://example.com/~/file.txt
|
||||||
|
|
||||||
|
3.21 Protocol xxx not supported or disabled in libcurl
|
||||||
|
|
||||||
|
When passing on a URL to curl to use, it may respond that the particular
|
||||||
|
protocol is not supported or disabled. The particular way this error message
|
||||||
|
is phrased is because curl doesn't make a distinction internally of whether
|
||||||
|
a particular protocol is not supported (ie never got any code added that
|
||||||
|
knows how to speak that protocol) or if it was explicitly disabled. curl can
|
||||||
|
be built to only support a given set of protocols, and the rest would then
|
||||||
|
be disabled or not supported.
|
||||||
|
|
||||||
|
Note that this error will also occur if you pass a wrongly spelled protocol
|
||||||
|
part as in "htpt://example.com" or as in the less evident case if you prefix
|
||||||
|
the protocol part with a space as in " http://example.com/".
|
||||||
|
|
||||||
|
|
||||||
4. Running Problems
|
4. Running Problems
|
||||||
|
|
||||||
@@ -801,10 +903,8 @@ 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
|
NTLM support requires OpenSSL, GnuTLS, NSS or Microsoft Windows libraries at
|
||||||
of this magic. Later versions require the OpenSSL, GnuTLS or Microsoft
|
build-time to provide this functionality.
|
||||||
Windows libraries to provide this functionality. Using the NSS library
|
|
||||||
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.
|
||||||
@@ -944,6 +1044,31 @@ FAQ
|
|||||||
|
|
||||||
In either case, cURL should now be looking for the correct file.
|
In either case, cURL should now be looking for the correct file.
|
||||||
|
|
||||||
|
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||||
|
|
||||||
|
Unplugging the cable is not an error situation. The TCP/IP protocol stack
|
||||||
|
was designed to be fault tolerant, so even though there may be a physical
|
||||||
|
break somewhere the connection shouldn't be affected, just possibly
|
||||||
|
delayed. Eventually, the physical break will be fixed or the data will be
|
||||||
|
re-routed around the physical problem.
|
||||||
|
|
||||||
|
In such cases, the TCP/IP stack is responsible for detecting when the
|
||||||
|
network connection is irrevocably lost. Since with some protocols it is
|
||||||
|
perfectly legal for the client wait indefinitely for data, the stack may
|
||||||
|
never report a problem, and even when it does, it can take up to 20 minutes
|
||||||
|
for it to detect an issue. The curl option --keepalive-time enables
|
||||||
|
keep-alive support in the TCP/IP stack which makes it periodically probe the
|
||||||
|
connection to make sure it is still available to send data. That should
|
||||||
|
reliably detect any TCP/IP network failure.
|
||||||
|
|
||||||
|
But even that won't detect the network going down before the TCP/IP
|
||||||
|
connection is established (e.g. during a DNS lookup) or using protocols that
|
||||||
|
don't use TCP. To handle those situations, curl offers a number of timeouts
|
||||||
|
on its own. --speed-limit/--speed-time will abort if the data transfer rate
|
||||||
|
falls too low, and --connect-timeout and --max-time can be used to put an
|
||||||
|
overall timeout on the connection phase or the entire transfer.
|
||||||
|
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
|
|
||||||
5.1 Is libcurl thread-safe?
|
5.1 Is libcurl thread-safe?
|
||||||
@@ -1032,6 +1157,11 @@ FAQ
|
|||||||
libcurl will reuse connections for all transfers that are made using the
|
libcurl will reuse connections for all transfers that are made using the
|
||||||
same libcurl handle.
|
same libcurl handle.
|
||||||
|
|
||||||
|
When you use the easy interface, the connection cache is kept within the
|
||||||
|
easy handle. If you instead use the multi interface, the connection cache
|
||||||
|
will be kept within the multi handle and will be shared among all the easy
|
||||||
|
handles that are used within the same multi handle.
|
||||||
|
|
||||||
5.7 Link errors when building libcurl on Windows!
|
5.7 Link errors when building libcurl on Windows!
|
||||||
|
|
||||||
You need to make sure that your project, and all the libraries (both static
|
You need to make sure that your project, and all the libraries (both static
|
||||||
@@ -1044,27 +1174,30 @@ FAQ
|
|||||||
|
|
||||||
When building an application that uses the static libcurl library, you must
|
When building an application that uses the static libcurl library, you must
|
||||||
add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for
|
add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for
|
||||||
dynamic import symbols. If you get linker error like "unknown symbol
|
dynamic import symbols. If you're using Visual Studio, you need to instead
|
||||||
__imp__curl_easy_init ..." you have linked against the wrong (static)
|
add CURL_STATICLIB in the "Preprocessor Definitions" section.
|
||||||
library. If you want to use the libcurl.dll and import lib, you don't need
|
|
||||||
any extra CFLAGS, but use one of the import libraries below. These are the
|
|
||||||
libraries produced by the various lib/Makefile.* files:
|
|
||||||
|
|
||||||
Target: static lib. import lib for libcurl*.dll.
|
If you get linker error like "unknown symbol __imp__curl_easy_init ..." you
|
||||||
-----------------------------------------------------------
|
have linked against the wrong (static) library. If you want to use the
|
||||||
MingW: libcurl.a libcurldll.a
|
libcurl.dll and import lib, you don't need any extra CFLAGS, but use one of
|
||||||
MSVC (release): libcurl.lib libcurl_imp.lib
|
the import libraries below. These are the libraries produced by the various
|
||||||
MSVC (debug): libcurld.lib libcurld_imp.lib
|
lib/Makefile.* files:
|
||||||
Borland: libcurl.lib libcurl_imp.lib
|
|
||||||
|
|
||||||
|
Target: static lib. import lib for libcurl*.dll.
|
||||||
|
-----------------------------------------------------------
|
||||||
|
MingW: libcurl.a libcurldll.a
|
||||||
|
MSVC (release): libcurl.lib libcurl_imp.lib
|
||||||
|
MSVC (debug): libcurld.lib libcurld_imp.lib
|
||||||
|
Borland: libcurl.lib libcurl_imp.lib
|
||||||
|
|
||||||
5.8 libcurl.so.3: open failed: No such file or directory
|
5.8 libcurl.so.X: open failed: No such file or directory
|
||||||
|
|
||||||
This is an error message you might get when you try to run a program linked
|
This is an error message you might get when you try to run a program linked
|
||||||
with a shared version of libcurl and your run-time linker (ld.so) couldn't
|
with a shared version of libcurl and your run-time linker (ld.so) couldn't
|
||||||
find the shared library named libcurl.so.3.
|
find the shared library named libcurl.so.X. (Where X is the number of the
|
||||||
|
current libcurl ABI, typically 3 or 4).
|
||||||
|
|
||||||
You need to make sure that ld.so finds libcurl.so.3. You can do that
|
You need to make sure that ld.so finds libcurl.so.X. You can do that
|
||||||
multiple ways, and it differs somewhat between different operating systems,
|
multiple ways, and it differs somewhat between different operating systems,
|
||||||
but they are usually:
|
but they are usually:
|
||||||
|
|
||||||
@@ -1089,21 +1222,20 @@ FAQ
|
|||||||
- The non-ipv6 resolver that can use one out of four host name resolve calls
|
- The non-ipv6 resolver that can use one out of four host name resolve calls
|
||||||
(depending on what your system supports):
|
(depending on what your system supports):
|
||||||
|
|
||||||
A - gethostbyname()
|
A - gethostbyname()
|
||||||
B - gethostbyname_r() with 3 arguments
|
B - gethostbyname_r() with 3 arguments
|
||||||
C - gethostbyname_r() with 5 arguments
|
C - gethostbyname_r() with 5 arguments
|
||||||
D - gethostbyname_r() with 6 arguments
|
D - gethostbyname_r() with 6 arguments
|
||||||
|
|
||||||
- The ipv6-resolver that uses getaddrinfo()
|
- The ipv6-resolver that uses getaddrinfo()
|
||||||
|
|
||||||
- The c-ares based name resolver that uses the c-ares library for resolves.
|
- The c-ares based name resolver that uses the c-ares library for resolves.
|
||||||
Using this offers asynchronous name resolves but it currently has no IPv6
|
Using this offers asynchronous name resolves.
|
||||||
support.
|
|
||||||
|
|
||||||
- The Windows threaded resolver. It use:
|
- The threaded resolver (default option on Windows). It uses:
|
||||||
|
|
||||||
A - gethostbyname() on plain ipv4 windows hosts
|
A - gethostbyname() on plain ipv4 hosts
|
||||||
B - getaddrinfo() on ipv6-enabled windows hosts
|
B - getaddrinfo() on ipv6-enabled hosts
|
||||||
|
|
||||||
Also note that libcurl never resolves or reverse-lookups addresses given as
|
Also note that libcurl never resolves or reverse-lookups addresses given as
|
||||||
pure numbers, such as 127.0.0.1 or ::1.
|
pure numbers, such as 127.0.0.1 or ::1.
|
||||||
@@ -1135,16 +1267,17 @@ FAQ
|
|||||||
|
|
||||||
5.13 How do I stop an ongoing transfer?
|
5.13 How do I stop an ongoing transfer?
|
||||||
|
|
||||||
There are several ways, but none of them are instant. There is no function
|
With the easy interface you make sure to return the correct error code from
|
||||||
you can call from another thread or similar that will stop it immediately.
|
one of the callbacks, but none of them are instant. There is no function you
|
||||||
Instead you need to make sure that one of the callbacks you use return an
|
can call from another thread or similar that will stop it immediately.
|
||||||
appropriate value that will stop the transfer.
|
Instead, you need to make sure that one of the callbacks you use returns an
|
||||||
|
appropriate value that will stop the transfer. Suitable callbacks that you
|
||||||
|
can do this with include the progress callback, the read callback and the
|
||||||
|
write callback.
|
||||||
|
|
||||||
Suitable callbacks that you can do this with include the progress callback,
|
If you're using the multi interface, you can also stop a transfer by
|
||||||
the read callback and the write callback.
|
removing the particular easy handle from the multi stack at any moment you
|
||||||
|
think the transfer is done.
|
||||||
If you're using the multi interface, you also stop a transfer by removing
|
|
||||||
the particular easy handle from the multi stack.
|
|
||||||
|
|
||||||
5.14 Using C++ non-static functions for callbacks?
|
5.14 Using C++ non-static functions for callbacks?
|
||||||
|
|
||||||
@@ -1154,14 +1287,14 @@ FAQ
|
|||||||
member function that is passed a pointer to the class:
|
member function that is passed a pointer to the class:
|
||||||
|
|
||||||
// f is the pointer to your object.
|
// f is the pointer to your object.
|
||||||
static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f)
|
static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
|
||||||
{
|
{
|
||||||
// Call non-static member function.
|
// Call non-static member function.
|
||||||
static_cast<YourClass*>(f)->nonStaticFunction();
|
static_cast<YourClass*>(f)->nonStaticFunction();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is how you pass pointer to the static function:
|
// This is how you pass pointer to the static function:
|
||||||
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
|
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
|
||||||
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
||||||
|
|
||||||
5.15 How do I get an FTP directory listing?
|
5.15 How do I get an FTP directory listing?
|
||||||
@@ -1182,7 +1315,9 @@ FAQ
|
|||||||
to do "LIST -a" or similar to see them.
|
to do "LIST -a" or similar to see them.
|
||||||
|
|
||||||
The application thus needs to parse the LIST output. One such existing
|
The application thus needs to parse the LIST output. One such existing
|
||||||
list parser is available at http://cr.yp.to/ftpparse.html
|
list parser is available at http://cr.yp.to/ftpparse.html Versions of
|
||||||
|
libcurl since 7.21.0 also provide the ability to specify a wildcard to
|
||||||
|
download multiple files from one FTP directory.
|
||||||
|
|
||||||
|
|
||||||
6. License Issues
|
6. License Issues
|
||||||
@@ -1193,7 +1328,10 @@ FAQ
|
|||||||
this section was much enhanced by Bjorn Reese.)
|
this section was much enhanced by Bjorn Reese.)
|
||||||
|
|
||||||
We are not lawyers and this is not legal advice. You should probably consult
|
We are not lawyers and this is not legal advice. You should probably consult
|
||||||
one if you want true and accurate legal insights without our prejudice.
|
one if you want true and accurate legal insights without our prejudice. Note
|
||||||
|
especially that this section concerns the libcurl license only; compiling in
|
||||||
|
features of libcurl that depend on other libraries (e.g. OpenSSL) may affect
|
||||||
|
the licensing obligations of your application.
|
||||||
|
|
||||||
6.1 I have a GPL program, can I use the libcurl library?
|
6.1 I have a GPL program, can I use the libcurl library?
|
||||||
|
|
||||||
@@ -1251,12 +1389,16 @@ FAQ
|
|||||||
You do not have to reveal or make public any changes to the libcurl source
|
You do not have to reveal or make public any changes to the libcurl source
|
||||||
code.
|
code.
|
||||||
|
|
||||||
You do not have to reveal or make public that you are using libcurl within
|
You do not have to broadcast to the world that you are using libcurl within
|
||||||
your app.
|
your app.
|
||||||
|
|
||||||
As can be seen here: http://curl.haxx.se/docs/companies.html and
|
All we ask is that you disclose "the copyright notice and this permission
|
||||||
elsewhere, more and more companies are discovering the power
|
notice" somewhere. Most probably like in the documentation or in the section
|
||||||
of libcurl and take advantage of it even in commercial environments.
|
where other third party dependencies already are mentioned and acknowledged.
|
||||||
|
|
||||||
|
As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
|
||||||
|
more and more companies are discovering the power of libcurl and take
|
||||||
|
advantage of it even in commercial environments.
|
||||||
|
|
||||||
|
|
||||||
7. PHP/CURL Issues
|
7. PHP/CURL Issues
|
||||||
@@ -1272,7 +1414,7 @@ FAQ
|
|||||||
CURL (often using all caps) or sometimes ext/curl, but both cause much
|
CURL (often using all caps) or sometimes ext/curl, but both cause much
|
||||||
confusion to users which in 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 wrote 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
|
||||||
|
@@ -43,7 +43,7 @@ HTTP
|
|||||||
- POST
|
- POST
|
||||||
- Pipelining
|
- Pipelining
|
||||||
- multipart formpost (RFC1867-style)
|
- multipart formpost (RFC1867-style)
|
||||||
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
|
- authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
|
||||||
SPNEGO (*4) to server and proxy
|
SPNEGO (*4) to server and proxy
|
||||||
- resume (both GET and PUT)
|
- resume (both GET and PUT)
|
||||||
- follow redirects
|
- follow redirects
|
||||||
@@ -125,7 +125,7 @@ FILE
|
|||||||
FOOTNOTES
|
FOOTNOTES
|
||||||
=========
|
=========
|
||||||
|
|
||||||
*1 = requires OpenSSL, GnuTLS, NSS or yassl
|
*1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS or PolarSSL
|
||||||
*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
|
||||||
@@ -133,3 +133,4 @@ FOOTNOTES
|
|||||||
*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
|
*8 = requires libssh2
|
||||||
|
*9 = requires OpenSSL, GnuTLS, NSS or yassl
|
||||||
|
58
docs/HISTORY
58
docs/HISTORY
@@ -157,6 +157,20 @@ September 2005:
|
|||||||
|
|
||||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||||
|
|
||||||
|
December 2005:
|
||||||
|
|
||||||
|
security vulnerability: libcurl URL Buffer Overflow
|
||||||
|
|
||||||
|
January 2006:
|
||||||
|
|
||||||
|
We dropped support for Gopher. We found bugs in the implementation that
|
||||||
|
turned out having been introduced years ago, so with the conclusion that
|
||||||
|
nobody had found out in all this time we removed it instead of fixing it.
|
||||||
|
|
||||||
|
March 2006:
|
||||||
|
|
||||||
|
security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||||
|
|
||||||
April 2006:
|
April 2006:
|
||||||
|
|
||||||
Added the multi_socket() API
|
Added the multi_socket() API
|
||||||
@@ -174,6 +188,10 @@ February 2007:
|
|||||||
|
|
||||||
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
July 2007:
|
||||||
|
|
||||||
|
security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||||
|
|
||||||
November 2008:
|
November 2008:
|
||||||
|
|
||||||
Command line options: 128
|
Command line options: 128
|
||||||
@@ -184,3 +202,43 @@ November 2008:
|
|||||||
|
|
||||||
145,000 unique visitors. >100 GB downloaded.
|
145,000 unique visitors. >100 GB downloaded.
|
||||||
|
|
||||||
|
March 2009:
|
||||||
|
|
||||||
|
security vulnerability: libcurl Arbitrary File Access
|
||||||
|
|
||||||
|
August 2009:
|
||||||
|
|
||||||
|
security vulnerability: libcurl embedded zero in cert name
|
||||||
|
|
||||||
|
December 2009:
|
||||||
|
|
||||||
|
Added support for IMAP, POP3 and SMTP
|
||||||
|
|
||||||
|
January 2010:
|
||||||
|
|
||||||
|
Added support for RTSP
|
||||||
|
|
||||||
|
February 2010:
|
||||||
|
|
||||||
|
security vulnerability: libcurl data callback excessive length
|
||||||
|
|
||||||
|
March 2010:
|
||||||
|
|
||||||
|
The project switched over to use git instead of CVS for source code control
|
||||||
|
|
||||||
|
May 2010:
|
||||||
|
|
||||||
|
Added support for RTMP
|
||||||
|
|
||||||
|
Added support for PolarSSL to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
August 2010:
|
||||||
|
|
||||||
|
Public curl releases: 117
|
||||||
|
Command line options: 138
|
||||||
|
curl_easy_setopt() options: 180
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 39
|
||||||
|
Contributors: 808
|
||||||
|
|
||||||
|
Gopher support added (re-added actually)
|
||||||
|
115
docs/INSTALL
115
docs/INSTALL
@@ -14,6 +14,12 @@ Installing Binary Packages
|
|||||||
binary package. This document describes how to compile, build and install
|
binary package. This document describes how to compile, build and install
|
||||||
curl and libcurl from source code.
|
curl and libcurl from source code.
|
||||||
|
|
||||||
|
Building from git
|
||||||
|
=================
|
||||||
|
|
||||||
|
If you get your code off a git repository, see the GIT-INFO file in the
|
||||||
|
root directory for specific instructions on how to proceed.
|
||||||
|
|
||||||
UNIX
|
UNIX
|
||||||
====
|
====
|
||||||
A normal unix installation is made in three or four steps (after you've
|
A normal unix installation is made in three or four steps (after you've
|
||||||
@@ -139,6 +145,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 build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
|
||||||
|
you need to use both --without-ssl and --with-polarssl.
|
||||||
|
|
||||||
|
To build with axTLS support instead of OpenSSL for TLS, note that you
|
||||||
|
need to use both --without-ssl and --with-axtls.
|
||||||
|
|
||||||
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||||
Heimdal Kerberos 5 packages installed.
|
Heimdal Kerberos 5 packages installed.
|
||||||
|
|
||||||
@@ -205,9 +217,9 @@ Win32
|
|||||||
adjust as necessary. It is also possible to override these paths with
|
adjust as necessary. It is also possible to override these paths with
|
||||||
environment variables, for example:
|
environment variables, for example:
|
||||||
|
|
||||||
set ZLIB_PATH=c:\zlib-1.2.3
|
set ZLIB_PATH=c:\zlib-1.2.5
|
||||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
set OPENSSL_PATH=c:\openssl-0.9.8r
|
||||||
set LIBSSH2_PATH=c:\libssh2-1.1
|
set LIBSSH2_PATH=c:\libssh2-1.2.8
|
||||||
|
|
||||||
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
|
||||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||||
@@ -226,7 +238,7 @@ Win32
|
|||||||
|
|
||||||
If you want to enable LDAPS support then set LDAPS=1.
|
If you want to enable LDAPS support then set LDAPS=1.
|
||||||
|
|
||||||
- optional MingW32-built OpenlDAP SDK available from:
|
- optional MingW32-built OpenLDAP SDK available from:
|
||||||
http://www.gknw.net/mirror/openldap/
|
http://www.gknw.net/mirror/openldap/
|
||||||
- optional recent Novell CLDAP SDK available from:
|
- optional recent Novell CLDAP SDK available from:
|
||||||
http://developer.novell.com/ndk/cldap.htm
|
http://developer.novell.com/ndk/cldap.htm
|
||||||
@@ -308,7 +320,7 @@ Win32
|
|||||||
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
||||||
variable to the location of zlib.h and zlib.lib, for example:
|
variable to the location of zlib.h and zlib.lib, for example:
|
||||||
|
|
||||||
set ZLIB_PATH=c:\zlib-1.2.3
|
set ZLIB_PATH=c:\zlib-1.2.5
|
||||||
|
|
||||||
Then run 'nmake vc-zlib' in curl's root directory.
|
Then run 'nmake vc-zlib' in curl's root directory.
|
||||||
|
|
||||||
@@ -322,7 +334,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.8k
|
set OPENSSL_PATH=c:\openssl-0.9.8q
|
||||||
|
|
||||||
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
|
||||||
@@ -371,30 +383,49 @@ Win32
|
|||||||
Borland C++ compiler
|
Borland C++ compiler
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
compile openssl
|
Ensure that your build environment is properly set up to use the compiler
|
||||||
|
and associated tools. PATH environment variable must include the path to
|
||||||
|
bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
|
||||||
|
|
||||||
Make sure you include the paths to curl/include and openssl/inc32 in
|
It is advisable to set environment variable BCCDIR to the base path of
|
||||||
your bcc32.cnf file
|
the compiler installation.
|
||||||
|
|
||||||
eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
|
set BCCDIR=c:\Borland\BCC55
|
||||||
|
|
||||||
Check to make sure that all of the sources listed in lib/Makefile.b32
|
In order to build a plain vanilla version of curl and libcurl run the
|
||||||
are present in the /path_to_curl/lib directory. (Check the src
|
following command from curl's root directory:
|
||||||
directory for missing ones.)
|
|
||||||
|
|
||||||
Make sure the environment variable "BCCDIR" is set to the install
|
make borland
|
||||||
location for the compiler eg : c:\Borland\BCC55
|
|
||||||
|
|
||||||
command line:
|
To build curl and libcurl with zlib and OpenSSL support set environment
|
||||||
make -f /path_to_curl/lib/Makefile-ssl.b32
|
variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
|
||||||
|
already built zlib and OpenSSL libraries and from curl's root directory
|
||||||
|
run command:
|
||||||
|
|
||||||
compile simplessl.c with appropriate links
|
make borland-ssl-zlib
|
||||||
|
|
||||||
|
libcurl library will be built in 'lib' subdirectory while curl tool
|
||||||
|
is built in 'src' subdirectory. In order to use libcurl library it is
|
||||||
|
advisable to modify compiler's configuration file bcc32.cfg located
|
||||||
|
in c:\Borland\BCC55\bin to reflect the location of libraries include
|
||||||
|
paths for example the '-I' line could result in something like:
|
||||||
|
|
||||||
|
-I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
|
||||||
|
|
||||||
|
bcc3.cfg '-L' line could also be modified to reflect the location of
|
||||||
|
of libcurl library resulting for example:
|
||||||
|
|
||||||
|
-L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
|
||||||
|
|
||||||
|
In order to build sample program 'simple.c' from the docs\examples
|
||||||
|
subdirectory run following command from mentioned subdirectory:
|
||||||
|
|
||||||
|
bcc32 simple.c libcurl.lib cw32mt.lib
|
||||||
|
|
||||||
|
In order to build sample program simplessl.c an SSL enabled libcurl
|
||||||
|
is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
|
||||||
|
libraries.
|
||||||
|
|
||||||
c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
|
|
||||||
-L c:\borland\bcc55\lib\psdk\ws2_32.lib
|
|
||||||
-L c:\openssl\out32\libeay32.lib
|
|
||||||
-L c:\openssl\out32\ssleay32.lib
|
|
||||||
simplessl.c
|
|
||||||
|
|
||||||
OTHER MSVC IDEs
|
OTHER MSVC IDEs
|
||||||
---------------
|
---------------
|
||||||
@@ -635,7 +666,7 @@ NetWare
|
|||||||
Builds automatically created 8 times a day from current git are here:
|
Builds automatically created 8 times a day from current git are here:
|
||||||
http://www.gknw.net/mirror/curl/autobuilds/
|
http://www.gknw.net/mirror/curl/autobuilds/
|
||||||
the status of these builds can be viewed at the autobuild table:
|
the status of these builds can be viewed at the autobuild table:
|
||||||
http://curl.haxx.se/auto/
|
http://curl.haxx.se/dev/builds.html
|
||||||
|
|
||||||
|
|
||||||
eCos
|
eCos
|
||||||
@@ -779,6 +810,11 @@ VxWorks
|
|||||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||||
|
|
||||||
|
|
||||||
|
Android
|
||||||
|
=======
|
||||||
|
See the build notes in the Android.mk file.
|
||||||
|
|
||||||
|
|
||||||
CROSS COMPILE
|
CROSS COMPILE
|
||||||
=============
|
=============
|
||||||
(This section was graciously brought to us by Jim Duey, with additions by
|
(This section was graciously brought to us by Jim Duey, with additions by
|
||||||
@@ -874,9 +910,9 @@ REDUCING SIZE
|
|||||||
.comment section).
|
.comment section).
|
||||||
|
|
||||||
Using these techniques it is possible to create a basic HTTP-only shared
|
Using these techniques it is possible to create a basic HTTP-only shared
|
||||||
libcurl library for i386 Linux platforms that is only 98 KiB in size, and
|
libcurl library for i386 Linux platforms that is only 101 KiB in size, and
|
||||||
an FTP-only library that is 94 KiB in size (as of libcurl version 7.20.0,
|
an FTP-only library that is 105 KiB in size (as of libcurl version 7.21.5,
|
||||||
using gcc 4.3.3).
|
using gcc 4.4.3).
|
||||||
|
|
||||||
You may find that statically linking libcurl to your application will
|
You may find that statically linking libcurl to your application will
|
||||||
result in a lower total size than dynamically linking.
|
result in a lower total size than dynamically linking.
|
||||||
@@ -908,7 +944,7 @@ PORTS
|
|||||||
- Alpha OpenVMS V7.1-1H2
|
- Alpha OpenVMS V7.1-1H2
|
||||||
- Alpha Tru64 v5.0 5.1
|
- Alpha Tru64 v5.0 5.1
|
||||||
- AVR32 Linux
|
- AVR32 Linux
|
||||||
- ARM Android 1.5
|
- ARM Android 1.5, 2.1
|
||||||
- ARM INTEGRITY
|
- ARM INTEGRITY
|
||||||
- ARM iPhone OS
|
- ARM iPhone OS
|
||||||
- Cell Linux
|
- Cell Linux
|
||||||
@@ -972,10 +1008,21 @@ PORTS
|
|||||||
Useful URLs
|
Useful URLs
|
||||||
===========
|
===========
|
||||||
|
|
||||||
OpenSSL http://www.openssl.org
|
axTLS http://axtls.sourceforge.net/
|
||||||
MingW http://www.mingw.org
|
c-ares http://c-ares.haxx.se/
|
||||||
OpenLDAP http://www.openldap.org
|
GNU GSS http://www.gnu.org/software/gss/
|
||||||
Zlib http://www.gzip.org/zlib/
|
GnuTLS http://www.gnu.org/software/gnutls/
|
||||||
libssh2 http://www.libssh2.org
|
Heimdal http://www.pdc.kth.se/heimdal/
|
||||||
|
libidn http://www.gnu.org/software/libidn/
|
||||||
|
libssh2 http://www.libssh2.org/
|
||||||
|
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||||
|
NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||||
|
OpenLDAP http://www.openldap.org/
|
||||||
|
OpenSSL http://www.openssl.org/
|
||||||
|
PolarSSL http://polarssl.org/
|
||||||
|
yassl http://www.yassl.com/
|
||||||
|
Zlib http://www.zlib.net/
|
||||||
|
|
||||||
|
MingW http://www.mingw.org/
|
||||||
|
MinGW-w64 http://mingw-w64.sourceforge.net/
|
||||||
|
OpenWatcom http://www.openwatcom.org/
|
||||||
|
@@ -18,6 +18,17 @@ Building with CMake
|
|||||||
CMake builds can be configured either from the command line, or from one
|
CMake builds can be configured either from the command line, or from one
|
||||||
of CMake's GUI's.
|
of CMake's GUI's.
|
||||||
|
|
||||||
|
Important notice
|
||||||
|
==================
|
||||||
|
If you got your curl sources from a distribution tarball, make sure to
|
||||||
|
delete the generic 'include/curl/curlbuild.h' file that comes with it:
|
||||||
|
rm -f curl/include/curl/curlbuild.h
|
||||||
|
|
||||||
|
The purpose of this file is to provide reasonable definitions for systems
|
||||||
|
where autoconfiguration is not available. CMake will create its own
|
||||||
|
version of this file in its build directory. If the "generic" version
|
||||||
|
is not deleted, weird build errors may occur on some systems.
|
||||||
|
|
||||||
Command Line CMake
|
Command Line CMake
|
||||||
==================
|
==================
|
||||||
A command line build of Curl is similar to the autotools build of Curl. It
|
A command line build of Curl is similar to the autotools build of Curl. It
|
||||||
@@ -32,9 +43,10 @@ Command Line CMake
|
|||||||
# variable prior to running CMake.
|
# variable prior to running CMake.
|
||||||
cmake ../curl
|
cmake ../curl
|
||||||
make
|
make
|
||||||
# currently make test and make install are not implemented
|
# currently make test is not implemented
|
||||||
#make test
|
#make test
|
||||||
#make install
|
# Install to default location:
|
||||||
|
make install
|
||||||
|
|
||||||
ccmake
|
ccmake
|
||||||
=========
|
=========
|
||||||
|
@@ -15,7 +15,7 @@ INTERNALS
|
|||||||
GIT
|
GIT
|
||||||
===
|
===
|
||||||
All changes to the sources are committed to the git repository as soon as
|
All changes to the sources are committed to the git repository as soon as
|
||||||
they're somewhat verified to work. Changes shall be commited as independently
|
they're somewhat verified to work. Changes shall be committed as independently
|
||||||
as possible so that individual changes can be easier spotted and tracked
|
as possible so that individual changes can be easier spotted and tracked
|
||||||
afterwards.
|
afterwards.
|
||||||
|
|
||||||
@@ -37,13 +37,14 @@ Portability
|
|||||||
GnuTLS 1.2
|
GnuTLS 1.2
|
||||||
zlib 1.1.4
|
zlib 1.1.4
|
||||||
libssh2 0.16
|
libssh2 0.16
|
||||||
c-ares 1.5.0
|
c-ares 1.6.0
|
||||||
libidn 0.4.1
|
libidn 0.4.1
|
||||||
*yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
|
cyassl 1.4.0
|
||||||
openldap 2.0
|
openldap 2.0
|
||||||
MIT krb5 lib 1.2.4
|
MIT krb5 lib 1.2.4
|
||||||
qsossl V5R2M0
|
qsossl V5R2M0
|
||||||
NSS 3.11.x
|
NSS 3.11.x
|
||||||
|
axTLS 1.2.7
|
||||||
Heimdal ?
|
Heimdal ?
|
||||||
|
|
||||||
* = only partly functional, but that's due to bugs in the third party lib, not
|
* = only partly functional, but that's due to bugs in the third party lib, not
|
||||||
@@ -90,7 +91,7 @@ Windows vs Unix
|
|||||||
do it etc there might be reasons for applications to alter that behaviour.
|
do it etc there might be reasons for applications to alter that behaviour.
|
||||||
|
|
||||||
3. The file descriptors for network communication and file operations are
|
3. The file descriptors for network communication and file operations are
|
||||||
not easily interchangable as in unix.
|
not easily interchangeable as in unix.
|
||||||
|
|
||||||
We avoid this by not trying any funny tricks on file descriptors.
|
We avoid this by not trying any funny tricks on file descriptors.
|
||||||
|
|
||||||
@@ -182,7 +183,7 @@ Library
|
|||||||
|
|
||||||
Some time during the DO function, the Curl_setup_transfer() function must
|
Some time during the DO function, the Curl_setup_transfer() function must
|
||||||
be called with some basic info about the upcoming transfer: what socket(s)
|
be called with some basic info about the upcoming transfer: what socket(s)
|
||||||
to read/write and the expected file tranfer sizes (if known).
|
to read/write and the expected file transfer sizes (if known).
|
||||||
|
|
||||||
o Transfer()
|
o Transfer()
|
||||||
|
|
||||||
@@ -224,15 +225,15 @@ Library
|
|||||||
A quick roundup on internal function sequences (many of these call
|
A quick roundup on internal function sequences (many of these call
|
||||||
protocol-specific function-pointers):
|
protocol-specific function-pointers):
|
||||||
|
|
||||||
curl_connect - connects to a remote site and does initial connect fluff
|
Curl_connect - connects to a remote site and does initial connect fluff
|
||||||
This also checks for an existing connection to the requested site and uses
|
This also checks for an existing connection to the requested site and uses
|
||||||
that one if it is possible.
|
that one if it is possible.
|
||||||
|
|
||||||
curl_do - starts a transfer
|
Curl_do - starts a transfer
|
||||||
curl_transfer() - transfers data
|
Curl_handler::do_it() - transfers data
|
||||||
curl_done - ends a transfer
|
Curl_done - ends a transfer
|
||||||
|
|
||||||
curl_disconnect - disconnects from a remote site. This is called when the
|
Curl_disconnect - disconnects from a remote site. This is called when the
|
||||||
disconnect is really requested, which doesn't necessarily have to be
|
disconnect is really requested, which doesn't necessarily have to be
|
||||||
exactly after curl_done in case we want to keep the connection open for
|
exactly after curl_done in case we want to keep the connection open for
|
||||||
a while.
|
a while.
|
||||||
@@ -249,16 +250,16 @@ Library
|
|||||||
HTTPS uses in almost every means the same procedure as HTTP, with only two
|
HTTPS uses in almost every means the same procedure as HTTP, with only two
|
||||||
exceptions: the connect procedure is different and the function used to read
|
exceptions: the connect procedure is different and the function used to read
|
||||||
or write from the socket is different, although the latter fact is hidden in
|
or write from the socket is different, although the latter fact is hidden in
|
||||||
the source by the use of curl_read() for reading and curl_write() for writing
|
the source by the use of Curl_read() for reading and Curl_write() for writing
|
||||||
data to the remote server.
|
data to the remote server.
|
||||||
|
|
||||||
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
|
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
|
||||||
encoding.
|
encoding.
|
||||||
|
|
||||||
An interesting detail with the HTTP(S) request, is the add_buffer() series of
|
An interesting detail with the HTTP(S) request, is the Curl_add_buffer()
|
||||||
functions we use. They append data to one single buffer, and when the
|
series of functions we use. They append data to one single buffer, and when
|
||||||
building is done the entire request is sent off in one single write. This is
|
the building is done the entire request is sent off in one single write. This
|
||||||
done this way to overcome problems with flawed firewalls and lame servers.
|
is done this way to overcome problems with flawed firewalls and lame servers.
|
||||||
|
|
||||||
FTP
|
FTP
|
||||||
|
|
||||||
@@ -284,14 +285,14 @@ Library
|
|||||||
|
|
||||||
LDAP
|
LDAP
|
||||||
|
|
||||||
Everything LDAP is in lib/ldap.c.
|
Everything LDAP is in lib/ldap.c and lib/openldap.c
|
||||||
|
|
||||||
GENERAL
|
GENERAL
|
||||||
|
|
||||||
URL encoding and decoding, called escaping and unescaping in the source code,
|
URL encoding and decoding, called escaping and unescaping in the source code,
|
||||||
is found in lib/escape.c.
|
is found in lib/escape.c.
|
||||||
|
|
||||||
While transfering data in Transfer() a few functions might get used.
|
While transferring data in Transfer() a few functions might get used.
|
||||||
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
||||||
|
|
||||||
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
||||||
@@ -303,7 +304,7 @@ Library
|
|||||||
lib/netrc.c holds the .netrc parser
|
lib/netrc.c holds the .netrc parser
|
||||||
|
|
||||||
lib/timeval.c features replacement functions for systems that don't have
|
lib/timeval.c features replacement functions for systems that don't have
|
||||||
gettimeofday() and a few support functions for timeval convertions.
|
gettimeofday() and a few support functions for timeval conversions.
|
||||||
|
|
||||||
A function named curl_version() that returns the full curl version string is
|
A function named curl_version() that returns the full curl version string is
|
||||||
found in lib/version.c.
|
found in lib/version.c.
|
||||||
@@ -356,8 +357,10 @@ multi interface/non-blocking
|
|||||||
|
|
||||||
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
||||||
and adjust the code to allow non-blocking operations even on multi-stage
|
and adjust the code to allow non-blocking operations even on multi-stage
|
||||||
protocols. The DICT, TELNET and TFTP are crappy examples and they are subject
|
protocols. They are built around state machines that return when they could
|
||||||
for rewrite in the future to better fit the libcurl protocol family.
|
block waiting for data. The DICT, LDAP and TELNET protocols are crappy
|
||||||
|
examples and they are subject for rewrite in the future to better fit the
|
||||||
|
libcurl protocol family.
|
||||||
|
|
||||||
SSL libraries
|
SSL libraries
|
||||||
=============
|
=============
|
||||||
@@ -379,7 +382,9 @@ Library Symbols
|
|||||||
All symbols used internally in libcurl must use a 'Curl_' prefix if they're
|
All symbols used internally in libcurl must use a 'Curl_' prefix if they're
|
||||||
used in more than a single file. Single-file symbols must be made static.
|
used in more than a single file. Single-file symbols must be made static.
|
||||||
Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
|
Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
|
||||||
but they are to be changed to follow this pattern in future versions.)
|
but they are to be changed to follow this pattern in future versions.) Public
|
||||||
|
API functions are marked with CURL_EXTERN in the public header files so that
|
||||||
|
all others can be hidden on platforms where this is possible.
|
||||||
|
|
||||||
Return Codes and Informationals
|
Return Codes and Informationals
|
||||||
===============================
|
===============================
|
||||||
@@ -458,31 +463,43 @@ Memory Debugging
|
|||||||
Test Suite
|
Test Suite
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Since November 2000, a test suite has evolved. It is placed in its own
|
The test suite is placed in its own subdirectory directly off the root in the
|
||||||
subdirectory directly off the root in the curl archive tree, and it contains
|
curl archive tree, and it contains a bunch of scripts and a lot of test case
|
||||||
a bunch of scripts and a lot of test case data.
|
data.
|
||||||
|
|
||||||
The main test script is runtests.pl that will invoke the two servers
|
The main test script is runtests.pl that will invoke test servers like
|
||||||
httpserver.pl and ftpserver.pl before all the test cases are performed. The
|
httpserver.pl and ftpserver.pl before all the test cases are performed. The
|
||||||
test suite currently only runs on unix-like platforms.
|
test suite currently only runs on unix-like platforms.
|
||||||
|
|
||||||
You'll find a complete description of the test case data files in the
|
You'll find a description of the test suite in the tests/README file, and the
|
||||||
tests/README file.
|
test case data files in the tests/FILEFORMAT file.
|
||||||
|
|
||||||
The test suite automatically detects if curl was built with the memory
|
The test suite automatically detects if curl was built with the memory
|
||||||
debugging enabled, and if it was it will detect memory leaks too.
|
debugging enabled, and if it was it will detect memory leaks, too.
|
||||||
|
|
||||||
Building Releases
|
Building Releases
|
||||||
=================
|
=================
|
||||||
|
|
||||||
There's no magic to this. When you consider everything stable enough to be
|
There's no magic to this. When you consider everything stable enough to be
|
||||||
released, run the 'maketgz' script (using 'make distcheck' will give you a
|
released, do this:
|
||||||
pretty good view on the status of the current sources). maketgz prompts for
|
|
||||||
version number of the client and the library before it creates a release
|
|
||||||
archive. maketgz uses 'make dist' for the actual archive building, why you
|
|
||||||
need to fill in the Makefile.am files properly for which files that should
|
|
||||||
be included in the release archives.
|
|
||||||
|
|
||||||
NOTE: you need to have curl checked out from git to be able to do a proper
|
1. Tag the source code accordingly.
|
||||||
|
|
||||||
|
2. run the 'maketgz' script (using 'make distcheck' will give you a pretty
|
||||||
|
good view on the status of the current sources). maketgz requires a
|
||||||
|
version number and creates the release archive. maketgz uses 'make dist'
|
||||||
|
for the actual archive building, why you need to fill in the Makefile.am
|
||||||
|
files properly for which files that should be included in the release
|
||||||
|
archives.
|
||||||
|
|
||||||
|
3. When that's complete, sign the output files.
|
||||||
|
|
||||||
|
4. Upload
|
||||||
|
|
||||||
|
5. Update web site and changelog on site
|
||||||
|
|
||||||
|
6. Send announcement to the mailing lists
|
||||||
|
|
||||||
|
NOTE: you must have curl checked out from git to be able to do a proper
|
||||||
release build. The release tarballs do not have everything setup in order to
|
release build. The release tarballs do not have everything setup in order to
|
||||||
do releases properly.
|
do releases properly.
|
||||||
|
@@ -3,6 +3,11 @@ 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!
|
||||||
|
|
||||||
|
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
|
||||||
|
that platform), and long is only 32 bits. It makes it impossible for
|
||||||
|
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
|
||||||
|
option as for all other operating systems.
|
||||||
|
|
||||||
75. NTLM authentication involving unicode user name or password.
|
75. NTLM authentication involving unicode user name or password.
|
||||||
http://curl.haxx.se/mail/lib-2009-10/0024.html
|
http://curl.haxx.se/mail/lib-2009-10/0024.html
|
||||||
http://curl.haxx.se/bug/view.cgi?id=2944325
|
http://curl.haxx.se/bug/view.cgi?id=2944325
|
||||||
@@ -49,11 +54,6 @@ may have been fixed since this was written!
|
|||||||
handle with curl_easy_cleanup() and create a new. Some more details:
|
handle with curl_easy_cleanup() and create a new. Some more details:
|
||||||
http://curl.haxx.se/mail/lib-2009-04/0300.html
|
http://curl.haxx.se/mail/lib-2009-04/0300.html
|
||||||
|
|
||||||
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
|
|
||||||
multi_socket interfaces. The work-around for apps is to simply remove the
|
|
||||||
easy handle once the time is up. See also:
|
|
||||||
http://curl.haxx.se/bug/view.cgi?id=2501457
|
|
||||||
|
|
||||||
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
|
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
|
||||||
it ought to be automatically resent without the Expect:. A workaround is
|
it ought to be automatically resent without the Expect:. A workaround is
|
||||||
for the client application to redo the transfer after disabling Expect:.
|
for the client application to redo the transfer after disabling Expect:.
|
||||||
@@ -63,10 +63,6 @@ may have been fixed since this was written!
|
|||||||
is waiting for the the 100-continue response.
|
is waiting for the the 100-continue response.
|
||||||
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||||
|
|
||||||
59. If the CURLOPT_PORT option is used on an FTP URL like
|
|
||||||
"ftp://example.com/file;type=A" using a proxy, the ";type=A" is stripped off.
|
|
||||||
See the comment in parse_remote_port()
|
|
||||||
|
|
||||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||||
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||||
@@ -91,7 +87,7 @@ may have been fixed since this was written!
|
|||||||
|
|
||||||
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
||||||
where a connection can be re-used without actually being properly
|
where a connection can be re-used without actually being properly
|
||||||
SSL-negoatiated:
|
SSL-negotiated:
|
||||||
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
||||||
|
|
||||||
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
||||||
@@ -141,12 +137,13 @@ may have been fixed since this was written!
|
|||||||
30. You need to use -g to the command line tool in order to use RFC2732-style
|
30. You need to use -g to the command line tool in order to use RFC2732-style
|
||||||
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 nicely supported.
|
||||||
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
|
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
|
||||||
percent letter (which seems like a blatant URL spec violation).
|
percent letter (which seems like a blatant URL spec violation).
|
||||||
|
libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25).
|
||||||
|
|
||||||
See http://curl.haxx.se/bug/view.cgi?id=1371118
|
See http://curl.haxx.se/bug/view.cgi?id=1371118
|
||||||
|
|
||||||
@@ -189,7 +186,7 @@ may have been fixed since this was written!
|
|||||||
would not meaningfully support NUL characters within RFC 959 <string>,
|
would not meaningfully support NUL characters within RFC 959 <string>,
|
||||||
anyway (e.g., UNIX pathnames may not contain NUL).
|
anyway (e.g., UNIX pathnames may not contain NUL).
|
||||||
|
|
||||||
14. Test case 165 might fail on system which has libidn present, but with an
|
14. Test case 165 might fail on a system which has libidn present, but with an
|
||||||
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
||||||
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
||||||
test pass, but instead makes it fail on Solaris hosts that use its native
|
test pass, but instead makes it fail on Solaris hosts that use its native
|
||||||
|
@@ -55,6 +55,10 @@ NSS http://www.mozilla.org/projects/security/pki/nss/
|
|||||||
grant you different permissions and impose different obligations. You
|
grant you different permissions and impose different obligations. You
|
||||||
should select the license that best meets your needs.
|
should select the license that best meets your needs.
|
||||||
|
|
||||||
|
axTLS http://axtls.sourceforge.net/
|
||||||
|
|
||||||
|
(May be used for SSL/TLS support) Uses a Modified BSD-style license.
|
||||||
|
|
||||||
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
||||||
|
|
||||||
(Used for asynchronous name resolves) Uses an MIT license that is very
|
(Used for asynchronous name resolves) Uses an MIT license that is very
|
||||||
|
213
docs/MAIL-ETIQUETTE
Normal file
213
docs/MAIL-ETIQUETTE
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
MAIL ETIQUETTE
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
1.1 Mailing Lists
|
||||||
|
1.2 Netiquette
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
1.4 Subscription Required
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
2.2 Reply to the List
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
2.6 Quoting
|
||||||
|
2.7 Digest
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
1. About the lists
|
||||||
|
|
||||||
|
1.1 Mailing Lists
|
||||||
|
|
||||||
|
The mailing lists we have are all listed and described at
|
||||||
|
http://curl.haxx.se/mail/
|
||||||
|
|
||||||
|
Each mailing list is targeted to a specific set of users and subjects,
|
||||||
|
please use the one or the ones that suit you the most.
|
||||||
|
|
||||||
|
Each mailing list have hundreds up to thousands of readers, meaning that
|
||||||
|
each mail sent will be received and read by a very large amount of people.
|
||||||
|
People from various cultures, regions, religions and continents.
|
||||||
|
|
||||||
|
1.2 Netiquette
|
||||||
|
|
||||||
|
Netiquette is a common name for how to behave on the internet. Of course, in
|
||||||
|
each particular group and subculture there will be differences in what is
|
||||||
|
acceptable and what is considered good manners.
|
||||||
|
|
||||||
|
This document outlines what we in the cURL project considers to be good
|
||||||
|
etiquette, and primarily this focus on how to behave on and how to use our
|
||||||
|
mailing lists.
|
||||||
|
|
||||||
|
1.3 Do Not Mail a Single Individual
|
||||||
|
|
||||||
|
Many people send one question to one person. One person gets many mails, and
|
||||||
|
there is only one person who can give you a reply. The question may be
|
||||||
|
something that other people are also wanting to ask. These other people have
|
||||||
|
no way to read the reply, but to ask the one person the question. The one
|
||||||
|
person consequently gets overloaded with mail.
|
||||||
|
|
||||||
|
If you really want to contact an individual and perhaps pay for his or her's
|
||||||
|
services, by all means go ahead, but if it's just another curl question,
|
||||||
|
take it to a suitable list instead.
|
||||||
|
|
||||||
|
1.4 Subscription Required
|
||||||
|
|
||||||
|
All curl mailing lists require that you are subscribed to allow a mail to go
|
||||||
|
through to all the subscribers.
|
||||||
|
|
||||||
|
If you post without being subscribed (or from a different mail address than
|
||||||
|
the one you are subscribed with), your mail will simply be silently
|
||||||
|
discarded. You have to subscribe first, then post.
|
||||||
|
|
||||||
|
The reason for this unfortunate and strict subscription policy is of course
|
||||||
|
to stop spam from pestering the lists.
|
||||||
|
|
||||||
|
1.5 Moderation of new posters
|
||||||
|
|
||||||
|
Several of the curl mailing lists automatically make all posts from new
|
||||||
|
subscribers require moderation. This means that after you've subscribed and
|
||||||
|
send your first mail to a list, that mail will not be let through to the
|
||||||
|
list until a mailing list administrator has verified that it is OK and
|
||||||
|
permits it to get posted.
|
||||||
|
|
||||||
|
Once a first post has been made that proves the sender is actually talking
|
||||||
|
about curl-related subjects, the moderation "flag" will be switched off and
|
||||||
|
future posts will go through without being moderated.
|
||||||
|
|
||||||
|
The reason for this moderation policy is that we do suffer from spammers who
|
||||||
|
actually subscribe and send spam to our lists.
|
||||||
|
|
||||||
|
1.6 Handling trolls and spam
|
||||||
|
|
||||||
|
Despite our good intensions and hard work to keep spam off the lists and to
|
||||||
|
maintain a friendly and positive atmosphere, there will be times when spam
|
||||||
|
and or trolls get through.
|
||||||
|
|
||||||
|
Troll - "someone who posts inflammatory, extraneous, or off-topic messages
|
||||||
|
in an online community"
|
||||||
|
|
||||||
|
Spam - "use of electronic messaging systems to send unsolicited bulk
|
||||||
|
messages"
|
||||||
|
|
||||||
|
No matter what, we NEVER EVER respond to trolls or spammers on the list. If
|
||||||
|
you believe the list admin should do something particular, contact him/her
|
||||||
|
off-list. The subject will be taken care of as good as possible to prevent
|
||||||
|
repeated offences, but responding on the list to such messages never lead to
|
||||||
|
anything good and only puts the light even more on the offender: which was
|
||||||
|
the entire purpose of it getting to the list in the first place.
|
||||||
|
|
||||||
|
Don't feed the trolls!
|
||||||
|
|
||||||
|
|
||||||
|
2. Sending mail
|
||||||
|
|
||||||
|
2.1 Reply or New Mail
|
||||||
|
|
||||||
|
Please do not reply to an existing message as a short-cut to post a message
|
||||||
|
to the lists.
|
||||||
|
|
||||||
|
Many mail programs and web archivers use information within mails to keep
|
||||||
|
them together as "threads", as collections of posts that discuss a certain
|
||||||
|
subject. If you don't intend to reply on the same or similar subject, don't
|
||||||
|
just hit reply on an existing mail and change subject, create a new mail.
|
||||||
|
|
||||||
|
2.2 Reply to the List
|
||||||
|
|
||||||
|
When replying to a message from the list, make sure that you do "group
|
||||||
|
reply" or "reply to all", and not just reply to the author of the single
|
||||||
|
mail you reply to.
|
||||||
|
|
||||||
|
We're actively discouraging replying back to the single person by setting
|
||||||
|
the Reply-To: field in outgoing mails back to the mailing list address,
|
||||||
|
making it harder for people to mail the author only by mistake.
|
||||||
|
|
||||||
|
2.3 Use a Sensible Subject
|
||||||
|
|
||||||
|
Please use a subject of the mail that makes sense and that is related to the
|
||||||
|
contents of your mail. It makes it a lot easier to find your mail afterwards
|
||||||
|
and it makes it easier to track mail threads and topics.
|
||||||
|
|
||||||
|
2.4 Do Not Top-Post
|
||||||
|
|
||||||
|
If you reply to a message, don't use top-posting. Top-posting is when you
|
||||||
|
write the new text at the top of a mail and you insert the previous quoted
|
||||||
|
mail conversation below. It forces users to read the mail in a backwards
|
||||||
|
order to properly understand it.
|
||||||
|
|
||||||
|
This is why top posting is so bad:
|
||||||
|
|
||||||
|
A: Because it messes up the order in which people normally read
|
||||||
|
text.
|
||||||
|
Q: Why is top-posting such a bad thing?
|
||||||
|
A: Top-posting.
|
||||||
|
Q: What is the most annoying thing in e-mail?
|
||||||
|
|
||||||
|
Apart from the screwed up read order (especially when mixed together in a
|
||||||
|
thread when some responds doing the mandaded bottom-posting style), it also
|
||||||
|
makes it impossible to quote only parts of the original mail.
|
||||||
|
|
||||||
|
When you reply to a mail. You let the mail client insert the previous mail
|
||||||
|
quoted. Then you put the cursor on the first line of the mail and you move
|
||||||
|
down through the mail, deleting all parts of the quotes that don't add
|
||||||
|
context for your comments. When you want to add a comment you do so, inline,
|
||||||
|
right after the quotes that relate to your comment. Then you continue
|
||||||
|
downwards again.
|
||||||
|
|
||||||
|
When most of the quotes have been removed and you've added your own words,
|
||||||
|
you're done!
|
||||||
|
|
||||||
|
2.5 HTML is not for mails
|
||||||
|
|
||||||
|
Please switch off those HTML encoded messages. You can mail all those funny
|
||||||
|
mails to your friends. We speak plain text mails.
|
||||||
|
|
||||||
|
2.6 Quoting
|
||||||
|
|
||||||
|
Quote as little as possible. Just enough to provide the context you cannot
|
||||||
|
leave out. A lengthy description can be found here:
|
||||||
|
|
||||||
|
http://www.netmeister.org/news/learn2quote.html
|
||||||
|
|
||||||
|
2.7 Digest
|
||||||
|
|
||||||
|
We allow subscribers to subscribe to the "digest" version of the mailing
|
||||||
|
lists. A digest is a collection of mails lumped together in one single mail.
|
||||||
|
|
||||||
|
Should you decide to reply to a mail sent out as a digest, there are two
|
||||||
|
things you MUST consider if you really really cannot subscribe normally
|
||||||
|
instead:
|
||||||
|
|
||||||
|
Cut off all mails and chatter that is not related to the mail you want to
|
||||||
|
reply to.
|
||||||
|
|
||||||
|
Change the subject name to something sensible and related to the subject,
|
||||||
|
preferably even the actual subject of the single mail you wanted to reply to
|
||||||
|
|
||||||
|
2.8 Please Tell Us How You Solved The Problem!
|
||||||
|
|
||||||
|
Many people mail questions to the list, people spend some of their time and
|
||||||
|
make an effort in providing good answers to these questions.
|
||||||
|
|
||||||
|
If you are the one who asks, please consider responding once more in case
|
||||||
|
one of the hints was what solved your problems. The guys who write answers
|
||||||
|
feel good to know that they provided a good answer and that you fixed the
|
||||||
|
problem. Far too often, the person who asked the question is never heard of
|
||||||
|
again, and we never get to know if he/she is gone because the problem was
|
||||||
|
solved or perhaps because the problem was unsolvable!
|
||||||
|
|
||||||
|
Getting the solution posted also helps other users that experience the same
|
||||||
|
problem(s). They get to see (possibly in the web archives) that the
|
||||||
|
suggested fixes actually has helped at least one person.
|
||||||
|
|
24
docs/MANUAL
24
docs/MANUAL
@@ -123,7 +123,13 @@ USING PASSWORDS
|
|||||||
|
|
||||||
PROXY
|
PROXY
|
||||||
|
|
||||||
Get an ftp file using a proxy named my-proxy that uses port 888:
|
curl supports both HTTP and SOCKS proxy servers, with optional authentication.
|
||||||
|
It does not have special support for FTP proxy servers since there are no
|
||||||
|
standards for those, but it can still be made to work with many of them. You
|
||||||
|
can also use both HTTP and SOCKS proxies to transfer files to and from FTP
|
||||||
|
servers.
|
||||||
|
|
||||||
|
Get an ftp file using an HTTP proxy named my-proxy that uses port 888:
|
||||||
|
|
||||||
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
|
curl -x my-proxy:888 ftp://ftp.leachsite.com/README
|
||||||
|
|
||||||
@@ -146,9 +152,23 @@ PROXY
|
|||||||
|
|
||||||
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
||||||
|
|
||||||
See also the environment variables Curl support that offer further proxy
|
See also the environment variables Curl supports that offer further proxy
|
||||||
control.
|
control.
|
||||||
|
|
||||||
|
Most FTP proxy servers are set up to appear as a normal FTP server from the
|
||||||
|
client's perspective, with special commands to select the remote FTP server.
|
||||||
|
curl supports the -u, -Q and --ftp-account options that can be used to
|
||||||
|
set up transfers through many FTP proxies. For example, a file can be
|
||||||
|
uploaded to a remote FTP server using a Blue Coat FTP proxy with the
|
||||||
|
options:
|
||||||
|
|
||||||
|
curl -u "Remote-FTP-Username@remote.ftp.server Proxy-Username:Remote-Pass" \
|
||||||
|
--ftp-account Proxy-Password --upload-file local-file \
|
||||||
|
ftp://my-ftp.proxy.server:21/remote/upload/path/
|
||||||
|
|
||||||
|
See the manual for your FTP proxy to determine the form it expects to set up
|
||||||
|
transfers, and curl's -v option to see exactly what curl is sending.
|
||||||
|
|
||||||
RANGES
|
RANGES
|
||||||
|
|
||||||
With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
|
With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
|
||||||
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
@@ -16,7 +35,8 @@ CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
|
|||||||
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
|
||||||
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
|
||||||
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
|
||||||
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp
|
$(PDFPAGES) LICENSE-MIXING README.netware DISTRO-DILEMMA INSTALL.devcpp \
|
||||||
|
MAIL-ETIQUETTE
|
||||||
|
|
||||||
MAN2HTML= roffit < $< >$@
|
MAN2HTML= roffit < $< >$@
|
||||||
|
|
||||||
|
@@ -32,12 +32,16 @@ This document lists documents and standards used by curl.
|
|||||||
|
|
||||||
RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616)
|
RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616)
|
||||||
|
|
||||||
|
RFC 2104 - Keyed-Hashing for Message Authentication
|
||||||
|
|
||||||
RFC 2109 - HTTP State Management Mechanism (cookie stuff)
|
RFC 2109 - HTTP State Management Mechanism (cookie stuff)
|
||||||
- Also, read Netscape's specification at
|
- Also, read Netscape's specification at
|
||||||
http://curl.haxx.se/rfc/cookie_spec.html
|
http://curl.haxx.se/rfc/cookie_spec.html
|
||||||
|
|
||||||
RFC 2183 - The Content-Disposition Header Field
|
RFC 2183 - The Content-Disposition Header Field
|
||||||
|
|
||||||
|
RFC 2195 - CRAM-MD5 authentication
|
||||||
|
|
||||||
RFC 2229 - A Dictionary Server Protocol
|
RFC 2229 - A Dictionary Server Protocol
|
||||||
|
|
||||||
RFC 2255 - Newer LDAP URL syntax document.
|
RFC 2255 - Newer LDAP URL syntax document.
|
||||||
@@ -73,3 +77,7 @@ This document lists documents and standards used by curl.
|
|||||||
RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109
|
RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109
|
||||||
|
|
||||||
RFC 3207 - SMTP over TLS
|
RFC 3207 - SMTP over TLS
|
||||||
|
|
||||||
|
RFC 4616 - PLAIN authentication
|
||||||
|
|
||||||
|
RFC 4954 - SMTP Authentication
|
||||||
|
92
docs/THANKS
92
docs/THANKS
@@ -6,14 +6,17 @@
|
|||||||
|
|
||||||
Aaron Oneal
|
Aaron Oneal
|
||||||
Adam D. Moss
|
Adam D. Moss
|
||||||
|
Adam Light
|
||||||
Adam Piggott
|
Adam Piggott
|
||||||
Adrian Schuur
|
Adrian Schuur
|
||||||
|
Akos Pasztory
|
||||||
Alan Pinstein
|
Alan Pinstein
|
||||||
Albert Chin-A-Young
|
Albert Chin-A-Young
|
||||||
Albert Choy
|
Albert Choy
|
||||||
Ale Vesely
|
Ale Vesely
|
||||||
Aleksandar Milivojevic
|
Aleksandar Milivojevic
|
||||||
Alessandro Vesely
|
Alessandro Vesely
|
||||||
|
Alex Bligh
|
||||||
Alex Fishman
|
Alex Fishman
|
||||||
Alex Neblett
|
Alex Neblett
|
||||||
Alex Suykov
|
Alex Suykov
|
||||||
@@ -27,8 +30,10 @@ Alexey Borzov
|
|||||||
Alexey Pesternikov
|
Alexey Pesternikov
|
||||||
Alexey Simak
|
Alexey Simak
|
||||||
Alexis Carvalho
|
Alexis Carvalho
|
||||||
|
Alfred Gebert
|
||||||
Allen Pulsifer
|
Allen Pulsifer
|
||||||
Amol Pattekar
|
Amol Pattekar
|
||||||
|
Amr Shahin
|
||||||
Anatoli Tubman
|
Anatoli Tubman
|
||||||
Anders Gustafsson
|
Anders Gustafsson
|
||||||
Andi Jahja
|
Andi Jahja
|
||||||
@@ -41,6 +46,7 @@ Andreas Olsson
|
|||||||
Andreas Rieke
|
Andreas Rieke
|
||||||
Andreas Schuldei
|
Andreas Schuldei
|
||||||
Andreas Wurf
|
Andreas Wurf
|
||||||
|
Andrei Benea
|
||||||
Andres Garcia
|
Andres Garcia
|
||||||
Andrew Benham
|
Andrew Benham
|
||||||
Andrew Biggs
|
Andrew Biggs
|
||||||
@@ -69,8 +75,10 @@ Axel Tillequin
|
|||||||
Balint Szilakszi
|
Balint Szilakszi
|
||||||
Bart Whiteley
|
Bart Whiteley
|
||||||
Bas Mevissen
|
Bas Mevissen
|
||||||
|
Ben Darnell
|
||||||
Ben Greear
|
Ben Greear
|
||||||
Ben Madsen
|
Ben Madsen
|
||||||
|
Ben Noordhuis
|
||||||
Ben Van Hof
|
Ben Van Hof
|
||||||
Benbuck Nason
|
Benbuck Nason
|
||||||
Benjamin Gerard
|
Benjamin Gerard
|
||||||
@@ -78,12 +86,16 @@ Bernard Leak
|
|||||||
Bertrand Demiddelaer
|
Bertrand Demiddelaer
|
||||||
Bill Egert
|
Bill Egert
|
||||||
Bill Hoffman
|
Bill Hoffman
|
||||||
|
Bjoern Sikora
|
||||||
Bjorn Augustsson
|
Bjorn Augustsson
|
||||||
Bjorn Reese
|
Bjorn Reese
|
||||||
Bj<EFBFBD>rn Stenberg
|
Bj<EFBFBD>rn Stenberg
|
||||||
|
Bob Richmond
|
||||||
Bob Schader
|
Bob Schader
|
||||||
Bogdan Nicula
|
Bogdan Nicula
|
||||||
Brad Burdick
|
Brad Burdick
|
||||||
|
Brad Hards
|
||||||
|
Brad King
|
||||||
Bradford Bruce
|
Bradford Bruce
|
||||||
Brendan Jurd
|
Brendan Jurd
|
||||||
Brent Beardsley
|
Brent Beardsley
|
||||||
@@ -96,6 +108,7 @@ Brock Noland
|
|||||||
Bruce Mitchener
|
Bruce Mitchener
|
||||||
Bryan Henderson
|
Bryan Henderson
|
||||||
Bryan Kemp
|
Bryan Kemp
|
||||||
|
Cameron Kaiser
|
||||||
Camille Moncelier
|
Camille Moncelier
|
||||||
Caolan McNamara
|
Caolan McNamara
|
||||||
Carsten Lange
|
Carsten Lange
|
||||||
@@ -111,6 +124,7 @@ Chris Flerackers
|
|||||||
Chris Gaukroger
|
Chris Gaukroger
|
||||||
Chris Maltby
|
Chris Maltby
|
||||||
Chris Mumford
|
Chris Mumford
|
||||||
|
Chris Smowton
|
||||||
Christian Krause
|
Christian Krause
|
||||||
Christian Kurz
|
Christian Kurz
|
||||||
Christian Robottom Reis
|
Christian Robottom Reis
|
||||||
@@ -118,6 +132,7 @@ Christian Schmitz
|
|||||||
Christian Vogt
|
Christian Vogt
|
||||||
Christophe Demory
|
Christophe Demory
|
||||||
Christophe Legry
|
Christophe Legry
|
||||||
|
Christopher Conroy
|
||||||
Christopher Palow
|
Christopher Palow
|
||||||
Christopher R. Palmer
|
Christopher R. Palmer
|
||||||
Ciprian Badescu
|
Ciprian Badescu
|
||||||
@@ -140,6 +155,7 @@ Damien Adant
|
|||||||
Dan Becker
|
Dan Becker
|
||||||
Dan C
|
Dan C
|
||||||
Dan Fandrich
|
Dan Fandrich
|
||||||
|
Dan Locks
|
||||||
Dan Nelson
|
Dan Nelson
|
||||||
Dan Petitt
|
Dan Petitt
|
||||||
Dan Torop
|
Dan Torop
|
||||||
@@ -149,14 +165,17 @@ Daniel Cater
|
|||||||
Daniel Egger
|
Daniel Egger
|
||||||
Daniel Fandrich
|
Daniel Fandrich
|
||||||
Daniel Johnson
|
Daniel Johnson
|
||||||
|
Daniel Mentz
|
||||||
Daniel Steinberg
|
Daniel Steinberg
|
||||||
Daniel Stenberg
|
Daniel Stenberg
|
||||||
Daniel at touchtunes
|
Daniel at touchtunes
|
||||||
Darryl House
|
Darryl House
|
||||||
|
Darshan Mody
|
||||||
Dave Dribin
|
Dave Dribin
|
||||||
Dave Halbakken
|
Dave Halbakken
|
||||||
Dave Hamilton
|
Dave Hamilton
|
||||||
Dave May
|
Dave May
|
||||||
|
Dave Reisner
|
||||||
Dave Vasilevsky
|
Dave Vasilevsky
|
||||||
David Bau
|
David Bau
|
||||||
David Binderman
|
David Binderman
|
||||||
@@ -185,10 +204,12 @@ Detlef Schmier
|
|||||||
Didier Brisebourg
|
Didier Brisebourg
|
||||||
Diego Casorran
|
Diego Casorran
|
||||||
Dima Barsky
|
Dima Barsky
|
||||||
|
Dimitre Dimitrov
|
||||||
Dimitris Sarris
|
Dimitris Sarris
|
||||||
Dinar
|
Dinar
|
||||||
Dirk Eddelbuettel
|
Dirk Eddelbuettel
|
||||||
Dirk Manske
|
Dirk Manske
|
||||||
|
Dmitri Shubin
|
||||||
Dmitriy Sergeyev
|
Dmitriy Sergeyev
|
||||||
Dmitry Bartsevich
|
Dmitry Bartsevich
|
||||||
Dmitry Kurochkin
|
Dmitry Kurochkin
|
||||||
@@ -200,7 +221,9 @@ Dominick Meglio
|
|||||||
Doug Kaufman
|
Doug Kaufman
|
||||||
Doug Porter
|
Doug Porter
|
||||||
Douglas E. Wegscheid
|
Douglas E. Wegscheid
|
||||||
|
Douglas Kilpatrick
|
||||||
Douglas R. Horner
|
Douglas R. Horner
|
||||||
|
Douglas Steinwand
|
||||||
Dov Murik
|
Dov Murik
|
||||||
Duane Cathey
|
Duane Cathey
|
||||||
Duncan Mac-Vicar Prett
|
Duncan Mac-Vicar Prett
|
||||||
@@ -219,9 +242,11 @@ Emiliano Ida
|
|||||||
Enrico Scholz
|
Enrico Scholz
|
||||||
Enrik Berkhan
|
Enrik Berkhan
|
||||||
Eric Cooper
|
Eric Cooper
|
||||||
|
Eric Hu
|
||||||
Eric Landes
|
Eric Landes
|
||||||
Eric Lavigne
|
Eric Lavigne
|
||||||
Eric Melville
|
Eric Melville
|
||||||
|
Eric Mertens
|
||||||
Eric Rautman
|
Eric Rautman
|
||||||
Eric Thelin
|
Eric Thelin
|
||||||
Eric Vergnaud
|
Eric Vergnaud
|
||||||
@@ -243,6 +268,7 @@ Forrest Cahoon
|
|||||||
Frank Hempel
|
Frank Hempel
|
||||||
Frank Keeney
|
Frank Keeney
|
||||||
Frank McGeough
|
Frank McGeough
|
||||||
|
Frank Meier
|
||||||
Frank Ticheler
|
Frank Ticheler
|
||||||
Fred Machado
|
Fred Machado
|
||||||
Fred New
|
Fred New
|
||||||
@@ -291,10 +317,18 @@ Hans Steegers
|
|||||||
Hans-Jurgen May
|
Hans-Jurgen May
|
||||||
Hardeep Singh
|
Hardeep Singh
|
||||||
Harshal Pradhan
|
Harshal Pradhan
|
||||||
|
Hauke Duden
|
||||||
Heikki Korpela
|
Heikki Korpela
|
||||||
|
Heinrich Ko
|
||||||
|
Hendrik Visage
|
||||||
Henrik Storner
|
Henrik Storner
|
||||||
|
Henry Ludemann
|
||||||
Hidemoto Nakada
|
Hidemoto Nakada
|
||||||
|
Hoi-Ho Chan
|
||||||
|
Hongli Lai
|
||||||
|
Howard Chu
|
||||||
Hzhijun
|
Hzhijun
|
||||||
|
Ian D Allen
|
||||||
Ian Ford
|
Ian Ford
|
||||||
Ian Gulliver
|
Ian Gulliver
|
||||||
Ian Lynagh
|
Ian Lynagh
|
||||||
@@ -310,8 +344,10 @@ Immanuel Gregoire
|
|||||||
Ingmar Runge
|
Ingmar Runge
|
||||||
Ingo Ralf Blum
|
Ingo Ralf Blum
|
||||||
Ingo Wilken
|
Ingo Wilken
|
||||||
|
Jack Zhang
|
||||||
Jacky Lam
|
Jacky Lam
|
||||||
Jacob Meuser
|
Jacob Meuser
|
||||||
|
Jacob Moshenko
|
||||||
Jad Chamcham
|
Jad Chamcham
|
||||||
James Bursa
|
James Bursa
|
||||||
James Cheng
|
James Cheng
|
||||||
@@ -325,8 +361,10 @@ Jamie Lokier
|
|||||||
Jamie Newton
|
Jamie Newton
|
||||||
Jamie Wilkinson
|
Jamie Wilkinson
|
||||||
Jan Kunder
|
Jan Kunder
|
||||||
|
Jan Van Boghout
|
||||||
Jared Lundell
|
Jared Lundell
|
||||||
Jari Sundell
|
Jari Sundell
|
||||||
|
Jason McDonald
|
||||||
Jason S. Priebe
|
Jason S. Priebe
|
||||||
Jay Austin
|
Jay Austin
|
||||||
Jayesh A Shah
|
Jayesh A Shah
|
||||||
@@ -345,6 +383,7 @@ Jeff Weber
|
|||||||
Jeffrey Pohlmeyer
|
Jeffrey Pohlmeyer
|
||||||
Jeremy Friesner
|
Jeremy Friesner
|
||||||
Jerome Muffat-Meridol
|
Jerome Muffat-Meridol
|
||||||
|
Jerome Vouillon
|
||||||
Jes Badwal
|
Jes Badwal
|
||||||
Jesper Jensen
|
Jesper Jensen
|
||||||
Jesse Noller
|
Jesse Noller
|
||||||
@@ -359,6 +398,7 @@ Jofell Gallardo
|
|||||||
Johan Anderson
|
Johan Anderson
|
||||||
Johan Nilsson
|
Johan Nilsson
|
||||||
Johan van Selst
|
Johan van Selst
|
||||||
|
John Bradshaw
|
||||||
John Crow
|
John Crow
|
||||||
John Dennis
|
John Dennis
|
||||||
John E. Malmberg
|
John E. Malmberg
|
||||||
@@ -369,9 +409,11 @@ John Lightsey
|
|||||||
John McGowan
|
John McGowan
|
||||||
John P. McCaskey
|
John P. McCaskey
|
||||||
John Wilkinson
|
John Wilkinson
|
||||||
|
John-Mark Bell
|
||||||
Johnny Luong
|
Johnny Luong
|
||||||
Jon Grubbs
|
Jon Grubbs
|
||||||
Jon Nelson
|
Jon Nelson
|
||||||
|
Jon Sargeant
|
||||||
Jon Travis
|
Jon Travis
|
||||||
Jon Turner
|
Jon Turner
|
||||||
Jonas Forsman
|
Jonas Forsman
|
||||||
@@ -382,6 +424,7 @@ Jose Kahan
|
|||||||
Josef Wolf
|
Josef Wolf
|
||||||
Josh Kapell
|
Josh Kapell
|
||||||
Joshua Kwan
|
Joshua Kwan
|
||||||
|
Josue Andrade Gomes
|
||||||
Juan F. Codagnone
|
Juan F. Codagnone
|
||||||
Juan Ignacio Herv<72>s
|
Juan Ignacio Herv<72>s
|
||||||
Judson Bishop
|
Judson Bishop
|
||||||
@@ -396,8 +439,10 @@ J
|
|||||||
J<EFBFBD>rn Hartroth
|
J<EFBFBD>rn Hartroth
|
||||||
Kai Sommerfeld
|
Kai Sommerfeld
|
||||||
Kai-Uwe Rommel
|
Kai-Uwe Rommel
|
||||||
|
Kalle Vahlman
|
||||||
Kamil Dudka
|
Kamil Dudka
|
||||||
Kang-Jin Lee
|
Kang-Jin Lee
|
||||||
|
Karl M
|
||||||
Karl Moerder
|
Karl Moerder
|
||||||
Karol Pietrzak
|
Karol Pietrzak
|
||||||
Kaspar Brand
|
Kaspar Brand
|
||||||
@@ -408,6 +453,7 @@ Keith McGuigan
|
|||||||
Keith Mok
|
Keith Mok
|
||||||
Ken Hirsch
|
Ken Hirsch
|
||||||
Ken Rastatter
|
Ken Rastatter
|
||||||
|
Kenny To
|
||||||
Kent Boortz
|
Kent Boortz
|
||||||
Keshav Krity
|
Keshav Krity
|
||||||
Kevin Baughman
|
Kevin Baughman
|
||||||
@@ -452,17 +498,21 @@ Luca Altea
|
|||||||
Luca Alteas
|
Luca Alteas
|
||||||
Lucas Adamski
|
Lucas Adamski
|
||||||
Lukasz Czekierda
|
Lukasz Czekierda
|
||||||
|
Luke Amery
|
||||||
Luke Call
|
Luke Call
|
||||||
Luong Dinh Dung
|
Luong Dinh Dung
|
||||||
Maciej Karpiuk
|
Maciej Karpiuk
|
||||||
Maciej W. Rozycki
|
Maciej W. Rozycki
|
||||||
Manfred Schwarb
|
Manfred Schwarb
|
||||||
|
Manuel Massing
|
||||||
Marc Boucher
|
Marc Boucher
|
||||||
Marc Kleine-Budde
|
Marc Kleine-Budde
|
||||||
|
Marcel Roelofs
|
||||||
Marcelo Juchem
|
Marcelo Juchem
|
||||||
Marcin Konicki
|
Marcin Konicki
|
||||||
Marco G. Salvagno
|
Marco G. Salvagno
|
||||||
Marco Maggi
|
Marco Maggi
|
||||||
|
Marcus Sundberg
|
||||||
Marcus Webster
|
Marcus Webster
|
||||||
Mario Schroeder
|
Mario Schroeder
|
||||||
Mark Butler
|
Mark Butler
|
||||||
@@ -471,30 +521,38 @@ Mark Eichin
|
|||||||
Mark Incley
|
Mark Incley
|
||||||
Mark Karpeles
|
Mark Karpeles
|
||||||
Mark Lentczner
|
Mark Lentczner
|
||||||
|
Markus Duft
|
||||||
Markus Koetter
|
Markus Koetter
|
||||||
Markus Moeller
|
Markus Moeller
|
||||||
Markus Oberhumer
|
Markus Oberhumer
|
||||||
Martijn Koster
|
Martijn Koster
|
||||||
Martin C. Martin
|
Martin C. Martin
|
||||||
Martin Drasar
|
Martin Drasar
|
||||||
|
Martin Hager
|
||||||
Martin Hedenfalk
|
Martin Hedenfalk
|
||||||
|
Martin Lemke
|
||||||
Martin Skinner
|
Martin Skinner
|
||||||
Martin Storsjo
|
Martin Storsjo
|
||||||
Marty Kuhrt
|
Marty Kuhrt
|
||||||
Maruko
|
Maruko
|
||||||
Massimiliano Ziccardi
|
Massimiliano Ziccardi
|
||||||
|
Massimo Callegari
|
||||||
Mateusz Loskot
|
Mateusz Loskot
|
||||||
Mathias Axelsson
|
Mathias Axelsson
|
||||||
Mats Lidell
|
Mats Lidell
|
||||||
Matt Kraai
|
Matt Kraai
|
||||||
Matt Veenstra
|
Matt Veenstra
|
||||||
Matt Witherspoon
|
Matt Witherspoon
|
||||||
|
Matt Wixson
|
||||||
Matthew Blain
|
Matthew Blain
|
||||||
Matthew Clarke
|
Matthew Clarke
|
||||||
|
Matthias Bolte
|
||||||
Maurice Barnum
|
Maurice Barnum
|
||||||
|
Mauro Iorio
|
||||||
Max Katsev
|
Max Katsev
|
||||||
Maxim Ivanov
|
Maxim Ivanov
|
||||||
Maxim Perenesenko
|
Maxim Perenesenko
|
||||||
|
Mehmet Bozkurt
|
||||||
Mekonikum
|
Mekonikum
|
||||||
Mettgut Jamalla
|
Mettgut Jamalla
|
||||||
Michael Benedict
|
Michael Benedict
|
||||||
@@ -509,14 +567,17 @@ Michael Smith
|
|||||||
Michael Stillwell
|
Michael Stillwell
|
||||||
Michael Wallner
|
Michael Wallner
|
||||||
Michal Bonino
|
Michal Bonino
|
||||||
|
Michal Gorny
|
||||||
Michal Marek
|
Michal Marek
|
||||||
Michele Bini
|
Michele Bini
|
||||||
Mihai Ionescu
|
Mihai Ionescu
|
||||||
|
Mikael Johansson
|
||||||
Mikael Sennerholm
|
Mikael Sennerholm
|
||||||
Mike Bytnar
|
Mike Bytnar
|
||||||
Mike Crowe
|
Mike Crowe
|
||||||
Mike Dobbs
|
Mike Dobbs
|
||||||
Mike Hommey
|
Mike Hommey
|
||||||
|
Mike Power
|
||||||
Mike Protts
|
Mike Protts
|
||||||
Mike Revi
|
Mike Revi
|
||||||
Miklos Nemeth
|
Miklos Nemeth
|
||||||
@@ -531,6 +592,7 @@ Naveen Noel
|
|||||||
Neil Dunbar
|
Neil Dunbar
|
||||||
Neil Spring
|
Neil Spring
|
||||||
Nic Roets
|
Nic Roets
|
||||||
|
Nicholas Maniscalco
|
||||||
Nick Gimbrone
|
Nick Gimbrone
|
||||||
Nick Humfrey
|
Nick Humfrey
|
||||||
Nick Zitzmann
|
Nick Zitzmann
|
||||||
@@ -543,6 +605,7 @@ Nikita Schmidt
|
|||||||
Nikitinskit Dmitriy
|
Nikitinskit Dmitriy
|
||||||
Niklas Angebrand
|
Niklas Angebrand
|
||||||
Nikolai Kondrashov
|
Nikolai Kondrashov
|
||||||
|
Ning Dong
|
||||||
Nir Soffer
|
Nir Soffer
|
||||||
Nis Jorgensen
|
Nis Jorgensen
|
||||||
Nodak Sodak
|
Nodak Sodak
|
||||||
@@ -554,20 +617,25 @@ Olaf St
|
|||||||
Oren Tirosh
|
Oren Tirosh
|
||||||
P R Schaffner
|
P R Schaffner
|
||||||
Pascal Terjan
|
Pascal Terjan
|
||||||
|
Pasha Kuznetsov
|
||||||
|
Pat Ray
|
||||||
Patrick Bihan-Faou
|
Patrick Bihan-Faou
|
||||||
Patrick Monnerat
|
Patrick Monnerat
|
||||||
Patrick Scott
|
Patrick Scott
|
||||||
Patrick Smith
|
Patrick Smith
|
||||||
Patrik Thunstrom
|
Patrik Thunstrom
|
||||||
Paul Harrington
|
Paul Harrington
|
||||||
|
Paul Howarth
|
||||||
Paul Marquis
|
Paul Marquis
|
||||||
Paul Moore
|
Paul Moore
|
||||||
Paul Nolan
|
Paul Nolan
|
||||||
Paul Querna
|
Paul Querna
|
||||||
Pavel Cenek
|
Pavel Cenek
|
||||||
Pavel Orehov
|
Pavel Orehov
|
||||||
|
Pavel Raiskup
|
||||||
Pawel A. Gajda
|
Pawel A. Gajda
|
||||||
Pawel Kierski
|
Pawel Kierski
|
||||||
|
Pedro Larroy
|
||||||
Pedro Neves
|
Pedro Neves
|
||||||
Pete Su
|
Pete Su
|
||||||
Peter Bray
|
Peter Bray
|
||||||
@@ -595,13 +663,18 @@ Philippe Raoult
|
|||||||
Philippe Vaucher
|
Philippe Vaucher
|
||||||
Pierre
|
Pierre
|
||||||
Pierre Brico
|
Pierre Brico
|
||||||
|
Pierre Joye
|
||||||
Pooyan McSporran
|
Pooyan McSporran
|
||||||
Pramod Sharma
|
Pramod Sharma
|
||||||
Puneet Pawaia
|
Puneet Pawaia
|
||||||
Quagmire
|
Quagmire
|
||||||
|
Quanah Gibson-Mount
|
||||||
|
Quinn Slack
|
||||||
Rafa Muyo
|
Rafa Muyo
|
||||||
Rafael Sagula
|
Rafael Sagula
|
||||||
|
Rainer Canavan
|
||||||
Rainer Koenig
|
Rainer Koenig
|
||||||
|
Rajesh Naganathan
|
||||||
Ralf S. Engelschall
|
Ralf S. Engelschall
|
||||||
Ralph Beckmann
|
Ralph Beckmann
|
||||||
Ralph Mitchell
|
Ralph Mitchell
|
||||||
@@ -638,6 +711,7 @@ Robert Foreman
|
|||||||
Robert Iakobashvili
|
Robert Iakobashvili
|
||||||
Robert Olson
|
Robert Olson
|
||||||
Robert Weaver
|
Robert Weaver
|
||||||
|
Robin Cornelius
|
||||||
Robin Johnson
|
Robin Johnson
|
||||||
Robin Kay
|
Robin Kay
|
||||||
Robson Braga Araujo
|
Robson Braga Araujo
|
||||||
@@ -651,7 +725,11 @@ Ron Zapp
|
|||||||
Rosimildo da Silva
|
Rosimildo da Silva
|
||||||
Roy Shan
|
Roy Shan
|
||||||
Rune Kleveland
|
Rune Kleveland
|
||||||
|
Ruslan Gazizov
|
||||||
|
Rutger Hofman
|
||||||
|
Ryan Chan
|
||||||
Ryan Nelson
|
Ryan Nelson
|
||||||
|
Ryan Schmidt
|
||||||
S. Moonesamy
|
S. Moonesamy
|
||||||
Salvador D<>vila
|
Salvador D<>vila
|
||||||
Salvatore Sorrentino
|
Salvatore Sorrentino
|
||||||
@@ -659,8 +737,10 @@ Sam Listopad
|
|||||||
Sampo Kellomaki
|
Sampo Kellomaki
|
||||||
Samuel D<>az Garc<72>a
|
Samuel D<>az Garc<72>a
|
||||||
Samuel Listopad
|
Samuel Listopad
|
||||||
|
Samuel Thibault
|
||||||
Sander Gates
|
Sander Gates
|
||||||
Sandor Feldi
|
Sandor Feldi
|
||||||
|
Saqib Ali
|
||||||
Saul good
|
Saul good
|
||||||
Scott Barrett
|
Scott Barrett
|
||||||
Scott Cantor
|
Scott Cantor
|
||||||
@@ -676,6 +756,7 @@ Shard
|
|||||||
Shawn Poulson
|
Shawn Poulson
|
||||||
Shmulik Regev
|
Shmulik Regev
|
||||||
Siddhartha Prakash Jain
|
Siddhartha Prakash Jain
|
||||||
|
Sidney San Martin
|
||||||
Siegfried Gyuricsko
|
Siegfried Gyuricsko
|
||||||
Simon Dick
|
Simon Dick
|
||||||
Simon Josefsson
|
Simon Josefsson
|
||||||
@@ -689,6 +770,7 @@ Stan van de Burgt
|
|||||||
Stefan Esser
|
Stefan Esser
|
||||||
Stefan Krause
|
Stefan Krause
|
||||||
Stefan Teleman
|
Stefan Teleman
|
||||||
|
Stefan Tomanek
|
||||||
Stefan Ulrich
|
Stefan Ulrich
|
||||||
Stephan Bergmann
|
Stephan Bergmann
|
||||||
Stephen Collyer
|
Stephen Collyer
|
||||||
@@ -703,6 +785,7 @@ Steve Oliphant
|
|||||||
Steve Roskowski
|
Steve Roskowski
|
||||||
Steven Bazyl
|
Steven Bazyl
|
||||||
Steven G. Johnson
|
Steven G. Johnson
|
||||||
|
Steven M. Schweda
|
||||||
Stoned Elipot
|
Stoned Elipot
|
||||||
Sven Anders
|
Sven Anders
|
||||||
Sven Neuhaus
|
Sven Neuhaus
|
||||||
@@ -714,6 +797,7 @@ Tanguy Fautre
|
|||||||
Temprimus
|
Temprimus
|
||||||
Thomas J. Moore
|
Thomas J. Moore
|
||||||
Thomas Klausner
|
Thomas Klausner
|
||||||
|
Thomas Lopatic
|
||||||
Thomas Schwinge
|
Thomas Schwinge
|
||||||
Thomas Tonino
|
Thomas Tonino
|
||||||
Tim Ansell
|
Tim Ansell
|
||||||
@@ -721,12 +805,16 @@ Tim Baker
|
|||||||
Tim Bartley
|
Tim Bartley
|
||||||
Tim Chen
|
Tim Chen
|
||||||
Tim Costello
|
Tim Costello
|
||||||
|
Tim Newsome
|
||||||
Tim Sneddon
|
Tim Sneddon
|
||||||
|
Tinus van den Berg
|
||||||
Tobias Rundstr<74>m
|
Tobias Rundstr<74>m
|
||||||
Toby Peterson
|
Toby Peterson
|
||||||
|
Todd A Ouska
|
||||||
Todd Kulesza
|
Todd Kulesza
|
||||||
Todd Vierling
|
Todd Vierling
|
||||||
Tom Benoist
|
Tom Benoist
|
||||||
|
Tom Donovan
|
||||||
Tom Lee
|
Tom Lee
|
||||||
Tom Mattison
|
Tom Mattison
|
||||||
Tom Moers
|
Tom Moers
|
||||||
@@ -736,6 +824,7 @@ Tom Zerucha
|
|||||||
Tomas Pospisek
|
Tomas Pospisek
|
||||||
Tomas Szepe
|
Tomas Szepe
|
||||||
Tomasz Lacki
|
Tomasz Lacki
|
||||||
|
Tommie Gannert
|
||||||
Tommy Tam
|
Tommy Tam
|
||||||
Ton Voon
|
Ton Voon
|
||||||
Toon Verwaest
|
Toon Verwaest
|
||||||
@@ -757,10 +846,13 @@ Vincent Bronner
|
|||||||
Vincent Le Normand
|
Vincent Le Normand
|
||||||
Vincent Penquerc'h
|
Vincent Penquerc'h
|
||||||
Vincent Sanders
|
Vincent Sanders
|
||||||
|
Vincent Torri
|
||||||
Vlad Grachov
|
Vlad Grachov
|
||||||
|
Vlad Ureche
|
||||||
Vladimir Lazarenko
|
Vladimir Lazarenko
|
||||||
Vojtech Janota
|
Vojtech Janota
|
||||||
Vojtech Minarik
|
Vojtech Minarik
|
||||||
|
Vsevolod Novikov
|
||||||
Walter J. Mack
|
Walter J. Mack
|
||||||
Wayne Haigh
|
Wayne Haigh
|
||||||
Werner Koch
|
Werner Koch
|
||||||
|
126
docs/TODO
126
docs/TODO
@@ -16,6 +16,7 @@
|
|||||||
1.2 More data sharing
|
1.2 More data sharing
|
||||||
1.3 struct lifreq
|
1.3 struct lifreq
|
||||||
1.4 signal-based resolver timeouts
|
1.4 signal-based resolver timeouts
|
||||||
|
1.5 get rid of PATH_MAX
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
3.1 More and better
|
3.1 More and better
|
||||||
|
|
||||||
4. FTP
|
4. FTP
|
||||||
4.1 PRET
|
4.1 HOST
|
||||||
4.2 Alter passive/active on failure and retry
|
4.2 Alter passive/active on failure and retry
|
||||||
4.3 Earlier bad letter detection
|
4.3 Earlier bad letter detection
|
||||||
4.4 REST for large files
|
4.4 REST for large files
|
||||||
@@ -55,33 +56,27 @@
|
|||||||
7.7 Support other SSL libraries
|
7.7 Support other SSL libraries
|
||||||
7.8 Support SRP on the TLS layer
|
7.8 Support SRP on the TLS layer
|
||||||
7.9 improve configure --with-ssl
|
7.9 improve configure --with-ssl
|
||||||
7.10 Make NTLM work with other crypto functions
|
|
||||||
|
|
||||||
8. GnuTLS
|
8. GnuTLS
|
||||||
8.1 SSL engine stuff
|
8.1 SSL engine stuff
|
||||||
8.2 SRP
|
8.2 SRP
|
||||||
8.3 non-blocking
|
8.3 check connection
|
||||||
8.4 check connection
|
8.4 non-gcrypt
|
||||||
|
|
||||||
9. Other protocols
|
9. Other protocols
|
||||||
9.1 ditch ldap-specific select
|
|
||||||
|
|
||||||
10. New protocols
|
10. New protocols
|
||||||
10.1 RTSP
|
10.1 RSYNC
|
||||||
10.2 RSYNC
|
|
||||||
10.3 RTMP
|
|
||||||
|
|
||||||
11. Client
|
11. Client
|
||||||
11.1 Content-Disposition
|
11.1 sync
|
||||||
11.2 sync
|
11.2 glob posts
|
||||||
11.3 glob posts
|
11.3 prevent file overwriting
|
||||||
11.4 prevent file overwriting
|
11.4 simultaneous parallel transfers
|
||||||
11.5 ftp wildcard download
|
11.5 provide formpost headers
|
||||||
11.6 simultaneous parallel transfers
|
11.6 url-specific options
|
||||||
11.7 provide formpost headers
|
11.7 metalink support
|
||||||
11.8 url-specific options
|
11.8 warning when setting an option
|
||||||
11.9 metalink support
|
|
||||||
11.10 warning when setting an option
|
|
||||||
|
|
||||||
12. Build
|
12. Build
|
||||||
12.1 roffit
|
12.1 roffit
|
||||||
@@ -140,6 +135,15 @@
|
|||||||
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||||
ought to be replaced by setitimer on systems that support it.
|
ought to be replaced by setitimer on systems that support it.
|
||||||
|
|
||||||
|
1.5 get rid of PATH_MAX
|
||||||
|
|
||||||
|
Having code use and rely on PATH_MAX is not nice:
|
||||||
|
http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
|
||||||
|
|
||||||
|
Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
|
||||||
|
we need libssh2 to properly tell us when we pass in a too small buffer and
|
||||||
|
its current API (as of libssh2 1.2.7) doesn't.
|
||||||
|
|
||||||
2. libcurl - multi interface
|
2. libcurl - multi interface
|
||||||
|
|
||||||
2.1 More non-blocking
|
2.1 More non-blocking
|
||||||
@@ -148,7 +152,6 @@
|
|||||||
EWOULDBLOCK or similar. Blocking cases include:
|
EWOULDBLOCK or similar. Blocking cases include:
|
||||||
|
|
||||||
- Name resolves on non-windows unless c-ares is used
|
- Name resolves on non-windows unless c-ares is used
|
||||||
- GnuTLS SSL connections
|
|
||||||
- NSS SSL connections
|
- NSS SSL connections
|
||||||
- Active FTP connections
|
- Active FTP connections
|
||||||
- HTTP proxy CONNECT operations
|
- HTTP proxy CONNECT operations
|
||||||
@@ -190,7 +193,6 @@
|
|||||||
serial requests and currently libcurl only supports that for HEAD and GET
|
serial requests and currently libcurl only supports that for HEAD and GET
|
||||||
requests but it should also be possible for PUT.
|
requests but it should also be possible for PUT.
|
||||||
|
|
||||||
|
|
||||||
3. Documentation
|
3. Documentation
|
||||||
|
|
||||||
3.1 More and better
|
3.1 More and better
|
||||||
@@ -199,12 +201,12 @@
|
|||||||
|
|
||||||
4. FTP
|
4. FTP
|
||||||
|
|
||||||
4.1 PRET
|
4.1 HOST
|
||||||
|
|
||||||
PRET is a command that primarily "drftpd" supports, which could be useful
|
HOST is a suggested command in the works for a client to tell which host name
|
||||||
when using libcurl against such a server. It is a non-standard and a rather
|
to use, to offer FTP servers named-based virtual hosting:
|
||||||
oddly designed command, but...
|
|
||||||
http://curl.haxx.se/bug/feature.cgi?id=1729967
|
http://tools.ietf.org/html/draft-hethmon-mcmurray-ftp-hosts-11
|
||||||
|
|
||||||
4.2 Alter passive/active on failure and retry
|
4.2 Alter passive/active on failure and retry
|
||||||
|
|
||||||
@@ -343,14 +345,6 @@ to provide the data to send.
|
|||||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||||
then NSS...
|
then NSS...
|
||||||
|
|
||||||
7.10 Make NTLM work with other crypto functions
|
|
||||||
|
|
||||||
Get NTLM working using the functions provided by NSS etc. Not strictly
|
|
||||||
SSL/TLS related, but hey... Another option is to get available DES and MD4
|
|
||||||
source code from the cryptopp library. They are fine license-wise, but are
|
|
||||||
C++. NTLM currenly only works when libcurl is built with OpenSSL or GnuTLS
|
|
||||||
support.
|
|
||||||
|
|
||||||
8. GnuTLS
|
8. GnuTLS
|
||||||
|
|
||||||
8.1 SSL engine stuff
|
8.1 SSL engine stuff
|
||||||
@@ -362,54 +356,34 @@ to provide the data to send.
|
|||||||
Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
|
Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
|
||||||
TLS to provide name and password. GnuTLS already supports it...
|
TLS to provide name and password. GnuTLS already supports it...
|
||||||
|
|
||||||
8.3 non-blocking
|
8.3 check connection
|
||||||
|
|
||||||
Fix the connection phase to be non-blocking when multi interface is used
|
|
||||||
|
|
||||||
8.4 check connection
|
|
||||||
|
|
||||||
Add a way to check if the connection seems to be alive, to correspond to the
|
Add a way to check if the connection seems to be alive, to correspond to the
|
||||||
SSL_peak() way we use with OpenSSL.
|
SSL_peak() way we use with OpenSSL.
|
||||||
|
|
||||||
|
8.4 non-gcrypt
|
||||||
|
|
||||||
|
libcurl assumes that there are gcrypt functions available when
|
||||||
|
GnuTLS is.
|
||||||
|
|
||||||
|
GnuTLS can be built to use libnettle instead as crypto library,
|
||||||
|
which breaks the previously mentioned assumption
|
||||||
|
|
||||||
|
The correct fix would be to detect which crypto layer that is in use and
|
||||||
|
adapt our code to use that instead of blindly assuming gcrypt.
|
||||||
|
|
||||||
9. Other protocols
|
9. Other protocols
|
||||||
|
|
||||||
9.1 ditch ldap-specific select
|
|
||||||
|
|
||||||
* Look over the implementation. The looping will have to "go away" from the
|
|
||||||
lib/ldap.c source file and get moved to the main network code so that the
|
|
||||||
multi interface and friends will work for LDAP as well.
|
|
||||||
|
|
||||||
9.2 stop TFTP blocking
|
|
||||||
|
|
||||||
Stop TFTP from being blocking and doing its own read loop in tftp_do.
|
|
||||||
|
|
||||||
10. New protocols
|
10. New protocols
|
||||||
|
|
||||||
10.1 RTSP
|
10.1 RSYNC
|
||||||
|
|
||||||
RFC2326 (protocol - very HTTP-like, also contains URL description)
|
|
||||||
|
|
||||||
10.2 RSYNC
|
|
||||||
|
|
||||||
There's no RFC for protocol nor URI/URL format. An implementation should
|
There's no RFC for protocol nor URI/URL format. An implementation should
|
||||||
most probably use an existing rsync library, such as librsync.
|
most probably use an existing rsync library, such as librsync.
|
||||||
|
|
||||||
10.3 RTMP
|
|
||||||
|
|
||||||
There exists a patch that claims to introduce this protocol:
|
|
||||||
http://osdir.com/ml/gnu.gnash.devel2/2006-11/msg00278.html, further details
|
|
||||||
in the feature-request: http://curl.haxx.se/bug/feature.cgi?id=1843469
|
|
||||||
|
|
||||||
11. Client
|
11. Client
|
||||||
|
|
||||||
11.1 Content-Disposition
|
11.1 sync
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
11.2 sync
|
|
||||||
|
|
||||||
"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"
|
||||||
@@ -418,12 +392,12 @@ to provide the data to send.
|
|||||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||||
should also be used to set the mod date on the downloaded file.
|
should also be used to set the mod date on the downloaded file.
|
||||||
|
|
||||||
11.3 glob posts
|
11.2 glob posts
|
||||||
|
|
||||||
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||||
This is easily scripted though.
|
This is easily scripted though.
|
||||||
|
|
||||||
11.4 prevent file overwriting
|
11.3 prevent file overwriting
|
||||||
|
|
||||||
Add an option that prevents cURL from overwriting existing local files. When
|
Add an option that prevents cURL from overwriting existing local files. When
|
||||||
used, and there already is an existing file with the target file name
|
used, and there already is an existing file with the target file name
|
||||||
@@ -431,18 +405,14 @@ to provide the data to send.
|
|||||||
existing). So that index.html becomes first index.html.1 and then
|
existing). So that index.html becomes first index.html.1 and then
|
||||||
index.html.2 etc.
|
index.html.2 etc.
|
||||||
|
|
||||||
11.5 ftp wildcard download
|
11.4 simultaneous parallel transfers
|
||||||
|
|
||||||
"curl ftp://site.com/*.txt"
|
|
||||||
|
|
||||||
11.6 simultaneous parallel transfers
|
|
||||||
|
|
||||||
The client could be told to use maximum N simultaneous parallel transfers and
|
The client could be told to use maximum N simultaneous parallel transfers and
|
||||||
then just make sure that happens. It should of course not make more than one
|
then just make sure that happens. It should of course not make more than one
|
||||||
connection to the same remote host. This would require the client to use the
|
connection to the same remote host. This would require the client to use the
|
||||||
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||||
|
|
||||||
11.7 provide formpost headers
|
11.5 provide formpost headers
|
||||||
|
|
||||||
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
|
||||||
@@ -456,7 +426,7 @@ to provide the data to send.
|
|||||||
which should overwrite the program reasonable defaults (plain/text,
|
which should overwrite the program reasonable defaults (plain/text,
|
||||||
8bit...)
|
8bit...)
|
||||||
|
|
||||||
11.8 url-specific options
|
11.6 url-specific options
|
||||||
|
|
||||||
Provide a way to make options bound to a specific URL among several on the
|
Provide a way to make options bound to a specific URL among several on the
|
||||||
command line. Possibly by letting ':' separate options between URLs,
|
command line. Possibly by letting ':' separate options between URLs,
|
||||||
@@ -470,12 +440,12 @@ to provide the data to send.
|
|||||||
|
|
||||||
The example would do a POST-GET-POST combination on a single command line.
|
The example would do a POST-GET-POST combination on a single command line.
|
||||||
|
|
||||||
11.9 metalink support
|
11.7 metalink support
|
||||||
|
|
||||||
Add metalink support to curl (http://www.metalinker.org/). This is most useful
|
Add metalink support to curl (http://www.metalinker.org/). This is most useful
|
||||||
with simultaneous parallel transfers (11.6) but not necessary.
|
with simultaneous parallel transfers (11.6) but not necessary.
|
||||||
|
|
||||||
11.10 warning when setting an option
|
11.8 warning when setting an option
|
||||||
|
|
||||||
Display a warning when libcurl returns an error when setting an option.
|
Display a warning when libcurl returns an error when setting an option.
|
||||||
This can be useful to tell when support for a particular feature hasn't been
|
This can be useful to tell when support for a particular feature hasn't been
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
Online: http://curl.haxx.se/docs/httpscripting.html
|
Online: http://curl.haxx.se/docs/httpscripting.html
|
||||||
Date: May 28, 2008
|
Date: Jan 19, 2011
|
||||||
|
|
||||||
The Art Of Scripting HTTP Requests Using Curl
|
The Art Of Scripting HTTP Requests Using Curl
|
||||||
=============================================
|
=============================================
|
||||||
@@ -38,10 +38,26 @@ Date: May 28, 2008
|
|||||||
request a particular action, and then the server replies a few text lines
|
request a particular action, and then the server replies a few text lines
|
||||||
before the actual requested content is sent to the client.
|
before the actual requested content is sent to the client.
|
||||||
|
|
||||||
Using curl's option -v will display what kind of commands curl sends to the
|
The client, curl, sends a HTTP request. The request contains a method (like
|
||||||
server, as well as a few other informational texts. -v is the single most
|
GET, POST, HEAD etc), a number of request headers and sometimes a request
|
||||||
useful option when it comes to debug or even understand the curl<->server
|
body. The HTTP server responds with a status line (indicating if things went
|
||||||
interaction.
|
well), response headers and most often also a response body. The "body" part
|
||||||
|
is the plain data you requested, like the actual HTML or the image etc.
|
||||||
|
|
||||||
|
1.1 See the Protocol
|
||||||
|
|
||||||
|
Using curl's option --verbose (-v as a short option) will display what kind
|
||||||
|
of commands curl sends to the server, as well as a few other informational
|
||||||
|
texts.
|
||||||
|
|
||||||
|
--verbose is the single most useful option when it comes to debug or even
|
||||||
|
understand the curl<->server interaction.
|
||||||
|
|
||||||
|
Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
|
||||||
|
even more details as they show EVERYTHING curl sends and receives. Use it
|
||||||
|
like this:
|
||||||
|
|
||||||
|
curl --trace-ascii debugdump.txt http://www.example.com/
|
||||||
|
|
||||||
2. URL
|
2. URL
|
||||||
|
|
||||||
@@ -61,10 +77,10 @@ Date: May 28, 2008
|
|||||||
you get a web page returned in your terminal window. The entire HTML document
|
you get a web page returned in your terminal window. The entire HTML document
|
||||||
that that URL holds.
|
that that URL holds.
|
||||||
|
|
||||||
All HTTP replies contain a set of headers that are normally hidden, use
|
All HTTP replies contain a set of response headers that are normally hidden,
|
||||||
curl's -i option to display them as well as the rest of the document. You can
|
use curl's --include (-i) option to display them as well as the rest of the
|
||||||
also ask the remote server for ONLY the headers by using the -I option (which
|
document. You can also ask the remote server for ONLY the headers by using
|
||||||
will make curl issue a HEAD request).
|
the --head (-I) option (which will make curl issue a HEAD request).
|
||||||
|
|
||||||
4. Forms
|
4. Forms
|
||||||
|
|
||||||
@@ -103,7 +119,7 @@ Date: May 28, 2008
|
|||||||
To make curl do the GET form post for you, just enter the expected created
|
To make curl do the GET form post for you, just enter the expected created
|
||||||
URL:
|
URL:
|
||||||
|
|
||||||
curl "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
||||||
|
|
||||||
4.2 POST
|
4.2 POST
|
||||||
|
|
||||||
@@ -127,7 +143,8 @@ Date: May 28, 2008
|
|||||||
And to use curl to post this form with the same data filled in as before, we
|
And to use curl to post this form with the same data filled in as before, we
|
||||||
could do it like:
|
could do it like:
|
||||||
|
|
||||||
curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi
|
curl --data "birthyear=1905&press=%20OK%20" \
|
||||||
|
http://www.example.com/when.cgi
|
||||||
|
|
||||||
This kind of POST will use the Content-Type
|
This kind of POST will use the Content-Type
|
||||||
application/x-www-form-urlencoded and is the most widely used POST kind.
|
application/x-www-form-urlencoded and is the most widely used POST kind.
|
||||||
@@ -139,7 +156,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
Recent curl versions can in fact url-encode POST data for you, like this:
|
Recent curl versions can in fact url-encode POST data for you, like this:
|
||||||
|
|
||||||
curl --data-urlencode "name=I am Daniel" www.example.com
|
curl --data-urlencode "name=I am Daniel" http://www.example.com
|
||||||
|
|
||||||
4.3 File Upload POST
|
4.3 File Upload POST
|
||||||
|
|
||||||
@@ -160,7 +177,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
To post to a form like this with curl, you enter a command line like:
|
To post to a form like this with curl, you enter a command line like:
|
||||||
|
|
||||||
curl -F upload=@localfilename -F press=OK [URL]
|
curl --form upload=@localfilename --form press=OK [URL]
|
||||||
|
|
||||||
4.4 Hidden Fields
|
4.4 Hidden Fields
|
||||||
|
|
||||||
@@ -181,7 +198,7 @@ Date: May 28, 2008
|
|||||||
To post this with curl, you won't have to think about if the fields are
|
To post this with curl, you won't have to think about if the fields are
|
||||||
hidden or not. To curl they're all the same:
|
hidden or not. To curl they're all the same:
|
||||||
|
|
||||||
curl -d "birthyear=1905&press=OK&person=daniel" [URL]
|
curl --data "birthyear=1905&press=OK&person=daniel" [URL]
|
||||||
|
|
||||||
4.5 Figure Out What A POST Looks Like
|
4.5 Figure Out What A POST Looks Like
|
||||||
|
|
||||||
@@ -204,7 +221,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
Put a file to a HTTP server with curl:
|
Put a file to a HTTP server with curl:
|
||||||
|
|
||||||
curl -T uploadfile www.uploadhttp.com/receive.cgi
|
curl --upload-file uploadfile http://www.example.com/receive.cgi
|
||||||
|
|
||||||
6. HTTP Authentication
|
6. HTTP Authentication
|
||||||
|
|
||||||
@@ -217,7 +234,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
To tell curl to use a user and password for authentication:
|
To tell curl to use a user and password for authentication:
|
||||||
|
|
||||||
curl -u name:password www.secrets.com
|
curl --user name:password http://www.example.com
|
||||||
|
|
||||||
The site might require a different authentication method (check the headers
|
The site might require a different authentication method (check the headers
|
||||||
returned by the server), and then --ntlm, --digest, --negotiate or even
|
returned by the server), and then --ntlm, --digest, --negotiate or even
|
||||||
@@ -228,7 +245,7 @@ Date: May 28, 2008
|
|||||||
may require its own user and password to allow the client to get through to
|
may require its own user and password to allow the client to get through to
|
||||||
the Internet. To specify those with curl, run something like:
|
the Internet. To specify those with curl, run something like:
|
||||||
|
|
||||||
curl -U proxyuser:proxypassword curl.haxx.se
|
curl --proxy-user proxyuser:proxypassword curl.haxx.se
|
||||||
|
|
||||||
If your proxy requires the authentication to be done using the NTLM method,
|
If your proxy requires the authentication to be done using the NTLM method,
|
||||||
use --proxy-ntlm, if it requires Digest use --proxy-digest.
|
use --proxy-ntlm, if it requires Digest use --proxy-digest.
|
||||||
@@ -257,7 +274,7 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
Use curl to set the referer field with:
|
Use curl to set the referer field with:
|
||||||
|
|
||||||
curl -e http://curl.haxx.se daniel.haxx.se
|
curl --referer http://www.example.come http://www.example.com
|
||||||
|
|
||||||
8. User Agent
|
8. User Agent
|
||||||
|
|
||||||
@@ -273,13 +290,13 @@ Date: May 28, 2008
|
|||||||
is time to set the User Agent field to fool the server into thinking you're
|
is time to set the User Agent field to fool the server into thinking you're
|
||||||
one of those browsers.
|
one of those browsers.
|
||||||
|
|
||||||
To make curl look like Internet Explorer on a Windows 2000 box:
|
To make curl look like Internet Explorer 5 on a Windows 2000 box:
|
||||||
|
|
||||||
curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||||
|
|
||||||
Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
|
Or why not look like you're using Netscape 4.73 on an old Linux box:
|
||||||
|
|
||||||
curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||||
|
|
||||||
9. Redirects
|
9. Redirects
|
||||||
|
|
||||||
@@ -294,11 +311,12 @@ Date: May 28, 2008
|
|||||||
|
|
||||||
To tell curl to follow a Location:
|
To tell curl to follow a Location:
|
||||||
|
|
||||||
curl -L www.sitethatredirects.com
|
curl --location http://www.example.com
|
||||||
|
|
||||||
If you use curl to POST to a site that immediately redirects you to another
|
If you use curl to POST to a site that immediately redirects you to another
|
||||||
page, you can safely use -L and -d/-F together. Curl will only use POST in
|
page, you can safely use --location (-L) and --data/--form together. Curl will
|
||||||
the first request, and then revert to GET in the following operations.
|
only use POST in the first request, and then revert to GET in the following
|
||||||
|
operations.
|
||||||
|
|
||||||
10. Cookies
|
10. Cookies
|
||||||
|
|
||||||
@@ -320,16 +338,16 @@ Date: May 28, 2008
|
|||||||
The simplest way to send a few cookies to the server when getting a page with
|
The simplest way to send a few cookies to the server when getting a page with
|
||||||
curl is to add them on the command line like:
|
curl is to add them on the command line like:
|
||||||
|
|
||||||
curl -b "name=Daniel" www.cookiesite.com
|
curl --cookie "name=Daniel" http://www.example.com
|
||||||
|
|
||||||
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
||||||
to record cookies simply by recording headers. Record cookies with curl by
|
to record cookies simply by recording headers. Record cookies with curl by
|
||||||
using the -D option like:
|
using the --dump-header (-D) option like:
|
||||||
|
|
||||||
curl -D headers_and_cookies www.cookiesite.com
|
curl --dump-header headers_and_cookies http://www.example.com
|
||||||
|
|
||||||
(Take note that the -c option described below is a better way to store
|
(Take note that the --cookie-jar option described below is a better way to
|
||||||
cookies.)
|
store cookies.)
|
||||||
|
|
||||||
Curl has a full blown cookie parsing engine built-in that comes to use if you
|
Curl has a full blown cookie parsing engine built-in that comes to use if you
|
||||||
want to reconnect to a server and use cookies that were stored from a
|
want to reconnect to a server and use cookies that were stored from a
|
||||||
@@ -337,24 +355,25 @@ Date: May 28, 2008
|
|||||||
believing you had a previous connection). To use previously stored cookies,
|
believing you had a previous connection). To use previously stored cookies,
|
||||||
you run curl like:
|
you run curl like:
|
||||||
|
|
||||||
curl -b stored_cookies_in_file www.cookiesite.com
|
curl --cookie stored_cookies_in_file http://www.example.com
|
||||||
|
|
||||||
Curl's "cookie engine" gets enabled when you use the -b option. If you only
|
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
|
||||||
want curl to understand received cookies, use -b with a file that doesn't
|
only want curl to understand received cookies, use --cookie with a file that
|
||||||
exist. Example, if you want to let curl understand cookies from a page and
|
doesn't exist. Example, if you want to let curl understand cookies from a
|
||||||
follow a location (and thus possibly send back cookies it received), you can
|
page and follow a location (and thus possibly send back cookies it received),
|
||||||
invoke it like:
|
you can invoke it like:
|
||||||
|
|
||||||
curl -b nada -L www.cookiesite.com
|
curl --cookie nada --location http://www.example.com
|
||||||
|
|
||||||
Curl has the ability to read and write cookie files that use the same file
|
Curl has the ability to read and write cookie files that use the same file
|
||||||
format that Netscape and Mozilla do. It is a convenient way to share cookies
|
format that Netscape and Mozilla do. It is a convenient way to share cookies
|
||||||
between browsers and automatic scripts. The -b switch automatically detects
|
between browsers and automatic scripts. The --cookie (-b) switch
|
||||||
if a given file is such a cookie file and parses it, and by using the
|
automatically detects if a given file is such a cookie file and parses it,
|
||||||
-c/--cookie-jar option you'll make curl write a new cookie file at the end of
|
and by using the --cookie-jar (-c) option you'll make curl write a new cookie
|
||||||
an operation:
|
file at the end of an operation:
|
||||||
|
|
||||||
curl -b cookies.txt -c newcookies.txt www.cookiesite.com
|
curl --cookie cookies.txt --cookie-jar newcookies.txt \
|
||||||
|
http://www.example.com
|
||||||
|
|
||||||
11. HTTPS
|
11. HTTPS
|
||||||
|
|
||||||
@@ -370,7 +389,7 @@ Date: May 28, 2008
|
|||||||
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
||||||
libraries. To get a page from a HTTPS server, simply run curl like:
|
libraries. To get a page from a HTTPS server, simply run curl like:
|
||||||
|
|
||||||
curl https://that.secure.server.com
|
curl https://secure.example.com
|
||||||
|
|
||||||
11.1 Certificates
|
11.1 Certificates
|
||||||
|
|
||||||
@@ -381,13 +400,13 @@ Date: May 28, 2008
|
|||||||
can be specified on the command line or if not, entered interactively when
|
can be specified on the command line or if not, entered interactively when
|
||||||
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
||||||
|
|
||||||
curl -E mycert.pem https://that.secure.server.com
|
curl --cert mycert.pem https://secure.example.com
|
||||||
|
|
||||||
curl also tries to verify that the server is who it claims to be, by
|
curl also tries to verify that the server is who it claims to be, by
|
||||||
verifying the server's certificate against a locally stored CA cert
|
verifying the server's certificate against a locally stored CA cert
|
||||||
bundle. Failing the verification will cause curl to deny the connection. You
|
bundle. Failing the verification will cause curl to deny the connection. You
|
||||||
must then use -k in case you want to tell curl to ignore that the server
|
must then use --insecure (-k) in case you want to tell curl to ignore that
|
||||||
can't be verified.
|
the server can't be verified.
|
||||||
|
|
||||||
More about server certificate verification and ca cert bundles can be read
|
More about server certificate verification and ca cert bundles can be read
|
||||||
in the SSLCERTS document, available online here:
|
in the SSLCERTS document, available online here:
|
||||||
@@ -402,17 +421,18 @@ Date: May 28, 2008
|
|||||||
For example, you can change the POST request to a PROPFIND and send the data
|
For example, you can change the POST request to a PROPFIND and send the data
|
||||||
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
||||||
|
|
||||||
curl -d "<xml>" -H "Content-Type: text/xml" -X PROPFIND url.com
|
curl --data "<xml>" --header "Content-Type: text/xml" \
|
||||||
|
--request PROPFIND url.com
|
||||||
|
|
||||||
You can delete a default header by providing one without content. Like you
|
You can delete a default header by providing one without content. Like you
|
||||||
can ruin the request by chopping off the Host: header:
|
can ruin the request by chopping off the Host: header:
|
||||||
|
|
||||||
curl -H "Host:" http://mysite.com
|
curl --header "Host:" http://www.example.com
|
||||||
|
|
||||||
You can add headers the same way. Your server may want a "Destination:"
|
You can add headers the same way. Your server may want a "Destination:"
|
||||||
header, and you can add it:
|
header, and you can add it:
|
||||||
|
|
||||||
curl -H "Destination: http://moo.com/nowhere" http://url.com
|
curl --header "Destination: http://nowhere" http://example.com
|
||||||
|
|
||||||
13. Web Login
|
13. Web Login
|
||||||
|
|
||||||
@@ -443,7 +463,6 @@ Date: May 28, 2008
|
|||||||
to do a proper login POST. Remember that the contents need to be URL encoded
|
to do a proper login POST. Remember that the contents need to be URL encoded
|
||||||
when sent in a normal POST.
|
when sent in a normal POST.
|
||||||
|
|
||||||
|
|
||||||
14. Debug
|
14. Debug
|
||||||
|
|
||||||
Many times when you run curl on a site, you'll notice that the site doesn't
|
Many times when you run curl on a site, you'll notice that the site doesn't
|
||||||
@@ -456,8 +475,8 @@ Date: May 28, 2008
|
|||||||
* Use the --trace-ascii option to store fully detailed logs of the requests
|
* Use the --trace-ascii option to store fully detailed logs of the requests
|
||||||
for easier analyzing and better understanding
|
for easier analyzing and better understanding
|
||||||
|
|
||||||
* Make sure you check for and use cookies when needed (both reading with -b
|
* Make sure you check for and use cookies when needed (both reading with
|
||||||
and writing with -c)
|
--cookie and writing with --cookie-jar)
|
||||||
|
|
||||||
* Set user-agent to one like a recent popular browser does
|
* Set user-agent to one like a recent popular browser does
|
||||||
|
|
||||||
@@ -479,12 +498,10 @@ Date: May 28, 2008
|
|||||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||||
protocol.
|
protocol.
|
||||||
|
|
||||||
RFC 2396 explains the URL syntax.
|
RFC 3986 explains the URL syntax.
|
||||||
|
|
||||||
RFC 2109 defines how cookies are supposed to work.
|
RFC 2109 defines how cookies are supposed to work.
|
||||||
|
|
||||||
RFC 1867 defines the HTTP post upload format.
|
RFC 1867 defines the HTTP post upload format.
|
||||||
|
|
||||||
http://www.openssl.org is the home of the OpenSSL project
|
|
||||||
|
|
||||||
http://curl.haxx.se is the home of the cURL project
|
http://curl.haxx.se is the home of the cURL project
|
||||||
|
1029
docs/curl.1
1029
docs/curl.1
File diff suppressed because it is too large
Load Diff
35
docs/examples/.gitignore
vendored
Normal file
35
docs/examples/.gitignore
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
10-at-a-time
|
||||||
|
anyauthput
|
||||||
|
certinfo
|
||||||
|
chkspeed
|
||||||
|
cookie_interface
|
||||||
|
debug
|
||||||
|
fileupload
|
||||||
|
fopen
|
||||||
|
ftp-wildcard
|
||||||
|
ftpget
|
||||||
|
ftpgetinfo
|
||||||
|
ftpgetresp
|
||||||
|
ftpupload
|
||||||
|
getinfo
|
||||||
|
getinmemory
|
||||||
|
http-post
|
||||||
|
httpcustomheader
|
||||||
|
httpput
|
||||||
|
https
|
||||||
|
multi-app
|
||||||
|
multi-debugcallback
|
||||||
|
multi-double
|
||||||
|
multi-post
|
||||||
|
multi-single
|
||||||
|
persistant
|
||||||
|
post-callback
|
||||||
|
postit2
|
||||||
|
sendrecv
|
||||||
|
sepheaders
|
||||||
|
simple
|
||||||
|
simplepost
|
||||||
|
simplesmtp
|
||||||
|
simplessl
|
||||||
|
smtp-multi
|
||||||
|
smtp-tls
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi interface to download many
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi interface to download many
|
||||||
* files, but with a capped maximum amount of simultaneous transfers.
|
* files, but with a capped maximum amount of simultaneous transfers.
|
||||||
*
|
*
|
||||||
* Written by Michael Wallner
|
* Written by Michael Wallner
|
||||||
@@ -119,7 +132,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (U) {
|
while (U) {
|
||||||
while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(cm, &U));
|
curl_multi_perform(cm, &U);
|
||||||
|
|
||||||
if (U) {
|
if (U) {
|
||||||
FD_ZERO(&R);
|
FD_ZERO(&R);
|
||||||
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||||
|
|
||||||
@@ -34,4 +53,4 @@ LDADD = $(LIBDIR)/libcurl.la
|
|||||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
|
all: $(check_PROGRAMS)
|
||||||
|
@@ -1,11 +1,24 @@
|
|||||||
#############################################################################
|
#***************************************************************************
|
||||||
# _ _ ____ _
|
# _ _ ____ _
|
||||||
# Project ___| | | | _ \| |
|
# Project ___| | | | _ \| |
|
||||||
# / __| | | | |_) | |
|
# / __| | | | |_) | |
|
||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
# What to call the final executable
|
# What to call the final executable
|
||||||
TARGET = example
|
TARGET = example
|
||||||
|
@@ -1,16 +1,14 @@
|
|||||||
# These are all libcurl example programs to be test compiled
|
# These are all libcurl example programs to be test compiled
|
||||||
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
||||||
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \
|
||||||
getinfo getinmemory http-post httpput \
|
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
||||||
https multi-app multi-debugcallback multi-double \
|
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
||||||
multi-post multi-single persistant post-callback \
|
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||||
postit2 sepheaders simple simplepost simplessl \
|
smtp-multi simplesmtp smtp-tls
|
||||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo
|
|
||||||
|
|
||||||
# These examples require external dependencies that may not be commonly
|
# These examples require external dependencies that may not be commonly
|
||||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||||
COMPLICATED_EXAMPLES = \
|
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \
|
||||||
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
|
ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||||
ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
|
||||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
|
smooth-gtk-thread.c version-check.pl
|
||||||
|
|
||||||
|
@@ -1,3 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
## Makefile for building curl examples with MingW32
|
## Makefile for building curl examples with MingW32
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -14,8 +26,6 @@
|
|||||||
#else
|
#else
|
||||||
# ifdef __VMS
|
# ifdef __VMS
|
||||||
typedef int intptr_t;
|
typedef int intptr_t;
|
||||||
# else
|
|
||||||
# include <stdint.h>
|
|
||||||
# endif
|
# endif
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example using a "in core" PEM certificate to retrieve a https page.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example using a "in core" PEM certificate to retrieve a https page.
|
||||||
* Written by Theo Borm
|
* Written by Theo Borm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -111,7 +124,7 @@ int main(void)
|
|||||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
|
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
|
||||||
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
|
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
|
||||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
|
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
|
||||||
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.cacert.org/");
|
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
|
||||||
|
|
||||||
/* first try: retrieve page without cacerts' certificate -> will fail
|
/* first try: retrieve page without cacerts' certificate -> will fail
|
||||||
*/
|
*/
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
*/
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -9,9 +27,12 @@
|
|||||||
|
|
||||||
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
{
|
{
|
||||||
|
(void)stream;
|
||||||
|
(void)ptr;
|
||||||
return size * nmemb;
|
return size * nmemb;
|
||||||
}
|
}
|
||||||
int main(int argc, char **argv)
|
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@@ -20,7 +41,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.networking4all.com/");
|
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show how the callback function can be used to
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show how the callback function can be used to
|
||||||
* download data into a chunk of memory instead of storing it in a file.
|
* download data into a chunk of memory instead of storing it in a file.
|
||||||
* After successful download we use curl_easy_getinfo() calls to get the
|
* After successful download we use curl_easy_getinfo() calls to get the
|
||||||
* amount of downloaded bytes, the time used for the whole download, and
|
* amount of downloaded bytes, the time used for the whole download, and
|
||||||
@@ -40,6 +53,8 @@ static size_t WriteCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
{
|
{
|
||||||
/* we are not interested in the downloaded bytes itself,
|
/* we are not interested in the downloaded bytes itself,
|
||||||
so we only return the size we would have saved ... */
|
so we only return the size we would have saved ... */
|
||||||
|
(void)ptr; /* unused */
|
||||||
|
(void)data; /* unused */
|
||||||
return (size_t)(size * nmemb);
|
return (size_t)(size * nmemb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +63,7 @@ int main(int argc, char *argv[])
|
|||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
int prtsep = 0, prttime = 0;
|
int prtsep = 0, prttime = 0;
|
||||||
char *url = URL_1M;
|
const char *url = URL_1M;
|
||||||
char *appname = argv[0];
|
char *appname = argv[0];
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
@@ -69,7 +84,7 @@ int main(int argc, char *argv[])
|
|||||||
} else if (strncasecmp(*argv, "-T", 2) == 0) {
|
} else if (strncasecmp(*argv, "-T", 2) == 0) {
|
||||||
prttime = 1;
|
prttime = 1;
|
||||||
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
|
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
|
||||||
int m = atoi(*argv + 3);
|
long m = strtol((*argv)+3, NULL, 10);
|
||||||
switch(m) {
|
switch(m) {
|
||||||
case 1: url = URL_1M;
|
case 1: url = URL_1M;
|
||||||
break;
|
break;
|
||||||
@@ -135,17 +150,17 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* check for bytes downloaded */
|
/* check for bytes downloaded */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Data downloaded: %0.0f bytes.\n", val);
|
printf("Data downloaded: %0.0f bytes.\n", val);
|
||||||
|
|
||||||
/* check for total download time */
|
/* check for total download time */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Total download time: %0.3f sec.\n", val);
|
printf("Total download time: %0.3f sec.\n", val);
|
||||||
|
|
||||||
/* check for average download speed */
|
/* check for average download speed */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
|
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* This example shows usage of simple cookie interface.
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This example shows usage of simple cookie interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -53,7 +66,7 @@ main(void)
|
|||||||
if (curl) {
|
if (curl) {
|
||||||
char nline[256];
|
char nline[256];
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/"); /* google.com sets "PREF" cookie */
|
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||||
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
|
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -28,12 +40,12 @@ void dump(const char *text,
|
|||||||
/* without the hex output, we can fit more on screen */
|
/* without the hex output, we can fit more on screen */
|
||||||
width = 0x40;
|
width = 0x40;
|
||||||
|
|
||||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||||
text, (long)size, (long)size);
|
text, (long)size, (long)size);
|
||||||
|
|
||||||
for(i=0; i<size; i+= width) {
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
fprintf(stream, "%04.4lx: ", (long)i);
|
fprintf(stream, "%4.4lx: ", (long)i);
|
||||||
|
|
||||||
if(!nohex) {
|
if(!nohex) {
|
||||||
/* hex not disabled, show it */
|
/* hex not disabled, show it */
|
||||||
@@ -118,7 +130,7 @@ int main(void)
|
|||||||
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
|
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
/* always cleanup */
|
/* always cleanup */
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
* download many files at once.
|
* download many files at once.
|
||||||
*
|
*
|
||||||
* This example features the same basic functionality as hiperfifo.c does,
|
* This example features the same basic functionality as hiperfifo.c does,
|
||||||
@@ -68,7 +81,6 @@ typedef struct _GlobalInfo
|
|||||||
struct ev_io fifo_event;
|
struct ev_io fifo_event;
|
||||||
struct ev_timer timer_event;
|
struct ev_timer timer_event;
|
||||||
CURLM *multi;
|
CURLM *multi;
|
||||||
int prev_running;
|
|
||||||
int still_running;
|
int still_running;
|
||||||
FILE* input;
|
FILE* input;
|
||||||
} GlobalInfo;
|
} GlobalInfo;
|
||||||
@@ -122,7 +134,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||||||
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_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||||
@@ -144,54 +155,33 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||||||
|
|
||||||
|
|
||||||
/* Check for completed transfers, and remove their easy handles */
|
/* Check for completed transfers, and remove their easy handles */
|
||||||
static void check_run_count(GlobalInfo *g)
|
static void check_multi_info(GlobalInfo *g)
|
||||||
{
|
{
|
||||||
DPRINT("%s prev %i still %i\n", __PRETTY_FUNCTION__,
|
char *eff_url;
|
||||||
g->prev_running, g->still_running);
|
CURLMsg *msg;
|
||||||
if ( g->prev_running > g->still_running )
|
int msgs_left;
|
||||||
{
|
ConnInfo *conn;
|
||||||
char *eff_url=NULL;
|
CURL *easy;
|
||||||
CURLMsg *msg;
|
CURLcode res;
|
||||||
int msgs_left;
|
|
||||||
ConnInfo *conn=NULL;
|
|
||||||
CURL*easy;
|
|
||||||
CURLcode res;
|
|
||||||
|
|
||||||
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
||||||
/*
|
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||||
I am still uncertain whether it is safe to remove an easy
|
if (msg->msg == CURLMSG_DONE) {
|
||||||
handle from inside the curl_multi_info_read loop, so here I
|
easy = msg->easy_handle;
|
||||||
will search for completed transfers in the inner "while"
|
res = msg->data.result;
|
||||||
loop, and then remove them in the outer "do-while" loop...
|
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||||
*/
|
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||||
do
|
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||||
{
|
curl_multi_remove_handle(g->multi, easy);
|
||||||
easy=NULL;
|
free(conn->url);
|
||||||
while ( (msg = curl_multi_info_read(g->multi, &msgs_left)) )
|
curl_easy_cleanup(easy);
|
||||||
{
|
free(conn);
|
||||||
if ( msg->msg == CURLMSG_DONE )
|
}
|
||||||
{
|
|
||||||
easy=msg->easy_handle;
|
|
||||||
res=msg->data.result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( easy )
|
|
||||||
{
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
|
||||||
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
|
||||||
curl_multi_remove_handle(g->multi, easy);
|
|
||||||
free(conn->url);
|
|
||||||
curl_easy_cleanup(easy);
|
|
||||||
free(conn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while ( easy );
|
|
||||||
}
|
}
|
||||||
g->prev_running = g->still_running;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Called by libevent when we get action on a multi socket */
|
/* Called by libevent when we get action on a multi socket */
|
||||||
static void event_cb(EV_P_ struct ev_io *w, int revents)
|
static void event_cb(EV_P_ struct ev_io *w, int revents)
|
||||||
{
|
{
|
||||||
@@ -201,12 +191,9 @@ static void event_cb(EV_P_ struct ev_io *w, int revents)
|
|||||||
|
|
||||||
int action = (revents&EV_READ?CURL_POLL_IN:0)|
|
int action = (revents&EV_READ?CURL_POLL_IN:0)|
|
||||||
(revents&EV_WRITE?CURL_POLL_OUT:0);
|
(revents&EV_WRITE?CURL_POLL_OUT:0);
|
||||||
do
|
rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
|
||||||
{
|
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||||
rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
|
check_multi_info(g);
|
||||||
} while ( rc == CURLM_CALL_MULTI_PERFORM );
|
|
||||||
mcode_or_die("event_cb: curl_multi_socket", rc);
|
|
||||||
check_run_count(g);
|
|
||||||
if ( g->still_running <= 0 )
|
if ( g->still_running <= 0 )
|
||||||
{
|
{
|
||||||
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
||||||
@@ -222,12 +209,9 @@ static void timer_cb(EV_P_ struct ev_timer *w, int revents)
|
|||||||
GlobalInfo *g = (GlobalInfo *)w->data;
|
GlobalInfo *g = (GlobalInfo *)w->data;
|
||||||
CURLMcode rc;
|
CURLMcode rc;
|
||||||
|
|
||||||
do
|
rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||||
{
|
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||||
rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
check_multi_info(g);
|
||||||
} while ( rc == CURLM_CALL_MULTI_PERFORM );
|
|
||||||
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
|
||||||
check_run_count(g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clean up the SockInfo structure */
|
/* Clean up the SockInfo structure */
|
||||||
@@ -364,11 +348,11 @@ static void new_conn(char *url, GlobalInfo *g )
|
|||||||
|
|
||||||
fprintf(MSG_OUT,
|
fprintf(MSG_OUT,
|
||||||
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
rc = curl_multi_add_handle(g->multi, conn->easy);
|
||||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||||
|
|
||||||
mcode_or_die("new_conn: curl_multi_socket_all", rc);
|
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||||
check_run_count(g);
|
that the necessary socket_action() call will be called by this app */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This gets called whenever data is received from the fifo */
|
/* This gets called whenever data is received from the fifo */
|
||||||
@@ -396,7 +380,7 @@ static int init_fifo (GlobalInfo *g)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
static const char *fifo = "hiper.fifo";
|
static const char *fifo = "hiper.fifo";
|
||||||
int sockfd;
|
curl_socket_t sockfd;
|
||||||
|
|
||||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||||
if ( lstat (fifo, &st) == 0 )
|
if ( lstat (fifo, &st) == 0 )
|
||||||
@@ -448,10 +432,9 @@ int main(int argc, char **argv)
|
|||||||
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_TIMERFUNCTION, multi_timer_cb);
|
||||||
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
||||||
do
|
|
||||||
{
|
/* we don't call any curl_multi_socket*() function yet as we have no handles
|
||||||
rc = curl_multi_socket_all(g.multi, &g.still_running);
|
added! */
|
||||||
} while ( CURLM_CALL_MULTI_PERFORM == rc );
|
|
||||||
|
|
||||||
ev_loop(g.loop, 0);
|
ev_loop(g.loop, 0);
|
||||||
curl_multi_cleanup(g.multi);
|
curl_multi_cleanup(g.multi);
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@@ -53,20 +53,24 @@
|
|||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
|
enum fcurl_type_e {
|
||||||
|
CFTYPE_NONE=0,
|
||||||
|
CFTYPE_FILE=1,
|
||||||
|
CFTYPE_CURL=2
|
||||||
|
};
|
||||||
|
|
||||||
struct fcurl_data
|
struct fcurl_data
|
||||||
{
|
{
|
||||||
enum fcurl_type_e type; /* type of handle */
|
enum fcurl_type_e type; /* type of handle */
|
||||||
union {
|
union {
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
} handle; /* handle */
|
} handle; /* handle */
|
||||||
|
|
||||||
char *buffer; /* buffer to store cached data*/
|
char *buffer; /* buffer to store cached data*/
|
||||||
int buffer_len; /* currently allocated buffers length */
|
size_t buffer_len; /* currently allocated buffers length */
|
||||||
int buffer_pos; /* end of data in buffer*/
|
size_t buffer_pos; /* end of data in buffer*/
|
||||||
int still_running; /* Is background url fetch still in progress */
|
int still_running; /* Is background url fetch still in progress */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct fcurl_data URL_FILE;
|
typedef struct fcurl_data URL_FILE;
|
||||||
@@ -76,491 +80,448 @@ 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);
|
||||||
char * url_fgets(char *ptr, int size, URL_FILE *file);
|
char * url_fgets(char *ptr, size_t size, URL_FILE *file);
|
||||||
void url_rewind(URL_FILE *file);
|
void url_rewind(URL_FILE *file);
|
||||||
|
|
||||||
/* we use a global one for convenience */
|
/* we use a global one for convenience */
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
|
|
||||||
/* curl calls this routine to get more data */
|
/* curl calls this routine to get more data */
|
||||||
static size_t
|
static size_t write_callback(char *buffer,
|
||||||
write_callback(char *buffer,
|
size_t size,
|
||||||
size_t size,
|
size_t nitems,
|
||||||
size_t nitems,
|
void *userp)
|
||||||
void *userp)
|
|
||||||
{
|
{
|
||||||
char *newbuff;
|
char *newbuff;
|
||||||
int rembuff;
|
size_t rembuff;
|
||||||
|
|
||||||
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 enough 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)
|
fprintf(stderr,"callback buffer grow failed\n");
|
||||||
{
|
size=rembuff;
|
||||||
fprintf(stderr,"callback buffer grow failed\n");
|
|
||||||
size=rembuff;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* realloc suceeded increase buffer size*/
|
|
||||||
url->buffer_len+=size - rembuff;
|
|
||||||
url->buffer=newbuff;
|
|
||||||
|
|
||||||
/*printf("Callback buffer grown to %d bytes\n",url->buffer_len);*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* realloc suceeded increase buffer size*/
|
||||||
|
url->buffer_len+=size - rembuff;
|
||||||
|
url->buffer=newbuff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&url->buffer[url->buffer_pos], buffer, size);
|
memcpy(&url->buffer[url->buffer_pos], buffer, size);
|
||||||
url->buffer_pos += size;
|
url->buffer_pos += size;
|
||||||
|
|
||||||
/*fprintf(stderr, "callback %d size bytes\n", size);*/
|
return size;
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use to attempt to fill the read buffer up to requested number of bytes */
|
/* use to attempt to fill the read buffer up to requested number of bytes */
|
||||||
static int
|
static int fill_buffer(URL_FILE *file, size_t want)
|
||||||
fill_buffer(URL_FILE *file,int want,int waittime)
|
|
||||||
{
|
{
|
||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
struct timeval timeout;
|
||||||
struct timeval timeout;
|
int rc;
|
||||||
int rc;
|
|
||||||
|
|
||||||
/* only attempt to fill buffer if transactions still running and buffer
|
/* only attempt to fill buffer if transactions still running and buffer
|
||||||
* doesnt exceed required size already
|
* doesnt exceed required size already
|
||||||
*/
|
*/
|
||||||
if((!file->still_running) || (file->buffer_pos > want))
|
if((!file->still_running) || (file->buffer_pos > want))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* attempt to fill buffer */
|
/* attempt to fill buffer */
|
||||||
do
|
do {
|
||||||
{
|
int maxfd = -1;
|
||||||
FD_ZERO(&fdread);
|
long curl_timeo = -1;
|
||||||
FD_ZERO(&fdwrite);
|
|
||||||
FD_ZERO(&fdexcep);
|
|
||||||
|
|
||||||
/* set a suitable timeout to fail on */
|
FD_ZERO(&fdread);
|
||||||
timeout.tv_sec = 60; /* 1 minute */
|
FD_ZERO(&fdwrite);
|
||||||
timeout.tv_usec = 0;
|
FD_ZERO(&fdexcep);
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* set a suitable timeout to fail on */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
timeout.tv_sec = 60; /* 1 minute */
|
||||||
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1
|
if(curl_timeo >= 0) {
|
||||||
so that the call to select() below makes sense! */
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
/* get file descriptors from the transfers */
|
||||||
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
switch(rc) {
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
case -1:
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
/* select error */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially
|
||||||
break;
|
in case of (maxfd == -1), we call select(0, ...), which is basically
|
||||||
|
equal to sleep. */
|
||||||
|
|
||||||
case 0:
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
switch(rc) {
|
||||||
/* timeout or readable/writable sockets */
|
case -1:
|
||||||
/* note we *could* be more efficient and not wait for
|
/* select error */
|
||||||
* CURLM_CALL_MULTI_PERFORM to clear here and check it on re-entry
|
break;
|
||||||
* but that gets messy */
|
|
||||||
while(curl_multi_perform(multi_handle, &file->still_running) ==
|
|
||||||
CURLM_CALL_MULTI_PERFORM);
|
|
||||||
|
|
||||||
break;
|
case 0:
|
||||||
}
|
default:
|
||||||
} while(file->still_running && (file->buffer_pos < want));
|
/* timeout or readable/writable sockets */
|
||||||
return 1;
|
curl_multi_perform(multi_handle, &file->still_running);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} while(file->still_running && (file->buffer_pos < want));
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use to remove want bytes from the front of a files buffer */
|
/* use to remove want bytes from the front of a files buffer */
|
||||||
static int
|
static int use_buffer(URL_FILE *file,int want)
|
||||||
use_buffer(URL_FILE *file,int want)
|
|
||||||
{
|
{
|
||||||
/* sort out buffer */
|
/* sort out buffer */
|
||||||
if((file->buffer_pos - want) <=0)
|
if((file->buffer_pos - want) <=0) {
|
||||||
{
|
/* ditch buffer - write will recreate */
|
||||||
/* ditch buffer - write will recreate */
|
|
||||||
if(file->buffer)
|
|
||||||
free(file->buffer);
|
|
||||||
|
|
||||||
file->buffer=NULL;
|
|
||||||
file->buffer_pos=0;
|
|
||||||
file->buffer_len=0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* move rest down make it available for later */
|
|
||||||
memmove(file->buffer,
|
|
||||||
&file->buffer[want],
|
|
||||||
(file->buffer_pos - want));
|
|
||||||
|
|
||||||
file->buffer_pos -= want;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
URL_FILE *
|
|
||||||
url_fopen(const char *url,const char *operation)
|
|
||||||
{
|
|
||||||
/* this code could check for URLs or types in the 'url' and
|
|
||||||
basicly use the real fopen() for standard files */
|
|
||||||
|
|
||||||
URL_FILE *file;
|
|
||||||
(void)operation;
|
|
||||||
|
|
||||||
file = malloc(sizeof(URL_FILE));
|
|
||||||
if(!file)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
memset(file, 0, sizeof(URL_FILE));
|
|
||||||
|
|
||||||
if((file->handle.file=fopen(url,operation)))
|
|
||||||
{
|
|
||||||
file->type = CFTYPE_FILE; /* marked as URL */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
file->type = CFTYPE_CURL; /* marked as URL */
|
|
||||||
file->handle.curl = curl_easy_init();
|
|
||||||
|
|
||||||
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_VERBOSE, 0L);
|
|
||||||
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
|
|
||||||
|
|
||||||
if(!multi_handle)
|
|
||||||
multi_handle = curl_multi_init();
|
|
||||||
|
|
||||||
curl_multi_add_handle(multi_handle, file->handle.curl);
|
|
||||||
|
|
||||||
/* lets start the fetch */
|
|
||||||
while(curl_multi_perform(multi_handle, &file->still_running) ==
|
|
||||||
CURLM_CALL_MULTI_PERFORM );
|
|
||||||
|
|
||||||
if((file->buffer_pos == 0) && (!file->still_running))
|
|
||||||
{
|
|
||||||
/* if still_running is 0 now, we should return NULL */
|
|
||||||
|
|
||||||
/* make sure the easy handle is not in the multi handle anymore */
|
|
||||||
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
curl_easy_cleanup(file->handle.curl);
|
|
||||||
|
|
||||||
free(file);
|
|
||||||
|
|
||||||
file = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return file;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
url_fclose(URL_FILE *file)
|
|
||||||
{
|
|
||||||
int ret=0;/* default is good return */
|
|
||||||
|
|
||||||
switch(file->type)
|
|
||||||
{
|
|
||||||
case CFTYPE_FILE:
|
|
||||||
ret=fclose(file->handle.file); /* passthrough */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CFTYPE_CURL:
|
|
||||||
/* make sure the easy handle is not in the multi handle anymore */
|
|
||||||
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
|
||||||
|
|
||||||
/* cleanup */
|
|
||||||
curl_easy_cleanup(file->handle.curl);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: /* unknown or supported type - oh dear */
|
|
||||||
ret=EOF;
|
|
||||||
errno=EBADF;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(file->buffer)
|
if(file->buffer)
|
||||||
free(file->buffer);/* free any allocated buffer space */
|
free(file->buffer);
|
||||||
|
|
||||||
free(file);
|
file->buffer=NULL;
|
||||||
|
file->buffer_pos=0;
|
||||||
|
file->buffer_len=0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* move rest down make it available for later */
|
||||||
|
memmove(file->buffer,
|
||||||
|
&file->buffer[want],
|
||||||
|
(file->buffer_pos - want));
|
||||||
|
|
||||||
return ret;
|
file->buffer_pos -= want;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
URL_FILE *url_fopen(const char *url,const char *operation)
|
||||||
url_feof(URL_FILE *file)
|
|
||||||
{
|
{
|
||||||
int ret=0;
|
/* this code could check for URLs or types in the 'url' and
|
||||||
|
basicly use the real fopen() for standard files */
|
||||||
|
|
||||||
switch(file->type)
|
URL_FILE *file;
|
||||||
{
|
(void)operation;
|
||||||
case CFTYPE_FILE:
|
|
||||||
ret=feof(file->handle.file);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CFTYPE_CURL:
|
file = malloc(sizeof(URL_FILE));
|
||||||
if((file->buffer_pos == 0) && (!file->still_running))
|
if(!file)
|
||||||
ret = 1;
|
return NULL;
|
||||||
break;
|
|
||||||
default: /* unknown or supported type - oh dear */
|
memset(file, 0, sizeof(URL_FILE));
|
||||||
ret=-1;
|
|
||||||
errno=EBADF;
|
if((file->handle.file=fopen(url,operation)))
|
||||||
break;
|
file->type = CFTYPE_FILE; /* marked as URL */
|
||||||
|
|
||||||
|
else {
|
||||||
|
file->type = CFTYPE_CURL; /* marked as URL */
|
||||||
|
file->handle.curl = curl_easy_init();
|
||||||
|
|
||||||
|
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_VERBOSE, 0L);
|
||||||
|
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
|
||||||
|
|
||||||
|
if(!multi_handle)
|
||||||
|
multi_handle = curl_multi_init();
|
||||||
|
|
||||||
|
curl_multi_add_handle(multi_handle, file->handle.curl);
|
||||||
|
|
||||||
|
/* lets start the fetch */
|
||||||
|
curl_multi_perform(multi_handle, &file->still_running);
|
||||||
|
|
||||||
|
if((file->buffer_pos == 0) && (!file->still_running)) {
|
||||||
|
/* if still_running is 0 now, we should return NULL */
|
||||||
|
|
||||||
|
/* make sure the easy handle is not in the multi handle anymore */
|
||||||
|
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
curl_easy_cleanup(file->handle.curl);
|
||||||
|
|
||||||
|
free(file);
|
||||||
|
|
||||||
|
file = NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
}
|
||||||
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
int url_fclose(URL_FILE *file)
|
||||||
url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
|
||||||
{
|
{
|
||||||
size_t want;
|
int ret=0;/* default is good return */
|
||||||
|
|
||||||
switch(file->type)
|
switch(file->type) {
|
||||||
{
|
case CFTYPE_FILE:
|
||||||
case CFTYPE_FILE:
|
ret=fclose(file->handle.file); /* passthrough */
|
||||||
want=fread(ptr,size,nmemb,file->handle.file);
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
case CFTYPE_CURL:
|
case CFTYPE_CURL:
|
||||||
want = nmemb * size;
|
/* make sure the easy handle is not in the multi handle anymore */
|
||||||
|
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
||||||
|
|
||||||
fill_buffer(file,want,1);
|
/* cleanup */
|
||||||
|
curl_easy_cleanup(file->handle.curl);
|
||||||
|
break;
|
||||||
|
|
||||||
/* check if theres data in the buffer - if not fill_buffer()
|
default: /* unknown or supported type - oh dear */
|
||||||
* either errored or EOF */
|
ret=EOF;
|
||||||
if(!file->buffer_pos)
|
errno=EBADF;
|
||||||
return 0;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* ensure only available data is considered */
|
if(file->buffer)
|
||||||
if(file->buffer_pos < want)
|
free(file->buffer);/* free any allocated buffer space */
|
||||||
want = file->buffer_pos;
|
|
||||||
|
|
||||||
/* xfer data to caller */
|
free(file);
|
||||||
memcpy(ptr, file->buffer, want);
|
|
||||||
|
|
||||||
use_buffer(file,want);
|
return ret;
|
||||||
|
|
||||||
want = want / size; /* number of items - nb correct op - checked
|
|
||||||
* with glibc code*/
|
|
||||||
|
|
||||||
/*printf("(fread) return %d bytes %d left\n", want,file->buffer_pos);*/
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: /* unknown or supported type - oh dear */
|
|
||||||
want=0;
|
|
||||||
errno=EBADF;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return want;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
int url_feof(URL_FILE *file)
|
||||||
url_fgets(char *ptr, int size, URL_FILE *file)
|
|
||||||
{
|
{
|
||||||
int want = size - 1;/* always need to leave room for zero termination */
|
int ret=0;
|
||||||
int loop;
|
|
||||||
|
|
||||||
switch(file->type)
|
switch(file->type) {
|
||||||
{
|
case CFTYPE_FILE:
|
||||||
case CFTYPE_FILE:
|
ret=feof(file->handle.file);
|
||||||
ptr = fgets(ptr,size,file->handle.file);
|
break;
|
||||||
break;
|
|
||||||
|
case CFTYPE_CURL:
|
||||||
case CFTYPE_CURL:
|
if((file->buffer_pos == 0) && (!file->still_running))
|
||||||
fill_buffer(file,want,1);
|
ret = 1;
|
||||||
|
break;
|
||||||
/* check if theres data in the buffer - if not fill either errored or
|
|
||||||
* EOF */
|
default: /* unknown or supported type - oh dear */
|
||||||
if(!file->buffer_pos)
|
ret=-1;
|
||||||
return NULL;
|
errno=EBADF;
|
||||||
|
break;
|
||||||
/* ensure only available data is considered */
|
}
|
||||||
if(file->buffer_pos < want)
|
return ret;
|
||||||
want = file->buffer_pos;
|
}
|
||||||
|
|
||||||
/*buffer contains data */
|
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||||
/* look for newline or eof */
|
{
|
||||||
for(loop=0;loop < want;loop++)
|
size_t want;
|
||||||
{
|
|
||||||
if(file->buffer[loop] == '\n')
|
switch(file->type) {
|
||||||
{
|
case CFTYPE_FILE:
|
||||||
want=loop+1;/* include newline */
|
want=fread(ptr,size,nmemb,file->handle.file);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
case CFTYPE_CURL:
|
||||||
|
want = nmemb * size;
|
||||||
/* xfer data to caller */
|
|
||||||
memcpy(ptr, file->buffer, want);
|
fill_buffer(file,want);
|
||||||
ptr[want]=0;/* allways null terminate */
|
|
||||||
|
/* check if theres data in the buffer - if not fill_buffer()
|
||||||
use_buffer(file,want);
|
* either errored or EOF */
|
||||||
|
if(!file->buffer_pos)
|
||||||
/*printf("(fgets) return %d bytes %d left\n", want,file->buffer_pos);*/
|
return 0;
|
||||||
break;
|
|
||||||
|
/* ensure only available data is considered */
|
||||||
default: /* unknown or supported type - oh dear */
|
if(file->buffer_pos < want)
|
||||||
ptr=NULL;
|
want = file->buffer_pos;
|
||||||
errno=EBADF;
|
|
||||||
|
/* xfer data to caller */
|
||||||
|
memcpy(ptr, file->buffer, want);
|
||||||
|
|
||||||
|
use_buffer(file,want);
|
||||||
|
|
||||||
|
want = want / size; /* number of items */
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: /* unknown or supported type - oh dear */
|
||||||
|
want=0;
|
||||||
|
errno=EBADF;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return want;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *url_fgets(char *ptr, size_t size, URL_FILE *file)
|
||||||
|
{
|
||||||
|
size_t want = size - 1;/* always need to leave room for zero termination */
|
||||||
|
size_t loop;
|
||||||
|
|
||||||
|
switch(file->type) {
|
||||||
|
case CFTYPE_FILE:
|
||||||
|
ptr = fgets(ptr,size,file->handle.file);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CFTYPE_CURL:
|
||||||
|
fill_buffer(file,want);
|
||||||
|
|
||||||
|
/* check if theres data in the buffer - if not fill either errored or
|
||||||
|
* EOF */
|
||||||
|
if(!file->buffer_pos)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* ensure only available data is considered */
|
||||||
|
if(file->buffer_pos < want)
|
||||||
|
want = file->buffer_pos;
|
||||||
|
|
||||||
|
/*buffer contains data */
|
||||||
|
/* look for newline or eof */
|
||||||
|
for(loop=0;loop < want;loop++) {
|
||||||
|
if(file->buffer[loop] == '\n') {
|
||||||
|
want=loop+1;/* include newline */
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ptr;/*success */
|
/* xfer data to caller */
|
||||||
|
memcpy(ptr, file->buffer, want);
|
||||||
|
ptr[want]=0;/* allways null terminate */
|
||||||
|
|
||||||
|
use_buffer(file,want);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: /* unknown or supported type - oh dear */
|
||||||
|
ptr=NULL;
|
||||||
|
errno=EBADF;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ptr;/*success */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void url_rewind(URL_FILE *file)
|
||||||
url_rewind(URL_FILE *file)
|
|
||||||
{
|
{
|
||||||
switch(file->type)
|
switch(file->type) {
|
||||||
{
|
case CFTYPE_FILE:
|
||||||
case CFTYPE_FILE:
|
rewind(file->handle.file); /* passthrough */
|
||||||
rewind(file->handle.file); /* passthrough */
|
break;
|
||||||
break;
|
|
||||||
|
|
||||||
case CFTYPE_CURL:
|
case CFTYPE_CURL:
|
||||||
/* halt transaction */
|
/* halt transaction */
|
||||||
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
curl_multi_remove_handle(multi_handle, file->handle.curl);
|
||||||
|
|
||||||
/* restart */
|
/* restart */
|
||||||
curl_multi_add_handle(multi_handle, file->handle.curl);
|
curl_multi_add_handle(multi_handle, file->handle.curl);
|
||||||
|
|
||||||
/* ditch buffer - write will recreate - resets stream pos*/
|
/* ditch buffer - write will recreate - resets stream pos*/
|
||||||
if(file->buffer)
|
if(file->buffer)
|
||||||
free(file->buffer);
|
free(file->buffer);
|
||||||
|
|
||||||
file->buffer=NULL;
|
file->buffer=NULL;
|
||||||
file->buffer_pos=0;
|
file->buffer_pos=0;
|
||||||
file->buffer_len=0;
|
file->buffer_len=0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* unknown or supported type - oh dear */
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
default: /* unknown or supported type - oh dear */
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Small main program to retrive from a url using fgets and fread saving the
|
/* Small main program to retrive from a url using fgets and fread saving the
|
||||||
* output to two test files (note the fgets method will corrupt binary files if
|
* output to two test files (note the fgets method will corrupt binary files if
|
||||||
* they contain 0 chars */
|
* they contain 0 chars */
|
||||||
int
|
int main(int argc, char *argv[])
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
{
|
||||||
URL_FILE *handle;
|
URL_FILE *handle;
|
||||||
FILE *outf;
|
FILE *outf;
|
||||||
|
|
||||||
int nread;
|
int nread;
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
const char *url;
|
const char *url;
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
{
|
url="http://192.168.7.3/testfile";/* default to testurl */
|
||||||
url="http://192.168.7.3/testfile";/* default to testurl */
|
else
|
||||||
}
|
url=argv[1];/* use passed url */
|
||||||
else
|
|
||||||
{
|
|
||||||
url=argv[1];/* use passed url */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy from url line by line with fgets */
|
/* copy from url line by line with fgets */
|
||||||
outf=fopen("fgets.test","w+");
|
outf=fopen("fgets.test","w+");
|
||||||
if(!outf)
|
if(!outf) {
|
||||||
{
|
perror("couldn't open fgets output file\n");
|
||||||
perror("couldn't open fgets output file\n");
|
return 1;
|
||||||
return 1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
handle = url_fopen(url, "r");
|
|
||||||
if(!handle)
|
|
||||||
{
|
|
||||||
printf("couldn't url_fopen() %s\n", url);
|
|
||||||
fclose(outf);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(!url_feof(handle))
|
|
||||||
{
|
|
||||||
url_fgets(buffer,sizeof(buffer),handle);
|
|
||||||
fwrite(buffer,1,strlen(buffer),outf);
|
|
||||||
}
|
|
||||||
|
|
||||||
url_fclose(handle);
|
|
||||||
|
|
||||||
|
handle = url_fopen(url, "r");
|
||||||
|
if(!handle) {
|
||||||
|
printf("couldn't url_fopen() %s\n", url);
|
||||||
fclose(outf);
|
fclose(outf);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(!url_feof(handle)) {
|
||||||
|
url_fgets(buffer,sizeof(buffer),handle);
|
||||||
|
fwrite(buffer,1,strlen(buffer),outf);
|
||||||
|
}
|
||||||
|
|
||||||
|
url_fclose(handle);
|
||||||
|
|
||||||
|
fclose(outf);
|
||||||
|
|
||||||
|
|
||||||
/* Copy from url with fread */
|
/* Copy from url with fread */
|
||||||
outf=fopen("fread.test","w+");
|
outf=fopen("fread.test","w+");
|
||||||
if(!outf)
|
if(!outf) {
|
||||||
{
|
perror("couldn't open fread output file\n");
|
||||||
perror("couldn't open fread output file\n");
|
return 1;
|
||||||
return 1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
handle = url_fopen("testfile", "r");
|
|
||||||
if(!handle) {
|
|
||||||
printf("couldn't url_fopen() testfile\n");
|
|
||||||
fclose(outf);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
|
||||||
fwrite(buffer,1,nread,outf);
|
|
||||||
} while(nread);
|
|
||||||
|
|
||||||
url_fclose(handle);
|
|
||||||
|
|
||||||
|
handle = url_fopen("testfile", "r");
|
||||||
|
if(!handle) {
|
||||||
|
printf("couldn't url_fopen() testfile\n");
|
||||||
fclose(outf);
|
fclose(outf);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
||||||
|
fwrite(buffer,1,nread,outf);
|
||||||
|
} while(nread);
|
||||||
|
|
||||||
|
url_fclose(handle);
|
||||||
|
|
||||||
|
fclose(outf);
|
||||||
|
|
||||||
|
|
||||||
/* Test rewind */
|
/* Test rewind */
|
||||||
outf=fopen("rewind.test","w+");
|
outf=fopen("rewind.test","w+");
|
||||||
if(!outf)
|
if(!outf) {
|
||||||
{
|
perror("couldn't open fread output file\n");
|
||||||
perror("couldn't open fread output file\n");
|
return 1;
|
||||||
return 1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
handle = url_fopen("testfile", "r");
|
|
||||||
if(!handle) {
|
|
||||||
printf("couldn't url_fopen() testfile\n");
|
|
||||||
fclose(outf);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
|
||||||
fwrite(buffer,1,nread,outf);
|
|
||||||
url_rewind(handle);
|
|
||||||
|
|
||||||
buffer[0]='\n';
|
|
||||||
fwrite(buffer,1,1,outf);
|
|
||||||
|
|
||||||
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
|
||||||
fwrite(buffer,1,nread,outf);
|
|
||||||
|
|
||||||
|
|
||||||
url_fclose(handle);
|
|
||||||
|
|
||||||
|
handle = url_fopen("testfile", "r");
|
||||||
|
if(!handle) {
|
||||||
|
printf("couldn't url_fopen() testfile\n");
|
||||||
fclose(outf);
|
fclose(outf);
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
||||||
|
fwrite(buffer,1,nread,outf);
|
||||||
|
url_rewind(handle);
|
||||||
|
|
||||||
|
buffer[0]='\n';
|
||||||
|
fwrite(buffer,1,1,outf);
|
||||||
|
|
||||||
|
nread = url_fread(buffer, 1,sizeof(buffer), handle);
|
||||||
|
fwrite(buffer,1,nread,outf);
|
||||||
|
|
||||||
|
|
||||||
return 0;/* all done */
|
url_fclose(handle);
|
||||||
|
|
||||||
|
fclose(outf);
|
||||||
|
|
||||||
|
|
||||||
|
return 0;/* all done */
|
||||||
}
|
}
|
||||||
|
147
docs/examples/ftp-wildcard.c
Normal file
147
docs/examples/ftp-wildcard.c
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
struct callback_data {
|
||||||
|
FILE *output;
|
||||||
|
};
|
||||||
|
|
||||||
|
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||||
|
struct callback_data *data,
|
||||||
|
int remains);
|
||||||
|
|
||||||
|
static long file_is_downloaded(struct callback_data *data);
|
||||||
|
|
||||||
|
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||||
|
struct callback_data *data);
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int rc = CURLE_OK;
|
||||||
|
|
||||||
|
/* curl easy handle */
|
||||||
|
CURL *handle;
|
||||||
|
|
||||||
|
/* help data */
|
||||||
|
struct callback_data data = { 0 };
|
||||||
|
|
||||||
|
/* global initialization */
|
||||||
|
rc = curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
if(rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
/* initialization of easy handle */
|
||||||
|
handle = curl_easy_init();
|
||||||
|
if(!handle) {
|
||||||
|
curl_global_cleanup();
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* turn on wildcard matching */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
|
||||||
|
|
||||||
|
/* callback is called before download of concrete file started */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
|
||||||
|
|
||||||
|
/* callback is called after data from the file have been transferred */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
|
||||||
|
|
||||||
|
/* this callback will write contents into files */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it);
|
||||||
|
|
||||||
|
/* put transfer data into callbacks */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_DATA, &data);
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &data);
|
||||||
|
|
||||||
|
/* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L); */
|
||||||
|
|
||||||
|
/* set an URL containing wildcard pattern (only in the last part) */
|
||||||
|
if(argc == 2)
|
||||||
|
curl_easy_setopt(handle, CURLOPT_URL, argv[1]);
|
||||||
|
else
|
||||||
|
curl_easy_setopt(handle, CURLOPT_URL, "ftp://example.com/test/*");
|
||||||
|
|
||||||
|
/* and start transfer! */
|
||||||
|
rc = curl_easy_perform(handle);
|
||||||
|
|
||||||
|
curl_easy_cleanup(handle);
|
||||||
|
curl_global_cleanup();
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||||
|
struct callback_data *data,
|
||||||
|
int remains)
|
||||||
|
{
|
||||||
|
printf("%3d %40s %10luB ", remains, finfo->filename,
|
||||||
|
(unsigned long)finfo->size);
|
||||||
|
|
||||||
|
switch(finfo->filetype) {
|
||||||
|
case CURLFILETYPE_DIRECTORY:
|
||||||
|
printf(" DIR\n");
|
||||||
|
break;
|
||||||
|
case CURLFILETYPE_FILE:
|
||||||
|
printf("FILE ");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("OTHER\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(finfo->filetype == CURLFILETYPE_FILE) {
|
||||||
|
/* do not transfer files >= 50B */
|
||||||
|
if(finfo->size > 50) {
|
||||||
|
printf("SKIPPED\n");
|
||||||
|
return CURL_CHUNK_BGN_FUNC_SKIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->output = fopen(finfo->filename, "w");
|
||||||
|
if(!data->output) {
|
||||||
|
return CURL_CHUNK_BGN_FUNC_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return CURL_CHUNK_BGN_FUNC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long file_is_downloaded(struct callback_data *data)
|
||||||
|
{
|
||||||
|
if(data->output) {
|
||||||
|
printf("DOWNLOADED\n");
|
||||||
|
fclose(data->output);
|
||||||
|
data->output = 0x0;
|
||||||
|
}
|
||||||
|
return CURL_CHUNK_END_FUNC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||||
|
struct callback_data *data)
|
||||||
|
{
|
||||||
|
size_t written = 0;
|
||||||
|
if(data->output)
|
||||||
|
written = fwrite(buff, size, nmemb, data->output);
|
||||||
|
else
|
||||||
|
/* listing output */
|
||||||
|
written = fwrite(buff, size, nmemb, stdout);
|
||||||
|
return written;
|
||||||
|
}
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -52,12 +64,10 @@ int main(void)
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
/*
|
/*
|
||||||
* Get curl 7.9.2 from sunet.se's FTP site. curl 7.9.2 is most likely not
|
* You better replace the URL with one that works!
|
||||||
* present there by the time you read this, so you'd better replace the
|
|
||||||
* URL with one that works!
|
|
||||||
*/
|
*/
|
||||||
curl_easy_setopt(curl, CURLOPT_URL,
|
curl_easy_setopt(curl, CURLOPT_URL,
|
||||||
"ftp://ftp.sunet.se/pub/www/utilities/curl/curl-7.9.2.tar.gz");
|
"ftp://ftp.example.com/pub/www/utilities/curl/curl-7.9.2.tar.gz");
|
||||||
/* Define our callback to get called when there's data to be written */
|
/* Define our callback to get called when there's data to be written */
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
|
||||||
/* Set a pointer to our struct to pass to the callback */
|
/* Set a pointer to our struct to pass to the callback */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -21,6 +33,8 @@
|
|||||||
|
|
||||||
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
||||||
{
|
{
|
||||||
|
(void)ptr;
|
||||||
|
(void)data;
|
||||||
/* we are not interested in the headers itself,
|
/* we are not interested in the headers itself,
|
||||||
so we only return the size we would have saved ... */
|
so we only return the size we would have saved ... */
|
||||||
return (size_t)(size * nmemb);
|
return (size_t)(size * nmemb);
|
||||||
@@ -28,8 +42,7 @@ static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* Check for binutils 2.19.1 from ftp.gnu.org's FTP site. */
|
char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
|
||||||
char ftpurl[] = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2";
|
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
const time_t filetime;
|
const time_t filetime;
|
||||||
@@ -59,7 +72,7 @@ int main(void)
|
|||||||
if((CURLE_OK == res) && filetime)
|
if((CURLE_OK == res) && filetime)
|
||||||
printf("filetime %s: %s", filename, ctime(&filetime));
|
printf("filetime %s: %s", filename, ctime(&filetime));
|
||||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
|
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
|
||||||
if((CURLE_OK == res) && filesize)
|
if((CURLE_OK == res) && (filesize>0))
|
||||||
printf("filesize %s: %0.0f bytes\n", filename, filesize);
|
printf("filesize %s: %0.0f bytes\n", filename, filesize);
|
||||||
} else {
|
} else {
|
||||||
/* we failed */
|
/* we failed */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -27,7 +39,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
return fwrite(ptr, size, nmemb, writehere);
|
return fwrite(ptr, size, nmemb, writehere);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@@ -43,7 +55,7 @@ int main(int argc, char **argv)
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
/* 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.example.com/");
|
||||||
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
|
/* If you intend to use this on windows with a libcurl DLL, you must use
|
||||||
CURLOPT_WRITEFUNCTION as well */
|
CURLOPT_WRITEFUNCTION as well */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -30,7 +42,7 @@
|
|||||||
|
|
||||||
#define LOCAL_FILE "/tmp/uploadthis.txt"
|
#define LOCAL_FILE "/tmp/uploadthis.txt"
|
||||||
#define UPLOAD_FILE_AS "while-uploading.txt"
|
#define UPLOAD_FILE_AS "while-uploading.txt"
|
||||||
#define REMOTE_URL "ftp://localhost/" UPLOAD_FILE_AS
|
#define REMOTE_URL "ftp://example.com/" UPLOAD_FILE_AS
|
||||||
#define RENAME_FILE_TO "renamed-and-fine.txt"
|
#define RENAME_FILE_TO "renamed-and-fine.txt"
|
||||||
|
|
||||||
/* NOTE: if you want this example to work on Windows with libcurl as a
|
/* NOTE: if you want this example to work on Windows with libcurl as a
|
||||||
@@ -48,7 +60,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Upload to FTP, resuming failed transfers
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Upload to FTP, resuming failed transfers
|
||||||
*
|
*
|
||||||
* Compile for MinGW like this:
|
* Compile for MinGW like this:
|
||||||
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
|
* gcc -Wall -pedantic -std=c99 ftpuploadwithresume.c -o ftpuploadresume.exe
|
||||||
@@ -32,7 +45,8 @@ int __cdecl _snscanf(const char * input, size_t length, const char * format, ...
|
|||||||
|
|
||||||
|
|
||||||
/* parse headers for Content-Length */
|
/* parse headers for Content-Length */
|
||||||
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
|
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
|
{
|
||||||
int r;
|
int r;
|
||||||
long len = 0;
|
long len = 0;
|
||||||
|
|
||||||
@@ -46,7 +60,8 @@ size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* discard downloaded data */
|
/* discard downloaded data */
|
||||||
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
|
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||||
|
{
|
||||||
return size * nmemb;
|
return size * nmemb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,13 +158,14 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int c, char **argv) {
|
int main(int c, char **argv)
|
||||||
|
{
|
||||||
CURL *curlhandle = NULL;
|
CURL *curlhandle = NULL;
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
curlhandle = curl_easy_init();
|
curlhandle = curl_easy_init();
|
||||||
|
|
||||||
upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3);
|
upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3);
|
||||||
|
|
||||||
curl_easy_cleanup(curlhandle);
|
curl_easy_cleanup(curlhandle);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -19,7 +31,7 @@ int main(void)
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
|
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
|
||||||
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
|
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
@@ -1,15 +1,26 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show how the callback function can be used to
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show how the callback function can be used to
|
||||||
* download data into a chunk of memory instead of storing it in a file.
|
* download data into a chunk of memory instead of storing it in a file.
|
||||||
*
|
|
||||||
* This exact source code has not been verified to work.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -17,25 +28,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <curl/types.h>
|
|
||||||
#include <curl/easy.h>
|
|
||||||
|
|
||||||
struct MemoryStruct {
|
struct MemoryStruct {
|
||||||
char *memory;
|
char *memory;
|
||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
static 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
|
|
||||||
NULL pointers, so we take care of it here */
|
|
||||||
if(ptr)
|
|
||||||
return realloc(ptr, size);
|
|
||||||
else
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
static 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)
|
||||||
@@ -43,22 +41,28 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
size_t realsize = size * nmemb;
|
size_t realsize = size * nmemb;
|
||||||
struct MemoryStruct *mem = (struct MemoryStruct *)data;
|
struct MemoryStruct *mem = (struct MemoryStruct *)data;
|
||||||
|
|
||||||
mem->memory = myrealloc(mem->memory, mem->size + realsize + 1);
|
mem->memory = realloc(mem->memory, mem->size + realsize + 1);
|
||||||
if (mem->memory) {
|
if (mem->memory == NULL) {
|
||||||
memcpy(&(mem->memory[mem->size]), ptr, realsize);
|
/* out of memory! */
|
||||||
mem->size += realsize;
|
printf("not enough memory (realloc returned NULL)\n");
|
||||||
mem->memory[mem->size] = 0;
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memcpy(&(mem->memory[mem->size]), ptr, realsize);
|
||||||
|
mem->size += realsize;
|
||||||
|
mem->memory[mem->size] = 0;
|
||||||
|
|
||||||
return realsize;
|
return realsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
|
|
||||||
struct MemoryStruct chunk;
|
struct MemoryStruct chunk;
|
||||||
|
|
||||||
chunk.memory=NULL; /* we expect realloc(NULL, size) to work */
|
chunk.memory = malloc(1); /* will be grown as needed by the realloc above */
|
||||||
chunk.size = 0; /* no data at this point */
|
chunk.size = 0; /* no data at this point */
|
||||||
|
|
||||||
curl_global_init(CURL_GLOBAL_ALL);
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
@@ -67,7 +71,7 @@ int main(int argc, char **argv)
|
|||||||
curl_handle = curl_easy_init();
|
curl_handle = curl_easy_init();
|
||||||
|
|
||||||
/* specify URL to get */
|
/* specify URL to get */
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://cool.haxx.se/");
|
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.example.com/");
|
||||||
|
|
||||||
/* send all data to this function */
|
/* send all data to this function */
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||||
@@ -96,6 +100,8 @@ int main(int argc, char **argv)
|
|||||||
* you're done with it, you should free() it as a nice application.
|
* you're done with it, you should free() it as a nice application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
printf("%lu bytes retrieved\n", (long)chunk.size);
|
||||||
|
|
||||||
if(chunk.memory)
|
if(chunk.memory)
|
||||||
free(chunk.memory);
|
free(chunk.memory);
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
* download many files at once.
|
* download many files at once.
|
||||||
*
|
*
|
||||||
* Written by Jeff Pohlmeyer
|
* Written by Jeff Pohlmeyer
|
||||||
@@ -58,10 +71,7 @@ callback.
|
|||||||
typedef struct _GlobalInfo {
|
typedef struct _GlobalInfo {
|
||||||
CURLM *multi;
|
CURLM *multi;
|
||||||
guint timer_event;
|
guint timer_event;
|
||||||
int prev_running;
|
|
||||||
int still_running;
|
int still_running;
|
||||||
int requested; /* count: curl_easy_init() */
|
|
||||||
int completed; /* count: curl_easy_cleanup() */
|
|
||||||
} GlobalInfo;
|
} GlobalInfo;
|
||||||
|
|
||||||
|
|
||||||
@@ -95,7 +105,6 @@ static void mcode_or_die(const char *where, CURLMcode code) {
|
|||||||
const 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_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||||
@@ -113,62 +122,43 @@ static void mcode_or_die(const char *where, CURLMcode code) {
|
|||||||
|
|
||||||
|
|
||||||
/* Check for completed transfers, and remove their easy handles */
|
/* Check for completed transfers, and remove their easy handles */
|
||||||
static void check_run_count(GlobalInfo *g)
|
static void check_multi_info(GlobalInfo *g)
|
||||||
{
|
{
|
||||||
if (g->prev_running > g->still_running) {
|
char *eff_url;
|
||||||
char *eff_url=NULL;
|
CURLMsg *msg;
|
||||||
CURLMsg *msg;
|
int msgs_left;
|
||||||
int msgs_left;
|
ConnInfo *conn;
|
||||||
ConnInfo *conn=NULL;
|
CURL *easy;
|
||||||
CURL*easy;
|
CURLcode res;
|
||||||
CURLcode res;
|
|
||||||
|
|
||||||
MSG_OUT("REMAINING: %d\n", g->still_running);
|
MSG_OUT("REMAINING: %d\n", g->still_running);
|
||||||
/*
|
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||||
I am still uncertain whether it is safe to remove an easy handle
|
if (msg->msg == CURLMSG_DONE) {
|
||||||
from inside the curl_multi_info_read loop, so here I will search
|
easy = msg->easy_handle;
|
||||||
for completed transfers in the inner "while" loop, and then remove
|
res = msg->data.result;
|
||||||
them in the outer "do-while" loop...
|
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||||
*/
|
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||||
do {
|
MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||||
easy=NULL;
|
curl_multi_remove_handle(g->multi, easy);
|
||||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
free(conn->url);
|
||||||
if (msg->msg == CURLMSG_DONE) {
|
curl_easy_cleanup(easy);
|
||||||
easy=msg->easy_handle;
|
free(conn);
|
||||||
res=msg->data.result;
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (easy) {
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
|
||||||
MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
|
||||||
curl_multi_remove_handle(g->multi, easy);
|
|
||||||
g_free(conn->url);
|
|
||||||
curl_easy_cleanup(easy);
|
|
||||||
g_free(conn);
|
|
||||||
g->completed++;
|
|
||||||
}
|
|
||||||
} while ( easy );
|
|
||||||
MSG_OUT("Requested: %d Completed:%d\n", g->requested, g->completed);
|
|
||||||
}
|
}
|
||||||
g->prev_running = g->still_running;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Called by glib when our timeout expires */
|
/* Called by glib when our timeout expires */
|
||||||
static gboolean timer_cb(gpointer data)
|
static gboolean timer_cb(gpointer data)
|
||||||
{
|
{
|
||||||
GlobalInfo *g = (GlobalInfo *)data;
|
GlobalInfo *g = (GlobalInfo *)data;
|
||||||
CURLMcode rc;
|
CURLMcode rc;
|
||||||
|
|
||||||
do {
|
rc = curl_multi_socket_action(g->multi,
|
||||||
rc = curl_multi_socket(g->multi, CURL_SOCKET_TIMEOUT, &g->still_running);
|
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||||
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
check_multi_info(g);
|
||||||
check_run_count(g);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,11 +188,15 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
|
|||||||
GlobalInfo *g = (GlobalInfo*) data;
|
GlobalInfo *g = (GlobalInfo*) data;
|
||||||
CURLMcode rc;
|
CURLMcode rc;
|
||||||
int fd=g_io_channel_unix_get_fd(ch);
|
int fd=g_io_channel_unix_get_fd(ch);
|
||||||
do {
|
|
||||||
rc = curl_multi_socket(g->multi, fd, &g->still_running);
|
int action =
|
||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
(condition & G_IO_IN ? CURL_CSELECT_IN : 0) |
|
||||||
mcode_or_die("event_cb: curl_multi_socket", rc);
|
(condition & G_IO_OUT ? CURL_CSELECT_OUT : 0);
|
||||||
check_run_count(g);
|
|
||||||
|
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
||||||
|
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||||
|
|
||||||
|
check_multi_info(g);
|
||||||
if(g->still_running) {
|
if(g->still_running) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
@@ -338,12 +332,9 @@ static void new_conn(char *url, GlobalInfo *g )
|
|||||||
MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
rc =curl_multi_add_handle(g->multi, conn->easy);
|
||||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||||
g->requested++;
|
|
||||||
do {
|
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||||
rc = curl_multi_socket_all(g->multi, &g->still_running);
|
that the necessary socket_action() call will be called by this app */
|
||||||
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
|
||||||
mcode_or_die("new_conn: curl_multi_socket_all", rc);
|
|
||||||
check_run_count(g);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -451,9 +442,10 @@ int main(int argc, char **argv)
|
|||||||
curl_multi_setopt(g->multi, CURLMOPT_SOCKETDATA, g);
|
curl_multi_setopt(g->multi, CURLMOPT_SOCKETDATA, g);
|
||||||
curl_multi_setopt(g->multi, CURLMOPT_TIMERFUNCTION, update_timeout_cb);
|
curl_multi_setopt(g->multi, CURLMOPT_TIMERFUNCTION, update_timeout_cb);
|
||||||
curl_multi_setopt(g->multi, CURLMOPT_TIMERDATA, g);
|
curl_multi_setopt(g->multi, CURLMOPT_TIMERDATA, g);
|
||||||
do {
|
|
||||||
rc = curl_multi_socket_all(g->multi, &g->still_running);
|
/* we don't call any curl_multi_socket*() function yet as we have no handles
|
||||||
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
added! */
|
||||||
|
|
||||||
g_main_loop_run(gmain);
|
g_main_loop_run(gmain);
|
||||||
curl_multi_cleanup(g->multi);
|
curl_multi_cleanup(g->multi);
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -1,15 +1,28 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example application source code using the multi socket interface to
|
* This software is licensed as described in the file COPYING, which
|
||||||
* download many files at once.
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
*
|
*
|
||||||
* Written by Jeff Pohlmeyer
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example application source code using the multi socket interface to
|
||||||
|
download many files at once.
|
||||||
|
|
||||||
|
Written by Jeff Pohlmeyer
|
||||||
|
|
||||||
Requires libevent and a (POSIX?) system that has mkfifo().
|
Requires libevent and a (POSIX?) system that has mkfifo().
|
||||||
|
|
||||||
@@ -62,7 +75,6 @@ typedef struct _GlobalInfo {
|
|||||||
struct event fifo_event;
|
struct event fifo_event;
|
||||||
struct event timer_event;
|
struct event timer_event;
|
||||||
CURLM *multi;
|
CURLM *multi;
|
||||||
int prev_running;
|
|
||||||
int still_running;
|
int still_running;
|
||||||
FILE* input;
|
FILE* input;
|
||||||
} GlobalInfo;
|
} GlobalInfo;
|
||||||
@@ -110,7 +122,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||||||
const 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_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||||
@@ -132,44 +143,29 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
|||||||
|
|
||||||
|
|
||||||
/* Check for completed transfers, and remove their easy handles */
|
/* Check for completed transfers, and remove their easy handles */
|
||||||
static void check_run_count(GlobalInfo *g)
|
static void check_multi_info(GlobalInfo *g)
|
||||||
{
|
{
|
||||||
if (g->prev_running > g->still_running) {
|
char *eff_url;
|
||||||
char *eff_url=NULL;
|
CURLMsg *msg;
|
||||||
CURLMsg *msg;
|
int msgs_left;
|
||||||
int msgs_left;
|
ConnInfo *conn;
|
||||||
ConnInfo *conn=NULL;
|
CURL *easy;
|
||||||
CURL*easy;
|
CURLcode res;
|
||||||
CURLcode res;
|
|
||||||
|
|
||||||
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
||||||
/*
|
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||||
I am still uncertain whether it is safe to remove an easy handle
|
if (msg->msg == CURLMSG_DONE) {
|
||||||
from inside the curl_multi_info_read loop, so here I will search
|
easy = msg->easy_handle;
|
||||||
for completed transfers in the inner "while" loop, and then remove
|
res = msg->data.result;
|
||||||
them in the outer "do-while" loop...
|
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||||
*/
|
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||||
do {
|
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||||
easy=NULL;
|
curl_multi_remove_handle(g->multi, easy);
|
||||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
free(conn->url);
|
||||||
if (msg->msg == CURLMSG_DONE) {
|
curl_easy_cleanup(easy);
|
||||||
easy=msg->easy_handle;
|
free(conn);
|
||||||
res=msg->data.result;
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (easy) {
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
|
||||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
|
||||||
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
|
||||||
curl_multi_remove_handle(g->multi, easy);
|
|
||||||
free(conn->url);
|
|
||||||
curl_easy_cleanup(easy);
|
|
||||||
free(conn);
|
|
||||||
}
|
|
||||||
} while ( easy );
|
|
||||||
}
|
}
|
||||||
g->prev_running = g->still_running;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -181,16 +177,13 @@ static void event_cb(int fd, short kind, void *userp)
|
|||||||
CURLMcode rc;
|
CURLMcode rc;
|
||||||
|
|
||||||
int action =
|
int action =
|
||||||
(kind&EV_READ?CURL_CSELECT_IN:0)|
|
(kind & EV_READ ? CURL_CSELECT_IN : 0) |
|
||||||
(kind&EV_WRITE?CURL_CSELECT_OUT:0);
|
(kind & EV_WRITE ? CURL_CSELECT_OUT : 0);
|
||||||
|
|
||||||
do {
|
|
||||||
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
|
||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
|
||||||
|
|
||||||
|
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
||||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||||
|
|
||||||
check_run_count(g);
|
check_multi_info(g);
|
||||||
if ( g->still_running <= 0 ) {
|
if ( g->still_running <= 0 ) {
|
||||||
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)) {
|
||||||
@@ -209,12 +202,10 @@ static void timer_cb(int fd, short kind, void *userp)
|
|||||||
(void)fd;
|
(void)fd;
|
||||||
(void)kind;
|
(void)kind;
|
||||||
|
|
||||||
do {
|
rc = curl_multi_socket_action(g->multi,
|
||||||
rc = curl_multi_socket_action(g->multi,
|
|
||||||
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
|
||||||
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||||
check_run_count(g);
|
check_multi_info(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -340,7 +331,7 @@ static void new_conn(char *url, GlobalInfo *g )
|
|||||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
|
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
|
||||||
fprintf(MSG_OUT,
|
fprintf(MSG_OUT,
|
||||||
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
rc = curl_multi_add_handle(g->multi, conn->easy);
|
||||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||||
|
|
||||||
/* note that the add_handle() will set a time-out to trigger very soon so
|
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||||
@@ -372,7 +363,7 @@ static int init_fifo (GlobalInfo *g)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
static const char *fifo = "hiper.fifo";
|
static const char *fifo = "hiper.fifo";
|
||||||
int sockfd;
|
curl_socket_t sockfd;
|
||||||
|
|
||||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||||
if (lstat (fifo, &st) == 0) {
|
if (lstat (fifo, &st) == 0) {
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Download a document and use libtidy to parse the HTML.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Download a document and use libtidy to parse the HTML.
|
||||||
* Written by Jeff Pohlmeyer
|
* Written by Jeff Pohlmeyer
|
||||||
*
|
*
|
||||||
* LibTidy => http://tidy.sourceforge.net
|
* LibTidy => http://tidy.sourceforge.net
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
// Get a web page, parse it with libxml.
|
// Get a web page, parse it with libxml.
|
||||||
//
|
//
|
||||||
// Written by Lars Nilsson
|
// Written by Lars Nilsson
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -17,7 +29,7 @@ int main(void)
|
|||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
|
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||||
|
|
||||||
#ifdef SKIP_PEER_VERIFICATION
|
#ifdef SKIP_PEER_VERIFICATION
|
||||||
/*
|
/*
|
||||||
|
@@ -1,6 +1,27 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
#
|
#
|
||||||
# Adapted for djgpp / Watt-32 / DOS by
|
# Adapted for djgpp / Watt-32 / DOS by
|
||||||
# Gisle Vanem <giva@bgnett.no>
|
# Gisle Vanem <gvanem@broadpark.no>
|
||||||
#
|
#
|
||||||
|
|
||||||
TOPDIR = ../..
|
TOPDIR = ../..
|
||||||
|
@@ -1,13 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is an example application source code using the multi interface.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code using the multi interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -27,7 +39,7 @@
|
|||||||
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
|
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
|
||||||
#define FTP_HANDLE 1 /* Index for the FTP transfer */
|
#define FTP_HANDLE 1 /* Index for the FTP transfer */
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *handles[HANDLECOUNT];
|
CURL *handles[HANDLECOUNT];
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
@@ -43,9 +55,9 @@ int main(int argc, char **argv)
|
|||||||
handles[i] = curl_easy_init();
|
handles[i] = curl_easy_init();
|
||||||
|
|
||||||
/* set the options (I left out a few, you'll get the point anyway) */
|
/* set the options (I left out a few, you'll get the point anyway) */
|
||||||
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
|
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://example.com");
|
||||||
|
|
||||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
|
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
|
||||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
|
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
|
||||||
|
|
||||||
/* init a multi stack */
|
/* init a multi stack */
|
||||||
@@ -56,8 +68,7 @@ int main(int argc, char **argv)
|
|||||||
curl_multi_add_handle(multi_handle, handles[i]);
|
curl_multi_add_handle(multi_handle, handles[i]);
|
||||||
|
|
||||||
/* we start some action by calling perform right away */
|
/* we start some action by calling perform right away */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
|
|
||||||
while(still_running) {
|
while(still_running) {
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@@ -66,7 +77,9 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
@@ -76,12 +89,23 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
that the call to select() below makes sense! */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
@@ -89,14 +113,9 @@ int main(int argc, char **argv)
|
|||||||
case -1:
|
case -1:
|
||||||
/* select error */
|
/* select error */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0: /* timeout */
|
||||||
/* timeout, do something else */
|
default: /* action */
|
||||||
break;
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
default:
|
|
||||||
/* one or more of curl's file descriptors say there's data to read
|
|
||||||
or write */
|
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface and the debug
|
* This software is licensed as described in the file COPYING, which
|
||||||
* callback.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example showing the multi interface and the debug callback. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -37,12 +48,12 @@ void dump(const char *text,
|
|||||||
/* without the hex output, we can fit more on screen */
|
/* without the hex output, we can fit more on screen */
|
||||||
width = 0x40;
|
width = 0x40;
|
||||||
|
|
||||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||||
text, (long)size, (long)size);
|
text, (long)size, (long)size);
|
||||||
|
|
||||||
for(i=0; i<size; i+= width) {
|
for(i=0; i<size; i+= width) {
|
||||||
|
|
||||||
fprintf(stream, "%04.4lx: ", (long)i);
|
fprintf(stream, "%4.4lx: ", (long)i);
|
||||||
|
|
||||||
if(!nohex) {
|
if(!nohex) {
|
||||||
/* hex not disabled, show it */
|
/* hex not disabled, show it */
|
||||||
@@ -79,6 +90,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||||||
{
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
|
(void)userp;
|
||||||
(void)handle; /* prevent compiler warning */
|
(void)handle; /* prevent compiler warning */
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -108,7 +120,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||||||
/*
|
/*
|
||||||
* Simply download a HTTP file.
|
* Simply download a HTTP file.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
@@ -118,7 +130,7 @@ int main(int argc, char **argv)
|
|||||||
http_handle = curl_easy_init();
|
http_handle = curl_easy_init();
|
||||||
|
|
||||||
/* set the options (I left out a few, you'll get the point anyway) */
|
/* set the options (I left out a few, you'll get the point anyway) */
|
||||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||||
|
|
||||||
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
|
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||||
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
|
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
|
||||||
@@ -130,8 +142,7 @@ int main(int argc, char **argv)
|
|||||||
curl_multi_add_handle(multi_handle, http_handle);
|
curl_multi_add_handle(multi_handle, http_handle);
|
||||||
|
|
||||||
/* we start some action by calling perform right away */
|
/* we start some action by calling perform right away */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
|
|
||||||
while(still_running) {
|
while(still_running) {
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@@ -140,7 +151,9 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
@@ -150,12 +163,23 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
so that the call to select() below makes sense! */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
@@ -168,8 +192,7 @@ int main(int argc, char **argv)
|
|||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
/* timeout or readable/writable sockets */
|
/* timeout or readable/writable sockets */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface.
|
* This software is licensed as described in the file COPYING, which
|
||||||
*/
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -22,7 +32,7 @@
|
|||||||
/*
|
/*
|
||||||
* Simply download two HTTP files!
|
* Simply download two HTTP files!
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURL *http_handle2;
|
CURL *http_handle2;
|
||||||
@@ -34,7 +44,7 @@ int main(int argc, char **argv)
|
|||||||
http_handle2 = curl_easy_init();
|
http_handle2 = curl_easy_init();
|
||||||
|
|
||||||
/* set options */
|
/* set options */
|
||||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||||
|
|
||||||
/* set options */
|
/* set options */
|
||||||
curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");
|
curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");
|
||||||
@@ -47,8 +57,7 @@ int main(int argc, char **argv)
|
|||||||
curl_multi_add_handle(multi_handle, http_handle2);
|
curl_multi_add_handle(multi_handle, http_handle2);
|
||||||
|
|
||||||
/* we start some action by calling perform right away */
|
/* we start some action by calling perform right away */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
|
|
||||||
while(still_running) {
|
while(still_running) {
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@@ -57,7 +66,9 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
@@ -67,12 +78,23 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
that the call to select() below makes sense! */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
@@ -83,8 +105,7 @@ int main(int argc, char **argv)
|
|||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
/* timeout or readable/writable sockets */
|
/* timeout or readable/writable sockets */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,21 +1,33 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is an example application source code using the multi interface
|
* This software is licensed as described in the file COPYING, which
|
||||||
* to do a multipart formpost without "blocking".
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code using the multi interface
|
||||||
|
* to do a multipart formpost without "blocking". */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
|
|
||||||
@@ -58,8 +70,7 @@ int main(int argc, char *argv[])
|
|||||||
if(curl && multi_handle) {
|
if(curl && multi_handle) {
|
||||||
|
|
||||||
/* what URL that receives this POST */
|
/* what URL that receives this POST */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL,
|
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi");
|
||||||
"http://www.fillinyoururl.com/upload.cgi");
|
|
||||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||||
|
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
||||||
@@ -67,8 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
curl_multi_add_handle(multi_handle, curl);
|
curl_multi_add_handle(multi_handle, curl);
|
||||||
|
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
|
|
||||||
while(still_running) {
|
while(still_running) {
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@@ -77,7 +87,9 @@ int main(int argc, char *argv[])
|
|||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
@@ -87,12 +99,23 @@ int main(int argc, char *argv[])
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
so that the call to select() below makes sense! */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
@@ -101,12 +124,10 @@ int main(int argc, char *argv[])
|
|||||||
/* select error */
|
/* select error */
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
printf("timeout!\n");
|
|
||||||
default:
|
default:
|
||||||
/* timeout or readable/writable sockets */
|
/* timeout or readable/writable sockets */
|
||||||
printf("perform!\n");
|
printf("perform!\n");
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
printf("running: %d!\n", still_running);
|
printf("running: %d!\n", still_running);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1,13 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a very simple example using the multi interface.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is a very simple example using the multi interface. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -22,7 +34,7 @@
|
|||||||
/*
|
/*
|
||||||
* Simply download a HTTP file.
|
* Simply download a HTTP file.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *http_handle;
|
CURL *http_handle;
|
||||||
CURLM *multi_handle;
|
CURLM *multi_handle;
|
||||||
@@ -32,7 +44,7 @@ int main(int argc, char **argv)
|
|||||||
http_handle = curl_easy_init();
|
http_handle = curl_easy_init();
|
||||||
|
|
||||||
/* set the options (I left out a few, you'll get the point anyway) */
|
/* set the options (I left out a few, you'll get the point anyway) */
|
||||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||||
|
|
||||||
/* init a multi stack */
|
/* init a multi stack */
|
||||||
multi_handle = curl_multi_init();
|
multi_handle = curl_multi_init();
|
||||||
@@ -41,8 +53,7 @@ int main(int argc, char **argv)
|
|||||||
curl_multi_add_handle(multi_handle, http_handle);
|
curl_multi_add_handle(multi_handle, http_handle);
|
||||||
|
|
||||||
/* we start some action by calling perform right away */
|
/* we start some action by calling perform right away */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
|
|
||||||
while(still_running) {
|
while(still_running) {
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
@@ -51,7 +62,9 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdread;
|
fd_set fdread;
|
||||||
fd_set fdwrite;
|
fd_set fdwrite;
|
||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
@@ -61,12 +74,23 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
/* In a real-world program you OF COURSE check the return code of the
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
that the call to select() below makes sense! */
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
@@ -79,8 +103,7 @@ int main(int argc, char **argv)
|
|||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
/* timeout or readable/writable sockets */
|
/* timeout or readable/writable sockets */
|
||||||
while(CURLM_CALL_MULTI_PERFORM ==
|
curl_multi_perform(multi_handle, &still_running);
|
||||||
curl_multi_perform(multi_handle, &still_running));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
/* A multi-threaded example that uses pthreads extensively to fetch
|
/* A multi-threaded example that uses pthreads extensively to fetch
|
||||||
* X remote files at once */
|
* X remote files at once */
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example source code to show one way to set the necessary OpenSSL locking
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example source code to show one way to set the necessary OpenSSL locking
|
||||||
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
|
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
|
||||||
* libcurl built to use OpenSSL.
|
* libcurl built to use OpenSSL.
|
||||||
*
|
*
|
||||||
|
@@ -1,17 +1,29 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@@ -24,12 +36,12 @@ int main(int argc, char **argv)
|
|||||||
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
|
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
|
||||||
|
|
||||||
/* get the first document */
|
/* get the first document */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
/* get another document from the same server using the same
|
/* get another document from the same server using the same
|
||||||
connection */
|
connection */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/docs/");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
/* always cleanup */
|
/* always cleanup */
|
||||||
|
@@ -1,14 +1,26 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* An example source code that issues a HTTP POST and we provide the actual
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* An example source code that issues a HTTP POST and we provide the actual
|
||||||
* data through a read callback.
|
* data through a read callback.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -51,8 +63,8 @@ int main(void)
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
/* First set the URL that is about to receive our POST. */
|
/* First set the URL that is about to receive our POST. */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL,
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/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, 1L);
|
curl_easy_setopt(curl, CURLOPT_POST, 1L);
|
||||||
|
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* Example code that uploads a file name 'foo' to a remote script that accepts
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* Example code that uploads a file name 'foo' to a remote script that accepts
|
||||||
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
* "HTML form based" (as described in RFC1738) uploads using HTTP POST.
|
||||||
*
|
*
|
||||||
* The imaginary form we'll fill in looks like:
|
* The imaginary form we'll fill in looks like:
|
||||||
@@ -67,7 +80,7 @@ int main(int argc, char *argv[])
|
|||||||
headerlist = curl_slist_append(headerlist, buf);
|
headerlist = curl_slist_append(headerlist, buf);
|
||||||
if(curl) {
|
if(curl) {
|
||||||
/* what URL that receives this POST */
|
/* what URL that receives this POST */
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/examplepost.cgi");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi");
|
||||||
if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
|
if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
|
||||||
/* only disable 100-continue header if explicitly requested */
|
/* only disable 100-continue header if explicitly requested */
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
||||||
|
@@ -1,11 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
/*
|
/*
|
||||||
This is a simple example showing how a program on a non-ASCII platform
|
This is a simple example showing how a program on a non-ASCII platform
|
||||||
would invoke callbacks to do its own codeset conversions instead of
|
would invoke callbacks to do its own codeset conversions instead of
|
||||||
@@ -75,7 +88,7 @@ int main(void)
|
|||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
|
|
||||||
/* use platform-specific functions for codeset conversions */
|
/* use platform-specific functions for codeset conversions */
|
||||||
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
|
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
|
||||||
|
@@ -1,20 +1,32 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* An example of curl_easy_send() and curl_easy_recv() usage.
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* An example of curl_easy_send() and curl_easy_recv() usage. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* Auxiliary function that waits on the socket. */
|
/* Auxiliary function that waits on the socket. */
|
||||||
static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
|
static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set infd, outfd, errfd;
|
fd_set infd, outfd, errfd;
|
||||||
@@ -48,13 +60,14 @@ int main(void)
|
|||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
/* Minimalistic http request */
|
/* Minimalistic http request */
|
||||||
const char *request = "GET / HTTP/1.0\r\nHost: curl.haxx.se\r\n\r\n";
|
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
|
||||||
int sockfd; /* socket */
|
curl_socket_t sockfd; /* socket */
|
||||||
|
long sockextr;
|
||||||
size_t iolen;
|
size_t iolen;
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
/* Do not do the transfer - only connect to host */
|
/* Do not do the transfer - only connect to host */
|
||||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
|
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
@@ -65,9 +78,11 @@ int main(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract the socket from the curl handle - we'll need it
|
/* Extract the socket from the curl handle - we'll need it for waiting.
|
||||||
* for waiting */
|
* Note that this API takes a pointer to a 'long' while we use
|
||||||
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
|
* curl_socket_t for sockets otherwise.
|
||||||
|
*/
|
||||||
|
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
|
||||||
|
|
||||||
if(CURLE_OK != res)
|
if(CURLE_OK != res)
|
||||||
{
|
{
|
||||||
@@ -75,6 +90,8 @@ int main(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sockfd = sockextr;
|
||||||
|
|
||||||
/* wait for the socket to become ready for sending */
|
/* wait for the socket to become ready for sending */
|
||||||
if(!wait_on_socket(sockfd, 0, 60000L))
|
if(!wait_on_socket(sockfd, 0, 60000L))
|
||||||
{
|
{
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -21,7 +33,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
return written;
|
return written;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
static const char *headerfilename = "head.out";
|
static const char *headerfilename = "head.out";
|
||||||
@@ -35,7 +47,7 @@ int main(int argc, char **argv)
|
|||||||
curl_handle = curl_easy_init();
|
curl_handle = curl_easy_init();
|
||||||
|
|
||||||
/* set URL to get */
|
/* set URL to get */
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://curl.haxx.se");
|
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://example.com");
|
||||||
|
|
||||||
/* no progress meter please */
|
/* no progress meter please */
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
|
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
@@ -17,7 +29,7 @@ int main(void)
|
|||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
res = curl_easy_perform(curl);
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
/* always cleanup */
|
/* always cleanup */
|
||||||
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -20,7 +32,7 @@ int main(void)
|
|||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, "http://posthere.com");
|
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
|
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
|
||||||
|
|
||||||
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
|
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
|
||||||
|
83
docs/examples/simplesmtp.c
Normal file
83
docs/examples/simplesmtp.c
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
struct curl_slist *recipients = NULL;
|
||||||
|
|
||||||
|
/* value for envelope reverse-path */
|
||||||
|
static const char *from = "<bradh@example.com>";
|
||||||
|
|
||||||
|
/* this becomes the envelope forward-path */
|
||||||
|
static const char *to = "<bradh@example.net>";
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(curl) {
|
||||||
|
/* this is the URL for your mailserver - you can also use an smtps:// URL
|
||||||
|
* here */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.net.");
|
||||||
|
|
||||||
|
/* Note that this option isn't strictly required, omitting it will result in
|
||||||
|
* libcurl will sent the MAIL FROM command with no sender data. All
|
||||||
|
* autoresponses should have an empty reverse-path, and should be directed
|
||||||
|
* to the address in the reverse-path which triggered them. Otherwise, they
|
||||||
|
* could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from);
|
||||||
|
|
||||||
|
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array. */
|
||||||
|
recipients = curl_slist_append(recipients, to);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||||
|
|
||||||
|
/* You provide the payload (headers and the body of the message) as the
|
||||||
|
* "data" element. There are two choices, either:
|
||||||
|
* - provide a callback function and specify the function name using the
|
||||||
|
* CURLOPT_READFUNCTION option; or
|
||||||
|
* - just provide a FILE pointer that can be used to read the data from.
|
||||||
|
* The easiest case is just to read from standard input, (which is available
|
||||||
|
* as a FILE pointer) as shown here.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, stdin);
|
||||||
|
|
||||||
|
/* send the message (including headers) */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* free the list of recipients */
|
||||||
|
curl_slist_free_all(recipients);
|
||||||
|
|
||||||
|
/* curl won't send the QUIT command until you call cleanup, so you should be
|
||||||
|
* able to re-use this connection for additional messages (setting
|
||||||
|
* CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
|
||||||
|
* curl_easy_perform() again. It may not be a good idea to keep the
|
||||||
|
* connection open for a very long time though (more than a few minutes may
|
||||||
|
* result in the server timing out the connection), and you do want to clean
|
||||||
|
* up in the end.
|
||||||
|
*/
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,12 +1,24 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
*/
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
@@ -32,7 +44,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(void)
|
||||||
{
|
{
|
||||||
CURL *curl;
|
CURL *curl;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
@@ -47,7 +59,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
const char *pEngine;
|
const char *pEngine;
|
||||||
|
|
||||||
#if USE_ENGINE
|
#ifdef USE_ENGINE
|
||||||
pKeyName = "rsa_test";
|
pKeyName = "rsa_test";
|
||||||
pKeyType = "ENG";
|
pKeyType = "ENG";
|
||||||
pEngine = "chil"; /* for nChiper HSM... */
|
pEngine = "chil"; /* for nChiper HSM... */
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This is a multi threaded application that uses a progress bar to show
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is a multi threaded application that uses a progress bar to show
|
||||||
* status. It uses Gtk+ to make a smooth pulse.
|
* status. It uses Gtk+ to make a smooth pulse.
|
||||||
*
|
*
|
||||||
* Written by Jud Bishop after studying the other examples provided with
|
* Written by Jud Bishop after studying the other examples provided with
|
||||||
|
205
docs/examples/smtp-multi.c
Normal file
205
docs/examples/smtp-multi.c
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This is an example application source code sending SMTP mail using the
|
||||||
|
* multi interface.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the list of basic details you need to tweak to get things right.
|
||||||
|
*/
|
||||||
|
#define USERNAME "user@example.com"
|
||||||
|
#define PASSWORD "123qwerty"
|
||||||
|
#define SMTPSERVER "smtp.example.com"
|
||||||
|
#define SMTPPORT ":587" /* it is a colon+port string, but you can set it
|
||||||
|
to "" to use the default port */
|
||||||
|
#define RECIPIENT "<recipient@example.com>"
|
||||||
|
#define MAILFROM "<realuser@example.com>"
|
||||||
|
|
||||||
|
#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
|
||||||
|
|
||||||
|
/* Note that you should include the actual meta data headers here as well if
|
||||||
|
you want the mail to have a Subject, another From:, show a To: or whatever
|
||||||
|
you think your mail should feature! */
|
||||||
|
static const char *text[]={
|
||||||
|
"one\n",
|
||||||
|
"two\n",
|
||||||
|
"three\n",
|
||||||
|
" Hello, this is CURL email SMTP\n",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
struct WriteThis {
|
||||||
|
int counter;
|
||||||
|
};
|
||||||
|
|
||||||
|
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
|
{
|
||||||
|
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||||
|
const char *data;
|
||||||
|
|
||||||
|
if(size*nmemb < 1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
data = text[pooh->counter];
|
||||||
|
|
||||||
|
if(data) {
|
||||||
|
size_t len = strlen(data);
|
||||||
|
memcpy(ptr, data, len);
|
||||||
|
pooh->counter++; /* advance pointer */
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
return 0; /* no more data left to deliver */
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct timeval tvnow(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
** time() returns the value of time in seconds since the Epoch.
|
||||||
|
*/
|
||||||
|
struct timeval now;
|
||||||
|
now.tv_sec = (long)time(NULL);
|
||||||
|
now.tv_usec = 0;
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long tvdiff(struct timeval newer, struct timeval older)
|
||||||
|
{
|
||||||
|
return (newer.tv_sec-older.tv_sec)*1000+
|
||||||
|
(newer.tv_usec-older.tv_usec)/1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLM *mcurl;
|
||||||
|
int still_running = 1;
|
||||||
|
struct timeval mp_start;
|
||||||
|
char mp_timedout = 0;
|
||||||
|
struct WriteThis pooh;
|
||||||
|
struct curl_slist* rcpt_list = NULL;
|
||||||
|
|
||||||
|
pooh.counter = 0;
|
||||||
|
|
||||||
|
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if(!curl)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
mcurl = curl_multi_init();
|
||||||
|
if(!mcurl)
|
||||||
|
return 2;
|
||||||
|
|
||||||
|
rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
|
||||||
|
/* more addresses can be added here
|
||||||
|
rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
|
||||||
|
*/
|
||||||
|
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://" SMTPSERVER SMTPPORT);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER,0);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, &pooh);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSLVERSION, 0);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0);
|
||||||
|
curl_multi_add_handle(mcurl, curl);
|
||||||
|
|
||||||
|
mp_timedout = 0;
|
||||||
|
mp_start = tvnow();
|
||||||
|
|
||||||
|
/* we start some action by calling perform right away */
|
||||||
|
curl_multi_perform(mcurl, &still_running);
|
||||||
|
|
||||||
|
while(still_running) {
|
||||||
|
struct timeval timeout;
|
||||||
|
int rc; /* select() return code */
|
||||||
|
|
||||||
|
fd_set fdread;
|
||||||
|
fd_set fdwrite;
|
||||||
|
fd_set fdexcep;
|
||||||
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
|
FD_ZERO(&fdread);
|
||||||
|
FD_ZERO(&fdwrite);
|
||||||
|
FD_ZERO(&fdexcep);
|
||||||
|
|
||||||
|
/* set a suitable timeout to play around with */
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(mcurl, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get file descriptors from the transfers */
|
||||||
|
curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
/* In a real-world program you OF COURSE check the return code of the
|
||||||
|
function calls. On success, the value of maxfd is guaranteed to be
|
||||||
|
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||||
|
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||||
|
to sleep. */
|
||||||
|
|
||||||
|
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||||
|
|
||||||
|
if (tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
|
||||||
|
fprintf(stderr, "ABORTING TEST, since it seems "
|
||||||
|
"that it would have run forever.\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(rc) {
|
||||||
|
case -1:
|
||||||
|
/* select error */
|
||||||
|
break;
|
||||||
|
case 0: /* timeout */
|
||||||
|
default: /* action */
|
||||||
|
curl_multi_perform(mcurl, &still_running);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_slist_free_all(rcpt_list);
|
||||||
|
curl_multi_remove_handle(mcurl, curl);
|
||||||
|
curl_multi_cleanup(mcurl);
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
curl_global_cleanup();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
148
docs/examples/smtp-tls.c
Normal file
148
docs/examples/smtp-tls.c
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
/* This is a simple example showing how to send mail using libcurl's SMTP
|
||||||
|
* capabilities. It builds on the simplesmtp.c example, adding some
|
||||||
|
* authentication and transport security.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define FROM "<sender@example.org>"
|
||||||
|
#define TO "<addressee@example.net>"
|
||||||
|
#define CC "<info@example.org>"
|
||||||
|
|
||||||
|
static const char *payload_text[]={
|
||||||
|
"Date: Mon, 29 Nov 2010 21:54:29 +1100\n",
|
||||||
|
"To: " TO "\n",
|
||||||
|
"From: " FROM "(Example User)\n",
|
||||||
|
"Cc: " CC "(Another example User)\n",
|
||||||
|
"Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\n",
|
||||||
|
"Subject: SMTP TLS example message\n",
|
||||||
|
"\n", /* empty line to divide headers from body, see RFC5322 */
|
||||||
|
"The body of the message starts here.\n",
|
||||||
|
"\n",
|
||||||
|
"It could be a lot of lines, could be MIME encoded, whatever.\n",
|
||||||
|
"Check RFC5322.\n",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
struct upload_status {
|
||||||
|
int lines_read;
|
||||||
|
};
|
||||||
|
|
||||||
|
static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||||
|
{
|
||||||
|
struct upload_status *upload_ctx = (struct upload_status *)userp;
|
||||||
|
const char *data;
|
||||||
|
|
||||||
|
if ((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
data = payload_text[upload_ctx->lines_read];
|
||||||
|
|
||||||
|
if (data) {
|
||||||
|
size_t len = strlen(data);
|
||||||
|
memcpy(ptr, data, len);
|
||||||
|
upload_ctx->lines_read ++;
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
CURL *curl;
|
||||||
|
CURLcode res;
|
||||||
|
struct curl_slist *recipients = NULL;
|
||||||
|
struct upload_status upload_ctx;
|
||||||
|
|
||||||
|
upload_ctx.lines_read = 0;
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if (curl) {
|
||||||
|
/* This is the URL for your mailserver. Note the use of port 587 here,
|
||||||
|
* instead of the normal SMTP port (25). Port 587 is commonly used for
|
||||||
|
* secure mail submission (see RFC4403), but you should use whatever
|
||||||
|
* matches your server configuration. */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
|
||||||
|
|
||||||
|
/* In this example, we'll start with a plain text connection, and upgrade
|
||||||
|
* to Transport Layer Security (TLS) using the STARTTLS command. Be careful
|
||||||
|
* of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
|
||||||
|
* will continue anyway - see the security discussion in the libcurl
|
||||||
|
* tutorial for more details. */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
|
||||||
|
|
||||||
|
/* If your server doesn't have a valid certificate, then you can disable
|
||||||
|
* part of the Transport Layer Security protection by setting the
|
||||||
|
* CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
|
||||||
|
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
* That is, in general, a bad idea. It is still better than sending your
|
||||||
|
* authentication details in plain text though.
|
||||||
|
* Instead, you should get the issuer certificate (or the host certificate
|
||||||
|
* if the certificate is self-signed) and add it to the set of certificates
|
||||||
|
* that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
|
||||||
|
* docs/SSLCERTS for more information.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
|
||||||
|
|
||||||
|
/* A common reason for requiring transport security is to protect
|
||||||
|
* authentication details (user names and passwords) from being "snooped"
|
||||||
|
* on the network. Here is how the user name and password are provided: */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_USERNAME, "user@example.net");
|
||||||
|
curl_easy_setopt(curl, CURLOPT_PASSWORD, "P@ssw0rd");
|
||||||
|
|
||||||
|
/* value for envelope reverse-path */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
|
||||||
|
/* Add two recipients, in this particular case they correspond to the
|
||||||
|
* To: and Cc: addressees in the header, but they could be any kind of
|
||||||
|
* recipient. */
|
||||||
|
recipients = curl_slist_append(recipients, TO);
|
||||||
|
recipients = curl_slist_append(recipients, CC);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||||
|
|
||||||
|
/* In this case, we're using a callback function to specify the data. You
|
||||||
|
* could just use the CURLOPT_READDATA option to specify a FILE pointer to
|
||||||
|
* read from.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
|
||||||
|
|
||||||
|
/* Since the traffic will be encrypted, it is very useful to turn on debug
|
||||||
|
* information within libcurl to see what is happening during the transfer.
|
||||||
|
*/
|
||||||
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
|
|
||||||
|
/* send the message (including headers) */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
/* free the list of recipients and clean up */
|
||||||
|
curl_slist_free_all(recipients);
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This example code only builds as-is on Windows.
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* This example code only builds as-is on Windows.
|
||||||
*
|
*
|
||||||
* While Unix/Linux user, you do not need this software.
|
* While Unix/Linux user, you do not need this software.
|
||||||
* You can achieve the same result as synctime using curl, awk and date.
|
* You can achieve the same result as synctime using curl, awk and date.
|
||||||
|
@@ -1,12 +1,25 @@
|
|||||||
/*****************************************************************************
|
/***************************************************************************
|
||||||
* _ _ ____ _
|
* _ _ ____ _
|
||||||
* Project ___| | | | _ \| |
|
* Project ___| | | | _ \| |
|
||||||
* / __| | | | |_) | |
|
* / __| | | | |_) | |
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
* 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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
/* A multi-threaded example that uses pthreads and fetches 4 remote files at
|
||||||
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
* once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS
|
||||||
* (libgcrypt) so far.
|
* (libgcrypt) so far.
|
||||||
*
|
*
|
||||||
@@ -91,10 +104,10 @@ void init_locks(void)
|
|||||||
|
|
||||||
/* List of URLs to fetch.*/
|
/* List of URLs to fetch.*/
|
||||||
const char * const urls[]= {
|
const char * const urls[]= {
|
||||||
"https://www.sf.net/",
|
"https://www.example.com/",
|
||||||
"https://www.openssl.org/",
|
"https://www2.example.com/",
|
||||||
"https://www.sf.net/",
|
"https://www3.example.com/",
|
||||||
"https://www.openssl.org/",
|
"https://www4.example.com/",
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *pull_one_url(void *url)
|
static void *pull_one_url(void *url)
|
||||||
|
105
docs/examples/version-check.pl
Executable file
105
docs/examples/version-check.pl
Executable file
@@ -0,0 +1,105 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) 1998 - 2010, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# This script accepts a source file as input on the command line.
|
||||||
|
#
|
||||||
|
# It first loads the 'symbols-in-versions' document and stores a lookup
|
||||||
|
# table for all known symbols for which version they were introduced.
|
||||||
|
#
|
||||||
|
# It then scans the given source file to dig up all symbols starting with CURL.
|
||||||
|
# Finally, it sorts the internal list of found symbols (using the version
|
||||||
|
# number as sort key) and then it outputs the most recent version number and
|
||||||
|
# the symbols from that version that are used.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# version-check.pl [source file]
|
||||||
|
#
|
||||||
|
|
||||||
|
open(S, "<../libcurl/symbols-in-versions") || die;
|
||||||
|
|
||||||
|
my %doc;
|
||||||
|
my %rem;
|
||||||
|
while(<S>) {
|
||||||
|
if(/(^CURL[^ \n]*) *(.*)/) {
|
||||||
|
my ($sym, $rest)=($1, $2);
|
||||||
|
my @a=split(/ +/, $rest);
|
||||||
|
|
||||||
|
$doc{$sym}=$a[0]; # when it was introduced
|
||||||
|
|
||||||
|
if($a[2]) {
|
||||||
|
# this symbol is documented to have been present the last time
|
||||||
|
# in this release
|
||||||
|
$rem{$sym}=$a[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
close(S);
|
||||||
|
|
||||||
|
sub age {
|
||||||
|
my ($ver)=@_;
|
||||||
|
|
||||||
|
my @s=split(/\./, $ver);
|
||||||
|
return $s[0]*10000+$s[1]*100+$s[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
my %used;
|
||||||
|
open(C, "<$ARGV[0]") || die;
|
||||||
|
|
||||||
|
while(<C>) {
|
||||||
|
if(/\W(CURL[_A-Z0-9v]+)\W/) {
|
||||||
|
#print "$1\n";
|
||||||
|
$used{$1}++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close(C);
|
||||||
|
|
||||||
|
sub sortversions {
|
||||||
|
my $r = age($doc{$a}) <=> age($doc{$b});
|
||||||
|
if(!$r) {
|
||||||
|
$r = $a cmp $b;
|
||||||
|
}
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
my @recent = reverse sort sortversions keys %used;
|
||||||
|
|
||||||
|
# the most recent symbol
|
||||||
|
my $newsym = $recent[0];
|
||||||
|
# the most recent version
|
||||||
|
my $newver = $doc{$newsym};
|
||||||
|
|
||||||
|
print "The scanned source uses these symbols introduced in $newver:\n";
|
||||||
|
|
||||||
|
for my $w (@recent) {
|
||||||
|
if($doc{$w} eq $newver) {
|
||||||
|
printf " $w\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
2
docs/libcurl/.gitignore
vendored
Normal file
2
docs/libcurl/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.html
|
||||||
|
*.pdf
|
@@ -1,5 +1,24 @@
|
|||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 1998 - 2011, 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.
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||||
|
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_duphandle - Clone a libcurl session handle
|
curl_easy_duphandle - Clone a libcurl session handle
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
.\" *
|
.\" *
|
||||||
.\" * This software is licensed as described in the file COPYING, which
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
.\" * you should have received as part of this distribution. The terms
|
.\" * you should have received as part of this distribution. The terms
|
||||||
@@ -31,8 +31,8 @@ curl_easy_escape - URL encodes the given string
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This function converts the given input string to an URL encoded string and
|
This function converts the given input string to an URL encoded string and
|
||||||
returns that as a new allocated string. All input characters that are not a-z,
|
returns that as a new allocated string. All input characters that are not a-z,
|
||||||
A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a
|
A-Z, 0-9, '-', '.', '_' or '~' are converted to their "URL escaped" version
|
||||||
two-digit hexadecimal number).
|
(%NN where NN is a two-digit hexadecimal number).
|
||||||
|
|
||||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
|
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
|
||||||
uses strlen() on the input \fBurl\fP to find out the size.
|
uses strlen() on the input \fBurl\fP to find out the size.
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
.\" * | (__| |_| | _ <| |___
|
.\" * | (__| |_| | _ <| |___
|
||||||
.\" * \___|\___/|_| \_\_____|
|
.\" * \___|\___/|_| \_\_____|
|
||||||
.\" *
|
.\" *
|
||||||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
.\" *
|
.\" *
|
||||||
.\" * This software is licensed as described in the file COPYING, which
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
.\" * you should have received as part of this distribution. The terms
|
.\" * you should have received as part of this distribution. The terms
|
||||||
@@ -80,12 +80,13 @@ waits in line for the pipeline and more. (Added in 7.19.0)
|
|||||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||||
start until the file transfer is just about to begin. This includes all
|
start until the file transfer is just about to begin. This includes all
|
||||||
pre-transfer commands and negotiations that are specific to the particular
|
pre-transfer commands and negotiations that are specific to the particular
|
||||||
protocol(s) involved.
|
protocol(s) involved. It does \fInot\fP involve the sending of the protocol-
|
||||||
|
specific request that triggers a transfer.
|
||||||
.IP CURLINFO_STARTTRANSFER_TIME
|
.IP CURLINFO_STARTTRANSFER_TIME
|
||||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||||
start until the first byte is just about to be transferred. This includes
|
start until the first byte is received by libcurl. This includes
|
||||||
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate
|
CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the
|
||||||
the result.
|
result.
|
||||||
.IP CURLINFO_REDIRECT_TIME
|
.IP CURLINFO_REDIRECT_TIME
|
||||||
Pass a pointer to a double to receive the total time, in seconds, it took for
|
Pass a pointer to a double to receive the total time, in seconds, it took for
|
||||||
all redirection steps include name lookup, connect, pretransfer and transfer
|
all redirection steps include name lookup, connect, pretransfer and transfer
|
||||||
@@ -173,6 +174,17 @@ string holding the IP address of the most recent connection done with this
|
|||||||
\fBcurl\fP handle. This string may be IPv6 if that's enabled. Note that you
|
\fBcurl\fP handle. This string may be IPv6 if that's enabled. Note that you
|
||||||
get a pointer to a memory area that will be re-used at next request so you
|
get a pointer to a memory area that will be re-used at next request so you
|
||||||
need to copy the string if you want to keep the information. (Added in 7.19.0)
|
need to copy the string if you want to keep the information. (Added in 7.19.0)
|
||||||
|
.IP CURLINFO_PRIMARY_PORT
|
||||||
|
Pass a pointer to a long to receive the destination port of the most recent
|
||||||
|
connection done with this \fBcurl\fP handle. (Added in 7.21.0)
|
||||||
|
.IP CURLINFO_LOCAL_IP
|
||||||
|
Pass a pointer to a char pointer to receive the pointer to a zero-terminated
|
||||||
|
string holding the local (source) IP address of the most recent connection done
|
||||||
|
with this \fBcurl\fP handle. This string may be IPv6 if that's enabled. The
|
||||||
|
same restrictions apply as to \fICURLINFO_PRIMARY_IP\fP. (Added in 7.21.0)
|
||||||
|
.IP CURLINFO_LOCAL_PORT
|
||||||
|
Pass a pointer to a long to receive the local (source) port of the most recent
|
||||||
|
connection done with this \fBcurl\fP handle. (Added in 7.21.0)
|
||||||
.IP CURLINFO_COOKIELIST
|
.IP CURLINFO_COOKIELIST
|
||||||
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
|
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
|
||||||
cookies cURL knows (expired ones, too). Don't forget to
|
cookies cURL knows (expired ones, too). Don't forget to
|
||||||
@@ -187,11 +199,16 @@ working with the socket, you must call curl_easy_cleanup() as usual and let
|
|||||||
libcurl close the socket and cleanup other resources associated with the
|
libcurl close the socket and cleanup other resources associated with the
|
||||||
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
|
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
|
||||||
(Added in 7.15.2)
|
(Added in 7.15.2)
|
||||||
|
|
||||||
|
NOTE: this API is not really working on win64, since the SOCKET type on win64
|
||||||
|
is 64 bit large while its 'long' is only 32 bits.
|
||||||
.IP CURLINFO_FTP_ENTRY_PATH
|
.IP CURLINFO_FTP_ENTRY_PATH
|
||||||
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
||||||
path of the entry path. That is the initial path libcurl ended up in when
|
path of the entry path. That is the initial path libcurl ended up in when
|
||||||
logging on to the remote FTP server. This stores a NULL as pointer if
|
logging on to the remote FTP server. This stores a NULL as pointer if
|
||||||
something is wrong. (Added in 7.15.4)
|
something is wrong. (Added in 7.15.4)
|
||||||
|
|
||||||
|
Also works for SFTP since 7.21.4
|
||||||
.IP CURLINFO_CERTINFO
|
.IP CURLINFO_CERTINFO
|
||||||
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
|
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
|
||||||
struct that holds a number of linked lists with info about the certificate
|
struct that holds a number of linked lists with info about the certificate
|
||||||
@@ -259,7 +276,7 @@ file transfer is just about to begin. This includes all pre-transfer commands
|
|||||||
and negotiations that are specific to the particular protocol(s) involved.
|
and negotiations that are specific to the particular protocol(s) involved.
|
||||||
.IP STARTTRANSFER
|
.IP STARTTRANSFER
|
||||||
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
|
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
|
||||||
first byte is just about to be transferred.
|
first byte is received by libcurl.
|
||||||
.IP TOTAL
|
.IP TOTAL
|
||||||
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
|
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
|
||||||
.IP REDIRECT
|
.IP REDIRECT
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
|
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_init - Start a libcurl easy session
|
curl_easy_init - Start a libcurl easy session
|
||||||
|
@@ -1,4 +1,24 @@
|
|||||||
.\"
|
.\" **************************************************************************
|
||||||
|
.\" * _ _ ____ _
|
||||||
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
|
.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_pause - pause and unpause a connection
|
curl_easy_pause - pause and unpause a connection
|
||||||
|
@@ -1,6 +1,24 @@
|
|||||||
.\" You can view this file with:
|
.\" **************************************************************************
|
||||||
.\" nroff -man [file]
|
.\" * _ _ ____ _
|
||||||
.\"
|
.\" * Project ___| | | | _ \| |
|
||||||
|
.\" * / __| | | | |_) | |
|
||||||
|
.\" * | (__| |_| | _ <| |___
|
||||||
|
.\" * \___|\___/|_| \_\_____|
|
||||||
|
.\" *
|
||||||
|
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is licensed as described in the file COPYING, which
|
||||||
|
.\" * you should have received as part of this distribution. The terms
|
||||||
|
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
|
||||||
|
.\" *
|
||||||
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
.\" * copies of the Software, and permit persons to whom the Software is
|
||||||
|
.\" * furnished to do so, under the terms of the COPYING file.
|
||||||
|
.\" *
|
||||||
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
.\" * KIND, either express or implied.
|
||||||
|
.\" *
|
||||||
|
.\" **************************************************************************
|
||||||
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
curl_easy_perform - Perform a file transfer
|
curl_easy_perform - Perform a file transfer
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user