Commit Graph

4444 Commits

Author SHA1 Message Date
Daniel Stenberg 4b3ae5e157 - Christian Krause reported and fixed a memory leak that would occur with HTTP
GSS/kerberos authentication (http://curl.haxx.se/bug/view.cgi?id=2284386)
2008-11-19 14:22:01 +00:00
Daniel Stenberg 797bc8504c - Andreas Wurf and Markus Koetter helped me analyze a problem that Andreas got
when uploading files to a single FTP server using multiple easy handle
  handles with the multi interface. Occasionally a handle would stall in
  mysterious ways.

  The problem turned out to be a side-effect of the ConnectionExists()
  function's eagerness to re-use a handle for HTTP pipelining so it would
  select it even if already being in use, due to an inadequate check for its
  chances of being used for pipelnining.
2008-11-19 10:15:19 +00:00
Dan Fandrich a028c69f48 Avoid creating garbage on an OOM error 2008-11-18 19:58:44 +00:00
Dan Fandrich 9aac2328c6 Made an array static const 2008-11-18 09:11:34 +00:00
Dan Fandrich e5084c1eca Added #include "rawstr.h" 2008-11-18 08:53:51 +00:00
Yang Tse a15b6a6f86 the IP address we want/request/use from the interface is the 'local'
address, the one on the box libcurl is running, not the 'remote' one.
2008-11-17 19:08:35 +00:00
Yang Tse 20d3e2b967 fix comment 2008-11-17 14:26:22 +00:00
Yang Tse 608fdce0a0 if2ip.c related preprocessor cleanup 2008-11-17 14:24:15 +00:00
Yang Tse 73060b4523 backport fix for failures to reject certain malformed literals 2008-11-17 02:40:41 +00:00
Daniel Stenberg c76d939563 Christian Krause fixed a build failure when building with gss support
enabled and FTP disabled.
2008-11-16 12:42:53 +00:00
Daniel Stenberg 3c4b69f95d fix OOM problem reported by Jim Meyering 2008-11-16 12:26:50 +00:00
Daniel Stenberg da6c15163b based on a report by Jim Meyering, I went over and added checks for return
codes for all calls to malloc and strdup that were missing. I also changed
a few malloc(13) to use arrays on the stack and a few malloc(PATH_MAX) to
instead use aprintf() to lower memory use.
I also fixed a memory leak in Curl_nss_connect() when CURLOPT_ISSUERCERT is
in use.
2008-11-15 23:43:10 +00:00
Dan Fandrich ea8fbb5233 Added some #ifdefs around header files and change the EAGAIN test to
fix compilation on Cell (reported by Jeff Curley).
2008-11-14 23:17:32 +00:00
Dan Fandrich 9b033e1b8a Added .xml as one of the few common file extensions known by the multipart
form generator.  Made the extensions part of the MIME type struct to reduce
the size and run-time relocations necessary to build the table.
2008-11-14 19:22:40 +00:00
Daniel Stenberg 2249c12a3c fix an OOM problem detected by Jim Meyering 2008-11-14 16:26:39 +00:00
Daniel Stenberg b4ac9cd02c Remove a chunk of unused code that was #ifdef'de on defines we never set.
We do testing of code functions using the test suite instead!
2008-11-14 16:22:18 +00:00
Yang Tse 17d2a464ad Refactor configure script detection of functions used to set sockets into
non-blocking mode, and decouple function detection from function capability.
2008-11-13 18:56:55 +00:00
Michal Marek c331c73ec6 - Fixed a potential data loss in Curl_client_write() when the transfer is
paused.
2008-11-13 08:20:23 +00:00
Gunter Knauf b686dc4911 changed to latest libidn version. 2008-11-13 01:39:10 +00:00
Gunter Knauf 78936b2f2a changed defines to make autobuild logs display libidn usage. 2008-11-13 01:36:04 +00:00
Daniel Stenberg 4cbc0f6c2e - Rainer Canavan filed bug #2255627
(http://curl.haxx.se/bug/view.cgi?id=2255627) which pointed out that a
  program using libcurl's multi interface to download a HTTPS page with a
  libcurl built powered by OpenSSL, would easily get silly and instead hand
  over SSL details as data instead of the actual HTTP headers and body. This
  happened because libcurl would consider the connection handshake done too
  early. This problem was introduced at September 22nd 2008 with my fix of the
  bug #2107377

  The correct fix is now instead done within the GnuTLS-handling code, as both
  the OpenSSL and the NSS code already deal with this situation in similar
  fashion. I added test case 560 in an attempt to verify this fix, but
  unfortunately it didn't trigger it even before this fix!
2008-11-11 22:19:27 +00:00
Gunter Knauf b872086c74 updated OpenSSL version. 2008-11-11 19:43:35 +00:00
Gunter Knauf e0af4a15d0 added libidn build. 2008-11-11 19:42:35 +00:00
Gunter Knauf d31802ed98 updated coment, updated OpenSSL version. 2008-11-11 17:46:31 +00:00
Gunter Knauf 87c4136bd4 added libidn build. 2008-11-11 17:43:02 +00:00
Yang Tse 707828b71a Related with bug #2230535 (http://curl.haxx.se/bug/view.cgi?id=2230535)
Daniel Fandrich noticed that curl_addrinfo was also missing in the build
process of other four non-configure platforms. Added now.
2008-11-11 01:12:17 +00:00
Dan Fandrich 6354cbf9d6 The getifaddrs() version of Curl_if2ip() crashed when used on a Linux
system with a TEQL load-balancing device configured, which doesn't
have an address.  Thanks to Adam Sampson for spotting this (bug #2234923).
2008-11-07 18:33:20 +00:00
Yang Tse 4a4885eead Add missing curl_addrinfo, and sort the list. 2008-11-06 18:50:32 +00:00
Yang Tse a0ef686c54 Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single one
which now also takes a protocol address family argument.
2008-11-06 17:19:56 +00:00
Dan Fandrich 5e3c2af236 Factored out some common code into a new function output_auth_headers 2008-11-06 00:01:13 +00:00
Daniel Stenberg b80c5cff49 corrected and clarified the *_SPEED_LARGE comments 2008-11-05 21:46:40 +00:00
Daniel Stenberg 5ca2a8318d CURLINFO_FILETIME now works for file:// transfers as well 2008-11-04 09:57:36 +00:00
Daniel Stenberg d0b8b5a199 - Bug #2218480 (http://curl.haxx.se/bug/view.cgi?id=2218480) pointed out a
problem with my CURLINFO_PRIMARY_IP fix from October 7th that caused a NULL
  pointer read. I also took the opportunity to clean up this logic (storing of
  the connection's IP address) somewhat as we had it stored in two different
  places and ways previously and they are now unified.
2008-11-03 16:24:56 +00:00
Gisle Vanem 71f00188fb Added '#define HAVE_GETNAMEINFO' and qualifiers/types
for it.
2008-11-03 15:24:44 +00:00
Gisle Vanem a1c9cb8860 djgpp/DOS does have getaddrinfo(). 2008-11-03 15:15:53 +00:00
Yang Tse 74e9718370 fix length of longest IPv6 address string 2008-11-03 14:58:08 +00:00
Daniel Stenberg 2d71c9cdfd I liked Daniel Johnson's simplified version bumper guide so I modified the
instruction in the comments to use that instead! Original mail:
http://curl.haxx.se/mail/lib-2008-11/0019.html
2008-11-03 08:50:58 +00:00
Dan Fandrich 484d549ece Marked with TODO comments a number of problems in the Kerberos code detected
while investigating the issue in http://curl.haxx.se/mail/lib-2008-09/0262.html
I'm hesitant to fix them because I have no way of testing the result.
2008-11-02 05:01:39 +00:00
Daniel Stenberg 85ffd33f08 Daniel Johnson reported and fixed ipv4 name resolves when libcurl is built
with ipv6-enabled c-ares
2008-11-01 23:49:54 +00:00
Daniel Stenberg 383d4656aa bump VERSIONINFO for the upcoming release 2008-11-01 23:05:48 +00:00
Yang Tse 128418b214 Adjust WIN32 freeaddrinfo, getaddrinfo and getnameinfo availability 2008-11-01 17:13:10 +00:00
Yang Tse 050a39a7a5 WIN32 availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite
convoluted, compiler dependant and in some cases even build target dependat.
2008-11-01 16:52:57 +00:00
Gisle Vanem 5f085789b9 init_resolve_thread() needs 'hints' on the native form. 2008-11-01 15:16:47 +00:00
Gisle Vanem 6a8832d83b Added '#define HAVE_GETADDRINFO'. 2008-11-01 15:03:16 +00:00
Gisle Vanem fcb498b0d5 Added curl_addrinfo.obj. Rearranged alphabetically. 2008-11-01 15:02:16 +00:00
Gisle Vanem 0433252e50 Fix typos. 2008-11-01 14:51:37 +00:00
Yang Tse 9e1294e866 NetWare LIBC target has getaddrinfo() and freeaddrinfo() 2008-10-30 20:17:37 +00:00
Yang Tse c2c800d863 Move curl_dofreeaddrinfo() and curl_dofreeaddrinfo()
implementation from lib/hostip6.c to lib/curl_addrinfo.c
and prototypes from lib/hostip.h to lib/curl_addrinfo.h
2008-10-30 19:02:23 +00:00
Yang Tse 625c107c25 remove bogus whitespace 2008-10-30 18:12:08 +00:00
Yang Tse ad3c1c37bb These two variables are now Curl_addrinfo pointers 2008-10-30 16:39:09 +00:00
Yang Tse 005bf19acf remove bogus comment 2008-10-30 15:13:22 +00:00
Yang Tse 0ce97f77e0 Use our Curl_addrinfo definition even when an addrinfo struct is available.
Use a wrapper function to call system's getaddrinfo().
2008-10-30 13:45:25 +00:00
Dan Fandrich 4fef0d4f14 Fixed a bug that caused a few bytes of garbage to be sent after a
curl_easy_pause() during a chunky upload. Reported by Steve Roskowski.
2008-10-29 19:06:48 +00:00
Daniel Stenberg f0bb9c7d8d added an extra set of braces to unconfuse emacs and then I re-indented a
section of the code that was odd-looking previously
2008-10-28 23:34:19 +00:00
Yang Tse e29f62f0a7 add null-pointer check 2008-10-27 05:29:17 +00:00
Yang Tse 417bac4055 add missing header inclusions 2008-10-25 16:15:21 +00:00
Dan Fandrich e9c94cdd49 Added experimental support for zlib and OpenSSL on Symbian OS. 2008-10-25 05:41:01 +00:00
Yang Tse d086fdaf9f add missing header inclusions 2008-10-25 03:52:21 +00:00
Dan Fandrich 8693afdfea Stop using in6addr_any because it's not available everywhere (e.g. Symbian)
and isn't strictly needed here.
2008-10-24 18:59:51 +00:00
Yang Tse 10035c898b fix compiler warning 2008-10-24 16:59:35 +00:00
Yang Tse 6ea91af2f8 fix compiler warning 2008-10-24 01:27:00 +00:00
Dan Fandrich 4174ec7116 Added rawstr.c to the non-configure libcurl makefiles 2008-10-23 17:29:14 +00:00
Daniel Stenberg b701ea36a7 moved the Curl_raw_ functions into the new lib/rawstr.c file for easier curlx_
inclusion by the curl tool without colliding with the curl_strequal functions.
2008-10-23 11:49:19 +00:00
Daniel Stenberg 6c14c96e71 added include to make the krb4 code compile again 2008-10-23 08:06:47 +00:00
Dan Fandrich 976963cd21 Really old gcc doesn't like parenthesis around the names of functions that
don't have prototypes. They didn't serve any useful purpose here, anyway.
2008-10-23 08:05:40 +00:00
Dan Fandrich bab5183820 Created Curl_raw_nequal() which does a C-locale string case comparison.
Changed checkprefix() to use it and those instances of strnequal() that
compare host names or other protocol strings that are defined to be
independent of case in the C locale.  This should fix a few more
Turkish locale problems.
2008-10-23 01:20:57 +00:00
Dan Fandrich d22b2d181f Fixed a compiler warning with --disable-proxy 2008-10-22 17:36:48 +00:00
Dan Fandrich 7fc4e8af0a Changed some arrays of char* to arrays of char[] to reduce data size and
run-time relocations.
2008-10-22 05:46:29 +00:00
Dan Fandrich 4198bb88b6 Compile away some more code in the CURL_DISABLE_PROXY case. 2008-10-21 23:15:19 +00:00
Dan Fandrich 7ff38c14a9 Fixed some problems with SFTP range support to fix test cases 634 through 637. 2008-10-21 07:10:25 +00:00
Yang Tse 6bd91936ff remove debug-code which zero-filled some structures before free()ing them 2008-10-20 23:24:35 +00:00
Dan Fandrich 035a2e5479 A few prototypes shouldn't be defined if SSL is disabled. 2008-10-20 23:07:48 +00:00
Yang Tse 6983ba3225 *** empty log message *** 2008-10-20 23:05:52 +00:00
Daniel Stenberg 0bb91218c5 added a NULL pointer check for the name field as it can in fact be NULL when
dereferenced here, if the app passes in a funny combo. Detected by coverity.com
2008-10-20 21:56:35 +00:00
Yang Tse b843c27322 fix compiler warning 2008-10-19 22:46:54 +00:00
Yang Tse b416b87518 oops 2008-10-19 20:41:03 +00:00
Yang Tse 5779283a52 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-19 20:17:16 +00:00
Daniel Stenberg 80d0dcc9a3 clarified an argument's situation due to a false positive alert pointed out
by coverity.com
2008-10-19 18:20:47 +00:00
Dan Fandrich d51ad518c4 Fixed a compiler warning in the CURL_DISABLE_HTTP case 2008-10-19 04:48:15 +00:00
Yang Tse 29ba1730ca attempt to fix compiler warning relative to potential misaligned data access 2008-10-19 01:02:18 +00:00
Dan Fandrich 183210619d Removed some more code in the CURL_DISABLE_HTTP case 2008-10-18 01:23:14 +00:00
Dan Fandrich feff911fb7 Removed a line of dead code (discovered by Coverity) 2008-10-18 01:17:27 +00:00
Dan Fandrich 8eee5f3253 Forgot it's a struct 2008-10-17 22:33:08 +00:00
Dan Fandrich 3e55fef5e1 Fixed a compile error reported by Albert Chin on AIX and IRIX when using
GTLS.
2008-10-17 22:23:48 +00:00
Yang Tse 8254bbae56 protect against 'use after free' or race condition 2008-10-17 15:29:35 +00:00
Yang Tse e7886aa9b4 oops ;-) 2008-10-17 13:55:13 +00:00
Yang Tse fb08868e54 oops 2008-10-17 13:33:13 +00:00
Daniel Stenberg c141d99059 fix syntax error 2008-10-17 13:23:21 +00:00
Yang Tse 4acbe8f20c fix compiler warning 2008-10-17 12:53:53 +00:00
Yang Tse 2ea70a5c73 OOM condition fix 2008-10-17 12:49:02 +00:00
Yang Tse 98b13037e7 remove some spurious line-endings 2008-10-17 03:59:02 +00:00
Yang Tse 29f09f71b4 portability fix to avoid memory alignment problems 2008-10-17 03:38:36 +00:00
Dan Fandrich a00b6e258d Return an error when a proxy option is set when configured with
--disable-proxy mode.
Removed some unnecessary prototypes.
2008-10-16 22:56:40 +00:00
Daniel Stenberg 54582bdce9 don't segfault when NULL is passed in to CURLOPT_USERPWD or
CURLOPT_PROXYUSERPWD
2008-10-16 20:43:02 +00:00
Daniel Stenberg a9a4300a36 - Igor Novoseltsev added CURLOPT_PROXYUSER and CURLOPT_PROXYPASSWORD that then
make CURLOPT_PROXYUSERPWD sort of deprecated. The primary motive for adding
  these new options is that they have no problems with the colon separator
  that the CURLOPT_PROXYUSERPWD option does.
2008-10-16 20:21:22 +00:00
Daniel Stenberg 9d16b4081e Renamed Curl_ascii_equal to Curl_raw_equal and bugfixed the my_toupper function
used in strequal.c so now all test cases run fine for me again.
2008-10-16 08:23:48 +00:00
Daniel Stenberg 545cafce9b Curl_ascii_equal() must not assume that the string is actually ASCII (so that a-z
are consecutive and with a 0x20 "distance" to the uppercase letter), since we do
support EBCDIC as well. Thus I replaced the macro with a (larger) switch case.

I better change the function name...
2008-10-16 07:59:00 +00:00
Daniel Stenberg 5175664174 fix warning 2008-10-15 21:44:49 +00:00
Daniel Stenberg a579d67064 - Pascal Terjan filed bug #2154627
(http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl
  uses strcasecmp() in multiple places where it causes failures when the
  Turkish locale is used. This is because 'i' and 'I' isn't the same letter so
  strcasecmp() on those letters are different in Turkish than in English (or
  just about all other languages). I thus introduced a totally new internal
  function in libcurl (called Curl_ascii_equal) for doing case insentive
  comparisons for english-(ascii?) style strings that thus will make "file"
  and "FILE" match even if the Turkish locale is selected.
2008-10-15 21:43:48 +00:00
Daniel Stenberg 0ea1c28135 removed the proto as well since the function is now gone 2008-10-15 11:31:39 +00:00