Compare commits

..

1389 Commits

Author SHA1 Message Date
Daniel Stenberg
39626d8cfd 7.12.0 2004-06-02 09:03:02 +00:00
Daniel Stenberg
67ad29e716 more changes 2004-06-02 08:57:43 +00:00
Daniel Stenberg
8bbf9b13af Renaud Duhaut corrected the unescaping procedure 2004-06-01 08:33:15 +00:00
Daniel Stenberg
cb21851c74 David Byron made this use the mm lib by default, as was previously done. This
might be done differently in the future.
2004-06-01 08:09:43 +00:00
Daniel Stenberg
8d611bec6e --create-dirs clarification 2004-06-01 07:03:46 +00:00
Daniel Stenberg
1de1dc7314 minor edits 2004-05-28 11:16:09 +00:00
Daniel Stenberg
aca79af7de check for failing strdup()s 2004-05-28 09:56:59 +00:00
Daniel Stenberg
da6eea9b38 delete trailing whitespace 2004-05-28 09:52:15 +00:00
Daniel Stenberg
dcf7310b2d fixed curl_easy_duphandle() to properly clean up all memory if any memory
function fails and it returns NULL
2004-05-27 07:48:09 +00:00
Daniel Stenberg
c2e8ba0fba free() allocated memory when the ares search can't be made 2004-05-27 07:10:36 +00:00
Daniel Stenberg
a5360255ba clear the domains and sortlist when the 'channel' is first created so that
we can compare if non-NULL elsewhere
2004-05-27 07:10:02 +00:00
Daniel Stenberg
5690a2b493 better checks to avoid free(NULL) 2004-05-27 07:09:21 +00:00
Daniel Stenberg
ff0429a802 James Bursa's fix to prevent free(NULL) to occur 2004-05-27 06:42:48 +00:00
Daniel Stenberg
46cdc83b81 the CONNECT issue seems fixed too now 2004-05-26 14:32:15 +00:00
Daniel Stenberg
76dfef7117 Mohun Biswas added release-zlib and debug-zlib targets. 2004-05-26 11:49:28 +00:00
Daniel Stenberg
de2aeb9fc2 MSVC makefiles updated and an auth problem when using CONNECT 2004-05-26 10:35:01 +00:00
Daniel Stenberg
17a5b44205 curllib.dsp works in the latest snapshots 2004-05-26 10:32:48 +00:00
Daniel Stenberg
f99e347878 bugs, changes, sponsors! 2004-05-26 09:23:11 +00:00
Daniel Stenberg
f5a0c17322 updated with recent stuff 2004-05-26 09:19:46 +00:00
Daniel Stenberg
8442c3942d three new functions in the public API 2004-05-26 09:17:20 +00:00
Daniel Stenberg
15cd35f67f added example that makes an upload to a file:// url 2004-05-26 09:00:03 +00:00
Daniel Stenberg
459801d6e0 strip trailing whitespace 2004-05-26 08:58:25 +00:00
Daniel Stenberg
2c43d64302 Added a new 'bit' in the connect struct named 'tunnel_proxy' that is set
if a connection is tunneled through a proxy. A tunnel is done with CONNECT,
either when using HTTPS or FTPS, or if explicitly enabled by the app.
2004-05-26 08:54:36 +00:00
Daniel Stenberg
fd802db39f initial support for "uploading" to file:// URLs 2004-05-25 21:47:29 +00:00
Daniel Stenberg
765754d39d --proxy-basic added for completeness 2004-05-25 14:44:25 +00:00
Daniel Stenberg
f7f6b288eb removed some stuff that actually is done now, added the --optionseparator
idea (not really new, but its better to have it mentioned in here)
2004-05-25 14:39:53 +00:00
Daniel Stenberg
11ee9540bf Bug report #948950, excessive amount of file descriptors might crash libcurl 2004-05-25 14:28:44 +00:00
Daniel Stenberg
f6319bd706 Massimiliano Ziccardi's updates for the VC6 makefiles 2004-05-25 13:52:12 +00:00
Daniel Stenberg
0912015a5c preprocessor magic around the libidn idn_free() stuff to remain workable
both with older libidn versions without idn_free() and with libidn versions
that gets installed without idn-free.h
2004-05-25 12:00:15 +00:00
Daniel Stenberg
4e7575fc7a checl for the idn_free stuff to remain functionall even with older libidn
versions
2004-05-25 11:59:32 +00:00
Daniel Stenberg
6531a6116d remove trailing whitespace 2004-05-25 11:13:49 +00:00
Daniel Stenberg
9a33561e80 make one call instead of two 2004-05-25 07:51:06 +00:00
Daniel Stenberg
88229a0f2a new example proving that the debug callback works even when the multi
interface is used
2004-05-24 15:16:53 +00:00
Daniel Stenberg
120394cc45 remove trailing whitespace 2004-05-24 15:16:29 +00:00
Daniel Stenberg
1adfe0fe18 multi interface, debug callback 2004-05-24 15:12:37 +00:00
Daniel Stenberg
d57c178a62 delete trailing whitespace 2004-05-24 13:31:28 +00:00
Daniel Stenberg
6faa83bc6a if no errorbuffer string was provided when a return code was returned, use
the curl_easy_strerror() function to provide one
2004-05-24 13:27:48 +00:00
Daniel Stenberg
9fb4e019fa IDN is a recognized feature 2004-05-24 13:23:54 +00:00
Daniel Stenberg
74551597b1 fixed a reference 2004-05-24 13:21:31 +00:00
Daniel Stenberg
37c269d0ba meta-m runs delete-trailing-whitespace in curl-mode 2004-05-24 12:12:09 +00:00
Daniel Stenberg
5d8b526b80 delete trailing whitespace 2004-05-24 11:57:34 +00:00
Daniel Stenberg
83dcc3e061 delete trailing whitespace 2004-05-24 10:46:22 +00:00
Daniel Stenberg
4ed58463f7 better name 2004-05-24 09:01:45 +00:00
Daniel Stenberg
85b2056dc7 only idn_free() if built with libidn 2004-05-24 08:19:37 +00:00
Daniel Stenberg
94ca911dc1 delete trailing whitespace 2004-05-24 07:53:25 +00:00
Daniel Stenberg
24420c2191 Simon Josefsson added a idn_free() function in libidn 0.4.5 as a reaction to
Gisle's previous mail. We now use this function, and thus we require libidn
 0.4.5 or later. No earler version will do.
2004-05-24 07:40:00 +00:00
Daniel Stenberg
59f904d8de Robert D. Young reported that CURLOPT_COOKIEFILE and CURLOPT_COOKIE could
not be used both in one request. Fixed it and added test case 172 to verify.
2004-05-24 07:13:48 +00:00
Daniel Stenberg
755f98e768 While talking to host a.b.c, libcurl did wrongly not accept cookies that were
set to the domain .a.b.c (that is with a dot prefix). This is now fixed and
test case 171 verifies it.
2004-05-21 20:40:15 +00:00
Daniel Stenberg
aadc797225 quickfix to avoid division by zero, possibly we should go over all of these
once and for all
2004-05-21 12:23:53 +00:00
Daniel Stenberg
5c882bdfa3 fixed transfer speed math 2004-05-20 20:48:16 +00:00
Daniel Stenberg
60f9450594 calculate upload and download speed using doubles to keep precision.
deleted trailing whitespace
2004-05-20 20:35:42 +00:00
Daniel Stenberg
ff52ba7f7b NTLM requires SSL 2004-05-19 11:25:21 +00:00
Daniel Stenberg
0fbcea45d6 cert verify 2004-05-19 11:10:36 +00:00
Daniel Stenberg
ca6d430561 added test 170 2004-05-19 10:32:25 +00:00
Daniel Stenberg
91601b3bf4 David Byron's test case with -F that used to crash 2004-05-19 10:31:58 +00:00
Daniel Stenberg
cdd70596df killed trailing whitespace 2004-05-19 09:25:00 +00:00
Daniel Stenberg
7e186f9a63 just code formatting and killed whitespace 2004-05-19 09:24:18 +00:00
Daniel Stenberg
a94e117ede language! 2004-05-19 09:09:31 +00:00
Daniel Stenberg
662cb30372 Set CURLOPT_USERAGENT too 2004-05-19 09:08:19 +00:00
Daniel Stenberg
bd3aba5d6a The kill trailing whitespace needs to be set better as this way it takes
effect globally which isn't nice. Commented it out for now. Display trailing
whitespace still, to remind me.
2004-05-19 08:16:08 +00:00
Daniel Stenberg
29ed6d24bf simplified all die messages 2004-05-18 10:55:40 +00:00
Daniel Stenberg
e2c5c20896 simplified the automake failed message too 2004-05-18 09:25:46 +00:00
Daniel Stenberg
7c4b6cb0d9 make this script tell that this is the obsolete version, to make it possible
to detect
2004-05-18 09:22:41 +00:00
Daniel Stenberg
aced2904ff simplified the die-line when aclocal fails, the previous one confused
the netbsd shell
2004-05-18 09:02:38 +00:00
Daniel Stenberg
17eb1fca7c + when storing the address in the cache fails, cleanup the resolved address
properly
+ delete trailing whitespace
2004-05-18 07:35:37 +00:00
Daniel Stenberg
2511d1193a * seed_enough() was converted to a macro to avoid the IRIX compiler warning
about that passed-in argument not being used.
* killed trailing whitespace
2004-05-18 07:25:13 +00:00
Daniel Stenberg
e9056f5f95 if shrinking the buffer fails, use the older larger one 2004-05-17 22:07:43 +00:00
Daniel Stenberg
a9893ca79a Peter Sylvester's patch that addresses two flaws in the peer certificate name
verification:

- when multiple common names are used (as in the curl tests), the last name
needs to be selected.

- allow comparing with encoded values, at least with BMP and ISO latin1
encoded T61strings.
2004-05-17 22:01:16 +00:00
Daniel Stenberg
f39f7c28f0 'make test-torture' in the root now runs a full torture test 2004-05-17 10:54:00 +00:00
Daniel Stenberg
a807065ccc removed debug output and trailing whitespace 2004-05-17 10:53:34 +00:00
Daniel Stenberg
67532e916c grrr, fix the check again if no ftp server at all is running 2004-05-17 10:51:51 +00:00
Daniel Stenberg
3920b4dae8 torture testing and a moved CVS repo 2004-05-17 10:39:44 +00:00
Daniel Stenberg
d70a335dce new Curl_done() proto 2004-05-17 08:07:07 +00:00
Daniel Stenberg
8001921112 I made Curl_done() take a pointer-pointer in the first argument instead, and
if the connection is killed it blanks the pointer it points to, to make it
easier to detect usage problems whereever Curl_done() is used.
2004-05-17 08:05:46 +00:00
Daniel Stenberg
d7cb09bd18 better bailing out on memory failure 2004-05-17 08:04:42 +00:00
Daniel Stenberg
e11710714c When waiting for the second connect, we now use alarm to timeout the waiting.
This is necessary in case the client never connects or somehow fails to do
it timely. The timeout used now is only 2 seconds, which might cause problems
on really slow hosts but longer times are painful when doing torture testing
on FTP test cases.

I'm not sure how this 'alarm' functionality works on Windows or other systems
that don't actually have the alarm() function.
2004-05-17 08:02:23 +00:00
Daniel Stenberg
5b0bfc298f improved the check for our own ftp server 2004-05-17 07:59:10 +00:00
Daniel Stenberg
0383f7f19d modified to not leak memory if a libcurl function returns failure, for better
memory leak detection
2004-05-17 07:45:20 +00:00
Daniel Stenberg
23a43c6e0f Seshubabu Pasam's format fixes and added notes about DER not working for
some (SSL-)options.
2004-05-17 07:12:32 +00:00
Daniel Stenberg
eb946690d2 make it not leak memory when it returns prematurely 2004-05-17 06:55:04 +00:00
Daniel Stenberg
c090fdbdf1 automatically delete trailing white space on save in curl-mode 2004-05-17 06:54:20 +00:00
Daniel Stenberg
de279099e5 bail out nicely if strdup() returns NULL, removed trailing whitespace 2004-05-17 06:53:41 +00:00
Daniel Stenberg
6bd8db3c99 deleted trailing whitespace 2004-05-17 06:50:32 +00:00
Daniel Stenberg
6176f14141 fixed a warning on IRIX, deleted trailing whitespace 2004-05-17 06:50:08 +00:00
Daniel Stenberg
512e54ff85 added string for the new share error code 2004-05-14 11:46:35 +00:00
Daniel Stenberg
a5aa569fe3 Added CURLSHE_NOMEM 2004-05-14 09:30:31 +00:00
Daniel Stenberg
e2e593a036 clean up properly on failure to enable easier libcurl leak detection 2004-05-14 09:22:12 +00:00
Daniel Stenberg
9ce0a7b49d new cvs instructions 2004-05-14 09:21:42 +00:00
Daniel Stenberg
4ab0d74250 enable memory debugging the same way the curl command line tool already does 2004-05-14 08:40:33 +00:00
Daniel Stenberg
b5f85ba77d memory cleanup and check fix 2004-05-13 15:19:02 +00:00
Daniel Stenberg
b6ee33c6e1 check that memory allocation functions truly return good data or bail out 2004-05-13 15:18:29 +00:00
Daniel Stenberg
1c69b15c7c return on memory alloc fail 2004-05-13 15:17:49 +00:00
Daniel Stenberg
54cd2bee58 better bailing out in case of no memory 2004-05-13 15:17:07 +00:00
Daniel Stenberg
5bf02b16a0 curl_free() doesn't free(NULL) but just returns 2004-05-13 15:16:36 +00:00
Daniel Stenberg
594cb8507b deal with input arguments as NULL 2004-05-13 15:16:10 +00:00
Daniel Stenberg
78aba6e4cd return CURLDIGEST_NOMEM when a memory function fails to deliver 2004-05-13 14:14:03 +00:00
Daniel Stenberg
ccdcdb2a46 mark a value as alloced when strdup()ed to prevent memory leaks 2004-05-13 14:13:12 +00:00
Daniel Stenberg
b121e41ec3 bail out when no memory occurs 2004-05-13 14:12:49 +00:00
Daniel Stenberg
05d8e56ffd Gisle Vamem reintroduced the verifyconnect() call on windows as well, and
we now use it to provide more info back on connect failures.
2004-05-13 10:40:17 +00:00
Daniel Stenberg
4345c7a712 Gisle: minor fix 2004-05-13 10:38:57 +00:00
Daniel Stenberg
12d5e33dc9 no more Curl_ldap_done 2004-05-13 10:38:37 +00:00
Daniel Stenberg
6d70a82757 Added two two missing header files I missed when I removed the noinst_HEADERS 2004-05-13 09:01:15 +00:00
Daniel Stenberg
47d52d4eca added https.c 2004-05-13 08:23:09 +00:00
Daniel Stenberg
4973b0f88a basic https fetching script 2004-05-13 08:22:40 +00:00
Daniel Stenberg
d1542bf549 made 'runtests.pl -t' run over all the tests just like other command lines
Also made -t imply -n to disable valgrind, it runs sloooow otherwise.

This now manages to run all tests OK up to test case 100 (the first FTP one)
for me.
2004-05-13 07:52:33 +00:00
Daniel Stenberg
2b7727aad1 James Bursa's patch to avoid free(NULL) (mainly because the libcurl memdebug
system thinks free(NULL) is badness)
2004-05-13 06:53:29 +00:00
Daniel Stenberg
fd775454ca Check that memory functions return non-NULL or return error. 2004-05-12 13:24:40 +00:00
Daniel Stenberg
8e09a389c4 make sure the returned pointer is NULL when encoding fails 2004-05-12 13:23:17 +00:00
Daniel Stenberg
aa3ae01878 clean up and return better on out of memory 2004-05-12 13:05:01 +00:00
Daniel Stenberg
c123676825 return NULL on out of memory 2004-05-12 13:04:30 +00:00
Daniel Stenberg
d60c22572b Curl_done() and the protocol-specific conn->curl_done() functions now all
take a CURLcode as a second argument, that is non-zero when Curl_done()
is called after an error was returned from Curl_do() (or similar).
2004-05-12 12:06:39 +00:00
Daniel Stenberg
1d7ce36791 return faster when we "hit a wall" while printfing 2004-05-12 12:05:13 +00:00
Daniel Stenberg
34e8baab9a general cleanup to bail out nice and clean when a memory function fails
to deliver
2004-05-12 12:04:38 +00:00
Daniel Stenberg
a219d774fe even if Curl_do() fails, we must call Curl_done() to do proper cleaning up 2004-05-12 09:02:54 +00:00
Daniel Stenberg
005042e973 improved cleaning up in case of memory allocation failures 2004-05-12 09:02:23 +00:00
Daniel Stenberg
d301d69fbf bail out if we can't allocate the new range string, and make use of aprintf()
instead of using snprintf() + strdup().
2004-05-12 08:26:56 +00:00
Daniel Stenberg
34af02caca Disable memdebug for the allocs done by the app, unless CURLTOOLDEBUG is
defined (which it never is atm).

Now, we can focus on making 'runtests -t [num]' work on all test cases and
we should never leak nor crash.
2004-05-12 08:22:04 +00:00
Daniel Stenberg
91025d1dd6 new man page 2004-05-12 08:10:25 +00:00
Daniel Stenberg
c9bab31a7f use size_t better for buffer and alloc lengths 2004-05-12 08:00:21 +00:00
Daniel Stenberg
2f60e91a9b removed another jhrg-reference in a comment 2004-05-12 07:56:01 +00:00
Daniel Stenberg
018affe6d0 Edited comments only. 2004-05-12 07:55:05 +00:00
Daniel Stenberg
aeb27ccfdb The Curl_unencode_XXX_write() function take a ssize_t as third argument, so
we typecast on invoke.
2004-05-12 07:54:44 +00:00
Daniel Stenberg
939866faab Left-over from before the return-code fix. This is probably the code that
causes xlc and gcc act differently on AIX.
2004-05-12 06:27:40 +00:00
Daniel Stenberg
98f968f2ee fixed Curl_open() to not leak anything if one malloc() fails, fix by
James Bursa only modified by me.
2004-05-11 21:17:03 +00:00
Daniel Stenberg
864f1a3366 - Nico Stappenbelt reported that when processing domain and search lines in
the resolv.conf file, the first entry encountered is processed and used as
  the search list. According to the manual pages for both Linux, Solaris and
  Tru64, the last entry of either a domain or a search field is used.
2004-05-11 21:12:10 +00:00
Daniel Stenberg
f42b10242f revert the accidentally added use of strace 2004-05-11 18:57:03 +00:00
Daniel Stenberg
853134017d minor leak in case of error, thanks to "./runtests.pl -n -t 25" 2004-05-11 14:53:24 +00:00
Daniel Stenberg
d3999e06d1 clear up memory on failure a little better 2004-05-11 14:48:53 +00:00
Daniel Stenberg
0b0b37cffe make the libidn pointer in the version struct a const 2004-05-11 14:22:51 +00:00
Daniel Stenberg
a13f5888d5 they're at least 36 functions now 2004-05-11 14:21:34 +00:00
Daniel Stenberg
c8807438ce updated to reflect reality! 2004-05-11 14:15:49 +00:00
Daniel Stenberg
3f106afd00 cut out the changelog, it is far from accurate anyway 2004-05-11 12:22:50 +00:00
Daniel Stenberg
d925057e11 added curl_global_init_mem 2004-05-11 11:48:09 +00:00
Daniel Stenberg
bbafb2eb27 curl_global_init_mem() allows the memory functions to be replaced.
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg
434bc13812 *** empty log message *** 2004-05-11 11:29:31 +00:00
Daniel Stenberg
5c592f7dd9 Make this source code use our internal *printf().
Also some minor edits.
2004-05-11 11:29:02 +00:00
Daniel Stenberg
9bf1ba2f7e Added recent events to the log 2004-05-11 08:10:32 +00:00
Daniel Stenberg
724e4a3585 more changes, more news, more people 2004-05-11 08:10:15 +00:00
Daniel Stenberg
f69711fc78 another official download mirror 2004-05-11 08:09:56 +00:00
Daniel Stenberg
04e2520dbb new attempt at an improved DSP-file generation 2004-05-11 07:54:55 +00:00
Daniel Stenberg
7a35fb5403 slightly better dealing of bad mem situations 2004-05-10 14:45:11 +00:00
Daniel Stenberg
63f97b38eb Moved the fetching of the list of matching cookies to make it easier to free
that list in case something goes wrong in the function and we must bail out.
Courtesy of the torture testing.
2004-05-10 14:22:20 +00:00
Daniel Stenberg
b8541929c8 curl_slist_append() fixed to clear up properly if a memory function fails 2004-05-10 14:21:19 +00:00
Daniel Stenberg
329f17ac7c better detect if/when curl_slist_append() returns failure, and bail out
accordingly
2004-05-10 14:04:35 +00:00
Daniel Stenberg
5dcab07c54 if a malloc fails, clear up the memory and return failure 2004-05-10 14:04:06 +00:00
Daniel Stenberg
1f798affb9 typo 2004-05-10 10:52:29 +00:00
Daniel Stenberg
a2ecdf4249 the aprintf() versions now return NULL if _any_ alloc along the way failed,
previously they could return a piece of the string, making it impossible
for the caller to detect errors.
2004-05-10 10:50:43 +00:00
Daniel Stenberg
71fdc063bd better detection for when add_buffer() returns failure, and return when that
happens
2004-05-10 10:49:35 +00:00
Daniel Stenberg
887d78a9ad Curl_hash_add() was modified to clear up better in case of internal failure.
When failing, it should not tamper at all with the data it was supposed to
add to the cache.
2004-05-10 09:17:50 +00:00
Daniel Stenberg
00557a5475 checkpasswd() prevents segfault by checking that input argument is non-NULL 2004-05-10 09:16:21 +00:00
Daniel Stenberg
e18d27b78a James Bursa's adjustments to make the -t option work for any test case.
The -t is the "torture" test that first runs the test and counts the number
of allocations performed during it, then it runs the test repeatedly over and
over again and makes alloc number N fail to verify that we detect and return
properly from error cases everywhere.
2004-05-10 09:01:45 +00:00
Daniel Stenberg
228fea4628 make Curl_llist_insert_next() fail properly if malloc() fails 2004-05-10 08:57:37 +00:00
Daniel Stenberg
e64dacb40e better checking that strdup() works 2004-05-10 08:57:18 +00:00
Daniel Stenberg
fff01f24bf Luca fixed the nc= in the digest line since it apparantly should not have
quotes...
2004-05-10 08:09:15 +00:00
Daniel Stenberg
e55dee3807 James Bursa added better error checking for failer memory calls when
building formposts
2004-05-10 07:11:52 +00:00
Daniel Stenberg
8c2ce33c0b build curllib.dsp from these 2004-05-10 07:03:46 +00:00
Daniel Stenberg
135394f511 don't use -i when checking for our own server 2004-05-10 06:29:52 +00:00
Daniel Stenberg
fe065dc851 James' and Gisle' reports/fixes 2004-05-07 20:08:38 +00:00
Daniel Stenberg
445c7791a7 James Bursa changed two error message to use the display-name instead of the
internally-used name.
2004-05-07 18:56:33 +00:00
Daniel Stenberg
686ba84128 James Bursa's fix to make this deal with malloc(0) as OK to free() 2004-05-07 18:54:09 +00:00
Daniel Stenberg
3394c01826 We don't support any long protocol names so we can use a smaller buffer.
Also, make sure we have room for the trailing zero, only scan to size-1.

Gisle Vanem reported.
2004-05-07 18:46:28 +00:00
Daniel Stenberg
d67ea8c7ad count the formdata size using a 64bit size if avaialble 2004-05-07 09:50:49 +00:00
Daniel Stenberg
535046430a Made the lib/curllib.dsp file get generated automaticly 2004-05-07 09:45:33 +00:00
Daniel Stenberg
9aebdff219 don't use a magic define name 2004-05-07 09:42:23 +00:00
Daniel Stenberg
90da930131 This file is now generated at dist-time. 2004-05-07 09:41:28 +00:00
Daniel Stenberg
fbdc1b1e3d Generate curllib.dsp on dist.time from msvcproj.head msvcproj.foot and the
known source files. Not actually verified to work yet.
2004-05-07 09:41:05 +00:00
Daniel Stenberg
e942df755b get the display host name properly 2004-05-07 06:18:47 +00:00
Daniel Stenberg
91c8be3628 removed two odd comments 2004-05-06 15:17:10 +00:00
Daniel Stenberg
d56c03840b little fixes 2004-05-06 15:11:16 +00:00
Daniel Stenberg
d3d5cdf305 removed the warning if libidn isn't found 2004-05-06 15:05:23 +00:00
Daniel Stenberg
af43ce73e5 very minor output change 2004-05-06 15:04:04 +00:00
Daniel Stenberg
84b52e92f4 simplied the creation of new urls 2004-05-06 13:29:04 +00:00
Daniel Stenberg
0aa7d11cc9 %ld for long 2004-05-06 13:21:32 +00:00
Daniel Stenberg
933f7cecae int/long fix 2004-05-06 12:44:08 +00:00
Daniel Stenberg
8e73e55336 Michael Benedict brought a fix that fills in the errorbuffer properly
when ares fails to resolve a name. This was fixed before but somehow has
fallen out again!
2004-05-06 11:10:51 +00:00
Daniel Stenberg
55c015c136 typo AGAIN 2004-05-06 11:02:50 +00:00
Daniel Stenberg
bde6c6685e When using the icc compiler, we also ignore remark #1418 "external definition
with no prior declaration" since this is a habit we have in the code.
2004-05-06 10:58:57 +00:00
Daniel Stenberg
58387b91f9 printf %s with plain 'char *', not unsigned ones to silence icc's picky
warnings
2004-05-06 10:57:07 +00:00
Daniel Stenberg
6f74820cfc if no strerror_r prototype is found, we provide our own to prevent picky
compilers to warn
2004-05-06 10:49:40 +00:00
Daniel Stenberg
af72f198ba removed the unused 'len' variable, made use of the ptr pointer even if no
extra lib is used to prevent compiler warnings ("variable set but not used")
on that case
2004-05-06 07:32:30 +00:00
Daniel Stenberg
3fc831f9eb typecast the unsigned long to plain long to prevent compiler warnings 2004-05-06 07:24:47 +00:00
Daniel Stenberg
9f660862ec unused variable removed 2004-05-06 07:22:32 +00:00
Daniel Stenberg
1354671c90 use %ld to printf now.tv_sec 2004-05-06 07:21:19 +00:00
Daniel Stenberg
1175a226e3 curlx.h is a header to add to the release archive(s) 2004-05-06 07:19:58 +00:00
Daniel Stenberg
358b72bb12 fixed typo 2004-05-05 20:12:59 +00:00
Daniel Stenberg
6c408c885a Temporary disable the logic that runs gdb on a core dump, as it can't blindly
assume that the curl file is a proper binary, it is often a script file
produced by libtool.
2004-05-05 14:34:35 +00:00
Daniel Stenberg
9cf04dff6a hm, avoid division by zero more carefully with that new percentage math 2004-05-05 14:22:46 +00:00
Daniel Stenberg
6bdcfecbcf Joe Halpin fixed the warning on the typecast from data pointer to function
pointer!
2004-05-05 14:08:52 +00:00
Daniel Stenberg
3f21fe60fc Gisle fixed the percentage to work, I adjusted it slightly to not as easily
overflow on 32bit filesize-systems
2004-05-05 13:44:44 +00:00
Daniel Stenberg
b2c290e40e Gisle-fix: constified the 'interface' argument. 2004-05-05 13:42:23 +00:00
Daniel Stenberg
bc5b2fa12c Gisle fix: curl_formparse is gone. 2004-05-05 13:42:05 +00:00
Daniel Stenberg
32a9554c92 Gisle fixed: don't reference 'mem' if it's NULL. 2004-05-05 13:41:54 +00:00
Daniel Stenberg
afc1ed60f7 initiate variables properly to default to no auth for server and proxy 2004-05-05 13:00:03 +00:00
Daniel Stenberg
91018f4f24 AC_CHECK_TOOL is prolly better to use when checking for ar 2004-05-05 10:26:51 +00:00
Daniel Stenberg
fb086b57a8 slightly odd fix to prevent -Wunreachable-code to warn 2004-05-05 09:20:08 +00:00
Daniel Stenberg
3fc39a6efb alert the user if 'sed' or 'ar' couldn't be found, as it might very well
render a build impossible
2004-05-05 09:17:53 +00:00
Daniel Stenberg
6062ac7c37 made the progress meter display not overflow even if _very_ large files
are transfered. The maximum size we support now is 8 exabytes, which equals
to 8192 petabytes...
2004-05-05 08:43:23 +00:00
Daniel Stenberg
caf7854a3c if the values allow it, avoid floting point math for the current speed 2004-05-05 07:45:21 +00:00
Daniel Stenberg
6def0892ea additional typecasts in an attempt to avoid compiler warnings when switching
from 64 bit types to 32 bit ones
2004-05-05 07:30:52 +00:00
Daniel Stenberg
1c0744bde6 removed bad free() 2004-05-05 07:20:08 +00:00
Daniel Stenberg
7591e07b7c do the alarm time-left math using unsigned longs since that is what alarm()
returns and uses as input and converting to signed generates warnings and
actually risks loss of accuracy
2004-05-05 07:17:37 +00:00
Daniel Stenberg
35ab93f484 fix_hostname() now (void)s the conn argument to prevent warnings on non-idn
enabled builds
2004-05-05 07:08:31 +00:00
Daniel Stenberg
dcf5e52b62 ERR_error_string() returns an unsigned long so we should use one of those
for the return code
2004-05-05 07:01:33 +00:00
Daniel Stenberg
aae521d086 gcc 3.4 now uses the -Wunreachable-code option, I believe we can make older
ones use this too...
2004-05-05 06:59:27 +00:00
Daniel Stenberg
78e6508e22 check the size of size_t for lib/mprintf.c 2004-05-05 06:57:49 +00:00
Daniel Stenberg
4d9517f0b4 prevent warnings when using the gcc option -Wunreachable-code 2004-05-05 06:57:26 +00:00
Daniel Stenberg
a331aa0221 make the memlimit final NULL return get written to stderr as wella 2004-05-05 06:57:04 +00:00
Daniel Stenberg
679cabb532 mention the LICENSE-MIXING document 2004-05-05 06:12:24 +00:00
Daniel Stenberg
7332350e85 minor update edits 2004-05-05 06:11:57 +00:00
Daniel Stenberg
69f4dda74a added a third URL to the torture testing, this one also hangs at some point
for a reason I don't know
2004-05-05 06:11:13 +00:00
Daniel Stenberg
c19c3bd15a multipart formposts should be more streamy 2004-05-04 14:36:29 +00:00
Daniel Stenberg
76ff92b811 bail out when an add_buffer() function returns failure 2004-05-04 14:27:07 +00:00
Daniel Stenberg
4250637e7d improved the cleaning up of memory when we fail to resolve names due to
out of memory (thanks to 'runtests.pl -t')
2004-05-04 13:40:30 +00:00
Daniel Stenberg
08d1da106e check malloc() return code 2004-05-04 13:39:24 +00:00
Daniel Stenberg
9e31a0536e removed more leftovers from the formparse function 2004-05-04 09:31:04 +00:00
Daniel Stenberg
2960d37d71 removed curl_formparse() from the library 2004-05-04 08:24:13 +00:00
Daniel Stenberg
c63af5fc01 Gisle made item 38, now there's only one low-prio task left... 2004-05-04 07:54:08 +00:00
Daniel Stenberg
fc6eff13b5 General HTTP authentication cleanup and fixes 2004-05-04 07:52:53 +00:00
Daniel Stenberg
e7ee1ccf45 Gisle fixed the problem with ldap_search_s() fails with "filter error": a case
of using 'lud_filter' after freeing 'lud_dn'.
2004-05-03 15:01:34 +00:00
Daniel Stenberg
98bf69f8f1 improved the name of the test 2004-05-03 14:57:58 +00:00
Daniel Stenberg
0363fbc411 Added --proxy-digest, added the standard curl source header to this file. 2004-05-03 14:55:31 +00:00
Daniel Stenberg
e3bc92ae53 fixed the pdf and html for the strerror functions 2004-05-03 14:40:22 +00:00
Daniel Stenberg
27e76021e9 Added support for --proxy-digest 2004-05-03 11:56:18 +00:00
Daniel Stenberg
93dde29979 don't free(NULL) 2004-05-03 09:17:49 +00:00
Daniel Stenberg
d42dcd60cd Gisle Vanem:
Patch for ldap.c under Windows. It works with wldap32.dll as supplied with
Win-98/ME/2000/XP, so no extra .dlls are required.  I've mostly tested it
against Verisign's ldap server. Added code in the case there are to many
responses (rc = LDAP_SIZELIMIT_EXCEEDED) and print only those we got. E.g.

curl
ldap://directory.verisign.net/?cn,display-name,mail,info?subtree?(cn=*Nelson*)

will print the first 10 results.

My only problem with it is that ldap_search_s() fails with "filter error" when
CURLDEBUG is defined ?! Maybe someone can spot the error.
2004-05-03 09:14:12 +00:00
Daniel Stenberg
ade89799f5 mucho 2004-04-30 10:55:57 +00:00
Daniel Stenberg
6e118ce50f Display "exit OK" when the exit code has been verified to be OK, and added
initial basic valgrind-log scan for memory leaks it could detect.
2004-04-30 10:37:40 +00:00
Daniel Stenberg
34be9df773 deprecated functions 2004-04-30 10:34:54 +00:00
Daniel Stenberg
7356a67780 25 and 37 are now done, only two low-prio tasks left for the 7.12 release 2004-04-30 09:17:04 +00:00
Daniel Stenberg
f77949ef3b recent changes 2004-04-30 08:52:11 +00:00
Daniel Stenberg
26b8b3fc53 updated with more and new info 2004-04-30 08:51:19 +00:00
Daniel Stenberg
38cc79a54f these functions are marked to get removed from the public API "soon" 2004-04-30 08:38:08 +00:00
Daniel Stenberg
ec113aefb9 use the new lib/curlx.h header and modified the code to use all to-become-
curlx_-functions with the new prefix to prepare this code for the future
removal of several curl_-functions from the public libcurl API.
2004-04-30 08:23:50 +00:00
Daniel Stenberg
913e1570bd New header file that offers easy access to the curlx_ functions for an app.
curlx_ functions are NOT part of the offical API, but only available as source
code functions from the lib directory in case of need.
2004-04-30 08:22:38 +00:00
Daniel Stenberg
e2aaf22d5d support the new libcurl IDN feature, also a first attempt to display a stack
trace if a test results in a 'core' file and gdb is present
2004-04-30 08:03:07 +00:00
Daniel Stenberg
3304589043 idn is a new feature that can be made required for a test 2004-04-30 08:00:42 +00:00
Daniel Stenberg
0247642bb6 added test 166, formpost with white space in file name 2004-04-30 06:46:34 +00:00
Daniel Stenberg
19f5aa165c make the contents able to be any data, the previous stopped at white space 2004-04-30 06:45:53 +00:00
Daniel Stenberg
1756499b11 oops, a bad strtok() was fixed by Luca 2004-04-30 05:53:42 +00:00
Daniel Stenberg
15f9a93c25 include the full size of the sent response in the log 2004-04-30 05:51:37 +00:00
Daniel Stenberg
e99287734b Gisle fixed the counting of calloc()s 2004-04-29 14:33:19 +00:00
Daniel Stenberg
8349dde0f1 Introducing IDN host name testing. Test case 165 requires an IDN-capable
libcurl.
2004-04-29 13:43:04 +00:00
Daniel Stenberg
59907ebc0e fixed the host/proxy name issue when re-using a connection and made IDN names
work when using proxy by converting the IDN-name to the ACE-encoded version
before the request-URL is passed to the proxy.
2004-04-29 13:41:48 +00:00
Daniel Stenberg
da91d6ac66 remove newline from matching pattern 2004-04-29 13:31:57 +00:00
Daniel Stenberg
7548115a0e ignore cnonce lines too as they are based on the current time and will differ
from time to time!
2004-04-29 13:24:50 +00:00
Daniel Stenberg
8ca37dd1c7 encode the correct name 2004-04-29 11:57:52 +00:00
Daniel Stenberg
31e9e4bb76 curl_easy_duphandle() works again with ares enabled 2004-04-29 10:58:22 +00:00
Daniel Stenberg
84a322ab23 test 512 does some basic curl_easy_duphandle() testing 2004-04-29 10:57:10 +00:00
Daniel Stenberg
707f217b2d new test case for a simple curl_easy_duphandle() test 2004-04-29 10:56:22 +00:00
Daniel Stenberg
e6b45a66ec updated to work with the new Digest code 2004-04-29 10:47:13 +00:00
Daniel Stenberg
b34c40dcf5 Luca Altea's major HTTP Digest update 2004-04-29 08:18:32 +00:00
Daniel Stenberg
699ebe2f0b Gisle made the code use ERR_error_string_n() 2004-04-29 07:36:40 +00:00
Daniel Stenberg
e1c6f216c2 the new way of accessing the host name 2004-04-28 20:34:04 +00:00
Daniel Stenberg
630b73bfa8 Added LICENSE-MIXING to the release archive 2004-04-27 18:31:35 +00:00
Daniel Stenberg
877f16e5a5 IDN: Gisle Vanem made the win32 version handle a missing CHARSET environment
and then figure it out with a suitable windows call.
2004-04-27 15:19:28 +00:00
Daniel Stenberg
fbe1fa9dcc outputed elsewhere already 2004-04-27 15:13:46 +00:00
Daniel Stenberg
5b65cc55a2 idn stuff in code and configure script 2004-04-27 14:22:58 +00:00
Daniel Stenberg
97769737d0 we released yesterday, we have heaps of new stuff today! :-) 2004-04-27 14:22:40 +00:00
Daniel Stenberg
5b0a5c4050 provide our own inet_ntoa_r() proto if the system has none on its own 2004-04-27 14:17:36 +00:00
Daniel Stenberg
4b9f8e766d Made host name and proxy name get stored in a 'struct hostname' and set
all things up to work with encoded host names internally, as well as keeping
'display names' to show in debug messages. IDN resolves work for me now using
ipv6, ipv4 and ares resolving. Even cookies on IDN sites seem to do right.
2004-04-27 13:56:23 +00:00
Daniel Stenberg
96002646f1 without-libidn works too now 2004-04-27 12:08:53 +00:00
Daniel Stenberg
5ef6904ec3 hugehelp.c fix, without-ssl fix 2004-04-27 11:16:46 +00:00
Daniel Stenberg
2f53da5e7a make the loop use a fixed number of attempts to prevent eternal loops 2004-04-27 10:59:43 +00:00
Daniel Stenberg
58f1cc0b5f added curl_*_strerror 2004-04-27 07:05:40 +00:00
Daniel Stenberg
98c70b73f2 added doctype tag to get HTML compliant 2004-04-27 07:05:22 +00:00
Daniel Stenberg
6bd02a3ab5 We now make sure to only scan for SSL options with pkg-config if we haven't
disabled SSL with --without-ssl. This previously made the Makefiles use
the SSL libs even though told not to.
2004-04-26 22:13:36 +00:00
Daniel Stenberg
372e7a6cd4 Include "setup.h" and not "config.h" since setup.h is made to include
the correct config.h for the platform, and when this is done the USE_MANUAL
define is properly known.
2004-04-26 21:15:48 +00:00
Daniel Stenberg
211004bb0d my nroff 1.18.1 complained the URL as it contains a nroff combo somehow
and when I modified it slightly the warning dissappeared...
2004-04-26 21:12:10 +00:00
Daniel Stenberg
80d2fff1a1 oops, .obj not .c! 2004-04-26 20:41:33 +00:00
Daniel Stenberg
cf3cf413c8 improved libidn detection to correct the false positives we got 2004-04-26 15:31:43 +00:00
Daniel Stenberg
e218811ca3 made the verbose connect use the proper host name string even when using
a proxy
2004-04-26 15:19:55 +00:00
Daniel Stenberg
a9f2274bd8 NI_MAXHOST is not generally available, we use plain 256 bytes for the hostname
instead, its only for debug verbose output anyway
2004-04-26 15:14:19 +00:00
Daniel Stenberg
92179ff990 corrected mistake 2004-04-26 15:11:56 +00:00
Daniel Stenberg
4aac210a83 Gisle fixed a mistaken check 2004-04-26 14:18:42 +00:00
Daniel Stenberg
245e3122df Made defines instead of plain numbers for the Curl_resolv() return code to
make the code easier to read
2004-04-26 14:18:00 +00:00
Daniel Stenberg
ffc5fa3a2b typedef CURL in the curl.h file instead of only having a single useful typedef
in the separate types.h
2004-04-26 14:06:51 +00:00
Daniel Stenberg
f5042cce34 IDN adjustments and host cleanups by Gisle 2004-04-26 14:03:25 +00:00
Daniel Stenberg
712c67b4ae no longer include curl/types.h, it serves no purpose 2004-04-26 14:02:51 +00:00
Daniel Stenberg
5dcfb8ad66 ignore the curl/types.h header file 2004-04-26 14:02:01 +00:00
Daniel Stenberg
673ff5eb2c Moved down the ares check again to the bottom of the script since it
modified the compiler and link options so nothing can be tested for after
this check, as the c-ares lib might not have been built yet!
2004-04-26 13:42:39 +00:00
Daniel Stenberg
92fc3f07ba added the new files to the build 2004-04-26 12:33:14 +00:00
Daniel Stenberg
cff90cf3f9 "configure summary" 2004-04-26 12:29:30 +00:00
Daniel Stenberg
a33c53a36b Removed the FTPS test cases, they only annoy us as they don't work for anyone
anywhere. We need to write a better ftps-server for test purposes and then
we can re-introduced FTPS tests.
2004-04-26 12:04:34 +00:00
Daniel Stenberg
2370d4fa02 Curl_ip2addr() now takes an in_addr_t argument instead to prevent compiler
warnings
2004-04-26 12:02:33 +00:00
Daniel Stenberg
f128d904a5 removed assignment of variable never used 2004-04-26 11:56:05 +00:00
Daniel Stenberg
fb1039f2ab Tor Arntsen fixed a 'Statement not reachable'-warning 2004-04-26 11:52:43 +00:00
Daniel Stenberg
923ce98e42 Kim Karlsson pointed out that error 57 was wrongly documented 2004-04-26 09:28:02 +00:00
Daniel Stenberg
8e935b58a2 TommyTam made a patch to handle stdin redirection for win32. 2004-04-26 07:50:51 +00:00
Daniel Stenberg
c93e972543 some fixed, one removed, edited some. 7.12.0 in progress. 2004-04-26 07:47:16 +00:00
Daniel Stenberg
1cb66f5262 the recent commits explained 2004-04-26 07:26:16 +00:00
Daniel Stenberg
648e82f05d Major hostip.c cleanup and split into multiple files and easier #ifdef
usage.
2004-04-26 07:20:11 +00:00
Daniel Stenberg
1dbe60b8b7 supports showing "IDN" as a libcurl feature, now outputs the features
in alphabetical order
2004-04-26 07:14:47 +00:00
Daniel Stenberg
9631fa7407 added libidn awareness 2004-04-26 07:14:08 +00:00
Daniel Stenberg
9befc682ee added many comments 2004-04-26 07:12:52 +00:00
Daniel Stenberg
fbeb674479 major update of the error strings 2004-04-26 07:12:29 +00:00
Daniel Stenberg
af641d20a7 added comments 2004-04-26 07:11:39 +00:00
Daniel Stenberg
d02587750c added function headers and comments 2004-04-26 07:11:06 +00:00
Daniel Stenberg
241a4b3d45 --with-libidn[=PATH] is now supported 2004-04-26 07:08:36 +00:00
Daniel Stenberg
496e81a25a the next release is planned to become 7.12.0 2004-04-26 07:04:40 +00:00
Daniel Stenberg
f39b081253 start all over again 2004-04-26 07:03:51 +00:00
Daniel Stenberg
c96f7f13da 7.11.2 coming today 2004-04-26 06:05:49 +00:00
Daniel Stenberg
1bdc4b2006 updated the warning text when SSL is explicitly disabled 2004-04-25 15:23:23 +00:00
Daniel Stenberg
3915fecf80 USE_MANUAL is now defined by default 2004-04-25 15:21:16 +00:00
Daniel Stenberg
f94f06825c moved older changes to the CHANGES.2003 file 2004-04-25 08:33:06 +00:00
Daniel Stenberg
2ddbf8975a disable-manual 2004-04-25 08:19:55 +00:00
Daniel Stenberg
68a3cbe384 make the generated hugehelp.c file use the USE_MANUAL define so that it
will be properly built with configure --disable-manual even if the source
file is already present
2004-04-25 08:13:07 +00:00
Daniel Stenberg
b9432d1296 test164 HTTP range with multiple ranges 2004-04-24 09:33:25 +00:00
Daniel Stenberg
e202a29a9a removed a memory leak when doing a windows threaded resolve and it failed 2004-04-23 14:10:29 +00:00
Daniel Stenberg
3755bffcc2 Gisle Vanem found and fixed a memory leak when doing (failing) Windows
threaded name resolves.
2004-04-23 14:04:30 +00:00
Daniel Stenberg
2a0a305300 only a minor comment/format change 2004-04-23 11:00:47 +00:00
Daniel Stenberg
70e2aadc18 Replaced Curl_FormReadOneLine with Curl_formpostheader as that is the only use
for it. It saves one extra copy of the header.

I also added comments for several functions in formdata.c
2004-04-23 10:37:52 +00:00
Daniel Stenberg
a1c8aaf666 o --proxy-ntlm now checks if libcurl supports NTLM before using it
o minor --fail with authentication bugfix
2004-04-23 08:50:28 +00:00
Daniel Stenberg
8ee470aaeb --proxy-ntlm fix and test case 163 2004-04-23 08:47:20 +00:00
Daniel Stenberg
37e4858cd0 Made --proxy-ntlm check if the underlying library actually supports NTLM 2004-04-23 08:44:27 +00:00
Daniel Stenberg
a27072bebb minor format fix 2004-04-23 08:40:20 +00:00
Daniel Stenberg
47059f45fe added test 163 - a simple test case that use -F field<file, to verify that
we can pass on "odd" characters (newline, CR, tab) like this.
2004-04-23 08:40:11 +00:00
Daniel Stenberg
daced8041d No longer uses the valgrind option '--logfile-fd', we use the --logfile
option instead (even though it appends the pid to the file name, making it
harder to figure out its name to parse it after a test has run).

Also made sure we only use valgrind for the actual test command command lines,
not when for example running curl to detect if there are any already running
servers are present etc.
2004-04-23 08:38:43 +00:00
Daniel Stenberg
b053ae6a65 define the obsolete options to different values to prevent "duplicate case"
situtations in bindings that still have switch() cases for them
2004-04-23 06:29:41 +00:00
Daniel Stenberg
42f60ecb36 require SSL as otherwise NTLM doesn't work! 2004-04-23 06:04:52 +00:00
Daniel Stenberg
550862f41a missing brace 2004-04-22 21:27:32 +00:00
Daniel Stenberg
6838f74fe0 allow newlines in the contents when doing -F "var=[contents]"
Robert Marlow reported.
2004-04-22 20:09:33 +00:00
Daniel Stenberg
2ff30d067c - David Byron found and fixed a small bug with the --fail and authentication
stuff added a few weeks ago.  Turns out that if you specify --proxy-ntlm and
  communicate with a proxy that requires basic authentication, the proxy
  properly returns a 407, but the failure detection code doesn't realize it
  should give up, so curl returns with exit code 0. Test case 162 verifies
  this.
2004-04-22 20:07:41 +00:00
Daniel Stenberg
84406b3e2c allow newlines in the contents when doing -F "var=[contents]" 2004-04-22 15:26:30 +00:00
Daniel Stenberg
c323969bdd removed Curl_ftp_quit() as it was turned into a static in ftp.c 2004-04-22 13:15:17 +00:00
Daniel Stenberg
43cbbdbea0 If a transfer is found out to be only partial, libcurl will now treat that
as a problem serious enough to skip the final QUIT command before closing
the control connection. To avoid the risk that it will "hang" waiting for
the QUIT response. Added test case 161 to verify this.
2004-04-22 13:10:43 +00:00
Daniel Stenberg
1d3f76df71 If only a partial file was transfered, we consider that a fatal problem so
we won't try to QUIT the control connection and risk "hanging" waiting for
a response. Test case 161 verifies this. The quit-sending function was
also made static.
2004-04-22 13:09:00 +00:00
Daniel Stenberg
33cb93ad0b Added comments 2004-04-22 12:35:45 +00:00
Daniel Stenberg
4dc9179f4b modified how valgrind is run to make sure that file handle 3 exists when
we tell valgrind to use that to send the logfile to
2004-04-22 10:33:55 +00:00
Daniel Stenberg
26a5ec9aa0 danish mirror 2004-04-22 08:54:34 +00:00
Daniel Stenberg
883ea3113c Gisle's items 2004-04-21 19:35:06 +00:00
Daniel Stenberg
62b7c08bb3 include unistd.h as well for the close() proto on some platforms (like Tru64) 2004-04-21 11:18:42 +00:00
Daniel Stenberg
a85fa66cc8 typecast the tolower() argument to an int to prevent compiler warning 2004-04-21 11:15:35 +00:00
Daniel Stenberg
9ba010c629 typecast tolower/toupper arguments to int to make picky compilers complain
less
2004-04-21 11:15:02 +00:00
Daniel Stenberg
3ef3f2b6f0 test case 160 "should work" now 2004-04-21 08:56:02 +00:00
Daniel Stenberg
1401d909e8 Fix the "lingering close" problem when re-using a connection, as test case
160 shows.

We got no data and we attempted to re-use a connection. This might happen if
the connection was left alive when we were done using it before, but that was
closed when we wanted to read from it again. Bad luck. Retry the same request
on a fresh connect!

Deleted the sockerror variable again, it serves no purpose anymore.
2004-04-21 08:49:14 +00:00
Daniel Stenberg
3233322622 increase the headerbytecount for incoming "headers" 2004-04-21 08:47:57 +00:00
Daniel Stenberg
e373f1fd73 log the WAIT command 2004-04-21 06:56:54 +00:00
Daniel Stenberg
dc25cd6f3a cleanup leftovers 2004-04-20 09:46:10 +00:00
Daniel Stenberg
0e31d41d4e test160 - for a more controlled testing of the case where libcurl starts
to re-use a connection that is closed when re-used and libcurl should then
make a new fresh connection and use instead
2004-04-20 08:35:37 +00:00
Daniel Stenberg
b7a7600465 Cleaned up hostname/name/gname and path/ppath confusion. Removed the fixed-
length limit of the hostname part of the URL.
2004-04-20 07:53:24 +00:00
Daniel Stenberg
111a2f3057 new mirror and one that changed domain 2004-04-20 07:52:16 +00:00
Daniel Stenberg
760cecac8d make the first response get a "connection: close" header as that is how
most 1.1 connections will be closed. The case where it gets closed anyway
is subject for a new separate test.
2004-04-20 07:36:09 +00:00
Daniel Stenberg
6f8b4395ec changed the logging to work when the logfile is removed during testing 2004-04-19 15:20:30 +00:00
Daniel Stenberg
5506f8767c Make the server include "Connection: close" in the headers of the replies
it actually will close. This is after all what HTTP 1.1 says a server should
do.
2004-04-19 08:41:36 +00:00
Daniel Stenberg
5887945828 Gisle Vanem corrected a mistake in a recent progress fix 2004-04-19 07:18:26 +00:00
Daniel Stenberg
25e98179be Gisle Vanem: patches to make sws.c compile under MingW/MSVC is
attached. And some cosmetic fixes.
2004-04-17 11:38:41 +00:00
Daniel Stenberg
78ebe3fa5a Gisle made a failed connect output the reason for it 2004-04-17 11:33:47 +00:00
Daniel Stenberg
a8e8e51b14 NDEBUG should not be defined when CURLDEBUG is 2004-04-17 11:33:14 +00:00
Daniel Stenberg
f97d194934 adding issue 36 to be fixed before release 2004-04-16 07:33:53 +00:00
Daniel Stenberg
4661cc7403 don't display the . and .. files when dumping the log/ contents 2004-04-16 07:02:17 +00:00
Daniel Stenberg
bc11929395 remade the logging function to better deal with removed logfiles during
the execution of the tests
2004-04-16 07:01:47 +00:00
Daniel Stenberg
caf37bc92e issue 31 - fix windows multi interface is now corrected 2004-04-15 15:05:48 +00:00
Daniel Stenberg
5de447b0cb clarified that select() timeouts should always remain rather short 2004-04-15 15:05:12 +00:00
Daniel Stenberg
5dbaced4a2 my test suite edits 2004-04-15 14:53:47 +00:00
Daniel Stenberg
43f8a1f5de change the log format to look similar to sws
added various logging info
2004-04-15 13:55:37 +00:00
Daniel Stenberg
f57efa1899 clean the log directory between each single test, so that we can better
display all logs and only logs with relevant data when a test fails and -p
is used.
2004-04-15 13:37:19 +00:00
Daniel Stenberg
592522ceaf ftp->dirs[] is no longer terminated with a zero entry but ftp->dirdepth
should be used
2004-04-15 10:43:40 +00:00
Daniel Stenberg
4f84e6d9e2 removed the fixed dir depth limit in the FTP code 2004-04-15 07:52:39 +00:00
Daniel Stenberg
6f08903f07 two ipresolve fixes 2004-04-14 12:13:32 +00:00
Daniel Stenberg
220cd010bd format fix 2004-04-14 12:13:21 +00:00
Daniel Stenberg
68e8a0f0d9 asking for CURL_IPRESOLVE_V6 when ipv6 addresses can't be resolved will
now cause the resolve function to return NULL immediately
2004-04-14 12:10:44 +00:00
Daniel Stenberg
b23dbf9f34 Gisle Vanem made the -4/-6 actually get set too 2004-04-14 12:00:53 +00:00
Daniel Stenberg
1d0b5b507a Curl_wait_for_resolv() could hang due to the bad timeout timer resolution and
some bad thinking on my part.
2004-04-14 11:43:26 +00:00
Daniel Stenberg
b83d8104cd several changes 2004-04-14 07:07:30 +00:00
Daniel Stenberg
bf6e1053cf display interesting log files on failure, if -p is used 2004-04-14 07:04:45 +00:00
Daniel Stenberg
c3dd928e29 enable verbose as well 2004-04-14 06:53:34 +00:00
Daniel Stenberg
aba6c2b89d Added test case 511 in an attempt to repeat bug report #934666 "storage leak
in ftp.c", but it shows no leaking.
2004-04-14 06:30:37 +00:00
Daniel Stenberg
9c0a386246 minor format fix 2004-04-13 14:34:12 +00:00
Daniel Stenberg
bba3bb7556 eh, these can't be used for poll()! ;-) 2004-04-13 14:31:49 +00:00
Daniel Stenberg
c1422864b5 additional info 2004-04-13 14:27:47 +00:00
Daniel Stenberg
31a693b99a Gisle Vanem's fix that makes the multi interface work on Windows again even
when not using ares.
2004-04-13 13:59:12 +00:00
Daniel Stenberg
804534fbc9 spell fixes 2004-04-13 11:03:02 +00:00
Daniel Stenberg
1bc6532c16 more news 2004-04-13 10:58:44 +00:00
Daniel Stenberg
b48bf7470d proper typecast to prevent compiler warning 2004-04-13 10:42:32 +00:00
Daniel Stenberg
1ca9ce5ef4 removed the BUGS section since it offers nothing good 2004-04-13 09:08:52 +00:00
Daniel Stenberg
789f2ecbe7 1.2.0 2004-04-13 07:44:26 +00:00
Daniel Stenberg
ee7d1d0701 remove an long time #defined struct member and use the actual "real" name
instead to make it easier to find/read
2004-04-13 07:37:28 +00:00
Daniel Stenberg
4e3aa250c4 Moved the 'tcp_nodelay' member to the proper 'UserDefined' struct within the
sessionhandle to make the duphandle() function work as supposed. Also tried
to start document functions the doxygen way (in the headers of the functions).
Can't make it work though...
2004-04-13 07:16:26 +00:00
Daniel Stenberg
3647a6ddcd move issue 35 (hostip.c cleanup) forward, I don't feel like doing that now 2004-04-13 06:13:41 +00:00
Daniel Stenberg
79aaa85a51 full-test passes -p to runtests as well to get more details in case of failure 2004-04-13 05:58:19 +00:00
Daniel Stenberg
392a543eff Initial support for dumping the contents of the files in log/ when failing
when -p is used. For easier bug-hunting of autobuild failures. This still
only shows what files that are present in log/, as I believe we need to
filter which files we show on a failure.
2004-04-13 05:57:50 +00:00
Daniel Stenberg
eb6345de60 somewhat safer typecasting in case sizeof(long) != sizeof(void *) (is there
even such platforms?)
2004-04-12 06:55:25 +00:00
Daniel Stenberg
0fd3b7a00a David Byron's patch for MSVC builds with zlib 2004-04-11 20:25:10 +00:00
Daniel Stenberg
bd51b80fa5 updated to not include the msvc-generated files 2004-04-11 06:33:02 +00:00
Daniel Stenberg
15c900839b when checked out from CVS, run this to generate the proper scripts 2004-04-11 06:32:41 +00:00
Daniel Stenberg
2fd463e979 Dirk Manske increased the resolution for what the CURLINFO_*_TIME return. 2004-04-09 09:36:31 +00:00
Daniel Stenberg
de8660a96a we're working on 1.2.0 now 2004-04-08 18:10:03 +00:00
Daniel Stenberg
1e9cb272f1 added test 159, use --ntlm together with -0 2004-04-07 15:01:11 +00:00
Daniel Stenberg
72b1144b8c getting only a 100 Continue response and nothing else, when talking HTTP,
is now treated as an error by libcurl
2004-04-07 14:27:54 +00:00
Daniel Stenberg
348fe0e210 --limit-rate using -d or -F does not work 2004-04-07 14:03:13 +00:00
Daniel Stenberg
cf1f46e1ca renamed the strtoofft() macro to curlx_strtoofft() to adjust to the curlx_*
concept, and added lib/README.curlx to explain details about it
2004-04-07 07:30:40 +00:00
Daniel Stenberg
f052cbee19 Use curl_off_t for the limit rate values to support REALLY huge values on
such platforms that support large files.
2004-04-07 07:23:52 +00:00
Daniel Stenberg
1f5e8670e1 mention getting windows builds to work after rearrangements 2004-04-06 15:30:57 +00:00
Daniel Stenberg
3b491d0f73 Moved long-standing issues over from TODO-RELEASE to the more long-term TODO
file.
2004-04-06 15:29:01 +00:00
Daniel Stenberg
26a2b8d26d the memory leak on windows have been addressed 2004-04-06 15:22:21 +00:00
Daniel Stenberg
a7fd6f9007 require ssl since ntlm needs it 2004-04-06 15:16:07 +00:00
Daniel Stenberg
8ed44e8dfb New authentication code added, particularly noticable when doing POST or PUT
with Digest or NTLM. libcurl will now use HEAD to negotiate the authentication
and when done perform the requested POST.
2004-04-06 15:14:10 +00:00
Daniel Stenberg
f617c1131a mention the man page updates from the other day 2004-04-06 15:12:50 +00:00
Daniel Stenberg
5ca47f19d7 the pack_hostent() proto isn't used/needed with ipv6 is enabled.
time to restructure this source file!
2004-04-06 15:09:43 +00:00
Daniel Stenberg
9044fcbb5f Gisle Vanem's fix for bug item #927979 reported by Nathan O'Sullivan.
Good enough?
2004-04-06 14:51:14 +00:00
Daniel Stenberg
7a82810b59 Added the curl source header and changed some comments 2004-04-06 14:07:04 +00:00
Daniel Stenberg
0ccdf3d0e6 improved --limit-rate functionality, partly by the new use of curlx_tvnow() 2004-04-06 12:06:05 +00:00
Daniel Stenberg
ca7f0852df Gisle Vanem caught me breaking the windows version of Curl_strerror() 2004-04-06 12:02:36 +00:00
Daniel Stenberg
780b962336 provide these functions as curlx_* ones as this enables the curl app to
re-use these sources and functions for subsecond resolution timing
2004-04-06 10:15:10 +00:00
Daniel Stenberg
bbeb840916 up-to-date with reality 2004-04-06 07:59:11 +00:00
Daniel Stenberg
f4ec465bfc added HAVE_GETTIMEOFDAY, we need it for better time resolution 2004-04-06 07:49:57 +00:00
Daniel Stenberg
57c86a953d typecasts to please picky compilers checking the printf() format string 2004-04-06 07:48:29 +00:00
Daniel Stenberg
0fff8656e9 one change, three bugs, one credit 2004-04-06 06:24:37 +00:00
Daniel Stenberg
7b929636ee the last couple of days 2004-04-06 06:24:06 +00:00
Daniel Stenberg
76835a2e00 two issues to fix before 7.11.2, one issue to fix befor 7.12.0 2004-04-06 06:18:48 +00:00
Daniel Stenberg
1b171b02ac remove the general use of sys_nerr 2004-04-06 06:06:10 +00:00
Daniel Stenberg
a8dc362572 generated files, no need to keep in CVS 2004-04-05 12:38:54 +00:00
Daniel Stenberg
7c72f8ee6c prepend the man3 dir to the file name to work better.
Robin Kay pointed this out.
2004-04-02 11:04:34 +00:00
Daniel Stenberg
c39a54609b edits, mainly to make the generated html output nicer 2004-04-02 09:56:01 +00:00
Daniel Stenberg
ce6b767b47 minor edits 2004-04-02 09:50:42 +00:00
Daniel Stenberg
7ba4d3464f Dirk Manske's feedback:
* bring back subsecond resolution to CURLINFO_TOTAL_TIME
* Fix the Curl_pgrsDone() so that the final progress update is shown properly
2004-04-02 07:32:03 +00:00
Daniel Stenberg
03def138fe Andrs Garca's updated mingw makefiles 2004-04-02 07:18:13 +00:00
Daniel Stenberg
9d99af5329 if select returns -1, bail out of the loop 2004-04-02 06:40:31 +00:00
Daniel Stenberg
c8d850dbad Only check that the c-ares lib is valid if we don't use the "embedded"
directory. The provided ares dir is probably up-to-date, but more importantly
it is often not built yet at the time when this configure script runs.
2004-04-01 10:26:59 +00:00
Daniel Stenberg
01ea357744 When ares is enabled, we now check for the ares_cancel function to verify
that we use a library that is recent enough to build with the latest libcurl.
2004-04-01 09:10:33 +00:00
Daniel Stenberg
ad9e83a90f Dirk Manske's fix that makes sure we cancel the ares resolve when we time out
from a name resolve. Without this, we leak memory!
2004-04-01 08:40:36 +00:00
Daniel Stenberg
6c9d96e811 Dirk Manske's ares_cancel() function was added. 2004-04-01 08:25:58 +00:00
Daniel Stenberg
f840e5192c edited slightly, point out our new mailinglist 2004-04-01 08:25:23 +00:00
Daniel Stenberg
ba9272dd05 remind us about cvs tagging when we've built a release archive 2004-04-01 08:23:26 +00:00
Daniel Stenberg
675db3a211 removed my previously attempted fix for ares timeouts, not needed 2004-04-01 07:04:58 +00:00
Daniel Stenberg
1fc7ff878e Applied Joe Halpin's bugfixes to the NI_WITHSCOPEID test program. 2004-04-01 06:53:11 +00:00
Daniel Stenberg
b643d148b1 Dominick Meglio man page fixes 2004-04-01 06:10:56 +00:00
Daniel Stenberg
5804c995e1 Use the new HAVE_NI_WITHSCOPEID define instead of merely checking for the
existance of NI_WITHSCOPEID since some platforms have that define but still
can't function with it set.
2004-03-31 21:33:52 +00:00
Daniel Stenberg
13a6f85320 issue 30, digest re-negotiate works now! 2004-03-31 21:04:26 +00:00
Daniel Stenberg
8b4582f111 recent changes 2004-03-31 21:03:55 +00:00
Daniel Stenberg
cd3bf7c56f updates and David Byron's spellfix 2004-03-31 21:01:20 +00:00
Daniel Stenberg
ee1595dcd5 Roy Shan fixed a case that prevented ares name resolve timeouts to occur. 2004-03-31 20:50:01 +00:00
Daniel Stenberg
310086deed we're working on 7.11.2-CVS right now 2004-03-31 20:22:28 +00:00
Daniel Stenberg
5d27f50f2f HAVE_NI_WITHSCOPEID spelled right! 2004-03-31 20:13:53 +00:00
Daniel Stenberg
9d0330d5bd Remove the elapsed time from the most recent select() only. 2004-03-31 13:19:41 +00:00
Daniel Stenberg
d5074f74bb The asynch name resolve methods now all use CURL_TIMEOUT_RESOLVE for
the specific time to wait for a resolve. The definition is at the top of
this source file.
2004-03-31 12:55:24 +00:00
Daniel Stenberg
ea0cf7c87b Dirk Manske found out the Curl_wait_for_resolv() timed out too early. 2004-03-31 12:45:26 +00:00
Daniel Stenberg
a56164c8e0 added swsbounce 2004-03-31 12:24:08 +00:00
Daniel Stenberg
cd95bb22ea added include to fix warning 2004-03-31 11:55:56 +00:00
Daniel Stenberg
1745ecd8ac * Fixed a memory leak when doing repeated re-negotiations.
* Made the incoming line parser more forgiving to allow "name=contents" pairs
where the contents isn't within double quotes.
* Made the digest code return CURLDIGEST_BADALGO if a requested algorithm
isn't supported by the code.
2004-03-31 11:55:07 +00:00
Daniel Stenberg
75d66b9c62 test 153 tests Digest authorization and stale=true stuff 2004-03-31 11:51:21 +00:00
Daniel Stenberg
2ff9f55001 Added "swsbounce" magic: if this keyword is present in a <data> section it
sets the "swsbounce" magic mode. If there follows a request for the SAME
test number and the SAME part number, this mode will make the server bump
the part number internally and thus return a different <dataNUM> section
than it otherwise would.

Test case 153 uses this in case you need an example. It is pretty involved
and hard-to-use, but then the situation is pretty special over all. Enjoy.
2004-03-31 11:50:44 +00:00
Daniel Stenberg
ce446dbdc2 Moved the NI_WITHSCOPEID magic #ifdef to the top of the file and made sure
we use the NIFLAGS properly on both places in the code that use getnameinfo().
2004-03-31 10:59:48 +00:00
Daniel Stenberg
dd2add82ee Fixed how the user name is extracted from http_proxy environment variable
when set.
2004-03-31 10:46:06 +00:00
Daniel Stenberg
40d9855df2 Andrs Garca fixed a warning in the ioctlsocket() usage. 2004-03-31 10:34:53 +00:00
Daniel Stenberg
ecf7adba15 modified the NI_WITHSCOPEID to use an AF_INET6 socket immediately and
added some more debug output to make it easier to detect failure reasons
in the autobuild logs
2004-03-31 10:31:08 +00:00
Daniel Stenberg
931c847e2b CURLDIGEST_BADALGO is a new return code from the digest code 2004-03-31 09:20:27 +00:00
Daniel Stenberg
8230d9bff8 Dominick Meglio fixed a missing comma 2004-03-31 06:10:40 +00:00
Daniel Stenberg
64cc14e9e6 one issue less 2004-03-30 15:35:09 +00:00
Daniel Stenberg
d5b8971ff3 typecast setsockopt()'s 4th argument to void * to make compilers complain
less
2004-03-30 13:05:45 +00:00
Daniel Stenberg
7ea837a18c adjusted to the new dns cache function to hide more hostip internals 2004-03-30 13:02:31 +00:00
Daniel Stenberg
b8b8473b6d Lots of comments added an clarified. Added timeout for the ares version
of Curl_is_resolved() to address Roy Shan's reported problem.
2004-03-30 13:02:07 +00:00
Daniel Stenberg
894dbae455 added stale boolean to the digest struct 2004-03-30 13:00:53 +00:00
Daniel Stenberg
2c11425868 first attempt to support stale=true 2004-03-30 13:00:32 +00:00
Daniel Stenberg
a2ea0abf7f Added CURL_CHECK_NI_WITHSCOPEID that checks if NI_WITHSCOPEID exists and
works. No code actually uses the HAVE_NI_WITHSCOPEID (that a positive test
results in), but this is still only for testing purposes.
2004-03-30 10:35:54 +00:00
Daniel Stenberg
be8f8e66a4 Dominick Meglio's new ares_expand_string() function 2004-03-30 09:06:42 +00:00
Daniel Stenberg
9fadfffb9d when checking the automake version, cut off trailing "-p[whatever]" from the
version string before doing the version number checks.
2004-03-30 08:28:39 +00:00
Daniel Stenberg
76f23acfa1 if 0'ed out a code section that uses __FUNCTION__ etc, used for debugging
the new "fail with auth" code
2004-03-30 08:21:09 +00:00
Daniel Stenberg
6950aeafcc init the dns pointer to NULL for clarity 2004-03-30 08:14:37 +00:00
Daniel Stenberg
cd160a66c9 added more comments for what the functions return 2004-03-30 08:11:54 +00:00
Daniel Stenberg
a7376968d2 mention the fact that you can append a new CA cert to the existing bundle too 2004-03-30 06:46:36 +00:00
Daniel Stenberg
fd96a2af34 David Byron's patch was appplied to make CURLOPT_FAILONERROR work nicely
even with authentcations such as NTLM or Digest enabled. Test cases 150, 151
and 152 were added to verify the functionality.
2004-03-30 06:42:12 +00:00
Daniel Stenberg
a90cd1a45c David Byron's new test cases for the --fail and auth stuff. 2004-03-30 06:41:33 +00:00
Daniel Stenberg
8e92600ddd David Byron made CURLOPT_FAILONERROR work with authentications such as NTLM
or Digest.
2004-03-30 06:40:01 +00:00
Daniel Stenberg
5e75c310ba 'authdone' was added to the sessionhandle and thus was removed from the
argument to the NTLM function(s)
2004-03-30 06:39:24 +00:00
Daniel Stenberg
20cab07c29 David Byron added 'authdone' to the SessionHandle. 2004-03-30 06:38:52 +00:00
Daniel Stenberg
f466d7a6f1 these are now in the packages/vms dir 2004-03-29 22:45:14 +00:00
Daniel Stenberg
dc46f535ae The select() timeout is better not static since some implementation actually
might change it. I don't *think* it does it when the timeout is 0,0 but it
is better to be sure...
2004-03-29 21:29:24 +00:00
Daniel Stenberg
27fd5d6d6a issue 24 is fixed by making sure the time fields use a static width 2004-03-29 13:46:58 +00:00
Daniel Stenberg
18a3c3302f several noticable recent changes 2004-03-29 13:46:16 +00:00
Daniel Stenberg
97959a00d7 changes changes changes 2004-03-29 13:45:53 +00:00
Daniel Stenberg
5e92b2906b All test targets now run 'make all' before they prcoeed with the actual
testing so that all test files are build first properly. David Byron reported.
2004-03-29 12:38:41 +00:00
Daniel Stenberg
126ed14313 Gisle Vanem's djgpp/MS-DOS updates 2004-03-29 12:29:25 +00:00
Daniel Stenberg
712d0374f7 fix to figure out the "real" windows path when built and run with mingw
Andrs Garca helped out!
2004-03-29 09:26:31 +00:00
Daniel Stenberg
4b49b2e3cf re-indented to use curl-standard source formatting 2004-03-29 07:25:59 +00:00
Daniel Stenberg
d85c21994f netinet/tcp.h may require netinet/in.h to be include before 2004-03-29 06:22:57 +00:00
Daniel Stenberg
6b33a5f954 use the correct struct 2004-03-28 21:41:10 +00:00
Daniel Stenberg
ed22afe5fb Tor fixed a left-over from the ip argument to setnodelay 2004-03-27 11:15:50 +00:00
Daniel Stenberg
843391c745 Gisle Vanem:
A patch to bypass MS' sillyness with regard to IPv6 and getaddrinfo().

The CURLDEBUG part is to avoid redefinition warning caused by memdebug.h. If
ENABLE_IPV6 isn't enabled, it doesn't matter since we never call
getaddrinfo(). Allthough we could to support weird protocols like SOCK_RDM
that Win-2K/XP has.
2004-03-26 13:47:46 +00:00
Daniel Stenberg
ad6699e0c4 some more password blurb 2004-03-26 13:20:28 +00:00
Daniel Stenberg
43137cf595 check for netinet/tcp.h precense before actually including it 2004-03-26 07:10:15 +00:00
Daniel Stenberg
db6dc49b0b removed the ip number from the notcpdelay function 2004-03-26 07:03:30 +00:00
Daniel Stenberg
593170d1de get the version number from the new curlver.h header file 2004-03-25 16:03:41 +00:00
Daniel Stenberg
0eace2fefe localtime and gmtime are not thread-safe on newer AIXes either so we force
a check for there *_r-versions too
2004-03-25 15:48:54 +00:00
Daniel Stenberg
abd65e21c6 force recent AIX versions to check for strerror_r 2004-03-25 15:10:01 +00:00
Daniel Stenberg
e21104a865 only output one line about the nodelay even if it fails 2004-03-25 14:01:01 +00:00
Daniel Stenberg
3ecf63fa66 win32 doesn't need and even doesn't build if we extern declare sys_nerr 2004-03-25 13:43:19 +00:00
Daniel Stenberg
762dcf0780 include the strerror.h file without curl_ prefix 2004-03-25 13:42:23 +00:00
Daniel Stenberg
75ee9b5333 strerror without prefix 2004-03-25 13:40:57 +00:00
Daniel Stenberg
e161bdc5be cut off 'curl_' from the strerror file names 2004-03-25 13:40:24 +00:00
Daniel Stenberg
bb3d6e8552 tcp-nodelay patch by Joe Halpin 2004-03-25 13:37:18 +00:00
Daniel Stenberg
189c2f4989 so there are at least two different strerror_r() versions and our brand
new configure script detects them and now this code acts according to what
API that was detected
2004-03-25 12:45:01 +00:00
Daniel Stenberg
f28389c87b Tor Arntsen fixed how this is invoked 2004-03-25 12:16:42 +00:00
Daniel Stenberg
7461592a16 strerror_r() detection changes:
1. Try with _THREAD_SAFE instead of _REENTRANT, as AIX seems to require it
   and if _REENTRANT is required we should already have it set since one of
   the previous tests.
2. Added API-detection for what kind of strerror_r() that is provided. The
   POSIX style or the glibc style.

Tor Arntsen provided the necessary feedback these changes are based upon.
2004-03-25 12:15:00 +00:00
Daniel Stenberg
50b0e72f7b detect daily snapshots using the new path for this test 2004-03-25 11:39:29 +00:00
Daniel Stenberg
76e73cfec8 make clean now removes *dist files too that might be leftovers from
'maketgz'
2004-03-25 11:34:35 +00:00
Daniel Stenberg
5d8ec172a6 invoke this script via env, as it is more likely to exist at a fixed path
while perl often is installed in /usr/local/bin or elsewhere
2004-03-25 08:22:03 +00:00
Daniel Stenberg
0953140b53 added curl_strerror to the build 2004-03-25 07:53:37 +00:00
Daniel Stenberg
6c2825997a extern declare the sys_nerr variable. Required on Solaris at least. 2004-03-25 07:52:11 +00:00
Daniel Stenberg
accc6eb91a Always include setup.h as the first header file.
Added a more verbose comment about what strerror_r() can set errno to in
case of failure.
This file still doesn't build on Solaris due to a missing 'sys_nerr' symbol.
2004-03-25 07:33:11 +00:00
Daniel Stenberg
eab8cdc640 Added protos for the upcoming curl_*_strerror() functions 2004-03-24 22:53:42 +00:00
Daniel Stenberg
dc9d0f256d missed the new header file 2004-03-24 22:46:02 +00:00
Daniel Stenberg
b60d6404d8 Gisle Vanem's fix to replace the bad use of strerror(). This introduces
Curl_strerror() that attempts to be thread-safe _and_ works on Windows too!
2004-03-24 22:45:37 +00:00
Daniel Stenberg
08fe4b3210 new header file - for Curl_strerror() 2004-03-24 22:43:09 +00:00
Daniel Stenberg
0e60a118d0 better comments, added some more variable types we use in the font-lock 2004-03-24 22:24:03 +00:00
Daniel Stenberg
4b78b4124e Tor Arntsen's major ispell patch 2004-03-24 21:40:45 +00:00
Daniel Stenberg
0d6d9af7ab Tor Arntsen's mkdir-fix to make this run with perl 5.0005 2004-03-24 21:28:31 +00:00
Daniel Stenberg
41cd36b830 Avoid doing chdir .., as it breaks the ability to use symlinks properly.
chdir to absolute directory names instead. (this flaw exists in the shell
version too)
2004-03-24 10:52:21 +00:00
Daniel Stenberg
242be55771 added check for strerror_r() 2004-03-24 08:45:58 +00:00
Daniel Stenberg
7cf47ea5b5 include curl/curlver.h instead since this only needs the version defines 2004-03-24 07:27:58 +00:00
Daniel Stenberg
6fb0012833 error messages and new test script 2004-03-23 16:12:55 +00:00
Daniel Stenberg
9d1ce9c0df we are progressing 2004-03-23 16:12:37 +00:00
Daniel Stenberg
5947e4e9fd distribute testcurl.pl too starting now 2004-03-23 16:11:01 +00:00
Daniel Stenberg
e992aa6a54 Greg Hewgill's version of testcurl.sh rewritten in perl for greater
portability. I put it in this directory instead of the root since I think
perhaps it makes more sense.
2004-03-23 16:07:02 +00:00
Daniel Stenberg
2cf218610e keep current_speed as an curl_off_t for better precision at higher speeds
if large file support is available
2004-03-23 16:01:31 +00:00
Daniel Stenberg
fe6f0aeb26 switch() on the right variable! 2004-03-23 15:48:27 +00:00
Daniel Stenberg
bd04c6fb67 curl_strequal() returns int, keep return variables in an int 2004-03-23 15:30:12 +00:00
Daniel Stenberg
c5637baa06 make the variables that hold the result of strlen() size_t 2004-03-23 15:28:31 +00:00
Daniel Stenberg
f8426a2c44 stricter variable type usage 2004-03-23 15:25:54 +00:00
Daniel Stenberg
0c791d1e76 variable type usage cleanup to please picky compilers 2004-03-23 15:20:57 +00:00
Daniel Stenberg
c4a89d29f6 get strlen() results in a size_t, delete 'register' 2004-03-23 15:14:57 +00:00
Daniel Stenberg
306ff5649a made time2str() use longs internally instead to prevent compiler warnings
when converting to ints
2004-03-23 15:06:14 +00:00
Daniel Stenberg
1c652dfc5d added explicit typecasts to prevent compiler warnings on variable conversions 2004-03-23 15:01:19 +00:00
Daniel Stenberg
1f61e7f8f4 If localbind fails, provide a more portable error message. 2004-03-23 14:43:42 +00:00
Daniel Stenberg
1a5f190e47 minor update by Kevin 2004-03-23 14:34:09 +00:00
Daniel Stenberg
570033448c src/version.h was not properly made! 2004-03-23 14:29:21 +00:00
Daniel Stenberg
f44b655513 progress meter fix, CURLINFO_CONTENT_LENGTH_DOWNLOAD fix, cygwin package fix 2004-03-23 11:52:08 +00:00
Daniel Stenberg
0aa720fa26 it actually fits to make a NNNd NNh display so this can be used up to
999 days
2004-03-23 11:46:31 +00:00
Daniel Stenberg
d44f3f84f8 Fixed the time fields no never get wider than 8 letters. They can now switch
to a "days + hours" or even "just days" display if the time value is very
large. I also switched several calculations over to fixed-point instead of the
previous doubles.
2004-03-23 11:43:34 +00:00
Daniel Stenberg
d426db3d27 int/size_t cleanup 2004-03-23 09:12:51 +00:00
Daniel Stenberg
0fd88d7c8f minor variable type cleanups 2004-03-23 08:50:28 +00:00
Daniel Stenberg
4e84ac4db8 minor edits to make picky compilers whine less 2004-03-23 08:46:08 +00:00
Daniel Stenberg
da5c8a121f changed the long to int typecasts to see if icc 8.0 complains less on this 2004-03-23 08:42:01 +00:00
Daniel Stenberg
76c36688d0 Makes CURLINFO_CONTENT_LENGTH_DOWNLOAD work even if CURLOPT_NOBODY is set
true.
2004-03-22 22:38:12 +00:00
Daniel Stenberg
651c8d3bc4 Kevin Roth's updates to handle a new requirement from the Cygwin folks to
package man and doc files in a slightly different location.
2004-03-22 22:24:23 +00:00
Daniel Stenberg
a8a946d71d crap files to get the dirs made when checked out from CVS 2004-03-22 21:46:08 +00:00
Daniel Stenberg
c5c005609e container to get this dir made 2004-03-22 21:42:07 +00:00
Daniel Stenberg
97886f9353 Make the axp/README ia64/README vax/README files get included as well.
They're 0-bytes files, but make the dirs get created!
2004-03-22 21:37:02 +00:00
Daniel Stenberg
a784bd0797 fixed the ntlm problem with longish passwords 2004-03-22 13:56:48 +00:00
Daniel Stenberg
4aacf65678 vms fixes committed 2004-03-22 13:56:30 +00:00
Daniel Stenberg
dd1ba7633e Enabled 'NT responses' in the NTLM type-3 message. 2004-03-22 13:50:30 +00:00
Daniel Stenberg
a4ea5a4054 fixed /I "." for the debug build too 2004-03-22 11:32:22 +00:00
Daniel Stenberg
69060b1382 add /I "." to include ca-bundle.h properly 2004-03-22 11:26:40 +00:00
Daniel Stenberg
a6562ea77d issue 27 fixed, moved libcurl version defines to its own header file 2004-03-22 10:22:01 +00:00
Daniel Stenberg
ad3563096a include the new curlver instead, since all this wants is the version info 2004-03-22 08:54:26 +00:00
Daniel Stenberg
c5f02c1986 Introducing curl/curlver.h for keeping the curl version info only. 2004-03-22 08:37:38 +00:00
Daniel Stenberg
7ef5d20cad files moved here from the $ROOT/src dir 2004-03-21 22:50:53 +00:00
Daniel Stenberg
98b619c3a7 removed deleted files 2004-03-21 22:49:36 +00:00
Daniel Stenberg
5b75919f95 Marty Kuhrt's adjustments for a cleaner VMS build 2004-03-21 22:44:52 +00:00
Daniel Stenberg
20b76e09e3 Marty Kuhrt's VMS updates 2004-03-21 22:38:01 +00:00
Daniel Stenberg
67fca4cb01 recognize and use ACLOCAL_FLAGS if set (Thomas Schwinge patch) 2004-03-21 15:45:58 +00:00
Daniel Stenberg
606715b2cd use tabs, not spaces! 2004-03-21 15:32:15 +00:00
Daniel Stenberg
ce04b35032 Added the Version 7.11.1 marker 2004-03-19 13:22:48 +00:00
Daniel Stenberg
ec7f244ee9 starting a new cycle 2004-03-19 08:41:49 +00:00
Daniel Stenberg
a5b206f398 irix configure fix and a msvc project file update 2004-03-18 14:20:17 +00:00
Daniel Stenberg
306a05f9ff Mitz Wark's reported Digest re-negotiate problem is issue 30. 2004-03-18 12:59:03 +00:00
Daniel Stenberg
81f8350616 For IRIX systems we must pick the "correct" lib dirs for the particular
libs we want. $libsuff is the magic variable that contains a suffix (which
might be blank). Tor Arntsen brought details and verified this fix.
2004-03-18 10:03:34 +00:00
Daniel Stenberg
760ca6adc4 added http_ntlm.[ch] and inet_pton.[ch], pointed out by Watz 2004-03-17 21:30:26 +00:00
Daniel Stenberg
ffb35ff5c3 Gnter Knauf's update, mainly converted to plain old C comments. 2004-03-17 13:36:45 +00:00
Daniel Stenberg
8eda06131b new netware-related files added to the distribution 2004-03-17 12:48:41 +00:00
Daniel Stenberg
5b55f9ecb3 Gnter Knauf's NetWare changes. 2004-03-17 12:46:42 +00:00
Daniel Stenberg
3417e0b0fc nonsense comments removed 2004-03-17 07:22:04 +00:00
Daniel Stenberg
79ed144b0f mention yesterday's man page update frenzy 2004-03-16 10:41:14 +00:00
Daniel Stenberg
8e5cf6589c issue 29 has a bug report mentioning details 2004-03-16 10:40:48 +00:00
Daniel Stenberg
fc67cca882 removed the min() macro define 2004-03-16 09:16:38 +00:00
Daniel Stenberg
eea2287068 random updates 2004-03-16 07:56:51 +00:00
Daniel Stenberg
5fe5de7511 added the CA bundle default path, and mention the risk that the server you
try to talk to may be an imposter
2004-03-16 07:25:52 +00:00
Daniel Stenberg
4a6b9972dd ntlm and long passwords 2004-03-15 16:32:13 +00:00
Daniel Stenberg
256a16a8a3 if the global_init() is called from within curl_easy_init() and returns
an error code, we now make curl_easy_init fail and return NULL.
2004-03-15 16:28:36 +00:00
Daniel Stenberg
30e0891d3d ignore these files 2004-03-15 13:20:53 +00:00
Daniel Stenberg
8147ccdf76 automake file for this dir 2004-03-15 13:20:01 +00:00
Daniel Stenberg
26ab286630 provide URLs to two patches mentioned 2004-03-15 13:13:14 +00:00
Daniel Stenberg
738807883e NTLM fix 2004-03-15 13:09:59 +00:00
Daniel Stenberg
03a0988ce8 better formatting to create fine links in the web version 2004-03-15 12:42:19 +00:00
Daniel Stenberg
7de892eeb4 more formatting fixes 2004-03-15 12:41:24 +00:00
Daniel Stenberg
8c4e91a653 refer to function names better to enhance the HTML output 2004-03-15 11:56:07 +00:00
Daniel Stenberg
8f77030473 Initial commit of the first attempt to make three new *strerror() functions.
No protos in the headers yet and no docs.
2004-03-15 11:51:32 +00:00
Daniel Stenberg
546d0bd3d1 windows builds now report a slightly different "OS" string 2004-03-15 11:43:04 +00:00
Daniel Stenberg
5d53b544d3 check for m4 version in buildconf 2004-03-15 11:42:48 +00:00
Daniel Stenberg
6dc8fac122 random formatting updates to look better in HTML version 2004-03-15 11:37:37 +00:00
Daniel Stenberg
8114f8562b use .NF for the struct part to looke better in HTML
format some function references properly
2004-03-15 11:30:29 +00:00
Daniel Stenberg
c79fa187b9 more fixes 2004-03-15 11:26:53 +00:00
Daniel Stenberg
237ec68b0e better formatting of functions to get better links in the web version 2004-03-15 10:26:08 +00:00
Daniel Stenberg
4ebf4f6e55 better mentioning of other functions to create proper hrefs in the web
version
2004-03-15 10:23:14 +00:00
Daniel Stenberg
4d86593f3c build_vms.com is removed from here 2004-03-15 10:18:38 +00:00
Daniel Stenberg
ec050ccbc4 Marty Kuhrt's VMS updates 2004-03-15 10:11:34 +00:00
Daniel Stenberg
f19cade50f Added the new vms subdir in the packages dir 2004-03-15 10:10:24 +00:00
Daniel Stenberg
a2f35aaf67 new vms subdir 2004-03-15 10:08:32 +00:00
Daniel Stenberg
e5c4b6b345 not used anymore since Marty Kuhrt's recent VMS updates 2004-03-15 10:03:58 +00:00
Daniel Stenberg
bad978feb2 Marty Kuhrt's provided files for the VMS package 2004-03-15 10:03:05 +00:00
Daniel Stenberg
bea9152aa8 Check for a GNU version of m4, since autoconf won't run nicely without one. 2004-03-15 07:47:13 +00:00
Daniel Stenberg
f788f988ea fix signed and unsigned warnings 2004-03-14 18:15:04 +00:00
Daniel Stenberg
d04ffd258b postsize is off_t now, so we typecase it to int before doing normal printf
with it (knowing it won't be larger than what fits in an int)
2004-03-13 17:11:42 +00:00
Daniel Stenberg
24cfa7f1bb the postsize is an off_t so use the proper printf format to output the
content-length when doing multipart posts
2004-03-13 17:03:17 +00:00
Daniel Stenberg
94a1d09ac7 more variable type fixing for the huge posts 2004-03-12 14:22:16 +00:00
Daniel Stenberg
230a75091b newer c-ares release 2004-03-12 13:17:46 +00:00
Daniel Stenberg
4ad68ec305 more variable type fixes for the large POST support 2004-03-12 13:06:01 +00:00
Daniel Stenberg
ef776ab893 Made the 'postsize' variable an off_t type to be able to hold large file
sizes if desired
2004-03-12 12:07:01 +00:00
Daniel Stenberg
f8ff0f6bef minor variable type fix 2004-03-12 12:05:33 +00:00
Daniel Stenberg
bc7122f6e2 CURLOPT_POSTFIELDSIZE_LARGE is added in 7.11.1 2004-03-12 09:14:45 +00:00
Daniel Stenberg
e5963dae48 ignore aclocal.m4 2004-03-12 08:57:10 +00:00
Daniel Stenberg
1ebda8fa0e Added CURLOPT_POSTFIELDSIZE_LARGE to offer a large file version of the
CURLOPT_POSTFIELDSIZE option to allow really big HTTP POSTs.
2004-03-12 08:55:47 +00:00
Daniel Stenberg
9af532e662 David Byron's fix to clear outs.filename 2004-03-12 08:03:31 +00:00
Daniel Stenberg
9d064a3927 dl and ulspeed are now curl_off_t so typecast them to double when we
return their values
2004-03-11 21:51:55 +00:00
Daniel Stenberg
d6edcfb486 Optimize the way libcurl uses CWD 2004-03-11 21:49:56 +00:00
Daniel Stenberg
1d5a914c1c Made max5data() take a curl_off_t size as argument instead of double. Should
make the progress meter more accurate for large files. Also made the sprintf
usage in that function avoid floating point.
2004-03-11 21:48:15 +00:00
Daniel Stenberg
666bc9ee4e added that header fiddling the msvc users will enjoy 2004-03-11 13:15:14 +00:00
Daniel Stenberg
e545e33d5f Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets. 2004-03-11 13:13:35 +00:00
Daniel Stenberg
326e8b9fc1 don't let the EINTR stuff build on windows 2004-03-11 12:57:04 +00:00
Daniel Stenberg
0d1fc73f21 Use more curl_off_t variables when doing the progress meter calculations and
argument passing and try to convert to double only when providing data to the
external world.
2004-03-10 16:20:33 +00:00
Daniel Stenberg
50a1853560 use the new OS define from lib/config-win32.h 2004-03-10 16:07:19 +00:00
Daniel Stenberg
35e158d80b make loop variable size_t as well when looping to a size_t limit 2004-03-10 16:03:12 +00:00
Daniel Stenberg
7225b14002 curl_socket_t mistakes cleanup 2004-03-10 16:01:47 +00:00
Daniel Stenberg
85838a8966 turn niflags into a define named NIFLAGS 2004-03-10 15:24:56 +00:00
Daniel Stenberg
d29590f583 added the Estonian one, removed the cyberservers one since it is dead and
they don't respond to email
2004-03-10 11:30:19 +00:00
Daniel Stenberg
467c3e3a1f fixing 2004-03-10 11:28:45 +00:00
Daniel Stenberg
b484b3b696 Gisle Vanem improved build on Windows. 2004-03-10 11:28:34 +00:00
Daniel Stenberg
b45d50ccc2 Nah, ignore the OS define in here. This is being included by ares and it
certainly doesn't need the OS define.
2004-03-10 10:19:32 +00:00
Daniel Stenberg
78e0ba82b0 ignore the icc warning 981 "operands are evaluated in unspecified order" 2004-03-10 09:52:04 +00:00
Daniel Stenberg
c39c55cb2d Minor edit to avoid an unreachable break and to remove the extra {} body
within the switch.
2004-03-10 09:50:12 +00:00
Daniel Stenberg
cf004cbc7e keep the number of bytes read in a size_t variable 2004-03-10 09:44:42 +00:00
Daniel Stenberg
9948250723 strequal() returns int so we typecast the return to bool when we store the
result as bool
2004-03-10 09:41:37 +00:00
Daniel Stenberg
47afa058a8 store times in time_t 2004-03-10 09:36:43 +00:00
Daniel Stenberg
40e892bb36 Jeff Lawson fixed the SSL connection to deal with received signals during the
connect.
2004-03-10 08:43:01 +00:00
Daniel Stenberg
bc6f3beb9c Now requires an OS string defined by the config*.h file 2004-03-10 08:15:50 +00:00
Daniel Stenberg
f9e1f32adb make windows builds use the OS string "i386-pc-win32" instead of just "win32"
to make it more like other OS strings
2004-03-10 08:14:22 +00:00
Daniel Stenberg
93f96835f8 use size_t for string lengths 2004-03-10 08:12:09 +00:00
Daniel Stenberg
22f4d81f3e Make sure SIZEOF_CURL_OFF_T is defined before we check for it being > 4.
It is only undefined when this file is included by others (like ares) and
in those cases it doesn't matter.
2004-03-10 08:08:02 +00:00
Daniel Stenberg
0d1f80ccb5 removed the #if 0'ed pragmas that disable warnings on msvc 2004-03-10 07:04:31 +00:00
Daniel Stenberg
4e87dd89bf moved the curl_socket_t typedef downwards 2004-03-10 07:03:13 +00:00
Daniel Stenberg
60e4b57ad8 added the new socket type 2004-03-09 22:55:47 +00:00
Daniel Stenberg
ce5805a955 Use curl_socket_t instead of int for holding sockets. The typedefs and
defines are in setup.h.
2004-03-09 22:52:50 +00:00
Daniel Stenberg
dad0715d79 Added -I$(top_srcdir)/include, since lib/setup.h might include files from
the external curl include dir.
2004-03-09 21:49:46 +00:00
Daniel Stenberg
52d85341ae only build with the windows threading trace code if
DEBUG_THREADING_GETHOSTBYNAME is defined
2004-03-09 21:42:43 +00:00
Daniel Stenberg
7b2869338d explicit typecast to visualize that we really want the result of the
operation as a size_t
2004-03-09 21:39:50 +00:00
Daniel Stenberg
ab35b2837f Tor Arntsen's fix to a AIX build problem 2004-03-09 21:25:59 +00:00
Daniel Stenberg
863473a856 remove ares/aclocal.m4 before cvs update to prevent bad conflicts 2004-03-09 11:24:36 +00:00
Daniel Stenberg
be6af69dc7 mingw has str(n)casecmp() functions 2004-03-09 10:18:09 +00:00
Daniel Stenberg
3a80dc7f3e timezone dummy to build better on Windows - Gisle Vanem 2004-03-09 09:47:51 +00:00
Daniel Stenberg
bd42a2acb1 Gisle Vanem fixed the bad argc check 2004-03-09 09:43:30 +00:00
Daniel Stenberg
7f0e708322 the error message stuff is for 7.12 2004-03-09 09:38:16 +00:00
Daniel Stenberg
8cbfe5d24a Andrs Garca-fix to make it build with mingw 2004-03-09 08:38:25 +00:00
Daniel Stenberg
bab9f532f2 added HAVE_IOCTLSOCKET here 2004-03-09 08:35:33 +00:00
Daniel Stenberg
09cce943cb this is generated, removed from CVS 2004-03-08 16:29:45 +00:00
Daniel Stenberg
702021e099 don't compare signed/unsigned 2004-03-08 16:20:51 +00:00
Daniel Stenberg
e94c46c00c Removed John Clayton's really odd bug since its never been reported again and
it was quite a long time since he experienced that one.
2004-03-08 14:04:10 +00:00
Daniel Stenberg
9d311ff2c0 mention error 64 2004-03-08 13:57:38 +00:00
Daniel Stenberg
108434b95c the largefile for version_info fix 2004-03-08 13:17:53 +00:00
Daniel Stenberg
c30cb73a5b fread() returns a size_t 2004-03-08 12:56:18 +00:00
Daniel Stenberg
b7c56594b3 use curl standard source formatting 2004-03-08 12:51:33 +00:00
Daniel Stenberg
2b700fae9d typecast enum to int to make it printf() properly 2004-03-08 12:51:13 +00:00
Daniel Stenberg
ef783d8da7 variable type fixes 2004-03-08 12:48:09 +00:00
Daniel Stenberg
a4f1833629 Moved the error message buffer into the glob struct as well. 2004-03-08 12:47:37 +00:00
Daniel Stenberg
2c756fa1d7 Commented the Curl_read() arguments. 2004-03-08 12:37:46 +00:00
Daniel Stenberg
385086b460 size_t/int fix 2004-03-08 12:37:11 +00:00
Daniel Stenberg
72a4715dff strlen() returns size_t 2004-03-08 12:36:54 +00:00
Daniel Stenberg
7e6043f04f we ignore the ICC warning 1419 as well 2004-03-08 11:37:12 +00:00
Daniel Stenberg
576be36249 waitconnect() takes the timeout argument as a long 2004-03-08 11:36:47 +00:00
Daniel Stenberg
c52c592f4c store size as size_t
use %zd when outputting size_t
2004-03-08 11:33:49 +00:00
Daniel Stenberg
d9ffd2f544 don't use 'register'
make strtol() returns get stored in long variables
don't mix size_t with int
2004-03-08 11:28:14 +00:00
Daniel Stenberg
a684c51c9b size_t/int/long fixes 2004-03-08 08:38:29 +00:00
Daniel Stenberg
3fa4ac080e we must not only support long long for Largefile to work, we must have
a curl_off_t type that is larger than 4 bytes
2004-03-08 07:46:26 +00:00
Daniel Stenberg
9c8b2a9958 issue 12 fixed, the final known outstanding issue to be done before 7.11.1 2004-03-05 13:12:58 +00:00
Daniel Stenberg
498666bdc3 issue 12 fix 2004-03-05 12:54:18 +00:00
Daniel Stenberg
3d3612e252 another include to prevent warnings 2004-03-05 11:39:19 +00:00
Daniel Stenberg
e9920d8a04 two fixes, one new mirror 2004-03-05 10:18:58 +00:00
Daniel Stenberg
acc5096eef clonk 2004-03-05 10:14:46 +00:00
Daniel Stenberg
6717240650 more fixing to make the progress/getinfo stuff to work properly when doing
file: transfers too
2004-03-05 09:40:16 +00:00
Daniel Stenberg
ef0a2c714b clearly tell that these are ftp response timeouts 2004-03-05 09:37:48 +00:00
Daniel Stenberg
2cd6403011 Major rewrite of the test HTTP server to allow more fancy features to make
better tests with the issue12-patch applied.
This change also includes Andrs Garca's win32-fixes.
Made the logging look better/more readable in sws.log
2004-03-05 08:32:11 +00:00
Daniel Stenberg
75e1483e0d 'make clean' should only remove the generated html files, index.html is not
one of them!
2004-03-05 08:01:55 +00:00
Daniel Stenberg
8a4532ca2d mention the D binding 2004-03-05 07:57:07 +00:00
Daniel Stenberg
13f98c5c18 Multiple updates, most of them being proper formatting to create nice html
links in the web pages, but also additional facts and removal of old crap.
2004-03-05 07:55:02 +00:00
Daniel Stenberg
30e71d54e0 issue 12 fix is pending and is working in devel
added issue 24 - fix the progress meter for large files on slow networks to
not wrap
2004-03-04 16:19:12 +00:00
Daniel Stenberg
465753c2de When following to a new URL, we must make sure to call Curl_done() first,
since the current connection must be taken care of properly before we move
on. Christopher R. Palmer reported a problem he found due to this mistake.
2004-03-04 16:13:33 +00:00
Daniel Stenberg
e40392ac03 Andrs Garca's patch to prevent warnings while compiling with mingw, mainly
because it is now possible to have both WIN32 and HAVE_CONFIG_H defined.
2004-03-04 15:32:18 +00:00
Daniel Stenberg
1eb9fd6c4d use size_t for the data, but keep the protos use ssize_t to better fit
with the existing transfer.c code
2004-03-04 15:25:06 +00:00
Daniel Stenberg
78e47fbb5c include the proper header file too 2004-03-04 15:23:57 +00:00
Daniel Stenberg
2b59e90c54 fix progress data to be updated properly for file: transfers, as reported
by Jesse Noller
2004-03-04 15:12:12 +00:00
Daniel Stenberg
59a30e6d9b prevent harmless compiler warning 2004-03-04 12:57:12 +00:00
Daniel Stenberg
e0287fea20 David Byron's version resource fix 2004-03-04 09:56:39 +00:00
Daniel Stenberg
4fbf3f16e2 new "version resource" file for windows builds 2004-03-04 09:56:17 +00:00
Daniel Stenberg
de6433d5c2 show curl --version output as well 2004-03-03 14:46:37 +00:00
Daniel Stenberg
23ef66f33a largefile bit for the version_info and now winsock 1.1 only 2004-03-03 14:39:47 +00:00
Daniel Stenberg
2479e06848 David Byron's work on making libcurl only require winsock 1.1 on Windows
machines.
2004-03-03 13:32:56 +00:00
Daniel Stenberg
f2abe03fcf three days of changes 2004-03-03 13:30:18 +00:00
Daniel Stenberg
5e7f1a0eaf more variable type cleanups 2004-03-03 13:24:14 +00:00
Daniel Stenberg
eb9383d49b our timeout values are longs while 'tv_sec' is int 2004-03-03 13:17:44 +00:00
Daniel Stenberg
817d17354e make the backup variable of the same kind as the data it backups! ;-) 2004-03-03 13:12:30 +00:00
Daniel Stenberg
88e226c686 some more size_t usage, and two added typecasts when converting from size_t
to long (MIPSpro warnings)
2004-03-03 13:11:28 +00:00
Daniel Stenberg
9116dd41bd tv_sec is an int, so we explicitly typecast the result of long - long to
an int when we assign it.
2004-03-03 13:07:32 +00:00
Daniel Stenberg
213d64fbd7 attempted typecase to silence the MIPSpro warning:
cc-1506 cc: REMARK File = ../../curl/ares/ares__read_line.c, Line = 46
There is an implicit conversion from "unsigned long" to "int"; rounding, sign
extension, or loss of accuracy may result.

if (!fgets(*buf + offset, *bufsize - offset, fp))
2004-03-03 13:03:35 +00:00
Daniel Stenberg
a8419d68b6 #ifdef #define #undef circus to prevent compiler warnings on #if operations
with undefined variables.
2004-03-03 12:37:15 +00:00
Daniel Stenberg
87a1c7033e removed include stuff now handled by test.h 2004-03-03 10:09:30 +00:00
Daniel Stenberg
6e3fa90c9e We let this file include more generic headers that many libtests need anyway
to reduce the amount of #include stuff in each single libNNN.c file.
unistd.h was added to prevent select() warnings on FreeBSD
2004-03-03 10:09:16 +00:00
Daniel Stenberg
b2ef40731a Tom Bates' adjustment to build on his nsr-tandem-nsk. 2004-03-03 09:27:18 +00:00
Daniel Stenberg
e2f7030202 rename struct FILE to FILEPROTO, to prevent it from causing trouble with
the plain old FILE typedef.
2004-03-03 09:25:59 +00:00
Daniel Stenberg
533519cc9c Dan Fandrich fixed some GSS detection flaws 2004-03-03 09:16:36 +00:00
Daniel Stenberg
7c85be9435 corrected the reuse_fresh condition 2004-03-02 14:00:44 +00:00
Daniel Stenberg
89829093ca large file in jan 2004 2004-03-02 10:22:05 +00:00
Daniel Stenberg
7cb10a1853 various updates 2004-03-02 10:08:04 +00:00
Daniel Stenberg
33d67c68de two items fixed, one so old I don't think its valid anymore 2004-03-02 10:07:47 +00:00
Daniel Stenberg
e46b5719f2 display src/config.h as well after configure as run 2004-03-02 09:50:37 +00:00
Daniel Stenberg
353f764119 Yet another curl_off_t printf format attempt, we now exclude the %-letter from
FORMAT_OFF_T to allow additional options to get specified, like with '"%5"
FORMAT_OFF_T'.
2004-03-02 09:31:18 +00:00
Daniel Stenberg
9f437269fb Define CURL_NO_OLDIES to prevent us from getting obsolete stuff defined. 2004-03-02 09:13:28 +00:00
Daniel Stenberg
45391178c9 CURLOPT_MUTE is obsolete since a long while, we don't need to set it! 2004-03-02 09:11:52 +00:00
Daniel Stenberg
eddeb49fb6 clean the html and pdf files 2004-03-02 08:28:23 +00:00
Daniel Stenberg
7ab3b5b3bb use FORMAT_OFF_T instead of CURL_FORMAT_OFF_T to reduce the complexity of
having to redef that name
2004-03-02 07:25:39 +00:00
Daniel Stenberg
00d5f886e3 - we switch to simply use FORMAT_OFF_T internally
- Also, we must not assume that SIZEOF_CURL_OFF_T is defined, as this file
gets included from the ares dir at times and then it isn't defined.
2004-03-02 07:25:08 +00:00
Daniel Stenberg
49daeaf805 the CURLOPT_FRESH_CONNECT fix 2004-03-01 16:32:51 +00:00
Daniel Stenberg
d03fbf5dfb a fair day's work! 2004-03-01 16:30:59 +00:00
Daniel Stenberg
cb72a80fe0 Use CURL_FORMAT_OFF_T for printf()inf curl_off_t variables. 2004-03-01 16:28:00 +00:00
Daniel Stenberg
71d81f1f75 Now uses CURL_FORMAT_OFF_T instead of %Od
Fixed the check for bad resumes. Made test case 99 work and proved a bug
in test case ... eh, was it 32?
2004-03-01 16:27:34 +00:00
Daniel Stenberg
b0c51d198c large_file is a new feature we can require for a specific test 2004-03-01 16:25:24 +00:00
Daniel Stenberg
71335e5b99 support 'large_file' as a feature to require for specific tests (such as
test 99)
2004-03-01 16:24:54 +00:00
Daniel Stenberg
c9b23ca055 check for CURL_VERSION_LARGEFILE in the feature bitmask 2004-03-01 16:24:26 +00:00
Daniel Stenberg
7983ec84a7 set CURL_VERSION_LARGEFILE if we support large files 2004-03-01 16:24:04 +00:00
Daniel Stenberg
8cb2a68694 define ENABLE_64BIT if we have enabled 64bit large files
define our internal CURL_FORMAT_OFF_T define, we don't use the global one!
2004-03-01 16:23:35 +00:00
Daniel Stenberg
485122035c fixed the test code to work 2004-03-01 16:22:17 +00:00
Daniel Stenberg
5c4dba1418 * Added CURL_VERSION_LARGEFILE
* If CURL_NO_OLDIES is defined, we hide all obsolete functions/options.

* CURL_FORMAT_OFF_T is defined for portable printf()ing of curl_off_t types
(although not with curl_mprintf()!)
2004-03-01 16:20:20 +00:00
Daniel Stenberg
d6eb28400b added test 99, very basic initial large file test 2004-03-01 16:18:40 +00:00
Daniel Stenberg
526c61c657 global dns cache is not nice, we consider it obsolete starting now 2004-03-01 15:50:15 +00:00
Daniel Stenberg
fd6ec05916 Ignore the dreaded aclocal warnings on underquoted definitions that the
recent autoconf annoyingly introduced.
2004-03-01 13:14:26 +00:00
Daniel Stenberg
6789dfc5f5 Perhaps -Wundef is better on gcc versions after 2.95, since the autobuild
on FreeBSD gives us lots of warnings in system headers and I suspect this
option is what causes them!
2004-03-01 13:10:35 +00:00
Daniel Stenberg
193a652e6a When setting aggressive pedantic compiler options, display what options
that were set. For easier debugging/changing of this.
2004-03-01 13:02:34 +00:00
Daniel Stenberg
4d12be9867 removed an unnecessary shift and splut up som weird two-statements-per-line
code
2004-03-01 12:54:59 +00:00
Daniel Stenberg
87e7f4f688 Use the z-option to printf %d for size_t printf. z is supported by the
libcurl *printf and by Linux printf(). This should make the code work nicely
even for 64bit size_ts.
2004-03-01 12:45:12 +00:00
Daniel Stenberg
5eeaff8235 Support 'z' for size_t-sized integer printing, as in %zd or %zx. 2004-03-01 12:44:07 +00:00
Daniel Stenberg
7d2e872828 Only consider the fresh-connection option on the first connection made, not
on followed redirections etc. This should fix the bug #905365, which caused
NTLM to fail with the option set.
2004-03-01 09:43:42 +00:00
Daniel Stenberg
097938e6c8 Moved two 7.11.2 issues over to the more general TODO docs. 2004-03-01 09:08:52 +00:00
Daniel Stenberg
d57b84e290 minor spellfix 2004-03-01 08:54:22 +00:00
Daniel Stenberg
fcc07bed90 intend the top-level blurb to make it easier to discard it from the web
site output
2004-03-01 08:50:28 +00:00
Daniel Stenberg
43bda5cd17 Tor and David 2004-03-01 08:20:21 +00:00
Daniel Stenberg
45c7f064d4 mention how to make a curl handle use the share 2004-03-01 08:02:50 +00:00
Daniel Stenberg
4dfc0a78e7 Only attempt to send the FTP QUIT command if we actually have a FTP struct. 2004-03-01 07:59:25 +00:00
Daniel Stenberg
82bd583251 in Curl_disonnect(): call the protocol-specific disconnect function before we
unlink the "current" connection struct from the connection cache.
2004-03-01 07:19:26 +00:00
Daniel Stenberg
78f52c05a9 Report the correct size when 'verifiedserver' is requested. 2004-03-01 07:16:45 +00:00
Daniel Stenberg
d818cbe58c Dirk Manske fixed the attempt to install the removed errmem manpage 2004-02-29 18:39:31 +00:00
Daniel Stenberg
4ae4336643 using roffit 0.6 we can get <a href> links with the --mandir option 2004-02-27 15:48:13 +00:00
Daniel Stenberg
25bcd45034 formatting update to produce better links with the new roffit version 2004-02-27 15:34:06 +00:00
Daniel Stenberg
f53d6e1c39 elaborate on the URL option 2004-02-27 14:07:22 +00:00
Daniel Stenberg
17a3aa1ddc minor size_t fix to kill a warning 2004-02-27 13:21:47 +00:00
Daniel Stenberg
6c78b4b7c0 fixed some more size_t/int/long warnings and removed a few CMC comments 2004-02-27 13:21:14 +00:00
Daniel Stenberg
2b634be467 Mark obsolete options with OSBOLETE in a comment on the same line, to make
it easier to exclude them with grep, when grepping for options.
2004-02-27 12:41:03 +00:00
Daniel Stenberg
c5b8e446f6 ispell by Tor Arntsen 2004-02-27 12:27:40 +00:00
Daniel Stenberg
7bd55dc17c updated the debug option function from curl's acinclude.m4 2004-02-27 11:29:36 +00:00
Daniel Stenberg
009cd96490 remove the number of obsolete options 2004-02-27 09:02:29 +00:00
Daniel Stenberg
d0242da304 Added a few options that were still not documented. Now I believe all options
mentioned in the current curl/curl.h header file (that aren't marked as
obsolete) are present.
2004-02-27 09:02:06 +00:00
Daniel Stenberg
ab44763cb7 updated with recent events 2004-02-27 08:08:08 +00:00
Daniel Stenberg
3a80bb0a09 issue 21 is now history 2004-02-27 07:15:42 +00:00
Daniel Stenberg
77268e0649 Joe Halpin made the FTP code send 'QUIT' on the control connection before
it disconnects the TCP connection, like a good ftp client should!
2004-02-27 07:08:37 +00:00
Daniel Stenberg
1ceb77b4dc we need to hide this warning since it otherwise appears on all verifiedserver
requests to the ftp server!
2004-02-26 22:56:32 +00:00
Daniel Stenberg
3430ce7907 Kill the server when this test is done, as other FTP-tests sometimes
have problems otherwise.
2004-02-26 22:40:33 +00:00
Daniel Stenberg
4ba7ef34d1 fixed a "comparison between signed and unsigned" warning 2004-02-26 22:19:20 +00:00
Daniel Stenberg
4515d06465 David Byron's fixes to make the latest curl build fine under MSVC 6. 2004-02-26 16:23:28 +00:00
Daniel Stenberg
b6a4ca9bc8 this works like buildconf + configure does on unixes 2004-02-26 16:13:13 +00:00
Daniel Stenberg
9b6350d0b0 adjusted to work with the modified fopen() line and the new calloc line 2004-02-26 14:53:17 +00:00
Daniel Stenberg
07de0ff0ff Gisle Vanem's added support calloc()-debugging and outputting mode for
fopen() as well.
2004-02-26 14:52:51 +00:00
Daniel Stenberg
7d8cd5906c use calloc instead of malloc and we won't have to memset() the struct 2004-02-26 14:52:16 +00:00
Daniel Stenberg
1056d2d22d When this is verified to be a CVS tree, we remove the two generated source
files from the source dir to make certain they're generated in the build
process.
2004-02-26 13:59:10 +00:00
Daniel Stenberg
d571064b65 Clear up int/long/size_t/ssize_t usage a bit 2004-02-26 13:40:43 +00:00
Daniel Stenberg
33eaf2e18b minor fixes to avoid MIPSPro pedantic warnings 2004-02-26 12:47:43 +00:00
Daniel Stenberg
a054e5baf3 don't mix int and size_t, it generates warnings! 2004-02-26 12:45:29 +00:00
Daniel Stenberg
85af357d81 Make icc ignore "invalid format string conversion" warnings as well. They
appear because of our home-grown option '%Od' for the curl_off_t output.
2004-02-26 12:40:09 +00:00
Daniel Stenberg
d687eed33e use %ld when printf()ing long variables (and removed use of 'register') 2004-02-26 12:32:29 +00:00
Daniel Stenberg
38b6016dfa added the ever-present source header 2004-02-26 11:46:17 +00:00
Daniel Stenberg
be2cdf14f3 Don't call the lock/unlock functions if they are NULL. They can still be
NULL without violating protocol.
2004-02-26 11:39:38 +00:00
Daniel Stenberg
0943f33438 Use __INTEL_COMPILER instead of __ICC to the cpp to detect the Intel icc
compiler!
2004-02-26 11:37:14 +00:00
Daniel Stenberg
4427d91479 runtests.pl now provides the srcdir to the ftpserver so that it can pass
that to loadtest properly.
2004-02-26 09:19:59 +00:00
Daniel Stenberg
0c03ed6013 modified loadtest() to produce better error message when it fails to load
a test file
2004-02-26 09:19:16 +00:00
Daniel Stenberg
0c3c1b390a The build logs were created in the "wrong" dir and thus never removed
after use, this is an attempt to fix this.
2004-02-26 07:58:49 +00:00
Daniel Stenberg
9b09193cfd today's work 2004-02-25 15:44:39 +00:00
Daniel Stenberg
b2cff76722 typecast to int when printfing CURLcode 2004-02-25 15:43:15 +00:00
Daniel Stenberg
37817667e2 use %ld when printfing longs 2004-02-25 15:41:36 +00:00
Daniel Stenberg
f9b2b7940e disable the use of long double, we don't use it 2004-02-25 15:34:05 +00:00
Daniel Stenberg
5168b32f86 if ares is present, run aclocal in that dir before autoconf is run 2004-02-25 14:32:57 +00:00
Daniel Stenberg
0373758359 added the better debug option logic from curl by adding acinclude.m4 to the
configure stuff
2004-02-25 14:32:39 +00:00
Daniel Stenberg
df94c7aedc Based on a patch by Greg Hewgill I modified how long long is used, as we
can use a 64bit type with MSVC that is a long long equivalent.
2004-02-25 14:15:38 +00:00
Daniel Stenberg
6bd2de0c42 set debug options when using the icc compiler 2004-02-25 14:14:30 +00:00
Daniel Stenberg
82c31256e1 better formatting of the share options 2004-02-25 12:34:19 +00:00
Daniel Stenberg
403cbbe0c4 mark the function name 2004-02-25 12:32:33 +00:00
Daniel Stenberg
9a7e3437ae added CURLOPT_SHARE 2004-02-25 12:20:41 +00:00
Daniel Stenberg
4fa58560bf Moved most of the set-debug-options-depending-on-compiler logic to the new
CURL_CC_DEBUG_OPTS function in acinclude.m4
2004-02-25 10:19:02 +00:00
Daniel Stenberg
be62b27ce2 Output $CC and $CFLAGS as well. A Tor Arntsen patch. 2004-02-25 09:03:09 +00:00
Daniel Stenberg
3be66f3a03 Don't check for HAVE_ defines in this header file, it is meant to be public
and we can't depend on configure-defines in it. This logic is borrowed from
the public curl headers.
2004-02-25 07:22:00 +00:00
Daniel Stenberg
089bdaed00 fix 2004-02-25 07:17:31 +00:00
Daniel Stenberg
0d3674129f Dan Fandrich fixed a minor flaw in Dominick's fix! 2004-02-25 06:37:42 +00:00
Daniel Stenberg
fce6783be4 check for a few basic header files 2004-02-23 16:20:42 +00:00
Daniel Stenberg
48bc26e7e3 include sys/select.h 2004-02-23 16:20:31 +00:00
Daniel Stenberg
f128fae705 fixed some warnings in the (both new and old) base64 usage 2004-02-23 16:09:39 +00:00
Daniel Stenberg
800fa31b65 features no one seem to care much about are now moved over to the 7.11.2
release
2004-02-23 16:04:16 +00:00
Daniel Stenberg
2ae4420869 make newer MSCV7 compilers use _strtoi64() as a strtoll() replacement 2004-02-23 14:24:49 +00:00
Daniel Stenberg
8ba042cf88 limit rate and windows timeouts 2004-02-23 13:48:27 +00:00
Daniel Stenberg
7adf43c1c5 ares_free_errmem is gone 2004-02-23 13:35:28 +00:00
Daniel Stenberg
d007e5615c unused and now removed 2004-02-23 13:33:18 +00:00
Daniel Stenberg
888eec833c Removed getpass from here. The fact this still was present here indicates
that this file is out of date!
2004-02-23 12:01:10 +00:00
Daniel Stenberg
2911e63bc2 curl_off_t is 8 bytes big on windows 2004-02-23 11:59:28 +00:00
Daniel Stenberg
34d247bc4e switch the arguments according to the c source 2004-02-23 11:44:03 +00:00
Daniel Stenberg
99bc7e5fd3 oops, the decode() function got its arguments reversed in my cleanup
operation!
2004-02-23 11:39:21 +00:00
Daniel Stenberg
0b1f7995c5 correct the input data structs 2004-02-23 09:01:08 +00:00
Daniel Stenberg
f35c28214e use size_t to keep strlen() results 2004-02-23 08:38:49 +00:00
Daniel Stenberg
35fd1365ae simplied how create_hostcache_id() is used, and also its function somewhat
cleared up some ssize_t/size_t mixups
2004-02-23 08:35:57 +00:00
Daniel Stenberg
f493081004 adjusted to the modified base64 protos 2004-02-23 08:24:53 +00:00
Daniel Stenberg
e1b5e15431 More size_t cleanups in the base64 functions. 2004-02-23 08:22:43 +00:00
Daniel Stenberg
1aba4c519b The base64 encode function now takes a size_t for size, not an int as
previously.
2004-02-23 08:07:55 +00:00
Daniel Stenberg
ae76a67566 more int vs long/size_t fixes after icc compiler warnings 2004-02-23 08:04:31 +00:00
Daniel Stenberg
76241d0a02 more int/long fixes after icc "remarks" 2004-02-23 08:00:56 +00:00
Daniel Stenberg
89227a9d75 next_id is an unsigned short, typecast the assign to prevent picky compilers
to warn
2004-02-23 07:57:44 +00:00
Daniel Stenberg
dfb5090e0f typecase the bitfiddling results since we get a long and we store an int,
they may not be of the size size
2004-02-23 07:55:58 +00:00
Daniel Stenberg
c7fe8a7a11 make ares_expand_name() take a long * instead of an int *, since we do
pointer arithmetic (ptr1 - ptr2) and to do that properly on 64bit we need
long
2004-02-23 07:52:20 +00:00
Daniel Stenberg
7174ca7a20 strlen() returns a size_t, which might be larger than int on some platforms 2004-02-23 07:46:59 +00:00
Daniel Stenberg
2e61fde07f argh, use single-quotes instead of double ones to make $Revision appear 2004-02-23 07:32:45 +00:00
Daniel Stenberg
41263f7d88 use the proper source header, and set the version string to this file's
revision number
2004-02-23 07:17:13 +00:00
Daniel Stenberg
02095ba0e1 cd back to the root path before removing the build dir, since some systems
refuse to remove the dir otherwise!
2004-02-23 07:08:59 +00:00
Daniel Stenberg
32a678eab3 Dominick Meglio's fix for supporting multiple names in the Nameserver key
on Windows.
2004-02-22 22:42:20 +00:00
Daniel Stenberg
bd7ba3bde6 this code uses no long long, so we can have warnings about them 2004-02-22 22:36:36 +00:00
Daniel Stenberg
0ffec4272a the missing part of Gisle Vanem's connect-timeout fix for win32 2004-02-22 22:31:24 +00:00
Daniel Stenberg
ea4cd4d8aa -Wno-format-nonliteral does not exist in my gcc 2.96, only use that with
newer versions
2004-02-21 16:56:01 +00:00
Daniel Stenberg
c7775c59bf mention in --limit-rate that --speed-limit might ruin the limiting slightly. 2004-02-21 16:18:57 +00:00
Daniel Stenberg
243bd5bbb4 David Byron's fix to allow the speed-limit logic work even if you set
limit-rate. It does work on the expense of the rate limiter.
2004-02-21 15:08:21 +00:00
Daniel Stenberg
4bde770169 added some extra typecasts to prevent compiler warnings when converting
int to various types
2004-02-21 15:05:46 +00:00
Daniel Stenberg
9af7e46f72 inlcude krb4.h to get the proto for Curl_krb_kauth() to satisfy picky
compilers
2004-02-21 14:57:29 +00:00
Daniel Stenberg
7d844c430c Gisle Vanem brings name resolving timeout possibilities to windows people.
This works by magicly starting up a new thread that can be killed when the
timeout is reached. testtesttest!
2004-02-20 16:41:50 +00:00
Daniel Stenberg
4f953b6459 that icc attempt in configure 2004-02-20 16:29:57 +00:00
Daniel Stenberg
44995d6877 Some compilers warn on completely empty source files, we provide a blank
one to prevent that.
2004-02-20 16:22:47 +00:00
Daniel Stenberg
2ebc821558 Convert functions to ANSI-style declaration to prevent compiler warnings 2004-02-20 16:18:26 +00:00
Daniel Stenberg
907bb78f3e When the built-in manual is disabled, we generate a function doing nothing
just to avoid making a totally empty file. Just to avoid compiler warnings.
2004-02-20 15:39:37 +00:00
Daniel Stenberg
b2e1bf7e7d No longer support Z as a flag to print size_t, it isn't used by libcurl
and I doubt anyone else uses it.

Better preprocessor magic for the O flag (for curl_off_t printing) to prevent
compiler warnings.
2004-02-20 15:16:31 +00:00
Daniel Stenberg
7173a0f7b6 cool.haxx.se, no longer sourceforge 2004-02-20 13:09:35 +00:00
Daniel Stenberg
a49bebc74e Only use -Wstrict-prototypes with gcc 3.3 or later.
It is working with earlier versions, but when I use it with 3.0.3, I can't
get it to ignore errors in "system headers" with -isystem so we get
excessive amounts of warnings on SSL headers which is very annoying.
2004-02-20 10:11:50 +00:00
Daniel Stenberg
8777ba7e42 include sys/select.h to prevent picky compiler warnings when using select()
without proto
2004-02-20 08:51:43 +00:00
Daniel Stenberg
a39669198f we call the macro CURLMAX() isntead of MAX(), just because it turned up
it collides with another MAX define on some platforms (like netbsd 1.6.1)
2004-02-20 08:47:23 +00:00
Daniel Stenberg
2c0c75e345 oops, missed a define when I changed from Curl_ to curlx_ 2004-02-20 07:22:25 +00:00
Daniel Stenberg
236337ce86 fix protos to prevent warnings 2004-02-20 07:19:18 +00:00
Daniel Stenberg
224ccc780a added getpart.h for the spitout() proto 2004-02-20 07:19:01 +00:00
Daniel Stenberg
ccde85d198 %HTTPPORT supported in subVariables 2004-02-20 07:14:58 +00:00
Daniel Stenberg
9e7657d6ed mention what ports the test suite uses 2004-02-20 07:05:10 +00:00
Daniel Stenberg
7ac455fca3 When trying to see if there's a friendly http server on "our" port, we
only accept return code 7 to indicate that there's no server present.
2004-02-20 06:59:17 +00:00
Daniel Stenberg
e295cd759c -Wcast-align is a bit too annoying 2004-02-19 21:34:52 +00:00
Daniel Stenberg
a472cd9310 Anything that looks like gcc 5.0 or more is no longer treated as gcc. I hope
this will make us exclude icc 8.0 etc.
2004-02-19 21:32:19 +00:00
Daniel Stenberg
8794cb286b refer to FILEFORMAT 2004-02-19 21:21:12 +00:00
Daniel Stenberg
455b1af214 When --enable-debug is used, for every -I provided to $CPPFLAGS we add
a corresponding -isystem, if using gcc, to inhibit warnings on those
headers.
2004-02-19 19:25:11 +00:00
Daniel Stenberg
d765a00adb Tor Arntsen's tiny fix! 2004-02-19 16:24:22 +00:00
Daniel Stenberg
de37308722 if not yacc or bison is found, check if we *really* need it, and if we do
we bail out!
2004-02-19 15:58:58 +00:00
Daniel Stenberg
7729c63be0 fixed the no-ssl version to return int as well 2004-02-19 15:39:06 +00:00
Daniel Stenberg
eebcf90942 provide protos to the functions to prevent warnings 2004-02-19 13:03:04 +00:00
Daniel Stenberg
fa8ecd3d53 typecast the type to an int on return 2004-02-19 13:00:33 +00:00
Daniel Stenberg
134cb66129 return int from test() 2004-02-19 13:00:05 +00:00
Daniel Stenberg
349a15b089 provide a test() proto 2004-02-19 12:59:57 +00:00
Daniel Stenberg
c14fa2c935 use a die and a log function to die and log texts
better detect test suite failures
remove the buildlog at exit
make a random buildlog file name, now in the same dir where the build dir
is created
checks if the ares build succeeded
2004-02-19 12:56:45 +00:00
Daniel Stenberg
6ca7af3419 remove the build.log too at exit, and also use the proper $pwd prefix
to find the files/dirs to remove so that it still works if we "die" after
having done a 'cd'
2004-02-19 12:10:07 +00:00
Daniel Stenberg
afa5924487 very minor phrase edit 2004-02-19 10:21:54 +00:00
Daniel Stenberg
bd63a557f3 fixes from the recent days 2004-02-19 10:21:43 +00:00
Daniel Stenberg
49aa798082 check for standard headers when --enable-debug is used 2004-02-19 09:33:59 +00:00
Daniel Stenberg
c6e5b67197 Doug Porter's patch that changes the order of preferences on how to find the
default netrc file. We now read and uses HOME _before_ we use getpwuid() to
better allow users to move around HOME to use different .netrc files without
having to rely on even blacker magic.
2004-02-19 09:22:00 +00:00
Daniel Stenberg
e7050f97c4 If --enable-debug is used and gcc, we figure out which version and then we
use as aggressive warning options as possible for the used compiler version.
2004-02-19 09:01:13 +00:00
Daniel Stenberg
b28f3d43bf item 19 is considered fixed until we get to hear differently
item 25 is now dealt with using the curlx_ prefix, mentioned in detail here:
http://curl.haxx.se/mail/lib-2004-02/0215.html
2004-02-19 08:19:21 +00:00
Daniel Stenberg
edd467a12c Use the strtoofft.h header file from the lib directory, as we are now
officially using library-code when building the app (at least for the platforms
that don't have a strtoll() on their own).
2004-02-19 08:13:20 +00:00
Daniel Stenberg
0bf1bd51c4 Remade to use curlx_-prefix. This means this function can be compiled and
linked separately by the application. This function is not provided by the
libcurl API. It can only be accessed by apps if they compile and use this
particular source code.
2004-02-19 08:12:13 +00:00
Daniel Stenberg
4cf70e3069 AIX and Tru64 have what Tor calls "horribly broken 'which' programs" so we
now scan the PATH ourself to find the path to (g)libtool
2004-02-18 16:16:13 +00:00
Daniel Stenberg
9efddfedab removed some "jhrg" from comments 2004-02-18 15:28:56 +00:00
Daniel Stenberg
4b11e19f26 I removed the socklen_t requirement from memdebug.h, so we don't need to
figure it out here anymore to build debug builds.
2004-02-18 12:26:27 +00:00
Daniel Stenberg
de681d3b8f Made curl_accept() take a 'void *' instead of 'socklen_t *' in the 3rd
argument to also not force the casual includer to know about the socklen_t
type.
2004-02-18 12:22:56 +00:00
Daniel Stenberg
f33be3c313 Modified curl_accept() to take a 'void *' in the 2nd argument instead of
sockaddr *. This has the added benefit that source files that include
memdebug.h doesn't have to know about "sockaddr".
2004-02-18 12:18:33 +00:00
Daniel Stenberg
62a12b7faf No longer uses the 'ret' variable in the plain ipv4-version of
my_getaddrinfo() (caused a warning by the IRIX MIPSPro compiler). Also
clarified the situation for the 3-arg version of gethostbyname_r() with a huge
comment.
2004-02-18 10:05:17 +00:00
Daniel Stenberg
e75ab79bdb The --enable-debug option really requires this to be built as part of curl.
When using it, we now set the include path to better find the devel curl
headers, and we check for the socklen_t type since the curl memdebug stuff
needs it.
2004-02-18 09:07:50 +00:00
Daniel Stenberg
abd7e32c66 simplified and better commented config.h include logic 2004-02-18 08:35:51 +00:00
Daniel Stenberg
e2b6a45cfa Make sure dns cache timeout -1 really means forever, as it is documented to
be. Simply skip the pruning.
2004-02-18 07:56:18 +00:00
Daniel Stenberg
e0c0b2ba7d fix the help text for --manual if built without manual 2004-02-17 13:46:00 +00:00
Daniel Stenberg
debbcf81bb ignore more 2004-02-17 07:57:31 +00:00
Daniel Stenberg
8300a880cc memdebug build, 'make' no longer builds the demo tools 2004-02-17 07:41:10 +00:00
Daniel Stenberg
420bbd2e08 'make all' also builds the demos 2004-02-17 07:40:46 +00:00
Daniel Stenberg
d87981e4c1 include ares_private.h to make sure we get the memdebug stuff included 2004-02-17 07:40:31 +00:00
Daniel Stenberg
59091fa860 If CURLDEBUG is set we use the libcurl internal memdebug system to track
memory leaks etc.
2004-02-17 07:40:02 +00:00
Daniel Stenberg
dc659ec736 only build adig and ahost if 'make demos' is used 2004-02-16 16:27:18 +00:00
Daniel Stenberg
09aa165942 support closesocket() for closing sockets as well, as then we can use this
code fine on ares!
2004-02-16 16:24:01 +00:00
Daniel Stenberg
f2fbb5f3d5 Make realloc() support NULL as pointer. Made to allow us to use these routines
to memdebug the ares stuff as well.
2004-02-16 16:23:19 +00:00
Daniel Stenberg
29bedfcf7f item 24 fixed, edited a few issues 2004-02-16 15:27:40 +00:00
Daniel Stenberg
ccdaa0b51f Make the 'areschannel' get created in the curl_easy_init() and re-use that
same channel during the whole curl handle's life until curl_easy_cleanup().
2004-02-16 15:24:22 +00:00
Daniel Stenberg
f516734941 updates 2004-02-16 13:36:08 +00:00
Daniel Stenberg
d53d33698c verbose-fix, socks5-fix, dnscache-fix, configure-winmmlib-fix 2004-02-16 13:33:41 +00:00
Daniel Stenberg
39926181ea Fix verbosconnect() when ipv6-enabled to not assume that conn->serv_addr
is a valid pointer, but instead always depend on the passed-in dns pointer.
This happens to be NULL when the connection is re-used...
2004-02-16 13:14:55 +00:00
Daniel Stenberg
8415b4a271 removed usage of a silly macro instead of the actual functions memcpy
and memset
2004-02-16 09:56:18 +00:00
Daniel Stenberg
e4916145ef Jeff Lawson pointed out that we need to check for a '5' in the version field
to properly work with SOCKS5 proxies. I also included some ascii art describing
the SOCKS5 response, as RFC1928 describes. Jeff provided details in bug
report #741841 and here: http://curl.haxx.se/mail/lib-2004-02/0181.html
2004-02-16 07:33:30 +00:00
Daniel Stenberg
3ec605de67 Andrs Garca added a check for lwinmm for Mingw/sys 2004-02-15 22:34:58 +00:00
Daniel Stenberg
a7e04cac78 Mark the dns entry 'inuse' properly even when used from the cache. This
seems to correct some host cache screw-ups I could reproduce.
2004-02-15 16:57:53 +00:00
Daniel Stenberg
8ddc18a4f9 another case which should use CURLcode and not int 2004-02-15 13:58:57 +00:00
Daniel Stenberg
0d3aa8b7be Use the was_iface variable when binding a socket locally, even if no
SO_BINDTODEVICE is present, to prevent compiler warnings about the variable
2004-02-15 13:55:24 +00:00
Daniel Stenberg
496bbceef1 bind interface and large file fixes 2004-02-15 13:51:07 +00:00
Daniel Stenberg
901edd32b5 recent fixes 2004-02-15 13:50:04 +00:00
Daniel Stenberg
0612c275a7 (void) functions we don't check the return code for 2004-02-15 13:48:50 +00:00
Daniel Stenberg
f3d91528a1 CURLcode/int cleanup to reduce IRIX warnings
Removed some dates/names in the comments.
2004-02-15 13:48:28 +00:00
Daniel Stenberg
f7fae23546 spell! 2004-02-15 13:47:32 +00:00
Daniel Stenberg
2d41efb71e don't assume we can use gcc 2.96+ options 2004-02-15 12:30:40 +00:00
Daniel Stenberg
7abf2f44ec in the socks code, make sure we receive Curl_read results in ints and
Curl_write in CURLcode, to keep the picky compilers happy
2004-02-13 12:42:37 +00:00
Daniel Stenberg
3a36d4fdea removed usage of unset variables (by a function that does nothing!) 2004-02-13 12:28:27 +00:00
Daniel Stenberg
12b71e422f return an int 2004-02-13 12:18:34 +00:00
Daniel Stenberg
d25a0a1bc8 return an int, not a CURLcode 2004-02-13 12:17:42 +00:00
Daniel Stenberg
4d17e77532 use CURLcode, not int, prevents picky compilers to warn 2004-02-13 12:16:24 +00:00
Daniel Stenberg
6a921197e2 the now and start variables were never really used 2004-02-13 12:13:30 +00:00
Daniel Stenberg
fa57a8a78e Ben Greear's SO_BINDTODEVICE patch that binds to a network interface "even
more" when the previous approach. Known to work on Linux, possibly on other
platforms as well.
2004-02-13 09:50:23 +00:00
Daniel Stenberg
eb4d65d0ba Tor Arntsen made the ares build warnings etc get included as well 2004-02-13 07:15:36 +00:00
Daniel Stenberg
e7d9ea8919 Greg Hewgill found out 'contentlength' wasn't big enough to hold a large file! 2004-02-13 07:12:40 +00:00
Daniel Stenberg
372b141d5b make the path const 2004-02-13 07:05:15 +00:00
Daniel Stenberg
115e74a8ad I made the same fix here, that Tor already did in the ftp.c code. To make
sure this doesn't get weird on 64bit archs.
2004-02-13 07:03:03 +00:00
Daniel Stenberg
1b26fe39f9 Tor Arntsen's fix for the bad (64bit wise) typecast when using gmtime() 2004-02-13 06:59:49 +00:00
Daniel Stenberg
4674f3f115 Make hostcache_fixoffset() take a long for offset, to fully work with 64bit
archs, also no longer typecast pointers to ints as that is a nono on 64bit
systems.
2004-02-12 16:02:55 +00:00
Daniel Stenberg
d8a1415646 up to date with recent fixes 2004-02-12 15:50:38 +00:00
Daniel Stenberg
773e7e871e If no nroff tool is found, or if no command line switch to nroff that converts
a man page to text is found, we disable the built-in manual stuff to still
be able to build.
2004-02-12 15:05:38 +00:00
Daniel Stenberg
1d937d62c0 support configure --disable-manual 2004-02-12 14:46:12 +00:00
Daniel Stenberg
f3663a9d0f added --enable/disable-manual 2004-02-12 14:45:50 +00:00
Daniel Stenberg
199b2f4602 no need to run make test in the data dir anymore 2004-02-12 14:43:13 +00:00
Daniel Stenberg
49ab1d914c provide a source path to the servers to make them find the tests when run
outside the source dir, not needing any symlinks
2004-02-12 14:40:08 +00:00
Daniel Stenberg
f9a6e7b68d stop doing the weirdo symlinks 2004-02-12 14:39:28 +00:00
Daniel Stenberg
5d64d657de removed the subchar variable, it was only set and never used 2004-02-12 09:53:03 +00:00
Daniel Stenberg
52caba0417 removed the ldaptext variable, it was only set and never used 2004-02-12 09:51:43 +00:00
Daniel Stenberg
ad1a70205f removed the nth variable, it was only set and never used anyway 2004-02-12 09:50:44 +00:00
Daniel Stenberg
d57eed6f22 No longer receive the return code in ConnectionKillOne() that wasn't dealt
with anyway and thus caused picky compiler to warn.
2004-02-12 09:48:27 +00:00
Daniel Stenberg
a3d39efa3b Andrs Garca's additional fix to make the OpenSSL stuff work for msys/mingw 2004-02-11 21:14:54 +00:00
Daniel Stenberg
50efb8f33e #if-check for SIGALRM before assuming it is present 2004-02-11 21:11:08 +00:00
Daniel Stenberg
ad75360ec7 use libtoolize --force to overwrite existing (older) files 2004-02-11 13:08:38 +00:00
Daniel Stenberg
7f29bf61e2 install ares_version.h as well 2004-02-11 12:59:16 +00:00
Daniel Stenberg
9ca395fded Dirk Manske's fix to install ares_version.h as well 2004-02-11 12:58:43 +00:00
Daniel Stenberg
68e140b2eb mondays are busy days catching up with the patches from the weekend! ;-) 2004-02-09 16:16:05 +00:00
Daniel Stenberg
283f68f660 Dominick Meglio's update 2004-02-09 13:51:52 +00:00
Daniel Stenberg
e6947f99ed recent updates 2004-02-09 13:41:24 +00:00
Daniel Stenberg
93e32e6f62 Modified the default HTTP Accept: header to only be Accept: */* 2004-02-09 12:46:41 +00:00
Daniel Stenberg
f8a5ec1380 Removed, this was only used to work out what went wrong with test 91, and
we seem to have nailed that one now!
2004-02-09 11:41:07 +00:00
Daniel Stenberg
2d0b2f294f Oops. I broke the flow with the previous commit. 2004-02-09 11:40:00 +00:00
Daniel Stenberg
08e286ed68 P R Schaffner updated this to work for 7.11.0 2004-02-09 10:24:55 +00:00
Daniel Stenberg
220caed248 Dominick Meglio's added share interface documentation 2004-02-09 09:07:26 +00:00
Daniel Stenberg
6eb0b5b917 removed the state file renaming I accidentally left there 2004-02-09 08:55:33 +00:00
Daniel Stenberg
3bdc883c93 some annoying compilers warn about "(void)foo;" lines so we avoid them 2004-02-09 08:34:19 +00:00
Daniel Stenberg
cc85f813d1 Make param2text() take an int argument, as that is what's being passed in.
This is made to prevent compiler warnings.
2004-02-09 08:31:52 +00:00
Daniel Stenberg
e723d2eb7c use VAR_NONE instead of 0 in the table to prevent compiler warning 2004-02-09 08:29:09 +00:00
Daniel Stenberg
b440c6638f return 'res' to better discover test failures and to stop compiler warnings
about it never being used
2004-02-09 08:28:00 +00:00
Daniel Stenberg
648c5b05c0 Uninitialized variable set. 2004-02-09 08:25:48 +00:00
Daniel Stenberg
011929cf4d Tor Arntsen's patch for working around a notorious bug in the AIX5
getaddrinfo() implementation.
2004-02-09 07:52:36 +00:00
Daniel Stenberg
7f679c3da3 Ken Rastatter's fixes to improve portability of this example:
These minor changes remove portability issues with the this example and allow
it to run on Win32. Specifically:

* The use of pthread_create() has been replaced by g_thread_create(). This
removes the dependency on the pthreads library. Since this is an example using
GTK+, g_thread_create() is available as it is a part of glibc.

* The CURLOPT_FILE option is now referred to by its "newer name"
CURLOPT_WRITEDATA.

* The use of CURLOPT_WRITEFUNCTION has been added.  As described in the docs,
this avoids the crashes when using a DLL under Win32.

* The output file has been renamed from "/tmp/test.curl" to "test.curl". It's
unlikely that there is a /tmp when in Win32 and other examples in libcurl
write their output files to the working directory.
2004-02-09 07:12:33 +00:00
Daniel Stenberg
3e4cd0b422 mingw configure fix, host: fix, compiler warnings in ldap.c 2004-02-06 14:27:08 +00:00
Daniel Stenberg
fc4f777b42 updated with recent fixes 2004-02-06 14:23:10 +00:00
Daniel Stenberg
208a31f549 The Curl_strtoll() issue 2004-02-06 14:17:30 +00:00
Daniel Stenberg
e565631afe updated 2004-02-06 13:42:49 +00:00
Daniel Stenberg
9f2780a2ee Rewrote the gethostbyname() check after Andrs Garca's provided patch
for finding it using mingw on windows.
I also made the script skip the search for gethostbyname_r and gethostbyaddr_r
when ipv6 is enabled.
2004-02-06 12:13:20 +00:00
Daniel Stenberg
1a6969a887 Added documentation of a few command line options that were still undocumented
here.
2004-02-06 10:17:13 +00:00
Daniel Stenberg
f56d753507 A custom Host: header is only considered if the request is not made by
following a location. After discussions with Tim Baker.
2004-02-06 08:11:58 +00:00
Daniel Stenberg
e5165af5a6 The MIPSPro compiler complains on constructs such as "(void)foo;" so
we avoid it where possible.
2004-02-06 07:59:16 +00:00
Daniel Stenberg
83e878420a Make sure DynaGetFunction() returns a function pointer, not a data pointer.
The standards don't actually allow typecasts between data and functions so
some picky compilers warn about this.
2004-02-06 07:28:49 +00:00
Daniel Stenberg
58a5f485db Remove the attempt to detect if we already tested the same source setup.
We really don't care, and so many other things could've changed to make the
new test interesting anyway.
2004-02-06 07:15:27 +00:00
Daniel Stenberg
e8fb77fac3 numerous things went in today 2004-02-05 21:52:53 +00:00
Daniel Stenberg
d292088a83 added the missing stdin section 2004-02-05 21:51:45 +00:00
Daniel Stenberg
de100f8b51 An attempt to only set both libz-related defines at the same time. We need
both the lib and the header present for both defines to be set. If only one
of the files is found, we issue a warning and set no define.
2004-02-05 21:40:05 +00:00
Daniel Stenberg
1cb2306ae0 Andrs Garca's updates 2004-02-05 21:03:53 +00:00
Daniel Stenberg
cc90a235f4 if an empty 'transfer-encoding:' header is provided, we switch off the
chunky coding of uploads
2004-02-05 15:50:16 +00:00
Daniel Stenberg
e97ce57d0b Made a test that sends data on stdin to PUT, with a given length and
chunked transfer-encoding disabled. Fixed to work after Len Krause's
bug report.
2004-02-05 15:21:46 +00:00
Daniel Stenberg
dc753b8315 Gisle Vanem fixed a windows compiler warning 2004-02-05 13:25:14 +00:00
Daniel Stenberg
a5c4442ebf changed the test() function to return type int 2004-02-05 12:34:17 +00:00
Daniel Stenberg
a271cfb697 include process.h to get the _getpid() proto 2004-02-05 12:19:13 +00:00
Daniel Stenberg
6dffe9702d when using --enable-debug and gcc, provide the -Wno-format-nonliteral option
to prevent the warning in mprintf.c:

(currently line 930) "format not a string literal, argument types not checked"
2004-02-05 10:38:32 +00:00
Daniel Stenberg
f71139750d options we get as longs need to be typecasted when assigned to prevent
picky compiler warnings
2004-02-05 09:38:56 +00:00
Daniel Stenberg
690b3e58b2 fix return type to silence compiler warnings 2004-02-05 09:38:10 +00:00
Daniel Stenberg
0c7cb0c10f prevent warning from that picky MIPSpro compiler 2004-02-05 09:37:46 +00:00
Daniel Stenberg
4816294f52 compiler warning fix, compare struct pointers of the same type 2004-02-05 09:37:04 +00:00
Daniel Stenberg
6587ff440a use the timeout options when waiting for the server to connect when using
PORT
Provide better error messages to allow debugging if one if the ipv6-related
name functions fail in the ftp_use_port() function. This might help us
diagnose the problems on AIX. Also make sure getaddrinfo() uses NULL and
not "0" for the service argument.
2004-02-05 09:26:01 +00:00
Daniel Stenberg
791e49134b hide the pack_hostent proto if ipv6 is enabled, as figured out by Tor Arntsen 2004-02-05 08:34:31 +00:00
Daniel Stenberg
9254c3a103 Fix the socklen_t type too. Needed only when built with memory debugging
as then we include the memdebug.h header from the lib dir, and it then
requires this type... (fails on IRIX 6.5 without this)
2004-02-05 08:27:47 +00:00
Daniel Stenberg
9c95ebcbe7 fixed "comparison between signed and unsigned" complaints 2004-02-04 10:24:23 +00:00
Daniel Stenberg
3a4ed71b88 don't use 'sin' as variable name as the picky compiler warnings complain
about it shadowing the function sin()
2004-02-04 10:23:15 +00:00
Daniel Stenberg
d6d312d550 fixing 2004-02-04 09:16:05 +00:00
Daniel Stenberg
1fa163fdf7 prevent a compiler warning about a macro definition 2004-02-04 08:04:28 +00:00
Daniel Stenberg
82b27d1b97 prevent the windows version to use global symbol names
added prototypes for the strcasecmp() functions
2004-02-04 08:00:25 +00:00
Daniel Stenberg
f7dee3b846 we use the more aggressive compiler warnings 2004-02-04 07:54:42 +00:00
Daniel Stenberg
a7b5045598 made more pointers unsigned, as they were mostly used passed in to functions
that assume them to be unsigned. Stops compiler warnings.
2004-02-04 07:52:13 +00:00
Daniel Stenberg
b7fda8ec73 typecast comparision between signed and unsigned 2004-02-04 07:51:30 +00:00
Daniel Stenberg
3d7f4c0d77 try_config() takes a second parameter as const, to prevent picky compiler
warnings
2004-02-04 07:50:51 +00:00
Daniel Stenberg
01771e50a1 takes a void *, not a char * anymore 2004-02-04 07:50:18 +00:00
Daniel Stenberg
c23cf6a058 ares_free_string() now takes a void * instead 2004-02-04 07:49:33 +00:00
Daniel Stenberg
79f9914af8 don't compare signed and unsigned 2004-02-04 07:48:46 +00:00
Daniel Stenberg
803fb123cb added a tags target 2004-02-04 07:48:20 +00:00
Daniel Stenberg
97728f5b1c new configure file 2004-02-04 07:48:00 +00:00
Daniel Stenberg
36d5f30b8c use configure.ac instead of configure.in
support --enable-debug to switch on picky compiler options
2004-02-04 07:47:04 +00:00
Daniel Stenberg
e82a575894 stop a compiler warning 2004-02-04 07:40:25 +00:00
Daniel Stenberg
773a8fe598 no one uses libcurl before 7.7 anyway... 2004-02-03 15:59:06 +00:00
Daniel Stenberg
fa1c0d4a56 libcares.a is here 2004-02-03 14:06:16 +00:00
Daniel Stenberg
7e01548d46 link with libcares instead of libares 2004-02-03 13:58:38 +00:00
Daniel Stenberg
14b36a8cba We now produce 'libcares.a' instead, to make it possible to have both c-ares
and the original ares installed in the same lib dir.
2004-02-03 13:58:08 +00:00
Daniel Stenberg
1089d91e77 the configure and memdebug fixes of yday 2004-02-03 10:07:26 +00:00
Daniel Stenberg
556b68f44e the unused quit-function didn't pass a correct variable type to the
response reading function
2004-02-03 09:52:32 +00:00
Daniel Stenberg
3f37ae471d add link to the new cares web site 2004-02-03 09:40:19 +00:00
Daniel Stenberg
9f4e682ca9 added notes about incompatible functions 2004-02-03 09:16:40 +00:00
Daniel Stenberg
5fc8d4da45 adjusted to the new single-parameter version of this function 2004-02-03 08:58:10 +00:00
Daniel Stenberg
4af66b70fc removed odd newline 2004-02-03 08:47:26 +00:00
Daniel Stenberg
95dd343244 added the missing ares numerical version initialiser 2004-02-03 06:39:37 +00:00
Daniel Stenberg
e449aab0af modified *strerror() 2004-02-03 06:38:38 +00:00
Daniel Stenberg
3a0192bea6 Use the nroff option figured out by the configure script. An attempt to
make this better on more systems.
2004-02-02 22:39:37 +00:00
Daniel Stenberg
37685848d1 try to figure out if -man or -mandoc works to get text with the NROFF
utility
2004-02-02 22:39:04 +00:00
Daniel Stenberg
0412a201a3 undef accept before defining it, since AIX 5.2 has it as a define! 2004-02-02 21:34:01 +00:00
Daniel Stenberg
ca522d4787 more test91 tweaks and some c-ares stuff 2004-02-02 16:29:58 +00:00
Daniel Stenberg
c2967c3c39 now provides c-ares version info in both version calls 2004-02-02 16:24:41 +00:00
Daniel Stenberg
70d7a9e6a5 Introducing the SECOND version of the version_info struct. This should
be backwards compatible with older libcurls just fine.
2004-02-02 16:24:18 +00:00
Daniel Stenberg
462d1c5231 use the new single-argument ares_strerror() 2004-02-02 16:15:58 +00:00
Daniel Stenberg
886391d145 adjusted to the modified ares_strerror() function
NOTE that this breaks ares-compatibility, we have now officially taken the
turn into the c-ares path. We will now officially depend on c-ares for asynch
name resolves.
2004-02-02 16:00:31 +00:00
Daniel Stenberg
1442fab4b6 remove rcsid stuff from c files, it serves no useful purpose 2004-02-02 15:59:35 +00:00
Daniel Stenberg
aa93e2e638 removed the silly second argument to ares_strerror()
This breaks the API and ABI with the existing ares library. We hereby require
the upcoming c-ares 1.0 for asynch name resolves!
2004-02-02 15:59:12 +00:00
Daniel Stenberg
e1d541086c Dirk Manske fixed the ares usage even more. We could get a timeout from ares
as well, and when failing and not getting a timeout we now include the
error message ares can provide us with.
2004-02-02 15:53:50 +00:00
Daniel Stenberg
3b0f52205d mention mpe/ix 2004-02-02 15:34:09 +00:00
Daniel Stenberg
b84eaff1d5 set the 'retry' bit to TRUE when the connection is about to be retried,
this allows the HTTP code to *not* return a failure just because no data
has been received from the server
2004-02-02 14:49:54 +00:00
Daniel Stenberg
9eb6fc1fb6 clear the sockerror if no error was returned 2004-02-02 14:49:10 +00:00
Daniel Stenberg
253f5f1a9a ares resolve timeout and ca bundle include fixes 2004-02-02 12:46:58 +00:00
Daniel Stenberg
dd1f495c2f we include errno.h to truly know if we have ECONNRESET or not 2004-02-02 11:59:42 +00:00
Daniel Stenberg
12fa877f00 Timeout slow ares name lookups. This is based on the patch brought by
Dirk Manske, but modified by me.
2004-02-02 10:15:22 +00:00
Daniel Stenberg
580a2fe72b when including ca-bundle.h, don't look in the current dir first, simply use
the search path since we want the build-version rather than the one in the
source dir
2004-02-02 10:13:54 +00:00
Daniel Stenberg
7f0ec86769 fixed the win32 function to use the correct proto, as pointed out by Gisle
Vanem
2004-02-02 07:24:30 +00:00
Daniel Stenberg
5e69ca0ebd test case 97 2004-02-02 07:21:21 +00:00
Daniel Stenberg
b6592e29a4 added test 97, a simple test with -d post and a replacede content-type
header using -H
2004-02-02 07:13:29 +00:00
Daniel Stenberg
4cba2ea1ad attempt to fix the notorious test 91 failures 2004-01-30 12:43:49 +00:00
Daniel Stenberg
14cb9d296c make sure the connection is closed when it was detected reset! 2004-01-30 12:41:27 +00:00
Daniel Stenberg
df750c236c Somewhat crude attempt at fixing the test 91 failures. I commit this now
so that the automatic testing hosts will test these changes over the weekend.
2004-01-30 12:08:18 +00:00
Daniel Stenberg
154c9bc3b8 hide the grep result 2004-01-30 09:48:55 +00:00
Daniel Stenberg
508ad2c92f catching up with reality 2004-01-30 09:31:44 +00:00
Daniel Stenberg
36a90aeaec test case 510, mpeix fix 2004-01-30 09:31:23 +00:00
Daniel Stenberg
f385b1976e when we receive a request overflow, we still dump the incoming request to
the dump file to make it easier to understand and debug the situation
2004-01-30 09:27:27 +00:00
Daniel Stenberg
3d99b566a6 added lib510.c for callback POST using chunked encoding 2004-01-30 09:26:23 +00:00
Daniel Stenberg
99a3e2d769 added test 510, callback-based POST using chunked encoding 2004-01-30 09:25:45 +00:00
Daniel Stenberg
aaa42735e6 --socks 2004-01-30 08:54:00 +00:00
Daniel Stenberg
50c80a49cc Added --socks 2004-01-30 08:51:24 +00:00
Daniel Stenberg
6b7f169b10 only do the verifyconnect() clear magic on mpeix 2004-01-30 07:51:51 +00:00
Daniel Stenberg
01e3bb98b5 the thread and SSL issue is now fixed 2004-01-29 16:17:51 +00:00
Daniel Stenberg
7052598e59 note about the need for extra functions set to OpenSSL if you use OpenSSL
multi-threaded
2004-01-29 16:17:25 +00:00
Daniel Stenberg
ab52e20832 update with recent info 2004-01-29 16:00:10 +00:00
Daniel Stenberg
f50678eda7 don't include config.g in src/hugehelp.c unless HAVE_CONFIG_H is defined 2004-01-29 15:48:27 +00:00
Daniel Stenberg
3ded81188b ares fix, warnings fixed, mpeix fixes 2004-01-29 15:41:56 +00:00
Daniel Stenberg
a435151735 check for sys/ioctl.h as well
added commented more aggressive compiler options for gcc, subject to be used
instead of the current ones when --enable-debug is used
2004-01-29 15:38:27 +00:00
Daniel Stenberg
bfe5568c85 added verifyconnect proto and use it correctly in the waitconnect function 2004-01-29 15:37:21 +00:00
Daniel Stenberg
7e45a1ac53 moved the definitions of IOCTL_3_ARGS to setup.h 2004-01-29 15:35:42 +00:00
Daniel Stenberg
76a51ef4b3 1. changed order of two include files to build fine on MPE/iX
2. now reads the socket error before check connect status, also to make us
   run fine on MPE/iX
2004-01-29 15:29:47 +00:00
Daniel Stenberg
fc7c4d6157 Ken Hirsch says he basicly needs all 'mv' to be 'mv -f' for configure to
run in a sane manner on his MPE/iX operating system.
2004-01-29 15:28:53 +00:00
Daniel Stenberg
4d17d6876e Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg
0d6236f7e1 make pedantic compiler options generate less warnings 2004-01-29 13:54:08 +00:00
Daniel Stenberg
0e4e72f193 added hugehelp.h 2004-01-29 13:53:34 +00:00
Daniel Stenberg
107413c021 nonsence change to make -Wunreachable-code get happy 2004-01-29 13:49:41 +00:00
Daniel Stenberg
d7579087f2 use hugehelp.h to silence picky compiler warnings 2004-01-29 13:48:36 +00:00
Daniel Stenberg
3415ac3866 documented ares_version() 2004-01-29 12:07:48 +00:00
Daniel Stenberg
d50b209a7a return a const char * 2004-01-29 12:07:34 +00:00
Daniel Stenberg
62e0f10eba use the name 'c-ares' for this package 2004-01-29 11:33:31 +00:00
Daniel Stenberg
0b2b7439fe include the new README.cares 2004-01-29 11:33:16 +00:00
Daniel Stenberg
edcd1981ea point out that this is a forked project, all c-ares specific stuff is now
in README.cares
2004-01-29 11:32:45 +00:00
Daniel Stenberg
ada9a9f4a1 c-ares specific README, leaving most of the original README as-is 2004-01-29 11:32:24 +00:00
Daniel Stenberg
1c0e4f1178 cut off the initial blurb, moved that to README.cares 2004-01-29 11:32:01 +00:00
Daniel Stenberg
663d2080d1 Dirk Manske fixed a flaw in the setting of the socket to non-blocking 2004-01-29 11:23:36 +00:00
Daniel Stenberg
e5641a33bb updates 2004-01-29 11:21:37 +00:00
Daniel Stenberg
9b24c9a754 adjusted to the corrected chunked transfer-encoding extra trailing CRLF 2004-01-29 07:43:56 +00:00
Daniel Stenberg
99b96d5446 verify that buildconf ran fine to allow it to continue 2004-01-29 07:29:28 +00:00
Daniel Stenberg
cf7817eb38 upload with chunked transfer encoding is now fixed 2004-01-28 21:44:45 +00:00
Daniel Stenberg
9bca9681ba Gisle has eyes, I don't 2004-01-28 17:38:58 +00:00
Daniel Stenberg
958987c214 Chunked-transfers should have an additional CRLF after the final 0 CRLF
sequence.
2004-01-28 17:07:22 +00:00
Daniel Stenberg
ed75842df0 added the extra newline that this needs to succeed 2004-01-28 17:03:49 +00:00
Daniel Stenberg
f35398e414 send a connection: close in the initial reply to see if things differ 2004-01-27 13:35:55 +00:00
Daniel Stenberg
3b39cee785 number two is fixed! 2004-01-27 13:17:44 +00:00
Daniel Stenberg
dc932f739a CONNECT response headers are now passed back as "regular" headers 2004-01-27 12:54:22 +00:00
Daniel Stenberg
7d15651115 don't advance the line pointer if it already points to the null terminator 2004-01-27 12:39:34 +00:00
Daniel Stenberg
e096072745 very big transfers now get nicer progress displayed after 9999 megabytes have
been transfered!
2004-01-27 12:25:37 +00:00
Daniel Stenberg
5d947e973e display OK if it runs OK 2004-01-27 12:16:24 +00:00
Daniel Stenberg
2465ff991f when saving in a cookie jar fails, include the file name in the error message
to make it easier to track down
2004-01-26 16:16:44 +00:00
Daniel Stenberg
d10a941d29 Removed two redundant #include files in the djgpp section. They're already
included. (a Dan Fandrich fix)
2004-01-26 07:55:16 +00:00
Daniel Stenberg
5a58d51993 the *_LARGE options work fine on windows in 7.11.1 2004-01-23 12:52:04 +00:00
Daniel Stenberg
142f40582f things continue to happen 2004-01-23 12:51:27 +00:00
Daniel Stenberg
4227407438 Use Curl_strtoll() if needed. This is not a library call, this is just the
same code as the library uses for its internal function. Thus the captical
C in the beginning.
2004-01-23 12:50:53 +00:00
Daniel Stenberg
6e29f5d1df use the Curl_strtoll() source code from the lib code 2004-01-23 12:49:53 +00:00
Daniel Stenberg
334c3df09d Proxy username and password on persistant connections could easily get
messed up. Vincent Bronner detected this.
2004-01-23 08:36:03 +00:00
Daniel Stenberg
4120b7b0c0 check the arguments to the socks5 function, as the name and password might
be NULL pointers, and if non-NULL if now support zero-length names/passwords
2004-01-23 08:29:56 +00:00
Daniel Stenberg
fac1c13895 fixed the progress meter display for files >32 bit, Gisle Vanem reported 2004-01-23 08:02:12 +00:00
Daniel Stenberg
649caa1953 include curl.h for the typedef 2004-01-23 07:44:02 +00:00
Daniel Stenberg
d8ee927be2 define SIZEOF_CURL_OFF_T if not already defined 2004-01-23 07:41:05 +00:00
Daniel Stenberg
3efb90dd75 re-intended the code curl-style 2004-01-22 14:37:06 +00:00
Daniel Stenberg
e4c5653035 zlib fix for the help text, stroll usage on mingw/djgpp 2004-01-22 14:35:06 +00:00
Daniel Stenberg
ad7e26b140 return curl_off_t instead of long long, to work on more platforms 2004-01-22 14:31:46 +00:00
Daniel Stenberg
f39749cee4 Gisle Vanem fixed the compressed help text zlib code 2004-01-22 14:27:58 +00:00
Daniel Stenberg
87eb26a33d it has strtoll 2004-01-22 14:25:54 +00:00
Daniel Stenberg
9a48ca69fc Gisle Vanem's fix, mingw as strtoll 2004-01-22 14:25:19 +00:00
Daniel Stenberg
a259f66fa4 attempt to fix 64bit seeking for Windows, does it work? 2004-01-22 13:11:35 +00:00
Daniel Stenberg
83d77dc013 font-lock the curl_off_t type instead of the off_t 2004-01-22 12:48:48 +00:00
Daniel Stenberg
e36914a425 header file fixing 2004-01-22 12:46:55 +00:00
Daniel Stenberg
5bd0471315 use curl_off_t instead of off_t 2004-01-22 12:46:07 +00:00
Daniel Stenberg
b791e158f0 use curl_off_t instead of off_t! 2004-01-22 12:45:50 +00:00
Daniel Stenberg
6cd0a90b52 Instead of checking the off_t size, we use the source dir version of the
curl.h header and then check for the size of the curl_off_t type.
2004-01-22 12:01:59 +00:00
Daniel Stenberg
d5bb877fba s/not/note 2004-01-22 11:56:39 +00:00
Daniel Stenberg
0c4907afcc curl_off_t is the new type for large file support
HttpPost is not defined anymore
2004-01-22 11:54:39 +00:00
Daniel Stenberg
e5cd0cc402 use the proper type for formposts, not the deprecated one 2004-01-22 11:54:00 +00:00
Daniel Stenberg
252423a725 added the missing proto for the still unused quit function 2004-01-22 11:53:43 +00:00
Daniel Stenberg
eaddf3d198 mark the option better 2004-01-22 10:17:09 +00:00
Daniel Stenberg
a37a79c2a9 start working on 7.11.1 2004-01-22 09:40:30 +00:00
Daniel Stenberg
fadf077502 release time! 2004-01-22 09:15:49 +00:00
Daniel Stenberg
863c7c7282 no large files on windows just yet 2004-01-22 09:15:37 +00:00
Daniel Stenberg
3a85b187c6 updates 2004-01-21 09:22:23 +00:00
Daniel Stenberg
296ccc35d2 updated year 2004-01-21 08:52:59 +00:00
Daniel Stenberg
68826c25f8 removed Basic in the initial response to see if it makes any difference
in the failure frequency
2004-01-21 08:51:54 +00:00
Daniel Stenberg
5e2fcc1f74 use the proper timecond defines, not the obsolete ones I've removed! ;-)
The initial QUIT-sending code is added, but not yet used due to the issues
previously mentioned on the mailing list.
2004-01-21 08:50:08 +00:00
Daniel Stenberg
e262a7265a use the proper timecond defines, not the obsolete ones! 2004-01-21 08:47:21 +00:00
Daniel Stenberg
945c6f7279 Byron's fixes 2004-01-21 08:45:34 +00:00
Daniel Stenberg
6ddec1f169 old timecond defines removed 2004-01-21 08:44:58 +00:00
Daniel Stenberg
9beae7693a Removed defines with TIMECOND_ prefixes. They have been obsolte since April 22
2002, and if this causes anyone any problems now it is very easy to just
add CURL_ to the names. This corrects this name space pollution.
2004-01-21 08:39:54 +00:00
Daniel Stenberg
d204c62c39 clarified where VERBOSE output goes 2004-01-21 07:46:17 +00:00
Daniel Stenberg
13dd99842a David Byron's --trace fix 2004-01-19 22:16:30 +00:00
Daniel Stenberg
2431b2caff David Byron cleaned up how --trace with no option was treated, and also
arguments in a config file without a required parameter!
2004-01-19 22:15:59 +00:00
Daniel Stenberg
f44bc85545 two minor build quirks 2004-01-19 15:41:50 +00:00
Daniel Stenberg
52df162c2f nothing left for 7.11.0, the remaining items were moved to 7.11.1 as planned 2004-01-19 15:41:28 +00:00
Daniel Stenberg
60787171c7 added this test, this is basicly a copy of test 91 but we return the first
response with a size 5 instead of size 0, to see if this has an impact on
the failure frequency - test 91 still fails occationally.
2004-01-16 12:40:42 +00:00
Daniel Stenberg
61e3d75def Gisle Vanem's patch for variables that "might be used uninitialized" 2004-01-16 09:17:04 +00:00
Daniel Stenberg
27b7220f1b silly me 2004-01-16 07:15:05 +00:00
Daniel Stenberg
a275365c72 Avoid Curl_if2ip() on Interix as well. Fix by Rodney. 2004-01-16 07:09:28 +00:00
Daniel Stenberg
80ef1bad86 removed unused stuff 2004-01-16 06:50:41 +00:00
Daniel Stenberg
686c70c5b5 use the %dk display for one extra k of progress 2004-01-15 13:08:12 +00:00
Daniel Stenberg
f94502ecba automake 1.8 adjustment 2004-01-15 12:49:23 +00:00
Daniel Stenberg
4c70c3e820 Added escaping of the function name in the AC_DEFUN() macros, so that
automake 1.8+ stops complaining!
2004-01-15 12:48:13 +00:00
Daniel Stenberg
84990cb176 Peter Sylvester's CURLOPT_SSL_CTX_FUNCTION docs
I reworded some of the intial paragraphs to avoid 'NOTE2'
2004-01-15 10:38:08 +00:00
Daniel Stenberg
eabbb5331a now compressed out of the box 2004-01-15 10:21:29 +00:00
Daniel Stenberg
898bf8bb0b issue 22 (better compressed manual) is fixed 2004-01-15 10:20:17 +00:00
Daniel Stenberg
3d66d10fbe check for limits.h as well 2004-01-15 10:19:49 +00:00
Daniel Stenberg
7052daf475 added missing parenthesis 2004-01-15 09:54:30 +00:00
Daniel Stenberg
846d203d31 spell-fixed a comment
now errors out if built with off_t > 32 bits but without strtoll()
2004-01-15 07:09:23 +00:00
Daniel Stenberg
7561cbda0a clarified the recent fix, added cred 2004-01-14 09:16:47 +00:00
Daniel Stenberg
c5c89862b2 rearranged the connect() call so that there's no interleaved #ifdef, to make
it compiler better on amigaos
2004-01-14 09:11:42 +00:00
Daniel Stenberg
3a70d686ee Curl_resolv fix 2004-01-14 09:07:24 +00:00
Daniel Stenberg
2d567af069 fixed the Curl_resolv()'s return code when the looked up host was already
in the cache (Vincent Bronner)
2004-01-14 09:05:54 +00:00
Daniel Stenberg
d2f7037ff7 HAVE_LIMITS_H 2004-01-14 07:47:55 +00:00
Daniel Stenberg
c3614fa6a3 Gisle Vanem updated the code for win32 and djgpp builds. 2004-01-14 07:42:10 +00:00
Daniel Stenberg
f1da9e508e indented and formatted the VMS-specific code more in the same style as
other curl code
2004-01-13 16:13:32 +00:00
Daniel Stenberg
9e80356dd5 Luck Call made win32 password prompting support backspace 2004-01-13 16:07:40 +00:00
Daniel Stenberg
4a4295290d we no longer distribute the non-working tests 400 - 403 2004-01-13 13:34:10 +00:00
Daniel Stenberg
57f67d0241 added a comment about this not being the original getdate.y version, it has
been modified
2004-01-13 08:59:53 +00:00
Daniel Stenberg
d50c9218c7 source header added 2004-01-13 08:57:24 +00:00
Daniel Stenberg
3c1bb36193 use the *correct* header! 2004-01-13 08:57:01 +00:00
Daniel Stenberg
16c747da76 zlib patch, amigaos patch 2004-01-13 08:50:21 +00:00
Daniel Stenberg
baf948db40 Dan Fandrich made the hugehelp.c contain both compressed and uncompressed
help if libz is available using #ifdef in the source instead, to allow the
distributed source code to be easier built with compressed help text.
2004-01-13 08:48:41 +00:00
Daniel Stenberg
9906eb8e19 define HAVE_LIBZ if libz is present, for hugehelp.c 2004-01-13 08:47:10 +00:00
Daniel Stenberg
44d931dbc7 amiga patch applied and committed 2004-01-13 08:38:04 +00:00
Daniel Stenberg
d0ad607c46 the multi change, the amiga build, credits 2004-01-13 08:36:29 +00:00
Daniel Stenberg
36f76396ea Diego Casorran's fixes to allow native AmigaOS builds 2004-01-13 08:35:57 +00:00
Daniel Stenberg
1cb3cd1463 three changes done this morning 2004-01-13 08:05:54 +00:00
Daniel Stenberg
a76235c008 Matt Veenstra updated the Mac OS X framework files 2004-01-13 08:04:05 +00:00
Daniel Stenberg
71b3cc08a6 Brian R Duffy made the makefile work to build SSL-enabled curl with Borland
C++.
2004-01-13 08:02:01 +00:00
Daniel Stenberg
d8dd9b0008 Brian R Duffy provide a "build SSL-enabled with Borland" section 2004-01-13 07:58:49 +00:00
Daniel Stenberg
35fd3a3139 fix the copyright string years 2004-01-13 07:42:11 +00:00
Daniel Stenberg
90be1d157e modified the TODO, we already do persistant tests 2004-01-13 07:39:42 +00:00
Daniel Stenberg
8433068f3a added our standard header 2004-01-13 07:38:26 +00:00
Daniel Stenberg
e043cf22e2 added standard source header 2004-01-13 07:37:29 +00:00
Daniel Stenberg
206039cb76 fix the include path to point to the libcurl's source dir too for the setup.h
inclusion
2004-01-13 07:36:13 +00:00
Daniel Stenberg
4ba05e1128 include setup.h from the lib dir instead to get even more private stuff
from the libcurl build, but right now for the USE_SSLEAY define.
2004-01-13 07:35:28 +00:00
Daniel Stenberg
0ae7e93299 more stuff to be added "soon" 2004-01-12 15:54:31 +00:00
Daniel Stenberg
5baf747e67 Peter Sylvester's multi patches were applied 2004-01-12 15:27:40 +00:00
Daniel Stenberg
3a61c98b65 Peter Sylvester brought code that now allows a callback to modified the URL
even when the multi interface is used, and then libcurl will simulate a
"follow location" to that new URL. Test 509 was added to test this feature.
2004-01-12 15:26:32 +00:00
Daniel Stenberg
5173bab0bb better test script 2004-01-12 14:41:06 +00:00
Daniel Stenberg
b291bbc9a6 better skip reasons, longer waiting for startup of servers (due to slow/loaded
host), added retrying/waiting for slow stunnel startups
2004-01-12 14:34:48 +00:00
Daniel Stenberg
11e8600390 cut the patch number before a '-' too, to enable '7.11.0-pre1' to use
patch number zero.
2004-01-12 09:14:12 +00:00
Daniel Stenberg
93aea06ed9 http auth types
disable EPRT
removed passwd prompting text
2004-01-12 08:48:08 +00:00
Daniel Stenberg
9e5aee63c7 removed the "build natively on amiga" note as this is not yet true, we're
awaiting a patch that might be delayed into 7.11.1 instead (see TODO-RELEASE)
2004-01-12 08:14:14 +00:00
Daniel Stenberg
60cc5a3f27 added the forgotten patch tracker item #844036 2004-01-12 08:08:36 +00:00
Daniel Stenberg
5ac047dc39 Dan Fandrich does download page edits
ftps has a new port
2004-01-12 07:59:25 +00:00
Daniel Stenberg
6cd280fdfb issue 6 moved to 7.11.1 2004-01-11 23:02:48 +00:00
Daniel Stenberg
c8ac7a0d95 Dominick Meglio pointed out FTPS should use default port 990 according to
IANA.
2004-01-11 22:56:36 +00:00
Daniel Stenberg
44031f32a1 added one assert and a few comments describing how the auth stuff works 2004-01-09 14:03:06 +00:00
Daniel Stenberg
7237221108 added a short intro text about this not being for binary package installs 2004-01-09 09:36:07 +00:00
Daniel Stenberg
ad36138f52 the --with-spnego fix 2004-01-09 09:25:14 +00:00
Daniel Stenberg
8a16e48a6c configure spnego fix of yday 2004-01-09 09:06:26 +00:00
Daniel Stenberg
4c3a2318ae a fair idea 2004-01-09 08:59:55 +00:00
Daniel Stenberg
7beac70644 Dominick Meglio updated the win description since we fixed the gettimeofday
name issue
2004-01-09 07:45:47 +00:00
Daniel Stenberg
b16dfbee99 Giuseppe Attardi's bug 2004-01-08 23:06:40 +00:00
Daniel Stenberg
202e54cf9c fixed the LDFLAGS creation for the SPNEGO option 2004-01-08 22:58:21 +00:00
Daniel Stenberg
e0d9e7a255 a few issues are now awaiting response 2004-01-08 22:03:10 +00:00
Daniel Stenberg
c2bc5662b5 sourceforge out, siamu.ac.th in 2004-01-07 15:46:20 +00:00
Daniel Stenberg
f4569f10f0 added a few people who have been doing lots of good stuff 2004-01-07 14:53:53 +00:00
Daniel Stenberg
23cfb9a832 feature update 2004-01-07 14:50:11 +00:00
Daniel Stenberg
b921777057 added fresh mirror info since last release 2004-01-07 13:41:56 +00:00
Daniel Stenberg
ff6d9a1109 stopped the sf mirror 2004-01-07 10:22:44 +00:00
Daniel Stenberg
053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg
9970fb863d removed the fixed entries, somewhat updated entries 2004-01-07 07:44:44 +00:00
Daniel Stenberg
feeef39ebf mention that the _LARGE options are added in 7.11.0, added a header to the
file with the standard curl blurb
2004-01-07 07:20:08 +00:00
Daniel Stenberg
7bf11297fe Dan Fandrich fixed our zlib usage 2004-01-05 22:55:51 +00:00
Daniel Stenberg
292ef5fabb Dan Fandrich's zlib fix 2004-01-05 22:54:45 +00:00
Daniel Stenberg
2b277f85f5 Accept fix 2004-01-05 22:52:11 +00:00
Daniel Stenberg
9363d94f9b new files for the large file support number parsing 2004-01-05 22:39:46 +00:00
Daniel Stenberg
ea1c98dccf large file support added in CVS now 2004-01-05 22:38:00 +00:00
Daniel Stenberg
1109a4a629 mr Meyer brought large file support 2004-01-05 22:37:31 +00:00
Daniel Stenberg
2d01740e1a David J Meyer's large file work was added. 2004-01-05 22:35:43 +00:00
Daniel Stenberg
979a1e6237 fix duplicates 2004-01-05 22:34:37 +00:00
Daniel Stenberg
b60e0fa97e David J Meyer's large file support. 2004-01-05 22:29:29 +00:00
Daniel Stenberg
41c6f68d94 minor wording change 2004-01-05 14:56:46 +00:00
Daniel Stenberg
411d0cb715 minor format flaw 2004-01-05 14:46:56 +00:00
Daniel Stenberg
8b3946efda Tor Arntsen fixed a spelling error 2004-01-05 14:20:08 +00:00
Daniel Stenberg
763d6a8524 we call it 7.11.0 2004-01-04 17:38:58 +00:00
Daniel Stenberg
232b051254 What I hope we get done in the next few releases 2004-01-04 17:37:49 +00:00
Daniel Stenberg
aef6208bd7 curl-related news 2004-01-04 13:01:59 +00:00
Daniel Stenberg
50c5a69d70 the gettimeofday fix 2004-01-04 12:20:37 +00:00
Daniel Stenberg
9ebe4ab60c Dominick Meglio's fix to make our private gettimeofday() use the ares_
namespace
2004-01-04 12:19:06 +00:00
Daniel Stenberg
a0edfb90c2 make our private version of gettimeofday() static 2004-01-04 12:10:14 +00:00
Daniel Stenberg
93a8572928 white space and copyright year changes 2004-01-04 12:09:52 +00:00
Daniel Stenberg
591fe66f18 Dominick Meglio's description how to build ares for libcurl on win32 2004-01-04 12:00:11 +00:00
Daniel Stenberg
a99e6445bf there's a ferite binding too 2004-01-02 12:57:47 +00:00
Daniel Stenberg
f3e5d4a602 curl doesn't do recursive operations 2003-12-22 17:24:21 +00:00
Daniel Stenberg
1d6248baa4 added redwire.net 2003-12-22 11:02:03 +00:00
Daniel Stenberg
61685fee7e Andrs Garca added CURLOPT_IPRESOLVE 2003-12-22 10:53:55 +00:00
Daniel Stenberg
55e4d79111 fixing 2003-12-19 08:11:02 +00:00
Daniel Stenberg
84b3c3b569 Make setopt() support CURLOPT_IPRESOLVE... 2003-12-19 08:10:09 +00:00
Daniel Stenberg
4ea14b25df Gisle Vanem's djgpp fixes 2003-12-19 08:03:48 +00:00
Daniel Stenberg
4223f602ed djgpp fixes by Gisle Vanem 2003-12-19 08:03:35 +00:00
Daniel Stenberg
8146d46386 Gisle Vanem's minor fixes 2003-12-19 08:03:15 +00:00
Daniel Stenberg
36a2fac79f typecast the size to long for platforms where st_size is off_t 2003-12-18 18:05:10 +00:00
Daniel Stenberg
58cf108251 Andrs Garca's update 2003-12-18 13:33:14 +00:00
Daniel Stenberg
6c6e5522cb redirect from a bad url such as "www.com?moo=foo" to an absolute path didn't
work, as reported by John McGowan
2003-12-18 09:19:10 +00:00
Daniel Stenberg
aff9a817b4 David Byron's fix to make libcurl build fine with both .NET and VC6 version
of MSVC
2003-12-18 08:56:20 +00:00
Daniel Stenberg
f4e987cd19 clarified the URL part based on the problems Martin Hilpert had 2003-12-18 07:52:31 +00:00
Daniel Stenberg
b3afb31181 spell 2003-12-17 16:07:34 +00:00
Daniel Stenberg
a3ad4295c9 Check the error code AFTER the protocol and data. Only changed to perhaps
get some further input on the notorious test case 91 failures!
2003-12-17 15:33:04 +00:00
Daniel Stenberg
2450506c83 AmigaOS build notes 2003-12-16 14:51:58 +00:00
Daniel Stenberg
23a6041698 use the curlassert() instead of custom checks 2003-12-16 14:08:53 +00:00
Daniel Stenberg
979ba8a8b5 add off_t as a recognized type for font-locking 2003-12-16 09:53:39 +00:00
Daniel Stenberg
cd9dea3091 test506 fix 2003-12-16 09:51:51 +00:00
Daniel Stenberg
989ec98ebd modified and corrected test 506 2003-12-16 09:49:36 +00:00
Daniel Stenberg
d262d0a62a changed the dns cache pruning 2003-12-15 17:42:46 +00:00
Daniel Stenberg
15b775e126 one correction, one addition 2003-12-15 17:37:25 +00:00
Daniel Stenberg
3788f25eac added a library-wide interface for doing dns cache pruning, and no longer
make the pruning at each name lookup, only in Curl_done().
2003-12-15 17:33:49 +00:00
Daniel Stenberg
5b8852107b added the six most recent bugfixes 2003-12-15 15:46:24 +00:00
Daniel Stenberg
cfe53768dd if Curl_hash_add() returns NULL, we shall not free the addrinfo field as that
is made in the hash function in the case of failure (using the already setup
'dtor' function).
2003-12-15 15:22:10 +00:00
Daniel Stenberg
947e656367 make sure that hash_add() has no allocated resources left in case it
returns NULL
2003-12-15 15:21:13 +00:00
Daniel Stenberg
50e7545118 Giuseppe Attardi fixed a really tricky bug 2003-12-15 14:48:37 +00:00
Daniel Stenberg
0839d6e6bc We cannot 'cd' to the ares build dir to get the path, as the directory hasn't
been created at this point yet when we build outside of the source dir.
2003-12-15 13:24:16 +00:00
Daniel Stenberg
bbafc27b42 remove the build directory on exist, if there is any 2003-12-15 08:14:30 +00:00
Daniel Stenberg
a7de09a966 some outputs for easier debugging 2003-12-12 15:28:04 +00:00
Daniel Stenberg
1410deb8f7 only build ares if truly enabled 2003-12-12 15:06:17 +00:00
Daniel Stenberg
7dea4acc46 ares-using configure should run configure in the subdir by itself 2003-12-11 10:20:44 +00:00
Daniel Stenberg
a3c09e636d if there is an 'ares' subdirectory when configure is run with --enable-ares
(without a given path), we run configure automatically in that subdir
2003-12-11 10:19:57 +00:00
Daniel Stenberg
a025425d06 use the CORRECT file name! ;-) 2003-12-11 07:27:13 +00:00
Daniel Stenberg
4eb9ac0821 check for strtoll(), for the upcoming >2GB patch 2003-12-10 16:05:26 +00:00
Daniel Stenberg
77a5e7c646 dict and a man page fixes 2003-12-10 15:30:34 +00:00
Daniel Stenberg
8f0abd31c5 Use Curl_transfer() properly. Fixes the bug Gisle Vanem found! 2003-12-10 15:27:59 +00:00
Daniel Stenberg
a13f85fb33 assert that we get a good index to Curl_transfer() 2003-12-10 15:27:27 +00:00
Daniel Stenberg
3b048880ad we now have a 'curlassert' function to use 2003-12-10 15:27:06 +00:00
Daniel Stenberg
24ac5b8a6c check for assert.h 2003-12-10 15:25:49 +00:00
Daniel Stenberg
9bc97b2d3c updated with the new configure option usage 2003-12-10 14:16:56 +00:00
Daniel Stenberg
9825d81973 curl-config bug corrected 2003-12-10 14:13:01 +00:00
Daniel Stenberg
1e012c5259 Diego Casorran tapping on Amiga support 2003-12-10 14:02:36 +00:00
Daniel Stenberg
68c508976f added the new amiga files to the dist 2003-12-10 13:56:13 +00:00
Daniel Stenberg
4d8a53da2f Diego Casorran's amiga makefiles 2003-12-10 13:54:57 +00:00
Daniel Stenberg
29d3deaee8 native amiga support by Diego Casorran 2003-12-10 13:54:12 +00:00
Daniel Stenberg
6c56340e1a native AmigaOS support by Diego Casorran 2003-12-10 13:53:35 +00:00
Daniel Stenberg
134ab91358 Diego Casorran's amiga build patch 2003-12-10 13:51:42 +00:00
Daniel Stenberg
fb927939e2 ares configure and build fix 2003-12-10 13:40:09 +00:00
Daniel Stenberg
ac114ed45b do the ares stuff in the configure file 2003-12-10 13:38:51 +00:00
Daniel Stenberg
d46a735418 Dominick Meglio made --enable-ares support an option =PATH to specify a
root path to an installed ares.
2003-12-10 13:37:00 +00:00
Daniel Stenberg
5a87203fe4 minor language fixes 2003-12-10 07:50:12 +00:00
Daniel Stenberg
90e9c64f72 Eric S. Raymond's fix of the NAME section 2003-12-10 07:16:20 +00:00
Daniel Stenberg
8742d39060 added some details from the old scrolls 2003-12-09 08:05:03 +00:00
Daniel Stenberg
821302bcf3 removed old version checks 2003-12-08 14:14:26 +00:00
Daniel Stenberg
f68219ddaa use the newer option names 2003-12-08 14:13:19 +00:00
Daniel Stenberg
7e3cd82b50 updated 5.5 to use the modern names of these defines 2003-12-08 13:59:35 +00:00
Daniel Stenberg
bc372815a8 ares in curl-config 2003-12-08 13:51:07 +00:00
Daniel Stenberg
391a37ebbf removed one, added one 2003-12-08 13:48:23 +00:00
Daniel Stenberg
a61dc1e9c5 -lz fix 2003-12-08 13:38:20 +00:00
Daniel Stenberg
2e0d1a55c6 no need to add -lz to LDFLAGS manually, as AC_CHECK_LIB() does that
automatically!
2003-12-08 13:37:38 +00:00
Daniel Stenberg
dfd1a636b4 updated 2003-12-08 13:11:04 +00:00
Daniel Stenberg
ee337309cf better human error message when a FTP response can't be read 2003-12-08 13:06:08 +00:00
Daniel Stenberg
437afe0767 curl-config now shows asyncdns if built with ares enabled 2003-12-08 10:00:21 +00:00
Daniel Stenberg
0ab2dff69c based on Gisle's comment, I removed the use of syslog() and fixed the
netdb.h include, then I re-indented some code to use curl-style
2003-12-04 15:21:49 +00:00
Daniel Stenberg
bff59dac12 minor edit of the PRIVATE option 2003-12-04 13:01:30 +00:00
Daniel Stenberg
ea53aed841 cut out the wrong version blurb 2003-12-04 12:56:05 +00:00
Daniel Stenberg
e2555cf83d edited the -d section slightly 2003-12-03 14:09:29 +00:00
Daniel Stenberg
f7c8a57206 minor edit 2003-12-03 14:02:37 +00:00
Daniel Stenberg
02bf6660bf VMS 2003-12-03 08:41:39 +00:00
Daniel Stenberg
6c8e6df38f Marty Kuhrt moved most of the VMS stuff to a separate header file. 2003-12-03 08:40:39 +00:00
Daniel Stenberg
96d3db1687 new VMS files 2003-12-03 08:39:46 +00:00
Daniel Stenberg
3e43105ff1 Marty Kuhrt updates 2003-12-03 08:39:24 +00:00
Daniel Stenberg
8ccc1148d9 my contentlength adjustment broke the ftp download range stuff, this makes
it work again
2003-12-03 08:26:31 +00:00
Daniel Stenberg
06c38330ba Steve Green fixed Curl_resolv() 2003-12-03 07:55:51 +00:00
Daniel Stenberg
0f4d042d3e Ignore content-length when chunked transfer-encoding is transfered. 2003-12-03 07:52:00 +00:00
Daniel Stenberg
c79de8d86e less complicated code for the MSG_NOSIGNAL detection 2003-12-02 22:05:23 +00:00
Daniel Stenberg
d670f308a6 that MSG_NOSIGNAL check serves no useful purpose! 2003-12-02 22:04:30 +00:00
Daniel Stenberg
e64e9d7fed --ftp-pasv 2003-12-02 18:03:38 +00:00
Daniel Stenberg
ad5ead8bed --ftp-pasv now overrides a previous --ftpport option. We now also support
it named "--ftp-port" as the additional dash between the words is used in
several other options and this makes it more consistant.
2003-12-02 18:01:08 +00:00
Daniel Stenberg
1b99d33b59 fix compiler warnings 2003-12-02 13:40:12 +00:00
Daniel Stenberg
800052dc50 use the HAVE_KRB4 define instead of just KRB4 2003-12-02 13:27:29 +00:00
Daniel Stenberg
d4629fd395 renamed the KRB4 to HAVE_KRB4 2003-12-02 13:27:05 +00:00
Daniel Stenberg
2c22feced2 fixes from Gisle Vanem to try 'AUTH SSL' before 'AUTH TLS', edited by me 2003-12-02 13:21:53 +00:00
Daniel Stenberg
41688a1642 MSG_NOSIGNAL 2003-12-02 10:13:55 +00:00
Daniel Stenberg
2cf209d3f7 If HAVE_MSG_NOSIGNAL is set, we use MSG_NOSIGNAL when we call send() and
recv() and we no longer attempt to ignore the SIGPIPE signal.
2003-12-02 10:12:44 +00:00
Daniel Stenberg
909887f310 check for MSG_NOSIGNAL 2003-12-02 10:11:48 +00:00
Daniel Stenberg
d1d417664e Gisle Vanem fixed the check-order for FTPS and FTP. 2003-12-02 06:25:41 +00:00
Daniel Stenberg
7d7e99104e updated 2003-12-01 10:25:45 +00:00
Daniel Stenberg
3eeea48839 FTPS now works pretty good 2003-12-01 10:25:10 +00:00
Daniel Stenberg
cd653f1be9 FTPS now works with active ftp and uploads too. 2003-12-01 10:14:39 +00:00
Daniel Stenberg
5751796ddd Sven Wegener runs the new German web mirror 2003-11-30 11:18:19 +00:00
Daniel Stenberg
012c4ee1fa James Clancy updated the Borland makefiles 2003-11-27 12:24:22 +00:00
Daniel Stenberg
426954ff95 Markus Moeller and SPNEGO 2003-11-27 09:53:48 +00:00
Daniel Stenberg
471c30372b Markus Moeller's change to check for HAVE_SPNEGO instead of the previous 2003-11-27 09:52:44 +00:00
Daniel Stenberg
f6413f2cb4 Markus Moeller fixed the SPNEGO check and it nows defines HAVE_SPNEGO 2003-11-27 09:52:13 +00:00
Daniel Stenberg
e80bdd66f9 filed is not fixed ;-) 2003-11-25 09:12:56 +00:00
Daniel Stenberg
d083fac1fc a committed bugfix described 2003-11-25 09:11:18 +00:00
Daniel Stenberg
1d85f950bf test 95 added, verifies my fix for bug report #848371 2003-11-25 09:06:33 +00:00
Daniel Stenberg
1d977b7848 When basic is the only auth wanted (which it is by default), the auth phase
is always considered done immediately as Basic needs to extra passes.

This fix corrects bug report #848371.
2003-11-25 09:05:15 +00:00
Daniel Stenberg
b3803903d1 requires a SSL-capable client 2003-11-25 08:44:48 +00:00
Daniel Stenberg
efc9410796 clarified Maciej W. Rozycki's fix 2003-11-25 08:42:16 +00:00
Daniel Stenberg
45614d54c6 allow the end-of-headers from a proxy response to CONNECT end with a CRCR
as well as a CRLF
2003-11-24 16:17:55 +00:00
Daniel Stenberg
50e690f2dd test proxy CONNECT requiring basic auth but we don't provide any 2003-11-24 16:17:18 +00:00
Daniel Stenberg
2f9f843e8a new way to trick sws to return special data on CONNECT 2003-11-24 16:12:41 +00:00
Daniel Stenberg
15d41dfbcd somewhat up to speed with the devel 2003-11-24 15:46:01 +00:00
Daniel Stenberg
bc01ad5b9e --ftp-ssl support added 2003-11-24 11:59:15 +00:00
Daniel Stenberg
dadc1026f1 proper ftps:// support added 2003-11-24 11:51:12 +00:00
Daniel Stenberg
d8cf2d42c0 prevent warning for non-SSL builds 2003-11-24 11:44:04 +00:00
Daniel Stenberg
96d7a95ce4 windows build fix based on a patch by Gisle Vanem 2003-11-24 11:41:26 +00:00
Daniel Stenberg
d5d55a856e adjusted code to the new socket fields in the sessionhandle struct 2003-11-24 09:04:09 +00:00
Daniel Stenberg
dac045029a disable ftps-tests for now, we must make them work with the updated ftps
functionality
2003-11-24 07:17:16 +00:00
Daniel Stenberg
1e98727c55 FTPS support added as RFC2228 and the murray-ftp-auth-ssl draft describe it 2003-11-24 07:15:37 +00:00
Daniel Stenberg
1c700b5a5c fixes 2003-11-24 07:11:28 +00:00
Daniel Stenberg
af9dc9f128 Gaz Iqbal fixed a range string memory leak! 2003-11-24 07:10:02 +00:00
Daniel Stenberg
4874aa6986 fixed wrong comment 2003-11-24 07:08:07 +00:00
Daniel Stenberg
c0336dcc52 Gisle Vanem fixed the Windows build 2003-11-23 22:26:40 +00:00
Daniel Stenberg
78fb476677 FTPSSL support options and defines added 2003-11-23 15:36:24 +00:00
Daniel Stenberg
3fed12a203 combine the two identical cases 2003-11-20 14:16:18 +00:00
Daniel Stenberg
ed2b831afe three more fixes 2003-11-20 14:15:10 +00:00
Daniel Stenberg
f481b3e1dc bail out properly on a 407 when we can't authenticate basic, bug report
#845247
2003-11-20 09:53:42 +00:00
Daniel Stenberg
2769f3b245 request a file over proxy without credentials, and get a 407 back 2003-11-20 09:52:48 +00:00
Daniel Stenberg
e9a545c710 unconditional progressbarinit cures a windows crash 2003-11-19 15:59:23 +00:00
Daniel Stenberg
edce444551 If a partial file has been read or written, force a closure the existing
connection to avoid re-use of it, since we cannot know in what state it is.
2003-11-19 14:36:42 +00:00
Daniel Stenberg
7bee4140e8 respect bits.close even if an error already is set, but make sure that the
existing error is the one returned back
2003-11-19 14:35:40 +00:00
Daniel Stenberg
cc48658564 cut off old crappy win32 comments and use the proper global_init instead
also removed very old "require libcurl older than blablabla"
2003-11-19 08:21:34 +00:00
Daniel Stenberg
79e4aee185 cleaned up 2003-11-19 08:20:13 +00:00
Daniel Stenberg
4d28012468 remove the wrong win32 comment and use global_init 2003-11-19 08:19:20 +00:00
Daniel Stenberg
e1d01045e2 Maciej W. Rozycki's configure patch 2003-11-17 05:23:32 +00:00
Daniel Stenberg
0717e4690e Maciej W. Rozycki made this script use a cache variable for the writable
argv test. This way, the default can be overridden better (for cross-compiles
etc)
2003-11-17 05:23:06 +00:00
Daniel Stenberg
a0a5668dbd do ares_destroy() on the ares handle when we're done in Curl_is_resolved() 2003-11-15 10:29:43 +00:00
Daniel Stenberg
bfc7d6c11b two 2003-11-15 10:15:36 +00:00
Daniel Stenberg
dfe0118033 Mathias Axelsson found a case where we free()d the server certificate twice! 2003-11-15 10:00:20 +00:00
Daniel Stenberg
a701f3dddf Siddhartha Prakash Jain found a case with a bad resolve that we didn't
properly bail out from, when using ares.
2003-11-14 11:56:15 +00:00
Daniel Stenberg
f99a1d4e82 updated 2003-11-13 13:39:44 +00:00
Daniel Stenberg
43bb20461f Peter Sylvester found a flaw in the connect code for ipv6-enabled hosts.
I guess it seldomly happens on linux and that's why it wasn't found before.
He used Solaris to notice it.

I took the opportunity to rewrite the Curl_connecthost() slightly to feature
less duplicate code in the two different versions (ipv4/ipv6).
2003-11-13 13:28:40 +00:00
Daniel Stenberg
b9d3c71178 -n disables valgrind now 2003-11-13 10:05:44 +00:00
Daniel Stenberg
1e251a64f3 Default Content-Type for formparts has changed to "application/octet-stream".
This seems more appropriate, and I believe mozilla and the likes do this.

.html files now get text/html as Content-Type.

Pointed out in bug report #839806.
2003-11-13 07:43:18 +00:00
Daniel Stenberg
776f0bd95e don't log failed socket() calls 2003-11-13 07:33:51 +00:00
Daniel Stenberg
cd9aabb474 Gisle Vanem added a flush to make the progress-bar look better on windows
(at least).
2003-11-13 07:14:23 +00:00
Daniel Stenberg
e42f806b3f mention it was added in 7.10.9 2003-11-12 14:34:17 +00:00
Daniel Stenberg
0850aec780 a resume http upload bug 2003-11-12 14:33:58 +00:00
Daniel Stenberg
ad77f760cf Added CURLOPT_NETRC_FILE. 2003-11-11 14:30:43 +00:00
Daniel Stenberg
a50d2a45d7 Generate the ca-bundle.h file in the build dir and not in the source dir,
which works nicely since the build dir is before the source dir in the
include path.
2003-11-10 09:28:22 +00:00
Daniel Stenberg
17a834bc63 After Sbastien Willemijns' bug report, we now check the separators properly
in the 229-reply servers respond on a EPSV command and bail out better if
the reply string is not valid RFC2428-compliant.
2003-11-10 08:12:53 +00:00
Daniel Stenberg
c10bc0ef12 for the getpwuid() etc 2003-11-08 14:29:36 +00:00
Daniel Stenberg
f9b1981bd7 use char, not bool 2003-11-08 08:39:34 +00:00
Daniel Stenberg
451d34ce21 things happen even during slow days! ;-) 2003-11-07 17:22:30 +00:00
Daniel Stenberg
445950aa70 do a normal free() of the homedir now 2003-11-07 17:19:57 +00:00
Daniel Stenberg
8be602cdfd Based on Gisle Vanem's $HOME patch, we now attempt to find the home dir
in a slightly better way for more platforms. The $HOME is only used for
.curlrc atm, but the possible upcoming change of .netrc treatment may also
need the home dir.
2003-11-07 17:17:15 +00:00
Daniel Stenberg
3dd40cca9a Removed references to the no-longer existing PASSWDFUNCTION. That option
existed in 7.10.7 and earlier, but has since been cut out.
2003-11-07 13:26:45 +00:00
Daniel Stenberg
f1445ea228 remove the struct fields for the deprecated passwd prompt callback 2003-11-07 13:26:00 +00:00
Daniel Stenberg
c40309ae21 explain the requirements for --negotiate, --ntlm and --krb4 2003-11-07 13:23:08 +00:00
Daniel Stenberg
fe0b5801ec mark options better 2003-11-07 09:15:28 +00:00
Daniel Stenberg
3de511b248 Ralph Mitchell's update that allows this script to take an existing
directory name and build/run/test curl in there instead of trying to update
from CVS. Using this approach, this script can be used to test daily tarballs
etc.
2003-11-07 08:06:03 +00:00
Daniel Stenberg
b1aa8eb7ef the resource file itself 2003-11-07 07:20:15 +00:00
Daniel Stenberg
967cb4d75e removed the resource lines I shouldn't have added in the firt place 2003-11-07 07:13:56 +00:00
Daniel Stenberg
bcbaeaf7d5 define TRUE and FALSE here as some platforms don't have them otherwise 2003-11-07 07:02:35 +00:00
Daniel Stenberg
41be41358e CURLDEBUG, no underscore 2003-11-06 16:04:19 +00:00
Daniel Stenberg
ecb818805b Gisle Vanem's libcurl.dll version info patch applied 2003-11-06 15:09:30 +00:00
Daniel Stenberg
d95f7129d5 don't allow options that we KNOW can't be used 2003-11-06 14:16:16 +00:00
Daniel Stenberg
6294b356fb mark all mentioned options better 2003-11-06 13:51:29 +00:00
Daniel Stenberg
3e64a76498 converted most .I lines to \fI ones 2003-11-06 13:34:28 +00:00
Daniel Stenberg
dec9907c16 egd, not edg 2003-11-06 13:31:42 +00:00
Daniel Stenberg
527850928d Define TRUE and FALSE unless already present. I've moved away those
definitions from the global curl header and thus this needs to do it
themselves.
2003-11-06 13:07:54 +00:00
Daniel Stenberg
eee3f13134 removed the _last since that is by definition not an error code 2003-11-06 12:52:48 +00:00
Daniel Stenberg
80d2be541d new defines for version info 2003-11-06 11:37:54 +00:00
Daniel Stenberg
472c4d8616 Insert the major, minor and patch numbers into the curl/curl.h header as
well. Removed the depedency on perl.
2003-11-06 11:34:19 +00:00
Daniel Stenberg
45abf75e1e We offer the version number "in parts" as well by introducing three new
defines.
2003-11-06 11:33:08 +00:00
Daniel Stenberg
4ec4e91de0 things 2003-11-06 08:35:01 +00:00
Daniel Stenberg
f6645094a2 new mirror added 2003-11-06 08:32:43 +00:00
Daniel Stenberg
7496e87d16 updated somewhat 2003-11-06 08:15:04 +00:00
Daniel Stenberg
bd4c081157 unitialized variable fix, reported by both Marty Kuhrt and benjamin gerard 2003-11-06 07:55:45 +00:00
Daniel Stenberg
927e392b31 Mac OS X framework build files, contributed by Matt Veenstra 2003-11-06 07:42:02 +00:00
Daniel Stenberg
aeb5edbf07 Moved the TRUE and FALSE #defines to lib/setup.h instead, as they don't
belong in the public header file. They are not in our name space so we
should not set them globally.
2003-11-06 07:21:32 +00:00
Daniel Stenberg
67dcddbef7 minor format edits 2003-11-05 15:52:00 +00:00
Daniel Stenberg
7ffb8c6aee use roffit to make HTML from man pages
http://daniel.haxx.se/projects/roffit/
2003-11-05 15:51:25 +00:00
Daniel Stenberg
344c378996 use .BR to refer to other man pages to make it easier for parsers to know 2003-11-04 13:30:27 +00:00
Daniel Stenberg
445f54db57 consistant with other man pages 2003-11-04 13:27:28 +00:00
Daniel Stenberg
9b7c311929 .TP and .B replaced with .IP 2003-11-04 13:03:45 +00:00
Daniel Stenberg
6a21a28048 .IP instead of .TP and .B 2003-11-04 12:59:10 +00:00
Daniel Stenberg
0adb75114b highlight more mentioned options 2003-11-04 12:58:03 +00:00
Daniel Stenberg
ecfb53f06d Use .IP instead of .TP and .B for each item. 2003-11-04 12:55:53 +00:00
Daniel Stenberg
c020ee2eb6 spell! 2003-11-04 12:07:19 +00:00
Daniel Stenberg
a3279d4baf three changes went in 2003-11-04 07:24:56 +00:00
Daniel Stenberg
c45f43ce32 Troels Walsted Hansen fixed the MSVC makefiles to build fine on Windows. 2003-11-04 06:59:25 +00:00
Daniel Stenberg
0eb037a849 spellfix in the generated comment by Kevin Roth 2003-11-04 06:52:26 +00:00
Daniel Stenberg
5a089f6c1f Kevin Roth's fix to make correct cygwin packages 2003-11-04 06:50:50 +00:00
Daniel Stenberg
556d59dfcf blanked, starting all over again 2003-11-01 11:40:07 +00:00
Daniel Stenberg
79cb1400ab starting on 7.10.9 in CVS 2003-11-01 11:33:51 +00:00
551 changed files with 27171 additions and 11201 deletions

2116
CHANGES

File diff suppressed because it is too large Load Diff

1572
CHANGES.2003 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2003, Daniel Stenberg, <daniel@haxx.se>.
Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.

View File

@@ -25,7 +25,8 @@ Compile and build instructions follow below.
perl/ is a subdirectory with various perl scripts
To build after having extracted everything from CVS, do this:
To build in environments that support configure, after having extracted
everything from CVS, do this:
./buildconf
./configure
@@ -35,10 +36,15 @@ make
./configure --disable-shared --enable-debug --enable-maintainer-mode
In environments that don't support configure (i.e. Microsoft), do this:
buildconf.bat
REQUIREMENTS
You need the following software installed:
For buildconf (not buildconf.bat) to work, you need the following software
installed:
o autoconf 2.57 (or later)
o automake 1.7 (or later)

View File

@@ -1,12 +1,30 @@
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# $Id$
#
###########################################################################
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \
curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh \
RELEASE-NOTES
curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES
bin_SCRIPTS = curl-config
@@ -36,6 +54,9 @@ test:
test-full:
@(cd tests; $(MAKE) all full-test)
test-torture:
@(cd tests; $(MAKE) all torture-test)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:

View File

@@ -1,25 +1,25 @@
#############################################################################
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# In order to be useful for every potential user, curl and libcurl are
# dual-licensed under the MPL and the MIT/X-derivate licenses.
# 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 MPL or the MIT/X-derivate
# licenses. You may pick one of these licenses.
# 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$
#############################################################################
###########################################################################
all:
./configure
@@ -43,27 +43,27 @@ mingw32-ssl:
vc:
cd lib
nmake -f Makefile.vc6 cfg=release
nmake /f Makefile.vc6 cfg=release
cd ..\src
nmake -f Makefile.vc6
nmake /f Makefile.vc6
vc-ssl:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl
nmake /f Makefile.vc6 cfg=release-ssl
cd ..\src
nmake -f Makefile.vc6 cfg=release-ssl
nmake /f Makefile.vc6 cfg=release-ssl
vc-ssl-dll:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl-dll
nmake /f Makefile.vc6 cfg=release-ssl-dll
cd ..\src
nmake -f Makefile.vc6
nmake /f Makefile.vc6
vc-libcurl-ssl-dll:
cd lib
nmake -f Makefile.vc6 cfg=release-libcurl-ssl-dll
nmake /f Makefile.vc6 cfg=release-libcurl-ssl-dll
cd ..\src
nmake -f Makefile.vc6
nmake /f Makefile.vc6
djgpp:
make -C lib -f Makefile.dj
@@ -77,6 +77,14 @@ cygwin-ssl:
./configure --with-ssl
make
amiga:
cd ./lib && make -f makefile.amiga
cd ./src && make -f makefile.amiga
netware:
cd lib && make -f Makefile.netware
cd src && make -f Makefile.netware
unix: all
unix-ssl: ssl

39
README
View File

@@ -17,7 +17,9 @@ README
You find answers to the most frequent questions we get in the FAQ document.
Study the COPYING file for distribution terms and similar.
Study the COPYING file for distribution terms and similar. If you distribute
curl binaries or other binaries that involve libcurl, you might enjoy the
LICENSE-MIXING document.
CONTACT
@@ -31,38 +33,45 @@ WEB SITE
Visit the curl web site or mirrors for the latest news:
Sweden -- http://curl.haxx.se/
Russia -- http://curl.tsuren.net/
US -- http://curl.sf.net/
Australia -- http://curl.planetmirror.com/
Denmark -- http://curl.cofman.dk/
Estonia -- http://curl.wildyou.net/
Germany -- http://curl.mirror.at.stealer.net/
Germany -- http://curl.netmirror.org/
Russia -- http://curl.tsuren.net/
Thailand -- http://curl.siamu.ac.th/
US (CA) -- http://curl.mirror.redwire.net/
US -- http://curl.signal42.com/
DOWNLOAD
The official download mirror sites are:
Australia -- http://curl.planetmirror.com/download.html
Estonia -- http://curl.wildyou.net/download.html
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
Germany -- http://curl.mirror.at.stealer.net/download.html
Germany -- http://curl.netmirror.org/download.html
Germany -- http://www.mirrorspace.org/curl/
Hongkong -- http://www.execve.net/curl/
Russia -- http://curl.tsuren.net/download.html
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
Sweden -- http://cool.haxx.se/curl/
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
Australia -- http://curl.planetmirror.com/download/
US -- http://curl.sourceforge.net/download/
Hongkong -- http://www.execve.net/curl/
Russia -- http://curl.tsuren.net/download/
Thailand -- http://curl.siamu.ac.th/download.html
US (CA) -- http://curl.mirror.redwire.net/download.html
CVS
To download the very latest source off the CVS server do this:
cvs -d :pserver:cvsread@cvs.php.net:/repository login
cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl login
(enter "phpfi" when asked for password)
(just press enter when asked for password)
cvs -d :pserver:cvsread@cvs.php.net:/repository co curl
cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl co curl
(you'll get a directory named curl created, filled with the source code)
cvs -d :pserver:cvsread@cvs.php.net:/repository logout
(you're off the hook!)
NOTICE
Curl contains pieces of source code that is Copyright (c) 1998, 1999

View File

@@ -1,94 +1,62 @@
Curl and libcurl 7.10.8. A bugfix release.
Curl and libcurl 7.12.0.
The 77th public curl release. Release number 104 counted from the very
beginning.
Public curl release number: 81
Releases counted from the very beginning: 108
Available command line options: 96
Available curl_easy_setopt() options: 113
Number of public functions in libcurl: 36
A special thanks to:
archivas.com and Alan Pinstein, for paying me to focus on their requests
This release includes the following changes:
o --head now works on file:// URLs too
o file: URLs with only one initial slash now works too
o RELEASE-NOTES document added to the release archive to summarize the big
and visible changes and bugfixes
o CURLOPT_MAXFILESIZE was added, and --max-filesize
o CURLOPT_PASSWDFUNCTION and CURLOPT_PASSWDDATA are no longer supported
o IPv6 is now supported on Windows builds too
o CURLOPT_IPRESOLVE lets you select pure IPv6 or IPv4 resolved addresses
(curl offers the command line options -4/--ipv4 and -6/--ipv6)
o GSS-Negotiate works fine with the MIT kerberos library
o SPNEGO support added, if libcurl is built with the FBopenssl libraries,
curl_version_info() can return a feature bit for it and curl -V displays
SPNEGO as a feature if libcurl is built with it enabled
o easy handles added to a multi handle now share DNS cache automaticly
o CURLINFO_HTTPAUTH_AVAIL and CURLINFO_PROXYAUTH_AVAIL were added
o CURLOPT_FTP_RESPONSE_TIMEOUT was added
o NTLM, Digest and GSS-Negotiate authentications also work for HTTPS over
proxies
o curl supports multiple -T flags to allow serveral uploaded files using
a single command line
o CURLINFO_RESPONSE_CODE can return the last FTP response code
o added ability to "upload" to file:// URLs
o added curl_global_init_mem()
o removed curl_formparse()
o the MSVC project file in the release archive is automatically built
o curl --proxy-digest is a new command line option
o the Windows version of libcurl can use wldap32.dll for LDAP
o added curl_easy_strerror(), curl_multi_strerror() and curl_share_strerror()
o IPv6-enabled Windows hosts now resolves names threaded/asynch as well
o configure --with-libidn can be used to point out the root dir of a libidn
installation (version 0.4.5 or later) for curl to use, then libcurl can
resolve and use IDNA names (domain names with "international" letters)
This release includes the following bugfixes:
o added work-around for a name resolve problem on some glibc versions
o a rare ERRORBUFFER single-byte overflow was fixed
o HTTP-resuming an already downloaded file works better
o builds better on Solaris 8+ with gcc
o --disable-eprt works now
o improved CA cert verification
o --anyauth could bug when the first response had no body contents
o double password prompting when doing NTLM fixed
o improved performance when used multi-threaded on windows
o share-locking during DNS lookups was modified
o resume was not possible to switch off properly once enabled
o fixed the ipv4 connect code when a DNS entry has multiple IPs
o now checks subjectAltNames when matching certs
o HTTP POST using read callback works again
o builds fine on BeOS now
o CURLOPT_COOKIE set to NULL no longer sends the previously set cookie
o if an FTP transfer used a bad path, the next transfer could fail too
o ares-built libcurl resolves IP-only names properly
o changed the curl_lock_function proto to prevent warnings on some compilers
o builds fine on QNX 6.2.x now
o PUT with --digest works now
o --anyauth that picks NTLM and then follows a redirect (and does NTLM again)
works now
o asynch resolves now work on NT4 too
o a DNS cache trash (possible segfault) was fixed
o runtests.pl clears all proxy environment variables before the test is run
o Microsoft's "Negotiate" authentication is now supported by the existing
GSSNEGOTIATE option
o A set zero-length proxy name confused libcurl
o Digest authentication works again without OpenSSL on 64bit architectures
o configure --enable-thread works now
o buffer problems in the test suite's web server were fixed
o improved proxy password handling
o LDAP is again working nicely with the current OpenLDAP
o asynch name lookup for non-resolving hosts now return a proper error message
o CURLOPT_SSL_VERIFYHOST set to 1 no longer aborts if no CN field is
obtainable, it will merely warn about it
o name resolve segfault with uClibc fixed
o multi interface and multi-part/formpost could end in segfault
o curl_multi_info_read() sets the msgs_in_queue to 0 when returning NULL
o multi interface, ares and non-resolving host caused a segfault
o minor single SSL memory leak fixed
o Setting CURLOPT_WRITEFUNCTION or CURLOPT_READFUNCTION to NULL resets them
to default
o incoming cookies with domains set with a prefixed dot now works better
o CURLOPT_COOKIEFILE and CURLOPT_COOKIE can be used in the same request
o improved peer certificate name verification
o allocation failures cause no leaks nor crashes
o the progress meter display now handles file sizes up to full 8 exabytes
(which is as high a signed 64 bit number can reach)
o general HTTP authentication improvements
o HTTP Digest authentication with the proxy works
o mulipart formposting with -F and file names with spaces work again
o curl_easy_duphandle() now works when ares-enabled
o HTTP Digest authentication works a lot more like the RFC says
o curl works with telnet and stdin properly on Windows
o configure --without-ssl works even when pkg-config has OpenSSL details
o src/hugehelp.c builds correct again in non-configure build environments
Other curl-related news since the previous public release:
o TclCurl 0.10.7 was released.
o The CVS repository was moved to cool.haxx.se
o AdacURL 7.11.2 was released: http://www.almroth.com/adacurl/
o PycURL 7.11.3 was released: http://pycurl.sourceforge.net
o A new German download mirror: http://www.mirrorspace.org/curl/
o Two new mailing lists are available:
curl-and-python - for python programmers using pycurl or curl
curl-perl-commmits - receives commits done to the curl-perl CVS module
This release would not have looked like this without help, code, reports and
advice from friends like these:
Loren Kirkby, Jeff Pohlmeyer, Antoine Calando, Gerd v. Egidy, Vincent
Sanders, John McGowan, Henrik Storner, J<>rg Mueller-Tolk, Peter Pentchev,
Early Ehlinger, Kevin Fisk, Jurij Smakov, Bjorn Reese, Tim Bartley, David
Kimdon, Dominick Meglio, Markus Moeller, Giuseppe Attardi, James MacMillan,
Neil Spring, Siddhartha Prakash Jain, Jon Turner, Vincent Bronner, Shard,
Jeremy Friesner, Florian Schoppmann, Neil Dunbar, Frank Ticheler, Lachlan
O'Dea, Dirk Manske, Domenico Andreoli, Gisle Vanem, Kimmo Kinnunen, Andrew
Fuller, Georg Horn, Andr<64>s Garc<72>a, Dylan Ellicott, Kevin Roth, David Hull,
James Bursa, Dan C
Gisle Vanem, Tommy Tam, Luca Altea, James Bursa, Mihai Ionescu, Michael
Benedict, Andr<64>s Garc<72>a, Joe Halpin, Seshubabu Pasam, Peter Sylvester, Robert
D. Young, Jesse Noller, David Byron, Massimiliano Ziccardi, Mohun Biswas,
Renaud Duhaut
Thanks! (and sorry if I forgot to mention someone)

13
TODO-RELEASE Normal file
View File

@@ -0,0 +1,13 @@
Issues not sorted in any particular order.
#[num] refers to bug report numbers.
UNASSIGNED means that no person has publicly stated to work on the issue.
DELETE means the issue is subject for dismissal
To get fixed in 7.12.0 (planned release: June 2004)
======================
To get fixed in 7.12.1 (planned release: August 2004)
======================
* FTP 3rd party transfers

View File

@@ -7,7 +7,7 @@ dnl There are two known platforms (AIX 3.x and SunOS 4.1.x) where the
dnl O_NONBLOCK define is found but does not work. This condition is attempted
dnl to get caught in this script by using an excessive number of #ifdefs...
dnl
AC_DEFUN(CURL_CHECK_NONBLOCKING_SOCKET,
AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET],
[
AC_MSG_CHECKING([non-blocking sockets style])
@@ -64,7 +64,7 @@ dnl the code was bad, try a different program now, test 3
],[
/* ioctlsocket source code */
int socket;
int flags = ioctlsocket(socket, FIONBIO, &flags);
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
],[
dnl ioctlsocket test was good
nonblock="ioctlsocket"
@@ -215,7 +215,7 @@ dnl check for "localhost", if it doesn't exist, we can't do the
dnl gethostbyname_r tests!
dnl
AC_DEFUN(CURL_CHECK_WORKING_RESOLVER,[
AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[
AC_MSG_CHECKING([if "localhost" resolves])
AC_TRY_RUN([
#include <string.h>
@@ -238,14 +238,15 @@ exit (h == NULL ? 1 : 0); }],[
dnl ************************************************************
dnl check for working getaddrinfo()
dnl
AC_DEFUN(CURL_CHECK_WORKING_GETADDRINFO,[
AC_DEFUN([CURL_CHECK_WORKING_GETADDRINFO],[
AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
AC_TRY_RUN( [
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
void main(void) {
int main(void)
{
struct addrinfo hints, *ai;
int error;
@@ -254,11 +255,9 @@ void main(void) {
hints.ai_socktype = SOCK_STREAM;
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
if (error) {
exit(1);
}
else {
exit(0);
return 1;
}
return 0;
}
],[
ac_cv_working_getaddrinfo="yes"
@@ -276,10 +275,72 @@ if test "$ac_cv_working_getaddrinfo" = "yes"; then
fi
])
dnl ************************************************************
dnl check for working NI_WITHSCOPEID in getnameinfo()
dnl
AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID],[
AC_CACHE_CHECK(for working NI_WITHSCOPEID, ac_cv_working_ni_withscopeid,[
AC_DEFUN(CURL_CHECK_LOCALTIME_R,
AC_RUN_IFELSE([[
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main()
{
#ifdef NI_WITHSCOPEID
struct sockaddr_storage ss;
int sslen = sizeof(ss);
int rc;
char hbuf[NI_MAXHOST];
int fd = socket(AF_INET6, SOCK_STREAM, 0);
if(fd < 0) {
perror("socket()");
return 1; /* couldn't create socket of either kind */
}
rc = getsockname(fd, (struct sockaddr *)&ss, &sslen);
if(rc) {
perror("getsockname()");
return 2;
}
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf),
NULL, 0,
NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID);
if(rc) {
printf("rc = %s\n", gai_strerror(rc));
return 3;
}
return 0; /* everything works fine, use NI_WITHSCOPEID! */
#else
return 4; /* we don't seem to have the definition, don't use it */
#endif
}
]],
dnl program worked:
[ ac_cv_working_ni_withscopeid="yes" ],
dnl program failed:
[ ac_cv_working_ni_withscopeid="no" ],
dnl we cross-compile:
[ ac_cv_working_ni_withscopeid="yes" ]
) dnl end of AC_RUN_IFELSE
]) dnl end of AC_CACHE_CHECK
if test "$ac_cv_working_ni_withscopeid" = "yes"; then
AC_DEFINE(HAVE_NI_WITHSCOPEID, 1,
[Define if NI_WITHSCOPEID exists and works])
fi
]) dnl end of AC_DEFUN
AC_DEFUN([CURL_CHECK_LOCALTIME_R],
[
dnl check for a few thread-safe functions
dnl check for localtime_r
AC_CHECK_FUNCS(localtime_r,[
AC_MSG_CHECKING(whether localtime_r is declared)
AC_EGREP_CPP(localtime_r,[
@@ -295,7 +356,104 @@ AC_DEFUN(CURL_CHECK_LOCALTIME_R,
AC_MSG_RESULT(no))])])
])
AC_DEFUN(CURL_CHECK_INET_NTOA_R,
dnl
dnl This function checks for strerror_r(). If it isn't found at first, it
dnl retries with _THREAD_SAFE defined, as that is what AIX seems to require
dnl in order to find this function.
dnl
dnl If the function is found, it will then proceed to check how the function
dnl actually works: glibc-style or POSIX-style.
dnl
dnl glibc:
dnl char *strerror_r(int errnum, char *buf, size_t n);
dnl
dnl What this one does is to return the error string (no surprises there),
dnl but it doesn't usually copy anything into buf! The 'buf' and 'n'
dnl parameters are only meant as an optional working area, in case strerror_r
dnl needs it. A quick test on a few systems shows that it's generally not
dnl touched at all.
dnl
dnl POSIX:
dnl int strerror_r(int errnum, char *buf, size_t n);
dnl
AC_DEFUN([CURL_CHECK_STRERROR_R],
[
dnl determine of strerror_r is present
AC_CHECK_FUNCS(strerror_r,[
AC_MSG_CHECKING(whether strerror_r is declared)
AC_EGREP_CPP(strerror_r,[
#include <string.h>],[
strerror_r="yes"
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(whether strerror_r with -D_THREAD_SAFE is declared)
AC_EGREP_CPP(strerror_r,[
#define _THREAD_SAFE
#include <string.h>],[
strerror_r="yes"
CPPFLAGS="-D_THREAD_SAFE $CPPFLAGS"
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])])
if test "x$strerror_r" = "xyes"; then
dnl check if strerror_r is properly declared in the headers
AC_CHECK_DECL(strerror_r, ,
AC_DEFINE(HAVE_NO_STRERROR_R_DECL, 1, [we have no strerror_r() proto])
,
[#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
])
dnl determine if this strerror_r() is glibc or POSIX
AC_MSG_CHECKING([for a glibc strerror_r API])
AC_TRY_RUN([
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
char *string =
strerror_r(EACCES, buffer, sizeof(buffer));
/* this should've returned a string */
if(!string || !string[0])
return 99;
return 0;
}
],
AC_DEFINE(HAVE_GLIBC_STRERROR_R, 1, [we have a glibc-style strerror_r()])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
)
AC_MSG_CHECKING([for a POSIX strerror_r API])
AC_TRY_RUN([
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
int error =
strerror_r(EACCES, buffer, sizeof(buffer));
/* This should've returned zero, and written an error string in the
buffer.*/
if(!buffer[0] || error)
return 99;
return 0;
}
],
AC_DEFINE(HAVE_POSIX_STRERROR_R, 1, [we have a POSIX-style strerror_r()])
AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
)
fi
])
AC_DEFUN([CURL_CHECK_INET_NTOA_R],
[
dnl determine if function definition for inet_ntoa_r exists.
AC_CHECK_FUNCS(inet_ntoa_r,[
@@ -315,7 +473,7 @@ AC_DEFUN(CURL_CHECK_INET_NTOA_R,
AC_MSG_RESULT(no))])])
])
AC_DEFUN(CURL_CHECK_GETHOSTBYADDR_R,
AC_DEFUN([CURL_CHECK_GETHOSTBYADDR_R],
[
dnl check for number of arguments to gethostbyaddr_r. it might take
dnl either 5, 7, or 8 arguments.
@@ -392,7 +550,7 @@ rc = gethostbyaddr_r(address, length, type, &h,
have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"])])])])])
])
AC_DEFUN(CURL_CHECK_GETHOSTBYNAME_R,
AC_DEFUN([CURL_CHECK_GETHOSTBYNAME_R],
[
dnl check for number of arguments to gethostbyname_r. it might take
dnl either 3, 5, or 6 arguments.
@@ -475,3 +633,124 @@ if test "$ac_cv_func_gethostbyname_r" = "yes"; then
fi
fi
])
dnl We create a function for detecting which compiler we use and then set as
dnl pendantic compiler options as possible for that particular compiler. The
dnl options are only used for debug-builds.
AC_DEFUN([CURL_CC_DEBUG_OPTS],
[
if test "$GCC" = "yes"; then
dnl figure out gcc version!
AC_MSG_CHECKING([gcc version])
gccver=`$CC -dumpversion`
num1=`echo $gccver | cut -d . -f1`
num2=`echo $gccver | cut -d . -f2`
gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
AC_MSG_RESULT($gccver)
AC_MSG_CHECKING([if this is icc in disguise])
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
dnl action if the text is found, this it has not been replaced by the
dnl cpp
ICC="no"
AC_MSG_RESULT([no]),
dnl the text was not found, it was replaced by the cpp
ICC="yes"
AC_MSG_RESULT([yes])
)
if test "$ICC" = "yes"; then
dnl this is icc, not gcc.
dnl ICC warnings we ignore:
dnl * 269 warns on our "%Od" printf formatters for curl_off_t output:
dnl "invalid format string conversion"
dnl * 279 warns on static conditions in while expressions
dnl * 981 warns on "operands are evaluated in unspecified order"
dnl * 1418 "external definition with no prior declaration"
dnl * 1419 warns on "external declaration in primary source file"
dnl which we know and do on purpose.
WARN="-wd279,269,981,1418,1419"
if test "$gccnum" -gt "600"; then
dnl icc 6.0 and older doesn't have the -Wall flag
WARN="-Wall $WARN"
fi
else dnl $ICC = yes
dnl this is a set of options we believe *ALL* gcc versions support:
WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
dnl -Wcast-align is a bit too annoying on all gcc versions ;-)
if test "$gccnum" -gt "295"; then
dnl only if the compiler is newer than 2.95 since we got lots of
dnl "`_POSIX_C_SOURCE' is not defined" in system headers with
dnl gcc 2.95.4 on FreeBSD 4.9!
WARN="$WARN -Wundef"
fi
if test "$gccnum" -ge "296"; then
dnl gcc 2.96 or later
WARN="$WARN -Wfloat-equal"
fi
if test "$gccnum" -gt "296"; then
dnl this option does not exist in 2.96
WARN="$WARN -Wno-format-nonliteral"
fi
dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
dnl on i686-Linux as it gives us heaps with false positives
if test "$gccnum" -ge "303"; then
dnl gcc 3.3 and later
WARN="$WARN -Wendif-labels -Wstrict-prototypes"
fi
if test "$gccnum" -ge "304"; then
# try -Wunreachable-code on gcc 3.4
WARN="$WARN -Wunreachable-code"
fi
for flag in $CPPFLAGS; do
case "$flag" in
-I*)
dnl Include path, provide a -isystem option for the same dir
dnl to prevent warnings in those dirs. The -isystem was not very
dnl reliable on earlier gcc versions.
add=`echo $flag | sed 's/^-I/-isystem /g'`
WARN="$WARN $add"
;;
esac
done
fi dnl $ICC = no
CFLAGS="$CFLAGS $WARN"
AC_MSG_NOTICE([Added this set of compiler options: $WARN])
else dnl $GCC = yes
AC_MSG_NOTICE([Added no extra compiler options])
fi dnl $GCC = yes
dnl strip off optimizer flags
NEWFLAGS=""
for flag in $CFLAGS; do
case "$flag" in
-O*)
dnl echo "cut off $flag"
;;
*)
NEWFLAGS="$NEWFLAGS $flag"
;;
esac
done
CFLAGS=$NEWFLAGS
]) dnl end of AC_DEFUN()

View File

@@ -5,3 +5,4 @@ adig
ahost
config.log
config.status
aclocal.m4

View File

@@ -1,11 +1,97 @@
This package is built on ares 1.1.1 (written by Greg Hudson). I've decided to
put together and release my own ares archives since the ares maintainer
doesn't want these improvements.
Changelog for the c-ares project
The package is called 'c-ares' for now since I (Daniel Stenberg) want this for
use within the curl project (hence the letter C) and it makes a nice pun.
* May 11
- Nico Stappenbelt reported that when processing domain and search lines in
the resolv.conf file, the first entry encountered is processed and used as
the search list. According to the manual pages for both Linux, Solaris and
Tru64, the last entry of either a domain or a search field is used.
* October 24, 2003. Daniel Stenberg:
This is now adjusted in the code
Version 1.2.0 (April 13, 2004)
* April 2, 2004
- Updated various man pages to look nicer when converted to HTML on the web
site.
* April 1, 2004
- Dirk Manske provided a new function that is now named ares_cancel(). It is
used to cancel/cleanup a resolve/request made using ares functions on the
given ares channel. It does not destroy/kill the ares channel itself.
- Dominick Meglio cleaned up the formatting in several man pages.
* March 30, 2004
- Dominick Meglio's new ares_expand_string. A helper function when decoding
incoming DNS packages.
- Daniel Stenberg modified the Makefile.in to use a for loop for the man page
installation to improve overview and make it easier to add man pages.
Version 1.1.0 (March 11, 2004)
* March 9, 2004
- Gisle Vanem improved build on Windows.
* February 25, 2004
- Dan Fandrich found a flaw in the Feb 22 fix.
- Added better configure --enable-debug logic (taken from the curl configure
script). Added acinclude.m4 to the tarball.
* February 23, 2004
- Removed ares_free_errmem(), the function, the file and the man page. It was
not used and it did nothing.
- Fixed a lot of code that wasn't "64bit clean" and thus caused a lot of
compiler warnings on picky compilers.
* February 22, 2004
- Dominick Meglio made ares init support multiple name servers in the
NameServer key on Windows.
* February 16, 2004
- Modified ares_private.h to include libcurl's memory debug header if
CURLDEBUG is set. This makes all the ares-functions supervised properly by
the curl test suite. This also forced me to add inclusion of the
ares_private.h header in a few more files that are using some kind of
memory-related resources.
- Made the makefile only build ahost and adig if 'make demos' is used.
* February 10, 2004
- Dirk Manske made ares_version.h installed with 'make install'
* February 4, 2004
- ares_free_errmem() is subject for removal, it is simply present for future
purposes, and since we removed the extra parameter in strerror() it won't
be used by c-ares!
- configure --enable-debug now enables picky compiler options if gcc is used
- fixed several compiler warnings --enable-debug showed and Joerg Mueller-Tolk
reported
Version 1.0.0 (February 3, 2004)
* February 3, 2004
- now we produce the libcares.a library instead of the previous libares.a
since we are no longer compatible
* February 2, 2004
- ares_strerror() has one argument less. This is the first official
modification of the existing provided ares API.
* January 29, 2004
- Dirk Manske fixed how the socket is set non-blocking.
* January 4, 2004
- Dominick Meglio made the private gettimeofday() become ares_gettimeofday()
instead in order to not pollute the name space and risk colliding with
other libraries' versions of this function.
* October 24, 2003. Daniel Stenberg
Added ares_version().
@@ -20,3 +106,5 @@ Version 1.0-pre1 (8 October 2003)
- Daniel Stenberg adjusted the windows port
- liren at vivisimo.com made the initial windows port
* Imported the sources from ares 1.1.1

View File

@@ -3,15 +3,17 @@
*.3
NEWS
README
README.cares
CHANGES
FILES
maketgz
aclocal.m4
acinclude.m4
Makefile.in
install-sh
mkinstalldirs
configure
configure.in
configure.ac
config.guess
config.sub
vc/adig/adig.dep
@@ -19,8 +21,6 @@ vc/adig/adig.dsp
vc/adig/adig.mak
vc/adig/adig.plg
vc/vc.dsw
vc/vc.ncb
vc/vc.opt
vc/ahost/ahost.dep
vc/ahost/ahost.dsp
vc/ahost/ahost.mak

View File

@@ -12,6 +12,7 @@ libdir=@libdir@
includedir=@includedir@
mandir=@mandir@
LIB=libcares.a
CC=@CC@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@ ${WARN_CFLAGS} ${ERROR_CFLAGS}
@@ -20,23 +21,36 @@ LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${DEFS}
OBJS= ares__close_sockets.o ares__get_hostent.o ares__read_line.o \
ares_destroy.o ares_expand_name.o ares_fds.o ares_free_errmem.o \
ares_destroy.o ares_expand_name.o ares_fds.o \
ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o \
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o \
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o \
ares_send.o ares_strerror.o ares_timeout.o ares_version.o
ares_send.o ares_strerror.o ares_timeout.o ares_version.o \
ares_expand_string.o ares_cancel.o
all: libares.a adig ahost
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
ares_version.3 ares_cancel.3
libares.a: ${OBJS}
$(LIB): ${OBJS}
ar cru $@ ${OBJS}
${RANLIB} $@
adig: adig.o libares.a
${CC} ${LDFLAGS} -o $@ adig.o libares.a ${LIBS}
all: $(LIB) demos
ahost: ahost.o libares.a
${CC} ${LDFLAGS} -o $@ ahost.o libares.a ${LIBS}
demos: adig ahost
tags:
etags *.[ch]
adig: adig.o $(LIB)
${CC} ${LDFLAGS} -o $@ adig.o $(LIB) ${LIBS}
ahost: ahost.o $(LIB)
${CC} ${LDFLAGS} -o $@ ahost.o $(LIB) ${LIBS}
${OBJS}: ares.h ares_dns.h ares_private.h
@@ -49,39 +63,17 @@ install:
${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3
${INSTALL} -m 644 libares.a ${DESTDIR}${libdir}
${RANLIB} ${DESTDIR}${libdir}/libares.a
chmod u-w ${DESTDIR}${libdir}/libares.a
${INSTALL} -m 644 $(LIB) ${DESTDIR}${libdir}
${RANLIB} ${DESTDIR}${libdir}/$(LIB)
chmod u-w ${DESTDIR}${libdir}/$(LIB)
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_destroy.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_expand_name.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_fds.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_free_errmem.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_free_hostent.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_free_string.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_gethostbyaddr.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_gethostbyname.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_init.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_init_options.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_mkquery.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_parse_a_reply.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_parse_ptr_reply.3 \
${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_process.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_query.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_search.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_send.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_strerror.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_timeout.3 ${DESTDIR}${mandir}/man3
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
(for man in $(MANPAGES); do \
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
done)
clean:
rm -f ${OBJS} libares.a adig.o adig ahost.o ahost
rm -f ${OBJS} $(LIB) adig.o adig ahost.o ahost
distclean: clean
rm -f config.cache config.log config.status Makefile

View File

@@ -1,3 +1,8 @@
This is c-ares, a forked version of the original ares. The original ares
README follows below, the c-ares specific details are in README.cares
====================================================================
This is ares, an asynchronous resolver library. It is intended for
applications which need to perform DNS queries without blocking, or
need to perform multiple DNS queries in parallel. The primary

25
ares/README.cares Normal file
View File

@@ -0,0 +1,25 @@
c-ares
======
This package is based on ares 1.1.1 (written by Greg Hudson). I decided to
fork and release a separate project since the ares author didn't want the
improvements that were vital for our use of it.
This package is dubbed 'c-ares' since I (Daniel Stenberg) wanted this for use
within the curl project (hence the letter C) and it makes a nice pun. Also,
c-ares is not API compatible with ares: a new name makes that more obvious to
the public.
The full source code is available in the 'c-ares' release archives, and in the
'ares' subdir of the curl CVS source repostitory.
If you find bugs, correct flaws, have questions or have comments in general in
regard to c-ares (or by all means the original ares too), get in touch with us
on the c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares
c-ares is of course distributed under the same MIT-style license as the
original ares.
You'll find all c-ares details and news here:
http://daniel.haxx.se/projects/c-ares

101
ares/acinclude.m4 Normal file
View File

@@ -0,0 +1,101 @@
dnl We create a function for detecting which compiler we use and then set as
dnl pendantic compiler options as possible for that particular compiler. The
dnl options are only used for debug-builds.
dnl This is a copy of the original found in curl's configure script. Don't
dnl modify this one, edit the one in curl and copy it back here when that one
dnl is changed.
AC_DEFUN([CURL_CC_DEBUG_OPTS],
[
if test "$GCC" = "yes"; then
dnl figure out gcc version!
AC_MSG_CHECKING([gcc version])
gccver=`$CC -dumpversion`
num1=`echo $gccver | cut -d . -f1`
num2=`echo $gccver | cut -d . -f2`
gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
AC_MSG_RESULT($gccver)
AC_MSG_CHECKING([if this is icc in disguise])
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
dnl action if the text is found, this it has not been replaced by the
dnl cpp
ICC="no"
AC_MSG_RESULT([no]),
dnl the text was not found, it was replaced by the cpp
ICC="yes"
AC_MSG_RESULT([yes])
)
if test "$ICC" = "yes"; then
dnl this is icc, not gcc.
dnl ICC warnings we ignore:
dnl * 279 warns on static conditions in while expressions
dnl * 269 warns on our "%Od" printf formatters for curl_off_t output:
dnl "invalid format string conversion"
WARN="-wd279,269"
if test "$gccnum" -gt "600"; then
dnl icc 6.0 and older doesn't have the -Wall flag
WARN="-Wall $WARN"
fi
else dnl $ICC = yes
dnl
WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wundef -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
dnl -Wcast-align is a bit too annoying ;-)
if test "$gccnum" -ge "296"; then
dnl gcc 2.96 or later
WARN="$WARN -Wfloat-equal"
if test "$gccnum" -gt "296"; then
dnl this option does not exist in 2.96
WARN="$WARN -Wno-format-nonliteral"
fi
dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
dnl on i686-Linux as it gives us heaps with false positives
if test "$gccnum" -ge "303"; then
dnl gcc 3.3 and later
WARN="$WARN -Wendif-labels -Wstrict-prototypes"
fi
fi
for flag in $CPPFLAGS; do
case "$flag" in
-I*)
dnl include path
add=`echo $flag | sed 's/^-I/-isystem /g'`
WARN="$WARN $add"
;;
esac
done
fi dnl $ICC = no
CFLAGS="$CFLAGS $WARN"
fi dnl $GCC = yes
dnl strip off optimizer flags
NEWFLAGS=""
for flag in $CFLAGS; do
case "$flag" in
-O*)
dnl echo "cut off $flag"
;;
*)
NEWFLAGS="$NEWFLAGS $flag"
;;
esac
done
CFLAGS=$NEWFLAGS
]) dnl end of AC_DEFUN()

358
ares/aclocal.m4 vendored
View File

@@ -1,358 +0,0 @@
dnl $Id$
dnl Copyright 1996 by the Massachusetts Institute of Technology.
dnl
dnl Permission to use, copy, modify, and distribute this
dnl software and its documentation for any purpose and without
dnl fee is hereby granted, provided that the above copyright
dnl notice appear in all copies and that both that copyright
dnl notice and this permission notice appear in supporting
dnl documentation, and that the name of M.I.T. not be used in
dnl advertising or publicity pertaining to distribution of the
dnl software without specific, written prior permission.
dnl M.I.T. makes no representations about the suitability of
dnl this software for any purpose. It is provided "as is"
dnl without express or implied warranty.
dnl This file provides local macros for packages which use specific
dnl external libraries. The public macros are:
dnl
dnl ATHENA_UTIL_COM_ERR
dnl Generates error if com_err not found.
dnl ATHENA_UTIL_SS
dnl Generates error if ss not found.
dnl ATHENA_REGEXP
dnl Sets REGEX_LIBS if rx library used; ensures POSIX
dnl regexp support.
dnl ATHENA_MOTIF
dnl Sets MOTIF_LIBS and defines HAVE_MOTIF if Motif used.
dnl ATHENA_MOTIF_REQUIRED
dnl Generates error if Motif not found.
dnl ATHENA_AFS
dnl Sets AFS_LIBS and defines HAVE_AFS if AFS used. Pass
dnl in an argument giving the desired AFS libraries;
dnl AFS_LIBS will be set to that value if AFS is found.
dnl AFS_DIR will be set to the prefix given.
dnl ATHENA_AFS_REQUIRED
dnl Generates error if AFS libraries not found. AFS_DIR
dnl will be set to the prefix given.
dnl ATHENA_KRB4
dnl Sets KRB4_LIBS and defines HAVE_KRB4 if krb4 used.
dnl ATHENA_KRB4_REQUIRED
dnl Generates error if krb4 not found. Sets KRB4_LIBS
dnl otherwise. (Special behavior because krb4 libraries
dnl may be different if using krb4 compatibility libraries
dnl from krb5.)
dnl ATHENA_KRB5
dnl Sets KRB5_LIBS and defines HAVE_KRB5 if krb5 used.
dnl ATHENA_KRB5_REQUIRED
dnl Generates error if krb5 not found.
dnl ATHENA_HESIOD
dnl Sets HESIOD_LIBS and defines HAVE_HESIOD if Hesiod
dnl used.
dnl ATHENA_HESIOD_REQUIRED
dnl Generates error if Hesiod not found.
dnl ATHENA_ARES
dnl Sets ARES_LIBS and defines HAVE_ARES if libares
dnl used.
dnl ATHENA_ARES_REQUIRED
dnl Generates error if libares not found.
dnl ATHENA_ZEPHYR
dnl Sets ZEPHYR_LIBS and defines HAVE_ZEPHYR if zephyr
dnl used.
dnl ATHENA_ZEPHYR_REQUIRED
dnl Generates error if zephyr not found.
dnl
dnl All of the macros may extend CPPFLAGS and LDFLAGS to let the
dnl compiler find the requested libraries. Put ATHENA_UTIL_COM_ERR
dnl and ATHENA_UTIL_SS before ATHENA_AFS or ATHENA_AFS_REQUIRED; there
dnl is a com_err library in the AFS libraries which requires -lutil.
dnl ----- com_err -----
AC_DEFUN(ATHENA_UTIL_COM_ERR,
[AC_ARG_WITH(com_err,
[ --with-com_err=PREFIX Specify location of com_err],
[com_err="$withval"], [com_err=yes])
if test "$com_err" != no; then
if test "$com_err" != yes; then
CPPFLAGS="$CPPFLAGS -I$com_err/include"
LDFLAGS="$LDFLAGS -L$com_err/lib"
fi
AC_CHECK_LIB(com_err, com_err, :,
[AC_MSG_ERROR(com_err library not found)])
else
AC_MSG_ERROR(This package requires com_err.)
fi])
dnl ----- ss -----
AC_DEFUN(ATHENA_UTIL_SS,
[AC_ARG_WITH(ss,
[ --with-ss=PREFIX Specify location of ss (requires com_err)],
[ss="$withval"], [ss=yes])
if test "$ss" != no; then
if test "$ss" != yes; then
CPPFLAGS="$CPPFLAGS -I$ss/include"
LDFLAGS="$LDFLAGS -L$ss/lib"
fi
AC_CHECK_LIB(ss, ss_perror, :,
[AC_MSG_ERROR(ss library not found)], -lcom_err)
else
AC_MSG_ERROR(This package requires ss.)
fi])
dnl ----- Regular expressions -----
AC_DEFUN(ATHENA_REGEXP,
[AC_ARG_WITH(regex,
[ --with-regex=PREFIX Use installed regex library],
[regex="$withval"], [regex=no])
if test "$regex" != no; then
if test "$regex" != yes; then
CPPFLAGS="$CPPFLAGS -I$regex/include"
LDFLAGS="$LDFLAGS -L$regex/lib"
fi
AC_CHECK_LIB(regex, regcomp, REGEX_LIBS=-lregex,
[AC_MSG_ERROR(regex library not found)])
else
AC_CHECK_FUNC(regcomp, :,
[AC_MSG_ERROR(can't find POSIX regexp support)])
fi
AC_SUBST(REGEX_LIBS)])
dnl ----- Motif -----
AC_DEFUN(ATHENA_MOTIF_CHECK,
[if test "$motif" != yes; then
CPPFLAGS="$CPPFLAGS -I$motif/include"
LDFLAGS="$LDFLAGS -L$motif/lib"
fi
AC_CHECK_LIB(Xm, XmStringFree, :, [AC_MSG_ERROR(Motif library not found)])])
AC_DEFUN(ATHENA_MOTIF,
[AC_ARG_WITH(motif,
[ --with-motif=PREFIX Use Motif],
[motif="$withval"], [motif=no])
if test "$motif" != no; then
ATHENA_MOTIF_CHECK
MOTIF_LIBS=-lXm
AC_DEFINE(HAVE_MOTIF)
fi
AC_SUBST(MOTIF_LIBS)])
AC_DEFUN(ATHENA_MOTIF_REQUIRED,
[AC_ARG_WITH(motif,
[ --with-motif=PREFIX Specify location of Motif],
[motif="$withval"], [motif=yes])
if test "$motif" != no; then
ATHENA_MOTIF_CHECK
else
AC_MSG_ERROR(This package requires Motif.)
fi])
dnl ----- AFS -----
AC_DEFUN(ATHENA_AFS_CHECK,
[AC_CHECK_FUNC(insque, :, AC_CHECK_LIB(compat, insque))
AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
if test "$afs" != yes; then
CPPFLAGS="$CPPFLAGS -I$afs/include"
LDFLAGS="$LDFLAGS -L$afs/lib -L$afs/lib/afs"
fi
AC_CHECK_LIB(sys, pioctl, :, [AC_MSG_ERROR(AFS libraries not found)],
-lrx -llwp -lsys)
AFS_DIR=$afs
AC_SUBST(AFS_DIR)])
dnl Specify desired AFS libraries as a parameter.
AC_DEFUN(ATHENA_AFS,
[AC_ARG_WITH(afs,
[ --with-afs=PREFIX Use AFS libraries],
[afs="$withval"], [afs=no])
if test "$afs" != no; then
ATHENA_AFS_CHECK
AFS_LIBS=$1
AC_DEFINE(HAVE_AFS)
fi
AC_SUBST(AFS_LIBS)])
AC_DEFUN(ATHENA_AFS_REQUIRED,
[AC_ARG_WITH(afs,
[ --with-afs=PREFIX Specify location of AFS libraries],
[afs="$withval"], [afs=/usr/afsws])
if test "$afs" != no; then
ATHENA_AFS_CHECK
else
AC_MSG_ERROR(This package requires AFS libraries.)
fi])
dnl ----- Kerberos 4 -----
AC_DEFUN(ATHENA_KRB4_CHECK,
[AC_CHECK_FUNC(gethostbyname, :, AC_CHECK_LIB(nsl, gethostbyname))
AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket))
AC_CHECK_LIB(gen, compile)
if test "$krb4" != yes; then
CPPFLAGS="$CPPFLAGS -I$krb4/include"
if test -d "$krb4/include/kerberosIV"; then
CPPFLAGS="$CPPFLAGS -I$krb4/include/kerberosIV"
fi
LDFLAGS="$LDFLAGS -L$krb4/lib"
fi
AC_CHECK_LIB(krb4, krb_rd_req,
[KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
[AC_CHECK_LIB(krb, krb_rd_req,
[KRB4_LIBS="-lkrb -ldes"],
[AC_MSG_ERROR(Kerberos 4 libraries not found)],
-ldes)],
-ldes425 -lkrb5 -lk5crypto -lcom_err)])
AC_DEFUN(ATHENA_KRB4,
[AC_ARG_WITH(krb4,
[ --with-krb4=PREFIX Use Kerberos 4],
[krb4="$withval"], [krb4=no])
if test "$krb4" != no; then
ATHENA_KRB4_CHECK
AC_DEFINE(HAVE_KRB4)
fi
AC_SUBST(KRB4_LIBS)])
AC_DEFUN(ATHENA_KRB4_REQUIRED,
[AC_ARG_WITH(krb4,
[ --with-krb4=PREFIX Specify location of Kerberos 4],
[krb4="$withval"], [krb4=yes])
if test "$krb4" != no; then
ATHENA_KRB4_CHECK
AC_SUBST(KRB4_LIBS)
else
AC_MSG_ERROR(This package requires Kerberos 4.)
fi])
dnl ----- Kerberos 5 -----
AC_DEFUN(ATHENA_KRB5_CHECK,
[AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket)
AC_CHECK_LIB(gen, compile)
if test "$krb5" != yes; then
CPPFLAGS="$CPPFLAGS -I$krb5/include"
LDFLAGS="$LDFLAGS -L$krb5/lib"
fi
AC_CHECK_LIB(krb5, krb5_init_context, :,
[AC_MSG_ERROR(Kerberos 5 libraries not found)],
-lk5crypto -lcom_err)])
AC_DEFUN(ATHENA_KRB5,
[AC_ARG_WITH(krb5,
[ --with-krb5=PREFIX Use Kerberos 5],
[krb5="$withval"], [krb5=no])
if test "$krb5" != no; then
ATHENA_KRB5_CHECK
KRB5_LIBS="-lkrb5 -lk5crypto -lcom_err"
AC_DEFINE(HAVE_KRB5)
fi
AC_SUBST(KRB5_LIBS)])
AC_DEFUN(ATHENA_KRB5_REQUIRED,
[AC_ARG_WITH(krb5,
[ --with-krb5=PREFIX Specify location of Kerberos 5],
[krb5="$withval"], [krb5=yes])
if test "$krb5" != no; then
ATHENA_KRB5_CHECK
else
AC_MSG_ERROR(This package requires Kerberos 5.)
fi])
dnl ----- Hesiod -----
AC_DEFUN(ATHENA_HESIOD_CHECK,
[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
if test "$hesiod" != yes; then
CPPFLAGS="$CPPFLAGS -I$hesiod/include"
LDFLAGS="$LDFLAGS -L$hesiod/lib"
fi
AC_CHECK_LIB(hesiod, hes_resolve, :,
[AC_MSG_ERROR(Hesiod library not found)])])
AC_DEFUN(ATHENA_HESIOD,
[AC_ARG_WITH(hesiod,
[ --with-hesiod=PREFIX Use Hesiod],
[hesiod="$withval"], [hesiod=no])
if test "$hesiod" != no; then
ATHENA_HESIOD_CHECK
HESIOD_LIBS="-lhesiod"
AC_DEFINE(HAVE_HESIOD)
fi
AC_SUBST(HESIOD_LIBS)])
AC_DEFUN(ATHENA_HESIOD_REQUIRED,
[AC_ARG_WITH(hesiod,
[ --with-hesiod=PREFIX Specify location of Hesiod],
[hesiod="$withval"], [hesiod=yes])
if test "$hesiod" != no; then
ATHENA_HESIOD_CHECK
else
AC_MSG_ERROR(This package requires Hesiod.)
fi])
dnl ----- libares -----
AC_DEFUN(ATHENA_ARES_CHECK,
[AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send))
if test "$ares" != yes; then
CPPFLAGS="$CPPFLAGS -I$ares/include"
LDFLAGS="$LDFLAGS -L$ares/lib"
fi
AC_CHECK_LIB(ares, ares_init, :, [AC_MSG_ERROR(libares not found)])])
AC_DEFUN(ATHENA_ARES,
[AC_ARG_WITH(ares,
[ --with-ares=PREFIX Use libares],
[ares="$withval"], [ares=no])
if test "$ares" != no; then
ATHENA_ARES_CHECK
ARES_LIBS="-lares"
AC_DEFINE(HAVE_ARES)
fi
AC_SUBST(ARES_LIBS)])
AC_DEFUN(ATHENA_ARES_REQUIRED,
[AC_ARG_WITH(ares,
[ --with-ares=PREFIX Specify location of libares],
[ares="$withval"], [ares=yes])
if test "$ares" != no; then
ATHENA_ARES_CHECK
else
AC_MSG_ERROR(This package requires libares.)
fi])
dnl ----- zephyr -----
AC_DEFUN(ATHENA_ZEPHYR_CHECK,
[if test "$zephyr" != yes; then
CPPFLAGS="$CPPFLAGS -I$zephyr/include"
LDFLAGS="$LDFLAGS -L$zephyr/lib"
fi
AC_CHECK_LIB(zephyr, ZFreeNotice, :, [AC_MSG_ERROR(zephyr not found)])])
AC_DEFUN(ATHENA_ZEPHYR,
[AC_ARG_WITH(zephyr,
[ --with-zephyr=PREFIX Use zephyr],
[zephyr="$withval"], [zephyr=no])
if test "$zephyr" != no; then
ATHENA_ZEPHYR_CHECK
ZEPHYR_LIBS="-lzephyr"
AC_DEFINE(HAVE_ZEPHYR)
fi
AC_SUBST(ZEPHYR_LIBS)])
AC_DEFUN(ATHENA_ZEPHYR_REQUIRED,
[AC_ARG_WITH(zephyr,
[ --with-zephyr=PREFIX Specify location of zephyr],
[zephyr="$withval"], [zephyr=yes])
if test "$zephyr" != no; then
ATHENA_ZEPHYR_CHECK
else
AC_MSG_ERROR(This package requires zephyr.)
fi])

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -142,7 +140,6 @@ int main(int argc, char **argv)
struct hostent *hostent;
fd_set read_fds, write_fds;
struct timeval *tvp, tv;
char *errmem;
#ifdef WIN32
WORD wVersionRequested = MAKEWORD(1,1);
@@ -241,8 +238,7 @@ int main(int argc, char **argv)
if (status != ARES_SUCCESS)
{
fprintf(stderr, "ares_init_options: %s\n",
ares_strerror(status, &errmem));
ares_free_errmem(errmem);
ares_strerror(status));
return 1;
}
@@ -283,9 +279,9 @@ int main(int argc, char **argv)
static void callback(void *arg, int status, unsigned char *abuf, int alen)
{
char *name = (char *) arg, *errmem;
int id, qr, opcode, aa, tc, rd, ra, rcode, i;
unsigned int qdcount, ancount, nscount, arcount;
char *name = (char *) arg;
int id, qr, opcode, aa, tc, rd, ra, rcode;
unsigned int qdcount, ancount, nscount, arcount, i;
const unsigned char *aptr;
/* Display the query name if given. */
@@ -297,8 +293,7 @@ static void callback(void *arg, int status, unsigned char *abuf, int alen)
*/
if (status != ARES_SUCCESS)
{
printf("%s\n", ares_strerror(status, &errmem));
ares_free_errmem(errmem);
printf("%s\n", ares_strerror(status));
if (!abuf)
return;
}
@@ -375,7 +370,8 @@ static const unsigned char *display_question(const unsigned char *aptr,
int alen)
{
char *name;
int type, dnsclass, status, len;
int type, dnsclass, status;
long len;
/* Parse the question name. */
status = ares_expand_name(aptr, abuf, alen, &name, &len);
@@ -413,7 +409,8 @@ static const unsigned char *display_rr(const unsigned char *aptr,
{
const unsigned char *p;
char *name;
int type, dnsclass, ttl, dlen, status, len;
int type, dnsclass, ttl, dlen, status;
long len;
struct in_addr addr;
/* Parse the RR name. */

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -46,7 +44,6 @@ int main(int argc, char **argv)
int status, nfds;
fd_set read_fds, write_fds;
struct timeval *tvp, tv;
char *errmem;
struct in_addr addr;
#ifdef WIN32
@@ -55,14 +52,13 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData);
#endif
if (argc == 0)
if (argc <= 1)
usage();
status = ares_init(&channel);
if (status != ARES_SUCCESS)
{
fprintf(stderr, "ares_init: %s\n", ares_strerror(status, &errmem));
ares_free_errmem(errmem);
fprintf(stderr, "ares_init: %s\n", ares_strerror(status));
return 1;
}
@@ -99,12 +95,11 @@ int main(int argc, char **argv)
static void callback(void *arg, int status, struct hostent *host)
{
struct in_addr addr;
char *mem, **p;
char **p;
if (status != ARES_SUCCESS)
{
fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status, &mem));
ares_free_errmem(mem);
fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status));
return;
}

View File

@@ -20,6 +20,13 @@
#include <sys/types.h>
#ifdef _AIX
/* 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
require it! */
#include <sys/select.h>
#endif
#ifdef WIN32
#include <winsock.h>
#include <windows.h>
@@ -48,6 +55,7 @@
#define ARES_EFILE 14
#define ARES_ENOMEM 15
#define ARES_EDESTRUCTION 16
#define ARES_EBADSTR 17
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
@@ -97,7 +105,7 @@ int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int optmask);
void ares_destroy(ares_channel channel);
void ares_cancel(ares_channel channel);
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
ares_callback callback, void *arg);
void ares_query(ares_channel channel, const char *name, int dnsclass,
@@ -117,14 +125,16 @@ void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
int rd, unsigned char **buf, int *buflen);
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
int alen, char **s, int *enclen);
int alen, char **s, long *enclen);
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
int alen, unsigned char **s, long *enclen);
int ares_parse_a_reply(const unsigned char *abuf, int alen,
struct hostent **host);
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
int addrlen, int family, struct hostent **host);
void ares_free_string(char *str);
void ares_free_string(void *str);
void ares_free_hostent(struct hostent *host);
const char *ares_strerror(int code, char **memptr);
const char *ares_strerror(int code);
void ares_free_errmem(char *mem);
#endif /* ARES__H */

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdlib.h>
#ifdef WIN32
#else

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -145,25 +143,29 @@ int ares__get_hostent(FILE *fp, struct hostent **host)
free(line);
return ARES_SUCCESS;
}
free(line);
if(line)
free(line);
if (status == ARES_SUCCESS)
{
/* Memory allocation failure; clean up. */
if (hostent)
{
free((char *) hostent->h_name);
if(hostent->h_name)
free((char *) hostent->h_name);
if (hostent->h_aliases)
{
for (alias = hostent->h_aliases; *alias; alias++)
free(*alias);
}
free(hostent->h_aliases);
if (hostent->h_addr_list)
if(hostent->h_aliases)
free(hostent->h_aliases);
if (hostent->h_addr_list && hostent->h_addr_list[0])
free(hostent->h_addr_list[0]);
free(hostent->h_addr_list);
if(hostent->h_addr_list)
free(hostent->h_addr_list);
free(hostent);
}
free(hostent);
return ARES_ENOMEM;
}

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -32,7 +30,8 @@ static const char rcsid[] = "$Id$";
int ares__read_line(FILE *fp, char **buf, int *bufsize)
{
char *newbuf;
int offset = 0, len;
size_t offset = 0;
size_t len;
if (*buf == NULL)
{
@@ -44,7 +43,7 @@ int ares__read_line(FILE *fp, char **buf, int *bufsize)
while (1)
{
if (!fgets(*buf + offset, *bufsize - offset, fp))
if (!fgets(*buf + offset, *bufsize - (int)offset, fp))
return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
len = offset + strlen(*buf + offset);
if ((*buf)[len - 1] == '\n')

View File

@@ -14,29 +14,24 @@
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_FREE_ERRMEM 3 "23 July 1998"
.TH ARES_CANCEL 3 "31 March 2004"
.SH NAME
ares_free_errmem \- Free memory allocated by ares_strerror
ares_cancel \- Cancel a resolve
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B void ares_free_errmem(char *\fIerrmem\fP)
.B int ares_cancel(ares_channel \fIchannel\fP)
.fi
.SH DESCRIPTION
The
.B ares_free_errmem
function frees any memory which might have been allocated by the
.BR ares_strerror (3)
function. The parameter
.I errmem
should be set to the variable pointed to by the
.I memptr
argument previously passed to
.IR ares_strerror .
The \fBares_cancel\fP function cancels all lookups/requests made on the the
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
the callbacks for each pending query on the channel, passing a status of
.BR ARES_ETIMEOUT .
These calls give the callbacks a chance to clean up any state which
might have been stored in their arguments.
.SH SEE ALSO
.BR ares_strerror (3)
.BR ares_init (3)
.BR ares_destroy (3)
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br
Copyright 1998 by the Massachusetts Institute of Technology.
Dirk Manske

View File

@@ -13,14 +13,32 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h"
/* Do nothing, for now. A future implementation may want to deal with
* internationalization, in which case ares_strerror() might allocate
* memory which we would then have to free.
/*
* ares_cancel() cancels a ongoing request/resolve that might be going on on
* the given channel. It does NOT kill the channel, use ares_destroy() for
* that.
*/
void ares_free_errmem(char *mem)
void ares_cancel(ares_channel channel)
{
struct query *query, *next;
int i;
for (query = channel->queries; query; query = next)
{
next = query->next;
query->callback(query->arg, ARES_ETIMEOUT, NULL, 0);
free(query->tcpbuf);
free(query->skip_server);
free(query);
}
channel->queries = NULL;
if (!(channel->flags & ARES_FLAG_STAYOPEN))
{
for (i = 0; i < channel->nservers; i++)
ares__close_sockets(&channel->servers[i]);
}
}

View File

@@ -36,7 +36,8 @@ status of
These calls give the callbacks a chance to clean up any state which
might have been stored in their arguments.
.SH SEE ALSO
.BR ares_init (3)
.BR ares_init (3),
.BR ares_cancel (3)
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h"
@@ -30,7 +28,8 @@ void ares_destroy(ares_channel channel)
for (i = 0; i < channel->ndomains; i++)
free(channel->domains[i]);
free(channel->domains);
free(channel->sortlist);
if(channel->sortlist)
free(channel->sortlist);
free(channel->lookups);
while (channel->queries)
{

View File

@@ -22,8 +22,7 @@ ares_expand_name \- Expand a DNS-encoded domain name
.B #include <ares.h>
.PP
.B int ares_expand_name(const unsigned char *\fIencoded\fP,
.B
const unsigned char *\fIabuf\fP, int \fIalen\fP, char **\fIs\fP,
.B const unsigned char *\fIabuf\fP, int \fIalen\fP, char **\fIs\fP,
.B int *\fIenclen\fP)
.fi
.SH DESCRIPTION

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -26,6 +24,7 @@ static const char rcsid[] = "$Id$";
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h" /* for the memdebug */
static int name_length(const unsigned char *encoded, const unsigned char *abuf,
int alen);
@@ -55,7 +54,7 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf,
*/
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
int alen, char **s, int *enclen)
int alen, char **s, long *enclen)
{
int len, indir = 0;
char *q;

62
ares/ares_expand_string.3 Normal file
View File

@@ -0,0 +1,62 @@
.\" $Id$
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\"
.\" Permission to use, copy, modify, and distribute this
.\" software and its documentation for any purpose and without
.\" fee is hereby granted, provided that the above copyright
.\" notice appear in all copies and that both that copyright
.\" notice and this permission notice appear in supporting
.\" documentation, and that the name of M.I.T. not be used in
.\" advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.
.\" M.I.T. makes no representations about the suitability of
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_EXPAND_NAME 3 "23 July 1998"
.SH NAME
ares_expand_string \- Expand a length encoded string
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B int ares_expand_string(const unsigned char *\fIencoded\fP,
.B const unsigned char *\fIabuf\fP, int \fIalen\fP, unsigned char **\fIs\fP,
.B int *\fIenclen\fP)
.fi
.SH DESCRIPTION
The
.B ares_expand_string
function converts a length encoded string to a NULL terminated C
string. The argument
.I encoded
gives the beginning of the encoded string, and the arguments
.I abuf
and
.I alen
give the containing message buffer (necessary for the processing of
indirection pointers within the encoded domain name). The result is
placed in a NUL-terminated allocated buffer, a pointer to which is
stored in the variable pointed to by
.IR s .
The length of the encoded string is stored in the variable pointed to by
.I enclen
so that the caller can advance past the encoded string to read
further data in the message.
.SH RETURN VALUES
.B ares_expand_string
can return any of the following values:
.TP 15
.B ARES_SUCCESS
Expansion of the encoded string succeeded.
.TP 15
.B ARES_EBADSTR
The encoded string was malformed and could not be expanded.
.TP 15
.B ARES_ENOMEM
Memory was exhausted.
.SH SEE ALSO
.BR ares_free_string (3)
.SH AUTHOR
Dominick Meglio

65
ares/ares_expand_string.c Normal file
View File

@@ -0,0 +1,65 @@
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
#include <sys/types.h>
#ifdef WIN32
#include "nameser.h"
#else
#include <netinet/in.h>
#include <arpa/nameser.h>
#endif
#include <string.h>
#include <stdlib.h>
#include "ares.h"
#include "ares_private.h" /* for the memdebug */
/* Simply decodes a length-encoded character string. The first byte of the
* input is the length of the string to be returned and the bytes thereafter
* are the characters of the string. The returned result will be NULL
* terminated.
*/
int ares_expand_string(const unsigned char *encoded,
const unsigned char *abuf,
int alen,
unsigned char **s,
long *enclen)
{
unsigned char *q;
long len;
if (encoded == abuf+alen)
return ARES_EBADSTR;
len = *encoded;
if (encoded+len+1 > abuf+alen)
return ARES_EBADSTR;
encoded++;
*s = malloc(len+1);
if (*s == NULL)
return ARES_ENOMEM;
q = *s;
strncpy((char *)q, (char *)encoded, len);
q[len] = '\0';
*s = q;
*enclen = len+1;
return ARES_SUCCESS;
}

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

View File

@@ -28,21 +28,16 @@ The
.I ares_free_hostent
function frees a
.B struct hostent
allocated by one of the functions
.I ares_parse_a_reply
or
.IR ares_parse_ptr_reply .
allocated by one of the functions \fIares_parse_a_reply(3)\fP or
\fIares_parse_ptr_reply(3)\fP.
.SH NOTES
It is not necessary (and is not correct) to free the host structure passed to
the callback functions for \fIares_gethostbyname(3)\fP or
\fIares_gethostbyaddr(3)\fP. The ares library will automatically free such
host structures when the callback returns.
.SH SEE ALSO
.BR ares_parse_a_reply (3),
.BR ares_parse_ptr_reply (3)
.SH NOTES
It is not necessary (and is not correct) to free the host structure
passed to the callback functions for
.I ares_gethostbyname
or
.IR ares_gethostbyaddr .
The ares library will automatically free such host structures when the
callback returns.
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdlib.h>
#ifdef WIN32
@@ -24,6 +22,7 @@ static const char rcsid[] = "$Id$";
#endif
#include "ares.h"
#include "ares_private.h" /* for memdebug */
void ares_free_hostent(struct hostent *host)
{

View File

@@ -14,23 +14,22 @@
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_FREE_STRING 3 "4 January 2000"
.TH ARES_FREE_STRING 3 "4 February 2004"
.SH NAME
ares_free_string \- Free strings allocated by ares functions
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B void ares_free_string(char *\fIstr\fP)
.B void ares_free_string(void *\fIstr\fP)
.fi
.SH DESCRIPTION
The
.I ares_free_string
function frees a string allocated by the
.I ares_mkquery
function.
function frees a string allocated by an ares function.
.SH SEE ALSO
.BR ares_mkquery (3)
.BR ares_expand_string (3)
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,12 +13,10 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdlib.h>
#include "ares.h"
void ares_free_string(char *str)
void ares_free_string(void *str)
{
free(str);
}

View File

@@ -40,14 +40,10 @@ and
.I addrlen
give the address as a series of bytes, and
.I family
gives the type of address. When the query is complete or has failed,
the ares library will invoke
.IR callback .
Completion or failure of the query may happen immediately, or may
happen during a later call to
.BR ares_process (3)
or
.BR ares_destroy (3).
gives the type of address. When the query is complete or has failed, the ares
library will invoke \fIcallback\fP. Completion or failure of the query may
happen immediately, or may happen during a later call to
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
.PP
The callback argument
.I arg
@@ -93,7 +89,8 @@ did not complete successfully,
will be
.BR NULL .
.SH SEE ALSO
.BR ares_process (3)
.BR ares_process (3),
.BR ares_gethostbyname (3)
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -89,10 +87,10 @@ static void next_lookup(struct addr_query *aquery)
{
case 'b':
addr = ntohl(aquery->addr.s_addr);
a1 = addr >> 24;
a2 = (addr >> 16) & 0xff;
a3 = (addr >> 8) & 0xff;
a4 = addr & 0xff;
a1 = (int)((addr >> 24) & 0xff);
a2 = (int)((addr >> 16) & 0xff);
a3 = (int)((addr >> 8) & 0xff);
a4 = (int)(addr & 0xff);
sprintf(name, "%d.%d.%d.%d.in-addr.arpa", a4, a3, a2, a1);
aquery->remaining_lookups = p + 1;
ares_query(aquery->channel, name, C_IN, T_PTR, addr_callback,

View File

@@ -37,14 +37,11 @@ The parameter
.I name
gives the hostname as a NUL-terminated C string, and
.I family
gives the desired type of address for the resulting host entry. When
the query is complete or has failed, the ares library will invoke
.IR callback .
Completion or failure of the query may happen immediately, or may
happen during a later call to
.BR ares_process (3)
or
.BR ares_destroy (3).
gives the desired type of address for the resulting host entry. When the
query is complete or has failed, the ares library will invoke \fIcallback\fP.
Completion or failure of the query may happen immediately, or may happen
during a later call to \fIares_process(3)\fP, \fIares_destroy(3)\fP or
\fIares_cancel(3)\fP.
.PP
The callback argument
.I arg
@@ -96,7 +93,8 @@ did not complete successfully,
will be
.BR NULL .
.SH SEE ALSO
.BR ares_process (3)
.BR ares_process (3),
.BR ares_gethostbyaddr (3)
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -46,12 +44,12 @@ static int init_by_defaults(ares_channel channel);
static int config_domain(ares_channel channel, char *str);
static int config_lookup(ares_channel channel, const char *str);
static int config_nameserver(struct server_state **servers, int *nservers,
const char *str);
char *str);
static int config_sortlist(struct apattern **sortlist, int *nsort,
const char *str);
static int set_search(ares_channel channel, const char *str);
static int set_options(ares_channel channel, const char *str);
static char *try_config(char *s, char *opt);
static char *try_config(char *s, const char *opt);
static const char *try_option(const char *p, const char *q, const char *opt);
static int ip_addr(const char *s, int len, struct in_addr *addr);
static void natural_mask(struct apattern *pat);
@@ -87,6 +85,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
channel->nsort = -1;
channel->lookups = NULL;
channel->queries = NULL;
channel->domains = NULL;
channel->sortlist = NULL;
/* Initialize configuration by each of the four sources, from highest
* precedence to lowest.
@@ -103,15 +103,16 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
/* Something failed; clean up memory we may have allocated. */
if (channel->nservers != -1)
free(channel->servers);
if (channel->ndomains != -1)
if (channel->domains)
{
for (i = 0; i < channel->ndomains; i++)
free(channel->domains[i]);
free(channel->domains);
}
if (channel->nsort != -1)
if (channel->sortlist)
free(channel->sortlist);
free(channel->lookups);
if(channel->lookups)
free(channel->lookups);
free(channel);
return status;
}
@@ -138,7 +139,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
* field, so there's not much to be done about that.
*/
gettimeofday(&tv, NULL);
channel->next_id = (tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff;
channel->next_id = (unsigned short)
(tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff;
channel->queries = NULL;
@@ -232,7 +234,7 @@ static int init_by_environment(ares_channel channel)
#ifdef WIN32
static int get_res_size_nt(HKEY hKey, char *subkey, int *size)
{
return RegQueryValueEx(hKey, subkey, 0, NULL, NULL, size);
return RegQueryValueEx(hKey, subkey, 0, NULL, NULL, size);
}
/* Warning: returns a dynamically allocated buffer, the user MUST
@@ -240,55 +242,56 @@ static int get_res_size_nt(HKEY hKey, char *subkey, int *size)
*/
static int get_res_nt(HKEY hKey, char *subkey, char **obuf)
{
/* Test for the size we need */
int size = 0;
int result;
result = RegQueryValueEx(hKey, subkey, 0, NULL, NULL, &size);
if ((result != ERROR_SUCCESS && result != ERROR_MORE_DATA) || !size)
return 0;
*obuf = malloc(size+1);
/* Test for the size we need */
int size = 0;
int result;
result = RegQueryValueEx(hKey, subkey, 0, NULL, NULL, &size);
if ((result != ERROR_SUCCESS && result != ERROR_MORE_DATA) || !size)
return 0;
*obuf = malloc(size+1);
if (RegQueryValueEx(hKey, subkey, 0, NULL, *obuf, &size) != ERROR_SUCCESS)
{
free(*obuf);
return 0;
}
if (size == 1)
{
free(*obuf);
return 0;
}
return 1;
if (RegQueryValueEx(hKey, subkey, 0, NULL, *obuf, &size) != ERROR_SUCCESS)
{
free(*obuf);
return 0;
}
if (size == 1)
{
free(*obuf);
return 0;
}
return 1;
}
static int get_res_interfaces_nt(HKEY hKey, char *subkey, char **obuf)
{
char enumbuf[39]; /* GUIDs are 38 chars + 1 for NULL */
int enum_size = 39;
int idx = 0;
HKEY hVal;
while (RegEnumKeyEx(hKey, idx++, enumbuf, &enum_size, 0, NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS)
{
enum_size = 39;
if (RegOpenKeyEx(hKey, enumbuf, 0, KEY_QUERY_VALUE, &hVal) != ERROR_SUCCESS)
continue;
if (!get_res_nt(hVal, subkey, obuf))
RegCloseKey(hVal);
else
{
RegCloseKey(hVal);
return 1;
}
}
return 0;
char enumbuf[39]; /* GUIDs are 38 chars + 1 for NULL */
int enum_size = 39;
int idx = 0;
HKEY hVal;
while (RegEnumKeyEx(hKey, idx++, enumbuf, &enum_size, 0,
NULL, NULL, NULL) != ERROR_NO_MORE_ITEMS)
{
enum_size = 39;
if (RegOpenKeyEx(hKey, enumbuf, 0, KEY_QUERY_VALUE, &hVal) !=
ERROR_SUCCESS)
continue;
if (!get_res_nt(hVal, subkey, obuf))
RegCloseKey(hVal);
else
{
RegCloseKey(hVal);
return 1;
}
}
return 0;
}
#endif
static int init_by_resolv_conf(ares_channel channel)
{
FILE *fp;
char *line = NULL, *p;
int linesize, status, nservers = 0, nsort = 0;
char *line = NULL;
int status, nservers = 0, nsort = 0;
struct server_state *servers = NULL;
struct apattern *sortlist = NULL;
@@ -317,8 +320,6 @@ DhcpNameServer
DWORD data_type;
DWORD bytes;
DWORD result;
DWORD index;
char name[MAX_PATH];
DWORD keysize = MAX_PATH;
status = ARES_EFILE;
@@ -326,70 +327,75 @@ DhcpNameServer
if (IsNT)
{
if (RegOpenKeyEx(
HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
KEY_READ, &mykey
) == ERROR_SUCCESS)
{
RegOpenKeyEx(mykey, "Interfaces", 0, KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS, &subkey);
if (get_res_nt(mykey, NAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
else if (get_res_nt(mykey, DHCPNAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
/* Try the interfaces */
else if (get_res_interfaces_nt(subkey, NAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
else if (get_res_interfaces_nt(subkey, DHCPNAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
RegCloseKey(subkey);
RegCloseKey(mykey);
}
} else {
if (RegOpenKeyEx(
HKEY_LOCAL_MACHINE, WIN_NS_9X, 0,
KEY_READ, &mykey
HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0,
KEY_READ, &mykey
) == ERROR_SUCCESS)
{
RegOpenKeyEx(mykey, "Interfaces", 0,
KEY_QUERY_VALUE|KEY_ENUMERATE_SUB_KEYS, &subkey);
if (get_res_nt(mykey, NAMESERVER, &line))
{
if ((result = RegQueryValueEx(
mykey, NAMESERVER, NULL, &data_type,
NULL, &bytes
)
) == ERROR_SUCCESS ||
result == ERROR_MORE_DATA)
{
if (bytes) {
line = (char *)malloc(bytes+1);
if (RegQueryValueEx(
mykey, NAMESERVER, NULL, &data_type,
(unsigned char *)line, &bytes
) == ERROR_SUCCESS) {
status = config_nameserver(&servers, &nservers, line);
}
free(line);
}
}
}
status = config_nameserver(&servers, &nservers, line);
free(line);
}
else if (get_res_nt(mykey, DHCPNAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
/* Try the interfaces */
else if (get_res_interfaces_nt(subkey, NAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
else if (get_res_interfaces_nt(subkey, DHCPNAMESERVER, &line))
{
status = config_nameserver(&servers, &nservers, line);
free(line);
}
RegCloseKey(subkey);
RegCloseKey(mykey);
}
}
else
{
if (RegOpenKeyEx(
HKEY_LOCAL_MACHINE, WIN_NS_9X, 0,
KEY_READ, &mykey
) == ERROR_SUCCESS)
{
if ((result = RegQueryValueEx(
mykey, NAMESERVER, NULL, &data_type,
NULL, &bytes
)
) == ERROR_SUCCESS ||
result == ERROR_MORE_DATA)
{
if (bytes)
{
line = (char *)malloc(bytes+1);
if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type,
(unsigned char *)line, &bytes) ==
ERROR_SUCCESS)
{
status = config_nameserver(&servers, &nservers, line);
}
free(line);
}
}
}
RegCloseKey(mykey);
}
if (status != ARES_EFILE) {
/*
if (status != ARES_EFILE)
{
/*
if (!channel->lookups) {
status = config_lookup(channel, "file bind");
status = config_lookup(channel, "file bind");
}
*/
status = ARES_EOF;
*/
status = ARES_EOF;
}
#elif defined(riscos)
@@ -418,44 +424,52 @@ DhcpNameServer
if (status == ARES_SUCCESS)
status = ARES_EOF;
free(resolvers);
}
#else
fp = fopen(PATH_RESOLV_CONF, "r");
if (!fp)
return (errno == ENOENT) ? ARES_SUCCESS : ARES_EFILE;
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
char *p;
FILE *fp;
int linesize;
fp = fopen(PATH_RESOLV_CONF, "r");
if (!fp)
return (errno == ENOENT) ? ARES_SUCCESS : ARES_EFILE;
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
{
if ((p = try_config(line, "domain")) && channel->ndomains == -1)
status = config_domain(channel, p);
if ((p = try_config(line, "domain")))
status = config_domain(channel, p);
else if ((p = try_config(line, "lookup")) && !channel->lookups)
status = config_lookup(channel, p);
else if ((p = try_config(line, "search")) && channel->ndomains == -1)
status = set_search(channel, p);
status = config_lookup(channel, p);
else if ((p = try_config(line, "search")))
status = set_search(channel, p);
else if ((p = try_config(line, "nameserver")) && channel->nservers == -1)
status = config_nameserver(&servers, &nservers, p);
status = config_nameserver(&servers, &nservers, p);
else if ((p = try_config(line, "sortlist")) && channel->nsort == -1)
status = config_sortlist(&sortlist, &nsort, p);
status = config_sortlist(&sortlist, &nsort, p);
else if ((p = try_config(line, "options")))
status = set_options(channel, p);
status = set_options(channel, p);
else
status = ARES_SUCCESS;
status = ARES_SUCCESS;
if (status != ARES_SUCCESS)
break;
break;
}
free(line);
fclose(fp);
if(line)
free(line);
fclose(fp);
}
#endif
/* Handle errors. */
if (status != ARES_EOF)
{
if (servers != NULL) free(servers);
if (sortlist != NULL) free(sortlist);
if (servers != NULL)
free(servers);
if (sortlist != NULL)
free(sortlist);
return status;
}
@@ -581,11 +595,52 @@ static int config_lookup(ares_channel channel, const char *str)
}
static int config_nameserver(struct server_state **servers, int *nservers,
const char *str)
char *str)
{
struct in_addr addr;
struct server_state *newserv;
/* On Windows, there may be more than one nameserver specified in the same
* registry key, so we parse it as a space or comma seperated list.
*/
#ifdef WIN32
char *p = str;
char *begin = str;
int more = 1;
while (more)
{
more = 0;
while (*p && !isspace(*p) && *p != ',')
p++;
if (*p)
{
*p = 0;
more = 1;
}
/* Skip multiple spaces or trailing spaces */
if (!*begin)
{
begin = ++p;
continue;
}
/* This is the part that actually sets the nameserver */
addr.s_addr = inet_addr(begin);
if (addr.s_addr == INADDR_NONE)
continue;
newserv = realloc(*servers, (*nservers + 1) * sizeof(struct server_state));
if (!newserv)
return ARES_ENOMEM;
newserv[*nservers].addr = addr;
*servers = newserv;
(*nservers)++;
if (!more)
break;
begin = ++p;
}
#else
/* Add a nameserver entry, if this is a valid address. */
addr.s_addr = inet_addr(str);
if (addr.s_addr == INADDR_NONE)
@@ -596,6 +651,7 @@ static int config_nameserver(struct server_state **servers, int *nservers,
newserv[*nservers].addr = addr;
*servers = newserv;
(*nservers)++;
#endif
return ARES_SUCCESS;
}
@@ -611,7 +667,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
q = str;
while (*q && *q != '/' && *q != ';' && !isspace((unsigned char)*q))
q++;
if (ip_addr(str, q - str, &pat.addr) == 0)
if (ip_addr(str, (int)(q - str), &pat.addr) == 0)
{
/* We have a pattern address; now determine the mask. */
if (*q == '/')
@@ -619,7 +675,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
str = q + 1;
while (*q && *q != ';' && !isspace((unsigned char)*q))
q++;
if (ip_addr(str, q - str, &pat.mask) != 0)
if (ip_addr(str, (int)(q - str), &pat.mask) != 0)
natural_mask(&pat);
}
else
@@ -651,6 +707,14 @@ static int set_search(ares_channel channel, const char *str)
int n;
const char *p, *q;
if(channel->ndomains != -1) {
/* if we already have some domains present, free them first */
for(n=0; n < channel->ndomains; n++)
free(channel->domains[n]);
free(channel->domains);
channel->ndomains = -1;
}
/* Count the domains given. */
n = 0;
p = str;
@@ -718,9 +782,9 @@ static int set_options(ares_channel channel, const char *str)
return ARES_SUCCESS;
}
static char *try_config(char *s, char *opt)
static char *try_config(char *s, const char *opt)
{
int len;
size_t len;
len = strlen(opt);
if (strncmp(s, opt, len) != 0 || !isspace((unsigned char)s[len]))
@@ -733,10 +797,8 @@ static char *try_config(char *s, char *opt)
static const char *try_option(const char *p, const char *q, const char *opt)
{
int len;
len = strlen(opt);
return (q - p > len && strncmp(p, opt, len) == 0) ? p + len : NULL;
size_t len = strlen(opt);
return ((size_t)(q - p) > len && !strncmp(p, opt, len)) ? &p[len] : NULL;
}
static int ip_addr(const char *s, int len, struct in_addr *addr)

View File

@@ -21,11 +21,9 @@ ares_mkquery \- Compose a single-question DNS query buffer
.nf
.B #include <ares.h>
.PP
.B
int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP,
.B
unsigned short \fIid\fP, int \fIrd\fP, char **\fIbuf\fP,
int *\fIbuflen\fP)
.B int ares_mkquery(const char *\fIname\fP, int \fIdnsclass\fP, int \fItype\fP,
.B unsigned short \fIid\fP, int \fIrd\fP, char **\fIbuf\fP,
.B int *\fIbuflen\fP)
.fi
.SH DESCRIPTION
The
@@ -52,8 +50,7 @@ stored in the variable pointed to by
and the length of which will be stored in the variable pointed to by
.IR buflen .
It is the caller's responsibility to free this buffer using
.B ares_free_string
when it is no longer needed.
\fIares_free_string(3)\fP when it is no longer needed.
.SH RETURN VALUES
.B ares_mkquery
can return any of the following values:

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

View File

@@ -21,9 +21,8 @@ ares_parse_a_reply \- Parse a reply to a DNS query of type A into a hostent
.nf
.B #include <ares.h>
.PP
.B
int ares_parse_a_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
.B struct hostent **\fIhost\fB);
.B int ares_parse_a_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
.B struct hostent **\fIhost\fP);
.fi
.SH DESCRIPTION
The

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -37,8 +35,9 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
struct hostent **host)
{
unsigned int qdcount, ancount;
int status, i, len, rr_type, rr_class, rr_len, naddrs;
int status, i, rr_type, rr_class, rr_len, naddrs;
int naliases;
long len;
const unsigned char *aptr;
char *hostname, *rr_name, *rr_data, **aliases;
struct in_addr *addrs;
@@ -87,7 +86,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
naliases = 0;
/* Examine each answer resource record (RR) in turn. */
for (i = 0; i < ancount; i++)
for (i = 0; i < (int)ancount; i++)
{
/* Decode the RR up to the data field. */
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);

View File

@@ -21,11 +21,9 @@ ares_parse_ptr_reply \- Parse a reply to a DNS query of type PTR into a hostent
.nf
.B #include <ares.h>
.PP
.B
int ares_parse_ptr_reply(const unsigned char *\fIabuf\fB, int \fIalen\fB,
.B
const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP,
.B struct hostent **\fIhost\fB);
.B int ares_parse_ptr_reply(const unsigned char *\fIabuf\fP, int \fIalen\fP,
.B const void *\fIaddr\fP, int \fIaddrlen\fP, int \fIfamily\fP,
.B struct hostent **\fIhost\fP);
.fi
.SH DESCRIPTION
The

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -36,7 +34,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
int addrlen, int family, struct hostent **host)
{
unsigned int qdcount, ancount;
int status, i, len, rr_type, rr_class, rr_len;
int status, i, rr_type, rr_class, rr_len;
long len;
const unsigned char *aptr;
char *ptrname, *hostname, *rr_name, *rr_data;
struct hostent *hostent;
@@ -68,7 +67,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
/* Examine each answer resource record (RR) in turn. */
hostname = NULL;
for (i = 0; i < ancount; i++)
for (i = 0; i < (int)ancount; i++)
{
/* Decode the RR up to the data field. */
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);

View File

@@ -56,8 +56,8 @@
struct send_request {
/* Remaining data to send */
const char *data;
int len;
const unsigned char *data;
size_t len;
/* Next request in queue */
struct send_request *next;
@@ -88,11 +88,11 @@ struct query {
time_t timeout;
/* Query buf with length at beginning, for TCP transmission */
char *tcpbuf;
unsigned char *tcpbuf;
int tcplen;
/* Arguments passed to ares_send() (qbuf points into tcpbuf) */
const char *qbuf;
const unsigned char *qbuf;
int qlen;
ares_callback callback;
void *arg;
@@ -143,3 +143,11 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now);
void ares__close_sockets(struct server_state *server);
int ares__get_hostent(FILE *fp, struct hostent **host);
int ares__read_line(FILE *fp, char **buf, int *bufsize);
#ifdef CURLDEBUG
/* This is low-level hard-hacking memory leak tracking and similar. Using the
libcurl lowlevel code from within library is ugly and only works when
c-ares is built and linked with a similarly debug-build libcurl, but we do
this anyway for convenience. */
#include "../lib/memdebug.h"
#endif

View File

@@ -35,13 +35,10 @@ The file descriptor sets pointed to by
and
.I write_fds
should have file descriptors set in them according to whether the file
descriptors specified by
.BR ares_fds (3)
are ready for reading and writing. (The easiest way to determine this
information is to invoke
descriptors specified by \fIares_fds(3)\fP are ready for reading and writing.
(The easiest way to determine this information is to invoke
.B select
with a timeout no greater than the timeout given by
.BR ares_timeout (3)).
with a timeout no greater than the timeout given by \fIares_timeout(3)\fP ).
.PP
The
.B ares_process

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32
@@ -121,7 +119,7 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
while (count)
{
sendreq = server->qhead;
if (count >= sendreq->len)
if ((size_t)count >= sendreq->len)
{
count -= sendreq->len;
server->qhead = sendreq->next;
@@ -152,7 +150,7 @@ static void write_tcp_data(ares_channel channel, fd_set *write_fds, time_t now)
}
/* Advance the send queue by as many bytes as we sent. */
if (count == sendreq->len)
if ((size_t)count == sendreq->len)
{
server->qhead = sendreq->next;
if (server->qhead == NULL)
@@ -451,7 +449,7 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now)
static int open_tcp_socket(ares_channel channel, struct server_state *server)
{
int s, flags;
struct sockaddr_in sin;
struct sockaddr_in sockin;
/* Acquire a socket. */
s = socket(AF_INET, SOCK_STREAM, 0);
@@ -464,12 +462,14 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
flags = 1;
ioctlsocket(s, FIONBIO, &flags);
#else
if (fcntl(s, F_GETFL, &flags) == -1)
flags = fcntl(s, F_GETFL, 0);
if (flags == -1)
{
close(s);
return -1;
}
flags &= O_NONBLOCK;
flags |= O_NONBLOCK;
if (fcntl(s, F_SETFL, flags) == -1)
{
close(s);
@@ -478,11 +478,11 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
#endif
/* Connect to the server. */
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr = server->addr;
sin.sin_port = channel->tcp_port;
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) == -1
memset(&sockin, 0, sizeof(sockin));
sockin.sin_family = AF_INET;
sockin.sin_addr = server->addr;
sockin.sin_port = channel->tcp_port;
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1
&& errno != EINPROGRESS)
{
closesocket(s);
@@ -496,7 +496,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
static int open_udp_socket(ares_channel channel, struct server_state *server)
{
int s;
struct sockaddr_in sin;
struct sockaddr_in sockin;
/* Acquire a socket. */
s = socket(AF_INET, SOCK_DGRAM, 0);
@@ -504,11 +504,11 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
return -1;
/* Connect to the server. */
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr = server->addr;
sin.sin_port = channel->udp_port;
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) == -1)
memset(&sockin, 0, sizeof(sockin));
sockin.sin_family = AF_INET;
sockin.sin_addr = server->addr;
sockin.sin_port = channel->udp_port;
if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1)
{
closesocket(s);
return -1;
@@ -525,7 +525,7 @@ static int same_questions(const unsigned char *qbuf, int qlen,
const unsigned char *p;
int qdcount;
char *name;
int namelen;
long namelen;
int type;
int dnsclass;
} q, a;

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -126,7 +124,12 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
free(s);
}
else
{
/* failed, free the malloc()ed memory */
free(squery->name);
free(squery);
callback(arg, status, NULL, 0);
}
}
}
@@ -185,7 +188,8 @@ static void end_squery(struct search_query *squery, int status,
/* Concatenate two domains. */
static int cat_domain(const char *name, const char *domain, char **s)
{
int nlen = strlen(name), dlen = strlen(domain);
size_t nlen = strlen(name);
size_t dlen = strlen(domain);
*s = malloc(nlen + 1 + dlen + 1);
if (!*s)
@@ -203,7 +207,7 @@ static int cat_domain(const char *name, const char *domain, char **s)
*/
static int single_domain(ares_channel channel, const char *name, char **s)
{
int len = strlen(name);
size_t len = strlen(name);
const char *hostaliases;
FILE *fp;
char *line = NULL;

View File

@@ -24,8 +24,7 @@ ares_send \- Initiate a DNS query
.B typedef void (*ares_callback)(void *\fIarg\fP, int \fIstatus\fP,
.B unsigned char *\fIabuf\fP, int \fIalen\fP)
.PP
.B
void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP,
.B void ares_send(ares_channel \fIchannel\fP, const unsigned char *\fIqbuf\fP,
.B int \fIqlen\fP, ares_callback \fIcallback\fP, void *\fIarg\fP)
.fi
.SH DESCRIPTION

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

View File

@@ -21,23 +21,16 @@ ares_strerror \- Get the description of an ares library error code
.nf
.B #include <ares.h>
.PP
.B const char *ares_strerror(int \fIcode\fP, char **\fImemptr\fP)
.B const char *ares_strerror(int \fIcode\fP)
.fi
.SH DESCRIPTION
The
.B ares_strerror
function gets the description of the ares library error code
.IR code ,
returning the result as a NUL-terminated C string. A pointer to
allocated data necessary to compose the error description may be
stored in the variable pointed to by
.IR memptr .
It is the caller's responsibility to invoke
.BR ares_free_errmem (3)
with the value of that variable when the error description is no
longer needed.
.SH SEE ALSO
.BR ares_free_errmem (3)
returning the result as a NUL-terminated C string.
.SH NOTES
This function is not compatible with ares.
.SH AUTHOR
Greg Hudson, MIT Information Systems
.br

View File

@@ -13,16 +13,12 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <assert.h>
#include "ares.h"
const char *ares_strerror(int code, char **memptr)
const char *ares_strerror(int code)
{
/* A future implementation may want to handle internationalization.
* For now, just return a string literal from a table.
*/
/* Return a string literal from a table. */
const char *errtext[] = {
"Successful completion",
"DNS server returned answer with no data",
@@ -39,9 +35,11 @@ const char *ares_strerror(int code, char **memptr)
"Timeout while contacting DNS servers",
"End of file",
"Error reading file",
"Out of memory"
"Out of memory",
"Channel is being destroyed",
"Misformatted string"
};
assert(code >= 0 && code < (sizeof(errtext) / sizeof(*errtext)));
assert(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)));
return errtext[code];
}

View File

@@ -27,10 +27,8 @@ ares_fds \- Get file descriptors to select on for name service
.SH DESCRIPTION
The
.B ares_timeout
function determines the maximum time for which the caller should wait
before invoking
.BR ares_process (3)
to process timeouts. The parameter
function determines the maximum time for which the caller should wait before
invoking \fIares_process(3)\fP to process timeouts. The parameter
.I maxtv
specifies a existing maximum timeout, or
.B NULL

View File

@@ -13,8 +13,6 @@
* without express or implied warranty.
*/
static const char rcsid[] = "$Id$";
#include <sys/types.h>
#ifdef WIN32

41
ares/ares_version.3 Normal file
View File

@@ -0,0 +1,41 @@
.\" $Id$
.\"
.\" Copyright 2004 by Daniel Stenberg
.\"
.\" 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_VERSION 3 "29 January 2004"
.SH NAME
ares_version \- Get the version number of the library
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B const char *ares_version(int *\fIversion\fP)
.fi
.SH DESCRIPTION
The
.B ares_version
function gets the library version as a string and optionally as an integer
stored in the
.IR version ,
argument. If you pass a NULL, no integer is attempted to be returned.
The integer is built up as 24bit number, with 8 separate bits used for major
number, minor number and patch number. This makes a version string such as
1.2.3 will be returned as the hexadecimal number 0x010203 (decimal 66051).
.SH NOTES
This function is not compatible with ares.
.SH AUTHOR
Daniel Stenberg

View File

@@ -2,7 +2,7 @@
#include "ares_version.h"
char *ares_version(int *version)
const char *ares_version(int *version)
{
if(version)
*version = ARES_VERSION;

View File

@@ -4,14 +4,14 @@
#define ARES__VERSION_H
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 0
#define ARES_VERSION_MINOR 2
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.0.0"
#define ARES_VERSION_STR "1.2.0"
char *ares_version(int *version);
const char *ares_version(int *version);
#endif

4
ares/buildconf Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
aclocal
autoconf

56
ares/configure.ac Normal file
View File

@@ -0,0 +1,56 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ares_init.c)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CANONICAL_HOST
case $host_os in
solaris*)
AC_DEFINE(ETC_INET)
;;
esac
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket)
dnl ************************************************************
dnl Option to switch on debug options. This makes an assumption that
dnl this is built as an 'ares' subdir in the curl source tree. Subject for
dnl improval in the future!
dnl
AC_MSG_CHECKING([whether to enable debug options])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[Enable pedantic debug options])
AC_HELP_STRING([--disable-debug],[Disable debug options]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
dnl Checks for standard header files, to make memdebug.h inclusions bettter
AC_HEADER_STDC
CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I../include"
CFLAGS="$CFLAGS -g"
dnl set compiler "debug" options to become more picky, and remove
dnl optimize options from CFLAGS
CURL_CC_DEBUG_OPTS
;;
esac ],
AC_MSG_RESULT(no)
)
dnl check for a few basic system headers we need
dnl AC_CHECK_HEADERS(
dnl sys/types.h \
dnl sys/time.h \
dnl sys/select.h \
dnl sys/socket.h \
dnl )
AC_OUTPUT(Makefile)

View File

@@ -1,18 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ares_init.c)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CANONICAL_HOST
case $host_os in
solaris*)
AC_DEFINE(ETC_INET)
;;
esac
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socket, socket)
AC_OUTPUT(Makefile)

View File

@@ -2,6 +2,8 @@
$version = $ARGV[0];
$name="c-ares";
if($version eq "") {
print "Enter version number!\n";
exit;
@@ -81,13 +83,18 @@ sub mkalldir {
}
for(@entries) {
my $dir = dirpart("arescurl-$version/$_");
my $dir = dirpart("$name-$version/$_");
# print "Create $dir\n";
mkalldir($dir);
# print "Copy $_ to $dir\n";
`cp -p $_ $dir`;
}
`tar -cf arescurl-$version.tar arescurl-$version`;
`gzip -9 arescurl-$version.tar`;
`rm -rf arescurl-$version`;
# make a tarball
`tar -cf $name-$version.tar $name-$version`;
# gzip the tarball
`gzip -9 $name-$version.tar`;
# remove the dir
`rm -rf $name-$version`;
print "NOTE: now cvs tag this release!\n";

View File

@@ -1,7 +1,11 @@
#ifndef ARES_NAMESER_H
#define ARES_NAMESER_H
/* Windows-only header file provided by liren@vivisimo.com to make his Windows
port build */
#include <windows.h>
#include <process.h> /* for the _getpid() proto */
#include <sys/types.h>
#define MAXHOSTNAMELEN 256
@@ -17,8 +21,10 @@ struct iovec
#define getpid() _getpid()
int strcasecmp(const char *a, const char *b);
int gettimeofday(struct timeval *tv, struct timezone *tz);
struct timezone { int dummy; };
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)
#define NS_CMPRSFLGS 0xc0
@@ -35,7 +41,7 @@ typedef enum __ns_class {
/* Query class values which do not appear in resource records */
ns_c_none = 254, /* for prereq. sections in update requests */
ns_c_any = 255, /* Wildcard match. */
ns_c_max = 65536
ns_c_max = 65536
} ns_class;
#define C_IN ns_c_in
@@ -113,7 +119,7 @@ typedef enum __ns_opcode {
/* Opcode 3 is undefined/reserved. */
ns_o_notify = 4, /* Zone change notification. */
ns_o_update = 5, /* Zone update message. */
ns_o_max = 6
ns_o_max = 6
} ns_opcode;
#define QUERY ns_o_query
@@ -147,17 +153,18 @@ typedef enum __ns_rcode {
/* The following are TSIG extended errors */
ns_r_badsig = 16,
ns_r_badkey = 17,
ns_r_badtime = 18
ns_r_badtime = 18
} ns_rcode;
#define SERVFAIL ns_r_servfail
#define NOTIMP ns_r_notimpl
#define REFUSED ns_r_refused
#define NOERROR ns_r_noerror
#define FORMERR ns_r_formerr
#define NXDOMAIN ns_r_nxdomain
#define SERVFAIL ns_r_servfail
#define NOTIMP ns_r_notimpl
#define REFUSED ns_r_refused
#undef NOERROR /* it seems this is already defined in winerror.h */
#define NOERROR ns_r_noerror
#define FORMERR ns_r_formerr
#define NXDOMAIN ns_r_nxdomain
#define C_CHAOS ns_c_chaos
#define C_CHAOS ns_c_chaos
#define C_HS ns_c_hs
#define C_NONE ns_c_none
#define C_ANY ns_c_any
@@ -203,3 +210,17 @@ typedef enum __ns_rcode {
#define T_MAILB ns_t_mailb
#define T_MAILA ns_t_maila
#define T_ANY ns_t_any
#ifndef __MINGW32__
/* protos for the functions we provide in windows_port.c */
int ares_strncasecmp(const char *s1, const char *s2, size_t n);
int ares_strcasecmp(const char *s1, const char *s2);
/* use this define magic to prevent us from adding symbol names to the library
that is a high-risk to collide with another libraries' attempts to do the
same */
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
#define strcasecmp(a,b) ares_strcasecmp(a,b)
#endif
#endif /* ARES_NAMESER_H */

Binary file not shown.

Binary file not shown.

View File

@@ -5,8 +5,9 @@
#include "nameser.h"
#ifndef __MINGW32__
int
strncasecmp(const char *a, const char *b, size_t n)
ares_strncasecmp(const char *a, const char *b, size_t n)
{
size_t i;
@@ -19,13 +20,14 @@ strncasecmp(const char *a, const char *b, size_t n)
}
int
strcasecmp(const char *a, const char *b)
ares_strcasecmp(const char *a, const char *b)
{
return strncasecmp(a, b, strlen(a)+1);
}
#endif
int
gettimeofday(struct timeval *tv, struct timezone *tz)
ares_gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
LARGE_INTEGER li;

View File

@@ -1,69 +0,0 @@
$!
$
$ on control_y then goto Common_Exit!
$ orig = f$environment("DEFAULT")
$ loc = f$environment("PROCEDURE")
$ def = f$parse("X.X;1",loc) - "X.X;1"
$
$ set def 'def'
$ cc_qual = "/define=HAVE_CONFIG_H=1/include=(""../include/"",""../"",""../../openssl-0_9_7/include/"")"
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
$ if p1 .eqs. "DEBUG" then cc_qual = cc_qual + "/LIST/MACHINE/DEBUG"
$ msg_qual = ""
$ call build "[.lib]" "*.c"
$ call build "[.src]" "*.c"
$ call build "[.src]" "*.msg"
$ link /exe=curl.exe [.src]curl/lib/include=main,[.lib]curl/lib, -
[-.openssl-0_9_7.axp.exe.ssl]libssl/lib, -
[-.openssl-0_9_7.axp.exe.crypto]libcrypto/lib
$
$
$ goto Common_Exit
$build: subroutine
$ set noon
$ set default 'p1'
$ search = p2
$ reset = f$search("reset")
$ if f$search("CURL.OLB") .eqs. ""
$ then
$ LIB/CREATE/OBJECT CURL.OLB
$ endif
$ reset = f$search("reset",1)
$Loop:
$ file = f$search(search,1)
$ if file .eqs. "" then goto EndLoop
$ obj = f$search(f$parse(".OBJ;",file),2)
$ if (obj .nes. "")
$ then
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
$ then
$ call compile 'file'
$ lib/object curl.OLB 'f$parse(".obj;",file)'
$ else
$! write sys$output "File: ''file' is up to date"
$ endif
$ else
$! write sys$output "Object for file: ''file' does not exist"
$ call compile 'file'
$ lib/object curl.OLB 'f$parse(".obj;",file)'
$ endif
$ goto Loop
$EndLoop:
$ purge
$ set def 'def'
$ endsubroutine ! Build
$
$compile: subroutine
$ set noon
$ file = p1
$ qual = p2+p3+p4+p5+p6+p7+p8
$ typ = f$parse(file,,,"TYPE") - "."
$ cmd_c = "CC "+cc_qual
$ cmd_msg = "MESSAGE "+msg_qual
$ x = cmd_'typ'
$ 'x' 'file'
$ ENDSUBROUTINE ! Compile
$
$Common_Exit:
$ set default 'orig'
$ exit

View File

@@ -5,6 +5,21 @@ die(){
exit
}
# this works as 'which' but we use a different name to make it more obvious we
# aren't using 'which'! ;-)
findtool(){
file="$1"
IFS=":"
for path in $PATH
do
if test -r "$path/$file"; then
echo "$path/$file"
return
fi
done
}
#--------------------------------------------------------------------------
# autoconf 2.57 or newer
#
@@ -52,7 +67,7 @@ echo "buildconf: autoheader version $ah_version (ok)"
# automake 1.7 or newer
#
need_automake="1.7"
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
if test -z "$am_version"; then
echo "buildconf: automake not found."
echo " You need automake version $need_automake or newer installed."
@@ -63,7 +78,7 @@ if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
echo "buildconf: automake version $am_version found."
echo " You need automake version $need_automake or newer installed."
echo " If you have a sufficient automake installed, but it"
echo " is not named 'autommake', then try setting the"
echo " is not named 'automake', then try setting the"
echo " AUTOMAKE environment variable."
exit 1
fi
@@ -79,11 +94,13 @@ LIBTOOL_WANTED_MINOR=4
LIBTOOL_WANTED_PATCH=2
LIBTOOL_WANTED_VERSION=1.4.2
libtool=`which glibtool 2>/dev/null`
# this approach that tries 'glibtool' first is some kind of work-around for
# some BSD-systems I believe that use to provide the GNU libtool named
# glibtool, with 'libtool' being something completely different.
libtool=`findtool glibtool 2>/dev/null`
if test ! -x "$libtool"; then
libtool=`which libtool`
libtool=`findtool libtool`
fi
#lt_pversion=`${LIBTOOL:-$libtool} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
lt_pversion=`$libtool --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
if test -z "$lt_pversion"; then
echo "buildconf: libtool not found."
@@ -121,26 +138,46 @@ fi
echo "buildconf: libtool version $lt_version (ok)"
#--------------------------------------------------------------------------
# m4 check
#
m4=`${M4:-m4} --version 2>/dev/null|head -1`;
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
echo "buildconf: GNU m4 version $m4_version (ok)"
else
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
exit 1
fi
# ------------------------------------------------------------
# run the correct scripts now
echo "buildconf: running libtoolize"
${LIBTOOLIZE:-libtoolize} --copy --automake || die "The command '${LIBTOOLIZE:-libtoolize} --copy --automake' failed"
${LIBTOOLIZE:-libtoolize} --copy --automake --force || die "The libtool command failed"
echo "buildconf: running aclocal"
${ACLOCAL:-aclocal} || die "The command '${AUTOHEADER:-aclocal}' failed"
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed"
echo "buildconf: running aclocal hack to convert all mv to mv -f"
perl -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
echo "buildconf: running autoheader"
${AUTOHEADER:-autoheader} || die "The command '${AUTOHEADER:-autoheader}' failed"
${AUTOHEADER:-autoheader} || die "The autoheader command failed"
echo "buildconf: running autoconf"
${AUTOCONF:-autoconf} || die "The command '${AUTOCONF:-autoconf}' failed"
${AUTOCONF:-autoconf} || die "The autoconf command failed"
if test -d ares; then
echo "buildconf: running autoconf in the ares directory"
cd ares
${AUTOCONF:-autoconf} || die "The command '${AUTOCONF:-autoconf}' failed"
echo "buildconf: running aclocal in the ares directory"
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The ares aclocal command failed"
echo "buildconf: running autoconf in the ares directory"
${AUTOCONF:-autoconf} || die "The ares autoconf command failed"
cd ..
fi
echo "buildconf: running automake"
${AUTOMAKE:-automake} -a || die "The command '${AUTOMAKE:-automake} -a' failed"
${AUTOMAKE:-automake} -a || die "The automake command failed"
echo "buildconf: OK"
exit 0

17
buildconf.bat Normal file
View File

@@ -0,0 +1,17 @@
@echo off
REM set up a CVS tree to build when there's no autotools
REM $Revision$
REM $Date$
REM create ca-bundle.h
echo /* This file is generated automatically */ >lib\ca-bundle.h
echo #define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") >>lib\ca-bundle.h
REM create getdate.c
copy lib\getdate.c.cvs lib\getdate.c
REM create hugehelp.c
copy src\hugehelp.c.cvs src\hugehelp.c
REM create Makefile
copy Makefile.dist Makefile

View File

@@ -7,7 +7,7 @@ dnl We don't know the version number "staticly" so we use a dash here
AC_INIT(curl, [-], [curl-bug@haxx.se])
dnl configure script copyright
AC_COPYRIGHT([Copyright (c) 1998 - 2003 Daniel Stenberg, <daniel@haxx.se>
AC_COPYRIGHT([Copyright (c) 1998 - 2004 Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
@@ -16,22 +16,34 @@ AM_CONFIG_HEADER(lib/config.h src/config.h)
AM_MAINTAINER_MODE
dnl SED is needed by some of the tools
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure,
$PATH:/usr/bin:/usr/local/bin)
AC_SUBST(SED)
if test "x$SED" = "xsed-was-not-found-by-configure"; then
AC_MSG_WARN([sed was not found, this may ruin your chances to build fine])
fi
dnl AR is used by libtool, and try the odd Solaris path too
AC_PATH_PROG( AR, ar, , $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
dnl we use AC_CHECK_TOOL since this should make a library for the target
dnl platform
AC_CHECK_TOOL(AR, ar,
ar-was-not-found-by-configure,
$PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
AC_SUBST(AR)
if test "x$AR" = "xar-was-not-found-by-configure"; then
AC_MSG_WARN([ar was not found, this may ruin your chances to build fine])
fi
dnl figure out the libcurl version
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
AM_INIT_AUTOMAKE(curl,$VERSION)
AC_MSG_CHECKING([curl version])
AC_MSG_RESULT($VERSION)
dnl
dnl we extract the numerical version for curl-config only
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h`
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
AC_SUBST(VERSIONNUM)
dnl Solaris pkgadd support definitions
@@ -42,6 +54,17 @@ AC_SUBST(PKGADD_PKG)
AC_SUBST(PKGADD_NAME)
AC_SUBST(PKGADD_VENDOR)
dnl
dnl initialize all the info variables to 'no'
curl_ssl_msg="no (--with-ssl)"
curl_zlib_msg="no (--with-zlib)"
curl_krb4_msg="no (--with-krb4*)"
curl_gss_msg="no (--with-gssapi)"
curl_spnego_msg="no (--with-spnego)"
curl_ares_msg="no (--enable-ares)"
curl_ipv6_msg="no (--enable-ipv6)"
curl_idn_msg="no (--with-libidn)"
curl_manual_msg="no (--enable-manual)"
dnl
dnl Detect the canonical host and target build environment
@@ -208,37 +231,92 @@ AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
AC_MSG_RESULT(yes)
)
dnl **********************************************************************
dnl Check for built-in manual
dnl **********************************************************************
AC_MSG_CHECKING([whether to provide built-in manual])
AC_ARG_ENABLE(manual,
AC_HELP_STRING([--enable-manual],[Enable built-in manual])
AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
USE_MANUAL="1"
;;
esac ],
AC_MSG_RESULT(yes)
USE_MANUAL="1"
)
dnl The actual use of the USE_MANUAL variable is done much later in this
dnl script to allow other actions to disable it as well.
dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
dnl gethostbyname in the nsl lib?
AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(nsl, gethostbyname) ])
dnl gethostbyname without lib or in the nsl lib?
AC_CHECK_FUNC(gethostbyname,
[HAVE_GETHOSTBYNAME="1"
],
[ AC_CHECK_LIB(nsl, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
LIBS="$LIBS -lnsl"
])
])
if test "$ac_cv_lib_nsl_gethostbyname" != "yes" -a "$ac_cv_func_gethostbyname" != "yes"; then
if test "$HAVE_GETHOSTBYNAME" != "1"
then
dnl gethostbyname in the socket lib?
AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(socket, gethostbyname) ])
AC_CHECK_LIB(socket, gethostbyname,
[HAVE_GETHOSTBYNAME="1"
LIBS="$LIBS -lsocket"
])
fi
dnl At least one system has been identified to require BOTH nsl and
dnl socket libs to link properly.
if test "$ac_cv_lib_nsl_gethostbyname" != "yes" -a "$ac_cv_lib_socket_gethostbyname" != "yes" -a "$ac_cv_func_gethostbyname" != "yes"; then
AC_MSG_CHECKING([trying both nsl and socket libs])
dnl At least one system has been identified to require BOTH nsl and socket
dnl libs at the same time to link properly.
if test "$HAVE_GETHOSTBYNAME" != "1"
then
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
my_ac_save_LIBS=$LIBS
LIBS="-lnsl -lsocket $LIBS"
AC_TRY_LINK( ,
[gethostbyname();],
my_ac_link_result=success,
my_ac_link_result=failure )
[ dnl found it!
HAVE_GETHOSTBYNAME="1",
AC_MSG_RESULT([yes])],
[ dnl failed!
AC_MSG_RESULT([no])
dnl restore LIBS
LIBS=$my_ac_save_LIBS]
)
fi
if test "$my_ac_link_result" = "failure"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
dnl restore LIBS
LIBS=$my_ac_save_LIBS
else
AC_MSG_RESULT([yes])
fi
if test "$HAVE_GETHOSTBYNAME" != "1"
then
dnl This is for Msys/Mingw
AC_MSG_CHECKING([for gethostbyname in ws2_32])
my_ac_save_LIBS=$LIBS
LIBS="-lws2_32 $LIBS"
AC_TRY_LINK([#include <winsock2.h>],
[gethostbyname("www.dummysite.com");],
[ dnl worked!
AC_MSG_RESULT([yes])
HAVE_GETHOSTBYNAME="1"],
[ dnl failed, restore LIBS
LIBS=$my_ac_save_LIBS
AC_MSG_RESULT(no)]
)
fi
if test "$HAVE_GETHOSTBYNAME" = "1"; then
AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname])
else
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
fi
dnl resolve lib?
@@ -271,6 +349,25 @@ AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
AC_MSG_RESULT(no)
)
dnl **********************************************************************
dnl Check for the presence of the winmm library.
dnl **********************************************************************
AC_MSG_CHECKING([for timeGetTime in winmm])
my_ac_save_LIBS=$LIBS
LIBS="-lwinmm $LIBS"
AC_TRY_LINK([#include <windef.h>
#include <mmsystem.h>
],
[timeGetTime();],
[ dnl worked!
AC_MSG_RESULT([yes])
],
[ dnl failed, restore LIBS
LIBS=$my_ac_save_LIBS
AC_MSG_RESULT(no)]
)
dnl **********************************************************************
dnl Checks for IPv6
dnl **********************************************************************
@@ -309,7 +406,11 @@ main()
))
if test "$ipv6" = "yes"; then
curl_ipv6_msg="enabled"
CURL_CHECK_WORKING_GETADDRINFO
CURL_CHECK_NI_WITHSCOPEID
fi
dnl **********************************************************************
@@ -365,18 +466,30 @@ dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
AC_MSG_CHECKING([if argv can be written to])
AC_CACHE_VAL(curl_cv_writable_argv, [
AC_RUN_IFELSE([[
int main(int argc, char ** argv) {
argv[0][0] = ' ';
return (argv[0][0] == ' ')?0:1;
}
]],
curl_cv_writable_argv=yes,
curl_cv_writable_argv=no,
curl_cv_writable_argv=cross)
])
case $curl_cv_writable_argv in
yes)
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(no),
AC_MSG_RESULT(yes)
;;
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(no)
AC_MSG_WARN([the previous check could not be made default was used])
)
;;
esac
dnl **********************************************************************
dnl Check for the presence of Kerberos4 libraries and headers
@@ -404,8 +517,8 @@ AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
OPT_KRB4="$withval"
if test X"$OPT_KRB4" != Xyes
then
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib"
KRB4LIB="$OPT_KRB4/lib"
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
KRB4LIB="$OPT_KRB4/lib$libsuff"
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
KRB4INC="$OPT_KRB4/include"
fi
@@ -454,13 +567,15 @@ then
AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
dnl add define KRB4
AC_DEFINE(KRB4, 1,
AC_DEFINE(HAVE_KRB4, 1,
[if you have the Kerberos4 libraries (including -ldes)])
dnl substitute it too!
KRB4_ENABLED=1
AC_SUBST(KRB4_ENABLED)
curl_krb4_msg="enabled"
dnl the krb4 stuff needs a strlcpy()
AC_CHECK_FUNCS(strlcpy)
@@ -482,15 +597,22 @@ AC_ARG_WITH(spnego,
)
AC_MSG_CHECKING([if SPNEGO support is requested])
if test x"$want_spnego" = xyes; then
if test -z "$SPNEGO_LIB_DIR"; then
LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT $(wl)-R$SPNEGO_ROOT -lfbopenssl"
if test X"$SPNEGO_ROOT" = Xyes; then
AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
AC_MSG_RESULT(no)
else
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
fi
if test -z "$SPNEGO_LIB_DIR"; then
LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
else
LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
fi
AC_DEFINE(HAVE_SPNEGO, 1, [Define this if you have the SPNEGO library fbopenssl])
AC_MSG_RESULT(yes)
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SPNEGO, 1,
[Define this if you have the SPNEGO library fbopenssl])
curl_spnego_msg="enabled"
fi
else
AC_MSG_RESULT(no)
fi
@@ -526,7 +648,7 @@ if test x"$want_gss" = xyes; then
if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
else
GSSAPI_INCS=="-I$GSSAPI_ROOT/include"
GSSAPI_INCS="-I$GSSAPI_ROOT/include"
fi
fi
CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
@@ -536,7 +658,7 @@ if test x"$want_gss" = xyes; then
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
LDFLAGS="$LDFLAGS $gss_ldflags"
else
LDFLAGS="$LDFLAGS $GSSAPI_ROOT/lib -lgssapi"
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
fi
else
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
@@ -545,6 +667,8 @@ if test x"$want_gss" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
curl_gss_msg="enabled"
if test -n "$GSSAPI_INCS"; then
# cut off the preceding -I from the include path
GSSAPI_INCS=`echo $GSSAPI_INCS | sed -e s/^-I//g`
@@ -560,33 +684,6 @@ else
AC_MSG_RESULT(no)
fi
dnl Detect the pkg-config tool, as it may have extra info about the
dnl openssl installation we can use. I *believe* this is what we are
dnl expected to do on really recent Redhat Linux hosts.
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test "$PKGCONFIG" != "no" ; then
AC_MSG_CHECKING([for OpenSSL options using pkg-config])
$PKGCONFIG --exists openssl
SSL_EXISTS=$?
if test "$SSL_EXISTS" -eq "0"; then
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
LIBS="$LIBS $SSL_LIBS"
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
@@ -602,14 +699,39 @@ AC_HELP_STRING([--without-ssl], [disable SSL]),
if test X"$OPT_SSL" = Xno
then
AC_MSG_WARN(SSL/https support disabled)
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more])
else
dnl Check for and handle argument to --with-ssl.
dnl save the pre-ssl check flags for a while
dnl backup the pre-ssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
dnl Detect the pkg-config tool, as it may have extra info about the openssl
dnl installation we can use. I *believe* this is what we are expected to do
dnl on really recent Redhat Linux hosts.
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test "$PKGCONFIG" != "no" ; then
AC_MSG_CHECKING([OpenSSL options with pkg-config])
$PKGCONFIG --exists openssl
SSL_EXISTS=$?
if test "$SSL_EXISTS" -eq "0"; then
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
dnl use the values pkg-config reported
LIBS="$LIBS $SSL_LIBS"
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([no])
fi
fi
case "$OPT_SSL" in
yes)
@@ -619,7 +741,7 @@ else
*)
dnl check the given spot right away!
EXTRA_SSL=$OPT_SSL
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib$libsuff"
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
;;
esac
@@ -627,14 +749,13 @@ else
AC_CHECK_LIB(crypto, CRYPTO_lock,[
HAVECRYPTO="yes"
],[
OLDLDFLAGS="$LDFLAGS"
OLDCPPFLAGS="$CPPFLAGS"
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib"
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
HAVECRYPTO="yes" ], [
LDFLAGS="$OLDLDFLAGS"
CPPFLAGS="$OLDCPPFLAGS"
LDFLAGS="$CLEANLDFLAGS"
CPPFLAGS="$CLEANCPPFLAGS"
LIBS="$CLEANLIBS"
])
])
@@ -643,6 +764,20 @@ else
dnl This is only reasonable to do if crypto actually is there: check for
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
dnl This is for Msys/Mingw
AC_MSG_CHECKING([for gdi32])
my_ac_save_LIBS=$LIBS
LIBS="-lgdi32 $LIBS"
AC_TRY_LINK([#include <windef.h>
#include <wingdi.h>],
[GdiFlush();],
[ dnl worked!
AC_MSG_RESULT([yes])],
[ dnl failed, restore LIBS
LIBS=$my_ac_save_LIBS
AC_MSG_RESULT(no)]
)
AC_CHECK_LIB(crypto, CRYPTO_add_lock)
AC_CHECK_LIB(ssl, SSL_connect)
@@ -665,10 +800,12 @@ else
dnl Check for SSLeay headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h,
curl_ssl_msg="enabled"
OPENSSL_ENABLED=1)
if test $ac_cv_header_openssl_x509_h = no; then
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
curl_ssl_msg="enabled"
OPENSSL_ENABLED=1)
fi
@@ -741,29 +878,98 @@ case "$OPT_ZLIB" in
dnl check for the lib first without setting any new path, since many
dnl people have it in the default path
AC_CHECK_LIB(z, inflateEnd, ,
AC_CHECK_LIB(z, inflateEnd,
dnl libz found, set the variable
[HAVE_LIBZ="1"],
dnl if no lib found, try to add the given library
[if test -d "$OPT_ZLIB"; then
CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib"
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
fi])
AC_CHECK_HEADER(zlib.h,[
AC_CHECK_LIB(z, gzread,
[HAVE_LIBZ="1"
AC_SUBST(HAVE_LIBZ)
LIBS="$LIBS -lz"
AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
AC_DEFINE(HAVE_LIBZ, 1, [If zlib is available])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags]
)
AC_CHECK_HEADER(zlib.h,
[
dnl zlib.h was found
HAVE_ZLIB_H="1"
dnl if the lib wasn't found already, try again with the new paths
if test "$HAVE_LIBZ" != "1"; then
AC_CHECK_LIB(z, gzread,
[
dnl the lib was found!
HAVE_LIBZ="1"
],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags])
fi
],
[
dnl zlib.h was not found, restore the flags
CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags]
)
if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
then
AC_MSG_WARN([configure found only the libz lib, not the header file!])
elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
then
AC_MSG_WARN([configure found only the libz header file, not the lib!])
elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
then
dnl both header and lib were found!
AC_SUBST(HAVE_LIBZ)
AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
LIBS="$LIBS -lz"
dnl replace 'HAVE_LIBZ' in the automake makefile.ams
AMFIXLIB="1"
AC_MSG_NOTICE([found both libz and libz.h header])
curl_zlib_msg="enabled"
fi
;;
esac
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(HAVE_LIBZ, test x"$HAVE_LIBZ" = x1)
AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
AC_MSG_CHECKING([whether to build with libidn])
AC_ARG_WITH(libidn,
AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
[LIBIDN="$withval"])
case "$LIBIDN" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
[
dnl if there was a given path, try it
nolibidn="true"
if test "x$LIBIDN" != "xyes"; then
nolibidn="" dnl reset to test again
oldLDFLAGS=$LDFLAGS
oldCPPFLAGS=$CPPFLAGS
LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
nolibidn="true"
LDFLAGS=$oldLDFLAGS
CPPFLAGS=$oldCPPFLAGS)
fi
])
if test "x$nolibidn" != "xtrue"; then
curl_idn_msg="enabled"
dnl different versions of libidn have different setups of these:
AC_CHECK_FUNCS( idn_free )
AC_CHECK_HEADERS( idn-free.h )
fi
;;
esac
dnl Default is to try the thread-safe versions of a few functions
OPT_THREAD=on
@@ -779,6 +985,7 @@ printf("just fine");
#endif
],
[ AC_MSG_RESULT([yes])
RECENTAIX=yes
OPT_THREAD=off ],
[ AC_MSG_RESULT([no]) ]
)
@@ -802,12 +1009,13 @@ then
AC_DEFINE(DISABLED_THREADSAFE, 1, \
Set to explicitly specify we don't want to use thread-safe functions)
else
if test "$ipv6" != "yes"; then
dnl dig around for gethostbyname_r()
CURL_CHECK_GETHOSTBYNAME_R()
dnl dig around for gethostbyname_r()
CURL_CHECK_GETHOSTBYNAME_R()
dnl dig around for gethostbyaddr_r()
CURL_CHECK_GETHOSTBYADDR_R()
dnl dig around for gethostbyaddr_r()
CURL_CHECK_GETHOSTBYADDR_R()
fi
dnl poke around for inet_ntoa_r()
CURL_CHECK_INET_NTOA_R()
@@ -815,10 +1023,31 @@ else
dnl is there a localtime_r()
CURL_CHECK_LOCALTIME_R()
AC_CHECK_FUNCS( gmtime_r )
dnl is there a strerror_r()
CURL_CHECK_STRERROR_R()
AC_CHECK_FUNCS( gmtime_r )
fi
dnl for recent AIX versions, we skip all the thread-safe checks above since
dnl they claim a thread-safe libc using the standard API. But there are
dnl some functions still not thread-safe. Check for these!
dnl Let's hope this split URL remains working:
dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
dnl genprogc/thread_quick_ref.htm
if test "x$RECENTAIX" = "xyes"; then
dnl is there a localtime_r()
CURL_CHECK_LOCALTIME_R()
dnl is there a strerror_r()
CURL_CHECK_STRERROR_R()
AC_CHECK_FUNCS( gmtime_r )
fi
dnl **********************************************************************
dnl Back to "normal" configuring
dnl **********************************************************************
@@ -833,12 +1062,16 @@ AC_CHECK_HEADERS(
sys/time.h \
sys/select.h \
sys/socket.h \
sys/ioctl.h \
assert.h \
unistd.h \
malloc.h \
stdlib.h \
limits.h \
arpa/inet.h \
net/if.h \
netinet/in.h \
netinet/tcp.h \
netdb.h \
sys/sockio.h \
sys/stat.h \
@@ -875,6 +1108,9 @@ dnl default includes
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
]
)
@@ -883,7 +1119,11 @@ AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_CHECK_SIZEOF(off_t)
AC_CHECK_SIZEOF(curl_off_t, ,[
#include <stdio.h>
#include "$srcdir/include/curl/curl.h"
])
AC_CHECK_SIZEOF(size_t)
AC_CHECK_TYPE(long long,
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])])
@@ -901,7 +1141,8 @@ dnl Checks for library functions.
dnl AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
dnl AC_FUNC_VPRINTF
AC_CHECK_FUNCS( socket \
AC_CHECK_FUNCS( strtoll \
socket \
select \
strdup \
strstr \
@@ -968,11 +1209,136 @@ AC_PATH_PROGS( NROFF, gnroff nroff, ,
$PATH:/usr/bin/:/usr/local/bin )
AC_SUBST(NROFF)
if test -n "$NROFF"; then
dnl only check for nroff options if an nroff command was found
AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
MANOPT="-man"
mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
if test -z "$mancheck"; then
MANOPT="-mandoc"
mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
if test -z "$mancheck"; then
MANOPT=""
AC_MSG_RESULT([failed])
AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
else
AC_MSG_RESULT([$MANOPT])
fi
else
AC_MSG_RESULT([$MANOPT])
fi
AC_SUBST(MANOPT)
fi
if test -z "$MANOPT"
then
dnl if no nroff tool was found, or no option that could convert man pages
dnl was found, then disable the built-in manual stuff
AC_MSG_WARN([disabling built-in manual])
USE_MANUAL="no";
fi
AC_PROG_YACC
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
dnl $PATH:/usr/bin/:/usr/local/bin )
dnl AC_SUBST(RANLIB)
if test -z "$YACC"
then
AC_MSG_CHECKING([if OK to build without bison/yacc])
dnl no yacc is a big deal if we have no pre-fixed getdate.y
if test -r "$srcdir/lib/getdate.c"
then
dnl all is well, we don't have to generate it!
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([no yacc or bison found, can't build libcurl!])
fi
fi
dnl *************************************************************************
dnl If the manual variable still is set, then we go with providing a built-in
dnl manual
if test "$USE_MANUAL" = "1"; then
AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
curl_manual_msg="enabled"
fi
dnl set variable for use in automakefile(s)
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
AC_MSG_CHECKING([whether to enable ares])
AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])
AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
if test "x$IPV6_ENABLED" = "x1"; then
AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares])
fi
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])
dnl substitute HAVE_ARES for curl-config and similar
HAVE_ARES="1"
AC_SUBST(HAVE_ARES)
curl_ares_msg="enabled"
LIBS="$LIBS -lcares"
dnl For backwards compatibility default to includes/lib in srcdir/ares
dnl If a value is specified it is assumed that the libs are in $val/lib
dnl and the includes are in $val/include. This is the default setup for
dnl ares so it should not be a problem.
if test "x$enableval" = "xyes" ; then
if test -d "$srcdir/ares"; then
aresembedded="yes"
AC_CONFIG_SUBDIRS(ares)
aresinc=`cd $srcdir/ares && pwd`
CPPFLAGS="$CPPFLAGS -I$aresinc"
dnl the pwd= below cannot 'cd' into the ares dir to get the full
dnl path to it, since it may not exist yet if we build outside of
dnl the source tree
pwd=`pwd`
LDFLAGS="$LDFLAGS -L$pwd/ares"
fi
else
CPPFLAGS="$CPPFLAGS -I$enableval/include"
LDFLAGS="$LDFLAGS -L$enableval/lib"
fi
if test -z "$aresembedded"; then
dnl verify that a sufficient c-ares is here if we have pointed one
dnl out and don't use the "embedded" ares dir (in which case we don't
dnl check it because it might not have been built yet)
AC_MSG_CHECKING([that c-ares is good and recent enough])
AC_LINK_IFELSE( [
#include <ares.h>
/* provide a set of dummy functions in case c-ares was built with debug */
void curl_dofree() { }
void curl_sclose() { }
void curl_domalloc() { }
int main(void)
{
ares_channel channel;
ares_cancel(channel);
return 0;
}
],
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
AC_MSG_ERROR([c-ares library defective or too old])
)
fi
;;
esac ],
AC_MSG_RESULT(no)
)
dnl ************************************************************
dnl lame option to switch on debug options
@@ -988,53 +1354,17 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
*) AC_MSG_RESULT(yes)
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
CFLAGS="$CFLAGS -g"
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wundef -Wpointer-arith -Wnested-externs"
fi
dnl strip off optimizer flags
NEWFLAGS=""
for flag in $CFLAGS; do
case "$flag" in
-O*)
dnl echo "cut off $flag"
;;
*)
NEWFLAGS="$NEWFLAGS $flag"
;;
esac
done
CFLAGS=$NEWFLAGS
CFLAGS="$CFLAGS -g"
dnl set compiler "debug" options to become more picky, and remove
dnl optimize options from CFLAGS
CURL_CC_DEBUG_OPTS
;;
esac ],
esac
],
AC_MSG_RESULT(no)
)
ares="no"
AC_MSG_CHECKING([whether to enable ares])
AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares],[Enable using ares for name lookups])
AC_HELP_STRING([--disable-ares],[Disable using ares for name lookups]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
if test "x$IPV6_ENABLED" = "x1"; then
AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares])
fi
AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support])
ares="yes"
;;
esac ],
AC_MSG_RESULT(no)
)
AM_CONDITIONAL(ARES, test x$ares = xyes)
AC_CONFIG_FILES([Makefile \
docs/Makefile \
docs/examples/Makefile \
@@ -1058,6 +1388,25 @@ AC_CONFIG_FILES([Makefile \
packages/DOS/Makefile \
packages/EPM/curl.list \
packages/EPM/Makefile \
packages/vms/Makefile \
curl-config
])
AC_OUTPUT
AC_MSG_NOTICE([Configured to build curl/libcurl:
curl version: ${VERSION}
Host setup: ${host}
Install prefix: ${prefix}
Compiler: ${CC}
SSL support: ${curl_ssl_msg}
zlib support: ${curl_zlib_msg}
krb4 support: ${curl_krb4_msg}
GSSAPI support: ${curl_gss_msg}
SNPEGO support: ${curl_spnego_msg}
c-ares support: ${curl_ares_msg}
ipv6 support: ${curl_ipv6_msg}
IDN support: ${curl_idn_msg}
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
Built-in manual: ${curl_manual_msg}
])

View File

@@ -90,6 +90,9 @@ while test $# -gt 0; do
if test "@CURL_DISABLE_DICT@" = "1"; then
echo "DICT-disabled"
fi
if test "@HAVE_ARES@" = "1"; then
echo "AsynchDNS"
fi
;;
--version)

View File

@@ -2,17 +2,8 @@
;;;; $Id$
;;; The curl hacker's C conventions.
;;; After loading this file and added the mode-hook you can in C
;;; files, put something like this to use the curl style
;;; automatically:
;;
;; /* -----------------------------------------------------------------
;; * local variables:
;; * eval: (set c-file-style "curl")
;; * end:
;; */
;;
;;; See the sample.emacs file on how this file can be made to take
;;; effect automatically when editing curl source files.
(defconst curl-c-style
'((c-basic-offset . 2)
@@ -37,12 +28,15 @@
(setq tab-width 8
indent-tabs-mode nil ; Use spaces. Not tabs.
comment-column 40
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t"))
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode"))
)
;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ...
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
(define-key c-mode-base-map "\M-m" 'delete-trailing-whitespace)
(setq c-recognize-knr-p nil)
;;; (add-hook 'write-file-hooks 'delete-trailing-whitespace t)
(setq show-trailing-whitespace t)
)
;; Set this is in your .emacs if you want to use the c-mode-hook as

View File

@@ -35,6 +35,11 @@ Cocoa
Written by Dan Wood.
http://curlhandle.sourceforge.net/
D
Written by Charles Sanders and James Wavro
http://www.atari-soldiers.com/libcurl.html
Dylan
Written by Chris Double.
@@ -45,6 +50,9 @@ Euphoria
Written by Ray Smith.
http://rays-web.com/eulibcurl.htm
Ferite
http://www.ferite.org/
Java
Written by Daniel Stenberg.

View File

@@ -1,8 +1,8 @@
Updated: June 17, 2003 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
Updated: March 16, 2004 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
FAQ
@@ -19,7 +19,7 @@ FAQ
2. Install Related Problems
2.1 configure doesn't find OpenSSL even when it is installed
2.1.1. native linker doesn't find openssl
2.1.1. native linker doesn't find OpenSSL
2.1.2. only the libssl lib is missing
2.2 Does curl work/build with other SSL libraries?
2.3 Where can I find a copy of LIBEAY32.DLL?
@@ -40,6 +40,7 @@ FAQ
3.12 Why do FTP specific features over HTTP proxy fail?
3.13 Why does my single/double quotes fail?
3.14 Does curl support javascript or pac (automated proxy config)?
3.15 Can I do recursive fetches with curl?
4. Running Problems
4.1 Problems connecting to SSL servers.
@@ -66,7 +67,7 @@ FAQ
5.2 How can I receive all data into a large memory chunk?
5.3 How do I fetch multiple files with libcurl?
5.4 Does libcurl do Winsock initing on win32 systems?
5.5 Does CURLOPT_FILE and CURLOPT_INFILE work on win32 ?
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
5.6 What about Keep-Alive or persistent connections?
5.7 Link errors when building libcurl on Windows!
@@ -89,7 +90,7 @@ FAQ
with URL spelled in uppercase to make it obvious it deals with URLs. The
fact it can also be pronounced 'see URL' also helped, it works as an
abbrivation for "Client URL Request Library" or why not the recursive
version: "Curl is a URL Request Library".
version: "Curl URL Request Library".
Curl supports a range of common Internet protocols, currently including
HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and FILE.
@@ -100,7 +101,7 @@ FAQ
NOTE: there are numerous sub-projects and related projects that also use the
word curl in the project names in various combinations, but you should take
notice that this FAQ is directed at the command-line tool named curl (and
libcurl the library), and may therefore not be valid for other curl
libcurl the library), and may therefore not be valid for other curl-related
projects.
1.2 What is libcurl?
@@ -108,16 +109,16 @@ FAQ
libcurl is a reliable and portable library which provides you with an easy
interface to a range of common Internet protocols.
You can use libcurl for free in your application even if it is commercial
or closed-source.
You can use libcurl for free in your application, be it open source,
commercial or closed-source.
1.3 What is cURL not?
Curl is *not* a wget clone even though that is a very common misconception.
Never, during curl's development, have we intended curl to replace wget or
compete on its market. Curl is targeted at single-shot file transfers.
Curl is not a web site mirroring program. If you wanna use curl to mirror
Curl is *not* a wget clone. That is a common misconception. Never, during
curl's development, have we intended curl to replace wget or compete on its
market. Curl is targeted at single-shot file transfers.
Curl is not a web site mirroring program. If you want to use curl to mirror
something: fine, go ahead and write a script that wraps around curl to make
it reality (like curlmirror.pl does).
@@ -180,9 +181,8 @@ FAQ
curl. We do this voluntarily on our spare time.
We get some help from companies. Contactor Data hosts the curl web site,
Haxx owns the curl web site's domain and sourceforge.net hosts several
project services we take advantage from, like the bug tracker, mailing lists
and more.
Haxx owns the curl web site's domain and sourceforge.net hosts project
services we take advantage from, like the bug tracker.
If you want to support our project with a donation or similar, one way of
doing that would be to buy "gift certificates" at useful online shopping
@@ -197,7 +197,7 @@ FAQ
programming language for the web, named CURL.
We are in no way associated with curl.com or their CURL programming
language.
language.
Our project name curl has been in effective use since 1998. We were not the
first computer related project to use the name "curl" and do not claim any
@@ -280,8 +280,7 @@ FAQ
2.4. Does cURL support Socks (RFC 1928) ?
There is limited support for SOCKS5 for curl built with IPv6 support
disabled.
Yes, SOCKS5 is supported when curl is built with IPv6 support disabled.
3. Usage problems
@@ -413,7 +412,7 @@ FAQ
put the entire option within quotes. Like in:
curl -d " with spaces " url.com
or perhaps
curl -d ' with spaces ' url.com
@@ -449,11 +448,19 @@ FAQ
- Read the javascript code and rewrite the same logic in another language.
- Implement a javascript interpreted, people have successfully used the
- Implement a javascript interpreter, people have successfully used the
Mozilla javascript engine in the past.
- Ask your admins to stop this, for a static proxy setup or similar.
3.15 Can I do recursive fetches with curl?
No. curl itself has no code that performs recursive operations, such as
those performed by wget.
There exist wrapper scripts with that functionality (for example the
curlmirror perl script), and you can write programs based on libcurl to do
it, but the command line tool curl itself cannot.
4. Running Problems
@@ -469,7 +476,7 @@ FAQ
requests properly. To correct this problem, tell curl to select SSLv2 from
the command line (-2/--sslv2).
There has also been examples where the remote server didn't like the SSLv2
There have also been examples where the remote server didn't like the SSLv2
request and instead you had to force curl to use SSLv3 with -3/--sslv3.
4.2. Why do I get problems when I use & or % in the URL?
@@ -545,7 +552,7 @@ FAQ
containing a list of valid methods for the requested resource.
4.5.6 "301 Moved Permanently"
If you get this return code and an HTML output similar to this:
<H1>Moved Permanently</H1> The document has moved <A
@@ -568,21 +575,26 @@ FAQ
The first part is to avoid having clear-text passwords in the command line
so that they don't appear in 'ps' outputs and similar. That is easily
avoided by using the "-K" option to tell curl to read parameters from a
file or stdin to which you can pass the secret info.
avoided by using the "-K" option to tell curl to read parameters from a file
or stdin to which you can pass the secret info. curl itself will also
attempt to "hide" the given password by blanking out the option - this
doesn't work on all platforms.
To keep the passwords in your account secret from the rest of the world is
not a task that curl addresses. You could of course encrypt them somehow to
at least hide them from being read by human eyes, but that is not what
anyone would call security.
Also note that regular HTTP and FTP passwords are sent in clear across the
network. All it takes for anyone to fetch them is to listen on the network.
Eavesdropping is very easy.
Also note that regular HTTP (using Basic authentication) and FTP passwords
are sent in clear across the network. All it takes for anyone to fetch them
is to listen on the network. Eavesdropping is very easy. Use more secure
authentication methods (like Digest, Negotiate or even NTLM) or consider the
SSL-based alternatives HTTPS and FTPS.
4.8 I found a bug!
It is not a bug if the behavior is documented. Read the docs first.
Especially check out the KNOWN_BUGS file, it may be a documented bug!
If it is a problem with a binary you've downloaded or a package for your
particular platform, try contacting the person who built the package/archive
@@ -620,7 +632,7 @@ FAQ
You invoke curl 7.10 or later to communicate on a https:// URL and get an
error back looking something similar to this:
curl: (35) SSL: error:14090086:SSL routines:
curl: (35) SSL: error:14090086:SSL routines:
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Then it means that curl couldn't verify that the server's certificate was
@@ -677,7 +689,7 @@ FAQ
{
register int realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)data;
mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1);
if (mem->memory) {
memcpy(&(mem->memory[mem->size]), ptr, realsize);
@@ -699,13 +711,15 @@ FAQ
Yes, if told to in the curl_global_init() call.
5.5 Does CURLOPT_FILE and CURLOPT_INFILE work on win32 ?
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
Yes, but you cannot open a FILE * and pass the pointer to a DLL and have
that DLL use the FILE *. If you set CURLOPT_FILE you must also use
CURLOPT_WRITEFUNCTION as well to set a function that writes the file, even
if that simply writes the data to the specified FILE*. Similarly, if you use
CURLOPT_INFILE you must also specify CURLOPT_READFUNCTION.
that DLL use the FILE * (as the DLL and the client application cannot access
each others' variable memory areas). If you set CURLOPT_WRITEDATA you must
also use CURLOPT_WRITEFUNCTION as well to set a function that writes the
file, even if that simply writes the data to the specified FILE *.
Similarly, if you use CURLOPT_READDATA you must also specify
CURLOPT_READFUNCTION.
(Provided by Joel DeYoung and Bob Schader)

View File

@@ -25,6 +25,7 @@ Misc
- socks5 support
- supports user name + password in proxy environment variables
- operations through proxy "tunnel" (using CONNECT)
- supports transfers of large files (>2GB and >4GB)
HTTP
- HTTP/1.1 compliant (optionally uses 1.0)
@@ -80,6 +81,11 @@ FTP
- all operations can be tunneled through a http-proxy
- customizable to retrieve file modification date
FTPS (*1)
- explicit ftps:// support that use SSL on both connections
- implicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp://
connection to use SSL for both or one of the connections
TELNET
- connection negotiation
- custom telnet options

View File

@@ -23,17 +23,17 @@ the http-only days were already passed.
The project slowly grew bigger. When upload capabilities were added and the
name once again was misleading, a second name change was made and on March 20,
1998 curl 4 was released. (The version numbering from the previous names were
1998 curl 4 was released. (The version numbering from the previous names was
kept.)
(Unrelated to this project a company called Curl Corporation filed a US
(Unrelated to this project a company called Curl Corporation registered a US
trademark on the name "CURL" on May 18 1998. That company had then already
registered the curl.com domain back in November of the previous year. All this
was much later brought into the lights.)
was revealed to us much later.)
SSL support was added, powered by the SSLeay library.
August 1998, added project curl to freshmeat.net.
August 1998, first announcement of curl on freshmeat.net.
October 1998, with the curl 4.9 release and the introduction of cookie
support, curl was no longer released under the GPL license. Now we're at 4000
@@ -42,7 +42,7 @@ lines of code, we switched over to the MPL license to restrict the effects of
November 1998, configure script and reported successful compiles on several
major operating systems. The never-quite-understood -F option was added and
curl could now simulate quite a lot of a browser.
curl could now simulate quite a lot of a browser. TELNET support was added.
Curl 5 was released in December 1998 and introduced the first ever curl man
page. People started making Linux RPM packages out of it.
@@ -90,6 +90,8 @@ curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This
also introduced libcurl's ability to do persistent connections. 24000 lines of
code.
The first experimental ftps:// support was added in March 2001.
August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more
and more of a standard utility of Linux distributions and a regular in the BSD
ports collections. The curl web site gets 8000 visits weekly. Curl Corporation
@@ -114,3 +116,13 @@ license only.
February 2003, the curl site averages at 20000 visits weekly. At any given
moment, there's an average of 3 people browsing the curl.haxx.se site.
Multiple new authentication schemes are supported: Digest (May), NTLM (June)
and Negotiate (June).
November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique
visitors to the curl.haxx.se site. Five official web mirrors.
December 2003, full-fledged SSL for FTP is supported.
January 2004: curl 7.11.0 introduced large file support.

View File

@@ -6,14 +6,13 @@
How To Compile
Curl has been compiled and built on numerous different operating systems.
Installing Binary Packages
==========================
Most systems build curl the same way (unix-style). Continue reading below for
more details if you're one of them.
If you're using Windows (95/98/NT/ME/2000/XP or similar), VMS, RISC OS or OS/2
or cross-compile, you should continue reading from one the paragraphs further
down.
Lots of people download binary distributions of curl and libcurl. This
document does not describe how to install curl or libcurl using such a
binary package. This document describes how to compile, build and install
curl and libcurl from source code.
UNIX
====
@@ -231,6 +230,36 @@ Win32
project properties to use the SSL include path, link with the SSL libs
and define the USE_SSLEAY symbol.
Using Borland C++ compiler version 5.5.1 (available as free download
from Borland's site)
---------------------------------------------------------------------
compile openssl
Make sure you include the paths to curl/include and openssl/inc32 in
your bcc32.cnf file
eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
Check to make sure that all of the sources listed in lib/Makefile.b32
are present in the /path_to_curl/lib directory. (Check the src
directory for missing ones.)
Make sure the environment variable "BCCDIR" is set to the install
location for the compiler eg : c:\Borland\BCC55
command line:
make -f /path_to_curl/lib/Makefile-ssl.b32
compile simplessl.c with appropriate links
c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
-L c:\borland\bcc55\lib\psdk\ws2_32.lib
-L c:\openssl\out32\libeay32.lib
-L c:\openssl\out32\ssleay32.lib
simplessl.c
Disabling Specific Protocols:
The configure utility, unfortunately, is not available for the Windows
@@ -290,8 +319,6 @@ VMS
===
(The VMS section is in whole contributed by the friendly Nico Baggus)
This is the first attempt at porting cURL to VMS.
Curl seems to work with FTP & HTTP other protocols are not tested. (the
perl http/ftp testing server supplied as testing too cannot work on VMS
because vms has no concept of fork(). [ I tried to give it a whack, but
@@ -300,7 +327,7 @@ VMS
SSL stuff has not been ported.
Telnet has about the same issues as for Win32. When the changes for Win32
are clear maybe they'l work for VMS too. The basic problem is that select
are clear maybe they'll work for VMS too. The basic problem is that select
ONLY works for sockets.
Marked instances of fopen/[f]stat that might become a problem, especially
@@ -422,6 +449,29 @@ RISC OS
where riscos-gcc and riscos-ar are links to the gccsdk tools.
You can then link your program with curl/lib/.libs/libcurl.a
AmigaOS
=======
(This section was graciously brought to us by Diego Casorran)
To build cURL/libcurl on AmigaOS just type 'make amiga' ...
What you need is: (not tested with others versions)
GeekGadgets / gcc 2.95.3 (http://www.geekgadgets.org/)
AmiTCP SDK v4.3 (http://www.aminet.net/comm/tcp/AmiTCP-SDK-4.3.lha)
Native Developer Kit (http://www.amiga.com/3.9/download/NDK3.9.lha)
As no ixemul.library is required you will be able to build it for
WarpOS/PowerPC (not tested by me), as well a MorphOS version should be
possible with no problems.
To enable SSL support, you need a OpenSSL native version (without ixemul),
you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/
PORTS
=====
This is a probably incomplete list of known hardware and operating systems
@@ -438,6 +488,7 @@ PORTS
- Alpha Tru64 v5.0 5.1
- HP-PA HP-UX 9.X 10.X 11.X
- HP-PA Linux
- HP3000 MPE/iX
- MIPS IRIX 6.2, 6.5
- MIPS Linux
- Pocket PC/Win CE 3.0
@@ -460,6 +511,7 @@ PORTS
- i386 HURD
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4
- i386 NetBSD
- i386 Novell NetWare
- i386 OS/2
- i386 OpenBSD
- i386 SCO unix
@@ -497,7 +549,3 @@ OpenLDAP
http://www.openldap.org
You need to install it with shared libraries, which is enabled when running
the ldap configure script with "--enable-shared". With my linux 2.0.36
kernel I also had to disable using threads (with --without-threads),
because the configure script couldn't figure out my system.

View File

@@ -3,6 +3,18 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
* If you use a very large amount of file descriptors (more than FD_SETSIZE)
and then use libcurl, it might crash on its use of select() which then
stores data out of bounds. Bug report #948950.
* --limit-rate using -d or -F does not work. This is because the limit logic
is provided by the curl app in its read/write callbacks, and when doing
-d/-F the callbacks aren't used! Bug report #921395.
* Doing resumed upload over HTTP does not work with '-C -', because curl
doesn't do a HEAD first to get the initial size. This needs to be done
manually for HTTP PUT resume to work, and then '-C [index]'.
* CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD have no way of providing user names
that contain a colon. This can't be fixed easily in a backwards compatible
way without adding new options (and then, they should most probably allow
@@ -15,13 +27,6 @@ may have been fixed since this was written!
indicate that the user wants to reach the root dir (this exception SHALL
remain even when this bug is fixed).
* 1) libcurl does a POST
2) receives a 100-continue
3) sends away the POST
Now, if nothing else is returned from the server, libcurl MUST return
CURLE_GOT_NOTHING, but it seems it returns CURLE_OK as it seems to count
the 100-continue reply as a good enough reply.
* libcurl doesn't treat the content-length of compressed data properly, as
it seems HTTP servers send the *uncompressed* length in that header and
libcurl thinks of it as the *compressed* lenght. Some explanations are here:
@@ -31,26 +36,14 @@ may have been fixed since this was written!
locally, which is because libcurl doesn't call the write callback with zero
bytes. Explained here: http://curl.haxx.se/mail/archive-2003-04/0143.html
* Using CURLOPT_FAILONERROR (-f/--fail) will make authentication to stop
working if you use anything but plain Basic auth.
* IPv6 support on AIX 4.3.3 doesn't work due to a missing sockaddr_storage
struct. It has been reported to work on AIX 5.1 though.
* Running 'make test' on Mac OS X gives 4 errors. This seems to be related
to some kind of libtool problem:
http://curl.haxx.se/mail/archive-2002-03/0029.html and
http://curl.haxx.se/mail/archive-2002-03/0033.html
* libcurl does not deal nicely with files larger than 2GB
* GOPHER transfers seem broken
* configure --disable-http is not fully supported. All other protocols seem
to work to disable.
* The -m parameter does not work when using telnet with curl on Windows.
* If a HTTP server responds to a HEAD request and includes a body (thus
violating the RFC2616), curl won't wait to read the response but just stop
reading and return back. If a second request (let's assume a GET) is then
@@ -60,63 +53,3 @@ may have been fixed since this was written!
and havoc is what happens.
More details on this is found in this libcurl mailing list thread:
http://curl.haxx.se/mail/lib-2002-08/0000.html
------------------------------------------------------------------------------
Q: My program blows up when I run lots of curl_easy_perform() calls on a
single thread
Q: My program dies when a single thread re-enters the win32 select() call
via curl_easy_perform()
Q: --- add your own flavour here ---
Single Threaded Re-Entracy
--------------------------
There is a glitch / trick to using cURL on Win32 related to re-entrancy.
This experience was gained on verion 7.9.4 using Windows NT SP3 in a banking
environment (just in case you wanted to know).
If you have already called curl_easy_perform(), and *somehow* you cause your
single thread of execution to make another call to curl_easy_perform() - the
windows socket() call used to create a new socket for the second connection
can return with 10044 / 10043 error codes.
The WSA errors we experienced are:
WSAEPROTONOSUPPORT
(10043)
Protocol not supported.
The requested protocol has not been configured into the system, or no
implementation for it exists. For example, a socket call requests a
SOCK_DGRAM socket, but specifies a stream protocol.
WSAESOCKTNOSUPPORT
(10044)
Socket type not supported.
The support for the specified socket type does not exist in this address
family. For example, the optional type SOCK_RAW might be selected in a
socket call, and the implementation does not support SOCK_RAW sockets at
all.
We have experienced this by creating a timer that ticks every 20ms, and on
the tick making a curl_easy_perform() call. The call usually completed in
about 300ms. And we expected (before this test) that the timer would NOT be
fired during a call to curl_easy_perform(), howvever, while the first
curl_easy_perform() is running a tick *is* fired by the windows API somehow,
and we then call curl_easy_perform() again - thus single threaded
re-entrancy is achieved.
Notes:
* We made sure that a new CURL structure was being used for each
curl_easy_perform() request, and that the curl_global_init() had been called
beforehand.
* I'm happy to answer any questions about this problem to try to track it
down.
* Once the socket() call started failing, there is no hope - it never works
again.
* Slowing the timer down to give each request enough time to complete solves
this problem completely.
If anyone has the source code to the WinNT implementation of socket() and
can figure out WHY this can occur, more tracing can be performed.
John Clayton <John.Clayton at barclayscapital.com>

83
docs/LICENSE-MIXING Normal file
View File

@@ -0,0 +1,83 @@
License Mixing with apps, libcurl and Third Party Libraries
===========================================================
libcurl can be built to use a fair amount of various third party libraries,
libraries that are written and provided by other parties that are distributed
using their own licenses. Even libcurl itself contains code that may cause
problems to some. This document attempts to describe what licenses libcurl and
the other libraries use and what possible dilemmas linking and mixing them all
can lead to for end users.
I am not a lawyer and this is not legal advice!
One common dilemma is that GPL[*]-licensed code is not allowed to be linked
with code licensed under the Original BSD license (with the announcement
clause, unless there's a specified exception in the GPL-licensed module). You
may still build your own copies that use them all, but distributing them as
binaries would be to violate the GPL license. This particular problem was
addressed when the Modified BSD license was created, which does not have the
annoncement clause that collides with GPL.
libcurl http://curl.haxx.se/docs/copyright.html
Uses an MIT (or Modified BSD)-style license that is as liberal as
possible. Some of the source files that deal with KRB4 have Original
BSD-style announce-clause licenses. You may not distribute binaries
with krb4-enabled libcurl that also link with GPL-licensed code!
OpenSSL http://www.openssl.org/source/license.html
Uses an Original BSD-style license with an announement clause that
makes it "incompatible" with GPL. You are not allowed to ship binaries
that link with OpenSSL that includes GPL code (unless that specific
GPL code includes an exception for OpenSSL - a habit that is growing
more and more common).
c-ares http://daniel.haxx.se/projects/c-ares/license.html
Uses an MIT license that is very liberal and imposes no restrictions
on any other library or part you may link with.
zlib http://www.gzip.org/zlib/zlib_license.html
Uses an MIT-style license that shouldn't collide with any other
library.
krb4
While nothing in particular says that a Kerberos4 library must use any
particular license, the one I've tried and used successfully so far
(kth-krb4) is Original BSD-licensed with the announcement clause. Some
of the code in libcurl that is written to deal with Kerberos4 likewise
have such a license.
GSSAPI
While nothing in particular says that a GSS/Kerberos5 library must use
any particular license, the one I've used (Heimdal) is Original BSD-
licensed with the announcement clause.
fbopenssl
Unclear license. Based on its name, I assume that it uses the OpenSSL
license and thus shares the same issues as described for OpenSSL
above.
libidn http://www.gnu.org/licenses/lgpl.html
Uses the GNU Lesser General Public License. LGPL is a variation of GPL
with slightly less aggressive "copyleft". This license requires more
requirements to be met when distributing binaries, see the license for
details. Also note that if you distribute a binary that includes this
library, you must also include the full LGPL license text. Please
properly point out what parts of the distributed package that the
license addresses.
OpenLDAP http://www.openldap.org/software/release/license.html
Uses a Modified BSD-style license. Since libcurl uses OpenLDAP as a
shared library only, I have not heard of anyone that ships OpenLDAP
linked with libcurl in an app.
[*] = GPL - GNU General Public License: http://www.gnu.org/licenses/gpl.html

View File

@@ -63,6 +63,11 @@ USING PASSWORDS
curl -u name:passwd ftp://machine.domain:port/full/path/to/file
FTPS
It is just like for FTP, but you may also want to specify and use
SSL-specific options for certificates etc.
HTTP
The HTTP URL doesn't support user and password in the URL string. Curl
@@ -75,6 +80,12 @@ USING PASSWORDS
curl -u name:passwd http://machine.domain/full/path/to/file
HTTP offers many different methods of authentication and curl supports
several: Basic, Digest, NTLM and Negotiate. Without telling which method to
use, curl defaults to Basic. You can also ask curl to pick the most secure
ones out of the ones that the server accepts for the given URL, by using
--anyauth.
NOTE! Since HTTP URLs don't support user and password, you can't use that
style when using Curl via a proxy. You _must_ use the -u style fetch
during such circumstances.
@@ -836,8 +847,6 @@ PERSISTANT CONNECTIONS
transfers faster. If you use a http proxy for file transfers, practicly
all transfers will be persistant.
Persistant connections were introduced in curl 7.7.
MAILING LISTS
For your convenience, we have several open mailing lists to discuss curl,

View File

@@ -4,27 +4,22 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
man_MANS = \
curl.1 \
curl-config.1
man_MANS = curl.1 curl-config.1
GENHTMLPAGES = curl.html curl-config.html
PDFPAGES = curl.pdf curl-config.pdf
HTMLPAGES = \
curl.html \
curl-config.html \
index.html
PDFPAGES = \
curl.pdf \
curl-config.pdf
HTMLPAGES = $(GENHTMLPAGES) index.html
SUBDIRS = examples libcurl
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \
VERSIONS KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) \
HISTORY INSTALL libcurl-the-guide $(PDFPAGES)
CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES)
MAN2HTML= $(NROFF) -man $< | man2html >$@
EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \
README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS VERSIONS \
KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) HISTORY INSTALL \
libcurl-the-guide $(PDFPAGES) LICENSE-MIXING
MAN2HTML= roffit < $< >$@
SUFFIXES = .1 .html .pdf

View File

@@ -1,7 +1,7 @@
Peer SSL Certificate Verification
=================================
Starting in 7.10, libcurl performs peer SSL certificate verification by
Since version 7.10, libcurl performs peer SSL certificate verification by
default. This is done by installing a default CA cert bundle on 'make install'
(or similar), that CA bundle package is used by default on operations against
SSL servers.
@@ -11,9 +11,11 @@ by CAs present in the bundle, you will not notice any changed behavior and you
will seamlessly get a higher security level on your SSL connections since you
can be sure that the remote server really is the one it claims to be.
If the remote server uses a self-signed certificate, or if you don't install
curl's CA cert bundle or if it uses a certificate signed by a CA that isn't
included in the bundle, then you need to do one of the following:
If the remote server uses a self-signed certificate, if you don't install
curl's CA cert bundle, if the server uses a certificate signed by a CA that
isn't included in the bundle or if the remoste host is an imposter
impersonating your favourite site, and you want to transfer files from this
server, do one of the following:
1. Tell libcurl to *not* verify the peer. With libcurl you disable with with
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
@@ -26,6 +28,12 @@ included in the bundle, then you need to do one of the following:
With the curl command tool: --cacert [file]
3. Add the CA cert for your server to the existing default CA cert bundle.
The default path of the CA bundle installed with the curl package is:
/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running
configure with the --with-ca-bundle option pointing out the path of your
choice.
Neglecting to use one of the above menthods when dealing with a server using a
certficate that isn't signed by one of the certficates in the installed CA
cert bundle, will cause SSL to report an error ("certificate verify failed")
@@ -37,3 +45,4 @@ trouble for some users, since it adds security to a majority of the SSL
connections that previously weren't really secure. It turned out many people
were using previous versions of curl/libcurl without realizing the need for
the CA cert options to get truly secure SSL connections.

View File

@@ -1,6 +1,6 @@
This project has been alive for several years. Countless people have provided
feedback that have improved curl. Here follows a (incomplete) list of people
that have contributed with non-trivial parts:
This project has been alive for several years. Countless people have provided
feedback that have improved curl. Here follows a (incomplete) list of people
that have contributed with non-trivial parts:
Daniel Stenberg <daniel@haxx.se>
Rafael Sagula <sagula@inf.ufrgs.br>
@@ -92,3 +92,9 @@ Jean-Philippe Barrette-LaPierre <jpb@rrette.com>
Richard Bramante <RBramante@on.com>
Daniel Kouril <kouril@ics.muni.cz>
Dirk Manske <dm@nettraffic.de>
David Meyer <meyer@paracel.com>
Dominick Meglio <codemstr@ptd.net>
Gisle Vanem <gvanem@broadpark.no>
Giuseppe Attardi <attardi@di.unipi.it>
Tor Arntsen <tor@spacetec.no>
David Byron <DByron@everdreamcorp.com>

View File

@@ -25,14 +25,20 @@ TODO
[http://curl.haxx.se/dev/no_copy_callbacks.txt]
* More data sharing. curl_share_* functions already exist and work, and they
can be extended to share more.
can be extended to share more. For example, enable sharing of the ares
channel.
* Set the SO_KEEPALIVE socket option to make libcurl notice and disconnect
very long time idle connections.
* Introduce a new error code indicating authentication problems (for proxy
CONNECT error 407 for example). This cannot be an error code, we must not
return informational stuff as errors, consider a new info returned by
curl_easy_getinfo() #845941
* Go through the code and verify that libcurl deals with big files >2GB and
>4GB all over. Bug reports (and source reviews) show that it doesn't
currently work.
* Option to set the SO_KEEPALIVE socket option to make libcurl notice and
disconnect very long time idle connections.
* When posting multipart forms, we should _not_ create the whole data chunk
in memory before the upload starts but do it in a "streaming" manner to
allow uploads that are way larger than the amount of system memory.
LIBCURL - multi interface
@@ -55,6 +61,13 @@ TODO
FTP
* Optimize the way libcurl uses CWD on each new request over a persistent
connection (on FTP) even if it doesn't have to.
* REST fix for servers not behaving well on >2GB requests. This should fail
if the server doesn't set the pointer to the requested index. The tricky
part is to figure out if the server did the right thing or not.
* Support the most common FTP proxies, Philip Newton provided a list
allegedly from ncftp:
http://curl.haxx.se/mail/archive-2003-04/0126.html
@@ -68,15 +81,16 @@ TODO
* Since USERPWD always override the user and password specified in URLs, we
might need another way to specify user+password for anonymous ftp logins.
* Add FTPS support with SSL for the data connection too. This should be made
according to the specs written in draft-murray-auth-ftp-ssl-12.txt,
"Securing FTP with TLS", valid until 28th February, 2004.
http://curl.haxx.se/rfc/draft-murray-auth-ftp-ssl-12.txt
* The FTP code should get a way of returning errors that is known to still
have the control connection alive and sound. Currently, a returned error
from within ftp-functions does not tell if the control connection is still
OK to use or not. This causes libcurl to fail to re-use connections
slightly too often.
HTTP
* Digest and GSS-Negotiate support for HTTP proxies. They only work on
direct-connections to the server.
* GSS-Negotiate support for HTTP proxies. They only work on direct
connections to the server.
* Pipelining. Sending multiple requests before the previous one(s) are done.
This could possibly be implemented using the multi interface to queue
@@ -94,6 +108,12 @@ TODO
SSL
* Anton Fedorov's "dumpcert" patch:
http://curl.haxx.se/mail/lib-2004-03/0088.html
* Evaluate/apply Gertjan van Wingerde's SSL patches:
http://curl.haxx.se/mail/lib-2004-03/0087.html
* If you really want to improve the SSL situation, you should probably have a
look at SSL cafile loading as well - quick traces look to me like these are
done on every request as well, when they should only be necessary once per
@@ -153,8 +173,39 @@ TODO
which should overwrite the program reasonable defaults (plain/text,
8bit...) (Idea brough to us by kromJx)
* ability to specify the classic computing suffixes on the range
specifications. For example, to download the first 500 Kilobytes of a file,
be able to specify the following for the -r option: "-r 0-500K" or for the
first 2 Megabytes of a file: "-r 0-2M". (Mark Smith suggested)
* --data-encode that URL encodes the data before posting
http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested)
* Provide a way to make options bound to a specific URL among several on the
command line. Possibly by adding a new option that separates options
between URLs, similar to this:
curl --data foo --url url.com --optionseparator
--url url2.com --optionseparator \
--url url3.com --data foo3
(--optionseparator used to show my point, it would need a better name)
The example would do a POST-GET-POST combination on a single command line.
BUILD
* Consider extending 'roffit' to produce decent ASCII output, and use that
instead of (g)nroff when building src/hugehelp.c
TEST SUITE
* Make the test servers able to serve multiple running test suites. Like if
two users run 'make test' at once.
* Make runtests.pl capable of changing port numbers for the servers. This was
the intention from the start, but in practise it is now hard.
* If perl wasn't found by the configure script, don't attempt to run the
tests but explain something nice why it doesn't.
@@ -164,11 +215,18 @@ TODO
* Make the test suite work on more platforms. OpenBSD and Mac OS. Remove
fork()s and it should become even more portable.
* Introduce a test suite that tests libcurl better and more explicitly.
NEXT MAJOR RELEASE
NEXT MAJOR RELEASE
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
CURLMcode. These should be changed to be the same.
* curl_formparse() should be removed
* remove obsolete defines from curl/curl.h
* remove the following functions from the public API:
curl_getenv
curl_mprintf (and variations)
curl_strequal
curl_strnequal
They will instead become curlx_ - alternatives. That makes the curl app
still capable of building with them from source.

View File

@@ -1,7 +1,7 @@
Online: http://curl.haxx.se/docs/httpscripting.shtml
Author: Daniel Stenberg <daniel@haxx.se>
Date: October 31, 2001
Version: 0.5
Date: November 6, 2001
Version: 0.6
The Art Of Scripting HTTP Requests Using Curl
=============================================
@@ -65,7 +65,8 @@ Version: 0.5
All HTTP replies contain a set of headers that are normally hidden, use
curl's -i option to display them as well as the rest of the document. You can
also ask the remote server for ONLY the headers by using the -I option.
also ask the remote server for ONLY the headers by using the -I option (which
will make curl issue a HEAD request).
4. Forms
@@ -122,17 +123,22 @@ Version: 0.5
<form method="POST" action="junk.cgi">
<input type=text name="birthyear">
<input type=submit name=press value="OK">
<input type=submit name=press value=" OK ">
</form>
And to use curl to post this form with the same data filled in as before, we
could do it like:
curl -d "birthyear=1905&press=OK" www.hotmail.com/when/junk.cgi
curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi
This kind of POST will use the Content-Type
application/x-www-form-urlencoded and is the most widely used POST kind.
The data you send to the server MUST already be properly encoded, curl will
not do that for you. For example, if you want the data to contain a space,
you need to replace that space with %20 etc. Failing to comply with this
will most likely cause your data to be received wrongly and messed up.
4.3 FILE UPLOAD POST
Back in late 1995 they defined a new way to post data over HTTP. It was
@@ -202,14 +208,18 @@ Version: 0.5
Authentication is the ability to tell the server your username and password
so that it can verify that you're allowed to do the request you're doing. The
basic authentication used in HTTP is *plain* *text* based, which means it
sends username and password only slightly obfuscated, but still fully
readable by anyone that sniffs on the network between you and the remote
server.
Basic authentication used in HTTP (which is the type curl uses by default) is
*plain* *text* based, which means it sends username and password only
slightly obfuscated, but still fully readable by anyone that sniffs on the
network between you and the remote server.
To tell curl to use a user and password for authentication:
curl -u name:password www.secrets.com
The site might require a different authentication method (check the headers
returned by the server), and then --ntlm, --digest, --negotiate or even
--anyauth might be options that suit you.
Sometimes your HTTP access is only available through the use of a HTTP
proxy. This seems to be especially common at various companies. A HTTP proxy
@@ -218,6 +228,9 @@ Version: 0.5
curl -U proxyuser:proxypassword curl.haxx.se
If your proxy requires the authentication to be done using the NTLM method,
use --proxy-ntlm.
If you use any one these user+password options but leave out the password
part, curl will prompt for the password interactively.
@@ -309,6 +322,9 @@ Version: 0.5
curl -D headers_and_cookies www.cookiesite.com
(Take note that the -c option described below is a better way to store
cookies.)
Curl has a full blown cookie parsing engine built-in that comes to use if you
want to reconnect to a server and use cookies that were stored from a
previous connection (or handicrafted manually to fool the server into
@@ -362,6 +378,11 @@ Version: 0.5
curl -E mycert.pem https://that.secure.server.com
curl also tries to verify that the server is who it claims to be, by
verifying the server's certificate against a CA cert bundle. Failing the
verification will cause curl to deny the connection. You must then use -k in
case you want to tell curl to ignore that the server can't be verified.
12. REFERENCES
RFC 2616 is a must to read if you want in-depth understanding of the HTTP

View File

@@ -1,8 +1,27 @@
.\" You can view this file with:
.\" nroff -man curl.1
.\" Written by Daniel Stenberg
.\" **************************************************************************
.\" * _ _ ____ _
.\" * Project ___| | | | _ \| |
.\" * / __| | | | |_) | |
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl 1 "22 Oct 2003" "Curl 7.10.8" "Curl Manual"
.TH curl 1 "3 May 2004" "Curl 7.12" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
@@ -37,9 +56,10 @@ or you can get sequences of alphanumeric series by using [] as in:
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
ftp://ftp.letters.com/file[a-z].txt
No nesting of the sequences is supported at the moment:
No nesting of the sequences is supported at the moment, but you can use
several ones next to each other:
http://www.any.org/archive[1996-1999]/volume[1-4]part{a,b,c,index}.html
http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order.
@@ -56,11 +76,10 @@ file instead of overwriting it. If the file doesn't exist, it will be created.
If this option is used twice, the second one will disable append mode again.
.IP "-A/--user-agent <agent string>"
(HTTP)
Specify the User-Agent string to send to the HTTP server. Some badly done CGIs
fail if its not set to "Mozilla/4.0". To encode blanks in the string,
surround the string with single quote marks. This can also be set with the
-H/--header flag of course.
(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
done CGIs fail if its not set to "Mozilla/4.0". To encode blanks in the
string, surround the string with single quote marks. This can also be set
with the \fI-H/--header\fP option of course.
If this option is set more than once, the last one will be the one that's
used.
@@ -69,7 +88,7 @@ used.
most secure one the remote site claims it supports. This is done by first
doing a request and checking the response-headers, thus inducing an extra
network round-trip. This is used instead of setting a specific authentication
method, which you can do with \fI--digest\fP, \fI--ntlm\fP, and
method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and
\fI--negotiate\fP. (Added in 7.10.6)
If this option is used several times, the following occurrences make no
@@ -84,14 +103,14 @@ If no '=' letter is used in the line, it is treated as a filename to use to
read previously stored cookie lines from, which should be used in this session
if they match. Using this method also activates the "cookie parser" which will
make curl record incoming cookies too, which may be handy if you're using this
in combination with the -L/--location option. The file format of the file to
read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie
file format.
in combination with the \fI-L/--location\fP option. The file format of the
file to read cookies from should be plain HTTP headers or the Netscape/Mozilla
cookie file format.
.B NOTE
that the file specified with -b/--cookie is only used as input. No cookies
will be stored in the file. To store cookies, use the -c/--cookie-jar option
or you could even save the HTTP headers to a file using -D/--dump-header!
\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as
input. No cookies will be stored in the file. To store cookies, use the
\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file
using \fI-D/--dump-header\fP!
If this option is set more than once, the last one will be the one that's
used.
@@ -112,7 +131,7 @@ difference.
.IP "--ciphers <list of ciphers>"
(SSL) Specifies which ciphers to use in the connection. The list of ciphers
must be using valid ciphers. Read up on SSL cipher list details on this URL:
.I http://www.openssl.org/docs/apps/ciphers.html
\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
If this option is used several times, the last one will override the others.
.IP "--compressed"
@@ -124,7 +143,7 @@ If this option is used several times, each occurrence will toggle it on/off.
.IP "--connect-timeout <seconds>"
Maximum time in seconds that you allow the connection to the server to take.
This only limits the connection phase, once curl has connected this option is
of no more use. See also the \fI--max-time\fP option.
of no more use. See also the \fI-m/--max-time\fP option.
If this option is used several times, the last one will be used.
.IP "-c/--cookie-jar <file name>"
@@ -154,8 +173,12 @@ transfer. It then uses the given output/input files to figure that out.
If this option is used several times, the last one will be used.
.IP "--create-dirs"
When used in conjunction with the -o option, curl will create the necessary
local directory hierarchy as needed.
When used in conjunction with the -o option, curl will create the necessary
local directory hierarchy as needed. This option creates the dirs mentioned
with the -o option, nothing else. If the -o file name uses no dir or if the
dirs it mentions already exist, no dir will be created.
To create remote directories when using FTP, try \fI--ftp-create-dirs\fP.
.IP "--crlf"
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
@@ -166,8 +189,8 @@ that can emulate as if a user has filled in a HTML form and pressed the submit
button. Note that the data is sent exactly as specified with no extra
processing (with all newlines cut off). The data is expected to be
\&"url-encoded". This will cause curl to pass the data to the server using the
content-type application/x-www-form-urlencoded. Compare to -F. If more than
one -d/--data option is used on the same command line, the data pieces
content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If
this option is used more than once on the same command line, the data pieces
specified will be merged together with a separating &-letter. Thus, using '-d
name=daniel -d skill=lousy' would generate a post chunk that looks like
\&'name=daniel&skill=lousy'.
@@ -176,31 +199,32 @@ If you start the data with the letter @, the rest should be a file name to
read the data from, or - if you want curl to read the data from stdin. The
contents of the file must already be url-encoded. Multiple files can also be
specified. Posting data from a file named 'foobar' would thus be done with
\&"--data @foobar".
\fI--data\fP @foobar".
To post data purely binary, you should instead use the --data-binary option.
To post data purely binary, you should instead use the \fI--data-binary\fP
option.
-d/--data is the same as --data-ascii.
\fI-d/--data\fP is the same as \fI--data-ascii\fP.
If this option is used several times, the ones following the first will
append data.
.IP "--data-ascii <data>"
(HTTP) This is an alias for the -d/--data option.
(HTTP) This is an alias for the \fI-d/--data\fP option.
If this option is used several times, the ones following the first will
append data.
.IP "--data-binary <data>"
(HTTP) This posts data in a similar manner as --data-ascii does, although when
using this option the entire context of the posted data is kept as-is. If you
want to post a binary file without the strip-newlines feature of the
--data-ascii option, this is for you.
(HTTP) This posts data in a similar manner as \fI--data-ascii\fP does,
although when using this option the entire context of the posted data is kept
as-is. If you want to post a binary file without the strip-newlines feature of
the \fI--data-ascii\fP option, this is for you.
If this option is used several times, the ones following the first will
append data.
.IP "--digest"
(HTTP) Enables HTTP Digest authentication. This is a authentication that
prevents the password from being sent over the wire in clear text. Use this in
combination with the normal -u/--user option to set user name and
combination with the normal \fI-u/--user\fP option to set user name and
password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for
related options. (Added in curl 7.10.6)
@@ -226,8 +250,8 @@ Write the protocol headers to the specified file.
This option is handy to use when you want to store the headers that a HTTP
site sends to you. Cookies from the headers could then be read in a second
curl invoke by using the -b/--cookie option! The -c/--cookie-jar option is
however a better way to store cookies.
curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP
option is however a better way to store cookies.
When used on FTP, the ftp server response lines are considered being "headers"
and thus are saved there.
@@ -235,11 +259,10 @@ and thus are saved there.
If this option is used several times, the last one will be used.
.IP "-e/--referer <URL>"
(HTTP) Sends the "Referer Page" information to the HTTP server. This can also
be set with the -H/--header flag of course. When used with
.I -L/--location
you can append ";auto" to the referer URL to make curl automatically set the
previous URL when it follows a Location: header. The ";auto" string can be
used alone, even if you don't set an initial referer.
be set with the \fI-H/--header\fP flag of course. When used with
\fI-L/--location\fP you can append ";auto" to the referer URL to make curl
automatically set the previous URL when it follows a Location: header. The
";auto" string can be used alone, even if you don't set an initial referer.
If this option is used several times, the last one will be used.
.IP "--environment"
@@ -251,8 +274,7 @@ If this option is used several times, each occurrence will toggle this on/off.
.IP "--egd-file <file>"
(HTTPS) Specify the path name to the Entropy Gathering Daemon socket. The
socket is used to seed the random engine for SSL connections. See also the
.I "--random-file"
option.
\fI--random-file\fP option.
.IP "-E/--cert <certificate[:password]>"
(HTTPS)
Tells curl to use the specified certificate file when getting a file
@@ -261,6 +283,11 @@ If the optional password isn't specified, it will be queried for on
the terminal. Note that this certificate is the private key and the private
certificate concatenated!
If this option is used several times, the last one will be used.
.IP "--cert-type <type>"
(SSL) Tells curl what certificate type the provided certificate is in. PEM,
DER and ENG are recognized types.
If this option is used several times, the last one will be used.
.IP "--cacert <CA certificate>"
(HTTPS) Tells curl to use the specified certificate file to verify the
@@ -279,9 +306,10 @@ If this option is used several times, the last one will be used.
.IP "--capath <CA certificate directory>"
(HTTPS) Tells curl to use the specified certificate directory to verify the
peer. The certificates must be in PEM format, and the directory must have been
processed using the c_rehash utility supplied with openssl. Using --capath can
allow curl to make https connections much more efficiently than using --cacert
if the --cacert file contains many CA certificates.
processed using the c_rehash utility supplied with openssl. Using
\fI--capath\fP can allow curl to make https connections much more efficiently
than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
certificates.
If this option is used several times, the last one will be used.
.IP "-f/--fail"
@@ -294,9 +322,19 @@ prevent curl from outputting that and fail silently instead.
If this option is used twice, the second will again disable silent failure.
.IP "--ftp-create-dirs"
(FTP) When an FTP URL/operation uses a path that doesn't currently exist on
the server, the standard behaviour 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. (Added in 7.10.7)
If this option is used twice, the second will again disable silent failure.
.IP "--ftp-pasv"
(FTP) Use PASV when transfering. PASV is the internal default behavior, but
using this option can be used to override a previos --ftp-port option. (Added
in 7.11.0)
If this option is used twice, the second will again disable silent failure.
.IP "--ftp-ssl"
(FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0)
If this option is used twice, the second will again disable silent failure.
.IP "-F/--form <name=content>"
(HTTP) This lets curl emulate a filled in form in which a user has pressed the
@@ -331,10 +369,10 @@ you can specify URLs that contain the letters {}[] without having them being
interpreted by curl itself. Note that these letters are not normal legal URL
contents but they should be encoded according to the URI standard.
.IP "-G/--get"
When used, this option will make all data specified with -d/--data or
--data-binary to be used in a HTTP GET request instead of the POST request
that otherwise would be used. The data will be appended to the URL with a '?'
separator.
When used, this option will make all data specified with \fI-d/--data\fP or
\fI--data-binary\fP to be used in a HTTP GET request instead of the POST
request that otherwise would be used. The data will be appended to the URL
with a '?' separator.
If used in combination with -I, the POST data will instead be appended to the
URL with a HEAD request.
@@ -352,6 +390,8 @@ set headers without knowing perfectly well what you're doing. Replacing an
internal header with one without content on the right side of the colon will
prevent that header from appearing.
See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
This option can be used multiple times to add/replace/remove multiple headers.
.IP "-i/--include"
(HTTP)
@@ -363,7 +403,7 @@ If this option is used twice, the second will again disable header include.
Perform an operation using a specified interface. You can enter interface
name, IP address or host name. An example could look like:
.B "curl --interface eth0:1 http://www.netscape.com/"
curl --interface eth0:1 http://www.netscape.com/
If this option is used several times, the last one will be used.
.IP "-I/--head"
@@ -386,16 +426,27 @@ If this option is used several times, each occurrence will toggle this on/off.
and transfers. Starting with curl 7.10, all SSL connections will be attempted
to be made secure by using the CA certificate bundle installed by
default. This makes all connections considered "insecure" to fail unless
-k/--insecure is used.
This option is ignored if --cacert or --capath is used!
\fI-k/--insecure\fP is used.
If this option is used twice, the second time will again disable it.
.IP "--key <key>"
(SSL) Private key file name. Allows you to provide your private key in this
separate file.
If this option is used several times, the last one will be used.
.IP "--key-type <type>"
(SSL) Private key file type. Specify which type your \fI--key\fP provided
private key is. DER, PEM and ENG are supported.
If this option is used several times, the last one will be used.
.IP "--krb4 <level>"
(FTP) Enable kerberos4 authentication and use. The level must be entered and
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.
This option requiures that the library was built with kerberos4 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.
.IP "-K/--config <config file>"
Specify which config file to read curl arguments from. The config file is a
@@ -409,7 +460,7 @@ treated as a comment.
Specify the filename as '-' to make curl read the file from stdin.
Note that to be able to specify a URL in the config file, you need to specify
it using the --url option, and not by simply writing the URL on its own
it using the \fI--url\fP option, and not by simply writing the URL on its own
line. So, it could look similar to this:
url = "http://curl.haxx.se/docs/"
@@ -420,10 +471,13 @@ Specify the maximum transfer rate you want curl to use. This feature is useful
if you have a limited pipe and you'd like your transfer not use your entire
bandwidth.
The given speed is measured in bytes/second, unless a suffix is
appended. Appending 'k' or 'K' will count the number as kilobytes, 'm' or M'
makes it megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and
1G.
The given speed is measured in bytes/second, unless a suffix is appended.
Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it
megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
If you are also using the \fI-Y/--speed-limit\fP option, that option will take
precedence and might cripple the rate-limiting slightly, to help keeping the
speed-limit logic working.
This option was introduced in curl 7.10.
@@ -443,19 +497,20 @@ If this option is used twice, the second will again disable list only.
.IP "-L/--location"
(HTTP/HTTPS) If the server reports that the requested page has a different
location (indicated with the header line Location:) this flag will let curl
attempt to reattempt the get on the new place. If used together with -i or -I,
headers from all requested pages will be shown. If authentication is used,
curl will only send its credentials to the initial host, so if a redirect
takes curl to a different host, it won't intercept the user+password. See also
\fI--location-trusted\fP on how to change this.
attempt to reattempt the get on the new place. If used together with
\fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages will
be shown. If authentication is used, curl will only send its credentials to
the initial host, so if a redirect takes curl to a different host, it won't
intercept the user+password. See also \fI--location-trusted\fP on how to
change this.
If this option is used twice, the second will again disable location following.
.IP "--location-trusted"
(HTTP/HTTPS) Like \fI--location\fP, but will allow sending the name + password
to all hosts that the site may redirect to. This may or may not introduce a
security breach if the site redirects you do a site to which you'll send your
authentication info (which is plaintext in the case of HTTP Basic
authentication).
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
password to all hosts that the site may redirect to. This may or may not
introduce a security breach if the site redirects you do a site to which
you'll send your authentication info (which is plaintext in the case of HTTP
Basic authentication).
If this option is used twice, the second will again disable location following.
.IP "--max-filesize <bytes>"
@@ -476,11 +531,9 @@ If this option is used several times, the last one will be used.
.IP "-M/--manual"
Manual. Display the huge help text.
.IP "-n/--netrc"
Makes curl scan the
.I .netrc
file in the user's home directory for login name and password. This is
typically used for ftp on unix. If used with http, curl will enable user
authentication. See
Makes curl scan the \fI.netrc\fP file in the user's home directory for login
name and password. This is typically used for ftp on unix. If used with http,
curl will enable user authentication. See
.BR netrc(4)
or
.BR ftp(1)
@@ -489,14 +542,16 @@ hasn't the right permissions (it should not be world nor group
readable). The environment variable "HOME" is used to find the home
directory.
A quick and very simple example of how to setup a
.I .netrc
to allow curl to ftp to the machine host.domain.com with user name
\&'myself' and password 'secret' should look similar to:
A quick and very simple example of how to setup a \fI.netrc\fP to allow curl
to ftp to the machine host.domain.com with user name \&'myself' and password
'secret' should look similar to:
.B "machine host.domain.com login myself password secret"
If this option is used twice, the second will again disable netrc usage.
.IP "--netrc-optional"
Very similar to \fI--netrc\fP, but this option makes the .netrc usage
\fBoptional\fP and not mandatory as the \fI--netrc\fP does.
.IP "--negotiate"
(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
designed by Microsoft and is used in their web aplications. It is primarily
@@ -504,9 +559,9 @@ meant as a support for Kerberos5 authentication but may be also used along
with another authentication methods. For more information see IETF draft
draft-brezak-spnego-http-04.txt. (Added in 7.10.6)
\fBNOTE\fP that this option requiures that the library was built with GSSAPI
support. This is not very common. Use \fIcurl --version\fP to see if your
version supports GSS-Negotiate.
This option requiures that the library was built with GSSAPI support. This is
not very common. Use \fI-V/--version\fP to see if your version supports
GSS-Negotiate.
If this option is used several times, the following occurrences make no
difference.
@@ -525,8 +580,11 @@ on their efforts. This kind of behavior should not be endorsed, you should
encourage everyone who uses NTLM to switch to a public and documented
authentication method instead. Such as Digest. (Added in 7.10.6)
\fBNOTE\fP that this option requiures that the library was built with SSL
support. Use \fIcurl --version\fP to see if your version supports NTLM.
If you want to enable NTLM for your proxy authentication, then use
\fI--proxy-ntlm\fP.
This option requiures that the library was built with SSL support. Use
\fI-V/--version\fP to see if your curl supports NTLM.
If this option is used several times, the following occurrences make no
difference.
@@ -544,46 +602,64 @@ or use several variables like:
You may use this option as many times as you have number of URLs.
See also the --create-dirs option to create the local directories dynamically.
See also the \fI--create-dirs\fP option to create the local directories
dynamically.
.IP "-O/--remote-name"
Write output to a local file named like the remote file we get. (Only the file
part of the remote file is used, the path is cut off.)
You may use this option as many times as you have number of URLs.
.IP "--pass <phrase>"
(SSL) Pass phrase for the private key
If this option is used several times, the last one will be used.
.IP "--proxy-basic"
Tells curl to use HTTP Basic authentication when communicating with the given
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
the default authentication method curl uses with proxies.
If this option is used twice, the second will again disable proxy HTTP Basic
authentication.
.IP "--proxy-digest"
Tells curl to use HTTP Digest authentication when communicating with the given
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
If this option is used twice, the second will again disable proxy HTTP Digest.
.IP "--proxy-ntlm"
Tells curl to use HTTP NTLM authentication when communicating with the given
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
If this option is used twice, the second will again disable proxy HTTP NTLM.
.IP "-p/--proxytunnel"
When an HTTP proxy is used, this option will cause non-HTTP protocols to
attempt to tunnel through the proxy instead of merely using it to do HTTP-like
operations. The tunnel approach is made with the HTTP proxy CONNECT request
and requires that the proxy allows direct connect to the remote port number
curl wants to tunnel through to.
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
protocols to attempt to tunnel through the proxy instead of merely using it to
do HTTP-like operations. The tunnel approach is made with the HTTP proxy
CONNECT request and requires that the proxy allows direct connect to the
remote port number curl wants to tunnel through to.
If this option is used twice, the second will again disable proxy tunnel.
.IP "-P/--ftpport <address>"
(FTP)
Reverses the initiator/listener roles when connecting with ftp. This
switch makes Curl use the PORT command instead of PASV. In
practice, PORT 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> should be one of:
.IP "-P/--ftp-port <address>"
(FTP) Reverses the initiator/listener roles when connecting with ftp. This
switch makes Curl use the PORT command instead of PASV. In practice, PORT
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>
should be one of:
.RS
.TP 12
.B interface
.IP interface
i.e "eth0" to specify which interface's IP address you want to use (Unix only)
.TP
.B "IP address"
.IP "IP address"
i.e "192.168.10.1" to specify exact IP number
.TP
.B "host name"
.IP "host name"
i.e "my.host.domain" to specify machine
.TP
.B "-"
.IP "-"
(any single-letter string) to make it pick the machine's default
.RE
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. Disable the
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
.IP "-q"
If used as the first parameter on the command line, the
.I $HOME/.curlrc
If used as the first parameter on the command line, the \fI$HOME/.curlrc\fP
file will not be read and used as a config file.
.IP "-Q/--quote <comand>"
(FTP) Send an arbitrary command to the remote FTP server, by using the QUOTE
@@ -598,9 +674,7 @@ This option can be used multiple times.
.IP "--random-file <file>"
(HTTPS) Specify the path name to file containing what will be considered as
random data. The data is used to seed the random engine for SSL connections.
See also the
.I "--edg-file"
option.
See also the \fI--egd-file\fP option.
.IP "-r/--range <range>"
(HTTP/FTP)
Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP
@@ -655,12 +729,25 @@ If this option is used twice, the second will again disable mute.
When used with -s it makes curl show error message if it fails.
If this option is used twice, the second will again disable show error.
.IP "--socks <host[:port]>"
Use the specified SOCKS5 proxy. If the port number is not specified, it is
assumed at port 1080. (Option added in 7.11.1)
This option overrides any previous use of \fI-x/--proxy\fP, as they are
mutually exclusive.
If this option is used several times, the last one will be used.
.IP "--stderr <file>"
Redirect all writes to stderr to the specified file instead. If the file name
is a plain '-', it is instead written to stdout. This option has no point when
you're using a shell with decent redirecting capabilities.
If this option is used several times, the last one will be used.
.IP "--tcp-nodelay"
Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
details about this option. (Added in 7.11.2)
If this option is used several times, each occurance toggles this on/off.
.IP "-t/--telnet-option <OPT=val>"
Pass options to the telnet protocol. Supported options are:
@@ -704,35 +791,26 @@ Enables a full trace dump of all incoming and outgoing data, including
descriptive information, to the given output file. Use "-" as filename to have
the output sent to stdout.
This is very similar to --trace, but leaves out the hex part and only shows
the ASCII part of the dump. It makes smaller output that might be easier to
read for untrained humans.
This is very similar to \fI--trace\fP, but leaves out the hex part and only
shows the ASCII part of the dump. It makes smaller output that might be easier
to read for untrained humans.
If this option is used several times, the last one will be used. (Added in
7.9.7)
.IP "-u/--user <user:password>"
Specify user and password to use when fetching. Read the MANUAL for detailed
examples of how to use this. If no password is specified, curl will ask for it
interactively.
You can also use the --digest option to enable Digest authentication when
communicating with HTTP 1.1 servers.
Specify user and password to use for server authentication.
If this option is used several times, the last one will be used.
.IP "-U/--proxy-user <user:password>"
Specify user and password to use for Proxy authentication. If no
password is specified, curl will ask for it interactively.
Specify user and password to use for proxy authentication.
If this option is used several times, the last one will be used.
.IP "--url <URL>"
Specify a URL to fetch. This option is mostly handy when you want to specify
URL(s) in a config file.
This option may be used any number of times. To control where this URL is written, use the
.I -o
or the
.I -O
options.
This option may be used any number of times. To control where this URL is
written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options.
.IP "-v/--verbose"
Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines
starting with '>' means data sent by curl, '<' means data received by curl
@@ -756,8 +834,32 @@ The second line (starts with "Protocols:") shows all protocols that libcurl
reports to support.
The third line (starts with "Features:") shows specific features libcurl
reports to offer.
reports to offer. Available features include:
.RS
.IP "IPv6"
You can use IPv6 with this.
.IP "krb4"
Krb4 for ftp is supported.
.IP "SSL"
HTTPS and FTPS are supported.
.IP "libz"
Automatic decompression of compressed files over HTTP is supported.
.IP "NTLM"
NTLM authenticaion is supported.
.IP "GSS-Negotiate"
Negotiate authenticaion is supported.
.IP "Debug"
This curl uses a libcurl built with Debug. This enables more error-tracking
and memory debugging etc. For curl-developers only!
.IP "AsynchDNS"
This curl uses asynchronous name resolves.
.IP "SPNEGO"
SPNEGO Negotiate authenticaion is supported.
.IP "Largefile"
This curl supports transfers of large files, files larger than 2GB.
.IP "IDN"
This curl supports IDN - international domain names.
.RE
.IP "-w/--write-out <format>"
Defines what to display after a completed and successful operation. The format
is a string that may contain plain text mixed with any number of variables. The
@@ -887,9 +989,9 @@ than the specified date/time.
If this option is used several times, the last one will be used.
.IP "-Z/--max-redirs <num>"
Set maximum number of redirection-followings allowed. If -L/--location is
used, this option can be used to prevent curl from following redirections "in
absurdum".
Set maximum number of redirection-followings allowed. If \fI-L/--location\fP
is used, this option can be used to prevent curl from following redirections
\&"in absurdum".
If this option is used several times, the last one will be used.
.IP "-0/--http1.0"
@@ -987,7 +1089,7 @@ FTP quote error. A quote command returned error from the server.
.IP 22
HTTP page not retrieved. The requested url was not found or returned another
error with the HTTP error code being 400 or above. This return code only
appears if --fail is used.
appears if \fI-f/--fail\fP is used.
.IP 23
Write error. Curl couldn't write data to a local filesystem or similar.
.IP 24

View File

@@ -5,11 +5,11 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = README curlgtk.c sepheaders.c simple.c postit2.c \
persistant.c ftpget.c Makefile.example \
multithread.c getinmemory.c ftpupload.c httpput.c \
simplessl.c ftpgetresp.c http-post.c post-callback.c \
multi-app.c multi-double.c multi-single.c multi-post.c \
fopen.c simplepost.c makefile.dj curlx.c
persistant.c ftpget.c Makefile.example multithread.c getinmemory.c \
ftpupload.c httpput.c simplessl.c ftpgetresp.c http-post.c \
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 \
multi-debugcallback.c fileupload.c
all:
@echo "done"

View File

@@ -1,8 +1,8 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
@@ -17,10 +17,13 @@
#include <curl/types.h> /* new for v7 */
#include <curl/easy.h> /* new for v7 */
#include <pthread.h>
GtkWidget *Bar;
size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
return fwrite(ptr, size, nmemb, stream);
}
size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
{
return fread(ptr, size, nmemb, stream);
@@ -45,25 +48,27 @@ void *curl_thread(void *ptr)
CURLcode res;
FILE *outfile;
gchar *url = ptr;
curl = curl_easy_init();
if(curl)
{
outfile = fopen("/tmp/test.curl", "w");
outfile = fopen("test.curl", "w");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_FILE, outfile);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
res = curl_easy_perform(curl);
fclose(outfile);
/* always cleanup */
curl_easy_cleanup(curl);
}
return NULL;
}
@@ -71,11 +76,10 @@ int main(int argc, char **argv)
{
GtkWidget *Window, *Frame, *Frame2;
GtkAdjustment *adj;
pthread_t curl_tid;
/* Init thread */
g_thread_init(NULL);
gtk_init(&argc, &argv);
Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
Frame = gtk_frame_new(NULL);
@@ -90,8 +94,10 @@ int main(int argc, char **argv)
gtk_container_add(GTK_CONTAINER(Frame2), Bar);
gtk_widget_show_all(Window);
pthread_create(&curl_tid, NULL, curl_thread, argv[1]);
if (!g_thread_create(&curl_thread, argv[1], FALSE, NULL) != 0)
g_warning("can't create the thread");
gdk_threads_enter();
gtk_main();
gdk_threads_leave();

View File

@@ -0,0 +1,65 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*/
#include <stdio.h>
#include <curl/curl.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl_off_t size;
struct stat file_info;
double speed_upload, total_time;
FILE *fd;
fd = fopen("debugit", "r"); /* open file to upload */
if(!fd) {
return 1; /* can't continue */
}
stat("debugit", &file_info); /* to get the file size */
curl = curl_easy_init();
if(curl) {
/* upload to this place */
curl_easy_setopt(curl, CURLOPT_URL,
"file:///home/dast/src/curl/debug/new");
/* tell it to "upload" to the URL */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
/* set where to read from (on Windows you need to use READFUNCTION too) */
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
/* and give the size of the upload (optional) */
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
(curl_off_t)file_info.st_size);
/* enable verbose for easier tracing */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
res = curl_easy_perform(curl);
/* now extract transfer info */
curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n",
speed_upload, total_time);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}

View File

@@ -51,11 +51,6 @@
#include <curl/curl.h>
#if (LIBCURL_VERSION_NUM < 0x070907)
#error "too old libcurl version, get the latest!"
#endif
enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
struct fcurl_data
@@ -236,7 +231,7 @@ url_fopen(char *url,const char *operation)
file->handle.curl = curl_easy_init();
curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
curl_easy_setopt(file->handle.curl, CURLOPT_FILE, 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_WRITEFUNCTION, write_callback);

View File

@@ -58,7 +58,7 @@ int main(void)
/* Define our callback to get called when there's data to be written */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
/* Set a pointer to our struct to pass to the callback */
curl_easy_setopt(curl, CURLOPT_FILE, &ftpfile);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
/* Switch on full protocol/debug output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);

View File

@@ -45,7 +45,7 @@ int main(int argc, char **argv)
if(curl) {
/* Get a file listing from sunet */
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
curl_easy_setopt(curl, CURLOPT_FILE, ftpfile);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
res = curl_easy_perform(curl);

View File

@@ -1,8 +1,8 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
close(hd) ;
/* get a FILE * of the same file, could also be made with
fdopen() from the previous descriptor, but hey this is just
fdopen() from the previous descriptor, but hey this is just
an example! */
hd_src = fopen(LOCAL_FILE, "rb");
@@ -70,10 +70,10 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
/* now specify which file to upload */
curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */
curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);

View File

@@ -13,9 +13,6 @@
* This exact source code has not been verified to work.
*/
/* to make this work under windows, use the win32-functions from the
win32socket.c file as well */
#include <stdio.h>
#include <curl/curl.h>
@@ -51,6 +48,8 @@ int main(int argc, char **argv)
chunk.memory=NULL; /* we expect realloc(NULL, size) to work */
chunk.size = 0; /* no data at this point */
curl_global_init(CURL_GLOBAL_ALL);
/* init the curl session */
curl_handle = curl_easy_init();
@@ -61,7 +60,11 @@ int main(int argc, char **argv)
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl_handle, CURLOPT_FILE, (void *)&chunk);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
/* some servers don't like requests that are made without a user-agent
field, so we provide one */
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
/* get it! */
curl_easy_perform(curl_handle);

View File

@@ -78,14 +78,15 @@ int main(int argc, char **argv)
/* HTTP PUT please */
curl_easy_setopt(curl, CURLOPT_PUT, TRUE);
/* specify target */
/* specify target URL, and note that this URL should include a file
name, not only a directory */
curl_easy_setopt(curl,CURLOPT_URL, url);
/* now specify which file to upload */
curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
/* and give the size of the upload (optional) */
curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
/* and give the size of the upload */
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);

53
docs/examples/https.c Normal file
View File

@@ -0,0 +1,53 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*/
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
#ifdef SKIP_PEER_VERIFICATION
/*
* If you want to connect to a site who isn't using a certificate that is
* signed by one of the certs in the CA bundle you have, you can skip the
* verification of the server's certificate. This makes the connection
* A LOT LESS SECURE.
*
* If you have a CA cert for the server stored someplace else than in the
* default bundle, then the CURLOPT_CAPATH option might come handy for
* you.
*/
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
#endif
#ifdef SKIP_HOSTNAME_VERFICATION
/*
* If the site you're connecting to uses a different host name that what
* they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl will refuse to connect. You can skip
* this check, but this will make the connection less secure.
*/
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}

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