Compare commits

..

501 Commits

Author SHA1 Message Date
Daniel Stenberg
3bc11344de Version 7.17.0 (13 September 2007) 2007-09-13 20:22:14 +00:00
Daniel Stenberg
3dbe708308 added some further stuff from the feature-requests tracker, and a bunch of URLs
to the specific tracker entries
2007-09-13 09:02:15 +00:00
Dan Fandrich
621709c623 TFTP error 0 is no longer treated as success 2007-09-12 18:20:52 +00:00
Daniel Stenberg
9e241864e3 Extracting the CURLINFO_PRIVATE pointer makes no point since nothing set
it. This caused a segfault in some fprintf() implementations. Like on Solaris.
2007-09-12 10:46:14 +00:00
Daniel Stenberg
cf613fdba4 rephrased to mention ftp 2007-09-11 22:37:47 +00:00
Daniel Stenberg
e6addcf624 curl.digimirror.nl is a new mirror in Amsterdam, the Netherlands 2007-09-11 22:36:39 +00:00
Daniel Stenberg
9e88343a17 Daniel S (12 September 2007)
- Bug report #1792649 (http://curl.haxx.se/bug/view.cgi?id=1792649) pointed
  out a problem with doing an empty upload over FTP on a re-used connection.
  I added test case 541 to reproduce it and to verify the fix.

- I noticed while writing test 541 that the FTP code wrongly did a CWD on the
  second transfer as it didn't store and remember the "" path from the
  previous transfer so it would instead CWD to the entry path as stored. This
  worked, but did a superfluous command. Thus, test case 541 now also verifies
  this fix.
2007-09-11 22:23:57 +00:00
Daniel Stenberg
1ce732e9d6 - I noticed while writing test 541 that the FTP code wrongly did a CWD on the
second transfer as it didn't store and remember the "" path from the
  previous transfer so it would instead CWD to the entry path as stored. This
  worked, but did a superfluous command. Thus, test case 541 now also verifies
  this fix.
2007-09-11 22:21:39 +00:00
Daniel Stenberg
cc618e761c - Bug report #1792649 (http://curl.haxx.se/bug/view.cgi?id=1792649) pointed
out a problem with doing an empty upload over FTP on a re-used connection.
  I added test case 541 to reproduce it and to verify the fix.
2007-09-11 22:21:12 +00:00
Daniel Stenberg
24db40de7c A brand new binding for SP-Forth was written 2007-09-09 22:22:45 +00:00
Dan Fandrich
7350f9851a TFTP now reports the "not defined" TFTP error code 0 as an error,
not success.
2007-09-07 20:35:37 +00:00
Dan Fandrich
d030dfa6e2 Added test case 1007 to test permission problem when uploading with TFTP
(to validate bug #1790403).
2007-09-07 20:05:20 +00:00
Daniel Stenberg
14d6db0873 http://curl.cheap.co.il is a new mirror in Tel-Aviv, Israel 2007-09-06 21:38:50 +00:00
Daniel Stenberg
0ff311aa1a two new CONNECT response problems that have appeared 2007-09-06 13:38:05 +00:00
Dan Fandrich
8147c3659d Minix doesn't support getsockopt on UDP sockets or send/recv on TCP
sockets.
2007-09-05 22:01:57 +00:00
Daniel Stenberg
73e91ce20c Curl_GetFTPResponse() now checks and properly deals with the fact that the
underlying ftp_readresp() function has a separate "cache" where there might
in fact be leftover data...
2007-09-05 21:41:07 +00:00
Dan Fandrich
8780ff879c Minix doesn't support getsockopt on UDP sockets or send/recv on TCP
sockets.
2007-09-05 17:22:23 +00:00
Dan Fandrich
6fd1cfeab1 Minor updates 2007-09-05 17:17:59 +00:00
Daniel Stenberg
9d0533056c I can't spell 2007-09-03 14:10:32 +00:00
Daniel Stenberg
6c4f317f7f curlpp 0.7.1 was relased 2007-09-03 14:08:23 +00:00
Gunter Knauf
21ed69b51e added some comments for MingW32 builds. 2007-09-03 11:10:46 +00:00
Dan Fandrich
3b819b3064 bash is not required when compiling under Minix 2007-09-01 21:21:52 +00:00
Dan Fandrich
3fa60164af Renamed the CURLE_FTP_SSL_FAILED error code to CURLE_USE_SSL_FAILED.
Renamed the curl_ftpssl enum to curl_usessl and its enumerated constants,
creating macros for backward compatibility.
2007-08-31 19:36:32 +00:00
Dan Fandrich
ac6e0501c6 Made some of the error strings returned by the *strerror functions more
generic, and more consistent with each other.
2007-08-31 17:56:06 +00:00
Dan Fandrich
4f17c58315 Fixed an invalid returned error code added in my last submission. 2007-08-31 17:54:01 +00:00
Dan Fandrich
f6251734fc Added more accurate error code returns from SFTP operations. Added test
case 615 to test an SFTP upload failure.
2007-08-30 23:03:59 +00:00
Dan Fandrich
9f44a95522 Renamed several libcurl error codes and options to make them more general
and allow reuse by multiple protocols. Several unused error codes were
removed.  In all cases, macros were added to preserve source (and binary)
compatibility with the old names.  These macros are subject to removal at
a future date, but probably not before 2009.  An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.

Documented some newer error codes in libcurl-error(3)
2007-08-30 20:34:57 +00:00
Gunter Knauf
4b60c3e9d3 added --enable-ldaps switch;
renamed LDAP(S) messages from 'yes' to 'enabled'.
2007-08-30 20:28:40 +00:00
Dan Fandrich
5d4c981e13 Fixed a few compiler warnings. Try to do a slightly better job of
cleaning up after an OOM condition in curl_multi_add_handle
2007-08-30 18:26:19 +00:00
Daniel Stenberg
da4a776758 Made Curl_GetFTPResponse() use lots less code and instead use the proper
low-level ftp_readresp() function. Hopefully adressing bug #1779054.
2007-08-30 14:06:00 +00:00
Dan Fandrich
1b66c1da6c Added lots of consts 2007-08-29 05:36:53 +00:00
Dan Fandrich
5cb2ee878c Mention that 'make test' does more than just run all the tests (suggested
by Kris/tinker105 in bug #1779054) and mention the torture tests.
2007-08-28 18:23:19 +00:00
Dan Fandrich
8cf0814a14 Fixed some minor type mismatches and missing consts mainly found by splint. 2007-08-27 06:31:28 +00:00
Dan Fandrich
523767660c Fixed some minor mismatched types found by splint. 2007-08-26 05:53:26 +00:00
Gunter Knauf
327c0d6b1c bail out with error if someone tries to use another cert than PEM with OpenLDAP. 2007-08-25 12:10:30 +00:00
Gunter Knauf
870842ccee only link with -lwldap32 if we dont use other LDAP SDKs. 2007-08-25 12:08:38 +00:00
Gunter Knauf
68b215157f added defines to build with OpenLDAP. 2007-08-24 17:08:49 +00:00
Patrick Monnerat
a892cf2c12 Adding DOCS file in OS400 installation library with license and various other documentation text files.
Setting character set of OS400 installed source components
2007-08-24 15:56:59 +00:00
Daniel Stenberg
7cba40b218 Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
out that libcurl didn't deal with large responses from server commands, when
the single response was consisting of multiple lines but of a total size of
16KB or more. Dan Fandrich improved the ftp test script and provided test
case 1006 to repeat the problem, and I fixed the code to make sure this new
test case runs fine.
2007-08-24 14:00:42 +00:00
Patrick Monnerat
d994fcf2b1 Remove leading space in curl_version_info ss_version field. 2007-08-24 09:06:17 +00:00
Dan Fandrich
975fafdc49 Added test case 1005 to test excessively-long replies spread out over
multiple lines (similar to test case 1003).
2007-08-23 23:25:47 +00:00
Dan Fandrich
9537580ba2 Allow ftp server alternate replies to contain backslash-escaped control
characters.
2007-08-23 23:24:39 +00:00
Patrick Monnerat
bc0adcef1f Make ldap.h, gssapi.h and qsossl.h inclusions conditional. 2007-08-23 18:46:45 +00:00
Dan Fandrich
7ffae92daf Need even more time to wait for an accept. 2007-08-23 18:45:28 +00:00
Dan Fandrich
abca03cf36 Added test1004 to validate a previous fix for a memory leak when an
empty proxy server is selected.
2007-08-23 17:35:00 +00:00
Dan Fandrich
374f0214b6 Mention OS/400 and TPF 2007-08-23 17:26:42 +00:00
Daniel Stenberg
4945b2454d ported to OS/400 2007-08-23 15:00:55 +00:00
Daniel Stenberg
a5cb022407 added the two new os400 files 2007-08-23 14:58:10 +00:00
Daniel Stenberg
feb63efc31 Add the files in the OS400 dir to the dist. I didn't add it as a new subdir
just because if I do that automake does funny things automatically with the
makefile.sh file in that directory and thus doing it this way was a quick
work-around that annoyance!
2007-08-23 14:46:37 +00:00
Daniel Stenberg
4cf3ad07e5 --libcurl does not support -F 2007-08-23 14:33:08 +00:00
Patrick Monnerat
557cc55f6f Porting library to OS/400 2007-08-23 14:30:24 +00:00
Gunter Knauf
2d8dba388b added support for CA cert verification;
default now to verify cert unless data->set.ssl.verifypeer is 0.
2007-08-23 00:10:56 +00:00
Daniel Stenberg
91fd2c3bcd Bug report #1779751 (http://curl.haxx.se/bug/view.cgi?id=1779751) pointed
out that doing first a file:// upload and then an FTP upload crashed libcurl
or at best caused furious valgrind complaints. Fixed now by making sure we
free and clear the file-specific struct properly when done with it.
2007-08-22 22:48:41 +00:00
Gisle Vanem
d38891c950 Reversed the 'HAVE_LDAP_URL_PARSE' ifdef statement. 2007-08-22 18:05:46 +00:00
Daniel Stenberg
381e372939 Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
out that libcurl didn't deal with very long (>16K) FTP server response lines
properly. Starting now, libcurl will chop them off (thus the client app will
not get the full line) but survive and deal with them fine otherwise. Test
case 1003 was added to verify this.
2007-08-22 14:18:06 +00:00
Daniel Stenberg
c347db2e0a added a size > buffer size check to make it easier to track this in the
future
2007-08-22 14:09:13 +00:00
Daniel Stenberg
232a4553b8 Upped the buffer size to 17000+ bytes to prepare for the upcoming test 1003
that verfies ridiculously long server response lines. Also changed sprintf
to snprintf in a few places.
2007-08-22 13:57:49 +00:00
Daniel Stenberg
014f1bea9a 1) the talk about strings used by libcurl doesn't apply to libcurl >= 7.17.0
2) added nroff header
2007-08-22 11:28:26 +00:00
Gunter Knauf
5b4f50857a for now comment the tls_start section... 2007-08-22 10:14:57 +00:00
Gunter Knauf
6f10a718e4 sync libssh2 paths with comments. 2007-08-21 03:04:46 +00:00
Gunter Knauf
658de40930 added targets to create the files missing in CVS which makes calling buildconf.bat obsolete;
removed obsolete wsock32 link lib.
2007-08-21 02:42:29 +00:00
Gunter Knauf
2c06e7f8ef fixed wrong CLAGS define. 2007-08-20 23:31:57 +00:00
Gunter Knauf
fa1c916943 fixed warning with unused var;
removed now obsolete defines since we include now ldap headers which define these.
2007-08-20 23:31:26 +00:00
Daniel Stenberg
b132e865b9 Based on a patch by Christian Vogt, the FTP code now sets the upcoming
download transfer size much earlier to be possible to get read with
CURLINFO_CONTENT_LENGTH_DOWNLOAD as soon as possible.
2007-08-20 21:54:00 +00:00
Gunter Knauf
77431568d2 converted tabs to spaces. 2007-08-20 19:33:46 +00:00
Gunter Knauf
e16c1b8e28 removed trailing spaces. 2007-08-20 19:30:25 +00:00
Dan Fandrich
1a8d8aa227 Increase timeout for accept for improved reliability on loaded servers. 2007-08-20 17:53:38 +00:00
Gunter Knauf
d4c4fd6272 compile with ldaps by default since it seems to work fine so far. 2007-08-20 16:34:04 +00:00
Gunter Knauf
acb905231d fixed ldaps section for OpenLDAP. Still not working, but at least it compiles now, and should serve as base to get it finally working. Also seems that the ifdefs can be arranged some better because the Solaris and Netscape/iPlanet/Mozilla LDAP SDKs seem to be closer to the Novell section than the OpenLDAP one. 2007-08-20 16:30:41 +00:00
Gunter Knauf
c915eac93c added some comments about the paths and build options;
added define to build with ldaps support;
enabled build with the Novell LDAP SDK.
2007-08-20 16:21:51 +00:00
Gunter Knauf
72e675caee dont set CURL_LDAP_HYBRID for MingW32 configure builds. 2007-08-20 15:51:45 +00:00
Gunter Knauf
e347cff0e4 added define for ldap_ssl.h. 2007-08-20 12:50:44 +00:00
Gunter Knauf
d79fdbc46e ignore errors of the RM command; seems that the del command fails on W2K when the file to delete isnt found while on XP it only prints the warning but make continues.... 2007-08-19 23:23:50 +00:00
Gunter Knauf
ab13c2f814 added some comments in the makefiles about build options. 2007-08-19 00:26:24 +00:00
Daniel Stenberg
138ca334f9 ignore all the binaries and the .deps and .libs 2007-08-17 22:33:25 +00:00
Daniel Stenberg
1aa82decea - Robson Braga Araujo filed bug report #1776232
(http://curl.haxx.se/bug/view.cgi?id=1776232) about libcurl calling
  Curl_client_write(), passing on a const string that the caller may not
  modify and yet it does (on some platforms).
2007-08-17 22:31:51 +00:00
Daniel Stenberg
014fe6971e remove stupid comment since there's no content in this test case 2007-08-17 22:24:51 +00:00
Daniel Stenberg
3217809294 Robson Braga Araujo filed bug report #1776235
(http://curl.haxx.se/bug/view.cgi?id=1776235) about ftp requests with NOBODY
on a directory would do a "SIZE (null)" request. This is now fixed and test
case 1000 was added to verify.
2007-08-17 22:22:43 +00:00
Daniel Stenberg
f3c7adcb54 NEXT soname bump
* #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
   from being output in NOBODY requests over ftp
2007-08-17 22:21:41 +00:00
Daniel Stenberg
dcf698dc74 some keywords for future stats/coverage checks 2007-08-17 22:17:23 +00:00
Daniel Stenberg
54117be639 Moved the 5320 and 5322 into the 1000-series instead which is a documented
range. They are about FTP but the 100-199 range is full.
2007-08-17 22:11:25 +00:00
Daniel Stenberg
5a79532aee Song Ma provided a patch that cures a problem libcurl has when doing resume
HTTP PUT using Digest authentication. Test case 5320 and 5322 were also
added to verify the functionality.
2007-08-17 20:21:32 +00:00
Gunter Knauf
29ac001aa6 fixed warning about uninitialized. 2007-08-16 15:23:39 +00:00
Gunter Knauf
ccba0d10b6 added basic ldaps support; for now its ifdef'd with HAVE_LDAP_SSL unless we know its fully working, and available with all LDAP SDKs.
Win32 requires to have the trusted CA in local keystore - I've not found yet a way to disable the cert check.
2007-08-16 14:08:47 +00:00
Gunter Knauf
7f7e42732d added define PORT_LDAPS. 2007-08-15 16:17:32 +00:00
Patrick Monnerat
ca410ec2ca Fix a potential buffer overflow bug in lib/version.c 2007-08-15 14:49:16 +00:00
Gunter Knauf
e5d8693865 added ldap_msgfree() to fix memory leak. 2007-08-15 08:18:37 +00:00
Gunter Knauf
46c92c0b80 added a dependency for libcares if build with ares support;
other minor makefile tweaks.
2007-08-14 18:39:26 +00:00
Dan Fandrich
7b5d148b1f LDAP is no longer excluded on Minix. 2007-08-14 17:23:32 +00:00
Gunter Knauf
f4bc326670 updated NetWare docu about recent LDAP changes. 2007-08-14 16:43:52 +00:00
Gunter Knauf
327598e7b4 only include LDAP headers if we build with LDAP support. 2007-08-14 16:31:20 +00:00
Gunter Knauf
11caaad5f9 added -lwldap32 to link libs. 2007-08-14 14:48:25 +00:00
Gunter Knauf
3e0845e182 changed autoload dependent LDAP NLM. 2007-08-14 13:01:40 +00:00
Gunter Knauf
a2c7abea6c trial to enable LDAP support again with patched Novell headers. 2007-08-14 12:02:10 +00:00
Daniel Stenberg
2f8f12e82e Andrew Wansink provided an NTLM bugfix: in the case the server sets the flag
NTLMFLAG_NEGOTIATE_UNICODE, we need to filter it off because libcurl doesn't
unicode encode the strings it packs into the NTLM authenticate packet.
2007-08-14 10:28:21 +00:00
Daniel Stenberg
5cdcc2b3aa the curl_multi_handle_control() idea 2007-08-14 10:11:34 +00:00
Dan Fandrich
652e2cf57c Removed redundant dependency lines 2007-08-13 18:11:37 +00:00
Dan Fandrich
8ee5e95ab1 Removed unused variable. 2007-08-13 16:37:51 +00:00
Patrick Monnerat
22c61d8da6 Simplify and rename internal structure to avoid potential name clash with LDAP header file. 2007-08-13 13:03:08 +00:00
Daniel Stenberg
1b88990cbb Fixed the LDAP_DEPRECATED #define as suggested by Daniel Johnson, and
indented some of the code to curl-style
2007-08-12 22:25:50 +00:00
Daniel Stenberg
df3e8e19c1 minor change in language for the --libcurl source header 2007-08-12 20:36:06 +00:00
Gunter Knauf
44dc36cc8f disable LDAP since we can no longer compile due to header incompatiblities. 2007-08-12 00:48:10 +00:00
Daniel Stenberg
6d3701318d Allen Pulsifer provided a patch that makes libcurl set the expected download
size earlier when doing HTTP downloads, so that applications and the
progress meter etc know get the info earlier in the flow than before.
2007-08-11 21:05:13 +00:00
Daniel Stenberg
d0edb47896 Patrick Monnerat modified the LDAP code and approach in curl. Starting now,
the configure script checks for openldap and friends and we link with those
libs just like we link all other third party libraries, and we no longer
dlopen() those libraries. Our private header file lib/ldap.h was renamed to
lib/curl_ldap.h due to this. I set a tag in CVS (curl-7_17_0-preldapfix)
just before this commit, just in case.
2007-08-11 20:57:54 +00:00
Gunter Knauf
b238e0b1b4 fixed warning with gcc 4.x (hopefully); dynamincally imported UseAccurateCaseForPaths() for CLIB port to be stonetime-compatible (NW 3.x). 2007-08-09 22:33:49 +00:00
Gunter Knauf
3f62bfb61d fixed a warning which MingW gcc 4.2.1. 2007-08-09 21:05:05 +00:00
Dan Fandrich
c7a66d5af4 There's no need to ignore the User-Agent for this test. 2007-08-09 03:28:16 +00:00
Gunter Knauf
1866b95b7f moved ugly CLIB define to nwos.c. 2007-08-08 20:09:08 +00:00
Dan Fandrich
668c204970 Song Ma noted a zlib memory leak in the illegal compressed header
countermeasures code path.
2007-08-08 17:51:40 +00:00
Gunter Knauf
af2d899d6b removed asm rules since we have no asm in the sources, and this produced 2 warnings. 2007-08-08 17:07:16 +00:00
Gunter Knauf
d5ed9f787f blocked ssize_t define for MingW32. 2007-08-08 16:59:43 +00:00
Patrick Monnerat
259f27b09f Fix getsockname argument type
Improve "universal" alignment type in struct memdebug
2007-08-08 10:37:07 +00:00
Daniel Stenberg
c1b9356081 Usage of the BCURLOPT_PROGRESSFUNCTION callback is not recommended when using
the multi interface, but having the comment in here caused more questions than
we fixed problems so I remove it now. It still works fine.
2007-08-07 21:14:31 +00:00
Dan Fandrich
c669e1ae45 Fixed torture test for test 509 2007-08-07 18:24:49 +00:00
Gunter Knauf
10203cada9 moved HAVE_LONGLONG from makefiles to config-win32.h. 2007-08-07 17:40:56 +00:00
Daniel Stenberg
58b0415d36 add URL to more "generated public config.h" details 2007-08-07 13:01:36 +00:00
Patrick Monnerat
ad9cb40b6f Some #if --> #ifdef
undef standard *printf before (re)defining them
2007-08-07 12:44:38 +00:00
Dan Fandrich
2e60ca382d Fixed some icc compiler warnings. 2007-08-07 00:10:27 +00:00
Gunter Knauf
25920f4a14 Peteris Krumins pointed out that MingW32 doesnt provide a batch file to set the path to the bin folder. 2007-08-06 22:21:38 +00:00
Daniel Stenberg
160c302933 ontributors from the 7.16.4 release notes and a removed duplicate 2007-08-06 15:58:05 +00:00
Daniel Stenberg
dddc8e3374 removed the rsaglue hint since it doesn't apply to modern OpenSSL, and added
some brief hints about gssapi and libssh2
2007-08-06 15:54:38 +00:00
Daniel Stenberg
bccb1ee7cd we now support GSS/Kerberos 5 for ftp file transfers! 2007-08-06 14:56:21 +00:00
Daniel Stenberg
26af759732 Patrick Monnerat updated the _FORM_DEBUG-enabled code, and I updated comments
based on his comments/suggestions.
2007-08-05 21:33:31 +00:00
Gunter Knauf
87fc4ad919 changed to use libssh2 0.16;
fixed link order in case libssh2 is build with zlib.
2007-08-04 23:35:23 +00:00
Daniel Stenberg
b214298960 another mirror 2007-08-04 20:58:53 +00:00
Daniel Stenberg
1926f4573d Patrick Monnerat fixed curl_easy_escape() and curlx_strtoll() to work on
non-ASCII systems.
2007-08-04 20:47:59 +00:00
Dan Fandrich
7fe65aaf5b Fixed a couple of compiler warnings. 2007-08-04 16:54:58 +00:00
Dan Fandrich
0d3d84e3ff Refactored CreateConnection() somewhat to reduce its length by splitting
it into a few new functions.
Fixed a few leaks in out of memory conditions, including for test case 231.
2007-08-03 22:46:59 +00:00
Gunter Knauf
e789a3802c fixed small fix issue I introduced with my previous commit. 2007-08-03 19:54:31 +00:00
Gunter Knauf
4aabbc5ac2 some more makefile fixes/changes. 2007-08-03 14:30:02 +00:00
James Housley
e7a50e37d6 Start adding some expanded error conversion of libssh2 errors. 2007-08-03 13:57:37 +00:00
James Housley
9fa05db83b The previous commit to force the use of libssh2-0.16 by removing
LIBSSH2_APINO
2007-08-03 13:46:59 +00:00
Gunter Knauf
7ed58c4636 changed 'rm -f' to 'del /f' so it works without GnuUtils as Peteris Krumins pointed out; changed to use latest external libs. 2007-08-03 12:53:00 +00:00
Gunter Knauf
f2f7c18245 Peteris Krumins pointed out some MingW32 related build issues. 2007-08-03 11:46:00 +00:00
Gunter Knauf
efaab37698 Peteris Krumins pointed out that the standard MingW32 build depends on zlib; removed that, and added another option for zlib build, and renamed all other targets to reflect zlib dependency. 2007-08-03 11:24:22 +00:00
Daniel Stenberg
869319ce4a SCP and SFTP support now requires libssh2 0.16 or later 2007-08-03 08:31:47 +00:00
Daniel Stenberg
252f16db02 remove left-over partly support for libssh2 0.14 2007-08-03 08:25:28 +00:00
Daniel Stenberg
72f5d6ba46 The SSH code now only works with libssh2 0.16 or later. Thus we must not
release the next curl until there is a libssh2 0.16 released.
2007-08-03 08:14:51 +00:00
Daniel Stenberg
5ec786b02e Scott Cantor filed bug report #1766320
(http://curl.haxx.se/bug/view.cgi?id=1766320) pointing out that the libcurl
code accessed two curl_easy_setopt() options (CURLOPT_DNS_CACHE_TIMEOUT and
CURLOPT_DNS_USE_GLOBAL_CACHE) as ints even though they're documented to be
passed in as longs, and that makes a difference on 64 bit architectures.
2007-08-02 20:10:28 +00:00
Dan Fandrich
035ee257c8 Fixed a compiler warning. 2007-08-02 19:23:35 +00:00
Daniel Stenberg
188b08ca55 Patrick Monnerat's cleanup fix after my alloc-strings commit 2007-08-02 14:42:16 +00:00
Daniel Stenberg
6f750f3b57 Dmitriy Sergeyev reported a regression: resumed file:// transfers broke
after 7.16.2. This is much due to the different treatment file:// gets
internally, but now I added test 231 to make it less likely to happen again
without us noticing!
2007-08-02 14:09:08 +00:00
Daniel Stenberg
5a6dcdc36c clarify that setting POSTFIELDS to NULL or "" is not enough to make a zero byte
POST
2007-08-02 13:26:06 +00:00
Daniel Stenberg
59c16a570f argh, Greg Morse pointed out that the NTLM POST fix only worked if VERBOSE
was set, this should make it work for all cases!
2007-08-02 11:34:50 +00:00
Daniel Stenberg
50c10aa5bf Patrick Monnerat and I modified libcurl so that now it *copies* all strings
passed to it with curl_easy_setopt()! Previously it has always just refered
to the data, forcing the user to keep the data around until libcurl is done
with it. That is now history and libcurl will instead clone the given
strings and keep private copies.
2007-08-01 21:20:01 +00:00
Daniel Stenberg
006878686c Greg Morse reported a problem with POSTing using ANYAUTH to a server requiring
NTLM, and he provided test code and a test server and we worked out a bug
fix. We failed to count sent body data at times, which then caused internal
confusions when libcurl tried to send the rest of the data in order to
maintain the same connection alive.

(and then I did some minor reformatting of code in lib/http.c)
2007-08-01 12:58:04 +00:00
Daniel Stenberg
bd100b2a51 AIX 4 and 5 get to use non-blocking sockets 2007-07-30 22:54:02 +00:00
Daniel Stenberg
5b1bbffdff Peter O'Gorman pointed out (and fixed) that the non-blocking check in
configure made libcurl use blocking sockets on AIX 4 and 5, while that
wasn't the intention.
2007-07-30 22:53:18 +00:00
Daniel Stenberg
16710a1c9b users should use the CURLMOPT_TIMERFUNCTION rather than curl_multi_timeout
when using the socket API
2007-07-30 22:01:04 +00:00
Daniel Stenberg
ba5c71b79b less blocking these days 2007-07-30 21:47:56 +00:00
Daniel Stenberg
f3799462c2 updated based on suggestion from Jeff Pohlmeyer 2007-07-30 21:47:44 +00:00
Daniel Stenberg
f01c6e51f4 Patrick Monnerat restored qssl successful compilation and loading 2007-07-30 21:41:12 +00:00
Daniel Stenberg
21d62118dc give credit to Greg Zavertnik 2007-07-30 20:07:43 +00:00
Dan Fandrich
de55038e33 Properly set USE_SSL on OS/400 2007-07-30 17:08:26 +00:00
Dan Fandrich
ea908c23ae Fixed compiler warning on non-SSL builds 2007-07-30 17:05:39 +00:00
Daniel Stenberg
844cbc701a Added "4.15 FTPS doesn't work" and updated a few other sections slightly 2007-07-29 22:17:39 +00:00
Daniel Stenberg
f1fa7b8ba4 Bug report #1759542 (http://curl.haxx.se/bug/view.cgi?id=1759542). A bad use
of a socket after it has been closed, when the FTP-SSL data connection is taken
down.
2007-07-29 12:54:05 +00:00
Daniel Stenberg
86ff3194fa added missing part for the qsossl support 2007-07-27 08:33:32 +00:00
Daniel Stenberg
d460b601f9 added initial pkg-config file (attempt) 2007-07-26 21:56:47 +00:00
Dan Fandrich
48a06d1a7b Removed unused variable. 2007-07-24 15:23:16 +00:00
Daniel Stenberg
813a1107f4 #if that should be #ifdef 2007-07-23 21:48:27 +00:00
Daniel Stenberg
b3461bab1d Implemented the parts of Patrick Monnerat's OS/400 patch that introduces
support for the OS/400 Secure Sockets Layer library
2007-07-23 21:46:26 +00:00
Dan Fandrich
5ecd56d964 Implemented only the parts of Patrick Monnerat's OS/400 patch that renamed
some few internal identifiers to avoid conflicts, which could be useful on
other platforms.
2007-07-23 18:51:22 +00:00
Dan Fandrich
cc44fb1dc8 Log the "<CMD> wasn't handled" error normally since it is now expected
to occur in a couple of tests.
2007-07-23 17:51:43 +00:00
Gunter Knauf
77b0efdbc2 added 2 system libs necessary for linking OpenSSL 0.9.8e statically. 2007-07-23 01:05:34 +00:00
Daniel Stenberg
68653bcbdd fix mess added in my previous commit 2007-07-22 10:19:53 +00:00
Daniel Stenberg
9af807a5ce HTTP Digest auth fix on a re-used connection 2007-07-22 10:17:52 +00:00
Daniel Stenberg
4bbcc47f3f Added test case 354 that makes a simple FTP retrieval without password, which
verifies the bug fix in #1757328.
2007-07-22 10:08:59 +00:00
Daniel Stenberg
8ab495a088 test and verify curl -I on a single FTP file somewhat more than before 2007-07-21 21:49:23 +00:00
Daniel Stenberg
84e7bb85b1 To allow more flexibility in FTP test cases, I've removed the enforced states
from the test server code as they served no real purpose. The test server is
here to serve for the test cases, not to attempt to function as a real server!
2007-07-21 21:48:58 +00:00
Daniel Stenberg
4fc7e13a98 news 2007-07-21 21:47:02 +00:00
Dan Fandrich
b465750041 Make the pointers of a few static const arrays const, too, for safety. 2007-07-21 02:08:17 +00:00
Gunter Knauf
37dc0fa519 added curl include for debug builds. 2007-07-20 21:50:53 +00:00
Dan Fandrich
000fdc6b99 Document pwd as an sftp quote command for curl(1), and show it as
lower case for consistency since sftp commands are case insensitive.
2007-07-20 17:29:43 +00:00
Gunter Knauf
594fc0411e added lf to Win32 getpass_r() so that next output appears in new line. 2007-07-20 16:01:05 +00:00
Daniel Stenberg
94fcb4b09d PWD for SFTP is fixed 2007-07-20 15:33:44 +00:00
Daniel Stenberg
1a0034ac34 the "libssh2 owns the memory don't free it" case 2007-07-20 09:38:41 +00:00
Daniel Stenberg
e3377e637a Ralf S. Engelschall filed bug report #1757328
(http://curl.haxx.se/bug/view.cgi?id=1757328) and submitted a patch. It turns
out we broke login to FTP servers that don't require (nor understand) PASS
after the USER command
2007-07-20 09:35:58 +00:00
James Housley
2ab854cafd Fix a loop with PWD 2007-07-20 01:03:49 +00:00
Dan Fandrich
4a2f0fb2be Made some const arrays static to avoid unnecessary stack usage. 2007-07-20 00:41:12 +00:00
Daniel Stenberg
dca3564cfb minor addition, re-count of the number of lines of code 2007-07-19 21:35:36 +00:00
Daniel Stenberg
9d183bb7b1 libssh2 fix 2007-07-19 15:08:47 +00:00
Dan Fandrich
c7db74fe73 Revert the 512 change since newer versions of OpenSSH don't support DSA
keys that small.
2007-07-19 01:42:22 +00:00
James Housley
5251c45187 SFTP also supports PWD 2007-07-18 23:21:32 +00:00
Dan Fandrich
d9b5f327bf Added the list of sftp quote commands. 2007-07-18 22:23:07 +00:00
James Housley
ca1356702a As has been pointed out, err_msg should not be freed here. The actual
issue is in libssh2 and not freeing a dynamic error message during cleanup.
2007-07-18 18:31:34 +00:00
Dan Fandrich
89d119646d Use 512 bit keys to reduce the time taken to generate them. This shouldn't
really reduce security since in the common case of a daily automated build
the keys are only used for a single test run lasting a few minutes before
being deleted.
2007-07-18 00:27:13 +00:00
Dan Fandrich
989dd9c34a Fixed test cases 613 and 614 by improving the log postprocessor to handle
a new directory listing format that newer libssh2's can provide.  This
is probably NOT sufficient to handle all directory listing formats that
server's can provide and should be revisited.
2007-07-17 21:53:38 +00:00
Daniel Stenberg
1d728aae2a Jofell Gallardo posted a libcurl log using FTP that exposed a bug which made
a control connection that was deemed "dead" to yet be re-used in a following
request. We must make sure the connection gets closed on this situation.
2007-07-17 20:59:53 +00:00
Daniel Stenberg
98b9349be7 make it do all three requests on the same connection 2007-07-16 21:44:46 +00:00
Dan Fandrich
4706a93341 Fixed some more simple compile warnings in the examples. 2007-07-16 21:22:12 +00:00
Daniel Stenberg
b85b56a73d 45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
getaddrinfo() sorts the response list which effectively kills how libcurl
  deals with round-robin DNS entries. All details:
    http://curl.haxx.se/mail/lib-2007-07/0168.html
  initial suggested function to use for randomizing the response:
    http://curl.haxx.se/mail/lib-2007-07/0178.html
2007-07-16 21:08:08 +00:00
Daniel Stenberg
1da3d402f6 convert test case 540 to use a custom Host: header as well 2007-07-15 21:00:26 +00:00
Daniel Stenberg
1da3192d2d let's just export the whole argc + argv pair globally so that each test tool
can take advantage of it however they see fit!
2007-07-15 20:59:43 +00:00
Gunter Knauf
dab569d76c make users use the latest OpenSSL and Zlib libraries;
added hint to compile with SSPI with MSVC6 without PSDK.
2007-07-15 13:00:39 +00:00
Daniel Stenberg
598c589359 added another SEE ALSO 2007-07-14 23:01:49 +00:00
Daniel Stenberg
15c8219340 Added test case 540 and lib540.c, the 'proxyauth.c' test app posted by Shmulik
Regev on the libcurl mailing list on 10 Jul 2007, converted to a test case.
2007-07-14 22:39:22 +00:00
Daniel Stenberg
5ae21ebde9 add support for arg3 as the third argument... 2007-07-14 22:38:18 +00:00
Daniel Stenberg
c7e0d8c30b add some better logging when HTTP server start fails, and make the failure
really hard if the test server can't be resolved (like for ::1 ipv6)
2007-07-14 22:33:46 +00:00
Gunter Knauf
fee4f8c86d for now unless we do better fixed LIBSSH2_APINO compares to use long constants. 2007-07-14 15:59:01 +00:00
Daniel Stenberg
1261c3feba Brad House's fix to hish a win32 compiler warning 2007-07-14 13:14:58 +00:00
Daniel Stenberg
7fc300d5dc added Vlad's entire description of his valgrind fix 2007-07-14 13:11:36 +00:00
Daniel Stenberg
88ce03e945 Vlad Dinulescu fixed two outstanding valgrind reports 2007-07-14 13:08:50 +00:00
Dan Fandrich
5bed99c97d The examples don't need access to curl internal source files. 2007-07-13 21:31:44 +00:00
Daniel Stenberg
46c699c483 Colin Hogben filed bug report #1750274
(http://curl.haxx.se/bug/view.cgi?id=1750274) and submitted a patch for the
case where libcurl did a connect attempt to a non-listening port and didn't
provide a human readable error string back.
2007-07-13 20:17:35 +00:00
Daniel Stenberg
f7d6e147f1 Daniel Cater added the mentioning of CURL_DISABLE_TFTP 2007-07-13 20:09:38 +00:00
Daniel Stenberg
aad1d3ce14 Daniel Cater: libcurl-errors needs updating to reflect a couple of deprecated
error codes
2007-07-13 20:07:22 +00:00
Daniel Stenberg
cf5378b366 Daniel Cater made libcurl build with CURL_NO_OLDIES defined (which doesn't
define the symbols for backwards source compatibility)
2007-07-13 20:04:53 +00:00
Daniel Stenberg
fea938cbcb Daniel Cater made the vc8-generating line use double-quotes to run fine on
windows
2007-07-13 19:38:36 +00:00
Daniel Stenberg
a67c8b4698 Made the krb5 code build with Heimdal's GSSAPI lib 2007-07-12 21:34:42 +00:00
Dan Fandrich
49ce3e5160 Fixed some compile warnings and errors and improved portability in the
examples.
Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers
any longer.
2007-07-12 21:11:10 +00:00
Daniel Stenberg
4a728747e6 make it compile fine 2007-07-12 20:55:17 +00:00
Daniel Stenberg
f5a6355172 fix include path 2007-07-12 20:54:54 +00:00
Dan Fandrich
ffff8ddbef Compile most of the example apps in docs/examples when doing a 'make check'. 2007-07-12 20:38:54 +00:00
Daniel Stenberg
cf86f8cb78 Shmulik Regev found an (albeit rare) case where the proxy CONNECT operation
could in fact get stuck in an endless loop.
2007-07-12 20:15:38 +00:00
Daniel Stenberg
a53ba060c8 start the retry delay at 10 ms, double it for every failed attempt which makes
it 10 seconds delay after 11 attempts
2007-07-12 17:03:45 +00:00
Gunter Knauf
72bb5854f7 the timeout was probably too short with max = 1 sec, so lets test with 5 sec. 2007-07-12 10:54:15 +00:00
Gunter Knauf
0de56e5535 added nwos.c so that it gets distributed with releases and tarballs. 2007-07-12 10:44:46 +00:00
Gunter Knauf
0878b14f79 added time loop to sockfilt.c in order to wait for SO_REUSEADDR;
added go_sleep() to util.c.
2007-07-12 01:07:49 +00:00
Marty Kuhrt
7d56f35388 Updated to match curl.h 2007-07-11 23:17:11 +00:00
Daniel Stenberg
d12759c73e Made CURLOPT_SSL_VERIFYHOST set to 1 acts as described in the documentation:
fail to connect if there is no Common Name field found in the remote cert.
We should deprecate the support for this set to 1 anyway soon, since the
feature is pointless and most likely never really used by anyone.
2007-07-11 22:20:46 +00:00
Gunter Knauf
c0095d6dd9 removed now obsolete NETDB_DEFINE_CONTEXT macro calls. 2007-07-11 21:47:31 +00:00
Gunter Knauf
6a88eab067 updated makefile to compile nwos.c. 2007-07-11 21:38:28 +00:00
Gunter Knauf
a4f36558fc added NetWare-own file to provide some init functions (for now only CLIB);
added call to netware_init() in curl_global_init() to make sure it gets called before any library functions get used.
2007-07-11 21:34:22 +00:00
Dan Fandrich
5e1cd407a3 Added the first libcurl version to which the SSH options were added. 2007-07-11 19:21:38 +00:00
Gunter Knauf
2a1345ae9f added netdb.h for NetWare CLIB since gethostname() is defined there. 2007-07-11 09:08:03 +00:00
Gunter Knauf
cf61c8d659 fixed endif comment. 2007-07-11 09:03:22 +00:00
Gunter Knauf
c39690486c fixed endif comment. 2007-07-11 08:55:28 +00:00
Dan Fandrich
814b471d55 Added a code coverage section using gcc and gcov. 2007-07-10 22:55:51 +00:00
Daniel Stenberg
5119fb16d6 Shmulik Regev:
The tiny patch below fixes a bug (that I introduced :) which happens
when negotiating authentication with a proxy (probably with web
servers as well) that uses chunked transfer encoding for the 407 error
pages. In this case the ''ignorebody'' flag was ignored (no pun
intended).
2007-07-10 22:45:01 +00:00
Daniel Stenberg
dc2c70be07 Giancarlo Formicuccia reported and fixed a problem with a closed connection
to a proxy during CONNECT auth negotiation.
2007-07-10 22:31:13 +00:00
Dan Fandrich
19631f5d5f Force the time zone to GMT in the cookie tests in case the user is
using one of the so-called 'right' time zones that take into account
leap seconds, which causes the tests to fail (as reported by
Daniel Black in bug report #1745964).
2007-07-10 22:27:16 +00:00
James Housley
a8d6b40736 The previous commits changed the error code 2007-07-10 22:26:59 +00:00
James Housley
8026d94c07 * Finish moving sftp:// into a state machine so it won't block in multi mode
* Move scp:// into a state machine so it won't block in multi mode
* When available use the full directory entry from the sftp:// server
2007-07-10 22:26:32 +00:00
Dan Fandrich
93bd512357 Fixed a curl memory leak reported by Song Ma with a modified version
of the patch he suggested.  Added his test case as test289 to verify.
2007-07-10 22:23:16 +00:00
Daniel Stenberg
04d3a8c714 start working on 7.16.5... 2007-07-10 22:07:33 +00:00
Daniel Stenberg
4b1782c371 7.16.4 preps 2007-07-10 21:36:30 +00:00
Gunter Knauf
f84642197f added better CodeWarrior detection (forgot to add with previos version). 2007-07-09 02:00:39 +00:00
Gunter Knauf
ec1b7a0eea added better CodeWarrior detection;
added defines for setlocale().
2007-07-08 23:19:24 +00:00
Gunter Knauf
4b0e48cb4e added better CodeWarrior detection;
moved autounload flag so that its used for both lib architectures.
2007-07-08 23:18:47 +00:00
Gunter Knauf
41df67fc2c added better CodeWarrior detection. 2007-07-08 23:17:56 +00:00
Gunter Knauf
932d38323f removed some obsolete include paths and defines. 2007-07-07 16:26:02 +00:00
Daniel Stenberg
74ad8516d7 Thomas J. Moore made it build with less warnings 2007-07-06 22:14:29 +00:00
Daniel Stenberg
ed4a16dbd1 Gavrie Philipson's change, updated numbers 2007-07-06 21:56:42 +00:00
Daniel Stenberg
e2bac4fe6f add note about windows and dlls with CURLOPT_WRITEDATA 2007-07-06 20:14:03 +00:00
Gunter Knauf
836ffbfc22 fixed NetWare CLIB implementation of getpass_r() 2007-07-06 14:58:59 +00:00
James Housley
7fd4f82a45 Gavrie Philipson provided a patch that will use a more specific error
message for an scp:// upload failure.  If libssh2 has his matching
patch, then the error message return by the server will be used instead
of a more generic error.
2007-07-05 12:48:34 +00:00
Dan Fandrich
598bc3968e Add -a when running torture tests now that it's supported. 2007-07-05 01:38:00 +00:00
James Housley
29357151af Fix spelling error in error message 2007-07-04 22:54:29 +00:00
Gunter Knauf
6606ae6fe0 add test for gettimeofday() so that HAVE_GETTIMEOFDAY gets defined. 2007-07-04 17:20:19 +00:00
Gunter Knauf
9f21f74fbd enabled ares build. 2007-07-04 13:45:46 +00:00
Gunter Knauf
3760180320 although the check for HAVE_STRUCT_TIMEVAL solved the redefine it is incorrect; lets see if a check for HAVE_GETTIMEOFDAY also works; if gettimeofday() is present then we can assume we have the timezone struct too. 2007-07-04 10:54:15 +00:00
Gunter Knauf
056af4c9ac added check for sys/param.h. 2007-07-04 09:01:40 +00:00
Gunter Knauf
07bf3c86b6 trial to catch problem with Daniels cross-mingw ares builds. 2007-07-03 18:18:40 +00:00
Gunter Knauf
4182803bc2 added NetWare CLIB-own header to solve gcc warnings. 2007-07-03 16:21:57 +00:00
Gunter Knauf
7509ef6b4e few minor changes to make ares compile for NetWare CLIB architecture. 2007-07-03 16:00:36 +00:00
Gunter Knauf
70f8068d4d fixed rule to build libcares when needed. 2007-07-03 00:50:40 +00:00
Gunter Knauf
a7513a8521 changed to build for CLIB / LIBC. 2007-07-03 00:42:11 +00:00
Gunter Knauf
3f7e541415 added libcares to static build if ares enabled. 2007-07-03 00:12:03 +00:00
Daniel Stenberg
f7e9a21c53 contributors from the 7.16.3 release notes 2007-07-02 22:04:36 +00:00
Gunter Knauf
f1537d45ca sync'd with lib makefile changes: use var for awk; fixed RECV* / SEND* defines; debug var can be overwritten; added better compiler path handling. 2007-07-02 18:50:18 +00:00
Gunter Knauf
5a051617f3 some more makefile tweaks and hacks to deal with both lib architectures. 2007-07-02 18:42:14 +00:00
James Housley
55cd28283c Fix problem with the indenting noticed by Pavel 2007-07-02 17:22:51 +00:00
Gunter Knauf
924665c84c ignore make error when trying to copy curl.pdf which isnt in CVS. 2007-07-01 22:17:07 +00:00
Daniel Stenberg
fcfffbe2f2 mention the old name 2007-07-01 22:03:47 +00:00
Daniel Stenberg
54967d2a3a Thomas J. Moore provided a patch that introduces Kerberos5 support in
libcurl. This also makes the options change name to --krb (from --krb4) and
CURLOPT_KRBLEVEL (from CURLOPT_KRB4LEVEL) but the old names are still
2007-07-01 22:01:18 +00:00
Daniel Stenberg
667fd9a60b Song Ma helped me verify and extend a fix for doing FTP over a SOCKS4/5 proxy 2007-07-01 21:28:14 +00:00
Gunter Knauf
892a24f4c4 changed RECV_* / SEND_* defines to correctly reflect NetWare APIs;
some more minor Makefile tidyups.
2007-07-01 21:06:41 +00:00
Gunter Knauf
f7676e9667 disabled 64bit type for CLIB build which removes compiler runtime dependency. 2007-07-01 16:55:37 +00:00
Gunter Knauf
8727803cf8 updated NetWare docu. 2007-07-01 12:09:25 +00:00
Gunter Knauf
73e13ef19d added lib architecture to NLM description. 2007-07-01 01:33:51 +00:00
Gunter Knauf
e983cd5cd3 added HAVE_SYS_IOCTL_H define; added gcc runtime. 2007-06-30 23:53:54 +00:00
Gunter Knauf
ca3e5a6322 moved includes to setup.h so that the project headers also pick them up (eleminate gcc warning). 2007-06-30 23:45:57 +00:00
Gunter Knauf
c4931601c6 fixed path to Metrowerks tools and runtime since they changed between compiler versions. 2007-06-30 21:20:24 +00:00
Gunter Knauf
857492ac9e minor patches to enable building for NetWare CLIB.
sent by Dmitry Mityugov.
2007-06-30 20:16:03 +00:00
Gunter Knauf
afdfa4bed2 minor patches to enable building for NetWare CLIB.
sent by Dmitry Mityugov.
2007-06-30 20:08:13 +00:00
Gunter Knauf
3fc6faf1ae enabled building for NetWare CLIB architecture. 2007-06-30 20:02:51 +00:00
Gunter Knauf
c8a47bf662 revert previous patch since it turned out that older cp dont know this switch, argh! 2007-06-28 22:31:18 +00:00
James Housley
aed0cc6f2a Using fdopen() is a more correct way to implement the CURLOPT_NEW_FILE_PREMS
file.c, but the debug interface was missing.  This adds the routines needed
to make the memory debuging work for fdopen().
2007-06-28 11:11:29 +00:00
Daniel Stenberg
d500c468fc reality sync 2007-06-28 10:47:05 +00:00
Gunter Knauf
5df5a2aa54 fixed nasty cp warnings about not beeing able to preserve ownership. 2007-06-28 01:20:30 +00:00
Daniel Stenberg
9ca688c8e7 James Bursa's improvement 2007-06-27 21:35:17 +00:00
Daniel Stenberg
8edbe262d9 fix little flaw that could make the transfer loop end prematurely 2007-06-27 21:29:29 +00:00
James Housley
4cd7f85410 Add two new options for the SFTP/SCP/FILE protocols: CURLOPT_NEW_FILE_PERMS
and CURLOPT_NEW_DIRECTORY_PERMS.  These control the premissions for files
and directories created on the remote server.  CURLOPT_NEW_FILE_PERMS
defaults to 0644 and CURLOPT_NEW_DIRECTORY_PERMS defaults to 0755
2007-06-27 20:15:48 +00:00
Gunter Knauf
edd35cab5c removed trailing spaces. 2007-06-27 10:14:00 +00:00
Gunter Knauf
a2060effed fixed wrong var name 2007-06-27 10:12:48 +00:00
Daniel Stenberg
33b9daaa4c add an FTP rename example to 3.7 2007-06-26 21:53:46 +00:00
Daniel Stenberg
62f0f5571d Robert Iakobashvili re-arranged the internal hash code to work with a custom
hash function for different hashes, and also expanded the default size for
the socket hash table used in multi handles to greatly enhance speed when
very many connections are added and the socket API is used.
2007-06-26 21:09:28 +00:00
James Housley
7a360de49d The results for a list only directory should be sent to the callback 2007-06-26 20:23:10 +00:00
James Housley
1be4557694 ftp_list_only mode should list all file types, not just directories. 2007-06-26 19:12:58 +00:00
Daniel Stenberg
6a21738704 gah, adding missing braces, removed silly debug output, added new debug output 2007-06-25 14:17:52 +00:00
Daniel Stenberg
974fa1242a Adjusted how libcurl treats HTTP 1.1 responses without content-lenth or
chunked encoding (that also lacks "Connection: close"). It now simply
assumes that the connection WILL be closed to signal the end, as that is how
RFC2616 section 4.4 point #5 says we should behave.
2007-06-25 13:58:14 +00:00
Daniel Stenberg
3dff58b3aa fix the version string as well 2007-06-25 13:52:16 +00:00
Daniel Stenberg
abf8589f0d start working towards 7.16.4 2007-06-25 09:34:44 +00:00
Daniel Stenberg
b8d006b9d7 7.16.3 2007-06-25 09:18:16 +00:00
Daniel Stenberg
af4edf10f5 As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html and
http://curl.haxx.se/mail/lib-2007-06/0238.html, libcurl didn't properly do
no-body requests on FTP files on re-used connections properly, or at least
it didn't provide the info back in the header callback properly in the
subsequent requests.
2007-06-24 19:32:33 +00:00
Gunter Knauf
0f9e209534 added netware install target 2007-06-22 21:10:41 +00:00
Gunter Knauf
2aed8946b0 made debug flag settable from outside; add allways debug stuff when DB != NDEBUG 2007-06-22 21:10:17 +00:00
Daniel Stenberg
03b03f7b60 remove annoying debug output 2007-06-22 20:24:11 +00:00
Daniel Stenberg
a1b650ad7b Gerrit Bruchhuser pointed out a warning that the Intel(R) Thread Checker
tool reports and it was indeed a legitimate one and it is one fixed. It was
a use of a share without doing the proper locking first.
2007-06-21 14:23:38 +00:00
Daniel Stenberg
d978f85d55 Adam Piggott filed bug report #1740263
(http://curl.haxx.se/bug/view.cgi?id=1740263). Adam discovered that when
getting a large amount of URLs with curl, they were fetched slower and
slower... which turned out to be because the --libcurl data collecting which
wrongly always was enabled, but no longer is...
2007-06-20 21:57:28 +00:00
James Housley
6e7f47da5b If the creation of rsa and rsa_pub fail due to memory, don't try
other authentication methods.  Terminate with a memory error.
2007-06-20 11:30:35 +00:00
James Housley
277bab0c7b Check both variables, not the same one twice. Pointed out by Colin Hogben 2007-06-19 13:23:21 +00:00
Daniel Stenberg
fc3c5dae87 and fix another flaw in the singlecwd case when we get ftp://site.com/, also
from the #1739100 bug report
2007-06-19 12:33:28 +00:00
Daniel Stenberg
891dffb528 extra precaution to make PATH_MAX always be defined 2007-06-19 11:50:08 +00:00
James Housley
f0b361ecc1 Change rsa and rsa_pub from static arrays in ssh_conn to be dynamically
allocated when needed
2007-06-19 11:31:33 +00:00
James Housley
df7eed16dd If LIBSSH2DEBUG was defined "i" was undefined 2007-06-18 22:28:40 +00:00
Daniel Stenberg
61db4f3e2a Robson Braga Araujo filed bug report #1739100
(http://curl.haxx.se/bug/view.cgi?id=1739100) that mentioned that libcurl
could not actually list the contents of the root directory of a given FTP
server if the login directory isn't root. I fixed the problem and added three
test cases (one is disabled for now since I identified KNOWN_BUGS #44, we
cannot use --ftp-method nocwd and list ftp directories).
2007-06-18 21:09:32 +00:00
Daniel Stenberg
fe85ae15f3 make the ftp-method multicwd case possible to LIST the root directory of a
server!
2007-06-18 21:04:45 +00:00
Daniel Stenberg
cc26cc5dcd Test listing of root dir with the three ftp-methods. KNOWN_BUGS #44 make me
disable test 351 by default by I add the test case anyway to make it easier
to work on this problem in the future.
2007-06-18 21:04:05 +00:00
Daniel Stenberg
eb965e2a13 44. --ftp-method nocwd does not handle URLs ending with a slash properly (it
should list the contents of that directory). See test case 351.
2007-06-18 21:03:14 +00:00
Daniel Stenberg
4e35395d0e Daniel Johnson reported the tests now run fine on OS X! 2007-06-18 08:57:13 +00:00
James Housley
b61b420cb8 Curl_ssh_connect() was using an uninitialized variable in one location.
Caught by the auto-builds
2007-06-16 16:58:02 +00:00
Daniel Stenberg
b0aa11fde7 Tom Regner added /usr/lib/misc to the path to scan for sftp to make the
sftp tests run fine on gentoo
2007-06-14 21:16:08 +00:00
Daniel Stenberg
b691102ec7 Shmulik Regev fixed a flaw in the multi interface that occurred when doing
HTTP CONNECT over a proxy
2007-06-14 14:42:21 +00:00
Daniel Stenberg
2785fe7f61 s/HAVE_POLL/HAVE_SYS_POLL_H 2007-06-14 14:15:21 +00:00
James Housley
db5d4bd811 Remove duplicate code that was left in as part of 1.35. This code
only affected sftp_sendquote() for the "chgrp/chmod/chown" commands.

This also fixed failure of test 614 on a system that previously failed.
2007-06-14 13:22:00 +00:00
Daniel Stenberg
dc3b3c6916 Make our own definitions of the POLL* defiens and the pollfd struct only get
done if the sys/poll.h file is missing, as we have seen machines with poll()
present but without the header file and machines that don't get HAVE_POLL
defined but that do have the sys/poll.h header file...
2007-06-14 11:21:48 +00:00
James Housley
82d3f97659 BUG FIX: When reading a directory listing that contains symlinks
with the latest libssh2, the listing would be truncated at the symlink.
Fix by looping on LIBSSH2_ERROR_EAGAIN, like the rest of the calls.
2007-06-14 10:36:53 +00:00
Daniel Stenberg
235632ed2c Tom Regner provided a patch and worked together with James Housley, so now
CURLOPT_FTP_CREATE_MISSING_DIRS works for SFTP connections as well as FTP
ones.
2007-06-13 20:17:35 +00:00
Daniel Stenberg
68330c86e7 Rich Rauenzahn filed bug report #1733119
(http://curl.haxx.se/bug/view.cgi?id=1733119) and we collaborated on the fix.
The problem is that for 64bit HPUX builds, several socket-related functions
would still assume int (32 bit) arguments and not socklen_t (64 bit) ones.
2007-06-13 20:08:19 +00:00
James Housley
f37dc9168a Restore functionality mistakenly removed in the previous commit 2007-06-13 17:13:44 +00:00
James Housley
17798ed740 Update documentation to reflect SFTP's ability to create directories on
upload.  Some text provieded by Tom Regner
2007-06-13 15:02:34 +00:00
Gisle Vanem
05ba9f9fcd libssh2_session_free() returns void. Fix "#endif". 2007-06-13 14:01:48 +00:00
James Housley
96f4af4db9 Commit Tom Regner's code for SFTP create missing directories. This patch
uses the --ftp-create-dirs flag to control if cURL will try and create
directories that are specified in an upload path, but don't exist.
2007-06-13 12:15:23 +00:00
James Housley
3ec7f8a25a Add a define to protect the state machine from older versions of libssh2,
ie 0.14, that don't know about newer constants used in the state machine.
2007-06-13 11:27:41 +00:00
Daniel Stenberg
375cdf89ad With lots of help from Rich Rauenza(?) in bug #1733119, we introduce a fairly
complicated work-around for 64bit HPUX compiles. We do the fix using inline
static functions to make them follow the header file properly and thus get
used fine in the test suite too etc.
2007-06-12 21:39:21 +00:00
James Housley
ab7e7144ef * Updates for the latest version of libssh2, specifically
libssh2_sftp_shutdown() and libssh2_session_free() can now return
  LIBSSH2_ERROR_EAGAIN.

* Fix the _send() and _recv() return values so non-blocking works
2007-06-12 21:32:45 +00:00
James Housley
6f59e19b91 While connect and transfer works fine in non-blocking mode for the test
suite, transfer fails in the real world.  So after connect set to blocking
as full non-blocking is migrated out.
2007-06-12 16:15:20 +00:00
Daniel Stenberg
7800b56dc8 mention James current work on ssh 2007-06-12 13:51:57 +00:00
James Housley
73c13220ee Prevent the state machine from getting stuck in SSH_AUTH_HOST_INIT 2007-06-12 13:47:32 +00:00
James Housley
99e0597c7b Convert Curl_ssh_connect() to run in a state machine for
LIBSSH2_APINO >= 200706012030.  More to come...
2007-06-12 12:31:10 +00:00
Daniel Stenberg
3247ac1918 remove unused field in the state struct 2007-06-12 08:15:02 +00:00
Dan Fandrich
c45d44fee9 Wait longer for servers to start up since the ssh server needs to generate
keys the first time (which can take a while on a slow or loaded host).
Enforce a longer startup wait time for the ssh client SOCKS server, too.
Check for an error code from startnew() when starting any server.
2007-06-11 17:53:10 +00:00
Dan Fandrich
1e718a515a We do not use RSA keys in the test suite. 2007-06-11 17:49:25 +00:00
Daniel Stenberg
d23d686de2 restore the correct timeout time that my previous commit broke 2007-06-11 13:35:33 +00:00
Daniel Stenberg
c8677e9d3f Properly wait for the c-ares resolve to complete, hopefully the cure for
bug #1733955
2007-06-11 13:32:49 +00:00
Daniel Stenberg
a32eaffa77 Daniel Black's clarfication about the NTLM support 2007-06-11 07:27:02 +00:00
Gisle Vanem
1dcb99f0f7 constify 'hostname' in init_thread_sync_data(). Simply clear
the whole 'tsd' structure on exit in destroy_thread_sync_data().
2007-06-11 04:33:21 +00:00
Gisle Vanem
03bc2d34da Squelsh some warnings for libssh older than 0.1.5. 2007-06-11 04:07:51 +00:00
Dan Fandrich
477e27f99d Fixed the test harness so that it actually kills the ssh being used as
the SOCKS server.
2007-06-08 18:56:05 +00:00
Dan Fandrich
6a84d492f1 Improved compatibility with perl 5.0 on the 'open' calls. 2007-06-08 17:32:24 +00:00
Dan Fandrich
873d95a34c Incorporated Daniel Black's test706 and test707 SOCKS test cases. 2007-06-08 17:21:40 +00:00
Dan Fandrich
1500e95839 Improved compatibility with perl 5.0 on the 'open' calls. 2007-06-08 17:03:50 +00:00
James Housley
4f8ebd1673 Curl_scp_done() needs to call libssh2_channel_free() to prevent a
memory leak, and it is the right thing to do.
2007-06-08 16:19:21 +00:00
James Housley
cd4e6fbcac Fix to work with the latest CVS version of libssh2
* As of (LIBSSH2_APINO >= 200706012030) there are not *nb() functions
* As of (LIBSSH2_APINO >= 200706012030) most libssh2_*() functions
  can return LIBSSH2_ERROR_EAGAIN to indicate that the call would block.

To make the code work as previously, blocking, all the code has been
updated so that when (LIBSSH2_APINO >= 200706012030) it loops simulating
blocking.  This allows the existing code to function and not hold up
the upcoming release.
2007-06-08 16:02:57 +00:00
Daniel Stenberg
2fd2ca9dac start working on 1.4.1 2007-06-08 09:01:33 +00:00
Daniel Stenberg
82d6240e7d 1.4.0 preps 2007-06-08 08:46:28 +00:00
Dan Fandrich
ad80490711 Changed the opens to work on older versions of perl.
Redirect ssh output to ssh.log
2007-06-07 22:42:26 +00:00
Dan Fandrich
38b490a310 Fixed a compiler warning on uClibc. 2007-06-07 22:24:53 +00:00
Daniel Stenberg
2ea052336f bug #1720605, There seems to be a problem when connecting to the Microsoft telnet server 2007-06-07 21:56:03 +00:00
Daniel Stenberg
3b9eefca89 Daniel S (6 June 2007)
- -s/--silent can now be used to toggle off the silence again if used a second
  time.

Daniel S (5 June 2007)
- Added Daniel Black's work that adds the first few SOCKS test cases. I also
  fixed two minor SOCKS problems to make the test cases run fine.
2007-06-07 21:47:29 +00:00
Dan Fandrich
073a6cea45 Renamed the sshd log file to sshd.log.
Added more options to the ssh config file to improve the consistency of
the test environment.
Force a rewrite of the ssh config files on every invocation.
Changed the opens to work on older versions of perl.
2007-06-07 21:42:33 +00:00
Dan Fandrich
345ffd1163 Cleaned up SOCKS tests. Use a magic port number instead of killserver
to do nonlistening server tests, like other tests.
2007-06-07 20:14:00 +00:00
Dan Fandrich
f0ffb35d55 Fixed some problems in starting SSH for use in SOCKS. 2007-06-07 19:49:09 +00:00
Daniel Stenberg
b4d2fbae6d make -s/--silent properly toggle as it is documented 2007-06-06 20:08:40 +00:00
Daniel Stenberg
42a2138d11 the revert 2007-06-05 13:53:10 +00:00
Daniel Stenberg
e86dfd9688 added 703: a socks5 version of 702 2007-06-05 13:52:34 +00:00
Daniel Stenberg
a466b31574 Daniel Black's test suite fixes and initial test cases for SOCKS4/5 using
openssh
2007-06-05 13:50:59 +00:00
Daniel Stenberg
48064f8dee if we read zero bytes from the proxy, the connection is broken and we need
to bail out
2007-06-05 13:42:23 +00:00
Daniel Stenberg
e71378d3c8 mark connect failures as non-connected when ConnectPlease() fails, like when
a connection through a socks proxy doesn't work
2007-06-05 13:41:50 +00:00
Daniel Stenberg
90d40aff72 Revered Ashish Sharma's multiple entries patch, as it caused memory madness 2007-06-04 21:33:02 +00:00
Daniel Stenberg
30808dca40 minor edit since getting an ID seems pointless when failure happens 2007-06-04 21:26:30 +00:00
Daniel Stenberg
8629620b1c fix the bad bad bad mess this caused on name resolves returning more than
one name... Reported by James Bursa
2007-06-04 21:04:14 +00:00
Daniel Stenberg
25d2a27c64 Brad Spencer found and fixed three flaws in the code, found with the new
gcc 4.2.0 warning: -Waddress
2007-06-02 20:09:23 +00:00
Daniel Stenberg
b084dc8760 Brad House fixed VS2005 compiler warnings due to time_t being 64bit.
He also made recent Microsoft compilers use _strdup() instead of strdup().
2007-06-02 19:48:29 +00:00
Daniel Stenberg
2ae9536d32 Ashish Sharma provided a patch for supporting multiple entries in the
/etc/hosts file. Patch edited for coding style and functionality by me
(Daniel).
2007-06-02 19:42:25 +00:00
Daniel Stenberg
f5713dbb2e ares_destroy_options() and ares_save_options() man pages by Brad House 2007-06-02 19:32:30 +00:00
Daniel Stenberg
b10ff9791b ouch, two conditionals were turned backwards! 2007-06-01 21:24:34 +00:00
Daniel Stenberg
86a25239ec do the update timer stuff even when CURLM_CALL_MULTI_PERFORM is returned 2007-06-01 21:01:57 +00:00
Daniel Stenberg
4c663ba9a8 When transferring 500 downloads in parallel with a c-ares enabled build only
to find that it crashed miserably, and this was due to some select()isms left
in the code. This was due to API restrictions in c-ares 1.3.x, but with the
upcoming c-ares 1.4.0 this is no longer the case so now libcurl runs much
better with c-ares and the multi interface with > 1024 file descriptors in
use.
2007-05-31 11:34:32 +00:00
Daniel Stenberg
713c9f8602 Feng Tu made (lib)curl support "upload" resuming work for file:// URLs. 2007-05-31 08:59:44 +00:00
Daniel Stenberg
14b9b823e6 make next version 1.4.0 2007-05-30 21:45:56 +00:00
Daniel Stenberg
6a674ded0e first take at detecting a random device and seeding the random key using data
from it in randomize_key()
2007-05-30 21:37:17 +00:00
Daniel Stenberg
2faba57c85 Shmulik Regev brought cryptographically secure transaction IDs 2007-05-30 21:11:10 +00:00
Daniel Stenberg
79d59ec97b Brad House added ares_save_options() and ares_destroy_options() that can be
used to keep options for later re-usal when ares_init_options() is used.
2007-05-30 20:49:14 +00:00
Daniel Stenberg
a49e78d9b7 Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting
the maximum size of the connection cache maximum size of the multi handle.
2007-05-30 20:04:44 +00:00
Yang Tse
9583b51d80 In case of test failure, try not to show log files of other tests 2007-05-30 17:15:05 +00:00
Daniel Stenberg
670273968c added ares_process_fd() to allow applications to ask for processing on
specific sockets and thus avoiding select() and associated functions/macros.
This function will be used by upcoming libcurl releases for this very
reason. It also made me export the ares_socket_t type in the public ares.h
header file, since ares_process_fd() uses that type for two of the arguments.
2007-05-30 12:58:47 +00:00
Daniel Stenberg
b6820b2674 remove really annoying debug output that makes life miserable when you do
hundreds of parallel transfers...
2007-05-30 09:24:06 +00:00
Daniel Stenberg
b9a6dfab03 When working with a problem Stefan Becker had, I found an off-by-one buffer
overwrite in Curl_select(). While fixing it, I also improved its performance
somewhat by changing calloc to malloc and breaking out of a loop earlier
(when possible).
2007-05-26 22:09:08 +00:00
Daniel Stenberg
8bd7197a8f Primarily this fixes an off-by-one buffer overwrite (rare but still existing).
I also switched from calloc() to malloc() as a minor performance boost since
the rest of the code fills in the structs fine anyway - and they must for the
case when we use the stack-based auto variable array instead of the allocated
one.

I made the loop filling in poll_fds[] break when poll_nfds is reached as a
minor speed improvement.
2007-05-26 22:02:29 +00:00
Daniel Stenberg
ebb5e1db4b Clarify a bit about the fact that easy handles remain in the multi stack when
transfers are done and need to be removed and closed or re-added.
2007-05-26 20:50:00 +00:00
Daniel Stenberg
4702807da8 make it a WARNING since this hits people hard in their faces 2007-05-26 20:47:33 +00:00
Daniel Stenberg
fe1fe64fd4 Rob Crittenden fixed bug #1705802
(http://curl.haxx.se/bug/view.cgi?id=1705802), which was filed by Daniel
Black identifying several FTP-SSL test cases fail when we build libcurl with
NSS for TLS/SSL. Listed as #42 in KNOWN_BUGS.
2007-05-25 21:56:27 +00:00
Daniel Stenberg
9d904ee41b updated 2007-05-25 21:20:39 +00:00
Daniel Stenberg
fcc3e2ca34 Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
that could cause it to return a bad return code.
2007-05-25 21:11:28 +00:00
Daniel Stenberg
c25da51913 Song Ma filed bug report #1724016
(http://curl.haxx.se/bug/view.cgi?id=1724016) noticing that downloading
glob-ranges for TFTP was broken in CVS.
2007-05-24 21:11:18 +00:00
Daniel Stenberg
05ab8d291c stay within 80 cols 2007-05-24 21:11:00 +00:00
Daniel Stenberg
70b1900dd1 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal
with the cases when excessively long words were used in the string to chop
up.
2007-05-24 20:58:25 +00:00
Daniel Stenberg
380e132da3 TFTP transfers are also blocking 2007-05-23 12:59:12 +00:00
Daniel Stenberg
f2eb3c1f79 fix the formatting of the trailing list 2007-05-23 12:51:52 +00:00
Daniel Stenberg
96c093f27c Andre Guibert de Bruet fixed a memory leak when PKCS #12 parsing failed 2007-05-22 20:46:51 +00:00
Daniel Stenberg
a9d49769ff Andre Guibert de Bruet fixed a memory leak in the function that verifies the
peer's name in the SSL certificate when built for OpenSSL. The leak happens
for libcurls with CURL_DOES_CONVERSIONS enabled that fail to convert the CN
name from UTF8.
2007-05-22 19:51:44 +00:00
Daniel Stenberg
d7616d8a0a WaitForSingleObject() uses a millisecond timeout and CURL_TIMEOUT_RESOLVE is
counted in seconds...
2007-05-20 22:11:47 +00:00
Daniel Stenberg
826bbfc01c better fix for the dl/ul counters 2007-05-18 10:40:43 +00:00
Daniel Stenberg
250f9670b7 Feng Tu reported that curl -w did wrong on TFTP transfers in
bug report #1715394 (http://curl.haxx.se/bug/view.cgi?id=1715394), and the
transfer-related info "variables" were indeed overwritten with zeroes wrongly
and have now been adjusted. The upload size still isn't accurate.
2007-05-18 10:32:48 +00:00
Daniel Stenberg
ed4936fd30 bail out with error codes on failures 2007-05-18 10:12:57 +00:00
Daniel Stenberg
4dd2628093 they spell five with a v... 2007-05-17 21:41:02 +00:00
Daniel Stenberg
8479785620 Feng Tu pointed out a division by zero error in the TFTP connect timeout
code for timeouts less than fice seconds, and also provided a fix for it.
2007-05-17 21:40:08 +00:00
Dan Fandrich
0427e94465 Added support for compiling under Minix 3.1.3 using ACK. 2007-05-17 06:04:44 +00:00
Dan Fandrich
09fd3b4935 Match file times occurring in the morning. 2007-05-16 17:45:53 +00:00
Dan Fandrich
3fef839f75 Added call to setvbuf (disabled by default for speed) to flush the
memdebug log file after every line and avoid losing the last few log
entries if curl crashes.
2007-05-15 00:36:56 +00:00
Dan Fandrich
ea43bb013b Added support for quote commands before a transfer using SFTP and test
case 614.
Allow SFTP quote commands chmod, chown, chgrp to set a value of 0.
2007-05-15 00:28:50 +00:00
Dan Fandrich
b0a4c992e7 Added SFTP directory listing test case 613. 2007-05-14 22:03:42 +00:00
Dan Fandrich
85707460e5 Added FTPS upload tests 408 and 409. 2007-05-10 20:03:20 +00:00
Dan Fandrich
41ba7666f0 Kristian Gunstone fixed a problem where overwriting an uploaded file with
sftp didn't truncate it first, which would corrupt the file if the new
file was shorter than the old.
2007-05-09 18:24:27 +00:00
Dan Fandrich
4367e0513a Added the list of SFTP post-quote commands, and fixed a few typos. 2007-05-09 18:05:14 +00:00
Dan Fandrich
ed998270aa Added FTPS test cases 406 and 407 2007-05-08 22:14:30 +00:00
Daniel Stenberg
1b7f00b2a6 CURLE_FTP_COULDNT_STOR_FILE is now known as CURLE_UPLOAD_FAILED. This is
because I just made SCP uploads return this value if the file size of
the upload file isn't given with CURLOPT_INFILESIZE*. Docs updated to
reflect this news, and a define for the old name was added to the public
header file.
2007-05-08 11:34:31 +00:00
Daniel Stenberg
ad19f95f15 James Bursa fixed a bug in the multi handle code that made the connection
cache grow a bit too much, beyond the normal 4 * easy_handles.
2007-05-07 07:07:55 +00:00
Daniel Stenberg
bcfe3cb231 extended the description for the curl_multi_socket_action() change 2007-05-06 08:14:42 +00:00
Daniel Stenberg
805a5dcac8 42. Daniel Black filed bug report #1705802 where he accurately mentions that
several FTP-SSL test cases fail when we build libcurl with NSS for TLS/SSL:
  http://curl.haxx.se/bug/view.cgi?id=1705802
2007-05-03 20:50:07 +00:00
Dan Fandrich
0b67ee7bad Fixed a few typos. 2007-05-03 19:12:45 +00:00
Daniel Stenberg
9298037639 document the new 200alias behaviour 2007-05-03 12:30:33 +00:00
Daniel Stenberg
f7472075d7 Anders Gustafsson remarked that requiring CURLOPT_HTTP_VERSION set to 1.0
when CURLOPT_HTTP200ALIASES is used to avoid the problem mentioned below is
not very nice if the client wants to be able to use _either_ a HTTP 1.1
server or one within the aliases list... so starting now, libcurl will
simply consider 200-alias matches the to be HTTP 1.0 compliant.
2007-05-02 20:42:02 +00:00
Dan Fandrich
9f72db13c4 Fixed an out of memory handling issue with HTTP pipelines. 2007-05-02 19:13:56 +00:00
Daniel Stenberg
acc4868b78 Tobias Rundstrom reported a problem they experienced with xmms2 and recent
libcurls, which turned out to be the 25-nov-2006 change which treats HTTP
responses without Content-Length or chunked encoding as without bodies. We
now added the conditional that the above mentioned response is only without
body if the response is HTTP 1.1.
2007-05-02 17:35:47 +00:00
Daniel Stenberg
1afb67e31b - Jeff Pohlmeyer improved the hiperfifo.c example to use the
CURLMOPT_TIMERFUNCTION callback option.
2007-05-02 13:52:38 +00:00
Daniel Stenberg
2f0539d880 - Set the timeout for easy handles to expire really soon after addition or
when CURLM_CALL_MULTI_PERFORM is returned from curl_multi_socket*/perform,
  to make applications using only curl_multi_socket() to properly function
  when adding easy handles "on the fly". Bug report and test app provided by
  Michael Wallner.
2007-05-02 13:47:56 +00:00
Daniel Stenberg
6f7d0a7cbd Merged _all_ old changelogs into the single CHANGES.0 file. Having a new one
for every year is giving us too many files! I also split out the changes
from 2006 from CHANGES to CHANGES.0 now.
2007-05-02 13:14:56 +00:00
Daniel Stenberg
3d513f7ab1 spell and language fix 2007-05-02 11:14:55 +00:00
Dan Fandrich
6c8e6549d0 Check the return code from curl_multi_add_handle() 2007-05-02 06:02:13 +00:00
Dan Fandrich
eec105daba Fixed a logic error in the last patch and another out of memory issue.
Reduce the scope of some variables.
2007-05-02 00:50:06 +00:00
Dan Fandrich
19a80add95 Improved behaviour in out of memory conditions. 2007-05-01 20:52:05 +00:00
Dan Fandrich
93844f64ef Use memcpy instead of strcpy to improve performance. 2007-05-01 20:50:50 +00:00
Daniel Stenberg
60588b2455 brlcad on #curl provided this patch (edited by me) since "configure will fail
looking for a C++ preprocessor on libtool-using projects" with the factory-
installed libtool version on Mac OS X.
2007-04-30 21:47:58 +00:00
Dan Fandrich
5187faeeb9 Improved the test harness to allow running test servers on other than
the default port numbers, allowing more than one test suite to run
simultaneously on the same host.
2007-04-30 20:15:33 +00:00
Dan Fandrich
1228ec9fbb Fixed some tests to stop hard-coding the port number. 2007-04-30 19:05:48 +00:00
Dan Fandrich
717adfeb96 Rearranged some allocs so they will be freed correctly in the error path. 2007-04-29 07:04:29 +00:00
Daniel Stenberg
503557e5ce Peter O'Gorman fixed libcurl to not init GnuTLS as early as we did before,
since it then inits libgcrypt and libgcrypt is being evil and EXITS the
application if it fails to get a fine random seed. That's really not a nice
thing to do by a library.
2007-04-28 21:01:30 +00:00
Daniel Stenberg
f611f42dcf Frank Hempel fixed a curl_easy_duphandle() crash on a handle that had
been removed from a multi handle, and then fixed another flaw that prevented
curl_easy_duphandle() to work even after the first fix - the handle was
still marked as using the multi interface.
2007-04-28 20:27:07 +00:00
Daniel Stenberg
7a0e0c36c5 Move the explictit free of the range string to Curl_close() from Curl_disconnect()
since it easy-handle related and not connection-related.
2007-04-27 08:30:48 +00:00
Daniel Stenberg
61edee979f oops, this was supposed to be properly removed 2007-04-27 08:19:48 +00:00
Daniel Stenberg
7a343a3f60 As a follow-up to the removal of the free of the range data in Curl_done() - this
moves and re-arranges how range/resume is setup and freed.
2007-04-27 08:18:47 +00:00
Daniel Stenberg
b4d3c4a76c Peter O'Gorman found a problem with SCP downloads when the downloaded file
was 16385 bytes (16K+1) and it turned out we didn't properly always "suck
out" all data from libssh2. The effect being that libcurl would hang on the
socket waiting for data when libssh2 had in fact already read it all...
2007-04-26 21:30:29 +00:00
Dan Fandrich
f213d0db98 Added support in runtests.pl for "!n" test numbers to disable individual tests. 2007-04-25 23:18:52 +00:00
Dan Fandrich
6e835ef3aa Fixed an out of memory handling issue. 2007-04-25 20:54:02 +00:00
Daniel Stenberg
ed8cb57151 Sonia Subramanian brought our attention to a problem that happens if you set
the CURLOPT_RESUME_FROM or CURLOPT_RANGE options and an existing connection
in the connection cache is closed to make room for the new one when you call
curl_easy_perform(). It would then wrongly free range-related data in the
connection close funtion.
2007-04-25 20:20:15 +00:00
Dan Fandrich
9bdb05b4d6 When displaying log files, truncate the really longs ones such as you
would get from a torture test.
2007-04-25 20:09:32 +00:00
Yang Tse
94b253fde7 Steve Little's fixes to allow compilation on VMS 64-bit mode 2007-04-25 03:00:10 +00:00
Dan Fandrich
61d7e720a5 Treat log files and -k the same when running torture tests as when not. 2007-04-24 23:28:57 +00:00
Dan Fandrich
17507eac85 Clear out FTP server options before each new client.
Wait for child processes to die to avoid creating zombies.
2007-04-24 21:30:39 +00:00
Daniel Stenberg
bc1ae973da Robert Iakobashvili made the 'master_buffer' get allocated first once it is
can/will be used as it then makes the common cases save 16KB of data for each
easy handle that isn't used for pipelining.
2007-04-24 10:18:06 +00:00
Dan Fandrich
6a35841b2e Added tests 610-612 to test more SFTP post-quote commands. 2007-04-23 23:00:38 +00:00
Dan Fandrich
28dde78dde Added <postcheck> support to the test harness. 2007-04-23 22:58:45 +00:00
Dan Fandrich
37171809f6 Mention NSS, <postcmd> commands 2007-04-23 21:18:30 +00:00
Dan Fandrich
3398eca7c3 Changed another nonexistent host name to be under the haxx.se domain
to guarantee against it ever being valid.
2007-04-23 01:51:02 +00:00
Yang Tse
3616912d22 Avoid an unnecessary call to gettimeofday() when
using custom timeout values.
2007-04-22 18:17:46 +00:00
Daniel Stenberg
0abccc676d --without-ssl disables OpenSSL only 2007-04-22 09:37:05 +00:00
Daniel Stenberg
a93af43974 - Song Ma's warning if -r/--range is given with a "bad" range, also noted in
the man page now.
2007-04-22 09:31:27 +00:00
Daniel Stenberg
0bbc759c0c configure fix and new mirror 2007-04-22 08:51:11 +00:00
Daniel Stenberg
56a5c49ac0 clarify a bit on the follow-redirect logic and when curl switches from POST
to GET on redirect
2007-04-22 08:05:40 +00:00
Daniel Stenberg
02267eba4c shell script assigns should not have spaces, hopefully fixes bug #1705177 2007-04-22 07:36:12 +00:00
Daniel Stenberg
cea9695bcf Daniel Black filed bug #1704675 (http://curl.haxx.se/bug/view.cgi?id=1704675)
identifying a double-free problem in the SSL-dealing layer, telling GnuTLS to
free NULL credentials on closedown after a failure and a bad #ifdef for NSS
when closing down SSL.
2007-04-21 21:32:31 +00:00
Daniel Stenberg
92039629c7 Curl_ssl_close(): mark the connection as not using SSL anymore, to better
survive getting called twice
2007-04-21 21:24:53 +00:00
Gunter Knauf
c8d3327e92 fixed ARFLAGS for CodeWarrior build. 2007-04-21 15:32:35 +00:00
Dan Fandrich
043070f90e Changed an error message slightly so it can be caught easier by the
autobuild logs scanner.
2007-04-20 17:16:32 +00:00
Daniel Stenberg
36626c4b6e ifndef check the CURL_MAX_WRITE_SIZE define to allow this value to easier be
changed at build time (from command line or similar)
2007-04-20 07:19:36 +00:00
Yang Tse
7f33aae067 initialize pending_ms to zero to avoid compiler warning:
'pending_ms' may be used uninitialized in this function
2007-04-20 01:58:15 +00:00
Yang Tse
61022f3817 - Save one call to curlx_tvnow(), which calls gettimeofday(), in each of
Curl_socket_ready(), Curl_poll() and Curl_select() when these are called
  with a zero timeout or a timeout value indicating a blocking call should
  be performed.

  These unnecessary calls to gettimeofday() got introduced in 7.16.2 when
  fixing 'timeout would restart when signal caught while awaiting socket
  events' on 20 March 2007.

- Move some loop breaking logic from the while clause into the loop,
  avoiding compiler warning 'assignment within conditional expression'
2007-04-20 00:07:19 +00:00
Daniel Stenberg
bf648fcfc3 keep lines < 80 columns 2007-04-19 20:20:48 +00:00
Yang Tse
b0e909329e fix comment and line spacing 2007-04-19 20:16:28 +00:00
Dan Fandrich
ae3d5949b8 Various test file cleanups, including using <servercmd> instead of writing
directly to ftpserver.cmd and removing unneeded empty sections.
2007-04-18 20:22:01 +00:00
Daniel Stenberg
c234b9d04b clarify the comment about libssh2_sftp_write's return type 2007-04-18 20:15:22 +00:00
Daniel Stenberg
7a86740afd - James Housley made SFTP uploads use libssh2's non-blocking API (if available) 2007-04-18 20:11:47 +00:00
Daniel Stenberg
8e719e3ef5 - Prevent the internal progress meter from updating more frequently than once
per second.
2007-04-18 20:02:41 +00:00
Dan Fandrich
66fc5498d2 Added test cases 296, 297 and 298 to test --ftp-method handling 2007-04-18 06:30:28 +00:00
Gunter Knauf
f30ae93a1f added ranlib when library is created with ar. 2007-04-16 20:54:56 +00:00
Gisle Vanem
365e8eb78e No need for USE_MANUAL. Use select_s() instead of select().
Added ares_getopt.o to program sample objects.
2007-04-16 16:52:56 +00:00
Daniel Stenberg
76627b322e - Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is a
function that deprecates the curl_multi_socket() function. Using the new
  function the application tell libcurl what action that was found in the
  socket that it passes in. This gives a significant performance boost as it
  allows libcurl to avoid a call to poll()/select() for every call to
  curl_multi_socket*().
2007-04-16 16:34:08 +00:00
Yang Tse
827228bd69 move linkage var declarations to ares_getopt.h 2007-04-16 15:35:34 +00:00
Gunter Knauf
69c5506b69 use Makefile.inc to determine sources. 2007-04-16 13:53:58 +00:00
Gunter Knauf
3a2e623fc8 ares_getopt() command-line parser function does not belong to actual c-ares library. It is just a convinience source code helper function for use in example programs adig.c and ahost.c 2007-04-16 13:17:26 +00:00
Daniel Stenberg
8aa9f01ed8 Jay Austin added "DH PARAMETERS" to the stunnel.pem certificate 2007-04-16 11:55:43 +00:00
Yang Tse
b0b6a853f6 ares_getopt() command-line parser function does not belong to actual
c-ares library. It is just a convinience source code helper function
for use in example programs adig.c and ahost.c
2007-04-16 09:08:15 +00:00
Yang Tse
0563a7a923 ares_getopt() command-line parser function does not belong to actual
c-ares library. It is just a convinience source code helper function
for use in example programs adig.c and ahost.c
2007-04-16 09:01:16 +00:00
Dan Fandrich
945ba7cb7e Minor updates to --help output 2007-04-15 06:24:43 +00:00
Daniel Stenberg
e3dab1bea2 jayjwa added the "DH PARAMETERS" to make this work with recent stunnels 2007-04-14 20:29:09 +00:00
Daniel Stenberg
9c369c695d updates 2007-04-14 20:27:11 +00:00
Gunter Knauf
011ccbc31a removed unneeded brackets with NetWare implementation. 2007-04-14 16:55:17 +00:00
Gunter Knauf
f1596698ae ups - c&p error. 2007-04-14 16:45:43 +00:00
Gunter Knauf
c60b52ab43 use system-own getpassword() function on NetWare. 2007-04-14 16:38:13 +00:00
Dan Fandrich
71a0d50f48 Added test cases 294 and 295 to test --ftp-account handling 2007-04-13 20:59:15 +00:00
Yang Tse
8d2a0fe85b Fix test case 534 which started to fail 2007-04-13 due to the existance
of a new host on the net with the same silly domain the test was using
for a host which was supposed not to exist.
2007-04-13 11:35:19 +00:00
Yang Tse
b039d883e5 proper fix for compiler warning 2007-04-13 08:45:07 +00:00
Yang Tse
b3401ddbad Take in account that it can be built with compiler debug info and
without the curl memory debugging leak detection code enabled.
2007-04-13 08:22:56 +00:00
Yang Tse
038fe54e21 fix compiler warning 2007-04-13 07:57:31 +00:00
Daniel Stenberg
4b5a65455e update! 2007-04-12 21:53:18 +00:00
Daniel Stenberg
2566a5d4da add a 'vc8' target that (re-)builds the */Makefile.vc8 files 2007-04-12 20:41:24 +00:00
Daniel Stenberg
c38c339480 Song Ma found a memory leak in the if2ip code if you pass in an interface
name longer than the name field of the ifreq struct (typically 6 bytes), as
then it wouldn't close the used dummy socket.
2007-04-12 20:09:19 +00:00
Yang Tse
ea74b4b8e1 update MSVC project files with ares_getopt() 2007-04-12 19:14:00 +00:00
Yang Tse
2364066be0 use ares_getopt for all platforms 2007-04-12 19:01:19 +00:00
Yang Tse
b36376e12d add ares_getopt prototype 2007-04-12 18:59:46 +00:00
Yang Tse
8aae15b630 Rename function as ares_getopt() 2007-04-12 18:06:41 +00:00
Yang Tse
88bf2a2dc7 Replace tabs with spaces 2007-04-12 17:45:57 +00:00
Yang Tse
45847c5324 Add file ares_getopt.c
Original file name getopt.c  Initial import into the c-ares source tree
on 2007-04-11.  Lifted from version 5.2 of the 'Open Mash' project with
the modified BSD license, BSD license without the advertising clause.
2007-04-12 16:53:59 +00:00
Dan Fandrich
70cce4cddd Work around an out of memory situation in Curl_ftp_done instead of
returning an error code, to allow connections to be torn down
cleanly since this function can be called AFTER an OOM situation
has already been reached.
2007-04-12 01:26:02 +00:00
Daniel Stenberg
42c0ac2008 start working on 7.16.3 2007-04-11 13:32:59 +00:00
Daniel Stenberg
70ddabbfb0 restart towards 7.16.3 2007-04-11 13:31:51 +00:00
Daniel Stenberg
e3716938bd add recent contributors 2007-04-11 13:30:09 +00:00
374 changed files with 29765 additions and 16714 deletions

1795
CHANGES

File diff suppressed because it is too large Load Diff

11527
CHANGES.0

File diff suppressed because it is too large Load Diff

View File

@@ -1,835 +0,0 @@
Daniel (28 December 1999):
- Tim Verhoeven correctly identified that curl
doesn't support URL formatted file names when getting ftp. Now, there's a
problem with getting very weird file names off FTP servers. RFC 959 defines
that the file name syntax to use should be the same as in the native OS of
the server. Since we don't know the peer server system we currently just
translate the URL syntax into plain letters. It is still better and with
the solaris 2.6-supplied ftp server it works with spaces in the file names.
Daniel (27 December 1999):
- When curl parsed cookies straight off a remote site, it corrupted the input
data, which, if the downloaded headers were stored made very odd characters
in the saved data. Correctly identified and reported by Paul Harrington.
Daniel (13 December 1999):
- General cleanups in the library interface. There had been some bad kludges
added during times of stress and I did my best to clean them off. It was
both regarding the lib API as well as include file confusions.
Daniel (3 December 1999):
- A small --stderr bug was reported by Eetu Ojanen...
- who also brought the suggestion of extending the -X flag to ftp list as
well. So, now it is and the long option is now --request instead. It is
only for ftp list for now (and the former http stuff too of course).
Lars J. Aas (24 November 1999):
- Patched curl to compile and build under BeOS. Doesn't work yet though!
- Corrected the Makefile.am files to allow putting object files in
different directories than the sources.
Version 6.3.1
Daniel (23 November 1999):
- I've had this major disk crash. My good old trust-worthy source disk died
along with the machine that hosted it. Thank goodness most of all the
things I've done are either backed up elsewhere or stored in this CVS
server!
- Michael S. Steuer pointed out a bug in the -F handling
that made curl hang if you posted an empty variable such as '-F name='. It
was one of those old bugs that never have worked properly...
- Jason Baietto pointed out a general flaw in the HTTP
download. Curl didn't complain if it was prematurely aborted before the
entire download was completed. It does now.
Daniel (19 November 1999):
- Chris Maltby very accurately criticized the lack of
return code checks on the fwrite() calls. I did a thorough check for all
occurrences and corrected this.
Daniel (17 November 1999):
- Paul Harrington pointed out that the -m/--max-time option
doesn't work for the slow system calls like gethostbyname()... I don't have
any good fix yet, just a slightly less bad one that makes curl exit hard
when the timeout is reached.
- Bjorn Reese helped me point out a possible problem that might be the reason
why Thomas Hurst experience problems in his Amiga version.
Daniel (12 November 1999):
- I found a crash in the new cookie file parser. It crashed when you gave
a plain http header file as input...
Version 6.3
Daniel (10 November 1999):
- I kind of found out that the HTTP time-conditional GETs (-z) aren't always
respected by the web server and the document is therefore sent in whole
again, even though it doesn't match the requested condition. After reading
section 13.3.4 of RFC 2616, I think I'm doing the right thing now when I do
my own check as well. If curl thinks the condition isn't met, the transfer
is aborted prematurely (after all the headers have been received).
- After comments from Robert Linden I also rewrote some parts of the man page
to better describe how the -F works.
- Michael Anti put up a new curl download mirror in
China: http://www.pshowing.com/curl/
- I added the list of download mirrors to the README file
- I did add more explanations to the man page
Daniel (8 November 1999):
- I made the -b/--cookie option capable of reading netscape formatted cookie
files as well as normal http-header files. It should be able to
transparently figure out what kind of file it got as input.
Daniel (29 October 1999):
- Another one of Sebastiaan van Erk's ideas (that has been requested before
but I seem to have forgotten who it was), is to add support for ranges in
FTP downloads. As usual, one request is just a request, when they're two
it is a demand. I've added simple support for X-Y style fetches. X has to
be the lower number, though you may omit one of the numbers. Use the -r/
--range switch (previously HTTP-only).
- Sebastiaan van Erk suggested that curl should be
able to show the file size of a specified file. I think this is a splendid
idea and the -I flag is now working for FTP. It displays the file size in
this manner:
Content-Length: XXXX
As it resembles normal headers, and leaves us the opportunity to add more
info in that display if we can come up with more in the future! It also
makes sense since if you access ftp through a HTTP proxy, you'd get the
file size the same way.
I changed the order of the QUOTE command executions. They're now executed
just after the login and before any other command. I made this to enable
quote commands to run before the -I stuff is done too.
- I found out that -D/--dump-header and -V/--version weren't documented in
the man page.
- Many HTTP/1.1 servers do not support ranges. Don't ask me why. I did add
some text about this in the man page for the range option. The thread in
the mailing list that started this was initiated by Michael Anti.
- I get reports about nroff crashes on solaris 2.6+ when displaying the curl
man page. Switch to gnroff instead, it is reported to work(!). Adam Barclay
reported and brought the suggestion.
- In a dialogue with Johannes G. Kristinsson we came
up with the idea to let -H/--header specified headers replace the
internally generated headers, if you happened to select to add a header
that curl normally uses by itself. The advantage with this is not entirely
obvious, but in Johannes' case it means that he can use another Host: than
the one curl would set.
Daniel (27 October 1999):
- Jongki Suwandi brought a nice patch for (yet another) crash when following
a location:. This time you had to follow a https:// server's redirect to
get the core.
Version 6.2
Daniel (21 October 1999):
- I think I managed to remove the suspicious (nil) that has been seen just
before the "Host:" in HTTP requests when -v was used.
- I found out that if you followed a location: when using a proxy, without
having specified http:// in the URL, the protocol part was added once again
when moving to the next URL! (The protocol part has to be added to the
URL when going through a proxy since it has no protocol-guessing system
such as curl has.)
- Benjamin Ritcey reported a core dump under solaris 2.6
with OpenSSL 0.9.4. It turned out this was due to a bad free() in main.c
that occurred after the download was done and completed.
- Benjamin found ftp downloads to show the first line of the download meter
to get written twice, and I removed that problem. It was introduced with
the multiple URL support.
- Dan Zitter correctly pointed out that curl 6.1 and earlier versions didn't
honor RFC 2616 chapter 4 section 2, "Message Headers": "...Field names are
case-insensitive..." HTTP header parsing assumed a certain casing. Dan
also provided me with a patch that corrected this, which I took the liberty
of editing slightly.
- Dan Zitter also provided a nice patch for config.guess to better recognize
the Mac OS X
- Dan also corrected a minor problem in the lib/Makefile that caused linking
to fail on OS X.
Daniel (19 October 1999):
- Len Marinaccio came up with some problems with curl. Since Windows has a
crippled shell, it can't redirect stderr and that causes trouble. I added
--stderr today which allows the user to redirect the stderr stream to a
file or stdout.
Daniel (18 October 1999):
- The configure script now understands the '--without-ssl' flag, which now
totally disable SSL/https support. Previously it wasn't possible to force
the configure script to leave SSL alone. The previous functionality has
been retained. Troy Engel helped test this new one.
Version 6.1
Daniel (17 October 1999):
- I ifdef'ed or commented all the zlib stuff in the sources and configure
script. It turned out we needed to mock more with zlib than I initially
thought, to make it capable of downloading compressed HTTP documents and
uncompress them on the fly. I didn't mean the zlib parts of curl to become
more than minor so this means I halt the zlib expedition for now and wait
until someone either writes the code or zlib gets updated and better
adjusted for this kind of usage. I won't get into details here, but a
short a summary is suitable:
- zlib can't automatically detect whether to use zlib or gzip
decompression methods.
- zlib is very neat for reading gzipped files from a file descriptor,
although not as nice for reading buffer-based data such as we would
want it.
- there are still some problems with the win32 version when reading from
a file descriptor if that is a socket
Daniel (14 October 1999):
- Moved the (external) include files for libcurl into a subdirectory named
curl and adjusted all #include lines to use <curl/XXXX> to maintain a
better name space and control of the headers. This has been requested.
Daniel (12 October 1999):
- I modified the 'maketgz' script to perform a 'make' too before a release
archive is put together in an attempt to make the time stamps better and
hopefully avoid the double configure-running that use to occur.
Daniel (11 October 1999):
- Applied J<>rn's patches that fixes zlib for mingw32 compiles as well as
some other missing zlib #ifdef and more text on the multiple URL docs in
the man page.
Version 6.1beta
Daniel (6 October 1999):
- Douglas E. Wegscheid sent me a patch that made the exact same thing as I
just made: the -d switch is now capable of reading post data from a named
file or stdin. Use it similarly to the -F. To read the post data from a
given file:
curl -d @path/to/filename www.postsite.com
or let curl read it out from stdin:
curl -d @- www.postit.com
J<>rn Hartroth (3 October 1999):
- Brought some more patches for multiple URL functionality. The MIME
separation ideas are almost scrapped now, and a custom separator is being
used instead. This is still compile-time "flagged".
Daniel
- Updated curl.1 with multiple URL info.
Daniel (30 September 1999):
- Felix von Leitner brought openssl-check fixes for configure.in to work
out-of-the-box when the openssl files are installed in the system default
dirs.
Daniel (28 September 1999)
- Added libz functionality. This should enable decompressing gzip, compress
or deflate encoding HTTP documents. It also makes curl send an accept that
it accepts that kind of encoding. Compressed contents usually shortens
download time. I *need* someone to tell me a site that uses compressed HTTP
documents so that I can test this out properly.
- As a result of the adding of zlib awareness, I changed the version string
a little. I plan to add openldap version reporting in there too.
Daniel (17 September 1999)
- Made the -F option allow stdin when specifying files. By using '-' instead
of file name, the data will be read from stdin.
Version 6.0
Daniel (13 September 1999)
- Added -X/--http-request <request> to enable any HTTP command to be sent.
Do not that your server has to support the exact string you enter. This
should possibly a string like DELETE or TRACE.
- Applied Douglas' mingw32-fixes for the makefiles.
Daniel (10 September 1999)
- Douglas E. Wegscheid pointed out a problem. Curl didn't check the FTP
servers return code properly after the --quote commands were issued. It
took anything non 200 as an error, when all 2XX codes should be accepted as
OK.
- Sending cookies to the same site in multiple lines like curl used to do
turned out to be bad and breaking the cookie specs. Curl now sends all
cookies on a single Cookie: line. Curl is not yet RFC 2109 compliant, but I
doubt that many servers do use that syntax (yet).
Daniel (8 September 1999)
- J<>rn helped me make sure it still compiles nicely with mingw32 under win32.
Daniel (7 September 1999)
- FTP upload through proxy is now turned into a HTTP PUT. Requested by
Stefan Kanthak.
- Added the ldap files to the .m32 makefile.
Daniel (3 September 1999)
- Made cookie matching work while using HTTP proxy.
Bjorn Reese (31 August 1999)
- Passed his ldap:// patch. Note that this requires the openldap shared
library to be installed and that LD_LIBRARY_PATH points to the
directory where the lib will be found when curl is run with a
ldap:// URL.
J<>rn Hartroth (31 August 1999)
- Made the Mingw32 makefiles into single files.
- Made file:// work for Win32. The same code is now used for unix as well for
performance reasons.
Douglas E. Wegscheid (30 August 1999)
- Patched the Mingw32 makefiles for SSL builds.
Matthew Clarke (30 August 1999)
- Made a cool patch for configure.in to allow --with-ssl to specify the
root dir of the openssl installation, as in
./configure --with-ssl=/usr/ssl_here
- Corrected the 'reconf' script to work better with some shells.
J<>rn Hartroth (26 August 1999)
- Fixed the Mingw32 makefiles in lib/ and corrected the file.c for win32
compiles.
Version 5.11
Daniel (25 August 1999)
- John Weismiller pointed out a bug in the header-line
realloc() system in download.c.
- I added lib/file.[ch] to offer a first, simple, file:// support. It
probably won't do much good on win32 system at this point, but I see it
as a start.
- Made the release archives get a Makefile in the root dir, which can be
used to start the compiling/building process easier. I haven't really
changed any INSTALL text yet, I wanted to get some feed-back on this
first.
Daniel (17 August 1999)
- Another Location: bug. Curl didn't do proper relative locations if the
original URL had cgi-parameters that contained a slash. Nusu's page
again.
- Corrected the NO_PROXY usage. It is a list of substrings that if one of
them matches the tail of the host name it should connect to, curl should
not use a proxy to connect there. Pointed out to me by Douglas
E. Wegscheid. I also changed the README text a little regarding this.
Daniel (16 August 1999)
- Fixed a memory bug with http-servers that sent Location: to a Location:
page. Nusu's page showed this too.
- Made cookies work a lot better. Setting the same cookie name several times
used to add more cookies instead of replacing the former one which it
should've. Nusu <nus at intergorj.ro> brought me an URL that made this
painfully visible...
Troy (15 August 1999)
- Brought new .spec files as well as a patch for configure.in that lets the
configure script find the openssl files better, even when the include
files are in /usr/include/openssl
Version 5.10
Daniel (13 August 1999)
- SSL_CTX_set_default_passwd_cb() has been modified in the 0.9.4 version of
OpenSSL. Now why couldn't they simply add a *new* function instead of
modifying the parameters of an already existing function? This way, we get
a compiler warning if compiling with 0.9.4 but not with earlier. So, I had
to come up with a #if construction that deals with this...
- Made curl output the SSL version number get displayed properly with 0.9.4.
Troy (12 August 1999)
- Added MingW32 (GCC-2.95) support under Win32. The INSTALL file was also
a bit rearranged.
Daniel (12 August 1999)
- I had to copy a good <arpa/telnet.h> include file into the curl source
tree to enable the silly win32 systems to compile. The distribution rights
allows us to do that as long as the file remains unmodified.
- I corrected a few minor things that made the compiler complain when
-Wall -pedantic was used.
- I'm moving the official curl web page to http://curl.haxx.nu. I think it
will make it easier to remember as it is a lot shorter and less cryptic.
The old one still works and shows the same info.
Daniel (11 August 1999)
- Albert Chin-A-Young mailed me another correction for NROFF in the
configure.in that is supposed to be better for IRIX users.
Daniel (10 August 1999)
- Albert Chin-A-Young helped me with some stupid Makefile things, as well as
some fiddling with the getdate.c stuff that he had problems with under
HP-UX v10. getdate.y will now be compiled into getdate.c if the appropriate
yacc or bison is found by the configure script. Since this is slightly new,
we need to test the output getdate.c with win32 systems to make sure it
still compiles there.
Daniel (5 August 1999)
- I've just setup a new mailing list with the intention to keep discussions
around libcurl development in it. I mainly expect it to be for thoughts and
brainstorming around a "next generation" library, rather than nitpicking
about the current implementation or details in the current libcurl.
To join our happy bunch of future-looking geeks, enter 'subscribe
<address>' in the body of a mail and send it to
libcurl-request@listserv.fts.frontec.se. Curl bug reports, the usual curl
talk and everything else should still be kept in this mailing list. I've
started to archive this mailing list and have put the libcurl web page at
www.fts.frontec.se/~dast/libcurl/.
- Stefan Kanthak contacted me regarding a few problems in the configure
script which he discovered when trying to make curl compile and build under
Siemens SINIX-Z V5.42B2004!
- Marcus Klein very accurately informed me that src/version.h was not present
in the CVS repository. Oh, how silly...
- Linus Nielsen rewrote the telnet:// part and now curl offers limited telnet
support. If you run curl like 'curl telnet://host' you'll get all output on
the screen and curl will read input from stdin. You'll be able to login and
run commands etc, but since the output is buffered, expect to get a little
weird output.
This is still in its infancy and it might get changed. We need your
feed-back and input in how this is best done.
WIN32 NOTE: I bet we'll get problems when trying to compile the current
lib/telnet.c on win32, but I think we can sort them out in time.
- David Sanderson reported that FORCE_ALLOCA_H or HAVE_ALLOCA_H must be
defined for getdate.c to compile properly on HP-UX 11.0. I updated the
configure script to check for alloca.h which should make it.
Daniel (4 August 1999)
- I finally got to understand Marcus Klein's ftp download resume problem,
which turns out to be due to different outputs from different ftp
servers. It makes ftp download resuming a little trickier, but I've made
some modifications I really believe will work for most ftp servers and I do
hope you report if you have problems with this!
- Added text about file transfer resuming to README.curl.
Daniel (2 August 1999)
- Applied a progress-bar patch from Lars J. Aas. It offers
a new styled progress bar enabled with -#/--progress-bar.
T. Yamada <tai at imasy.or.jp> (30 July 1999)
- It breaks with segfault when 1) curl is using .netrc to obtain
username/password (option '-n'), and 2) is automatically redirected to
another location (option '-L').
There is a small bug in lib/url.c (block starting from line 641), which
tries to take out username/password from user- supplied command-line
argument ('-u' option). This block is never executed on first attempt since
CONF_USERPWD bit isn't set at first, but curl later turns it on when it
checks for CONF_NETRC bit. So when curl tries to redo everything due to
redirection, it segfaults trying to access *data->userpwd.
Version 5.9.1
Daniel (30 July 1999)
- Steve Walch pointed out that there is a memory leak in the formdata
functions. I added a FormFree() function that is now used and supposed to
correct this flaw.
- Mark Wotton reported:
'curl -L https://www.cwa.com.au/' core dumps. I managed to cure this by
correcting the cleanup procedure. The bug seems to be gone with my OpenSSL
0.9.2b, although still occurs when I run the ~100 years old SSLeay 0.8.0. I
don't know whether it is curl or SSLeay that is to blame for that.
- Marcus Klein:
Reported an FTP upload resume bug that I really can't repeat nor understand.
I leave it here so that it won't be forgotten.
Daniel (29 July 1999)
- Costya Shulyupin suggested support for longer URLs when following Location:
and I could only agree and fix it!
- Leigh Purdie found a problem in the upload/POST department. It turned out
that http.c accidentaly cleared the pointer instead of the byte counter
when supposed to.
- Costya Shulyupin pointed out a problem with port numbers and Location:. If
you had a server at a non-standard port that redirected to an URL using a
standard port number, curl still used that first port number.
- Ralph Beckmann pointed out a problem when using both CONF_FOLLOWLOCATION
and CONF_FAILONERROR simultaneously. Since the CONF_FAILONERROR exits on
the 302-code that the follow location header outputs it will never show any
html on location: pages. I have now made it look for >=400 codes if
CONF_FOLLOWLOCATION is set.
- 'struct slist' is now renamed to 'struct curl_slist' (as suggested by Ralph
Beckmann).
- Joshua Swink and Rick Welykochy were the first to point out to me that the
latest OpenSSL package now have moved the standard include path. It is now
in /usr/local/ssl/include/openssl and I have now modified the --enable-ssl
option for the configure script to use that as the primary path, and I
leave the former path too to work with older packages of OpenSSL too.
Daniel (9 June 1999)
- I finally understood the IRIX problem and now it seem to compile on it!
I am gonna remove those #define strcasecmp() things once and for all now.
Daniel (4 June 1999)
- I adjusted the FTP reply 227 parser to make the PASV command work better
with more ftp servers. Appearantly the Roxen Challanger server replied
something curl 5.9 could deal with! :-( Reported by Ashley Reid-Montanaro
and Mark Butler brought a solution for it.
Daniel (26 May 1999)
- Rearranged. README is new, the old one is now README.curl and I added a
README.libcurl with text I got from Ralph Beckmann.
- I also updated the INSTALL text.
Daniel (25 May 1999)
- David Jonathan Lowsky correctly pointed out that curl didn't properly deal
with form posting where the variable shouldn't have any content, as in curl
-F "form=" www.site.com. It was now fixed.
Version 5.9
Daniel (22 May 1999)
- I've got a bug report from Aaron Scarisbrick in which he states he has some
problems with -L under FreeBSD 3.0. I have previously got another bug
report from Stefan Grether which points at an error with similar sympthoms
when using win32. I made the allocation of the new url string a bit faster
and different, don't know if it actually improves anything though...
Daniel (20 May 1999)
- Made the cookie parser deal with CRLF newlines too.
Daniel (19 May 1999)
- Download() didn't properly deal with failing return codes from the sread()
function. Adam Coyne found the problem in the win32 version, and Troy Engel
helped me out isolating it.
Daniel (16 May 1999)
- Richard Adams pointed out a bug I introduced in 5.8. --dump-header doesn't
work anymore! :-/ I fixed it now.
- After a suggestion by Joshua Swink I added -S / --show-error to force curl
to display the error message in case of an error, even if -s/--silent was
used.
Daniel (10 May 1999)
- I moved the stuff concerning HTTP, DICT and TELNET it their own source
files now. It is a beginning on my clean-up of the sources to make them
layer all those protocols better to enable more to be added easier in the
future!
- Leon Breedt sent me some files I've not put into the main curl
archive. They're for creating the Debian package thingie. He also sent me a
debian package that I've made available for download at the web page
Daniel (9 May 1999)
- Made it compile on cygwin too.
Troy Engel (7 May 1999)
- Brought a series of patches to allow curl to compile smoothly on MSVC++ 6
again!
Daniel (6 May 1999)
- I changed the #ifdef HAVE_STRFTIME placement for the -z code so that it
will be easier to discover systems that don't have that function and thus
can't use -z successfully. Made the strftime() get used if WIN32 is defined
too.
Version 5.8
Daniel (5 May 1999)
- I've had it with this autoconf/automake mess. It seems to work allright
for most people who don't have automake installed, but for those who have
there are problems all over.
I've got like five different bug reports on this only the last
week... Claudio Neves and Federico Bianchi and root <duggerj001 at
hawaii.rr.com> are some of them reporting this.
Currently, I have no really good fix since I want to use automake myself to
generate the Makefile.in files. I've found out that the @SHELL@-problems
can often be fixed by manually invoking 'automake' in the archive root
before you run ./configure... I've hacked my maketgz script now to fiddle
a bit with this and my tests seem to work better than before at least!
Daniel (4 May 1999)
- mkhelp.pl has been doing badly lately. I corrected a case problem in
the regexes.
- I've now remade the -o option to not touch the file unless it needs to.
I had to do this to make -z option really fine, since now you can make a
curl fetch and use a local copy's time when downloading to that file, as
in:
curl -z dump -o dump remote.site.com/file.html
This will only get the file if the remote one is newer than the local.
I'm aware that this alters previous behaviour a little. Some scripts out
there may depend on that the file is always touched...
- Corrected a bug in the SSLv2/v3 selection.
- Felix von Leitner requested that curl should be able to send
"If-Modified-Since" headers, which indeed is a fair idea. I implemented it
right away! Try -z <expression> where expression is a full GNU date
expression or a file name to get the date from!
Stephan Lagerholm (30 Apr 1999)
- Pointed out a problem with the src/Makefile for FreeBSD. The RM variable
isn't set and causes the make to fail.
Daniel (26 April 1999)
- Am I silly or what? Irving Wolfe pointed out to me that the curl version
number was not set properly. Hasn't been since 5.6. This was due to a bug
in my maketgz script!
David Eriksson (25 Apr 1999)
- Found a bug in cookies.c that made it crash at times.
Version 5.7.1
Doug Kaufman (23 Apr 1999)
- Brought two sunos 4 fixes. One of them being the hostip.c fix mentioned
below and the other one a correction in include/stdcheaders.h
- Added a paragraph about compiling with the US-version of openssl to the
INSTALL file.
Daniel
- New mailing list address. Info updated on the web page as well as in the
README file
Greg Onufer (20 Apr 1999)
- hostip.c didn't compile properly on SunOS 5.5.1.
It needs an #include <sys/types.h>
Version 5.7
Daniel (Apr 20 1999)
- Decided to upload a non-beta version right now!
- Made curl support any-length HTTP headers. The destination buffer is now
simply enlarged every time it turns out to be too small!
- Added the FAQ file to the archive. Still a bit smallish, but it is a
start.
Eric Thelin (15 Apr 1999)
- Made -D accept '-' instead of filename to write to stdout.
Version 5.6.3beta
Daniel (Apr 12 1999)
- Changed two #ifdef WIN32 to better #ifdef <errorcode> when connect()ing
in url.c and ftp.c. Makes cygwin32 deal with them better too. We should
try to get some decent win32-replacement there. Anyone?
- The old -3/--crlf option is now ONLY --crlf!
- I changed the "SSL fix" to a more lame one, but that doesn't remove as
much functionality. Now I've enabled the lib to select what SSL version it
should try first. Appearantly some older SSL-servers don't like when you
talk v3 with them so you need to be able to force curl to talk v2 from the
start. The fix dated April 6 and posted on the mailing list forced curl to
use v2 at all times using a modern OpenSSL version, but we don't really
want such a crippled solution.
- Marc Boucher sent me a patch that corrected a math error for the
"Curr.Speed" progress meter.
- Eric Thelin sent me a patch that enables '-K -' to read a config file from
stdin.
- I found out we didn't close the file properly before so I added it!
Daniel (Apr 9 1999)
- Yu Xin pointed out a problem with ftp download resume. It didn't work at
all! ;-O
Daniel (Apr 6 1999)
- Corrected the version string part generated for the SSL version.
- I found a way to make some other SSL page work with openssl 0.9.1+ that
previously didn't (ssleay 0.8.0 works with it though!). Trying to get
some real info from the OpenSSL guys to see how I should do to behave the
best way. SSLeay 0.8.0 shouldn't be that much in use anyway these days!
Version 5.6.2beta
Daniel (Apr 4 1999)
- Finally have curl more cookie "aware". Now read carefully. This is how
it works.
To make curl read cookies from an already existing file, in plain header-
format (like from the headers of a previous fetch) invoke curl with the
-b flag like:
curl -b file http://site/foo.html
Curl will then use all cookies it finds matching. The old style that sets
a single cookie with -b is still supported and is used if the string
following -b includes a '=' letter, as in "-b name=daniel".
To make curl read the cookies sent in combination with a location: (which
sites often do) point curl to read a non-existing file at first (i.e
to start with no existing cookies), like:
curl -b nowhere http://site/setcookieandrelocate.html
- Added a paragraph in the TODO file about the SSL problems recently
reported. Evidently, some kind of SSL-problem curl may need to address.
- Better "Location:" following.
Douglas E. Wegscheid (Tue, 30 Mar 1999)
- A subsecond display patch.
Daniel (Mar 14 1999)
- I've separated the version number of libcurl and curl now. To make
things a little easier, I decided to start the curl numbering from
5.6 and the former version number known as "curl" is now the one
set for libcurl.
- Removed the 'enable-no-pass' from configure, I doubt anyone wanted
that.
- Made lots of tiny adjustments to compile smoothly with cygwin under
win32. It's a killer for porting this to win32, bye bye VC++! ;-)
Compiles and builds out-of-the-box now. See the new wordings in
INSTALL for details.
- Beginning experiments with downloading multiple document from a http
server while remaining connected.
Version 5.6beta
Daniel (Mar 13 1999)
- Since I've changed so much, I thought I'd just go ahead and implement the
suggestion from Douglas E. Wegscheid. -D or --dump-header is now storing
HTTP headers separately in the specified file.
- Added new text to INSTALL on what to do to build this on win32 now.
- Aaargh. I had to take a step back and prefix the shared #include files
in the sources with "../include/" to please VC++...
Daniel (Mar 12 1999)
- Split the url.c source into many tiny sources for better readability
and smaller size.
Daniel (Mar 11 1999)
- Started to change stuff for a move to make libcurl and a more separate
curl application that uses the libcurl. Made the libcurl sources into
the new lib directory while the curl application will remain in src as
before. New makefiles, adjusted configure script and so.
libcurl.a built quickly and easily. I better make a better interface to
the lib functions though.
The new root dir include/ is supposed to contain the public information
about the new libcurl. It is a little ugly so far :-)
Daniel (Mar 1 1999)
- Todd Kaufmann sent me a good link to Netscape's cookie spec as well as the
info that RFC 2109 specifies how to use them. The link is now in the
README and the RFC in the RESOURCES.
Daniel (Feb 23 1999)
- Finally made configure accept --with-ssl to look for SSL libs and includes
in the "standard" place /usr/local/ssl...
Daniel (Feb 22 1999)
- Verified that curl linked fine with OpenSSL 0.9.1c which seems to be
the most recent.
Henri Gomez (Fri Feb 5 1999)
- Sent in an updated curl-ssl.spec. I still miss the script that builds an
RPM automatically...
Version 5.5.1
Mark Butler (27 Jan 1999)
- Corrected problems in Download().
Danitel Stenberg (25 Jan 1999)
- Jeremie Petit pointed out a few flaws in the source that prevented it from
compile warning free with the native compiler under Digital Unix v4.0d.
Version 5.5
Daniel Stenberg (15 Jan 1999)
- Added Bjorns small text to the README about the DICT protocol.
Daniel Stenberg (11 Jan 1999)
- <jswink at softcom.net> reported about the win32-versioin: "Doesn't use
ALL_PROXY environment variable". Turned out to be because of the static-
buffer nature of the win32 environment variable calls!
Bjorn Reese (10 Jan 1999)
- I have attached a simple addition for the DICT protocol (RFC 2229).
It performs dictionary lookups. The output still needs to be better
formatted.
To test it try (the exact format, and more examples are described in
the RFC)
dict://dict.org/m:hello
dict://dict.org/m:hello::soundex
Vicente Garcia (10 Jan 1999)
- Corrected the progress meter for files larger than 20MB.
Daniel Stenberg (7 Jan 1999)
- Corrected the -t and -T help texts. They claimed to be FTP only.
Version 5.4
Daniel Stenberg
(7 Jan 1999)
- Irving Wolfe reported that curl -s didn't always supress the progress
reporting. It was the form post that autoamtically always switched it on
again. This is now corrected!
(4 Jan 1999)
- Andreas Kostyrka suggested I'd add PUT and he helped me out to test it. If
you use -t or -T now on a http or https server, PUT will be used for file
upload.
I removed the former use of -T with HTTP. I doubt anyone ever really used
that.
(4 Jan 1999)
- Erik Jacobsen found a width bug in the mprintf() function. I corrected it
now.
(4 Jan 1999)
- As John V. Chow pointed out to me, curl accepted very limited URL sizes. It
should now accept path parts that are up to at least 4096 bytes.
- Somehow I screwed up when applying the AIX fix from Gilbert Ramirez, so
I redid that now.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@ html:
pdf: pdf:
cd docs; make pdf cd docs; make pdf
check: test check: test examples
if CROSSCOMPILING if CROSSCOMPILING
test-full: test test-full: test
@@ -71,6 +71,9 @@ test-torture:
endif endif
examples:
@(cd docs/examples; $(MAKE) all)
# #
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line: # must contain the following line:

View File

@@ -68,18 +68,22 @@ watcom-clean:
wmake -f Makefile.Watcom clean wmake -f Makefile.Watcom clean
mingw32: mingw32:
$(MAKE) -C lib -f Makefile.m32
$(MAKE) -C src -f Makefile.m32
mingw32-zlib:
$(MAKE) -C lib -f Makefile.m32 ZLIB=1 $(MAKE) -C lib -f Makefile.m32 ZLIB=1
$(MAKE) -C src -f Makefile.m32 ZLIB=1 $(MAKE) -C src -f Makefile.m32 ZLIB=1
mingw32-ssl: mingw32-ssl-zlib:
$(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1 $(MAKE) -C lib -f Makefile.m32 SSL=1 ZLIB=1
$(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1 $(MAKE) -C src -f Makefile.m32 SSL=1 ZLIB=1
mingw32-ssh2-ssl: mingw32-ssh2-ssl-zlib:
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1 $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1 $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 ZLIB=1
mingw32-ssh2-ssl-sspi: mingw32-ssh2-ssl-sspi-zlib:
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1 $(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1 $(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
@@ -234,6 +238,10 @@ netware-clean:
$(MAKE) -C lib -f Makefile.netware clean $(MAKE) -C lib -f Makefile.netware clean
$(MAKE) -C src -f Makefile.netware clean $(MAKE) -C src -f Makefile.netware clean
netware-install:
$(MAKE) -C lib -f Makefile.netware install
$(MAKE) -C src -f Makefile.netware install
unix: all unix: all
unix-ssl: ssl unix-ssl: ssl
@@ -241,3 +249,8 @@ unix-ssl: ssl
linux: all linux: all
linux-ssl: ssl linux-ssl: ssl
vc8:
echo "generate VC8 makefiles"
sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8

View File

@@ -1,56 +1,58 @@
Curl and libcurl 7.16.2 Curl and libcurl 7.17.0
Public curl release number: 98 Public curl release number: 101
Releases counted from the very beginning: 125 Releases counted from the very beginning: 127
Available command line options: 118 Available command line options: 118
Available curl_easy_setopt() options: 141 Available curl_easy_setopt() options: 143
Number of public functions in libcurl: 54 Number of public functions in libcurl: 55
Amount of public web site mirrors: 38 Amount of public web site mirrors: 42
Number of known libcurl bindings: 35 Number of known libcurl bindings: 36
Number of contributors: 539 Number of contributors: 572
This release includes the following changes: This release includes the following changes:
o added CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS o support for OS/400 Secure Sockets Layer library
o added CURLOPT_HTTP_CONTENT_DECODING, CURLOPT_HTTP_TRANSFER_DECODING and o curl_easy_setopt() now allocates strings passed to it
--raw o SCP and SFTP support now requires libssh2 0.16 or later
o added support for using the NSS library for TLS/SSL o LDAP libraries are now linked "regularly" and not with dlopen
o changed default anonymous FTP password o HTTP transfers have the download size info "available" earlier
o changed the CURLOPT_FTP_SSL_CCC option to handle active and passive o FTP transfers have the download size info "available" earlier
CCC shutdown o builds and runs on OS/400
o added the --ftp-ssl-ccc-mode command line option o several error codes and options were marked as obsolete and subject to
o includes VC8 Makefiles in the release archive future removal (set CURL_NO_OLDIES to see if your application is using them)
o --ftp-ssl-control is now honoured on ftps:// URLs o SFTP errors can return more specific error codes
o added experimental CURL_ACKNOWLEDGE_EINTR symbol definition check
o --key and new --pubkey options for SSH public key file logins
o --pass now works for a SSH public key file, too
o select (2) support no longer needed to build the library if poll() used
o CURLOPT_POSTQUOTE works for SFTP
This release includes the following bugfixes: This release includes the following bugfixes:
o in testsuite, update test cookies expiration from 2007-Feb-1 to year 2035 o test cases 31, 46, 61, 506, 517 now work in time zones that use leap seconds
o socks5 works o problem with closed proxy connection during HTTP CONNECT auth negotiation
o builds fine with VC2005 o transfer-encoding skipping didn't ignore the 407 response bodies properly
o CURLOPT_RANGE set to NULL resets the range for FTP o CURLOPT_SSL_VERIFYHOST set to 1
o curl_multi_remove_handle() rare crash o CONNECT endless loop
o passive FTP transfers work with SOCKS o krb5 support builds with Heimdal
o multi interface HTTPS connection re-use memory leak o added returned error string for connection refused case
o libcurl.m4's --with-libcurl is improved o re-use of dead FTP control connections
o curl-config --libs and libcurl.pc no longer list unnecessary dependencies o login to FTP servers that don't require (nor understand) PASS after the
o fixed an issue with CCC not working on some servers USER command
o several HTTP pipelining problems o bad free of memory from libssh2
o HTTP CONNECT thru a proxy is now less blocking when the multi interface is o the SFTP PWD command works
used o HTTP Digest auth on a re-used connection
o HTTP Digest header parsing fix for unquoted last word ending with CRLF o FTPS data connection close
o CURLOPT_PORT, HTTP proxy, re-using connections and non-HTTP protocols o AIX 4 and 5 get to use non-blocking sockets
o CURLOPT_INTERFACE for ipv6 o small POST with NTLM
o use-after-free issue with HTTP transfers with the multi interface o resumed file:// transfers
o the progress callback can get called more frequently o CURLOPT_DNS_CACHE_TIMEOUT and CURLOPT_DNS_USE_GLOBAL_CACHE are 64 bit
o timeout would restart when signal caught while awaiting socket events "clean"
o curl -f with user+password embedded in the URL o memory leak when handling compressed data streams from broken servers
o 26 flaws identified by coverity.com o no NTLM unicode response
o builds on QNX 6 again o resume HTTP PUT using Digest authentication
o FTP NOBODY requests on directories sent "SIZE (null)"
o FTP NOBODY request on file crash
o excessively long FTP server responses and response lines
o file:// upload then FTP:// upload crash
o TFTP error 0 is no longer treated as success
o uploading empty file over FTP on re-used connection
o superfluous CWD command on re-used FTP connections without subdirs used
This release includes the following known bugs: This release includes the following known bugs:
@@ -58,21 +60,29 @@ This release includes the following known bugs:
Other curl-related news: Other curl-related news:
o pycurl 7.16.1 was released: http://pycurl.sf.net/ o pycurl 7.16.4 was released http://pycurl.sf.net
o TclCurl 7.16.4 was released
http://personal1.iddeo.es/andresgarci/tclcurl/english/
o curlpp 0.7.1 was released
http://rrette.com/textpattern/index.php?s=cURLpp
o A brand new binding for SP-Forth was written by ygrek:
http://www.forth.org.ru/~ac/lib/lin/curl/
New curl mirrors: New curl mirrors:
o http://curl.basemirror.de is a new mirror in Germany o http://curl.freeby.pctools.cl is a new mirror in Santiago, Chile
o http://curl.xxtracker.org is a new mirror in The Netherlands o http://curl.site2nd.org is a new mirror in Dallas, Texas, USA
o http://curl.cheap.co.il is a new mirror in Tel-Aviv, Israel
o http://curl.digimirror.nl is a new mirror in Amsterdam, the Netherlands
This release would not have looked like this without help, code, reports and This release would not have looked like this without help, code, reports and
advice from friends like these: advice from friends like these:
Yang Tse, Manfred Schwarb, Michael Wallner, Jeff Pohlmeyer, Shmulik Regev, Dan Fandrich, Song Ma, Daniel Black, Giancarlo Formicuccia, Shmulik Regev,
Rob Crittenden, Robert A. Monat, Dan Fandrich, Duncan Mac-Vicar Prett, Daniel Cater, Colin Hogben, Jofell Gallardo, Daniel Johnson,
Michal Marek, Robson Braga Araujo, Ian Turner, Linus Nielsen Feltzing, Ralf S. Engelschall, James Housley, Chris Flerackers, Patrick Monnerat,
Ravi Pratap, Adam D. Moss, Jose Kahan, Hang Kin Lau, Justin Fletcher, Jayesh A Shah, Greg Zavertnik, Peter O'Gorman, Greg Morse, Dmitriy Sergeyev,
Robert Iakobashvili, Bryan Henderson, Eygene Ryabinkin, Daniel Johnson, Scott Cantor, Allen Pulsifer, Andrew Wansink, Robson Braga Araujo,
Matt Kraai, Nick Zitzmann, Rob Jones Christian Vogt
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)

View File

@@ -1107,7 +1107,7 @@ AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET],
# define PLATFORM_SUNOS4 # define PLATFORM_SUNOS4
# endif # endif
#endif #endif
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4) #if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
# define PLATFORM_AIX_V3 # define PLATFORM_AIX_V3
#endif #endif
@@ -1830,81 +1830,6 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
]) dnl end of AC_DEFUN() ]) dnl end of AC_DEFUN()
dnl Determine the name of the library to pass to dlopen() based on the name
dnl that would normally be given to AC_CHECK_LIB. The preprocessor symbol
dnl given is set to the quoted library file name.
dnl The standard dynamic library file name is first generated, based on the
dnl current system type, then a search is performed for that file on the
dnl standard dynamic library path. If it is a symbolic link, the destination
dnl of the link is used as the file name, after stripping off any minor
dnl version numbers. If a library file can't be found, a guess is made.
dnl This macro assumes AC_PROG_LIBTOOL has been called and requires perl
dnl to be available in the PATH, or $PERL to be set to its location.
dnl
dnl CURL_DLLIB_NAME(VARIABLE, library_name)
dnl e.g. CURL_DLLIB_NAME(LDAP_NAME, ldap) on a Linux system might result
dnl in LDAP_NAME holding the string "libldap.so.2".
AC_DEFUN([CURL_DLLIB_NAME],
[
AC_MSG_CHECKING([name of dynamic library $2])
dnl The shared library extension variable name changes from version to
dnl version of libtool. Try a few names then just set one statically.
test -z "$shared_ext" && eval shared_ext=\"$shrext_cmds\"
test -z "$shared_ext" && shared_ext="$std_shrext"
test -z "$shared_ext" && shared_ext="$shrext"
test -z "$shared_ext" && shared_ext=".so"
dnl Create the library link name of the correct form for this platform
LIBNAME_LINK_SPEC=`echo "$library_names_spec" | $SED 's/^.* //'`
DLGUESSLIB=`name=$2 eval echo "$libname_spec"`
DLGUESSFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$LIBNAME_LINK_SPEC"`
dnl Last resort in case libtool knows nothing about shared libs on this platform
test -z "$DLGUESSFILE" && DLGUESSFILE="$DLGUESSLIB$shared_ext"
dnl Synthesize a likely dynamic library name in case we can't find an actual one
SO_NAME_SPEC="$soname_spec"
dnl soname_spec undefined when identical to the 1st entry in library_names_spec
test -z "$SO_NAME_SPEC" && SO_NAME_SPEC=`echo "$library_names_spec" | $SED 's/ .*$//'`
DLGUESSSOFILE=`libname="$DLGUESSLIB" release="" major="" versuffix="" eval echo "$SO_NAME_SPEC"`
dnl Last resort in case libtool knows nothing about shared libs on this platform
test -z "$DLGUESSSOFILE" && DLGUESSSOFILE="$DLGUESSFILE"
if test "$cross_compiling" = yes; then
dnl Can't look at filesystem when cross-compiling
AC_DEFINE_UNQUOTED($1, "$DLGUESSSOFILE", [$2 dynamic library file])
AC_MSG_RESULT([$DLGUESSSOFILE (guess while cross-compiling)])
else
DLFOUNDFILE=""
if test "$sys_lib_dlsearch_path_spec" ; then
dnl Search for the link library name and see what it points to.
for direc in $sys_lib_dlsearch_path_spec ; do
DLTRYFILE="$direc/$DLGUESSFILE"
dnl Find where the symbolic link for this name points
changequote(<<, >>)dnl
<<
DLFOUNDFILE=`${PERL:-perl} -e 'use File::Basename; (basename(readlink($ARGV[0])) =~ /^(.*[^\d]\.\d+)[\d\.]*$/ && print ${1}) || exit 1;' "$DLTRYFILE" 2>&5`
>>
changequote([, ])dnl
if test "$?" -eq "0"; then
dnl Found the file link
break
fi
done
fi
if test -z "$DLFOUNDFILE" ; then
dnl Couldn't find a link library, so guess at a name.
DLFOUNDFILE="$DLGUESSSOFILE"
fi
AC_DEFINE_UNQUOTED($1, "$DLFOUNDFILE", [$2 dynamic library file])
AC_MSG_RESULT($DLFOUNDFILE)
fi
])
# This is only a temporary fix. This macro is here to replace the broken one # This is only a temporary fix. This macro is here to replace the broken one
# delivered by the automake project (including the 1.9.6 release). As soon as # delivered by the automake project (including the 1.9.6 release). As soon as
# they ship a working version we SHOULD remove this work-around. # they ship a working version we SHOULD remove this work-around.

View File

@@ -20,3 +20,9 @@ Brad Spencer
Ravi Pratap Ravi Pratap
William Ahern William Ahern
Bram Matthys Bram Matthys
Michael Wallner
Vlad Dinulescu
Brad House
Shmulik Regev
Ashish Sharma
Brad Spencer

View File

@@ -1,16 +1,140 @@
Changelog for the c-ares project Changelog for the c-ares project
* February 19 * July 14 2007 (Daniel Stenberg)
- Vlad Dinulescu fixed two outstanding valgrind reports:
1. In ares_query.c , in find_query_by_id we compare q->qid (which is a short
int variable) with qid, which is declared as an int variable. Moreover,
DNS_HEADER_SET_QID is used to set the value of qid, but DNS_HEADER_SET_QID
sets only the first two bytes of qid. I think that qid should be declared as
"unsigned short" in this function.
2. The same problem occurs in ares_process.c, process_answer() . query->qid
(an unsigned short integer variable) is compared with id, which is an
integer variable. Moreover, id is initialized from DNS_HEADER_QID which sets
only the first two bytes of id. I think that the id variable should be
declared as "unsigned short" in this function.
Even after declaring these variables as "unsigned short", the valgrind
errors are still there. Which brings us to the third problem.
3. The third problem is that Valgrind assumes that query->qid is not
initialised correctly. And it does that because query->qid is set from
DNS_HEADER_QID(qbuf); Valgrind says that qbuf has unitialised bytes. And
qbuf has uninitialised bytes because of channel->next_id . And next_id is
set by ares_init.c:ares__generate_new_id() . I found that putting short r=0
in this function (instead of short r) makes all Valgrind warnings go away.
I have studied ares__rc4() too, and this is the offending line:
buffer_ptr[counter] ^= state[xorIndex]; (ares_query.c:62)
This is what triggers Valgrind.. buffer_ptr is unitialised in this function,
and by applying ^= on it, it remains unitialised.
Version 1.4.0 (June 8, 2007)
* June 4 2007 (Daniel Stenberg)
- James Bursa reported a major memory problem when resolving multi-IP names
and I found and fixed the problem. It was added by Ashish Sharma's patch
two days ago.
When I then tried to verify multiple entries in /etc/hosts after my fix, I
got another segfault and decided this code was not ripe for inclusion and I
reverted the patch.
* June 2 2007
- Brad Spencer found and fixed three flaws in the code, found with the new
gcc 4.2.0 warning: -Waddress
- Brad House fixed VS2005 compiler warnings due to time_t being 64bit.
He also made recent Microsoft compilers use _strdup() instead of strdup().
- Brad House's man pages for ares_save_options() and ares_destroy_options()
were added.
- Ashish Sharma provided a patch for supporting multiple entries in the
/etc/hosts file. Patch edited for coding style and functionality by me
(Daniel).
* May 30 2007
- Shmulik Regev brought cryptographically secure transaction IDs:
The c-ares library implementation uses a DNS "Transaction ID" field that is
seeded with a pseudo random number (based on gettimeofday) which is
incremented (++) between consecutive calls and is therefore rather
predictable. In general, predictability of DNS Transaction ID is a well
known security problem (e.g.
http://bak.spc.org/dms/archive/dns_id_attack.txt) and makes a c-ares based
implementation vulnerable to DNS poisoning. Credit goes to Amit Klein
(Trusteer) for identifying this problem.
The patch I wrote changes the implementation to use a more secure way of
generating unique IDs. It starts by obtaining a key with reasonable entropy
which is used with an RC4 stream to generate the cryptographically secure
transaction IDs.
Note that the key generation code (in ares_init:randomize_key) has two
versions, the Windows specific one uses a cryptographically safe function
provided (but undocumented :) by the operating system (described at
http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx). The
default implementation is a bit naive and uses the standard 'rand'
function. Surely a better way to generate random keys exists for other
platforms.
The patch can be tested by using the adig utility and using the '-s' option.
- Brad House added ares_save_options() and ares_destroy_options() that can be
used to keep options for later re-usal when ares_init_options() is used.
Problem: Calling ares_init() for each lookup can be unnecessarily resource
intensive. On windows, it must LoadLibrary() or search the registry
on each call to ares_init(). On unix, it must read and parse
multiple files to obtain the necessary configuration information. In
a single-threaded environment, it would make sense to only
ares_init() once, but in a heavily multi-threaded environment, it is
undesirable to ares_init() and ares_destroy() for each thread created
and track that.
Solution: Create ares_save_options() and ares_destroy_options() functions to
retrieve and free options obtained from an initialized channel. The
options populated can be used to pass back into ares_init_options(),
it should populate all needed fields and not retrieve any information
from the system. Probably wise to destroy the cache every minute or
so to prevent the data from becoming stale.
- Daniel S added ares_process_fd() to allow applications to ask for processing
on specific sockets and thus avoiding select() and associated
functions/macros. This function will be used by upcoming libcurl releases
for this very reason. It also made me export the ares_socket_t type in the
public ares.h header file, since ares_process_fd() uses that type for two of
the arguments.
* May 25 2007
- Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
that could cause it to return a bad return code.
* April 16 2007
- Yang Tse: Provide ares_getopt() command-line parser function as a source
code helper function, not belonging to the actual c-ares library.
* February 19 2007
- Vlad Dinulescu added ares_parse_ns_reply(). - Vlad Dinulescu added ares_parse_ns_reply().
* February 13 * February 13 2007
- Yang Tse: Fix failure to get the search sequence of /etc/hosts and - Yang Tse: Fix failure to get the search sequence of /etc/hosts and
DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when DNS from /etc/nsswitch.conf, /etc/host.conf or /etc/svc.conf when
/etc/resolv.conf did not exist or was unable to read it. /etc/resolv.conf did not exist or was unable to read it.
* November 22 * November 22 2006
- Install ares_dns.h too - Install ares_dns.h too
@@ -18,7 +142,7 @@
struct, and there are domain/search entries in /etc/resolv.conf, the domains struct, and there are domain/search entries in /etc/resolv.conf, the domains
of the options struct will be overridden. of the options struct will be overridden.
* November 6 * November 6 2006
- Yang Tse removed a couple of potential zero size memory allocations. - Yang Tse removed a couple of potential zero size memory allocations.

View File

@@ -11,7 +11,7 @@ MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/vc.dsw vc/ahost/ahost.dep \
# adig and ahost are just sample programs and thus not mentioned with the # adig and ahost are just sample programs and thus not mentioned with the
# regular sources and headers # regular sources and headers
EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \ EXTRA_DIST = CHANGES README.cares Makefile.inc adig.c ahost.c $(man_MANS) \
$(MSVCFILES) AUTHORS config-win32.h $(MSVCFILES) AUTHORS config-win32.h RELEASE-NOTES libcares.pc.in
VER=-version-info 1:0:0 VER=-version-info 1:0:0

View File

@@ -21,7 +21,7 @@ CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \ -DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \ -DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \ -DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
-UHAVE_CONFIG_H -Dselect=select_s -UHAVE_CONFIG_H
LDFLAGS = -s LDFLAGS = -s
@@ -38,7 +38,6 @@ endif
ifeq ($(USE_ZLIB),1) ifeq ($(USE_ZLIB),1)
EX_LIBS += $(ZLIB_ROOT)/libz.a EX_LIBS += $(ZLIB_ROOT)/libz.a
CFLAGS += -DUSE_MANUAL
endif endif
ifeq ($(USE_IDNA),1) ifeq ($(USE_IDNA),1)
@@ -55,10 +54,10 @@ all: $(OBJ_DIR) libcares.a ahost.exe adig.exe
libcares.a: $(OBJECTS) libcares.a: $(OBJECTS)
ar rs $@ $? ar rs $@ $?
ahost.exe: ahost.c $(OBJ_HACK) ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
adig.exe: adig.c $(OBJ_HACK) adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
clean: clean:

View File

@@ -18,5 +18,5 @@ MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \ ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \ ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \ ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
ares_getsock.3 ares_parse_ns_reply.3 ares_getsock.3 ares_parse_ns_reply.3 \
ares_destroy_options.3 ares_save_options.3

View File

@@ -5,27 +5,30 @@
## Use: make -f Makefile.m32 [demos] ## Use: make -f Makefile.m32 [demos]
## ##
## Quick hack by Guenter; comments to: /dev/nul ## Quick hack by Guenter; comments to: /dev/nul
#
CC = gcc
RANLIB = ranlib
######################################################## ########################################################
## Nothing more to do below this line! ## Nothing more to do below this line!
LIB=libcares.a LIB = libcares.a
CC=gcc
CFLAGS=-O2 -Wall
LDFLAGS=-s
LIBS=-lwsock32
MANPAGES := $(patsubst %.c,%.o,$(wildcard ares_*.3)) CC = gcc
LD = gcc
RANLIB = ranlib
#RM = rm -f
OBJS := $(patsubst %.c,%.o,$(wildcard ares_*.c)) CFLAGS = -O2 -Wall
OBJS += windows_port.o inet_ntop.o inet_net_pton.o bitncmp.o LDFLAGS = -s
LIBS = -lwsock32
$(LIB): ${OBJS} # Makefile.inc provides the CSOURCES and HHEADERS defines
ar cru $@ ${OBJS} include Makefile.inc
${RANLIB} $@
OBJLIB := $(patsubst %.c,%.o,$(strip $(CSOURCES)))
$(LIB): $(OBJLIB)
ar cru $@ $^
$(RANLIB) $@
all: $(LIB) demos all: $(LIB) demos
@@ -34,16 +37,13 @@ demos: adig.exe ahost.exe
tags: tags:
etags *.[ch] etags *.[ch]
adig.exe: adig.o $(LIB) %.exe: %.o ares_getopt.o $(LIB)
${CC} ${LDFLAGS} -o $@ adig.o $(LIB) ${LIBS} $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
ahost.exe: ahost.o $(LIB) $(OBJLIB): ares.h ares_dns.h ares_private.h
${CC} ${LDFLAGS} -o $@ ahost.o $(LIB) ${LIBS}
${OBJS}: ares.h ares_dns.h ares_private.h
.c.o: .c.o:
${CC} -c ${CFLAGS} $< $(CC) $(CFLAGS) -c $<
check: check:
@@ -61,8 +61,8 @@ install:
done) done)
clean: clean:
rm -f ${OBJS} $(LIB) adig.o adig.exe ahost.o ahost.exe $(RM) ares_getopt.o $(OBJLIB) $(LIB) adig.exe ahost.exe
distclean: clean distclean: clean
rm -f config.cache config.log config.status Makefile $(RM) config.cache config.log config.status Makefile

View File

@@ -1,7 +1,7 @@
################################################################# #################################################################
# $Id$ # $Id$
# #
## Makefile for building libares (NetWare version - gnu make) ## Makefile for building libcares (NetWare version - gnu make)
## Use: make -f Makefile.netware ## Use: make -f Makefile.netware
## ##
## Comments to: Guenter Knauf http://www.gknw.de/phpbb ## Comments to: Guenter Knauf http://www.gknw.de/phpbb
@@ -35,10 +35,10 @@ ifndef LIBARCH
LIBARCH = LIBC LIBARCH = LIBC
endif endif
# must be equal to DEBUG or NDEBUG # must be equal to NDEBUG or DEBUG, CURLDEBUG
ifndef DB
DB = NDEBUG DB = NDEBUG
# DB = DEBUG endif
# DB = CURLDEBUG
# Optimization: -O<n> or debugging: -g # Optimization: -O<n> or debugging: -g
ifeq ($(DB),NDEBUG) ifeq ($(DB),NDEBUG)
OPT = -O2 OPT = -O2
@@ -51,12 +51,20 @@ endif
# Include the version info retrieved from curlver.h # Include the version info retrieved from curlver.h
-include $(OBJDIR)/version.inc -include $(OBJDIR)/version.inc
# The following line defines your compiler. # The following lines defines your compiler.
ifdef CWFolder
METROWERKS = $(CWFolder)
endif
ifdef METROWERKS ifdef METROWERKS
# MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
CC = mwccnlm CC = mwccnlm
else else
CC = gcc CC = gcc
endif endif
# a native win32 awk can be downloaded from here:
# http://www.gknw.net/development/prgtools/awk-20050424.zip
AWK = awk
YACC = bison -y YACC = bison -y
CP = cp -afv CP = cp -afv
# RM = rm -f # RM = rm -f
@@ -70,10 +78,11 @@ CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
ifeq ($(CC),mwccnlm) ifeq ($(CC),mwccnlm)
LD = mwldnlm LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(OBJS) $(<:.def=.o) -o $@ -commandfile LDFLAGS = -nostdlib $(PRELUDE) $(OBJEXE) $(<:.def=.o) -o $@ -commandfile
AR = mwldnlm AR = mwldnlm
ARFLAGS = -type library -w nocmdline $(OBJDIR)/*.o -o ARFLAGS = -nostdlib -type library -o
LIBEXT = lib LIBEXT = lib
#RANLIB =
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586 CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
CFLAGS += -relax_pointers CFLAGS += -relax_pointers
#CFLAGS += -w on #CFLAGS += -w on
@@ -81,8 +90,10 @@ ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4 CFLAGS += -align 4
else else
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj" # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h" # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
CFLAGS += -align 1 CFLAGS += -align 1
endif endif
else else
@@ -91,12 +102,16 @@ LDFLAGS = -T
AR = ar AR = ar
ARFLAGS = -cq ARFLAGS = -cq
LIBEXT = a LIBEXT = a
RANLIB = ranlib
CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
CFLAGS += -Wall -Wno-format -Wno-uninitialized # -pedantic CFLAGS += -Wall -Wno-format -Wno-uninitialized # -pedantic
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
else else
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
# http://www.gknw.net/development/mk_nlm/gcc_pre.zip
PRELUDE = $(NDK_ROOT)/pre/prelude.o
CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
endif endif
endif endif
@@ -106,14 +121,17 @@ SDK_CLIB = $(NDK_ROOT)/nwsdk
SDK_LIBC = $(NDK_ROOT)/libc SDK_LIBC = $(NDK_ROOT)/libc
ifeq ($(LIBARCH),LIBC) ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks INCLUDES += -I$(SDK_LIBC)/include
# INCLUDES += -I$(SDK_LIBC)/include/nks
# INCLUDES += -I$(SDK_LIBC)/include/winsock # INCLUDES += -I$(SDK_LIBC)/include/winsock
CFLAGS += -D_POSIX_SOURCE CFLAGS += -D_POSIX_SOURCE
# CFLAGS += -D__ANSIC__
else else
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include INCLUDES += -I$(SDK_CLIB)/include/nlm
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
CFLAGS += -DNETDB_USE_INTERNET # INCLUDES += -I$(SDK_CLIB)/include
endif
ifeq ($(DB),CURLDEBUG)
INCLUDES += -I../include
endif endif
CFLAGS += -I. $(INCLUDES) CFLAGS += -I. $(INCLUDES)
@@ -132,18 +150,19 @@ endif
# Makefile.inc provides the CSOURCES and HHEADERS defines # Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc include Makefile.inc
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) OBJLIB := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES)))
OBJEXE = $(OBJLIB) $(OBJDIR)/ares_getopt.o
.PHONY: lib nlm prebuild dist install clean .PHONY: lib nlm prebuild dist install clean
lib: prebuild $(LTARGET) lib: prebuild $(LTARGET)
nlm: prebuild $(TARGETS) nlm: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h
dist: all dist: all
-$(RM) $(OBJS) $(OBJDIR)/*.map $(OBJDIR)/*.ncv -$(RM) $(OBJLIB) $(OBJDIR)/*.map $(OBJDIR)/*.ncv
-$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc -$(RM) $(OBJDIR)/*.def $(OBJDIR)/*.xdc $(OBJDIR)/version.inc
install: $(INSTDIR) all install: $(INSTDIR) all
@@ -158,12 +177,15 @@ clean:
-$(RM) -r $(OBJDIR) -$(RM) -r $(OBJDIR)
-$(RM) -r arpa -$(RM) -r arpa
%.$(LIBEXT): $(OBJS) %.$(LIBEXT): $(OBJLIB)
@echo Creating $@ @echo Creating $@
@-$(RM) $@ @-$(RM) $@
@$(AR) $(ARFLAGS) $@ $^ @$(AR) $(ARFLAGS) $@ $^
ifdef RANLIB
@$(RANLIB) $@
endif
%.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJS) %.nlm: $(OBJDIR)/%.def $(OBJDIR)/%.o $(OBJDIR)/%.xdc $(OBJEXE)
@echo Linking $@ @echo Linking $@
@-$(RM) $@ @-$(RM) $@
@$(LD) $(LDFLAGS) $< @$(LD) $(LDFLAGS) $<
@@ -180,7 +202,7 @@ $(OBJDIR)/%.o: %.c
$(OBJDIR)/version.inc: ares_version.h $(OBJDIR) $(OBJDIR)/version.inc: ares_version.h $(OBJDIR)
@echo Creating $@ @echo Creating $@
@awk -f ../packages/NetWare/get_ver.awk $< > $@ @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
$(OBJDIR)/%.xdc: Makefile.netware $(OBJDIR)/%.xdc: Makefile.netware
@echo Creating $@ @echo Creating $@
@@ -247,7 +269,7 @@ ifdef IMPORTS
@echo $(DL)import $(IMPORTS)$(DL) >> $@ @echo $(DL)import $(IMPORTS)$(DL) >> $@
endif endif
ifeq ($(LD),nlmconv) ifeq ($(LD),nlmconv)
@echo $(DL)input $(OBJS)$(DL) >> $@ @echo $(DL)input $(OBJEXE)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@ @echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@ @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
endif endif
@@ -261,25 +283,77 @@ config.h: Makefile.netware
@echo $(DL)#ifndef NETWARE$(DL) >> $@ @echo $(DL)#ifndef NETWARE$(DL) >> $@
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
@echo $(DL)#endif$(DL) >> $@ @echo $(DL)#endif$(DL) >> $@
@echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
@echo $(DL)#define VERSION "$(LIBCARES_VERSION_STR)"$(DL) >> $@ @echo $(DL)#define VERSION "$(LIBCARES_VERSION_STR)"$(DL) >> $@
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@ @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ ifeq ($(LIBARCH),CLIB)
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@ @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@ @echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@
@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
@echo $(DL)#define DL_LDAP_FILE "ldapsdk.nlm"$(DL) >> $@
@echo $(DL)#define socklen_t int$(DL) >> $@
@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@
@echo $(DL)#define strcasecmp stricmp$(DL) >> $@
else
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@ @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@ @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@ @echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@ @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@ @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
@echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
@echo $(DL)#define DL_LDAP_FILE "lldapsdk.nlm"$(DL) >> $@
endif
@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@ @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
@@ -290,46 +364,26 @@ config.h: Makefile.netware
@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@ @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@ @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@ @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
@echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@ @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
@echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@ @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
@echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
@echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
@echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@ @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@ @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@ @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@ @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
@echo $(DL)#define HAVE_UNAME 1$(DL) >> $@ @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@ @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@ @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@ @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
ifdef NW_WINSOCK ifdef NW_WINSOCK
@echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@ @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
else else

View File

@@ -124,11 +124,11 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
@echo ares_gettimeofday >> $@ @echo ares_gettimeofday >> $@
@echo ares_parse_aaaa_reply >> $@ @echo ares_parse_aaaa_reply >> $@
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS) link $(LDFLAGS) -out:$@ $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib adig.exe: $(OBJ_DIR) $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\getopt.obj cares_imp.lib $(EX_LIBS) link $(LDFLAGS) -out:$@ $(OBJ_DIR)\adig.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib $(EX_LIBS)
clean: clean:
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map - del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
@@ -216,7 +216,7 @@ $(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \ setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
ares_ipv6.h ares_ipv6.h
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \ $(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \ $(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
@@ -229,3 +229,5 @@ $(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \ $(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
ares_ipv6.h inet_ntop.h ares_ipv6.h inet_ntop.h
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h

9
ares/RELEASE-NOTES Normal file
View File

@@ -0,0 +1,9 @@
This is what's new and changed in the c-ares 1.4.1 release:
o
Thanks go to these friendly people for their efforts and contributions:
Have fun!

View File

@@ -32,9 +32,6 @@
#endif #endif
#include <netdb.h> #include <netdb.h>
#endif #endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -45,6 +42,7 @@
#include "ares.h" #include "ares.h"
#include "ares_dns.h" #include "ares_dns.h"
#include "inet_ntop.h" #include "inet_ntop.h"
#include "ares_getopt.h"
#ifdef WATT32 #ifdef WATT32
#undef WIN32 /* Redefined in MingW headers */ #undef WIN32 /* Redefined in MingW headers */
@@ -55,11 +53,6 @@
#define T_SRV 33 /* server selection */ #define T_SRV 33 /* server selection */
#endif #endif
#ifndef optind
extern int optind;
extern char *optarg;
#endif
struct nv { struct nv {
const char *name; const char *name;
int value; int value;
@@ -163,7 +156,7 @@ int main(int argc, char **argv)
options.flags = ARES_FLAG_NOCHECKRESP; options.flags = ARES_FLAG_NOCHECKRESP;
options.servers = NULL; options.servers = NULL;
options.nservers = 0; options.nservers = 0;
while ((c = getopt(argc, argv, "df:s:c:t:T:U:")) != -1) while ((c = ares_getopt(argc, argv, "df:s:c:t:T:U:")) != -1)
{ {
switch (c) switch (c)
{ {

View File

@@ -34,19 +34,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "ares.h" #include "ares.h"
#include "ares_dns.h" #include "ares_dns.h"
#include "inet_ntop.h" #include "inet_ntop.h"
#include "inet_net_pton.h" #include "inet_net_pton.h"
#include "ares_getopt.h"
#ifndef optind
extern int optind;
extern char *optarg;
#endif
#ifndef HAVE_STRUCT_IN6_ADDR #ifndef HAVE_STRUCT_IN6_ADDR
struct in6_addr struct in6_addr
@@ -73,7 +65,7 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData); WSAStartup(wVersionRequested, &wsaData);
#endif #endif
while ((c = getopt(argc,argv,"dt:h")) != -1) while ((c = ares_getopt(argc,argv,"dt:h")) != -1)
{ {
switch (c) switch (c)
{ {

View File

@@ -20,12 +20,15 @@
#include <sys/types.h> #include <sys/types.h>
#if defined(_AIX) || defined(NETWARE) #if defined(_AIX) || (defined(NETWARE) && defined(__NOVELL_LIBC__))
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
libc5-based Linux systems. Only include it on system that are known to libc5-based Linux systems. Only include it on system that are known to
require it! */ require it! */
#include <sys/select.h> #include <sys/select.h>
#endif #endif
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
#include <sys/bsdskt.h>
#endif
#if defined(WATT32) #if defined(WATT32)
#include <netinet/in.h> #include <netinet/in.h>
@@ -94,6 +97,7 @@ extern "C" {
#define ARES_OPT_DOMAINS (1 << 7) #define ARES_OPT_DOMAINS (1 << 7)
#define ARES_OPT_LOOKUPS (1 << 8) #define ARES_OPT_LOOKUPS (1 << 8)
#define ARES_OPT_SOCK_STATE_CB (1 << 9) #define ARES_OPT_SOCK_STATE_CB (1 << 9)
#define ARES_OPT_SORTLIST (1 << 10)
/* Nameinfo flag values */ /* Nameinfo flag values */
#define ARES_NI_NOFQDN (1 << 0) #define ARES_NI_NOFQDN (1 << 0)
@@ -136,6 +140,22 @@ extern "C" {
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \ #define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
ARES_GETSOCK_MAXNUM))) ARES_GETSOCK_MAXNUM)))
/*
* Typedef our socket type
*/
#ifndef ares_socket_typedef
#ifdef WIN32
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else
typedef int ares_socket_t;
#define ARES_SOCKET_BAD -1
#endif
#define ares_socket_typedef
#endif /* ares_socket_typedef */
#ifdef WIN32 #ifdef WIN32
typedef void (*ares_sock_state_cb)(void *data, typedef void (*ares_sock_state_cb)(void *data,
SOCKET socket, SOCKET socket,
@@ -148,6 +168,8 @@ typedef void (*ares_sock_state_cb)(void *data,
int writable); int writable);
#endif #endif
struct apattern;
struct ares_options { struct ares_options {
int flags; int flags;
int timeout; int timeout;
@@ -162,6 +184,8 @@ struct ares_options {
char *lookups; char *lookups;
ares_sock_state_cb sock_state_cb; ares_sock_state_cb sock_state_cb;
void *sock_state_cb_data; void *sock_state_cb_data;
struct apattern *sortlist;
int nsort;
}; };
struct hostent; struct hostent;
@@ -179,6 +203,8 @@ typedef void (*ares_nameinfo_callback)(void *arg, int status,
int ares_init(ares_channel *channelptr); int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options, int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int optmask); int optmask);
int ares_save_options(ares_channel channel, struct ares_options *options, int *optmask);
void ares_destroy_options(struct ares_options *options);
void ares_destroy(ares_channel channel); void ares_destroy(ares_channel channel);
void ares_cancel(ares_channel channel); void ares_cancel(ares_channel channel);
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
@@ -200,6 +226,8 @@ int ares_getsock(ares_channel channel, int *socks, int numsocks);
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
struct timeval *tv); struct timeval *tv);
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds); void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
void ares_process_fd(ares_channel channel, ares_socket_t read_fd,
ares_socket_t write_fd);
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
int rd, unsigned char **buf, int *buflen); int rd, unsigned char **buf, int *buflen);

View File

@@ -183,6 +183,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
free(hostent->h_addr_list); free(hostent->h_addr_list);
free(hostent); free(hostent);
} }
*host = NULL;
return ARES_ENOMEM; return ARES_ENOMEM;
} }

View File

@@ -20,6 +20,19 @@
#include "ares.h" #include "ares.h"
#include "ares_private.h" #include "ares_private.h"
void ares_destroy_options(struct ares_options *options)
{
int i;
free(options->servers);
for (i = 0; i < options->ndomains; i++)
free(options->domains[i]);
free(options->domains);
if(options->sortlist)
free(options->sortlist);
free(options->lookups);
}
void ares_destroy(ares_channel channel) void ares_destroy(ares_channel channel)
{ {
int i; int i;

View File

@@ -0,0 +1,39 @@
.\" $Id$
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\"
.\" Permission to use, copy, modify, and distribute this
.\" software and its documentation for any purpose and without
.\" fee is hereby granted, provided that the above copyright
.\" notice appear in all copies and that both that copyright
.\" notice and this permission notice appear in supporting
.\" documentation, and that the name of M.I.T. not be used in
.\" advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.
.\" M.I.T. makes no representations about the suitability of
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_DESTROY_OPTIONS 3 "1 June 2007"
.SH NAME
ares_destroy_options \- Destroy options initialized with ares_save_options
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B void ares_destroy_options(struct ares_options *\fIoptions\fP)
.fi
.SH DESCRIPTION
The
.B ares_destroy_options
function destroys the options struct identified by
.IR options ,
freeing all memory allocated by ares_save_options.
.SH SEE ALSO
.BR ares_save_options (3),
.BR ares_init_options (3)
.SH AUTHOR
Brad House
.br
Copyright 1998 by the Massachusetts Institute of Technology.

View File

@@ -33,12 +33,13 @@ allocated by one of the functions \fIares_parse_a_reply(3)\fP,
.SH NOTES .SH NOTES
It is not necessary (and is not correct) to free the host structure passed to It is not necessary (and is not correct) to free the host structure passed to
the callback functions for \fIares_gethostbyname(3)\fP or the callback functions for \fIares_gethostbyname(3)\fP or
\fIares_gethostbyaddr(3)\fP. The ares library will automatically free such \fIares_gethostbyaddr(3)\fP. c-ares will automatically free such host
host structures when the callback returns. structures when the callback returns.
.SH SEE ALSO .SH SEE ALSO
.BR ares_parse_a_reply (3), .BR ares_parse_a_reply (3),
.BR ares_parse_aaaa_reply (3), .BR ares_parse_aaaa_reply (3),
.BR ares_parse_ptr_reply (3) .BR ares_parse_ptr_reply (3),
.BR ares_parse_ns_reply (3)
.SH AUTHOR .SH AUTHOR
Greg Hudson, MIT Information Systems Greg Hudson, MIT Information Systems
.br .br

View File

@@ -33,7 +33,8 @@ void ares_free_hostent(struct hostent *host)
for (p = host->h_aliases; *p; p++) for (p = host->h_aliases; *p; p++)
free(*p); free(*p);
free(host->h_aliases); free(host->h_aliases);
free(host->h_addr_list[0]); free(host->h_addr_list[0]); /* no matter if there is one or many entries,
there is only one malloc for all of them */
free(host->h_addr_list); free(host->h_addr_list);
free(host); free(host);
} }

View File

@@ -295,7 +295,11 @@ static char *lookup_service(unsigned short port, int flags,
#endif #endif
#else #else
/* Lets just hope the OS uses TLS! */ /* Lets just hope the OS uses TLS! */
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
sep = getservbyport(port, (char*)proto);
#else
sep = getservbyport(port, proto); sep = getservbyport(port, proto);
#endif
#endif #endif
} }
if (sep && sep->s_name) if (sep && sep->s_name)

123
ares/ares_getopt.c Normal file
View File

@@ -0,0 +1,123 @@
/*
* Original file name getopt.c Initial import into the c-ares source tree
* on 2007-04-11. Lifted from version 5.2 of the 'Open Mash' project with
* the modified BSD license, BSD license without the advertising clause.
*
* $Id$
*/
/*
* getopt.c --
*
* Standard UNIX getopt function. Code is from BSD.
*
* Copyright (c) 1987-2001 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* A. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* B. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* C. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/* #if !defined(lint)
* static char sccsid[] = "@(#)getopt.c 8.2 (Berkeley) 4/2/94";
* #endif
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ares_getopt.h"
int opterr = 1, /* if error message should be printed */
optind = 1, /* index into parent argv vector */
optopt, /* character checked for validity */
optreset; /* reset getopt */
char *optarg; /* argument associated with option */
#define BADCH (int)'?'
#define BADARG (int)':'
#define EMSG (char *)""
/*
* ares_getopt --
* Parse argc/argv argument vector.
*/
int
ares_getopt(int nargc, char * const nargv[], const char *ostr)
{
static char *place = EMSG; /* option letter processing */
char *oli; /* option letter list index */
if (optreset || !*place) { /* update scanning pointer */
optreset = 0;
if (optind >= nargc || *(place = nargv[optind]) != '-') {
place = EMSG;
return (EOF);
}
if (place[1] && *++place == '-') { /* found "--" */
++optind;
place = EMSG;
return (EOF);
}
} /* option letter okay? */
if ((optopt = (int)*place++) == (int)':' ||
!(oli = strchr(ostr, optopt))) {
/*
* if the user didn't specify '-' as an option,
* assume it means EOF.
*/
if (optopt == (int)'-')
return (EOF);
if (!*place)
++optind;
if (opterr && *ostr != ':')
(void)fprintf(stderr,
"%s: illegal option -- %c\n", __FILE__, optopt);
return (BADCH);
}
if (*++oli != ':') { /* don't need argument */
optarg = NULL;
if (!*place)
++optind;
}
else { /* need an argument */
if (*place) /* no white space */
optarg = place;
else if (nargc <= ++optind) { /* no arg */
place = EMSG;
if (*ostr == ':')
return (BADARG);
if (opterr)
(void)fprintf(stderr,
"%s: option requires an argument -- %c\n",
__FILE__, optopt);
return (BADCH);
}
else /* white space */
optarg = nargv[optind];
place = EMSG;
++optind;
}
return (optopt); /* dump back option letter */
}

41
ares/ares_getopt.h Normal file
View File

@@ -0,0 +1,41 @@
#ifndef ARES_GETOPT_H
#define ARES_GETOPT_H
/*
* Copyright (c) 1987-2001 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* A. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* B. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* C. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
int ares_getopt(int nargc, char * const nargv[], const char *ostr);
extern char *optarg;
extern int optind;
extern int opterr;
#endif /* ARES_GETOPT_H */

View File

@@ -23,7 +23,10 @@
#include <malloc.h> #include <malloc.h>
#else #else
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>
#endif
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
@@ -61,7 +64,7 @@
#undef WIN32 /* Redefined in MingW/MSVC headers */ #undef WIN32 /* Redefined in MingW/MSVC headers */
#endif #endif
static int init_by_options(ares_channel channel, struct ares_options *options, static int init_by_options(ares_channel channel, const struct ares_options *options,
int optmask); int optmask);
static int init_by_environment(ares_channel channel); static int init_by_environment(ares_channel channel);
static int init_by_resolv_conf(ares_channel channel); static int init_by_resolv_conf(ares_channel channel);
@@ -72,6 +75,8 @@ static int config_nameserver(struct server_state **servers, int *nservers,
static int set_search(ares_channel channel, const char *str); static int set_search(ares_channel channel, const char *str);
static int set_options(ares_channel channel, const char *str); static int set_options(ares_channel channel, const char *str);
static const char *try_option(const char *p, const char *q, const char *opt); static const char *try_option(const char *p, const char *q, const char *opt);
static void init_id_key(rc4_key* key,int key_data_len);
#ifndef WIN32 #ifndef WIN32
static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat); static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
static int ip_addr(const char *s, int len, struct in_addr *addr); static int ip_addr(const char *s, int len, struct in_addr *addr);
@@ -84,6 +89,12 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
static char *try_config(char *s, const char *opt); static char *try_config(char *s, const char *opt);
#endif #endif
#define ARES_CONFIG_CHECK(x) (x->lookups && x->nsort > -1 && \
x->nservers > -1 && \
x->ndomains > -1 && \
x->ndots > -1 && x->timeout > -1 && \
x->tries > -1)
int ares_init(ares_channel *channelptr) int ares_init(ares_channel *channelptr)
{ {
return ares_init_options(channelptr, NULL, 0); return ares_init_options(channelptr, NULL, 0);
@@ -96,7 +107,6 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int i; int i;
int status = ARES_SUCCESS; int status = ARES_SUCCESS;
struct server_state *server; struct server_state *server;
struct timeval tv;
#ifdef CURLDEBUG #ifdef CURLDEBUG
const char *env = getenv("CARES_MEMDEBUG"); const char *env = getenv("CARES_MEMDEBUG");
@@ -197,22 +207,85 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
server->qtail = NULL; server->qtail = NULL;
} }
/* Choose a somewhat random query ID. The main point is to avoid init_id_key(&channel->id_key, ARES_ID_KEY_LEN);
* collisions with stale queries. An attacker trying to spoof a DNS
* answer also has to guess the query ID, but it's only a 16-bit
* field, so there's not much to be done about that.
*/
gettimeofday(&tv, NULL);
channel->next_id = (unsigned short)
((tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff);
channel->next_id = ares__generate_new_id(&channel->id_key);
channel->queries = NULL; channel->queries = NULL;
*channelptr = channel; *channelptr = channel;
return ARES_SUCCESS; return ARES_SUCCESS;
} }
static int init_by_options(ares_channel channel, struct ares_options *options, /* Save options from initialized channel */
int ares_save_options(ares_channel channel, struct ares_options *options,
int *optmask)
{
int i;
/* Zero everything out */
memset(options, 0, sizeof(struct ares_options));
if (!ARES_CONFIG_CHECK(channel))
return ARES_ENODATA;
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TIMEOUT|ARES_OPT_TRIES|ARES_OPT_NDOTS|
ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB|
ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS|
ARES_OPT_SORTLIST);
/* Copy easy stuff */
options->flags = channel->flags;
options->timeout = channel->timeout;
options->tries = channel->tries;
options->ndots = channel->ndots;
options->udp_port = channel->udp_port;
options->tcp_port = channel->tcp_port;
options->sock_state_cb = channel->sock_state_cb;
options->sock_state_cb_data = channel->sock_state_cb_data;
/* Copy servers */
options->servers =
malloc(channel->nservers * sizeof(struct server_state));
if (!options->servers && channel->nservers != 0)
return ARES_ENOMEM;
for (i = 0; i < channel->nservers; i++)
options->servers[i] = channel->servers[i].addr;
options->nservers = channel->nservers;
/* copy domains */
options->domains = malloc(channel->ndomains * sizeof(char *));
if (!options->domains)
return ARES_ENOMEM;
for (i = 0; i < channel->ndomains; i++)
{
options->ndomains = i;
options->domains[i] = strdup(channel->domains[i]);
if (!options->domains[i])
return ARES_ENOMEM;
}
options->ndomains = channel->ndomains;
/* copy lookups */
options->lookups = strdup(channel->lookups);
if (!options->lookups)
return ARES_ENOMEM;
/* copy sortlist */
options->sortlist = malloc(channel->nsort * sizeof(struct apattern));
if (!options->sortlist)
return ARES_ENOMEM;
for (i = 0; i < channel->nsort; i++)
{
memcpy(&(options->sortlist[i]), &(channel->sortlist[i]),
sizeof(struct apattern));
}
options->nsort = channel->nsort;
return ARES_SUCCESS;
}
static int init_by_options(ares_channel channel,
const struct ares_options *options,
int optmask) int optmask)
{ {
int i; int i;
@@ -282,6 +355,19 @@ static int init_by_options(ares_channel channel, struct ares_options *options,
return ARES_ENOMEM; return ARES_ENOMEM;
} }
/* copy sortlist */
if ((optmask & ARES_OPT_SORTLIST) && channel->nsort == -1)
{
channel->sortlist = malloc(options->nsort * sizeof(struct apattern));
if (!channel->sortlist)
return ARES_ENOMEM;
for (i = 0; i < options->nsort; i++)
{
memcpy(&(channel->sortlist[i]), &(options->sortlist[i]), sizeof(struct apattern));
}
channel->nsort = options->nsort;
}
return ARES_SUCCESS; return ARES_SUCCESS;
} }
@@ -555,6 +641,10 @@ DhcpNameServer
if (status == ARES_SUCCESS) if (status == ARES_SUCCESS)
status = ARES_EOF; status = ARES_EOF;
else
/* Catch the case when all the above checks fail (which happens when there
is no network card or the cable is unplugged) */
status = ARES_EFILE;
#elif defined(__riscos__) #elif defined(__riscos__)
@@ -611,6 +701,10 @@ DhcpNameServer
int linesize; int linesize;
int error; int error;
/* Don't read resolv.conf and friends if we don't have to */
if (ARES_CONFIG_CHECK(channel))
return ARES_SUCCESS;
fp = fopen(PATH_RESOLV_CONF, "r"); fp = fopen(PATH_RESOLV_CONF, "r");
if (fp) { if (fp) {
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
@@ -968,7 +1062,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
ipbufpfx[0] = '\0'; ipbufpfx[0] = '\0';
/* Lets see if it is CIDR */ /* Lets see if it is CIDR */
/* First we'll try IPv6 */ /* First we'll try IPv6 */
if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx ? ipbufpfx : ipbuf, if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx[0] ? ipbufpfx : ipbuf,
&pat.addr.addr6, &pat.addr.addr6,
sizeof(pat.addr.addr6))) > 0) sizeof(pat.addr.addr6))) > 0)
{ {
@@ -978,7 +1072,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
if (!sortlist_alloc(sortlist, nsort, &pat)) if (!sortlist_alloc(sortlist, nsort, &pat))
return ARES_ENOMEM; return ARES_ENOMEM;
} }
if (ipbufpfx && if (ipbufpfx[0] &&
(bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4, (bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4,
sizeof(pat.addr.addr4))) > 0) sizeof(pat.addr.addr4))) > 0)
{ {
@@ -991,7 +1085,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
/* See if it is just a regular IP */ /* See if it is just a regular IP */
else if (ip_addr(ipbuf, (int)(q-str), &pat.addr.addr4) == 0) else if (ip_addr(ipbuf, (int)(q-str), &pat.addr.addr4) == 0)
{ {
if (ipbufpfx) if (ipbufpfx[0])
{ {
memcpy(ipbuf, str, (int)(q-str)); memcpy(ipbuf, str, (int)(q-str));
ipbuf[(int)(q-str)] = '\0'; ipbuf[(int)(q-str)] = '\0';
@@ -1175,3 +1269,80 @@ static void natural_mask(struct apattern *pat)
pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET); pat->mask.addr.addr4.s_addr = htonl(IN_CLASSC_NET);
} }
#endif #endif
/* initialize an rc4 key. If possible a cryptographically secure random key
is generated using a suitable function (for example win32's RtlGenRandom as
described in
http://blogs.msdn.com/michael_howard/archive/2005/01/14/353379.aspx
otherwise the code defaults to cross-platform albeit less secure mechanism
using rand
*/
static void randomize_key(unsigned char* key,int key_data_len)
{
int randomized = 0;
int counter=0;
#ifdef WIN32
HMODULE lib=LoadLibrary("ADVAPI32.DLL");
if (lib) {
BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
(BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(lib,"SystemFunction036");
if (pfn && pfn(key,key_data_len) )
randomized = 1;
FreeLibrary(lib);
}
#else /* !WIN32 */
#ifdef RANDOM_FILE
char buffer[256];
FILE *f = fopen(RANDOM_FILE, "rb");
if(f) {
size_t i;
size_t rc = fread(buffer, key_data_len, 1, f);
for(i=0; i<rc && counter < key_data_len; i++)
key[counter++]=buffer[i];
fclose(f);
}
#endif
#endif /* WIN32 */
if ( !randomized ) {
for (;counter<key_data_len;counter++)
key[counter]=rand() % 256;
}
}
static void init_id_key(rc4_key* key,int key_data_len)
{
unsigned char index1;
unsigned char index2;
unsigned char* state;
short counter;
unsigned char *key_data_ptr = 0;
key_data_ptr = calloc(1,key_data_len);
randomize_key(key->state,key_data_len);
state = &key->state[0];
for(counter = 0; counter < 256; counter++)
/* unnecessary AND but it keeps some compilers happier */
state[counter] = counter & 0xff;
key->x = 0;
key->y = 0;
index1 = 0;
index2 = 0;
for(counter = 0; counter < 256; counter++)
{
index2 = (key_data_ptr[index1] + state[counter] +
index2) % 256;
ARES_SWAP_BYTE(&state[counter], &state[index2]);
index1 = (index1 + 1) % key_data_len;
}
free(key_data_ptr);
}
short ares__generate_new_id(rc4_key* key)
{
short r=0;
ares__rc4(key, (unsigned char *)&r, sizeof(r));
return r;
}

View File

@@ -80,6 +80,8 @@
#endif #endif
#define ARES_ID_KEY_LEN 31
#include "ares_ipv6.h" #include "ares_ipv6.h"
struct send_request { struct send_request {
@@ -156,6 +158,13 @@ struct apattern {
unsigned short type; unsigned short type;
}; };
typedef struct rc4_key
{
unsigned char state[256];
unsigned char x;
unsigned char y;
} rc4_key;
struct ares_channeldata { struct ares_channeldata {
/* Configuration data */ /* Configuration data */
int flags; int flags;
@@ -176,6 +185,8 @@ struct ares_channeldata {
/* ID to use for next query */ /* ID to use for next query */
unsigned short next_id; unsigned short next_id;
/* key to use when generating new ids */
rc4_key id_key;
/* Active queries */ /* Active queries */
struct query *queries; struct query *queries;
@@ -184,10 +195,15 @@ struct ares_channeldata {
void *sock_state_cb_data; void *sock_state_cb_data;
}; };
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
void ares__send_query(ares_channel channel, struct query *query, time_t now); void ares__send_query(ares_channel channel, struct query *query, time_t now);
void ares__close_sockets(ares_channel channel, struct server_state *server); void ares__close_sockets(ares_channel channel, struct server_state *server);
int ares__get_hostent(FILE *fp, int family, struct hostent **host); int ares__get_hostent(FILE *fp, int family, struct hostent **host);
int ares__read_line(FILE *fp, char **buf, int *bufsize); int ares__read_line(FILE *fp, char **buf, int *bufsize);
short ares__generate_new_id(rc4_key* key);
#define ARES_SWAP_BYTE(a,b) \
{ unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
#define SOCK_STATE_CALLBACK(c, s, r, w) \ #define SOCK_STATE_CALLBACK(c, s, r, w) \
do { \ do { \

View File

@@ -24,16 +24,16 @@ ares_process \- Process events for name resolution
.B void ares_process(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP, .B void ares_process(ares_channel \fIchannel\fP, fd_set *\fIread_fds\fP,
.B fd_set *\fIwrite_fds\fP) .B fd_set *\fIwrite_fds\fP)
.fi .fi
.PP
.B void ares_process_fd(ares_channel \fIchannel\fP,
.B ares_socket_t \fIread_fd\fP,
.B ares_socket_t \fIwrite_fd\fP)
.fi
.SH DESCRIPTION .SH DESCRIPTION
The The \fBares_process(3)\fP function handles input/output events and timeouts
.B ares_process associated with queries pending on the name service channel identified by
function handles input/output events and timeouts associated with
queries pending on the name service channel identified by
.IR channel . .IR channel .
The file descriptor sets pointed to by The file descriptor sets pointed to by \fIread_fds\fP and \fIwrite_fds\fP
.I read_fds
and
.I write_fds
should have file descriptors set in them according to whether the file should have file descriptors set in them according to whether the file
descriptors specified by \fIares_fds(3)\fP are ready for reading and writing. descriptors specified by \fIares_fds(3)\fP are ready for reading and writing.
(The easiest way to determine this information is to invoke (The easiest way to determine this information is to invoke
@@ -44,6 +44,11 @@ The
.B ares_process .B ares_process
function will invoke callbacks for pending queries if they complete function will invoke callbacks for pending queries if they complete
successfully or fail. successfully or fail.
\fBares_process_fd(3)\fP works the same way but acts and operates only on the
specific file descriptors (sockets) you pass in to the function. Use
ARES_SOCKET_BAD for "no action". This function is of course provided to allow
users of c-ares to void select() in their applications and within c-ares.
.SS EXAMPLE .SS EXAMPLE
The following code fragment waits for all pending queries on a channel The following code fragment waits for all pending queries on a channel
to complete: to complete:

View File

@@ -56,13 +56,14 @@
static int try_again(int errnum); static int try_again(int errnum);
static void write_tcp_data(ares_channel channel, fd_set *write_fds, static void write_tcp_data(ares_channel channel, fd_set *write_fds,
time_t now); ares_socket_t write_fd, time_t now);
static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now); static void read_tcp_data(ares_channel channel, fd_set *read_fds,
ares_socket_t read_fd, time_t now);
static void read_udp_packets(ares_channel channel, fd_set *read_fds, static void read_udp_packets(ares_channel channel, fd_set *read_fds,
time_t now); ares_socket_t read_fd, time_t now);
static void process_timeouts(ares_channel channel, time_t now); static void process_timeouts(ares_channel channel, time_t now);
static void process_answer(ares_channel channel, unsigned char *abuf, static void process_answer(ares_channel channel, unsigned char *abuf,
int alen, int whichserver, int tcp, int now); int alen, int whichserver, int tcp, time_t now);
static void handle_error(ares_channel channel, int whichserver, time_t now); static void handle_error(ares_channel channel, int whichserver, time_t now);
static struct query *next_server(ares_channel channel, struct query *query, time_t now); static struct query *next_server(ares_channel channel, struct query *query, time_t now);
static int open_tcp_socket(ares_channel channel, struct server_state *server); static int open_tcp_socket(ares_channel channel, struct server_state *server);
@@ -80,12 +81,30 @@ void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
time_t now; time_t now;
time(&now); time(&now);
write_tcp_data(channel, write_fds, now); write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, now);
read_tcp_data(channel, read_fds, now); read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, now);
read_udp_packets(channel, read_fds, now); read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, now);
process_timeouts(channel, now); process_timeouts(channel, now);
} }
/* Something interesting happened on the wire, or there was a timeout.
* See what's up and respond accordingly.
*/
void ares_process_fd(ares_channel channel,
ares_socket_t read_fd, /* use ARES_SOCKET_BAD or valid
file descriptors */
ares_socket_t write_fd)
{
time_t now;
time(&now);
write_tcp_data(channel, NULL, write_fd, now);
read_tcp_data(channel, NULL, read_fd, now);
read_udp_packets(channel, NULL, read_fd, now);
process_timeouts(channel, now);
}
/* Return 1 if the specified error number describes a readiness error, or 0 /* Return 1 if the specified error number describes a readiness error, or 0
* otherwise. This is mostly for HP-UX, which could return EAGAIN or * otherwise. This is mostly for HP-UX, which could return EAGAIN or
* EWOULDBLOCK. See this man page * EWOULDBLOCK. See this man page
@@ -114,7 +133,10 @@ static int try_again(int errnum)
/* If any TCP sockets select true for writing, write out queued data /* If any TCP sockets select true for writing, write out queued data
* we have for them. * we have for them.
*/ */
static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now) static void write_tcp_data(ares_channel channel,
fd_set *write_fds,
ares_socket_t write_fd,
time_t now)
{ {
struct server_state *server; struct server_state *server;
struct send_request *sendreq; struct send_request *sendreq;
@@ -124,14 +146,27 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
ssize_t wcount; ssize_t wcount;
size_t n; size_t n;
if(!write_fds && (write_fd == ARES_SOCKET_BAD))
/* no possible action */
return;
for (i = 0; i < channel->nservers; i++) for (i = 0; i < channel->nservers; i++)
{ {
/* Make sure server has data to send and is selected in write_fds. */ /* Make sure server has data to send and is selected in write_fds or
write_fd. */
server = &channel->servers[i]; server = &channel->servers[i];
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD)
|| !FD_ISSET(server->tcp_socket, write_fds))
continue; continue;
if(write_fds) {
if(!FD_ISSET(server->tcp_socket, write_fds))
continue;
}
else {
if(server->tcp_socket != write_fd)
continue;
}
/* Count the number of send queue items. */ /* Count the number of send queue items. */
n = 0; n = 0;
for (sendreq = server->qhead; sendreq; sendreq = sendreq->next) for (sendreq = server->qhead; sendreq; sendreq = sendreq->next)
@@ -218,20 +253,33 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
* allocate a buffer if we finish reading the length word, and process * allocate a buffer if we finish reading the length word, and process
* a packet if we finish reading one. * a packet if we finish reading one.
*/ */
static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now) static void read_tcp_data(ares_channel channel, fd_set *read_fds,
ares_socket_t read_fd, time_t now)
{ {
struct server_state *server; struct server_state *server;
int i; int i;
ssize_t count; ssize_t count;
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
/* no possible action */
return;
for (i = 0; i < channel->nservers; i++) for (i = 0; i < channel->nservers; i++)
{ {
/* Make sure the server has a socket and is selected in read_fds. */ /* Make sure the server has a socket and is selected in read_fds. */
server = &channel->servers[i]; server = &channel->servers[i];
if (server->tcp_socket == ARES_SOCKET_BAD || if (server->tcp_socket == ARES_SOCKET_BAD)
!FD_ISSET(server->tcp_socket, read_fds))
continue; continue;
if(read_fds) {
if(!FD_ISSET(server->tcp_socket, read_fds))
continue;
}
else {
if(server->tcp_socket != read_fd)
continue;
}
if (server->tcp_lenbuf_pos != 2) if (server->tcp_lenbuf_pos != 2)
{ {
/* We haven't yet read a length word, so read that (or /* We haven't yet read a length word, so read that (or
@@ -294,22 +342,34 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, time_t now)
/* If any UDP sockets select true for reading, process them. */ /* If any UDP sockets select true for reading, process them. */
static void read_udp_packets(ares_channel channel, fd_set *read_fds, static void read_udp_packets(ares_channel channel, fd_set *read_fds,
time_t now) ares_socket_t read_fd, time_t now)
{ {
struct server_state *server; struct server_state *server;
int i; int i;
ssize_t count; ssize_t count;
unsigned char buf[PACKETSZ + 1]; unsigned char buf[PACKETSZ + 1];
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
/* no possible action */
return;
for (i = 0; i < channel->nservers; i++) for (i = 0; i < channel->nservers; i++)
{ {
/* Make sure the server has a socket and is selected in read_fds. */ /* Make sure the server has a socket and is selected in read_fds. */
server = &channel->servers[i]; server = &channel->servers[i];
if (server->udp_socket == ARES_SOCKET_BAD || if (server->udp_socket == ARES_SOCKET_BAD)
!FD_ISSET(server->udp_socket, read_fds))
continue; continue;
if(read_fds) {
if(!FD_ISSET(server->udp_socket, read_fds))
continue;
}
else {
if(server->udp_socket != read_fd)
continue;
}
count = sread(server->udp_socket, buf, sizeof(buf)); count = sread(server->udp_socket, buf, sizeof(buf));
if (count == -1 && try_again(SOCKERRNO)) if (count == -1 && try_again(SOCKERRNO))
continue; continue;
@@ -338,9 +398,10 @@ static void process_timeouts(ares_channel channel, time_t now)
/* Handle an answer from a server. */ /* Handle an answer from a server. */
static void process_answer(ares_channel channel, unsigned char *abuf, static void process_answer(ares_channel channel, unsigned char *abuf,
int alen, int whichserver, int tcp, int now) int alen, int whichserver, int tcp, time_t now)
{ {
int id, tc, rcode; int tc, rcode;
unsigned short id;
struct query *query; struct query *query;
/* If there's no room in the answer for a header, we can't do much /* If there's no room in the answer for a header, we can't do much

View File

@@ -39,6 +39,64 @@ struct qquery {
static void qcallback(void *arg, int status, unsigned char *abuf, int alen); static void qcallback(void *arg, int status, unsigned char *abuf, int alen);
void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
{
unsigned char x;
unsigned char y;
unsigned char* state;
unsigned char xorIndex;
short counter;
x = key->x;
y = key->y;
state = &key->state[0];
for(counter = 0; counter < buffer_len; counter ++)
{
x = (x + 1) % 256;
y = (state[x] + y) % 256;
ARES_SWAP_BYTE(&state[x], &state[y]);
xorIndex = (state[x] + state[y]) % 256;
buffer_ptr[counter] ^= state[xorIndex];
}
key->x = x;
key->y = y;
}
static struct query* find_query_by_id(ares_channel channel, int id)
{
unsigned short qid;
struct query* q;
DNS_HEADER_SET_QID(((unsigned char*)&qid), id);
/* Find the query corresponding to this packet. */
for (q = channel->queries; q; q = q->next)
{
if (q->qid == qid)
return q;
}
return NULL;
}
/* a unique query id is generated using an rc4 key. Since the id may already
be used by a running query (as infrequent as it may be), a lookup is
performed per id generation. In practice this search should happen only
once per newly generated id
*/
static int generate_unique_id(ares_channel channel)
{
int id;
do {
id = ares__generate_new_id(&channel->id_key);
} while (find_query_by_id(channel,id));
return id;
}
void ares_query(ares_channel channel, const char *name, int dnsclass, void ares_query(ares_channel channel, const char *name, int dnsclass,
int type, ares_callback callback, void *arg) int type, ares_callback callback, void *arg)
{ {
@@ -50,13 +108,14 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
rd = !(channel->flags & ARES_FLAG_NORECURSE); rd = !(channel->flags & ARES_FLAG_NORECURSE);
status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf, status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf,
&qlen); &qlen);
channel->next_id++;
if (status != ARES_SUCCESS) if (status != ARES_SUCCESS)
{ {
callback(arg, status, NULL, 0); callback(arg, status, NULL, 0);
return; return;
} }
channel->next_id = generate_unique_id(channel);
/* Allocate and fill in the query structure. */ /* Allocate and fill in the query structure. */
qquery = malloc(sizeof(struct qquery)); qquery = malloc(sizeof(struct qquery));
if (!qquery) if (!qquery)

49
ares/ares_save_options.3 Normal file
View File

@@ -0,0 +1,49 @@
.\" $Id$
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\"
.\" Permission to use, copy, modify, and distribute this
.\" software and its documentation for any purpose and without
.\" fee is hereby granted, provided that the above copyright
.\" notice appear in all copies and that both that copyright
.\" notice and this permission notice appear in supporting
.\" documentation, and that the name of M.I.T. not be used in
.\" advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.
.\" M.I.T. makes no representations about the suitability of
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_SAVE_OPTIONS 3 "1 June 2007"
.SH NAME
ares_save_options \- Save configuration values obtained from initialized ares_channel
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B void ares_save_options(ares_channel \fIchannel\fP, struct ares_options *\fIoptions\fP, int *\fIoptmask\fP)
.fi
.SH DESCRIPTION
The
.B ares_save_options
function saves the channel data identified by
.IR channel ,
into the options struct identified by
.IR options ,
and saves the mask of options which are set to the integer
pointer (passed by reference) identified by
.IR optmask .
The resultant options and optmask are then able to be
passed directly to ares_init_options. When the options
are no longer needed, ares_destroy_options should be called
to free any associated memory.
.SH SEE ALSO
.BR ares_destroy_options (3),
.BR ares_init_options (3)
.SH AUTHOR
Brad House
.br
Copyright 1998 by the Massachusetts Institute of Technology.

View File

@@ -31,7 +31,8 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
{ {
struct query *query; struct query *query;
time_t now; time_t now;
int offset, min_offset; time_t offset, min_offset; /* these use time_t since some 32 bit systems
still use 64 bit time_t! (like VS2005) */
/* No queries, no timeout (and no fetch of the current time). */ /* No queries, no timeout (and no fetch of the current time). */
if (!channel->queries) if (!channel->queries)
@@ -57,7 +58,7 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
*/ */
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec)) if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
{ {
tvbuf->tv_sec = min_offset; tvbuf->tv_sec = (long)min_offset;
tvbuf->tv_usec = 0; tvbuf->tv_usec = 0;
return tvbuf; return tvbuf;
} }

View File

@@ -4,12 +4,12 @@
#define ARES__VERSION_H #define ARES__VERSION_H
#define ARES_VERSION_MAJOR 1 #define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 3 #define ARES_VERSION_MINOR 4
#define ARES_VERSION_PATCH 3 #define ARES_VERSION_PATCH 1
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH)) (ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.3.3-CVS" #define ARES_VERSION_STR "1.4.1-CVS"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -337,6 +337,7 @@ AC_CHECK_HEADERS(
sys/select.h \ sys/select.h \
sys/socket.h \ sys/socket.h \
sys/ioctl.h \ sys/ioctl.h \
sys/param.h \
netdb.h \ netdb.h \
netinet/in.h \ netinet/in.h \
net/if.h \ net/if.h \
@@ -600,6 +601,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
AC_CHECK_FUNCS( bitncmp \ AC_CHECK_FUNCS( bitncmp \
gettimeofday \
if_indextoname, if_indextoname,
dnl if found dnl if found
[], [],
@@ -785,4 +787,20 @@ AC_C_BIGENDIAN(
[AC_MSG_WARN([couldn't figure out endianess, assuming little endian!])] [AC_MSG_WARN([couldn't figure out endianess, assuming little endian!])]
) )
AC_OUTPUT(Makefile) dnl Check for user-specified random device
AC_ARG_WITH(random,
AC_HELP_STRING([--with-random=FILE],
[read randomness from FILE (default=/dev/urandom)]),
[ RANDOM_FILE="$withval" ],
[
dnl Check for random device
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
]
)
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
AC_SUBST(RANDOM_FILE)
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
[a suitable file/device to read random data from])
fi
AC_OUTPUT(Makefile libcares.pc)

20
ares/libcares.pc.in Normal file
View File

@@ -0,0 +1,20 @@
#***************************************************************************
# Project ___ __ _ _ __ ___ ___
# / __|____ / _` | '__/ _ \/ __|
# | (_|_____| (_| | | | __/\__ \
# \___| \__,_|_| \___||___/
# $id: $
#
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: c-ares
URL: http://daniel.haxx.se/projects/c-ares/
Description: asyncronous DNS lookup library
Version: @VERSION@
Requires:
Requires.private:
Cflags: -I${includedir}
Libs: -L${libdir} -lcares

View File

@@ -32,7 +32,9 @@ struct iovec
int ares_writev (SOCKET s, const struct iovec *vector, size_t count); int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
#define writev(s,vect,count) ares_writev(s,vect,count) #define writev(s,vect,count) ares_writev(s,vect,count)
#ifndef HAVE_GETTIMEOFDAY
struct timezone { int dummy; }; struct timezone { int dummy; };
#endif
int ares_gettimeofday(struct timeval *tv, struct timezone *tz); int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz) #define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)

View File

@@ -3,7 +3,7 @@
/* $Id$ */ /* $Id$ */
/* Copyright (C) 2004 - 2005 by Daniel Stenberg et al /* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
* *
* Permission to use, copy, modify, and distribute this software and its * Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided * documentation for any purpose and without fee is hereby granted, provided
@@ -117,18 +117,6 @@
#undef VERSION #undef VERSION
#undef PACKAGE #undef PACKAGE
/*
* Typedef our socket type
*/
#ifdef USE_WINSOCK
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else
typedef int ares_socket_t;
#define ARES_SOCKET_BAD -1
#endif
/* /*
* Assume a few thing unless they're set by configure * Assume a few thing unless they're set by configure
*/ */
@@ -156,6 +144,11 @@ int ares_strcasecmp(const char *s1, const char *s2);
same */ same */
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c) #define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
#define strcasecmp(a,b) ares_strcasecmp(a,b) #define strcasecmp(a,b) ares_strcasecmp(a,b)
#ifdef _MSC_VER
# if _MSC_VER >= 1400
# define strdup(a) _strdup(a)
# endif
#endif
#endif #endif
/* IPv6 compatibility */ /* IPv6 compatibility */

View File

@@ -337,5 +337,26 @@ typedef int sig_atomic_t;
#endif #endif
/*
* Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
*/
#if defined(VMS) && \
defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#define getpwuid __32_getpwuid
#endif
/*
* Macro argv_item_t hides platform details to code using it.
*/
#ifdef VMS
#define argv_item_t __char_ptr32
#else
#define argv_item_t char *
#endif
#endif /* __SETUP_ONCE_H */ #endif /* __SETUP_ONCE_H */

View File

@@ -49,7 +49,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" # ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
!ELSEIF "$(CFG)" == "adig - Win32 Debug" !ELSEIF "$(CFG)" == "adig - Win32 Debug"
@@ -65,15 +65,15 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" # ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
!ENDIF !ENDIF
@@ -91,12 +91,16 @@ SOURCE=..\..\adig.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\getopt.c SOURCE=..\..\ares_getopt.c
# End Source File # End Source File
# End Group # End Group
# Begin Group "Header Files" # Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl" # PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\ares_getopt.h
# End Source File
# End Group # End Group
# Begin Group "Resource Files" # Begin Group "Resource Files"

View File

@@ -7,19 +7,19 @@
CFG=ahost - Win32 Debug CFG=ahost - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "ahost.mak". !MESSAGE NMAKE /f "ahost.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "ahost.mak" CFG="ahost - Win32 Debug" !MESSAGE NMAKE /f "ahost.mak" CFG="ahost - Win32 Debug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "ahost - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "ahost - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "ahost - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE "ahost - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
@@ -48,7 +48,7 @@ BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" # ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
!ELSEIF "$(CFG)" == "ahost - Win32 Debug" !ELSEIF "$(CFG)" == "ahost - Win32 Debug"
@@ -63,18 +63,18 @@ LINK32=link.exe
# PROP Output_Dir "Debug" # PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug" # PROP Intermediate_Dir "Debug"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" # ADD LINK32 wsock32.lib areslib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
!ENDIF !ENDIF
# Begin Target # Begin Target
@@ -87,10 +87,18 @@ LINK32=link.exe
SOURCE=..\..\ahost.c SOURCE=..\..\ahost.c
# End Source File # End Source File
# Begin Source File
SOURCE=..\..\ares_getopt.c
# End Source File
# End Group # End Group
# Begin Group "Header Files" # Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl" # PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\ares_getopt.h
# End Source File
# End Group # End Group
# Begin Group "Resource Files" # Begin Group "Resource Files"

View File

@@ -7,19 +7,19 @@
CFG=areslib - Win32 Debug CFG=areslib - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "areslib.mak". !MESSAGE NMAKE /f "areslib.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "areslib.mak" CFG="areslib - Win32 Debug" !MESSAGE NMAKE /f "areslib.mak" CFG="areslib - Win32 Debug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "areslib - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "areslib - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "areslib - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE "areslib - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
@@ -74,7 +74,7 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo # ADD BASE LIB32 /nologo
# ADD LIB32 /nologo # ADD LIB32 /nologo
!ENDIF !ENDIF
# Begin Target # Begin Target

View File

@@ -29,7 +29,7 @@ AC_INIT(curl, [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
dnl configure script copyright dnl configure script copyright
AC_COPYRIGHT([Copyright (c) 1998 - 2006 Daniel Stenberg, <daniel@haxx.se> AC_COPYRIGHT([Copyright (c) 1998 - 2006 Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details]) terms of the curl license; see COPYING for more details])
AC_CONFIG_SRCDIR([lib/urldata.h]) AC_CONFIG_SRCDIR([lib/urldata.h])
@@ -89,6 +89,8 @@ dnl initialize all the info variables
curl_manual_msg="no (--enable-manual)" curl_manual_msg="no (--enable-manual)"
curl_verbose_msg="enabled (--disable-verbose)" curl_verbose_msg="enabled (--disable-verbose)"
curl_sspi_msg="no (--enable-sspi)" curl_sspi_msg="no (--enable-sspi)"
curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
curl_ldaps_msg="no (--enable-ldaps)"
dnl dnl
dnl Save anything in $LIBS for later dnl Save anything in $LIBS for later
@@ -118,12 +120,16 @@ AC_LIBTOOL_WIN32_DLL
dnl skip libtool C++ and Fortran compiler checks dnl skip libtool C++ and Fortran compiler checks
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
m4_defun([AC_PROG_CXX],[]) m4_defun([AC_PROG_CXX],[])
m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])])
m4_defun([AC_PROG_CXXCPP],[true])
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])]) m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
m4_defun([AC_PROG_F77],[]) m4_defun([AC_PROG_F77],[])
dnl skip libtool C++ and Fortran linker checks dnl skip libtool C++ and Fortran linker checks
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])]) m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
m4_defun([AC_LIBTOOL_CXX],[]) m4_defun([AC_LIBTOOL_CXX],[])
m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])])
m4_defun([AC_LIBTOOL_CXXCPP],[true])
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
m4_defun([AC_LIBTOOL_F77],[]) m4_defun([AC_LIBTOOL_F77],[])
@@ -200,9 +206,12 @@ dnl The install stuff has already been taken care of by the automake stuff
dnl AC_PROG_INSTALL dnl AC_PROG_INSTALL
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
dnl check if there's a way to force code inline
AC_C_INLINE
dnl ********************************************************************** dnl **********************************************************************
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
dnl and ws2tcpip.h take precedence over any other further checks which dnl and ws2tcpip.h take precedence over any other further checks which
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
dnl this specific header files. And do them before its results are used. dnl this specific header files. And do them before its results are used.
dnl ********************************************************************** dnl **********************************************************************
@@ -277,6 +286,32 @@ AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
esac ], esac ],
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
) )
AC_MSG_CHECKING([whether to support ldaps])
AC_ARG_ENABLE(ldaps,
AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
;;
*) if test x$CURL_DISABLE_LDAP = x1 ; then
AC_MSG_RESULT(LDAP support needs to be enabled in order to enable LDAPS support!)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
curl_ldaps_msg="enabled"
fi
;;
esac ],
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
AC_SUBST(CURL_DISABLE_LDAPS, [1])
)
AC_MSG_CHECKING([whether to support dict]) AC_MSG_CHECKING([whether to support dict])
AC_ARG_ENABLE(dict, AC_ARG_ENABLE(dict,
AC_HELP_STRING([--enable-dict],[Enable DICT support]) AC_HELP_STRING([--enable-dict],[Enable DICT support])
@@ -412,6 +447,21 @@ then
) )
fi fi
if test "$HAVE_GETHOSTBYNAME" != "1"
then
dnl This is for Minix 3.1
AC_MSG_CHECKING([for gethostbyname for Minix 3])
AC_TRY_LINK([
/* Older Minix versions may need <net/gen/netdb.h> here instead */
#include <netdb.h>],
[gethostbyname("www.dummysite.com");],
[ dnl worked!
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"],
AC_MSG_RESULT(no)
)
fi
if test "$HAVE_GETHOSTBYNAME" != "1" if test "$HAVE_GETHOSTBYNAME" != "1"
then then
dnl This is for eCos with a stubbed DNS implementation dnl This is for eCos with a stubbed DNS implementation
@@ -478,55 +528,79 @@ AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
) )
dnl dl lib?
AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the name of dynamic OpenLDAP libraries dnl Check for LDAP
dnl ********************************************************************** dnl **********************************************************************
LDAPLIBNAME="" LDAPLIBNAME=""
AC_ARG_WITH(ldap-lib, AC_ARG_WITH(ldap-lib,
AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of dynamic ldap lib file]), AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
[LDAPLIBNAME="$withval"]) [LDAPLIBNAME="$withval"])
LBERLIBNAME="" LBERLIBNAME=""
AC_ARG_WITH(lber-lib, AC_ARG_WITH(lber-lib,
AC_HELP_STRING([--with-lber-lib=libname],[Specify name of dynamic lber lib file]), AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
[LBERLIBNAME="$withval"]) [LBERLIBNAME="$withval"])
if test x$CURL_DISABLE_LDAP != x1 ; then if test x$CURL_DISABLE_LDAP != x1 ; then
if test -z "$LDAPLIBNAME" ; then if test -z "$LDAPLIBNAME" ; then
case $host in case $host in
*-*-cygwin | *-*-mingw* | *-*-pw32*) *-*-cygwin* | *-*-mingw* | *-*-pw32*)
dnl Windows uses a single and unique OpenLDAP DLL name dnl Windows uses a single and unique OpenLDAP DLL name
LDAPLIBNAME="wldap32.dll" LDAPLIBNAME="wldap32"
LBERLIBNAME="no" LBERLIBNAME="no"
;; ;;
esac esac
fi fi
if test "$LDAPLIBNAME" ; then if test "$LDAPLIBNAME" ; then
AC_DEFINE_UNQUOTED(DL_LDAP_FILE, "$LDAPLIBNAME") AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
AC_MSG_CHECKING([name of dynamic library ldap]) AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
AC_MSG_RESULT($LDAPLIBNAME) AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
else else
dnl Try to find the right ldap library name for this system dnl Try to find the right ldap library name for this system
CURL_DLLIB_NAME(DL_LDAP_FILE, ldap) AC_SEARCH_LIBS(ldap_init, [ldap],, [
AC_MSG_WARN([Cannot find LDAP library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
fi fi
fi
if test x$CURL_DISABLE_LDAP != x1 ; then
if test "$LBERLIBNAME" ; then if test "$LBERLIBNAME" ; then
dnl If name is "no" then don't define this variable at all dnl If name is "no" then don't define this library at all
dnl (it's only needed if libldap.so's dependencies are broken). dnl (it's only needed if libldap.so's dependencies are broken).
if test "$LBERLIBNAME" != "no" ; then if test "$LBERLIBNAME" != "no" ; then
AC_DEFINE_UNQUOTED(DL_LBER_FILE, "$LBERLIBNAME") AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
fi fi
AC_MSG_CHECKING([name of dynamic library lber])
AC_MSG_RESULT($LBERLIBNAME)
else else
dnl Try to find the right lber library name for this system dnl Try to find the right lber library name for this system
CURL_DLLIB_NAME(DL_LBER_FILE, lber) AC_SEARCH_LIBS(ber_free, [lber],, [
AC_MSG_WARN([Cannot find a library defining ber_free(): LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
fi
fi
if test x$CURL_DISABLE_LDAP != x1 ; then
AC_CHECK_FUNCS([ldap_url_parse])
if test "$LDAPLIBNAME" = "wldap32"; then
curl_ldap_msg="enabled (winldap)"
AC_DEFINE(CURL_LDAP_WIN, 1, [Use W$ LDAP implementation])
case $host in
*-*-cygwin* | *-*-pw32*)
AC_DEFINE(CURL_LDAP_HYBRID, 1, [W$ LDAP with non-W$ compiler])
;;
esac
else
curl_ldap_msg="enabled (OpenLDAP)"
fi fi
fi fi
@@ -628,26 +702,26 @@ AC_MSG_CHECKING([if argv can be written to])
AC_CACHE_VAL(curl_cv_writable_argv, [ AC_CACHE_VAL(curl_cv_writable_argv, [
AC_RUN_IFELSE([[ AC_RUN_IFELSE([[
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
argv[0][0] = ' '; argv[0][0] = ' ';
return (argv[0][0] == ' ')?0:1; return (argv[0][0] == ' ')?0:1;
} }
]], ]],
curl_cv_writable_argv=yes, curl_cv_writable_argv=yes,
curl_cv_writable_argv=no, curl_cv_writable_argv=no,
curl_cv_writable_argv=cross) curl_cv_writable_argv=cross)
]) ])
case $curl_cv_writable_argv in case $curl_cv_writable_argv in
yes) yes)
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
;; ;;
no) no)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
;; ;;
*) *)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_MSG_WARN([the previous check could not be made default was used]) AC_MSG_WARN([the previous check could not be made default was used])
;; ;;
esac esac
dnl ********************************************************************** dnl **********************************************************************
@@ -770,7 +844,7 @@ if test x"$want_spnego" = xyes; then
else else
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
fi fi
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SPNEGO, 1, AC_DEFINE(HAVE_SPNEGO, 1,
[Define this if you have the SPNEGO library fbopenssl]) [Define this if you have the SPNEGO library fbopenssl])
@@ -787,13 +861,13 @@ dnl **********************************************************************
AC_ARG_WITH(gssapi-includes, AC_ARG_WITH(gssapi-includes,
AC_HELP_STRING([--with-gssapi-includes=DIR], AC_HELP_STRING([--with-gssapi-includes=DIR],
[Specify location of GSSAPI header]), [Specify location of GSSAPI header]),
[ GSSAPI_INCS="-I$withval" [ GSSAPI_INCS="-I$withval"
want_gss="yes" ] want_gss="yes" ]
) )
AC_ARG_WITH(gssapi-libs, AC_ARG_WITH(gssapi-libs,
AC_HELP_STRING([--with-gssapi-libs=DIR], AC_HELP_STRING([--with-gssapi-libs=DIR],
[Specify location of GSSAPI libs]), [Specify location of GSSAPI libs]),
[ GSSAPI_LIB_DIR="-L$withval" [ GSSAPI_LIB_DIR="-L$withval"
want_gss="yes" ] want_gss="yes" ]
) )
@@ -803,7 +877,7 @@ AC_ARG_WITH(gssapi,
[Where to look for GSSAPI]), [ [Where to look for GSSAPI]), [
GSSAPI_ROOT="$withval" GSSAPI_ROOT="$withval"
if test x"$GSSAPI_ROOT" != xno; then if test x"$GSSAPI_ROOT" != xno; then
want_gss="yes" want_gss="yes"
fi fi
]) ])
@@ -835,10 +909,10 @@ if test x"$want_gss" = xyes; then
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries]) AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
], ],
[ [
dnl not found, check in gssapi/ subdir dnl not found, check in gssapi/ subdir
AC_CHECK_HEADER(gssapi/gssapi.h, AC_CHECK_HEADER(gssapi/gssapi.h,
[ [
dnl found dnl found
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
], ],
[ [
@@ -848,7 +922,7 @@ if test x"$want_gss" = xyes; then
] ]
) )
] ]
) )
] ]
) )
else else
@@ -865,7 +939,7 @@ if test x"$want_gss" = xyes; then
elif test -z "$GSSAPI_LIB_DIR"; then elif test -z "$GSSAPI_LIB_DIR"; then
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
LDFLAGS="$LDFLAGS $gss_ldflags" LDFLAGS="$LDFLAGS $gss_ldflags"
elif test "$GSSAPI_ROOT" != "yes"; then elif test "$GSSAPI_ROOT" != "yes"; then
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi" LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
else else
@@ -877,7 +951,7 @@ if test x"$want_gss" = xyes; then
else else
CPPFLAGS="$save_CPPFLAGS" CPPFLAGS="$save_CPPFLAGS"
fi fi
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers dnl Check for the presence of SSL libraries and headers
dnl ********************************************************************** dnl **********************************************************************
@@ -888,7 +962,7 @@ dnl Default to no CA bundle
ca="no" ca="no"
AC_ARG_WITH(ssl,dnl AC_ARG_WITH(ssl,dnl
AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
AC_HELP_STRING([--without-ssl], [disable SSL]), AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
OPT_SSL=$withval) OPT_SSL=$withval)
if test X"$OPT_SSL" != Xno; then if test X"$OPT_SSL" != Xno; then
@@ -943,7 +1017,7 @@ if test X"$OPT_SSL" != Xno; then
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'` LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
dnl use the values pkg-config reported dnl use the values pkg-config reported
LIBS="$LIBS $SSL_LIBS" LIBS="$LIBS $SSL_LIBS"
@@ -957,7 +1031,7 @@ if test X"$OPT_SSL" != Xno; then
fi fi
dnl This is for Msys/Mingw dnl This is for Msys/Mingw
case $host in case $host in
*-*-cygwin*) *-*-cygwin*)
dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32 dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
dnl to be added to LIBS and recorded in the .la file. dnl to be added to LIBS and recorded in the .la file.
@@ -1029,7 +1103,7 @@ if test X"$OPT_SSL" != Xno; then
dnl name dnl name
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h) AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
if test $ac_cv_header_x509_h = yes && if test $ac_cv_header_x509_h = yes &&
test $ac_cv_header_crypto_h = yes && test $ac_cv_header_crypto_h = yes &&
test $ac_cv_header_ssl_h = yes; then test $ac_cv_header_ssl_h = yes; then
dnl three matches dnl three matches
@@ -1089,7 +1163,7 @@ if test X"$OPT_SSL" != Xno; then
#else #else
Not the yaSSL OpenSSL compatibility header. Not the yaSSL OpenSSL compatibility header.
#endif #endif
],[ ],[
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1, AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
[Define to 1 if using yaSSL in OpenSSL compatibility mode.]) [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
@@ -1235,7 +1309,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
esac esac
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex) AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
AC_CHECK_HEADERS(libssh2.h, AC_CHECK_HEADERS(libssh2.h,
curl_ssh_msg="enabled (libSSH2)" curl_ssh_msg="enabled (libSSH2)"
LIBSSH2_ENABLED=1 LIBSSH2_ENABLED=1
@@ -1260,7 +1334,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
fi fi
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the random seed preferences dnl Check for the random seed preferences
dnl ********************************************************************** dnl **********************************************************************
if test X"$OPENSSL_ENABLED" = X"1"; then if test X"$OPENSSL_ENABLED" = X"1"; then
@@ -1327,17 +1401,17 @@ if test "$OPENSSL_ENABLED" != "1"; then
CLEANLIBS="$LIBS" CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS" CLEANCPPFLAGS="$CPPFLAGS"
LIBS="$LIBS $addlib" LIBS="$LIBS $addlib"
if test "$addcflags" != "-I/usr/include"; then if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags" CPPFLAGS="$CPPFLAGS $addcflags"
fi fi
AC_CHECK_LIB(gnutls, gnutls_check_version, AC_CHECK_LIB(gnutls, gnutls_check_version,
[ [
AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled]) AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
AC_SUBST(USE_GNUTLS, [1]) AC_SUBST(USE_GNUTLS, [1])
GNUTLS_ENABLED = 1 GNUTLS_ENABLED=1
USE_GNUTLS="yes" USE_GNUTLS="yes"
curl_ssl_msg="enabled (GnuTLS)" curl_ssl_msg="enabled (GnuTLS)"
], ],
@@ -1345,7 +1419,7 @@ if test "$OPENSSL_ENABLED" != "1"; then
LIBS="$CLEANLIBS" LIBS="$CLEANLIBS"
CPPFLAGS="$CLEANCPPFLAGS" CPPFLAGS="$CLEANCPPFLAGS"
]) ])
if test "x$USE_GNUTLS" = "xyes"; then if test "x$USE_GNUTLS" = "xyes"; then
AC_MSG_NOTICE([detected GnuTLS version $version]) AC_MSG_NOTICE([detected GnuTLS version $version])
@@ -1391,7 +1465,7 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
else else
# Without pkg-config, we'll kludge in some defaults # Without pkg-config, we'll kludge in some defaults
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
addcflags="-I$OPT_NSS/include" addcflags="-I$OPT_NSS/include"
version="unknown" version="unknown"
gtlsprefix=$OPT_GNUTLS gtlsprefix=$OPT_GNUTLS
fi fi
@@ -1399,12 +1473,12 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
CLEANLIBS="$LIBS" CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS" CLEANCPPFLAGS="$CPPFLAGS"
LIBS="$LIBS $addlib" LIBS="$LIBS $addlib"
if test "$addcflags" != "-I/usr/include"; then if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags" CPPFLAGS="$CPPFLAGS $addcflags"
fi fi
AC_CHECK_LIB(nss3, NSS_Initialize, AC_CHECK_LIB(nss3, NSS_Initialize,
[ [
AC_DEFINE(USE_NSS, 1, [if NSS is enabled]) AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
@@ -1417,7 +1491,7 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
LIBS="$CLEANLIBS" LIBS="$CLEANLIBS"
CPPFLAGS="$CLEANCPPFLAGS" CPPFLAGS="$CLEANCPPFLAGS"
]) ])
if test "x$USE_NSS" = "xyes"; then if test "x$USE_NSS" = "xyes"; then
AC_MSG_NOTICE([detected NSS version $version]) AC_MSG_NOTICE([detected NSS version $version])
@@ -1464,7 +1538,7 @@ AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
if test "x$ca" != "xno"; then if test "x$ca" != "xno"; then
CURL_CA_BUNDLE='"'$ca'"' CURL_CA_BUNDLE='"'$ca'"'
AC_SUBST(CURL_CA_BUNDLE) AC_SUBST(CURL_CA_BUNDLE)
fi fi
AC_MSG_RESULT([$ca]) AC_MSG_RESULT([$ca])
fi dnl only done if some kind of SSL was enabled fi dnl only done if some kind of SSL was enabled
@@ -1517,8 +1591,8 @@ case "$LIBIDN" in
AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror) AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
AC_CHECK_HEADERS( idn-free.h tld.h ) AC_CHECK_HEADERS( idn-free.h tld.h )
fi fi
;; ;;
esac esac
dnl Default is to try the thread-safe versions of a few functions dnl Default is to try the thread-safe versions of a few functions
@@ -1681,6 +1755,7 @@ AC_CHECK_HEADERS(
assert.h \ assert.h \
unistd.h \ unistd.h \
stdlib.h \ stdlib.h \
ldap_ssl.h \
limits.h \ limits.h \
arpa/inet.h \ arpa/inet.h \
net/if.h \ net/if.h \
@@ -1694,7 +1769,6 @@ AC_CHECK_HEADERS(
termio.h \ termio.h \
sgtty.h \ sgtty.h \
fcntl.h \ fcntl.h \
dlfcn.h \
alloca.h \ alloca.h \
time.h \ time.h \
io.h \ io.h \
@@ -1752,7 +1826,7 @@ AC_CHECK_SIZEOF(time_t)
AC_CHECK_TYPE(long long, AC_CHECK_TYPE(long long,
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])] [AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
longlong="yes" longlong="yes"
) )
if test "xyes" = "x$longlong"; then if test "xyes" = "x$longlong"; then
@@ -1836,7 +1910,6 @@ AC_CHECK_FUNCS( strtoll \
strlcat \ strlcat \
getpwuid \ getpwuid \
geteuid \ geteuid \
dlopen \
utime \ utime \
sigsetjmp \ sigsetjmp \
basename \ basename \
@@ -1888,7 +1961,7 @@ if test "$ac_cv_func_select" = "no"; then
#endif #endif
],[ ],[
select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL); select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
],[ ],[
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
HAVE_SELECT="1" HAVE_SELECT="1"
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1, AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
@@ -1981,11 +2054,11 @@ if test "$disable_poll" = "no"; then
fi dnl poll()-check is not disabled fi dnl poll()-check is not disabled
AC_PATH_PROG( PERL, perl, , AC_PATH_PROG( PERL, perl, ,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST(PERL) AC_SUBST(PERL)
AC_PATH_PROGS( NROFF, gnroff nroff, , AC_PATH_PROGS( NROFF, gnroff nroff, ,
$PATH:/usr/bin/:/usr/local/bin ) $PATH:/usr/bin/:/usr/local/bin )
AC_SUBST(NROFF) AC_SUBST(NROFF)
@@ -2031,10 +2104,10 @@ fi
dnl set variable for use in automakefile(s) dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
AC_MSG_CHECKING([whether to enable ares]) AC_MSG_CHECKING([whether to enable c-ares])
AC_ARG_ENABLE(ares, AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups]) AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]), AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
[ case "$enableval" in [ case "$enableval" in
no) no)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
@@ -2042,10 +2115,10 @@ AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
*) AC_MSG_RESULT(yes) *) AC_MSG_RESULT(yes)
if test "x$IPV6_ENABLED" = "x1"; then if test "x$IPV6_ENABLED" = "x1"; then
AC_MSG_NOTICE([ares may not work properly with ipv6]) AC_MSG_NOTICE([c-ares may not work properly with ipv6])
fi fi
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support]) AC_DEFINE(USE_ARES, 1, [Define if you want to enable c-ares support])
dnl substitute HAVE_ARES for curl-config and similar dnl substitute HAVE_ARES for curl-config and similar
HAVE_ARES="1" HAVE_ARES="1"
AC_SUBST(HAVE_ARES) AC_SUBST(HAVE_ARES)
@@ -2090,7 +2163,8 @@ void curl_domalloc() { }
int main(void) int main(void)
{ {
ares_channel channel; ares_channel channel;
ares_cancel(channel); ares_cancel(channel); /* added in 1.2.0 */
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
return 0; return 0;
} }
], ],
@@ -2228,29 +2302,29 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi
no) no)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
;; ;;
*) *)
AC_MSG_CHECKING([whether $CC supports it]) AC_MSG_CHECKING([whether $CC supports it])
if test "$GCC" = yes ; then if test "$GCC" = yes ; then
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_SUBST(CURL_HIDDEN_SYMBOLS) AC_SUBST(CURL_HIDDEN_SYMBOLS)
AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
AC_SUBST(CURL_EXTERN_SYMBOL) AC_SUBST(CURL_EXTERN_SYMBOL)
CFLAGS="$CFLAGS -fvisibility=hidden" CFLAGS="$CFLAGS -fvisibility=hidden"
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
else else
dnl Test for SunPro cc dnl Test for SunPro cc
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_SUBST(CURL_HIDDEN_SYMBOLS) AC_SUBST(CURL_HIDDEN_SYMBOLS)
AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible]) AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
AC_SUBST(CURL_EXTERN_SYMBOL) AC_SUBST(CURL_EXTERN_SYMBOL)
CFLAGS="$CFLAGS -xldscope=hidden" CFLAGS="$CFLAGS -xldscope=hidden"
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
@@ -2289,24 +2363,24 @@ LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
AC_CONFIG_FILES([Makefile \ AC_CONFIG_FILES([Makefile \
docs/Makefile \ docs/Makefile \
docs/examples/Makefile \ docs/examples/Makefile \
docs/libcurl/Makefile \ docs/libcurl/Makefile \
include/Makefile \ include/Makefile \
include/curl/Makefile \ include/curl/Makefile \
src/Makefile \ src/Makefile \
lib/Makefile \ lib/Makefile \
tests/Makefile \ tests/Makefile \
tests/data/Makefile \ tests/data/Makefile \
tests/server/Makefile \ tests/server/Makefile \
tests/libtest/Makefile \ tests/libtest/Makefile \
packages/Makefile \ packages/Makefile \
packages/Win32/Makefile \ packages/Win32/Makefile \
packages/Win32/cygwin/Makefile \ packages/Win32/cygwin/Makefile \
packages/Linux/Makefile \ packages/Linux/Makefile \
packages/Linux/RPM/Makefile \ packages/Linux/RPM/Makefile \
packages/Linux/RPM/curl.spec \ packages/Linux/RPM/curl.spec \
packages/Linux/RPM/curl-ssl.spec \ packages/Linux/RPM/curl-ssl.spec \
packages/Solaris/Makefile \ packages/Solaris/Makefile \
packages/DOS/Makefile \ packages/DOS/Makefile \
packages/EPM/curl.list \ packages/EPM/curl.list \
@@ -2335,9 +2409,11 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
c-ares support: ${curl_ares_msg} c-ares support: ${curl_ares_msg}
ipv6 support: ${curl_ipv6_msg} ipv6 support: ${curl_ipv6_msg}
IDN support: ${curl_idn_msg} IDN support: ${curl_idn_msg}
Build libcurl: Shared=${enable_shared}, Static=${enable_static} Build libcurl: Shared=${enable_shared}, Static=${enable_static}
Built-in manual: ${curl_manual_msg} Built-in manual: ${curl_manual_msg}
Verbose errors: ${curl_verbose_msg} Verbose errors: ${curl_verbose_msg}
SSPI support: ${curl_sspi_msg} SSPI support: ${curl_sspi_msg}
ca cert path: ${ca} ca cert path: ${ca}
LDAP support: ${curl_ldap_msg}
LDAPS support: ${curl_ldaps_msg}
]) ])

View File

@@ -160,6 +160,10 @@ Smalltalk
Smalltalk binding written by Danil Osipchuk Smalltalk binding written by Danil Osipchuk
http://www.squeaksource.com/CurlPlugin/ http://www.squeaksource.com/CurlPlugin/
SP-Forth
SP-Forth binding by ygrek
http://www.forth.org.ru/~ac/lib/lin/curl/
SPL SPL
SPL binding written by Clifford Wolf SPL binding written by Clifford Wolf

View File

@@ -8,7 +8,7 @@ $Id$
BUGS BUGS
Curl and libcurl have grown substantially since the beginning. At the time Curl and libcurl have grown substantially since the beginning. At the time
of writing (August 2003), there are about 40000 lines of source code, and by of writing (July 2007), there are about 47000 lines of source code, and by
the time you read this it has probably grown even more. the time you read this it has probably grown even more.
Of course there are lots of bugs left. And lots of misfeatures. Of course there are lots of bugs left. And lots of misfeatures.
@@ -39,6 +39,7 @@ WHAT TO REPORT
- your operating system's name and version number (uname -a under a unix - your operating system's name and version number (uname -a under a unix
is fine) is fine)
- what version of curl you're using (curl -V is fine) - what version of curl you're using (curl -V is fine)
- versions of the used libraries that libcurl is built to use
- what URL you were working with (if possible), at least which protocol - what URL you were working with (if possible), at least which protocol
and anything and everything else you think matters. Tell us what you and anything and everything else you think matters. Tell us what you

View File

@@ -1,4 +1,4 @@
Updated: February 11, 2007 (http://curl.haxx.se/docs/faq.html) Updated: July 30, 2007 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _ _ _ ____ _
___| | | | _ \| | ___| | | | _ \| |
/ __| | | | |_) | | / __| | | | |_) | |
@@ -68,6 +68,7 @@ FAQ
4.12 Why do I get "certificate verify failed" ? 4.12 Why do I get "certificate verify failed" ?
4.13 Why is curl -R on Windows one hour off? 4.13 Why is curl -R on Windows one hour off?
4.14 Redirects work in browser but not with curl! 4.14 Redirects work in browser but not with curl!
4.15 FTPS doesn't work
5. libcurl Issues 5. libcurl Issues
5.1 Is libcurl thread-safe? 5.1 Is libcurl thread-safe?
@@ -289,13 +290,13 @@ FAQ
Some facts to use as input to the math: Some facts to use as input to the math:
curl packages are downloaded from the curl.haxx.se and mirrors almost one curl packages are downloaded from the curl.haxx.se and mirrors over a
million times per year. curl is installed by default with most Linux million times per year. curl is installed by default with most Linux
distributions. curl is installed by default with Mac OS X. curl and libcurl distributions. curl is installed by default with Mac OS X. curl and libcurl
as used by numerous applications that include libcurl binaries in their as used by numerous applications that include libcurl binaries in their
distribution packages (like Adobe Acrobat Reader and Google Earth). distribution packages (like Adobe Acrobat Reader and Google Earth).
More than 60 known named companies use curl in commercial environments and More than 70 known named companies use curl in commercial environments and
products. More than 100 known named open source projects depend on products. More than 100 known named open source projects depend on
(lib)curl. (lib)curl.
@@ -374,7 +375,7 @@ FAQ
2.4 Does curl support Socks (RFC 1928) ? 2.4 Does curl support Socks (RFC 1928) ?
Yes, SOCKS5 is supported. Yes, SOCKS 4 and 5 are supported.
3. Usage problems 3. Usage problems
@@ -446,6 +447,10 @@ FAQ
curl -O ftp://download.com/coolfile -Q '-DELE coolfile' curl -O ftp://download.com/coolfile -Q '-DELE coolfile'
or rename a file after upload:
curl -T infile ftp://upload.com/dir/ -Q "-RNFR infile" -Q "-RNTO newname"
3.8 How do I tell curl to follow HTTP redirects? 3.8 How do I tell curl to follow HTTP redirects?
Curl does not follow so-called redirects by default. The Location: header Curl does not follow so-called redirects by default. The Location: header
@@ -755,7 +760,9 @@ FAQ
4.9 Curl can't authenticate to the server that requires NTLM? 4.9 Curl can't authenticate to the server that requires NTLM?
This is supported in curl 7.10.6 or later. No earlier curl version knows This is supported in curl 7.10.6 or later. No earlier curl version knows
of this magic. of this magic. Later versions require the OpenSSL or Microsoft Windows
libraries to provide this functionality. Using GnuTLS or NSS libraries will
not provide NTLM authentication functionality in curl.
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
should not use such ones. should not use such ones.
@@ -822,6 +829,20 @@ FAQ
manually figure out what the page is set to do, or you write a script that manually figure out what the page is set to do, or you write a script that
parses the results and fetches the new URL. parses the results and fetches the new URL.
4.15 FTPS doesn't work
curl supports FTPS (sometimes known as FTP-SSL) both implicit and explicit
mode.
When a URL is used that starts with FTPS://, curl assumes implicit SSL on
the control connection and will therefore immediately connect and try to
speak SSL. FTPS:// connections default to port 990.
To use explicit FTPS, you use a FTP:// URL and the --ftp-ssl option (or one
of its related flavours). This is the most common method, and the one
mandated by RFC4217. This kind of connection then of course uses the
standard FTP port 21 by default.
5. libcurl Issues 5. libcurl Issues
@@ -1097,14 +1118,14 @@ FAQ
In the cURL project we call this module PHP/CURL to differentiate it from In the cURL project we call this module PHP/CURL to differentiate it from
curl the command line tool and libcurl the library. The PHP team however curl the command line tool and libcurl the library. The PHP team however
does not refer to it like this (for unknown reasons). They call it plain does not refer to it like this (for unknown reasons). They call it plain
CURL (often using all caps) which causes much confusion to users which in CURL (often using all caps) or sometimes ext/curl, but both cause much
turn gives us a higher question load. confusion to users which in turn gives us a higher question load.
7.2 Who write PHP/CURL? 7.2 Who write PHP/CURL?
PHP/CURL is a module that comes with the regular PHP package. It depends and PHP/CURL is a module that comes with the regular PHP package. It depends and
uses libcurl, so you need to have libcurl installed properly first before uses libcurl, so you need to have libcurl installed properly first before
PHP/CURL can be used. PHP/CURL is written by Sterling Hughes. PHP/CURL can be used. PHP/CURL was initially written by Sterling Hughes.
7.3 Can I perform multiple requests using the same handle? 7.3 Can I perform multiple requests using the same handle?

View File

@@ -33,6 +33,7 @@ libcurl supports
- supports large files (>2GB and >4GB) both upload/download - supports large files (>2GB and >4GB) both upload/download
- replacable memory functions (malloc, free, realloc, etc) - replacable memory functions (malloc, free, realloc, etc)
- asynchronous name resolving (*6) - asynchronous name resolving (*6)
- both a push and a pull style interface
HTTP HTTP
- HTTP/1.1 compliant (optionally uses 1.0) - HTTP/1.1 compliant (optionally uses 1.0)
@@ -40,6 +41,7 @@ HTTP
- PUT - PUT
- HEAD - HEAD
- POST - POST
- Pipelining
- multipart formpost (RFC1867-style) - multipart formpost (RFC1867-style)
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and - authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
SPNEGO (*4) to server and proxy SPNEGO (*4) to server and proxy
@@ -71,7 +73,7 @@ HTTPS (*1)
FTP FTP
- download - download
- authentication - authentication
- kerberos4 (*5) - kerberos4 (*5), kerberos5 (*3)
- active/passive using PORT, EPRT, PASV or EPSV - active/passive using PORT, EPRT, PASV or EPSV
- single file size information (compare to HTTP HEAD) - single file size information (compare to HTTP HEAD)
- 'type=' URL support - 'type=' URL support
@@ -94,6 +96,13 @@ FTPS (*1)
- explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp:// - explicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
connection to use SSL for both or one of the connections connection to use SSL for both or one of the connections
SCP (*8)
- both password and public key auth
SFTP (*8)
- both password and public key auth
- with custom commands sent before/after the transfer
TFTP TFTP
- download / upload - download / upload
@@ -116,10 +125,11 @@ FILE
FOOTNOTES FOOTNOTES
========= =========
*1 = requires OpenSSL, GnuTLS or NSS *1 = requires OpenSSL, GnuTLS, NSS or yassl
*2 = requires OpenLDAP *2 = requires OpenLDAP
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar. *3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
*4 = requires FBopenssl *4 = requires FBopenssl
*5 = requires a krb4 library, such as the MIT one or similar. *5 = requires a krb4 library, such as the MIT one or similar.
*6 = requires c-ares *6 = requires c-ares
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1 *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
*8 = requires libssh2

View File

@@ -85,15 +85,6 @@ UNIX
LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
Another option to the previous trick, is to set LD_LIBRARY_PATH or edit the
/etc/ld.so.conf file.
If your SSL library was compiled with rsaref (this was common in the past
when used in the United States), you may also need to set:
LIBS=-lRSAglue -lrsaref
(as suggested by Doug Kaufman)
MORE OPTIONS MORE OPTIONS
To force configure to use the standard cc compiler if both cc and gcc are To force configure to use the standard cc compiler if both cc and gcc are
@@ -143,6 +134,12 @@ UNIX
To build with NSS support instead of OpenSSL for SSL/TLS, note that To build with NSS support instead of OpenSSL for SSL/TLS, note that
you need to use both --without-ssl and --with-nss. you need to use both --without-ssl and --with-nss.
To get GSSAPI support, build with --with-gssapi and have the MIT or
Heimdal Kerberos 5 packages installed.
To get support for SCP and SFTP, build with --with-libssh2 and have
libssh2 0.16 or later installed.
Win32 Win32
===== =====
@@ -173,9 +170,17 @@ Win32
MingW32 MingW32
------- -------
Run the 'mingw32.bat' file to get the proper environment variables set, Make sure that MinGW32's bin dir is in the search path, for example:
then run 'make mingw32' in the root dir. Use 'make mingw32-ssl' to build
curl SSL enabled. set PATH=c:\mingw32\bin;%PATH%
then run 'mingw32-make mingw32' in the root dir. There are other
make targets available to build libcurl with more features, use:
'mingw32-make mingw32-zlib' to build with Zlib support;
'mingw32-make mingw32-ssl-zlib' to build with SSL and Zlib enabled;
'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2, SSL, Zlib;
'mingw32-make mingw32-ssh2-ssl-sspi-zlib' to build with SSH2, SSL, Zlib
and SSPI support.
If you have any problems linking libraries or finding header files, be sure If you have any problems linking libraries or finding header files, be sure
to verify that the provided "Makefile.m32" files use the proper paths, and to verify that the provided "Makefile.m32" files use the proper paths, and
@@ -183,19 +188,38 @@ Win32
environment variables, for example: environment variables, for example:
set ZLIB_PATH=c:\zlib-1.2.3 set ZLIB_PATH=c:\zlib-1.2.3
set OPENSSL_PATH=c:\openssl-0.9.8d set OPENSSL_PATH=c:\openssl-0.9.8e
set LIBSSH2_PATH=c:\libssh2-0.15 set LIBSSH2_PATH=c:\libssh2-0.17
ATTENTION: if you want to build with libssh2 support you have to use latest ATTENTION: if you want to build with libssh2 support you have to use latest
sources fetched from CVS - the current 0.14 release will NOT work! version 0.17 - previous versions will NOT work with 7.17.0 and later!
Use 'make mingw32-ssh2-ssl' to build curl with SSH2 and SSL enabled. Use 'mingw32-make mingw32-ssh2-ssl-zlib' to build with SSH2 and SSL enabled.
It is now also possible to build with other LDAP SDKs than MS LDAP;
currently it is possible to build with native Win32 OpenLDAP, or with the
Novell CLDAP SDK. If you want to use these you need to set these vars:
set LDAP_SDK=c:\openldap
set USE_LDAP_OPENLDAP=1
or for using the Novell SDK:
set USE_LDAP_NOVELL=1
If you want to enable LDAPS support then set LDAPS=1.
- optional MingW32-built OpenlDAP SDK available from:
http://www.gknw.net/mirror/openldap/
- optional recent Novell CLDAP SDK available from:
http://developer.novell.com/ndk/cldap.htm
Cygwin Cygwin
------ ------
Almost identical to the unix installation. Run the configure script in the Almost identical to the unix installation. Run the configure script in the
curl root with 'sh configure'. Make sure you have the sh executable in curl root with 'sh configure'. Make sure you have the sh executable in
/bin/ or you'll see the configure fail towards the end. /bin/ or you'll see the configure fail toward the end.
Run 'make' Run 'make'
@@ -233,7 +257,7 @@ Win32
Before running nmake define the OPENSSL_PATH environment variable with Before running nmake define the OPENSSL_PATH environment variable with
the root/base directory of OpenSSL, for example: the root/base directory of OpenSSL, for example:
set OPENSSL_PATH=c:\openssl-0.9.8d set OPENSSL_PATH=c:\openssl-0.9.8e
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
directory. 'nmake vc-ssl' will create a libcurl static and dynamic directory. 'nmake vc-ssl' will create a libcurl static and dynamic
@@ -307,6 +331,7 @@ Win32
CURL_DISABLE_TELNET disables TELNET CURL_DISABLE_TELNET disables TELNET
CURL_DISABLE_DICT disables DICT CURL_DISABLE_DICT disables DICT
CURL_DISABLE_FILE disables FILE CURL_DISABLE_FILE disables FILE
CURL_DISABLE_TFTP disables TFTP
If you want to set any of these defines you have the following If you want to set any of these defines you have the following
possibilities: possibilities:
@@ -399,7 +424,7 @@ VMS
Facility - basically the program ID. A code assigned to the program Facility - basically the program ID. A code assigned to the program
the name can be fetched from external or internal message libraries the name can be fetched from external or internal message libraries
Errorcode - the errodes assigned by the application Error code - the err codes assigned by the application
Sev. - severity: Even = error, off = non error Sev. - severity: Even = error, off = non error
0 = Warning 0 = Warning
1 = Success 1 = Success
@@ -409,7 +434,7 @@ VMS
<5-7> reserved. <5-7> reserved.
This all presents itself with: This all presents itself with:
%<FACILITY>-<SeV>-<Errorname>, <Error message> %<FACILITY>-<Sev>-<Errorname>, <Error message>
See also the src/curlmsg.msg file, it has the source for the messages In See also the src/curlmsg.msg file, it has the source for the messages In
src/main.c a section is devoted to message status values, the globalvalues src/main.c a section is devoted to message status values, the globalvalues
@@ -484,18 +509,33 @@ NetWare
http://www.gknw.net/development/prgtools/ http://www.gknw.net/development/prgtools/
- recent Novell LibC SDK available from: - recent Novell LibC SDK available from:
http://developer.novell.com/ndk/libc.htm http://developer.novell.com/ndk/libc.htm
- optional zlib sources (at the moment only dynamic linking with zlib.imp); - or recent Novell CLib SDK available from:
http://developer.novell.com/ndk/clib.htm
- optional recent Novell CLDAP SDK available from:
http://developer.novell.com/ndk/cldap.htm
- optional zlib sources (static or dynamic linking with zlib.imp);
sources with NetWare Makefile can be obtained from: sources with NetWare Makefile can be obtained from:
http://www.gknw.net/mirror/zlib/ http://www.gknw.net/mirror/zlib/
- optional OpenSSL sources (version 0.9.8 or later which builds with BSD); - optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
you can find precompiled packages at:
http://www.gknw.net/development/ossl/netware/
for CLIB-based builds OpenSSL needs to be patched to build with BSD
sockets (currently only a winsock-based CLIB build is supported):
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8e/openssl-0.9.8e.diff
- optional SSH2 sources (version 0.17 or later);
Set a search path to your compiler, linker and tools; on Linux make Set a search path to your compiler, linker and tools; on Linux make
sure that the var OSTYPE contains the string 'linux'; and then type sure that the var OSTYPE contains the string 'linux'; set the var
'make netware' from the top source directory; other tagets available NDKBASE to point to the base of your Novell NDK; and then type
'make netware' from the top source directory; other targets available
are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares'; are 'netware-ssl', 'netware-ssl-zlib', 'netware-zlib' and 'netware-ares';
if you need other combinations you can control the build with the if you need other combinations you can control the build with the
environment variables WITH_SSL, WITH_ZLIB, WITH_ARES and ENABLE_IPV6. environment variables WITH_SSL, WITH_ZLIB, WITH_ARES, WITH_SSH2, and
I found on some Linux systems (RH9) that OS detection didnt work although ENABLE_IPV6; you can set LINK_STATIC=1 to link curl.nlm statically.
By default LDAP support is enabled, however currently you will need a patch
in order to use the CLDAP NDK with BSD sockets (Novell Bug 300237):
http://www.gknw.net/test/curl/cldap_ndk/ldap_ndk.diff
I found on some Linux systems (RH9) that OS detection didn't work although
a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it a 'set | grep OSTYPE' shows the var present and set; I simply overwrote it
with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked... with 'OSTYPE=linux-rh9-gnu' and the detection in the Makefile worked...
Any help in testing appreciated! Any help in testing appreciated!
@@ -577,20 +617,42 @@ eCos
Minix Minix
===== =====
curl can be compiled on Minix 3 using gcc (ACK has a few problems due curl can be compiled on Minix 3 using gcc or ACK (starting with
to mismatched headers and libraries as of ver. 3.1.2). The gcc and bash ver. 3.1.3). The default heap size allocated to several required
packages must be installed first. The default heap size allocated to programs is inadequate for configuring and compiling curl and will
bash is inadequate for running configure and will result in out of memory result in strange errors unless fixed (which only needs to be done
errors. Increase it with the command: once).
ACK
---
Increase heap sizes with the commands:
chmem =1024000 /usr/lib/em_cemcom.ansi
chmem =512000 /usr/lib/i386/as
If you have bash installed:
chmem =2048000 /usr/local/bin/bash chmem =2048000 /usr/local/bin/bash
Make sure gcc and bash are in the PATH then configure curl with a Configure and compile with:
command like this:
./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap ./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
make
Then simply run 'make'. GCC
---
If you have bash installed:
chmem =2048000 /usr/local/bin/bash
Make sure gcc is in your PATH with the command:
export PATH=/usr/gnu/bin:$PATH
then configure and compile curl with:
./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
make
CROSS COMPILE CROSS COMPILE
@@ -705,6 +767,7 @@ PORTS
- HP3000 MPE/iX - HP3000 MPE/iX
- MIPS IRIX 6.2, 6.5 - MIPS IRIX 6.2, 6.5
- MIPS Linux - MIPS Linux
- OS/400
- Pocket PC/Win CE 3.0 - Pocket PC/Win CE 3.0
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
- PowerPC Darwin 1.0 - PowerPC Darwin 1.0
@@ -719,6 +782,7 @@ PORTS
- StrongARM (and other ARM) RISC OS 3.1, 4.02 - StrongARM (and other ARM) RISC OS 3.1, 4.02
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6 - StrongARM/ARM7/ARM9 Linux 2.4, 2.6
- StrongARM NetBSD 1.4.1 - StrongARM NetBSD 1.4.1
- TPF
- Ultrix 4.3a - Ultrix 4.3a
- UNICOS 9.0 - UNICOS 9.0
- i386 BeOS - i386 BeOS
@@ -728,7 +792,7 @@ PORTS
- i386 FreeBSD - i386 FreeBSD
- i386 HURD - i386 HURD
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
- i386 MINIX 3.1.2 - i386 MINIX 3.1
- i386 NetBSD - i386 NetBSD
- i386 Novell NetWare - i386 Novell NetWare
- i386 OS/2 - i386 OS/2

View File

@@ -3,14 +3,31 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems changelog of the current development status, as one or more of these problems
may have been fixed since this was written! may have been fixed since this was written!
47. If a CONNECT response is larger than BUFSIZE when the connection is meant
to be kept alive, the function will return prematurely and will confuse the
rest of the HTTP protocol code.
46. If a CONNECT response is chunked-encoded, the function may return
prematurely and will confuse the rest of the HTTP protocol code.
45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
getaddrinfo() sorts the response list which effectively kills how libcurl
deals with round-robin DNS entries. All details:
http://curl.haxx.se/mail/lib-2007-07/0168.html
initial suggested function to use for randomizing the response:
http://curl.haxx.se/mail/lib-2007-07/0178.html
44. --ftp-method nocwd does not handle URLs ending with a slash properly (it
should list the contents of that directory). See test case 351.
43. There seems to be a problem when connecting to the Microsoft telnet server.
http://curl.haxx.se/bug/view.cgi?id=1720605
41. When doing an operation over FTP that requires the ACCT command (but not 41. When doing an operation over FTP that requires the ACCT command (but not
when logging in), the operation will fail since libcurl doesn't detect this when logging in), the operation will fail since libcurl doesn't detect this
and thus fails to issue the correct command: and thus fails to issue the correct command:
http://curl.haxx.se/bug/view.cgi?id=1693337 http://curl.haxx.se/bug/view.cgi?id=1693337
40. Mac OS X test failures (Daniel Johnson)
http://curl.haxx.se/mail/lib-2007-03/0095.html
39. Steffen Rumler's Race Condition in Curl_proxyCONNECT: 39. Steffen Rumler's Race Condition in Curl_proxyCONNECT:
http://curl.haxx.se/mail/lib-2007-01/0045.html http://curl.haxx.se/mail/lib-2007-01/0045.html
@@ -53,7 +70,7 @@ may have been fixed since this was written!
IPv6 numerical addresses in URLs. IPv6 numerical addresses in URLs.
29. IPv6 URLs with zone ID is not supported. 29. IPv6 URLs with zone ID is not supported.
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
specifies the use of a plus sign instead of a percent when specifying zone specifies the use of a plus sign instead of a percent when specifying zone
IDs in URLs to get around the problem of percent signs being IDs in URLs to get around the problem of percent signs being
special. According to the reporter, Firefox deals with the URL _with_ a special. According to the reporter, Firefox deals with the URL _with_ a
@@ -68,7 +85,6 @@ may have been fixed since this was written!
23. SOCKS-related problems: 23. SOCKS-related problems:
A) libcurl doesn't support SOCKS for IPv6. A) libcurl doesn't support SOCKS for IPv6.
B) libcurl doesn't support FTPS over a SOCKS proxy. B) libcurl doesn't support FTPS over a SOCKS proxy.
C) We don't have any test cases for SOCKS proxy.
E) libcurl doesn't support active FTP over a SOCKS proxy E) libcurl doesn't support active FTP over a SOCKS proxy
We probably have even more bugs and lack of features when a SOCKS proxy is We probably have even more bugs and lack of features when a SOCKS proxy is

View File

@@ -809,18 +809,19 @@ CUSTOM OUTPUT
curl -w 'We downloaded %{size_download} bytes\n' www.download.com curl -w 'We downloaded %{size_download} bytes\n' www.download.com
KERBEROS4 FTP TRANSFER KERBEROS FTP TRANSFER
Curl supports kerberos4 for FTP transfers. You need the kerberos package Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need
installed and used at curl build time for it to be used. the kerberos package installed and used at curl build time for it to be
used.
First, get the krb-ticket the normal way, like with the kauth tool. Then use First, get the krb-ticket the normal way, like with the kinit/kauth tool.
curl in way similar to: Then use curl in way similar to:
curl --krb4 private ftp://krb4site.com -u username:fakepwd curl --krb private ftp://krb4site.com -u username:fakepwd
There's no use for a password on the -u switch, but a blank one will make There's no use for a password on the -u switch, but a blank one will make
curl ask for one and you already entered the real password to kauth. curl ask for one and you already entered the real password to kinit/kauth.
TELNET TELNET

View File

@@ -20,3 +20,7 @@ README.win32
command line similar to this in order to extract a separate text file: command line similar to this in order to extract a separate text file:
curl -M >manual.txt curl -M >manual.txt
Read the INSTALL file for instructions how to compile curl self.

View File

@@ -4,6 +4,8 @@
If you have contributed but are missing here, please let us know! If you have contributed but are missing here, please let us know!
Adam D. Moss
Adam Piggott
Adrian Schuur Adrian Schuur
Alan Pinstein Alan Pinstein
Albert Chin-A-Young Albert Chin-A-Young
@@ -20,7 +22,9 @@ Alexander Zhuravlev
Alexey Simak Alexey Simak
Alexis Carvalho Alexis Carvalho
Amol Pattekar Amol Pattekar
Anders Gustafsson
Andi Jahja Andi Jahja
Andre Guibert de Bruet
Andreas Damm Andreas Damm
Andreas Ntaflos Andreas Ntaflos
Andreas Olsson Andreas Olsson
@@ -92,6 +96,8 @@ Dan Fandrich
Dan Nelson Dan Nelson
Dan Torop Dan Torop
Dan Zitter Dan Zitter
Daniel Black
Daniel Johnson
Daniel Stenberg Daniel Stenberg
Daniel at touchtunes Daniel at touchtunes
Darryl House Darryl House
@@ -99,6 +105,7 @@ Dave Dribin
Dave Halbakken Dave Halbakken
Dave Hamilton Dave Hamilton
Dave May Dave May
Dave Vasilevsky
David Byron David Byron
David Cohen David Cohen
David Eriksson David Eriksson
@@ -135,6 +142,7 @@ Douglas E. Wegscheid
Douglas R. Horner Douglas R. Horner
Dov Murik Dov Murik
Duane Cathey Duane Cathey
Duncan Mac-Vicar Prett
Dustin Boswell Dustin Boswell
Dylan Ellicott Dylan Ellicott
Dylan Salisbury Dylan Salisbury
@@ -156,23 +164,28 @@ Erwan Legrand
Erwin Authried Erwin Authried
Eugene Kotlyarov Eugene Kotlyarov
Evan Jordan Evan Jordan
Eygene Ryabinkin
Fabrizio Ammollo Fabrizio Ammollo
Fedor Karpelevitch Fedor Karpelevitch
Felix von Leitner Felix von Leitner
Feng Tu
Florian Schoppmann Florian Schoppmann
Forrest Cahoon Forrest Cahoon
Frank Hempel
Frank Keeney Frank Keeney
Frank Ticheler Frank Ticheler
Fred New Fred New
Fred Noz Fred Noz
Frederic Lepied Frederic Lepied
Gautam Mani Gautam Mani
Gavrie Philipson
Gaz Iqbal Gaz Iqbal
Georg Horn Georg Horn
Georg Huettenegger Georg Huettenegger
Georg Wicherski Georg Wicherski
Gerd v. Egidy Gerd v. Egidy
Gerhard Herre Gerhard Herre
Gerrit Bruchh<68>user
Giaslas Georgios Giaslas Georgios
Gilad Gilad
Gilbert Ramirez Jr. Gilbert Ramirez Jr.
@@ -191,6 +204,7 @@ Gwenole Beauchesne
G<EFBFBD>tz Babin-Ebell G<EFBFBD>tz Babin-Ebell
G<EFBFBD>nter Knauf G<EFBFBD>nter Knauf
Hamish Mackenzie Hamish Mackenzie
Hang Kin Lau
Hanno Kranzhoff Hanno Kranzhoff
Hans Steegers Hans Steegers
Hardeep Singh Hardeep Singh
@@ -200,6 +214,7 @@ Henrik Storner
Hzhijun Hzhijun
Ian Ford Ian Ford
Ian Gulliver Ian Gulliver
Ian Turner
Ian Wilkes Ian Wilkes
Ignacio Vazquez-Abrams Ignacio Vazquez-Abrams
Igor Polyakov Igor Polyakov
@@ -224,6 +239,7 @@ Jan Kunder
Jared Lundell Jared Lundell
Jari Sundell Jari Sundell
Jason S. Priebe Jason S. Priebe
Jay Austin
Jaz Fresh Jaz Fresh
Jean Jacques Drouin Jean Jacques Drouin
Jean-Claude Chauve Jean-Claude Chauve
@@ -254,6 +270,7 @@ Jonas Forsman
Jonatan Lander Jonatan Lander
Jonathan Hseu Jonathan Hseu
Jongki Suwandi Jongki Suwandi
Jose Kahan
Josh Kapell Josh Kapell
Juan F. Codagnone Juan F. Codagnone
Juan Ignacio Herv<72>s Juan Ignacio Herv<72>s
@@ -262,6 +279,7 @@ Jukka Pihl
Julian Noble Julian Noble
Jun-ichiro itojun Hagino Jun-ichiro itojun Hagino
Jurij Smakov Jurij Smakov
Justin Fletcher
J<EFBFBD>rg Mueller-Tolk J<EFBFBD>rg Mueller-Tolk
J<EFBFBD>rn Hartroth J<EFBFBD>rn Hartroth
Kai Sommerfeld Kai Sommerfeld
@@ -270,6 +288,7 @@ Kang-Jin Lee
Karl Moerder Karl Moerder
Karol Pietrzak Karol Pietrzak
Katie Wang Katie Wang
Kees Cook
Keith MacDonald Keith MacDonald
Keith McGuigan Keith McGuigan
Ken Hirsch Ken Hirsch
@@ -284,6 +303,7 @@ Kjetil Jacobsen
Klevtsov Vadim Klevtsov Vadim
Kris Kennaway Kris Kennaway
Krishnendu Majumdar Krishnendu Majumdar
Kristian Gunstone
Kristian K<>hntopp Kristian K<>hntopp
Kyle Sallee Kyle Sallee
Lachlan O'Dea Lachlan O'Dea
@@ -309,6 +329,7 @@ Luke Call
Luong Dinh Dung Luong Dinh Dung
Maciej Karpiuk Maciej Karpiuk
Maciej W. Rozycki Maciej W. Rozycki
Manfred Schwarb
Marc Boucher Marc Boucher
Marcelo Juchem Marcelo Juchem
Marcin Konicki Marcin Konicki
@@ -330,6 +351,7 @@ Maruko
Massimiliano Ziccardi Massimiliano Ziccardi
Mathias Axelsson Mathias Axelsson
Mats Lidell Mats Lidell
Matt Kraai
Matt Veenstra Matt Veenstra
Matt Witherspoon Matt Witherspoon
Matthew Blain Matthew Blain
@@ -364,6 +386,7 @@ Neil Spring
Nic Roets Nic Roets
Nick Gimbrone Nick Gimbrone
Nick Humfrey Nick Humfrey
Nick Zitzmann
Nico Baggus Nico Baggus
Nicolas Berloquin Nicolas Berloquin
Nicolas Croiset Nicolas Croiset
@@ -394,6 +417,7 @@ Pete Su
Peter Bray Peter Bray
Peter Forret Peter Forret
Peter Heuchert Peter Heuchert
Peter O'Gorman
Peter Pentchev Peter Pentchev
Peter Silva Peter Silva
Peter Su Peter Su
@@ -423,6 +447,7 @@ Rene Bernhardt
Rene Rebe Rene Rebe
Ricardo Cadime Ricardo Cadime
Rich Gray Rich Gray
Rich Rauenzahn
Richard Archer Richard Archer
Richard Atterer Richard Atterer
Richard Bramante Richard Bramante
@@ -432,9 +457,13 @@ Richard Gorton
Richard Prescott Richard Prescott
Rick Jones Rick Jones
Rick Richardson Rick Richardson
Rob Crittenden
Rob Jones
Rob Stanzel Rob Stanzel
Robert A. Monat
Robert D. Young Robert D. Young
Robert Foreman Robert Foreman
Robert Iakobashvili
Robert Olson Robert Olson
Robert Weaver Robert Weaver
Robin Kay Robin Kay
@@ -469,6 +498,8 @@ Siddhartha Prakash Jain
Simon Dick Simon Dick
Simon Josefsson Simon Josefsson
Simon Liu Simon Liu
Song Ma
Sonia Subramanian
Spiridonoff A.V Spiridonoff A.V
Stadler Stephan Stadler Stephan
Stefan Esser Stefan Esser
@@ -480,6 +511,7 @@ Stephen More
Sterling Hughes Sterling Hughes
Steve Green Steve Green
Steve Lhomme Steve Lhomme
Steve Little
Steve Marx Steve Marx
Steve Oliphant Steve Oliphant
Steven Bazyl Steven Bazyl
@@ -490,6 +522,7 @@ S
T. Bharath T. Bharath
T. Yamada T. Yamada
Temprimus Temprimus
Thomas J. Moore
Thomas Klausner Thomas Klausner
Thomas Schwinge Thomas Schwinge
Thomas Tonino Thomas Tonino
@@ -497,6 +530,7 @@ Tim Baker
Tim Bartley Tim Bartley
Tim Costello Tim Costello
Tim Sneddon Tim Sneddon
Tobias Rundstr<74>m
Toby Peterson Toby Peterson
Todd Kulesza Todd Kulesza
Todd Vierling Todd Vierling
@@ -504,6 +538,7 @@ Tom Benoist
Tom Lee Tom Lee
Tom Mattison Tom Mattison
Tom Moers Tom Moers
Tom Regner
Tom Zerucha Tom Zerucha
Tomas Pospisek Tomas Pospisek
Tomas Szepe Tomas Szepe

View File

@@ -52,6 +52,10 @@ TODO
that would risk collide with other apps that use libcurl and that runs that would risk collide with other apps that use libcurl and that runs
configure). configure).
Work on this has been started but hasn't been finished, and the initial
patch and some details are found here:
http://curl.haxx.se/mail/lib-2006-12/0084.html
LIBCURL - multi interface LIBCURL - multi interface
* Make sure we don't ever loop because of non-blocking sockets return * Make sure we don't ever loop because of non-blocking sockets return
@@ -72,19 +76,35 @@ TODO
internally use and assume the multi interface. The select()-loop should use internally use and assume the multi interface. The select()-loop should use
curl_multi_socket(). curl_multi_socket().
* curl_multi_handle_control() - this can control the easy handle (while)
added to a multi handle in various ways:
o RESTART, unconditionally restart this easy handle's transfer from the
start, re-init the state
o RESTART_COMPLETED, restart this easy handle's transfer but only if the
existing transfer has already completed and it is in a "finished state".
o STOP, just stop this transfer and consider it completed
o PAUSE?
o RESUME?
DOCUMENTATION DOCUMENTATION
* More and better * More and better
FTP FTP
* PRET is a command that primarily "drftpd" supports, which could be useful
when using libcurl against such a server. It is a non-standard and a rather
oddly designed command, but...
http://curl.haxx.se/bug/feature.cgi?id=1729967
* When trying to connect passively to a server which only supports active
connections, libcurl returns CURLE_FTP_WEIRD_PASV_REPLY and closes the
connection. There could be a way to fallback to an active connection (and
vice versa). http://curl.haxx.se/bug/feature.cgi?id=1754793
* Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in * Make the detection of (bad) %0d and %0a codes in FTP url parts earlier in
the process to avoid doing a resolve and connect in vain. the process to avoid doing a resolve and connect in vain.
* Support GSS/Kerberos 5 for ftp file transfer. This will allow user
authentication and file encryption. Possible libraries and example clients
are available from MIT or Heimdal. Requested by Markus Moeller.
* REST fix for servers not behaving well on >2GB requests. This should fail * REST fix for servers not behaving well on >2GB requests. This should fail
if the server doesn't set the pointer to the requested index. The tricky if the server doesn't set the pointer to the requested index. The tricky
(impossible?) part is to figure out if the server did the right thing or (impossible?) part is to figure out if the server did the right thing or
@@ -96,6 +116,7 @@ TODO
* Make CURLOPT_FTPPORT support an additional port number on the IP/if/name, * Make CURLOPT_FTPPORT support an additional port number on the IP/if/name,
like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]". like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]".
http://curl.haxx.se/bug/feature.cgi?id=1505166
* FTP ASCII transfers do not follow RFC959. They don't convert the data * FTP ASCII transfers do not follow RFC959. They don't convert the data
accordingly. accordingly.
@@ -115,6 +136,9 @@ TODO
never been reported as causing trouble to anyone, but should be considered never been reported as causing trouble to anyone, but should be considered
to use the HTTP version the user has chosen. to use the HTTP version the user has chosen.
* "Better" support for persistent connections over HTTP 1.0
http://curl.haxx.se/bug/feature.cgi?id=1089001
TELNET TELNET
* Reading input (to send to the remote server) on stdin is a crappy solution * Reading input (to send to the remote server) on stdin is a crappy solution
@@ -127,6 +151,9 @@ TODO
SSL SSL
* Provide an option that allows for disabling specific SSL versions, such as
SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276
* Provide a libcurl API for setting mutex callbacks in the underlying SSL * Provide a libcurl API for setting mutex callbacks in the underlying SSL
library, so that the same application code can use mutex-locking library, so that the same application code can use mutex-locking
independently of OpenSSL or GnutTLS being used. independently of OpenSSL or GnutTLS being used.
@@ -198,6 +225,11 @@ TODO
CLIENT CLIENT
* Add option that is similar to -O but that takes the output file name from
the Content-Disposition: header, and/or uses the local file name used in
redirections for the cases the server bounces the request further to a
different file (name): http://curl.haxx.se/bug/feature.cgi?id=1364676
* "curl --sync http://example.com/feed[1-100].rss" or * "curl --sync http://example.com/feed[1-100].rss" or
"curl --sync http://example.net/{index,calendar,history}.html" "curl --sync http://example.net/{index,calendar,history}.html"
@@ -217,10 +249,10 @@ TODO
* "curl ftp://site.com/*.txt" * "curl ftp://site.com/*.txt"
* The client could be told to use maximum N simultaneous transfers and then * The client could be told to use maximum N simultaneous parallel transfers
just make sure that happens. It should of course not make more than one and then just make sure that happens. It should of course not make more
connection to the same remote host. This would require the client to use than one connection to the same remote host. This would require the client
the multi interface. to use the multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
* Extending the capabilities of the multipart formposting. How about leaving * Extending the capabilities of the multipart formposting. How about leaving
the ';type=foo' syntax as it is and adding an extra tag (headers) which the ';type=foo' syntax as it is and adding an extra tag (headers) which
@@ -265,9 +297,6 @@ TODO
and FTP-SSL tests without the stunnel dependency, and it could allow us to and FTP-SSL tests without the stunnel dependency, and it could allow us to
provide test tools built with either OpenSSL or GnuTLS provide test tools built with either OpenSSL or GnuTLS
* Make the test servers able to serve multiple running test suites. Like if
two users run 'make test' at once.
* If perl wasn't found by the configure script, don't attempt to run the * If perl wasn't found by the configure script, don't attempt to run the
tests but explain something nice why it doesn't. tests but explain something nice why it doesn't.
@@ -277,6 +306,27 @@ TODO
* Make the test suite work on more platforms. OpenBSD and Mac OS. Remove * Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
fork()s and it should become even more portable. fork()s and it should become even more portable.
NEXT soname bump
* #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
from being output in NOBODY requests over ftp
* Combine some of the error codes to remove duplicates. The original
numbering should not be changed, and the old identifiers would be
macroed to the new ones in an CURL_NO_OLDIES section to help with
backward compatibility.
Candidates for removal and their replacements:
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
NEXT MAJOR RELEASE NEXT MAJOR RELEASE
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a * curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a

View File

@@ -216,7 +216,8 @@ local directory hierarchy as needed. This option creates the dirs mentioned
with the -o option, nothing else. If the -o file name uses no dir or if the with the -o option, nothing else. If the -o file name uses no dir or if the
dirs it mentions already exist, no dir will be created. dirs it mentions already exist, no dir will be created.
To create remote directories when using FTP, try \fI--ftp-create-dirs\fP. To create remote directories when using FTP or SFTP, try
\fI--ftp-create-dirs\fP.
.IP "--crlf" .IP "--crlf"
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). (FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
@@ -370,7 +371,7 @@ normal cases when a HTTP server fails to deliver a document, it returns an
HTML document stating so (which often also describes why and more). This flag HTML document stating so (which often also describes why and more). This flag
will prevent curl from outputting that and return error 22. will prevent curl from outputting that and return error 22.
This method is not fail-safe and there are occasions where non-succesful This method is not fail-safe and there are occasions where non-successful
response codes will slip through, especially when authentication is involved response codes will slip through, especially when authentication is involved
(response codes 401 and 407). (response codes 401 and 407).
@@ -382,7 +383,7 @@ has been provided, this data is sent off using the ACCT command. (Added in
If this option is used twice, the second will override the previous use. If this option is used twice, the second will override the previous use.
.IP "--ftp-create-dirs" .IP "--ftp-create-dirs"
(FTP) When an FTP URL/operation uses a path that doesn't currently exist on (FTP) When an FTP or SFTP URL/operation uses a path that doesn't currently exist on
the server, the standard behavior of curl is to fail. Using this option, curl the server, the standard behavior of curl is to fail. Using this option, curl
will instead attempt to create missing directories. will instead attempt to create missing directories.
@@ -592,13 +593,14 @@ private key is. DER, PEM and ENG are supported. If not specified, PEM is
assumed. assumed.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "--krb4 <level>" .IP "--krb <level>"
(FTP) Enable kerberos4 authentication and use. The level must be entered and (FTP) Enable Kerberos authentication and use. The level must be entered and
should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use
a level that is not one of these, 'private' will instead be used. a level that is not one of these, 'private' will instead be used.
This option requires that the library was built with kerberos4 support. This This option requires that the library was built with kerberos4 or GSSAPI
is not very common. Use \fI-V/--version\fP to see if your curl supports it. (GSS-Negotiate) support. This is not very common. Use \fI-V/--version\fP to
see if your curl supports it.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "-K/--config <config file>" .IP "-K/--config <config file>"
@@ -657,6 +659,10 @@ Append this option to any ordinary curl command line, and you will get a
libcurl-using source code written to the file that does the equivalent libcurl-using source code written to the file that does the equivalent
operation of what your command line operation does! operation of what your command line operation does!
NOTE: this does not properly support -F and the sending of multipart
formposts, so in those cases the output program will be missing necessary
calls to \fIcurl_formadd(3)\fP, and possibly more.
If this option is used several times, the last given file name will be used. If this option is used several times, the last given file name will be used.
.IP "--limit-rate <speed>" .IP "--limit-rate <speed>"
Specify the maximum transfer rate you want curl to use. This feature is useful Specify the maximum transfer rate you want curl to use. This feature is useful
@@ -689,7 +695,7 @@ subdirectories and symbolic links.
If this option is used twice, the second will again disable list only. If this option is used twice, the second will again disable list only.
.IP "--local-port <num>[-num]" .IP "--local-port <num>[-num]"
Set a prefered number or range of local port numbers to use for the Set a preferred number or range of local port numbers to use for the
connection(s). Note that port numbers by nature is a scarce resource that connection(s). Note that port numbers by nature is a scarce resource that
will be busy at times so setting this range to something too narrow might will be busy at times so setting this range to something too narrow might
cause unnecessary connection setup failures. (Added in 7.15.2) cause unnecessary connection setup failures. (Added in 7.15.2)
@@ -704,6 +710,11 @@ able to intercept the user+password. See also \fI--location-trusted\fP on how
to change this. You can limit the amount of redirects to follow by using the to change this. You can limit the amount of redirects to follow by using the
\fI--max-redirs\fP option. \fI--max-redirs\fP option.
When curl follows a redirect and the request is not a plain GET (for example
POST or PUT), it will do the following request with a GET if the HTTP response
was 301, 302, or 303. If the response code was any other 3xx code, curl will
re-send the following request using the same unmodified method.
If this option is used twice, the second will again disable location following. If this option is used twice, the second will again disable location following.
.IP "--location-trusted" .IP "--location-trusted"
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name + (HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
@@ -867,7 +878,7 @@ separate file.
If this option is used several times, the last one will be used. If this option is used several times, the last one will be used.
.IP "-P/--ftp-port <address>" .IP "-P/--ftp-port <address>"
(FTP) Reverses the initiator/listener roles when connecting with ftp. This (FTP) Reverses the initiator/listener roles when connecting with ftp. This
switch makes Curl use the PORT command instead of PASV. In practice, PORT switch makes Curl use the PORT command instead of PASV. In practise, PORT
tells the server to connect to the client's specified address and port, while tells the server to connect to the client's specified address and port, while
PASV asks the server for an ip address and port to connect to. <address> PASV asks the server for an ip address and port to connect to. <address>
should be one of: should be one of:
@@ -891,14 +902,18 @@ If used as the first parameter on the command line, the \fIcurlrc\fP config
file will not be read and used. See the \fI-K/--config\fP for details on the file will not be read and used. See the \fI-K/--config\fP for details on the
default config file search path. default config file search path.
.IP "-Q/--quote <command>" .IP "-Q/--quote <command>"
(FTP) Send an arbitrary command to the remote FTP server. Quote commands are (FTP/SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote
sent BEFORE the transfer is taking place (just after the initial PWD command commands are sent BEFORE the transfer is taking place (just after the
to be exact). To make commands take place after a successful transfer, prefix initial PWD command in an FTP transfer, to be exact). To make commands
them with a dash '-'. To make commands get sent after libcurl has changed take place after a successful transfer, prefix them with a dash '-'.
working directory, just before the transfer command(s), prefix the command To make commands get sent after libcurl has changed working directory,
with '+'. You may specify any amount of commands. If the server returns just before the transfer command(s), prefix the command with '+' (this
failure for one of the commands, the entire operation will be aborted. You is only supported for FTP). You may specify any number of commands. If
must send syntactically correct FTP commands as RFC959 defines. the server returns failure for one of the commands, the entire operation
will be aborted. You must send syntactically correct FTP commands as
RFC959 defines to FTP servers, or one of the following commands (with
appropriate arguments) to SFTP servers: chgrp, chmod, chown, ln, mkdir,
pwd, rename, rm, rmdir, symlink.
This option can be used multiple times. This option can be used multiple times.
.IP "--random-file <file>" .IP "--random-file <file>"
@@ -936,6 +951,10 @@ specifies two separate 100 bytes ranges(*)(H)
(*) = NOTE that this will cause the server to reply with a multipart (*) = NOTE that this will cause the server to reply with a multipart
response! response!
Only digit characters (0-9) are valid in 'start' and 'stop' of range syntax
\&'start-stop'. If a non-digit character is given in the range, the server's
response will be indeterminable, depending on different server's configuration.
You should also be aware that many HTTP/1.1 servers do not have this feature You should also be aware that many HTTP/1.1 servers do not have this feature
enabled, so that when you attempt to get a range, you'll instead get the whole enabled, so that when you attempt to get a range, you'll instead get the whole
document. document.
@@ -1082,7 +1101,7 @@ If this option is used several times, each occurrence will toggle it on/off.
Specify user and password to use for server authentication. Overrides Specify user and password to use for server authentication. Overrides
\fI-n/--netrc\fP and \fI--netrc-optional\fP. \fI-n/--netrc\fP and \fI--netrc-optional\fP.
If you use an SSPI-enabled curl binary and do NTLM autentication, you can If you use an SSPI-enabled curl binary and do NTLM authentication, you can
force curl to pick up the user name and password from your environment by force curl to pick up the user name and password from your environment by
simply specifying a single colon with this option: "-u :". simply specifying a single colon with this option: "-u :".
@@ -1090,7 +1109,7 @@ If this option is used several times, the last one will be used.
.IP "-U/--proxy-user <user:password>" .IP "-U/--proxy-user <user:password>"
Specify user and password to use for proxy authentication. Specify user and password to use for proxy authentication.
If you use an SSPI-enabled curl binary and do NTLM autentication, you can If you use an SSPI-enabled curl binary and do NTLM authentication, you can
force curl to pick up the user name and password from your environment by force curl to pick up the user name and password from your environment by
simply specifying a single colon with this option: "-U :". simply specifying a single colon with this option: "-U :".
@@ -1139,7 +1158,7 @@ Automatic decompression of compressed files over HTTP is supported.
.IP "NTLM" .IP "NTLM"
NTLM authentication is supported. NTLM authentication is supported.
.IP "GSS-Negotiate" .IP "GSS-Negotiate"
Negotiate authentication is supported. Negotiate authentication and krb5 for ftp is supported.
.IP "Debug" .IP "Debug"
This curl uses a libcurl built with Debug. This enables more error-tracking This curl uses a libcurl built with Debug. This enables more error-tracking
and memory debugging etc. For curl-developers only! and memory debugging etc. For curl-developers only!
@@ -1458,7 +1477,7 @@ Internal error. A function was called in a bad order.
.IP 45 .IP 45
Interface error. A specified outgoing interface could not be used. Interface error. A specified outgoing interface could not be used.
.IP 46 .IP 46
Bad password entered. An error was signaled when the password was entered. Bad password entered. An error was signalled when the password was entered.
.IP 47 .IP 47
Too many redirects. When following redirects, curl hit the maximum amount. Too many redirects. When following redirects, curl hit the maximum amount.
.IP 48 .IP 48

View File

@@ -1,2 +1,30 @@
Makefile Makefile
Makefile.in Makefile.in
.deps
.libs
10-at-a-time
anyauthput
cookie_interface
debug
fileupload
fopen
ftpget
ftpgetresp
ftpupload
getinfo
getinmemory
http-post
httpput
https
multi-app
multi-debugcallback
multi-double
multi-post
multi-single
persistant
post-callback
postit2
sepheaders
simple
simplepost
simplessl

View File

@@ -13,7 +13,10 @@
* Written by Michael Wallner * Written by Michael Wallner
*/ */
#include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <curl/multi.h> #include <curl/multi.h>
static const char *urls[] = { static const char *urls[] = {
@@ -106,6 +109,10 @@ int main(void)
cm = curl_multi_init(); cm = curl_multi_init();
/* we can optionally limit the total amount of connections this multi handle
uses */
curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, MAX);
for (C = 0; C < MAX; ++C) { for (C = 0; C < MAX; ++C) {
init(cm, C); init(cm, C);
} }
@@ -123,20 +130,24 @@ int main(void)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
/* In a real-world program you OF COURSE check the return that maxfd is
bigger than -1 so that the call to select() below makes sense! */
if (curl_multi_timeout(cm, &L)) { if (curl_multi_timeout(cm, &L)) {
fprintf(stderr, "E: curl_multi_timeout\n"); fprintf(stderr, "E: curl_multi_timeout\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
if (L == -1)
L = 100;
T.tv_sec = L/1000; if (M == -1) {
T.tv_usec = (L%1000)*1000; sleep(L / 1000);
} else {
T.tv_sec = L/1000;
T.tv_usec = (L%1000)*1000;
if (0 > select(M+1, &R, &W, &E, &T)) { if (0 > select(M+1, &R, &W, &E, &T)) {
fprintf(stderr, "E: select\n"); fprintf(stderr, "E: select(%i,,,,%li): %i: %s\n",
return EXIT_FAILURE; M+1, L, errno, strerror(errno));
return EXIT_FAILURE;
}
} }
} }
@@ -155,6 +166,8 @@ int main(void)
} }
if (C < CNT) { if (C < CNT) {
init(cm, C++); init(cm, C++);
U++; /* just to prevent it from remaining at 0 if there are more
URLs to get */
} }
} }
} }

View File

@@ -2,17 +2,29 @@
# $Id$ # $Id$
# #
AUTOMAKE_OPTIONS = foreign no-dependencies AUTOMAKE_OPTIONS = foreign nostdinc
EXTRA_DIST = README curlgtk.c sepheaders.c simple.c postit2.c \ EXTRA_DIST = README Makefile.example makefile.dj $(COMPLICATED_EXAMPLES)
persistant.c ftpget.c Makefile.example multithread.c getinmemory.c \
ftpupload.c httpput.c simplessl.c ftpgetresp.c http-post.c \ INCLUDES = -I$(top_srcdir)/include
post-callback.c multi-app.c multi-double.c multi-single.c \
multi-post.c fopen.c simplepost.c makefile.dj curlx.c https.c \ LIBDIR = $(top_builddir)/lib
multi-debugcallback.c fileupload.c getinfo.c ftp3rdparty.c debug.c \
anyauthput.c htmltitle.cc htmltidy.c opensslthreadlock.c \ # Dependencies
cookie_interface.c cacertinmem.c synctime.c sampleconv.c ftpuploadresume.c \ LDADD = $(LIBDIR)/libcurl.la
10-at-a-time.c hiperfifo.c ghiper.c
# These are all libcurl example programs to be test compiled
noinst_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
debug fileupload fopen ftpget ftpgetresp ftpupload \
getinfo getinmemory http-post httpput \
https multi-app multi-debugcallback multi-double \
multi-post multi-single persistant post-callback \
postit2 sepheaders simple simplepost simplessl
# These examples require external dependencies that may not be commonly
# available on POSIX systems, so don't bother attempting to compile them here.
COMPLICATED_EXAMPLES = \
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
ghiper.c hiperfifo.c htmltidy.c multithread.c \
opensslthreadlock.c sampleconv.c synctime.c
all:
@echo "done"

View File

@@ -29,9 +29,8 @@ LDFLAGS = -L/home/dast/lib -L/usr/local/ssl/lib
# We need -lcurl for the curl stuff # We need -lcurl for the curl stuff
# We need -lsocket and -lnsl when on Solaris # We need -lsocket and -lnsl when on Solaris
# We need -lssl and -lcrypto when using libcurl with SSL support # We need -lssl and -lcrypto when using libcurl with SSL support
# We need -ldl for dlopen() if that is in libdl
# We need -lpthread for the pthread example # We need -lpthread for the pthread example
LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto -dl LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
# Link the target with all objects and libraries # Link the target with all objects and libraries
$(TARGET) : $(OBJS) $(TARGET) : $(OBJS)

View File

@@ -11,6 +11,7 @@
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include <curl/curl.h> #include <curl/curl.h>
@@ -18,6 +19,10 @@
#error "upgrade your libcurl to no less than 7.12.3" #error "upgrade your libcurl to no less than 7.12.3"
#endif #endif
#ifndef TRUE
#define TRUE 1
#endif
/* /*
* This example shows a HTTP PUT operation with authentiction using "any" * This example shows a HTTP PUT operation with authentiction using "any"
* type. It PUTs a file given as a command line argument to the URL also given * type. It PUTs a file given as a command line argument to the URL also given
@@ -52,7 +57,7 @@ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
} }
/* read callback function, fread() look alike */ /* read callback function, fread() look alike */
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{ {
size_t retcode; size_t retcode;

View File

@@ -135,4 +135,5 @@ int main(void)
curl_easy_cleanup(ch); curl_easy_cleanup(ch);
curl_global_cleanup(); curl_global_cleanup();
return rv;
} }

View File

@@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
@@ -74,7 +75,7 @@ main(void)
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
/* Netscape format cookie */ /* Netscape format cookie */
snprintf(nline, 256, "%s\t%s\t%s\t%s\t%u\t%s\t%s", snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%lu\t%s\t%s",
".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!"); ".google.com", "TRUE", "/", "FALSE", time(NULL) + 31337, "PREF", "hello google, i like you very much!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if (res != CURLE_OK) { if (res != CURLE_OK) {
@@ -83,7 +84,7 @@ main(void)
} }
/* HTTP-header style cookie */ /* HTTP-header style cookie */
snprintf(nline, 256, snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; " "Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com"); "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline); res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);

View File

@@ -81,6 +81,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <curl/curl.h> #include <curl/curl.h>
#include <openssl/x509v3.h> #include <openssl/x509v3.h>
#include <openssl/x509_vfy.h> #include <openssl/x509_vfy.h>
@@ -94,13 +95,13 @@
#include <openssl/bio.h> #include <openssl/bio.h>
#include <openssl/ssl.h> #include <openssl/ssl.h>
static char *curlx_usage[]={ static const char *curlx_usage[]={
"usage: curlx args\n", "usage: curlx args\n",
" -p12 arg - tia file ", " -p12 arg - tia file ",
" -envpass arg - environement variable which content the tia private key password", " -envpass arg - environement variable which content the tia private key password",
" -out arg - output file (response)- default stdout", " -out arg - output file (response)- default stdout",
" -in arg - input file (request)- default stdin", " -in arg - input file (request)- default stdin",
" -connect arg - URL of the server for the connection ex: www.openevidenve.org", " -connect arg - URL of the server for the connection ex: www.openevidence.org",
" -mimetype arg - MIME type for data in ex : application/timestamp-query or application/dvcs -default application/timestamp-query", " -mimetype arg - MIME type for data in ex : application/timestamp-query or application/dvcs -default application/timestamp-query",
" -acceptmime arg - MIME type acceptable for the response ex : application/timestamp-response or application/dvcs -default none", " -acceptmime arg - MIME type acceptable for the response ex : application/timestamp-response or application/dvcs -default none",
" -accesstype arg - an Object identifier in an AIA/SIA method, e.g. AD_DVCS or ad_timestamping", " -accesstype arg - an Object identifier in an AIA/SIA method, e.g. AD_DVCS or ad_timestamping",
@@ -268,19 +269,21 @@ int main(int argc, char **argv) {
char* mimetype; char* mimetype;
char* mimetypeaccept=NULL; char* mimetypeaccept=NULL;
char* contenttype; char* contenttype;
char** pp; const char** pp;
unsigned char* hostporturl = NULL; unsigned char* hostporturl = NULL;
binaryptr=(char*)malloc(tabLength);
BIO * p12bio ; BIO * p12bio ;
char **args = argv + 1; char **args = argv + 1;
unsigned char * serverurl; unsigned char * serverurl;
sslctxparm p; sslctxparm p;
char *response; char *response;
p.verbose = 0;
CURLcode res; CURLcode res;
struct curl_slist * headers=NULL; struct curl_slist * headers=NULL;
int badarg=0;
binaryptr=(char*)malloc(tabLength);
p.verbose = 0;
p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE); p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE);
curl_global_init(CURL_GLOBAL_DEFAULT); curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -292,7 +295,6 @@ int main(int argc, char **argv) {
ERR_load_crypto_strings(); ERR_load_crypto_strings();
int badarg=0;
while (*args && *args[0] == '-') { while (*args && *args[0] == '-') {
if (!strcmp (*args, "-in")) { if (!strcmp (*args, "-in")) {
@@ -407,10 +409,9 @@ int main(int argc, char **argv) {
} }
else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */ else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */
if (!(serverurl = my_get_ext(p.usercert,p.accesstype,NID_info_access))) { if (!(serverurl = my_get_ext(p.usercert,p.accesstype,NID_info_access))) {
int j=0;
BIO_printf(p.errorbio,"no service URL in user cert " BIO_printf(p.errorbio,"no service URL in user cert "
"cherching in others certificats\n"); "cherching in others certificats\n");
int j=0;
int find=0;
for (j=0;j<sk_X509_num(p.ca);j++) { for (j=0;j<sk_X509_num(p.ca);j++) {
if ((serverurl = my_get_ext(sk_X509_value(p.ca,j),p.accesstype, if ((serverurl = my_get_ext(sk_X509_value(p.ca,j),p.accesstype,
NID_info_access))) NID_info_access)))

View File

@@ -17,7 +17,6 @@ int main(void)
{ {
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
curl_off_t size;
struct stat file_info; struct stat file_info;
double speed_upload, total_time; double speed_upload, total_time;
FILE *fd; FILE *fd;

View File

@@ -70,7 +70,7 @@ struct fcurl_data
typedef struct fcurl_data URL_FILE; typedef struct fcurl_data URL_FILE;
/* exported functions */ /* exported functions */
URL_FILE *url_fopen(char *url,const char *operation); URL_FILE *url_fopen(const char *url,const char *operation);
int url_fclose(URL_FILE *file); int url_fclose(URL_FILE *file);
int url_feof(URL_FILE *file); int url_feof(URL_FILE *file);
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file); size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
@@ -93,11 +93,11 @@ write_callback(char *buffer,
URL_FILE *url = (URL_FILE *)userp; URL_FILE *url = (URL_FILE *)userp;
size *= nitems; size *= nitems;
rembuff=url->buffer_len - url->buffer_pos;//remaining space in buffer rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
if(size > rembuff) if(size > rembuff)
{ {
//not enuf space in buffer /* not enough space in buffer */
newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff)); newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
if(newbuff==NULL) if(newbuff==NULL)
{ {
@@ -211,7 +211,7 @@ use_buffer(URL_FILE *file,int want)
URL_FILE * URL_FILE *
url_fopen(char *url,const char *operation) url_fopen(const char *url,const char *operation)
{ {
/* this code could check for URLs or types in the 'url' and /* this code could check for URLs or types in the 'url' and
basicly use the real fopen() for standard files */ basicly use the real fopen() for standard files */
@@ -236,7 +236,7 @@ url_fopen(char *url,const char *operation)
curl_easy_setopt(file->handle.curl, CURLOPT_URL, url); curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file); curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, FALSE); curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0);
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
if(!multi_handle) if(!multi_handle)
@@ -466,7 +466,7 @@ main(int argc, char *argv[])
int nread; int nread;
char buffer[256]; char buffer[256];
char *url; const char *url;
if(argc < 2) if(argc < 2)
{ {
@@ -481,7 +481,7 @@ main(int argc, char *argv[])
outf=fopen("fgets.test","w+"); outf=fopen("fgets.test","w+");
if(!outf) if(!outf)
{ {
perror("couldnt open fgets output file\n"); perror("couldn't open fgets output file\n");
return 1; return 1;
} }
@@ -508,7 +508,7 @@ main(int argc, char *argv[])
outf=fopen("fread.test","w+"); outf=fopen("fread.test","w+");
if(!outf) if(!outf)
{ {
perror("couldnt open fread output file\n"); perror("couldn't open fread output file\n");
return 1; return 1;
} }
@@ -533,7 +533,7 @@ main(int argc, char *argv[])
outf=fopen("rewind.test","w+"); outf=fopen("rewind.test","w+");
if(!outf) if(!outf)
{ {
perror("couldnt open fread output file\n"); perror("couldn't open fread output file\n");
return 1; return 1;
} }

View File

@@ -1,103 +0,0 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*/
#include <stdio.h>
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>
/*
* This is an example showing how to transfer a file between two remote hosts.
* 7.13.0 or later required.
*/
int main(void)
{
CURL *curl;
CURLcode res;
char source_url[] = "ftp://remotehost.com/path/to/source";
char target_url[] = "ftp://aotherserver.com/path/to/dest";
char sourceUserPass[] = "user:pass";
char targetUserPass[] = "user:pass";
char url[100];
struct curl_slist *source_pre_cmd = NULL;
struct curl_slist *target_pre_cmd = NULL;
struct curl_slist *source_post_cmd = NULL;
struct curl_slist *target_post_cmd = NULL;
char cmd[] = "PWD"; /* just to test */
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if (curl) {
/* The ordinary URL is the target when speaking 3rd party transfers */
curl_easy_setopt(curl, CURLOPT_URL, target_url);
/* Set a source URL */
curl_easy_setopt(curl, CURLOPT_SOURCE_URL, source_url);
/* Set target user and password */
curl_easy_setopt(curl, CURLOPT_USERPWD, targetUserPass);
/* Set source user and password */
curl_easy_setopt(curl, CURLOPT_SOURCE_USERPWD, sourceUserPass);
#if 0
/* FTPPORT enables PORT on the target side, instead of PASV. */
curl_easy_setopt(curl, CURLOPT_FTPPORT, ""); /* optional */
#endif
/* build a list of commands to pass to libcurl */
source_pre_cmd = curl_slist_append(source_pre_cmd, cmd);
/* Set a proxy pre-quote command */
curl_easy_setopt(curl, CURLOPT_SOURCE_PREQUOTE, source_pre_cmd);
/* build a list of commands to pass to libcurl */
target_pre_cmd = curl_slist_append(target_pre_cmd, cmd);
/* Set a pre-quote command */
curl_easy_setopt(curl, CURLOPT_PREQUOTE, target_pre_cmd);
/* build a list of commands to pass to libcurl */
source_post_cmd = curl_slist_append(source_post_cmd, cmd);
/* Set a proxy post-quote command */
curl_easy_setopt(curl, CURLOPT_SOURCE_POSTQUOTE, source_post_cmd);
/* build a list of commands to pass to libcurl */
target_post_cmd = curl_slist_append(target_post_cmd, cmd);
/* Set a post-quote command */
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, target_post_cmd);
/* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
res = curl_easy_perform(curl);
/* clean up the FTP commands list */
curl_slist_free_all(source_pre_cmd);
curl_slist_free_all(target_pre_cmd);
curl_slist_free_all(source_post_cmd);
curl_slist_free_all(target_post_cmd);
/* always cleanup */
curl_easy_cleanup(curl);
if(CURLE_OK != res) {
/* we failed */
fprintf(stderr, "curl told us %d\n", res);
}
}
curl_global_cleanup();
return 0;
}

View File

@@ -22,11 +22,11 @@
*/ */
struct FtpFile { struct FtpFile {
char *filename; const char *filename;
FILE *stream; FILE *stream;
}; };
int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
{ {
struct FtpFile *out=(struct FtpFile *)stream; struct FtpFile *out=(struct FtpFile *)stream;
if(out && !out->stream) { if(out && !out->stream) {
@@ -65,7 +65,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
/* Switch on full protocol/debug output */ /* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

View File

@@ -1,8 +1,8 @@
/***************************************************************************** /*****************************************************************************
* _ _ ____ _ * _ _ ____ _
* Project ___| | | | _ \| | * Project ___| | | | _ \| |
* / __| | | | |_) | | * / __| | | | |_) | |
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* $Id$ * $Id$
@@ -21,7 +21,7 @@
* This functionality was introduced in libcurl 7.9.3. * This functionality was introduced in libcurl 7.9.3.
*/ */
size_t static size_t
write_response(void *ptr, size_t size, size_t nmemb, void *data) write_response(void *ptr, size_t size, size_t nmemb, void *data)
{ {
FILE *writehere = (FILE *)data; FILE *writehere = (FILE *)data;
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
CURLcode res; CURLcode res;
FILE *ftpfile; FILE *ftpfile;
FILE *respfile; FILE *respfile;
/* local file name to store the file as */ /* local file name to store the file as */
ftpfile = fopen("ftp-list", "wb"); /* b is binary, needed on win32 */ ftpfile = fopen("ftp-list", "wb"); /* b is binary, needed on win32 */
@@ -46,6 +46,8 @@ int main(int argc, char **argv)
/* Get a file listing from sunet */ /* Get a file listing from sunet */
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/"); curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile); curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
/* If you intend to use this on windows with a libcurl DLL, you must use
CURLOPT_WRITEFUNCTION as well */
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response); curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
res = curl_easy_perform(curl); res = curl_easy_perform(curl);

View File

@@ -14,6 +14,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
/* /*
* This example shows an FTP upload, with a rename of the file just after * This example shows an FTP upload, with a rename of the file just after
@@ -31,14 +32,13 @@ int main(int argc, char **argv)
{ {
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
FILE *ftpfile;
FILE * hd_src ; FILE * hd_src ;
int hd ; int hd ;
struct stat file_info; struct stat file_info;
struct curl_slist *headerlist=NULL; struct curl_slist *headerlist=NULL;
char buf_1 [] = "RNFR " UPLOAD_FILE_AS; static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
char buf_2 [] = "RNTO " RENAME_FILE_TO; static const char buf_2 [] = "RNTO " RENAME_FILE_TO;
/* get the file size of the local file */ /* get the file size of the local file */
hd = open(LOCAL_FILE, O_RDONLY) ; hd = open(LOCAL_FILE, O_RDONLY) ;
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
headerlist = curl_slist_append(headerlist, buf_2); headerlist = curl_slist_append(headerlist, buf_2);
/* enable uploading */ /* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
/* specify target */ /* specify target */
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL); curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);

View File

@@ -24,7 +24,9 @@
/* The MinGW headers are missing a few Win32 function definitions, /* The MinGW headers are missing a few Win32 function definitions,
you shouldn't need this if you use VC++ */ you shouldn't need this if you use VC++ */
#ifdef __MINGW32__
int __cdecl _snscanf(const char * input, size_t length, const char * format, ...); int __cdecl _snscanf(const char * input, size_t length, const char * format, ...);
#endif
/* parse headers for Content-Length */ /* parse headers for Content-Length */
@@ -75,7 +77,7 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
return 0; return 0;
} }
curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, TRUE); curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1);
curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath); curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
@@ -91,9 +93,9 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f); curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */ curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */
curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, TRUE); curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1);
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, TRUE); curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1);
for (c = 0; (r != CURLE_OK) && (c < tries); c++) { for (c = 0; (r != CURLE_OK) && (c < tries); c++) {
/* are we resuming? */ /* are we resuming? */
@@ -108,22 +110,22 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
* because HEADER will dump the headers to stdout * because HEADER will dump the headers to stdout
* without it. * without it.
*/ */
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, TRUE); curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1);
curl_easy_setopt(curlhandle, CURLOPT_HEADER, TRUE); curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1);
r = curl_easy_perform(curlhandle); r = curl_easy_perform(curlhandle);
if (r != CURLE_OK) if (r != CURLE_OK)
continue; continue;
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, FALSE); curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0);
curl_easy_setopt(curlhandle, CURLOPT_HEADER, FALSE); curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0);
fseek(f, uploaded_len, SEEK_SET); fseek(f, uploaded_len, SEEK_SET);
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, TRUE); curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1);
} }
else { /* no */ else { /* no */
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, FALSE); curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0);
} }
r = curl_easy_perform(curlhandle); r = curl_easy_perform(curlhandle);

View File

@@ -26,7 +26,7 @@ struct MemoryStruct {
size_t size; size_t size;
}; };
void *myrealloc(void *ptr, size_t size) static void *myrealloc(void *ptr, size_t size)
{ {
/* There might be a realloc() out there that doesn't like reallocing /* There might be a realloc() out there that doesn't like reallocing
NULL pointers, so we take care of it here */ NULL pointers, so we take care of it here */
@@ -36,7 +36,7 @@ void *myrealloc(void *ptr, size_t size)
return malloc(size); return malloc(size);
} }
size_t static size_t
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
{ {
size_t realsize = size * nmemb; size_t realsize = size * nmemb;

View File

@@ -91,9 +91,9 @@ typedef struct _SockInfo {
/* Die if we get a bad CURLMcode somewhere */ /* Die if we get a bad CURLMcode somewhere */
static void mcode_or_die(char *where, CURLMcode code) { static void mcode_or_die(const char *where, CURLMcode code) {
if ( CURLM_OK != code ) { if ( CURLM_OK != code ) {
char *s; const char *s;
switch (code) { switch (code) {
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break; case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
case CURLM_OK: s="CURLM_OK"; break; case CURLM_OK: s="CURLM_OK"; break;
@@ -259,7 +259,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
{ {
GlobalInfo *g = (GlobalInfo*) cbp; GlobalInfo *g = (GlobalInfo*) cbp;
SockInfo *fdp = (SockInfo*) sockp; SockInfo *fdp = (SockInfo*) sockp;
char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" }; static const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]); MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
if (what == CURL_POLL_REMOVE) { if (what == CURL_POLL_REMOVE) {
@@ -402,7 +402,7 @@ static gboolean fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data)
int init_fifo(void) int init_fifo(void)
{ {
struct stat st; struct stat st;
char *fifo = "hiper.fifo"; const char *fifo = "hiper.fifo";
int socket; int socket;
if (lstat (fifo, &st) == 0) { if (lstat (fifo, &st) == 0) {

View File

@@ -92,18 +92,15 @@ typedef struct _SockInfo {
/* Update the event timer after curl_multi library calls */ /* Update the event timer after curl_multi library calls */
static void update_timeout(GlobalInfo *g) static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
{ {
long timeout_ms;
struct timeval timeout; struct timeval timeout;
curl_multi_timeout(g->multi, &timeout_ms);
if(timeout_ms < 0)
return;
timeout.tv_sec = timeout_ms/1000; timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000; timeout.tv_usec = (timeout_ms%1000)*1000;
fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
evtimer_add(&g->timer_event, &timeout); evtimer_add(&g->timer_event, &timeout);
return 0;
} }
@@ -185,9 +182,7 @@ static void event_cb(int fd, short kind, void *userp)
} while (rc == CURLM_CALL_MULTI_PERFORM); } while (rc == CURLM_CALL_MULTI_PERFORM);
mcode_or_die("event_cb: curl_multi_socket", rc); mcode_or_die("event_cb: curl_multi_socket", rc);
check_run_count(g); check_run_count(g);
if(g->still_running) { if ( g->still_running <= 0 ) {
update_timeout(g);
} else {
fprintf(MSG_OUT, "last transfer done, kill timeout\n"); fprintf(MSG_OUT, "last transfer done, kill timeout\n");
if (evtimer_pending(&g->timer_event, NULL)) { if (evtimer_pending(&g->timer_event, NULL)) {
evtimer_del(&g->timer_event); evtimer_del(&g->timer_event);
@@ -210,7 +205,6 @@ static void timer_cb(int fd, short kind, void *userp)
} while (rc == CURLM_CALL_MULTI_PERFORM); } while (rc == CURLM_CALL_MULTI_PERFORM);
mcode_or_die("timer_cb: curl_multi_socket", rc); mcode_or_die("timer_cb: curl_multi_socket", rc);
check_run_count(g); check_run_count(g);
if ( g->still_running ) { update_timeout(g); }
} }
@@ -258,7 +252,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
{ {
GlobalInfo *g = (GlobalInfo*) cbp; GlobalInfo *g = (GlobalInfo*) cbp;
SockInfo *fdp = (SockInfo*) sockp; SockInfo *fdp = (SockInfo*) sockp;
char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" }; const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
fprintf(MSG_OUT, fprintf(MSG_OUT,
"socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]); "socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
@@ -363,7 +357,7 @@ void fifo_cb(int fd, short event, void *arg) {
/* Create a named pipe and tell libevent to monitor it */ /* Create a named pipe and tell libevent to monitor it */
int init_fifo (GlobalInfo *g) { int init_fifo (GlobalInfo *g) {
struct stat st; struct stat st;
char *fifo = "hiper.fifo"; static const char *fifo = "hiper.fifo";
int socket; int socket;
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo); fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
@@ -406,10 +400,11 @@ int main(int argc, char **argv)
evtimer_set(&g.timer_event, timer_cb, &g); evtimer_set(&g.timer_event, timer_cb, &g);
curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb); curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g); curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
do { do {
rc = curl_multi_socket_all(g.multi, &g.still_running); rc = curl_multi_socket_all(g.multi, &g.still_running);
} while (CURLM_CALL_MULTI_PERFORM == rc); } while (CURLM_CALL_MULTI_PERFORM == rc);
update_timeout(&g);
event_dispatch(); event_dispatch();
curl_multi_cleanup(g.multi); curl_multi_cleanup(g.multi);
return 0; return 0;

View File

@@ -11,6 +11,7 @@
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include <curl/curl.h> #include <curl/curl.h>
@@ -24,7 +25,7 @@
* http://www.apacheweek.com/features/put * http://www.apacheweek.com/features/put
*/ */
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{ {
size_t retcode; size_t retcode;
@@ -75,10 +76,10 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* enable uploading */ /* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
/* HTTP PUT please */ /* HTTP PUT please */
curl_easy_setopt(curl, CURLOPT_PUT, TRUE); curl_easy_setopt(curl, CURLOPT_PUT, 1);
/* specify target URL, and note that this URL should include a file /* specify target URL, and note that this URL should include a file
name, not only a directory */ name, not only a directory */

View File

@@ -31,7 +31,7 @@ int main(void)
* default bundle, then the CURLOPT_CAPATH option might come handy for * default bundle, then the CURLOPT_CAPATH option might come handy for
* you. * you.
*/ */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
#endif #endif
#ifdef SKIP_HOSTNAME_VERFICATION #ifdef SKIP_HOSTNAME_VERFICATION

View File

@@ -47,7 +47,7 @@ int main(int argc, char **argv)
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com"); curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com"); curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, TRUE); curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1);
/* init a multi stack */ /* init a multi stack */
multi_handle = curl_multi_init(); multi_handle = curl_multi_init();

View File

@@ -19,7 +19,6 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
CURL *curl; CURL *curl;
CURLcode res;
CURLM *multi_handle; CURLM *multi_handle;
int still_running; int still_running;
@@ -27,7 +26,7 @@ int main(int argc, char *argv[])
struct curl_httppost *formpost=NULL; struct curl_httppost *formpost=NULL;
struct curl_httppost *lastptr=NULL; struct curl_httppost *lastptr=NULL;
struct curl_slist *headerlist=NULL; struct curl_slist *headerlist=NULL;
char buf[] = "Expect:"; static const char buf[] = "Expect:";
/* Fill in the file upload field. This makes libcurl load data from /* Fill in the file upload field. This makes libcurl load data from
the given file name when curl_easy_perform() is called. */ the given file name when curl_easy_perform() is called. */
@@ -58,7 +57,6 @@ int main(int argc, char *argv[])
wanted */ wanted */
headerlist = curl_slist_append(headerlist, buf); headerlist = curl_slist_append(headerlist, buf);
if(curl && multi_handle) { if(curl && multi_handle) {
int perform=0;
/* what URL that receives this POST */ /* what URL that receives this POST */
curl_easy_setopt(curl, CURLOPT_URL, curl_easy_setopt(curl, CURLOPT_URL,

View File

@@ -24,7 +24,7 @@
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
*/ */
char *urls[]= { const char *urls[]= {
"http://curl.haxx.se/", "http://curl.haxx.se/",
"ftp://cool.haxx.se/", "ftp://cool.haxx.se/",
"http://www.contactor.se/", "http://www.contactor.se/",
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
error = pthread_create(&tid[i], error = pthread_create(&tid[i],
NULL, /* default attributes please */ NULL, /* default attributes please */
pull_one_url, pull_one_url,
urls[i]); (void *)urls[i]);
if(0 != error) if(0 != error)
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error); fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
else else

View File

@@ -16,6 +16,11 @@
* Author: Jeremy Brown * Author: Jeremy Brown
*/ */
#include <stdio.h>
#include <pthread.h>
#include <openssl/err.h>
#define MUTEX_TYPE pthread_mutex_t #define MUTEX_TYPE pthread_mutex_t
#define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL) #define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL)
#define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x)) #define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x))
@@ -25,7 +30,7 @@
void handle_error(const char *file, int lineno, const char *msg){ void handle_error(const char *file, int lineno, const char *msg){
fprintf(stderr, ** %s:%i %s\n, file, lineno, msg); fprintf(stderr, "** %s:%d %s\n", file, lineno, msg);
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
/* exit(-1); */ /* exit(-1); */
} }

View File

@@ -15,14 +15,14 @@
#include <string.h> #include <string.h>
#include <curl/curl.h> #include <curl/curl.h>
char data[]="this is what we post to the silly web server"; const char data[]="this is what we post to the silly web server";
struct WriteThis { struct WriteThis {
char *readptr; const char *readptr;
int sizeleft; int sizeleft;
}; };
size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
{ {
struct WriteThis *pooh = (struct WriteThis *)userp; struct WriteThis *pooh = (struct WriteThis *)userp;
@@ -55,7 +55,7 @@ int main(void)
curl_easy_setopt(curl, CURLOPT_URL, curl_easy_setopt(curl, CURLOPT_URL,
"http://receivingsite.com.pooh/index.cgi"); "http://receivingsite.com.pooh/index.cgi");
/* Now specify we want to POST data */ /* Now specify we want to POST data */
curl_easy_setopt(curl, CURLOPT_POST, TRUE); curl_easy_setopt(curl, CURLOPT_POST, 1);
/* we want to use our own read function */ /* we want to use our own read function */
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);

View File

@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
struct curl_httppost *formpost=NULL; struct curl_httppost *formpost=NULL;
struct curl_httppost *lastptr=NULL; struct curl_httppost *lastptr=NULL;
struct curl_slist *headerlist=NULL; struct curl_slist *headerlist=NULL;
char buf[] = "Expect:"; static const char buf[] = "Expect:";
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);

View File

@@ -16,7 +16,7 @@
#include <curl/types.h> #include <curl/types.h>
#include <curl/easy.h> #include <curl/easy.h>
size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
{ {
int written = fwrite(ptr, size, nmemb, (FILE *)stream); int written = fwrite(ptr, size, nmemb, (FILE *)stream);
return written; return written;
@@ -25,9 +25,9 @@ size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
CURL *curl_handle; CURL *curl_handle;
char *headerfilename = "head.out"; static const char *headerfilename = "head.out";
FILE *headerfile; FILE *headerfile;
char *bodyfilename = "body.out"; static const char *bodyfilename = "body.out";
FILE *bodyfile; FILE *bodyfile;
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);

View File

@@ -9,6 +9,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <curl/curl.h> #include <curl/curl.h>
int main(void) int main(void)
@@ -16,7 +17,7 @@ int main(void)
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
char *postthis="moo mooo moo moo"; static const char *postthis="moo mooo moo moo";
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {

View File

@@ -38,9 +38,10 @@ int main(int argc, char **argv)
CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
FILE *headerfile; FILE *headerfile;
const char *pPassphrase = NULL;
const char *pCertFile = "testcert.pem"; static const char *pCertFile = "testcert.pem";
const char *pCACertFile="cacert.pem"; static const char *pCACertFile="cacert.pem";
const char *pKeyName; const char *pKeyName;
const char *pKeyType; const char *pKeyType;
@@ -57,8 +58,6 @@ int main(int argc, char **argv)
pEngine = NULL; pEngine = NULL;
#endif #endif
const char *pPassphrase = NULL;
headerfile = fopen("dumpit", "w"); headerfile = fopen("dumpit", "w");
curl_global_init(CURL_GLOBAL_DEFAULT); curl_global_init(CURL_GLOBAL_DEFAULT);
@@ -96,7 +95,7 @@ int main(int argc, char **argv)
/* sorry, for engine we must set the passphrase /* sorry, for engine we must set the passphrase
(if the key has one...) */ (if the key has one...) */
if (pPassphrase) if (pPassphrase)
curl_easy_setopt(curl,CURLOPT_SSLKEYPASSWD,pPassphrase); curl_easy_setopt(curl,CURLOPT_KEYPASSWD,pPassphrase);
/* if we use a key stored in a crypto engine, /* if we use a key stored in a crypto engine,
we must set the key type to "ENG" */ we must set the key type to "ENG" */

View File

@@ -87,7 +87,7 @@ typedef struct
char timeserver[MAX_STRING1]; char timeserver[MAX_STRING1];
} conf_t; } conf_t;
char DefaultTimeServer[4][MAX_STRING1] = const char DefaultTimeServer[4][MAX_STRING1] =
{ {
"http://nist.time.gov/timezone.cgi?UTC/s/0", "http://nist.time.gov/timezone.cgi?UTC/s/0",
"http://www.google.com/", "http://www.google.com/",
@@ -95,9 +95,9 @@ char DefaultTimeServer[4][MAX_STRING1] =
"http://www.worldtime.com/cgi-bin/wt.cgi" "http://www.worldtime.com/cgi-bin/wt.cgi"
}; };
char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
char *MthStr[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", const char *MthStr[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int ShowAllHeader; int ShowAllHeader;
int AutoSyncTime; int AutoSyncTime;

View File

@@ -1,8 +1,27 @@
.\" You can view this file with: .\" **************************************************************************
.\" nroff -man [file] .\" * _ _ ____ _
.\" $Id$ .\" * Project ___| | | | _ \| |
.\" * / __| | | | |_) | |
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" * $Id$
.\" **************************************************************************
.\" .\"
.TH curl_easy_cleanup 3 "12 Oct 2006" "libcurl 7.7" "libcurl Manual" .TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
.SH NAME .SH NAME
curl_easy_cleanup - End a libcurl easy session curl_easy_cleanup - End a libcurl easy session
.SH SYNOPSIS .SH SYNOPSIS
@@ -19,11 +38,12 @@ This will effectively close all connections this handle has used and possibly
has kept open until now. Don't call this function if you intend to transfer has kept open until now. Don't call this function if you intend to transfer
more files. more files.
When you've called this, you can safely remove all the strings you've
previously told libcurl to use, as it won't use them anymore now.
Any uses of the \fBhandle\fP after this function has been called are Any uses of the \fBhandle\fP after this function has been called are
illegal. This kills the handle and all memory associated with it! illegal. This kills the handle and all memory associated with it!
With libcurl versions prior to 7.17.: when you've called this, you can safely
remove all the strings you've previously told libcurl to use, as it won't use
them anymore now.
.SH RETURN VALUE .SH RETURN VALUE
None None
.SH "SEE ALSO" .SH "SEE ALSO"

View File

@@ -39,7 +39,7 @@ this function AFTER a performed transfer if you want to get transfer- oriented
data. data.
You should not free the memory returned by this function unless it is You should not free the memory returned by this function unless it is
explictly mentioned below. explicitly mentioned below.
.SH AVAILABLE INFORMATION .SH AVAILABLE INFORMATION
The following information can be extracted: The following information can be extracted:
.IP CURLINFO_EFFECTIVE_URL .IP CURLINFO_EFFECTIVE_URL
@@ -133,7 +133,9 @@ protocol used doesn't support this.
.IP CURLINFO_PRIVATE .IP CURLINFO_PRIVATE
Pass a pointer to a 'char *' to receive the pointer to the private data Pass a pointer to a 'char *' to receive the pointer to the private data
associated with the curl handle (set with the CURLOPT_PRIVATE option to associated with the curl handle (set with the CURLOPT_PRIVATE option to
\fIcurl_easy_setopt(3)\fP). (Added in 7.10.3) \fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
value is returned as a 'char *', although effectively being a 'void *'.
(Added in 7.10.3)
.IP CURLINFO_HTTPAUTH_AVAIL .IP CURLINFO_HTTPAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication Pass a pointer to a long to receive a bitmask indicating the authentication
method(s) available. The meaning of the bits is explained in the method(s) available. The meaning of the bits is explained in the

View File

@@ -21,7 +21,7 @@
.\" * $Id$ .\" * $Id$
.\" ************************************************************************** .\" **************************************************************************
.\" .\"
.TH curl_easy_setopt 3 "22 Feb 2007" "libcurl 7.16.2" "libcurl Manual" .TH curl_easy_setopt 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl Manual"
.SH NAME .SH NAME
curl_easy_setopt \- set options for a curl easy handle curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS .SH SYNOPSIS
@@ -44,11 +44,13 @@ between transfers, so if you want subsequent transfers with different options,
you must change them between the transfers. You can optionally reset all you must change them between the transfers. You can optionally reset all
options back to internal default with \fIcurl_easy_reset(3)\fP. options back to internal default with \fIcurl_easy_reset(3)\fP.
Strings passed to libcurl as 'char *' arguments, will not be copied by the Strings passed to libcurl as 'char *' arguments, are copied by the library;
library. Instead you should keep them available until libcurl no longer needs thus the string storage associated to the pointer argument may be overwritten
them. Failing to do so will cause very odd behavior or even crashes. libcurl after curl_easy_setopt() returns. Exceptions to this rule are described in
will need them until you call \fIcurl_easy_cleanup(3)\fP or you set the same the option details below.
option again to use a different pointer.
NOTE: before 7.17.0 strings were not copied. Instead the user was forced keep
them available until libcurl no longer needed them.
The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or
\fIcurl_easy_duphandle(3)\fP call. \fIcurl_easy_duphandle(3)\fP call.
@@ -194,8 +196,7 @@ this callback will cause libcurl to abort the transfer and return
If you transfer data with the multi interface, this function will not be If you transfer data with the multi interface, this function will not be
called during periods of idleness unless you call the appropriate libcurl called during periods of idleness unless you call the appropriate libcurl
function that performs transfers. Usage of the \fBCURLOPT_PROGRESSFUNCTION\fP function that performs transfers.
callback is not recommended when using the multi interface.
\fICURLOPT_NOPROGRESS\fP must be set to FALSE to make this function actually \fICURLOPT_NOPROGRESS\fP must be set to FALSE to make this function actually
get called. get called.
@@ -330,6 +331,12 @@ system.
Pass a char * to a buffer that the libcurl may store human readable error Pass a char * to a buffer that the libcurl may store human readable error
messages in. This may be more helpful than just the return code from messages in. This may be more helpful than just the return code from
\fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big. \fIcurl_easy_perform\fP. The buffer must be at least CURL_ERROR_SIZE big.
Although this argument is a 'char *', it does not describe an input string.
Therefore the (probably undefined) contents of the buffer is NOT copied
by the library. You should keep the associated storage available until
libcurl no longer needs it. Failing to do so will cause very odd behavior
or even crashes. libcurl will need it until you call \fIcurl_easy_cleanup(3)\fP
or you set the same option again to use a different pointer.
Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better Use \fICURLOPT_VERBOSE\fP and \fICURLOPT_DEBUGFUNCTION\fP to better
debug/trace why errors happen. debug/trace why errors happen.
@@ -345,7 +352,7 @@ A non-zero parameter tells the library to fail silently if the HTTP code
returned is equal to or larger than 400. The default action would be to return returned is equal to or larger than 400. The default action would be to return
the page normally, ignoring that code. the page normally, ignoring that code.
This method is not fail-safe and there are occasions where non-succesful This method is not fail-safe and there are occasions where non-successful
response codes will slip through, especially when authentication is involved response codes will slip through, especially when authentication is involved
(response codes 401 and 407). (response codes 401 and 407).
@@ -445,7 +452,7 @@ not an order. You cannot be guaranteed to actually get the given size. (Added
in 7.10) in 7.10)
This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it This size is by default set as big as possible (CURL_MAX_WRITE_SIZE), so it
only makse sense to use this option if you want it smaller. only makes sense to use this option if you want it smaller.
.IP CURLOPT_PORT .IP CURLOPT_PORT
Pass a long specifying what remote port number to connect to, instead of the Pass a long specifying what remote port number to connect to, instead of the
one specified in the URL or the default port for the used protocol. one specified in the URL or the default port for the used protocol.
@@ -649,7 +656,7 @@ When setting \fICURLOPT_POST\fP to a non-zero value, it will automatically set
\fICURLOPT_NOBODY\fP to 0 (since 7.14.1). \fICURLOPT_NOBODY\fP to 0 (since 7.14.1).
If you issue a POST request and then want to make a HEAD or GET using the same If you issue a POST request and then want to make a HEAD or GET using the same
re-used handle, you must explictly set the new request type using re-used handle, you must explicitly set the new request type using
\fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar. \fICURLOPT_NOBODY\fP or \fICURLOPT_HTTPGET\fP or similar.
.IP CURLOPT_POSTFIELDS .IP CURLOPT_POSTFIELDS
Pass a char * as parameter, which should be the full data to post in an HTTP Pass a char * as parameter, which should be the full data to post in an HTTP
@@ -662,6 +669,12 @@ set that Content-Type by default when this option is used), which is the most
commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using commonly used one by HTML forms. See also the \fICURLOPT_POST\fP. Using
\fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP. \fICURLOPT_POSTFIELDS\fP implies \fICURLOPT_POST\fP.
If you want to do a zero-byte POST, you need to set
\fICURLOPT_POSTFIELDSIZE\fP explicitly to zero, as simply setting
\fICURLOPT_POSTFIELDS\fP to NULL or "" just effectively disables the sending
of the specified string. libcurl will instead assume that you'll send the POST
data using the read callback!
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header. Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual. You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
@@ -736,10 +749,9 @@ The linked list should be a fully valid list of struct curl_slist structs, and
be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and be properly filled in. Use \fIcurl_slist_append(3)\fP to create the list and
\fIcurl_slist_free_all(3)\fP to clean up an entire list. \fIcurl_slist_free_all(3)\fP to clean up an entire list.
The alias itself is not parsed for any version strings. So if your alias is The alias itself is not parsed for any version strings. Before libcurl 7.16.3,
\&"MYHTTP/9.9", Libcurl will not treat the server as responding with HTTP Libcurl used the value set by option \fICURLOPT_HTTP_VERSION\fP, but starting
version 9.9. Instead Libcurl will use the value set by option with 7.16.3 the protocol is assumed to match HTTP 1.0 when an alias matched.
\fICURLOPT_HTTP_VERSION\fP.
.IP CURLOPT_COOKIE .IP CURLOPT_COOKIE
Pass a pointer to a zero terminated string as parameter. It will be used to Pass a pointer to a zero terminated string as parameter. It will be used to
set a cookie in the http request. The format of the string should be set a cookie in the http request. The format of the string should be
@@ -752,7 +764,7 @@ multiple cookies in one string like this: "name1=content1; name2=content2;"
etc. etc.
Using this option multiple times will only make the latest string override the Using this option multiple times will only make the latest string override the
previously ones. previous ones.
.IP CURLOPT_COOKIEFILE .IP CURLOPT_COOKIEFILE
Pass a pointer to a zero terminated string as parameter. It should contain the Pass a pointer to a zero terminated string as parameter. It should contain the
name of your file holding cookie data to read. The cookie data may be in name of your file holding cookie data to read. The cookie data may be in
@@ -811,6 +823,7 @@ it thinks fit.
Enforce HTTP 1.0 requests. Enforce HTTP 1.0 requests.
.IP CURL_HTTP_VERSION_1_1 .IP CURL_HTTP_VERSION_1_1
Enforce HTTP 1.1 requests. Enforce HTTP 1.1 requests.
.RE
.IP CURLOPT_IGNORE_CONTENT_LENGTH .IP CURLOPT_IGNORE_CONTENT_LENGTH
Ignore the Content-Length header. This is useful for Apache 1.x (and similar Ignore the Content-Length header. This is useful for Apache 1.x (and similar
servers) which will report incorrect content length for files over 2 servers) which will report incorrect content length for files over 2
@@ -827,7 +840,6 @@ Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
transfer decoding will be disabled, if set to 1 it is enabled transfer decoding will be disabled, if set to 1 it is enabled
(default). libcurl does chunked transfer decoding by default unless this (default). libcurl does chunked transfer decoding by default unless this
option is set to zero. (added in 7.16.2) option is set to zero. (added in 7.16.2)
.RE
.SH FTP OPTIONS .SH FTP OPTIONS
.IP CURLOPT_FTPPORT .IP CURLOPT_FTPPORT
Pass a pointer to a zero terminated string as parameter. It will be used to Pass a pointer to a zero terminated string as parameter. It will be used to
@@ -840,19 +852,22 @@ address. Default FTP operations are passive, and thus won't use PORT.
You disable PORT again and go back to using the passive version by setting You disable PORT again and go back to using the passive version by setting
this option to NULL. this option to NULL.
.IP CURLOPT_QUOTE .IP CURLOPT_QUOTE
Pass a pointer to a linked list of FTP commands to pass to the server prior to Pass a pointer to a linked list of FTP or SFTP commands to pass to
your ftp request. This will be done before any other FTP commands are issued the server prior to your ftp request. This will be done before any
(even before the CWD command). The linked list should be a fully valid list of other commands are issued (even before the CWD command for FTP). The
'struct curl_slist' structs properly filled in. Use \fIcurl_slist_append(3)\fP linked list should be a fully valid list of 'struct curl_slist' structs
to append strings (commands) to the list, and clear the entire list afterwards properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
with \fIcurl_slist_free_all(3)\fP. Disable this operation again by setting a to append strings (commands) to the list, and clear the entire list
NULL to this option. afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation
again by setting a NULL to this option.
The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd,
rename, rm, rmdir, symlink. (SFTP support added in 7.16.3)
.IP CURLOPT_POSTQUOTE .IP CURLOPT_POSTQUOTE
Pass a pointer to a linked list of FTP commands to pass to the server after Pass a pointer to a linked list of FTP or SFTP commands to pass to the
your ftp transfer request. The linked list should be a fully valid list of server after your ftp transfer request. The linked list should be a
struct curl_slist structs properly filled in as described for fully valid list of struct curl_slist structs properly filled in as
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this described for \fICURLOPT_QUOTE\fP. Disable this operation again by
option. setting a NULL to this option.
.IP CURLOPT_PREQUOTE .IP CURLOPT_PREQUOTE
Pass a pointer to a linked list of FTP commands to pass to the server after Pass a pointer to a linked list of FTP commands to pass to the server after
the transfer type is set. The linked list should be a fully valid list of the transfer type is set. The linked list should be a fully valid list of
@@ -860,17 +875,21 @@ struct curl_slist structs properly filled in as described for
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this \fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero, option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
this option didn't work. this option didn't work.
.IP CURLOPT_FTPLISTONLY .IP CURLOPT_DIRLISTONLY
A non-zero parameter tells the library to just list the names of an ftp A non-zero parameter tells the library to just list the names of files in a
directory, instead of doing a full directory listing that would include file directory, instead of doing a full directory listing that would include file
sizes, dates etc. sizes, dates etc. This works for FTP and SFTP URLs.
This causes an FTP NLST command to be sent. Beware that some FTP servers list This causes an FTP NLST command to be sent on an FTP server. Beware
only files in their response to NLST; they might not include subdirectories that some FTP servers list only files in their response to NLST; they
and symbolic links. might not include subdirectories and symbolic links.
.IP CURLOPT_FTPAPPEND
(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
.IP CURLOPT_APPEND
A non-zero parameter tells the library to append to the remote file instead of A non-zero parameter tells the library to append to the remote file instead of
overwrite it. This is only useful when uploading to an ftp site. overwrite it. This is only useful when uploading to an ftp site.
(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
.IP CURLOPT_FTP_USE_EPRT .IP CURLOPT_FTP_USE_EPRT
Pass a long. If the value is non-zero, it tells curl to use the EPRT (and Pass a long. If the value is non-zero, it tells curl to use the EPRT (and
LPRT) command when doing active FTP downloads (which is enabled by LPRT) command when doing active FTP downloads (which is enabled by
@@ -890,6 +909,11 @@ If the server is an IPv6 host, this option will have no effect as of 7.12.3.
Pass a long. If the value is non-zero, curl will attempt to create any remote Pass a long. If the value is non-zero, curl will attempt to create any remote
directory that it fails to CWD into. CWD is the command that changes working directory that it fails to CWD into. CWD is the command that changes working
directory. (Added in 7.10.7) directory. (Added in 7.10.7)
This setting also applies to SFTP-connections. curl will attempt to create
the remote directory if it can't obtain a handle to the target-location. The
creation will fail if a file of the same name as the directory to create
already exists or lack of permissions prevents creation. (Added in 7.16.3)
.IP CURLOPT_FTP_RESPONSE_TIMEOUT .IP CURLOPT_FTP_RESPONSE_TIMEOUT
Pass a long. Causes curl to set a timeout period (in seconds) on the amount Pass a long. Causes curl to set a timeout period (in seconds) on the amount
of time that the server is allowed to take in order to generate a response of time that the server is allowed to take in order to generate a response
@@ -912,18 +936,21 @@ same IP address it already uses for the control connection. But it will use
the port number from the 227-response. (Added in 7.14.2) the port number from the 227-response. (Added in 7.14.2)
This option has no effect if PORT, EPRT or EPSV is used instead of PASV. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
.IP CURLOPT_FTP_SSL .IP CURLOPT_USE_SSL
Pass a long using one of the values from below, to make libcurl use your Pass a long using one of the values from below, to make libcurl use your
desired level of SSL for the ftp transfer. (Added in 7.11.0) desired level of SSL for the ftp transfer. (Added in 7.11.0)
(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
were known as CURLFTPSSL_*)
.RS .RS
.IP CURLFTPSSL_NONE .IP CURLUSESSL_NONE
Don't attempt to use SSL. Don't attempt to use SSL.
.IP CURLFTPSSL_TRY .IP CURLUSESSL_TRY
Try using SSL, proceed as normal otherwise. Try using SSL, proceed as normal otherwise.
.IP CURLFTPSSL_CONTROL .IP CURLUSESSL_CONTROL
Require SSL for the control connection or fail with \fICURLE_FTP_SSL_FAILED\fP. Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
.IP CURLFTPSSL_ALL .IP CURLUSESSL_ALL
Require SSL for all communication or fail with \fICURLE_FTP_SSL_FAILED\fP. Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
.RE .RE
.IP CURLOPT_FTPSSLAUTH .IP CURLOPT_FTPSSLAUTH
Pass a long using one of the values from below, to alter how libcurl issues Pass a long using one of the values from below, to alter how libcurl issues
@@ -1036,6 +1063,9 @@ When uploading a file to a remote site, this option should be used to tell
libcurl what the expected size of the infile is. This value should be passed libcurl what the expected size of the infile is. This value should be passed
as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP. as a long. See also \fICURLOPT_INFILESIZE_LARGE\fP.
For uploading using SCP, this option or \fICURLOPT_INFILESIZE_LARGE\fP is
mandatory.
Note that this option does not limit how much data libcurl will actually send, Note that this option does not limit how much data libcurl will actually send,
as that is controlled entirely by what the read callback returns. as that is controlled entirely by what the read callback returns.
.IP CURLOPT_INFILESIZE_LARGE .IP CURLOPT_INFILESIZE_LARGE
@@ -1043,6 +1073,8 @@ When uploading a file to a remote site, this option should be used to tell
libcurl what the expected size of the infile is. This value should be passed libcurl what the expected size of the infile is. This value should be passed
as a curl_off_t. (Added in 7.11.0) as a curl_off_t. (Added in 7.11.0)
For uploading using SCP, this option or \fICURLOPT_INFILESIZE\fP is mandatory.
Note that this option does not limit how much data libcurl will actually send, Note that this option does not limit how much data libcurl will actually send,
as that is controlled entirely by what the read callback returns. as that is controlled entirely by what the read callback returns.
.IP CURLOPT_UPLOAD .IP CURLOPT_UPLOAD
@@ -1124,10 +1156,10 @@ speed. (Added in 7.15.5)
.IP CURLOPT_MAXCONNECTS .IP CURLOPT_MAXCONNECTS
Pass a long. The set number will be the persistent connection cache size. The Pass a long. The set number will be the persistent connection cache size. The
set amount will be the maximum amount of simultaneously open connections that set amount will be the maximum amount of simultaneously open connections that
libcurl may cache. Default is 5, and there isn't much point in changing this libcurl may cache in this easy handle. Default is 5, and there isn't much
value unless you are perfectly aware of how this work and changes libcurl's point in changing this value unless you are perfectly aware of how this work
behaviour. This concerns connection using any of the protocols that support and changes libcurl's behaviour. This concerns connection using any of the
persistent connections. protocols that support persistent connections.
When reaching the maximum limit, curl closes the oldest one in the cache to When reaching the maximum limit, curl closes the oldest one in the cache to
prevent the number of open connections to increase. prevent the number of open connections to increase.
@@ -1135,6 +1167,10 @@ prevent the number of open connections to increase.
If you already have performed transfers with this curl handle, setting a If you already have performed transfers with this curl handle, setting a
smaller MAXCONNECTS than before may cause open connections to get closed smaller MAXCONNECTS than before may cause open connections to get closed
unnecessarily. unnecessarily.
Note that if you add this easy handle to a multi handle, this setting is not
being acknowledged, but you must instead use \fIcurl_multi_setopt(3)\fP and
the \fICURLMOPT_MAXCONNECTS\fP option.
.IP CURLOPT_CLOSEPOLICY .IP CURLOPT_CLOSEPOLICY
(Obsolete) This option does nothing. (Obsolete) This option does nothing.
.IP CURLOPT_FRESH_CONNECT .IP CURLOPT_FRESH_CONNECT
@@ -1196,13 +1232,6 @@ with.
Pass a pointer to a zero terminated string as parameter. The string should be Pass a pointer to a zero terminated string as parameter. The string should be
the format of your certificate. Supported formats are "PEM" and "DER". (Added the format of your certificate. Supported formats are "PEM" and "DER". (Added
in 7.9.3) in 7.9.3)
.IP CURLOPT_SSLCERTPASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_SSLCERT\fP certificate.
This option is replaced by \fICURLOPT_SSLKEYPASSWD\fP and should only be used
for backward compatibility. You never needed a pass phrase to load a
certificate but you need one to load your private key.
.IP CURLOPT_SSLKEY .IP CURLOPT_SSLKEY
Pass a pointer to a zero terminated string as parameter. The string should be Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your private key. The default format is "PEM" and can be the file name of your private key. The default format is "PEM" and can be
@@ -1215,10 +1244,15 @@ The format "ENG" enables you to load the private key from a crypto engine. In
this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the
engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP. engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
\&"DER" format key file currently does not work because of a bug in OpenSSL. \&"DER" format key file currently does not work because of a bug in OpenSSL.
.IP CURLOPT_SSLKEYPASSWD .IP CURLOPT_KEYPASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_SSLKEY\fP or the password required to use the \fICURLOPT_SSLKEY\fP or
\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key. \fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
You never needed a pass phrase to load a certificate but you need one to
load your private key.
(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
CURLOPT_SSLCERTPASSWD up to 7.9.2)
.IP CURLOPT_SSLENGINE .IP CURLOPT_SSLENGINE
Pass a pointer to a zero terminated string as parameter. It will be used as Pass a pointer to a zero terminated string as parameter. It will be used as
the identifier for the crypto engine you want to use for your private the identifier for the crypto engine you want to use for your private
@@ -1356,27 +1390,32 @@ this to 1 to enable it. By default all transfers are done using the
cache. Note that while nothing ever should get hurt by attempting to reuse SSL cache. Note that while nothing ever should get hurt by attempting to reuse SSL
session-IDs, there seem to be broken SSL implementations in the wild that may session-IDs, there seem to be broken SSL implementations in the wild that may
require you to disable this in order for you to succeed. (Added in 7.16.0) require you to disable this in order for you to succeed. (Added in 7.16.0)
.IP CURLOPT_KRB4LEVEL .IP CURLOPT_KRBLEVEL
Pass a char * as parameter. Set the krb4 security level, this also enables Pass a char * as parameter. Set the kerberos security level for FTP; this
krb4 awareness. This is a string, 'clear', 'safe', 'confidential' or also enables kerberos awareness. This is a string, 'clear', 'safe',
\&'private'. If the string is set but doesn't match one of these, 'private' 'confidential' or \&'private'. If the string is set but doesn't match one
will be used. Set the string to NULL to disable kerberos4. The kerberos of these, 'private' will be used. Set the string to NULL to disable kerberos
support only works for FTP. support for FTP.
(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
.SH SSH OPTIONS .SH SSH OPTIONS
.IP CURLOPT_SSH_AUTH_TYPES .IP CURLOPT_SSH_AUTH_TYPES
Pass a long set to a bitmask consisting of one or more of Pass a long set to a bitmask consisting of one or more of
CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST, CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PASSWORD, CURLSSH_AUTH_HOST,
CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one. CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one.
(Added in 7.16.1)
.IP CURLOPT_SSH_PUBLIC_KEYFILE .IP CURLOPT_SSH_PUBLIC_KEYFILE
Pass a char * pointing to a file name for your public key. If not used, Pass a char * pointing to a file name for your public key. If not used,
libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP. libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
(Added in 7.16.1)
.IP CURLOPT_SSH_PRIVATE_KEYFILE .IP CURLOPT_SSH_PRIVATE_KEYFILE
Pass a char * pointing to a file name for your private key. If not used, Pass a char * pointing to a file name for your private key. If not used,
libcurl defaults to using \fB~/.ssh/id_dsa\fP. libcurl defaults to using \fB~/.ssh/id_dsa\fP.
If the file is password-protected, set the password with \fICURLOPT_SSLKEYPASSWD\fP. If the file is password-protected, set the password with \fICURLOPT_KEYPASSWD\fP.
(Added in 7.16.1)
.SH OTHER OPTIONS .SH OTHER OPTIONS
.IP CURLOPT_PRIVATE .IP CURLOPT_PRIVATE
Pass a char * as parameter, pointing to data that should be associated with Pass a void * as parameter, pointing to data that should be associated with
this curl handle. The pointer can subsequently be retrieved using this curl handle. The pointer can subsequently be retrieved using
\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself \fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
does nothing with this data. (Added in 7.10.3) does nothing with this data. (Added in 7.10.3)
@@ -1387,6 +1426,17 @@ this curl handle use the data from the shared handle instead of keeping the
data to itself. This enables several curl handles to share data. If the curl data to itself. This enables several curl handles to share data. If the curl
handles are used simultaneously, you \fBMUST\fP use the locking methods in the handles are used simultaneously, you \fBMUST\fP use the locking methods in the
share handle. See \fIcurl_share_setopt(3)\fP for details. share handle. See \fIcurl_share_setopt(3)\fP for details.
.IP CURLOPT_NEW_FILE_PERMS
Pass a long as a parameter, containing the value of the permissions that will
be assigned to newly created files on the remote server. The default value is
\fI0644\fP, but any valid value can be used. The only protocols that can use
this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP. (Added in 7.16.4)
.IP CURLOPT_NEW_DIRECTORY_PERMS
Pass a long as a parameter, containing the value of the permissions that will
be assigned to newly created directories on the remote server. The default
value is \fI0755\fP, but any valid value can be used. The only protocols that
can use this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP.
(Added in 7.16.4)
.SH TELNET OPTIONS .SH TELNET OPTIONS
.IP CURLOPT_TELNETOPTIONS .IP CURLOPT_TELNETOPTIONS
Provide a pointer to a curl_slist with variables to pass to the telnet Provide a pointer to a curl_slist with variables to pass to the telnet

View File

@@ -25,8 +25,8 @@ queue so calling this function again will not return the same message
again. It will instead return new messages at each new invoke until the queue again. It will instead return new messages at each new invoke until the queue
is emptied. is emptied.
The data the returned pointer points to will not survive calling \fBWARNING:\fP The data the returned pointer points to will not survive
\fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
\fIcurl_easy_cleanup(3)\fP. \fIcurl_easy_cleanup(3)\fP.
The 'CURLMsg' struct is very simple and only contain very basic information. The 'CURLMsg' struct is very simple and only contain very basic information.

View File

@@ -56,6 +56,22 @@ Pass a pointer to whatever you want passed to the
\fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is \fBcurl_multi_timer_callback\fP's third argument, the userp pointer. This is
not used by libcurl but only passed-thru as-is. Set the callback pointer with not used by libcurl but only passed-thru as-is. Set the callback pointer with
\fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0) \fICURLMOPT_TIMERFUNCTION\fP. (Added in 7.16.0)
.IP CURLMOPT_MAXCONNECTS
Pass a long. The set number will be used as the maximum amount of
simultaneously open connections that libcurl may cache. Default is 10, and
libcurl will enlarge the size for each added easy handle to make it fit 4
times the number of added easy handles.
By setting this option, you can prevent the cache size to grow beyond the
limit set by you.
When the cache is full, curl closes the oldest one in the cache to prevent the
number of open connections to increase.
This option is for the multi handle's use only, when using the easy interface
you should instead use the \fICURLOPT_MAXCONNECTS\fP option.
(Added in 7.16.3)
.SH RETURNS .SH RETURNS
The standard CURLMcode for multi interface error codes. Note that it returns a The standard CURLMcode for multi interface error codes. Note that it returns a
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl

View File

@@ -4,29 +4,40 @@
.SH NAME .SH NAME
curl_multi_socket \- reads/writes available data curl_multi_socket \- reads/writes available data
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <curl/curl.h> #include <curl/curl.h>
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
curl_socket_t sockfd, int ev_bitmask,
int *running_handles);
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd, CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
int *running_handles); int *running_handles);
CURLMcode curl_multi_socket_all(CURLM *multi_handle, CURLMcode curl_multi_socket_all(CURLM *multi_handle,
int *running_handles); int *running_handles);
.fi
.SH DESCRIPTION .SH DESCRIPTION
Alternative versions of \fIcurl_multi_perform(3)\fP that allows the Alternative versions of \fIcurl_multi_perform(3)\fP that allows the
application to pass in one of the file descriptors/sockets that have been application to pass in the file descriptor/socket that has been detected to
detected to have \&"action" on them and let libcurl perform. This allows have \&"action" on it and let libcurl perform. This allows libcurl to not have
libcurl to not have to scan through all possible file descriptors to check for to scan through all possible file descriptors to check for action. When the
action. When the application has detected action on a socket handled by application has detected action on a socket handled by libcurl, it should call
libcurl, it should call \fIcurl_multi_socket(3)\fP with the \fBsockfd\fP \fIcurl_multi_socket_action(3)\fP with the \fBsockfd\fP argument set to the
argument set to the socket with the action. socket with the action. When the events on a socket are known, they can be
passed as an events bitmask \fBev_bitmask\fP by first setting \fBev_bitmask\fP
to 0, and then adding using bitwise OR (|) any combination of events to be
choosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or CURL_CSELECT_ERR. When the
events on a socket are unknown, pass 0 instead, and libcurl will test the
descriptor internally.
At return, the int \fBrunning_handles\fP points to will contain the number of At return, the int \fBrunning_handles\fP points to will contain the number of
still running easy handles within the multi handle. When this number reaches still running easy handles within the multi handle. When this number reaches
zero, all transfers are complete/done. Note that when you call zero, all transfers are complete/done. Note that when you call
\fIcurl_multi_socket(3)\fP on a specific socket and the counter decreases by \fIcurl_multi_socket_action(3)\fP on a specific socket and the counter
one, it DOES NOT necessarily mean that this exact socket/transfer is the one decreases by one, it DOES NOT necessarily mean that this exact socket/transfer
that completed. Use \fIcurl_multi_info_read(3)\fP to figure out which easy is the one that completed. Use \fIcurl_multi_info_read(3)\fP to figure out
handle that completed. which easy handle that completed.
The curl_multi_socket functions inform the application about updates in the The curl_multi_socket functions inform the application about updates in the
socket (file descriptor) status by doing none, one or multiple calls to the socket (file descriptor) status by doing none, one or multiple calls to the
@@ -44,6 +55,10 @@ wait for socket actions \- at most \- before doing the timeout action: call
the \fBcurl_multi_socket(3)\fP function with the \fBsockfd\fP argument set to the \fBcurl_multi_socket(3)\fP function with the \fBsockfd\fP argument set to
CURL_SOCKET_TIMEOUT. CURL_SOCKET_TIMEOUT.
Usage of \fIcurl_multi_socket(3)\fP is depricated, whereas the function is
equivalent to \fIcurl_multi_socket_action(3)\fP, when \fBev_bitmask\fP is set
to 0.
.SH "CALLBACK DETAILS" .SH "CALLBACK DETAILS"
The socket \fBcallback\fP function uses a prototype like this The socket \fBcallback\fP function uses a prototype like this
@@ -91,7 +106,7 @@ The \fIuserp\fP argument is a private pointer you have previously set with
CURLMcode type, general libcurl multi interface error code. CURLMcode type, general libcurl multi interface error code.
If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basically means that you
should call \fIcurl_multi_perform\fP again, before you wait for more actions should call \fIcurl_multi_socket(3)\fP again, before you wait for more actions
on libcurl's sockets. You don't have to do it immediately, but the return code on libcurl's sockets. You don't have to do it immediately, but the return code
means that libcurl may have more data available to return or that there may be means that libcurl may have more data available to return or that there may be
more data to send off before it is "satisfied". more data to send off before it is "satisfied".
@@ -104,23 +119,32 @@ function returns OK.
2. Set the socket callback with CURLMOPT_SOCKETFUNCTION 2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
3. Add easy handles 3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what
timeout value to use when waiting for socket activities.
4. Call curl_multi_socket_all() first once 4. Add easy handles
5. Setup a "collection" of sockets to supervise when your socket 5. Call curl_multi_socket_all() first once
callback is called.
6. Use curl_multi_timeout() to figure out how long to wait for action 6. Provide some means to manage the sockets libcurl is using, so you can check
them for activity. This can be done through your application code, or by way
of an external library such as libevent or glib.
7. Wait for action on any of libcurl's sockets 7. Wait for activity on any of libcurl's sockets, use the timeout value your
calback has been told
8, When action happens, call curl_multi_socket() for the socket(s) that got 8, When activity is detected, call curl_multi_socket_action() for the
action. socket(s) that got action. If no activity is detected and the timeout expires,
call \fIcurl_multi_socket(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
9. Go back to step 6. 9. Go back to step 7.
.SH AVAILABILITY .SH AVAILABILITY
This function was added in libcurl 7.15.4, although not deemed stable yet. This function was added in libcurl 7.15.4, although deemed stable since
7.16.0.
\fIcurl_multi_socket(3)\fP is deprecated, use
\fIcurl_multi_socket_action(3)\fP instead!
.SH "SEE ALSO" .SH "SEE ALSO"
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), " .BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3)" .BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
.BR "the hiperfifo.c example"

View File

@@ -1,8 +1,27 @@
.\" You can view this file with: .\" **************************************************************************
.\" nroff -man [file] .\" * _ _ ____ _
.\" $Id$ .\" * Project ___| | | | _ \| |
.\" * / __| | | | |_) | |
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" * $Id$
.\" **************************************************************************
.\" .\"
.TH libcurl-errors 3 "9 Feb 2005" "libcurl 7.13.1" "libcurl errors" .TH libcurl-errors 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl errors"
.SH NAME .SH NAME
libcurl-errors \- error codes in libcurl libcurl-errors \- error codes in libcurl
.SH DESCRIPTION .SH DESCRIPTION
@@ -29,8 +48,6 @@ Very early initialization code failed. This is likely to be an internal error
or problem. or problem.
.IP "CURLE_URL_MALFORMAT (3)" .IP "CURLE_URL_MALFORMAT (3)"
The URL was not properly formatted. The URL was not properly formatted.
.IP "CURLE_URL_MALFORMAT_USER (4)"
This is never returned by current libcurl.
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)" .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
Couldn't resolve proxy. The given proxy host could not be resolved. Couldn't resolve proxy. The given proxy host could not be resolved.
.IP "CURLE_COULDNT_RESOLVE_HOST (6)" .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
@@ -41,17 +58,12 @@ Failed to connect() to host or proxy.
After connecting to an FTP server, libcurl expects to get a certain reply After connecting to an FTP server, libcurl expects to get a certain reply
back. This error code implies that it got a strange or bad reply. The given back. This error code implies that it got a strange or bad reply. The given
remote server is probably not an OK FTP server. remote server is probably not an OK FTP server.
.IP "CURLE_FTP_ACCESS_DENIED (9)" .IP "CURLE_REMOTE_ACCESS_DENIED (9)"
We were denied access when trying to login to an FTP server or when trying to We were denied access to the resource given in the URL. For FTP, this occurs
change working directory to the one given in the URL. while trying to change to the remote directory.
.IP "CURLE_FTP_USER_PASSWORD_INCORRECT (10)"
This is never returned by current libcurl.
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)" .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
After having sent the FTP password to the server, libcurl expects a proper After having sent the FTP password to the server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned. reply. This error code indicates that an unexpected code was returned.
.IP "CURLE_FTP_WEIRD_USER_REPLY (12)"
After having sent user name to the FTP server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned.
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)" .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
libcurl failed to get a sensible result back from the server as a response to libcurl failed to get a sensible result back from the server as a response to
either a PASV or a EPSV command. The server is flawed. either a PASV or a EPSV command. The server is flawed.
@@ -60,11 +72,8 @@ FTP servers return a 227-line as a response to a PASV command. If libcurl
fails to parse that line, this return code is passed back. fails to parse that line, this return code is passed back.
.IP "CURLE_FTP_CANT_GET_HOST (15)" .IP "CURLE_FTP_CANT_GET_HOST (15)"
An internal failure to lookup the host used for the new connection. An internal failure to lookup the host used for the new connection.
.IP "CURLE_FTP_CANT_RECONNECT (16)" .IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
A bad return code on either PASV or EPSV was sent by the FTP server, Received an error when trying to set the transfer mode to binary or ascii.
preventing libcurl from being able to continue.
.IP "CURLE_FTP_COULDNT_SET_BINARY (17)"
Received an error when trying to set the transfer mode to binary.
.IP "CURLE_PARTIAL_FILE (18)" .IP "CURLE_PARTIAL_FILE (18)"
A file transfer was shorter or larger than expected. This happens when the A file transfer was shorter or larger than expected. This happens when the
server first reports an expected transfer size, and then delivers data that server first reports an expected transfer size, and then delivers data that
@@ -72,45 +81,38 @@ doesn't match the previously given size.
.IP "CURLE_FTP_COULDNT_RETR_FILE (19)" .IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
This was either a weird reply to a 'RETR' command or a zero byte transfer This was either a weird reply to a 'RETR' command or a zero byte transfer
complete. complete.
.IP "CURLE_FTP_WRITE_ERROR (20)" .IP "CURLE_QUOTE_ERROR (21)"
After a completed file transfer, the FTP server did not respond a proper
\"transfer successful\" code.
.IP "CURLE_FTP_QUOTE_ERROR (21)"
When sending custom "QUOTE" commands to the remote server, one of the commands When sending custom "QUOTE" commands to the remote server, one of the commands
returned an error code that was 400 or higher. returned an error code that was 400 or higher (for FTP) or otherwise
indicated unsuccessful completion of the command.
.IP "CURLE_HTTP_RETURNED_ERROR (22)" .IP "CURLE_HTTP_RETURNED_ERROR (22)"
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
returns an error code that is >= 400. returns an error code that is >= 400. (This error code was formerly known as
CURLE_HTTP_NOT_FOUND.)
.IP "CURLE_WRITE_ERROR (23)" .IP "CURLE_WRITE_ERROR (23)"
An error occurred when writing received data to a local file, or an error was An error occurred when writing received data to a local file, or an error was
returned to libcurl from a write callback. returned to libcurl from a write callback.
.IP "CURLE_MALFORMAT_USER (24)" .IP "CURLE_UPLOAD_FAILED (25)"
This is never returned by current libcurl. Failed starting the upload. For FTP, the server typically denied the STOR
.IP "CURLE_FTP_COULDNT_STOR_FILE (25)" command. The error buffer usually contains the server's explanation to this.
FTP couldn't STOR file. The server denied the STOR operation. The error buffer (This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
usually contains the server's explanation to this.
.IP "CURLE_READ_ERROR (26)" .IP "CURLE_READ_ERROR (26)"
There was a problem reading a local file or an error returned by the read There was a problem reading a local file or an error returned by the read
callback. callback.
.IP "CURLE_OUT_OF_MEMORY (27)" .IP "CURLE_OUT_OF_MEMORY (27)"
Out of memory. A memory allocation request failed. This is serious badness and A memory allocation request failed. This is serious badness and
things are severely screwed up if this ever occur. things are severely screwed up if this ever occur.
.IP "CURLE_OPERATION_TIMEOUTED (28)" .IP "CURLE_OPERATION_TIMEDOUT (28)"
Operation timeout. The specified time-out period was reached according to the Operation timeout. The specified time-out period was reached according to the
conditions. conditions.
.IP "CURLE_FTP_COULDNT_SET_ASCII (29)"
libcurl failed to set ASCII transfer type (TYPE A).
.IP "CURLE_FTP_PORT_FAILED (30)" .IP "CURLE_FTP_PORT_FAILED (30)"
The FTP PORT command returned error. This mostly happen when you haven't The FTP PORT command returned error. This mostly happen when you haven't
specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP. specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
.IP "CURLE_FTP_COULDNT_USE_REST (31)" .IP "CURLE_FTP_COULDNT_USE_REST (31)"
The FTP REST command returned error. This should never happen if the server is The FTP REST command returned error. This should never happen if the server is
sane. sane.
.IP "CURLE_FTP_COULDNT_GET_SIZE (32)" .IP "CURLE_RANGE_ERROR (33)"
The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is The server does not support or accept range requests.
an extension and not all servers support it. This is not a surprising error.
.IP "CURLE_HTTP_RANGE_ERROR (33)"
The HTTP server does not support or accept range requests.
.IP "CURLE_HTTP_POST_ERROR (34)" .IP "CURLE_HTTP_POST_ERROR (34)"
This is an odd error that mainly occurs due to internal confusion. This is an odd error that mainly occurs due to internal confusion.
.IP "CURLE_SSL_CONNECT_ERROR (35)" .IP "CURLE_SSL_CONNECT_ERROR (35)"
@@ -127,22 +129,17 @@ path doesn't identify an existing file. Did you check file permissions?
LDAP cannot bind. LDAP bind operation failed. LDAP cannot bind. LDAP bind operation failed.
.IP "CURLE_LDAP_SEARCH_FAILED (39)" .IP "CURLE_LDAP_SEARCH_FAILED (39)"
LDAP search failed. LDAP search failed.
.IP "CURLE_LIBRARY_NOT_FOUND (40)"
Library not found. The LDAP library was not found.
.IP "CURLE_FUNCTION_NOT_FOUND (41)" .IP "CURLE_FUNCTION_NOT_FOUND (41)"
Function not found. A required LDAP function was not found. Function not found. A required zlib function was not found.
.IP "CURLE_ABORTED_BY_CALLBACK (42)" .IP "CURLE_ABORTED_BY_CALLBACK (42)"
Aborted by callback. A callback returned "abort" to libcurl. Aborted by callback. A callback returned "abort" to libcurl.
.IP "CURLE_BAD_FUNCTION_ARGUMENT (43)" .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
Internal error. A function was called with a bad parameter. Internal error. A function was called with a bad parameter.
.IP "CURLE_BAD_CALLING_ORDER (44)" .IP "CURLE_INTERFACE_FAILED (45)"
This is never returned by current libcurl.
.IP "CURLE_HTTP_PORT_FAILED (45)"
Interface error. A specified outgoing interface could not be used. Set which Interface error. A specified outgoing interface could not be used. Set which
interface to use for outgoing connections' source IP address with interface to use for outgoing connections' source IP address with
CURLOPT_INTERFACE. CURLOPT_INTERFACE. (This error code was formerly known as
.IP "CURLE_BAD_PASSWORD_ENTERED (46)" CURLE_HTTP_PORT_FAILED.)
This is never returned by current libcurl.
.IP "CURLE_TOO_MANY_REDIRECTS (47)" .IP "CURLE_TOO_MANY_REDIRECTS (47)"
Too many redirects. When following redirects, libcurl hit the maximum amount. Too many redirects. When following redirects, libcurl hit the maximum amount.
Set your limit with CURLOPT_MAXREDIRS. Set your limit with CURLOPT_MAXREDIRS.
@@ -151,9 +148,6 @@ An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
the appropriate documentation. the appropriate documentation.
.IP "CURLE_TELNET_OPTION_SYNTAX (49)" .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
A telnet option string was Illegally formatted. A telnet option string was Illegally formatted.
.IP "CURLE_OBSOLETE (50)"
This is not an error. This used to be another error code in an old libcurl
version and is currently unused.
.IP "CURLE_SSL_PEER_CERTIFICATE (51)" .IP "CURLE_SSL_PEER_CERTIFICATE (51)"
The remote server's SSL certificate was deemed not OK. The remote server's SSL certificate was deemed not OK.
.IP "CURLE_GOT_NOTHING (52)" .IP "CURLE_GOT_NOTHING (52)"
@@ -167,21 +161,19 @@ Failed setting the selected SSL crypto engine as default!
Failed sending network data. Failed sending network data.
.IP "CURLE_RECV_ERROR (56)" .IP "CURLE_RECV_ERROR (56)"
Failure with receiving network data. Failure with receiving network data.
.IP "CURLE_SHARE_IN_USE (57)"
Share is in use
.IP "CURLE_SSL_CERTPROBLEM (58)" .IP "CURLE_SSL_CERTPROBLEM (58)"
problem with the local client certificate problem with the local client certificate
.IP "CURLE_SSL_CIPHER (59)" .IP "CURLE_SSL_CIPHER (59)"
couldn't use specified cipher Couldn't use specified cipher
.IP "CURLE_SSL_CACERT (60)" .IP "CURLE_SSL_CACERT (60)"
peer certificate cannot be authenticated with known CA certificates Peer certificate cannot be authenticated with known CA certificates
.IP "CURLE_BAD_CONTENT_ENCODING (61)" .IP "CURLE_BAD_CONTENT_ENCODING (61)"
Unrecognized transfer encoding Unrecognized transfer encoding
.IP "CURLE_LDAP_INVALID_URL (62)" .IP "CURLE_LDAP_INVALID_URL (62)"
Invalid LDAP URL Invalid LDAP URL
.IP "CURLE_FILESIZE_EXCEEDED (63)" .IP "CURLE_FILESIZE_EXCEEDED (63)"
Maximum file size exceeded Maximum file size exceeded
.IP "CURLE_FTP_SSL_FAILED (64)" .IP "CURLE_USE_SSL_FAILED (64)"
Requested FTP SSL level failed Requested FTP SSL level failed
.IP "CURLE_SEND_FAIL_REWIND (65)" .IP "CURLE_SEND_FAIL_REWIND (65)"
When doing a send operation curl had to rewind the data to retransmit, but the When doing a send operation curl had to rewind the data to retransmit, but the
@@ -192,24 +184,33 @@ Initiating the SSL Engine failed
The remote server denied curl to login (Added in 7.13.1) The remote server denied curl to login (Added in 7.13.1)
.IP "CURLE_TFTP_NOTFOUND (68)" .IP "CURLE_TFTP_NOTFOUND (68)"
File not found on TFTP server File not found on TFTP server
.IP "CURLE_TFTP_PERM (69" .IP "CURLE_TFTP_PERM (69)"
Permission problem on TFTP server Permission problem on TFTP server
.IP "CURLE_TFTP_DISKFULL (70)" .IP "CURLE_REMOTE_DISK_FULL (70)"
Out of disk space on TFTP server Out of disk space on the server
.IP "CURLE_TFTP_ILLEGAL (71)" .IP "CURLE_TFTP_ILLEGAL (71)"
Illegal TFTP operation Illegal TFTP operation
.IP "CURLE_TFTP_UNKNOWNID (72)" .IP "CURLE_TFTP_UNKNOWNID (72)"
Unknown TFTP transfer ID Unknown TFTP transfer ID
.IP "CURLE_TFTP_EXISTS (73)" .IP "CURLE_REMOTE_FILE_EXISTS (73)"
TFTP File already exists File already exists and will not be overwritten
.IP "CURLE_TFTP_NOSUCHUSER (74)" .IP "CURLE_TFTP_NOSUCHUSER (74)"
No such TFTP user This error should never be returned by a properly functioning TFTP server
.IP "CURLE_CONV_FAILED (75)" .IP "CURLE_CONV_FAILED (75)"
Character conversion failed Character conversion failed
.IP "CURLE_CONV_REQD (76)" .IP "CURLE_CONV_REQD (76)"
Caller must register conversion callbacks Caller must register conversion callbacks
.IP "CURLE_SSL_CACERT_BADFILE (77)" .IP "CURLE_SSL_CACERT_BADFILE (77)"
Problem with reading the SSL CA cert (path? access rights?) Problem with reading the SSL CA cert (path? access rights?)
.IP "CURLE_REMOTE_FILE_NOT_FOUND (78)"
The resource referenced in the URL does not exist
.IP "CURLE_SSH (79)"
An unspecified error occurred during the SSH session
.IP "CURLE_SSL_SHUTDOWN_FAILED (80)"
Failed to shut down the SSL connection
.IP "CURLE_OBSOLETE*"
These error codes will never be returned. They used to be used in an old libcurl
version and are currently unused.
.SH "CURLMcode" .SH "CURLMcode"
This is the generic return code used by functions in the libcurl multi This is the generic return code used by functions in the libcurl multi
interface. Also consider \fIcurl_multi_strerror(3)\fP. interface. Also consider \fIcurl_multi_strerror(3)\fP.
@@ -231,6 +232,9 @@ This can only be returned if libcurl bugs. Please report it to us!
.IP "CURLM_BAD_SOCKET (5)" .IP "CURLM_BAD_SOCKET (5)"
The passed-in socket is not a valid one that libcurl already knows about. The passed-in socket is not a valid one that libcurl already knows about.
(Added in 7.15.4) (Added in 7.15.4)
.IP "CURLM_UNKNOWN_OPTION (6)"
curl_multi_setopt() with unsupported option
(Added in 7.15.4)
.SH "CURLSHcode" .SH "CURLSHcode"
The "share" interface will return a CURLSHcode to indicate when an error has The "share" interface will return a CURLSHcode to indicate when an error has
occurred. Also consider \fIcurl_share_strerror(3)\fP. occurred. Also consider \fIcurl_share_strerror(3)\fP.
@@ -242,4 +246,6 @@ An invalid option was passed to the function.
The share object is currently in use. The share object is currently in use.
.IP "CURLSHE_INVALID (3)" .IP "CURLSHE_INVALID (3)"
An invalid share object was passed to the function. An invalid share object was passed to the function.
.IP "CURLSHE_NOMEM (4)"
Not enough memory was available.
(Added in 7.12.0)

View File

@@ -104,6 +104,12 @@ get more messages until the message queue is empty. The information you
receive there includes an easy handle pointer which you may use to identify receive there includes an easy handle pointer which you may use to identify
which easy handle the information regards. which easy handle the information regards.
When a single transfer is completed, the easy handle is still left added to
the multi stack. You need to first remove the easy handle with
\fIcurl_multi_remove_handle(3)\fP and then close it with
\fIcurl_easy_cleanup(3)\fP, or possibly set new options to it and add it again
with \fIcurl_multi_add_handle(3)\fP to start another transfer.
When all transfers in the multi stack are done, cleanup the multi handle with When all transfers in the multi stack are done, cleanup the multi handle with
\fIcurl_multi_cleanup(3)\fP. Be careful and please note that you \fBMUST\fP \fIcurl_multi_cleanup(3)\fP. Be careful and please note that you \fBMUST\fP
invoke separate \fIcurl_easy_cleanup(3)\fP calls on every single easy handle invoke separate \fIcurl_easy_cleanup(3)\fP calls on every single easy handle
@@ -125,10 +131,11 @@ A few areas in the code are still using blocking code, even when used from the
multi interface. While we certainly want and intend for these to get fixed in multi interface. While we certainly want and intend for these to get fixed in
the future, you should be aware of the following current restrictions: the future, you should be aware of the following current restrictions:
.nf
- Name resolves on non-windows unless c-ares is used - Name resolves on non-windows unless c-ares is used
- GnuTLS SSL connections - GnuTLS SSL connections
- Active FTP connections - Active FTP connections
- HTTP proxy CONNECT operations - HTTP proxy CONNECT operations
- SCP and SFTP connections - TFTP transfers
- SFTP transfers
- file:// transfers - file:// transfers
.fi

View File

@@ -415,7 +415,7 @@ you're using an SSL private key for secure transfers.
To pass the known private key password to libcurl: To pass the known private key password to libcurl:
curl_easy_setopt(easyhandle, CURLOPT_SSLKEYPASSWD, "keypassword"); curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
.SH "HTTP Authentication" .SH "HTTP Authentication"
The previous chapter showed how to set user name and password for getting The previous chapter showed how to set user name and password for getting
@@ -931,7 +931,7 @@ would instead be called CURLOPT_POSTQUOTE and used the exact same way.
The custom FTP command will be issued to the server in the same order they are The custom FTP command will be issued to the server in the same order they are
added to the list, and if a command gets an error code returned back from the added to the list, and if a command gets an error code returned back from the
server, no more commands will be issued and libcurl will bail out with an server, no more commands will be issued and libcurl will bail out with an
error code (CURLE_FTP_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
commands before a transfer, no transfer will actually take place when a quote commands before a transfer, no transfer will actually take place when a quote
command has failed. command has failed.

Some files were not shown because too many files have changed in this diff Show More