Commit Graph

2152 Commits

Author SHA1 Message Date
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 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 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 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 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 04e2520dbb new attempt at an improved DSP-file generation 2004-05-11 07:54:55 +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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 26b8b3fc53 updated with more and new info 2004-04-30 08:51:19 +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 1756499b11 oops, a bad strtok() was fixed by Luca 2004-04-30 05:53:42 +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 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 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 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 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 80d2fff1a1 oops, .obj not .c! 2004-04-26 20:41:33 +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