Commit Graph

4677 Commits

Author SHA1 Message Date
Yang Tse 4ea513cc38 fix compiler warning 2009-06-12 02:41:16 +00:00
Yang Tse 2c93f889fd DOS adjustments 2009-06-11 16:43:47 +00:00
Daniel Stenberg 352177090f - Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and
contributed a range of patches to fix them.
2009-06-10 21:26:11 +00:00
Yang Tse 2c16681225 Adjusted to take in account that...
With the curl memory tracking feature decoupled from the debug build feature,
CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows:

CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug)

DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-06-10 02:49:42 +00:00
Bill Hoffman 744dceaffe ENH: lower case cmake functions and remove tabs and re-indent cmake code 2009-06-09 17:29:16 +00:00
Yang Tse 16ae283fb4 initialize fread callback pointer to avoid compiler warning 2009-06-09 00:49:34 +00:00
Daniel Stenberg 3e0c067e43 - Claes Jakobsson provided a patch for libcurl-NSS that fixed a bad refcount
issue with client certs that caused issues like segfaults.
  http://curl.haxx.se/mail/lib-2009-05/0316.html
2009-06-08 21:25:16 +00:00
Yang Tse 01b74950b7 Igor Novoseltsev adjusted Makefile.vxworks to get sources and headers
included from Makefile.inc
2009-06-08 15:49:02 +00:00
Daniel Stenberg 6f3e817372 ../include/curl/curlbuild.h.dist is not present in release archives so
the makefile cannot depend on it
2009-06-08 13:53:23 +00:00
Yang Tse 8d581f7fe4 Revert delegating c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.

This embedded c-ares linking is again handled from the configure script.
2009-06-06 13:20:39 +00:00
Daniel Stenberg 1012c5705a - Setting the Content-Length: header from your app when you do a POST or PUT
is almost always a VERY BAD IDEA. Yet there are still apps out there doing
  this, and now recently it triggered a bug/side-effect in libcurl as when
  libcurl sends a POST or PUT with NTLM, it sends an empty post first when it
  knows it will just get a 401/407 back. If the app then replaced the
  Content-Length header, it caused the server to wait for input that libcurl
  wouldn't send. Aaron Oneal reported this problem in bug report #2799008
  http://curl.haxx.se/bug/view.cgi?id=2799008) and helped us verify the fix.
2009-06-05 06:18:42 +00:00
Yang Tse 1c2947581b fix shadowing of a global declaration 2009-06-04 23:55:56 +00:00
Yang Tse 00883822be allow building libcurl for VxWorks 2009-06-04 19:11:11 +00:00
Yang Tse 13fdb9d8a5 c-ares embbeded builds header include paths fully defined in makefiles 2009-06-04 04:13:39 +00:00
Yang Tse cd5e6743f7 Delegate c-ares linking magic on libtool and auto-makefiles when using
the uninstalled c-ares libtool archive built from the CVS embedded tree.
2009-05-30 15:56:42 +00:00
Daniel Stenberg c9188e2260 corrected comments 2009-05-29 07:43:43 +00:00
Dan Fandrich 15eaf27bc7 Fixed a few comment typos (from the FreeBSD ports) 2009-05-28 21:32:31 +00:00
Yang Tse 348ffbc47e fix compiler warning: variable was set but never used 2009-05-28 16:19:03 +00:00
Yang Tse f13cbcf175 fix compiler warning: unused parameter 2009-05-28 16:18:25 +00:00
Daniel Stenberg 0bf9c1e881 - Claes Jakobsson fixed libcurl-NSS to build fine even without the
PK11_CreateGenericObject() function.
2009-05-27 22:01:03 +00:00
Daniel Stenberg bf07d37737 - Mike Crowe pointed out that setting CURLOPT_USERPWD to NULL used to clear
the auth credentials back in 7.19.0 and earlier while now you have to set ""
  to get the same effect. His patch brings back the ability to use NULL.
2009-05-27 21:45:12 +00:00
Daniel Stenberg eecb713616 - Andre Guibert de Bruet found a call to a OpenSSL function that didn't check
for a failure properly.
2009-05-27 21:15:38 +00:00
Daniel Stenberg bf085e2c4b - Frank McGeough provided a small OpenSSL #include fix to make libcurl compile
fine with Nokia 5th edition 1.0 SDK for Symbian.
2009-05-27 21:11:11 +00:00
Daniel Stenberg 1cf6c15ab4 - bug report #2796358 (http://curl.haxx.se/bug/view.cgi?id=2796358) pointed
out that the cookie parser would leak memory when it parses cookies that are
  received with domain, path etc set multiple times in the same header. While
  such a cookie is questionable, they occur in the wild and libcurl no longer
  leaks memory for them. I added such a header to test case 8.
2009-05-25 12:23:22 +00:00
Dan Fandrich 8519682564 Removed some obsolete digest code that caused a valgrind error in test 551. 2009-05-22 17:26:49 +00:00
Gunter Knauf 1bb68cbcfa changed ssh.c to use HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION define provided by libssh2.h; removed related define block from ssh.h. 2009-05-19 23:21:25 +00:00
Daniel Stenberg de7a14003c - Kamil Dudka brought the patch from the Redhat bug entry
https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing
  a bad file descriptor when closing down the FTP data connection.  Caolan
  McNamara seems to be the original author of it.
2009-05-19 20:54:31 +00:00
Yang Tse 4677778f85 Remove empty line used to force CVS to update the $Id date string format 2009-05-19 12:12:22 +00:00
Yang Tse 0427b783e2 Add empty line, to force CVS to update the $Id date string format 2009-05-18 12:33:51 +00:00
Yang Tse 4650732f4a Update copyright year, to force CVS to update the $Id date string format 2009-05-18 12:25:45 +00:00
Yang Tse 0cf8d4f8e8 Simplify c-ares function capability check 2009-05-18 00:25:48 +00:00
Gunter Knauf 4c9c9f0b89 fixed case. 2009-05-17 18:22:39 +00:00
Yang Tse 13db2916de Take in account c-ares 1.6.1 introduces ares_library_init() and ares_library_cleanup() 2009-05-17 17:40:30 +00:00
Daniel Stenberg 3cb06eb2b2 - James Bursa posted a patch to the mailing list that fixed a problem with
no_proxy which made it not skip the proxy if the URL entered contained a
  user name. I added test case 1101 to verify.
2009-05-17 14:47:50 +00:00
Daniel Stenberg 80d2df7789 Reverted my change to use Curl_connected_proxy() here. Clearly I wasn't
thinking straight.
2009-05-12 18:56:33 +00:00
Daniel Stenberg 611b3584d6 make no proxy set return OK from Curl_connected_proxy() since it will be called
unconditionally
2009-05-12 07:38:31 +00:00
Daniel Stenberg bcdbba05d3 moved variables more locally to get rid of one set of #ifdefs 2009-05-11 12:13:41 +00:00
Daniel Stenberg 51d1f309cd Use Curl_connected_proxy() here instead of duplicating code. Spell out the
badness in the code flow even for the socks case.
2009-05-11 11:49:39 +00:00
Daniel Stenberg f04720afb8 fix the Curl_connected_proxy function for when libcurl actually connects fine
to it in the actual connect call and not asynchronously.
2009-05-11 11:45:56 +00:00
Daniel Stenberg 242a17b9e0 - Balint Szilakszi reported a memory leak when libcurl did gzip decompression
of streams that had some parts (legitimately) missing. We now provide and use
  a proper cleanup function for the content encoding submodule.
  http://curl.haxx.se/mail/lib-2009-05/0092.html
2009-05-11 09:55:28 +00:00
Daniel Stenberg 6e1632c606 - Kamil Dudka provided a fix for libcurl-NSS reported by Michael Cronenworth
at https://bugzilla.redhat.com/show_bug.cgi?id=453612#c12

  If an incorrect password is given while loading a private key, libcurl ends
  up in an infinite loop consuming memory. The bug is critical.
2009-05-11 09:13:49 +00:00
Daniel Stenberg 56dab605f1 - I fixed the problem with doing NTLM, POST and then following a 302 redirect,
as reported by Ebenezer Ikonne (on curl-users) and Laurent Rabret (on
  curl-library). The transfer was mistakenly marked to get more data to send
  but since it didn't actually have that, it just hung there...
2009-05-11 08:55:58 +00:00
Daniel Stenberg 3aa3d7e629 Internal cleanup: KEEP_WRITE and KEEP_READ are now called KEEP_SEND and
KEEP_RECV to better match the general terminology: receive and send is what we
do from the (remote) servers. We read and write from and to the local fs.
2009-05-11 07:53:38 +00:00
Daniel Stenberg effbd99384 - Andre Guibert de Bruet correctly pointed out an over-alloc with one wasted
byte in the digest code.
2009-05-10 21:33:55 +00:00
Yang Tse b8c438f22d Fix function call pointed data size argument mismatch on 64Bit systems 2009-05-10 10:25:23 +00:00
Yang Tse a85271ce0a Fix type cast 2009-05-10 10:24:53 +00:00
Daniel Stenberg fd5e69f769 ConnectPlease() fixed for the new proxy connect functionality to make sure
'connected' truly is false when the socks connect fails.

Curl_done() fixed for the check-conn->bits.done-before-Curl_getoff_all_pipelines case
2009-05-09 21:34:48 +00:00
Yang Tse ddb0b8d8b8 Fix libssh2 preprocessor symbol definition check 2009-05-09 15:32:59 +00:00
Yang Tse f77f2709a9 Ignore more files for cvs 2009-05-09 10:09:33 +00:00
Yang Tse 9314e9e853 Fix CR 2009-05-08 19:09:36 +00:00
Yang Tse 838ddf8f55 Renamed vc6 workspace and project files to avoid filename clash when used for conversion to later VS versions. 2009-05-08 18:55:42 +00:00
Yang Tse 619869c639 Renamed vc6 workspace and project files to avoid filename clash when used for conversion to later VS versions. 2009-05-08 17:51:44 +00:00
Daniel Stenberg e84c7db049 - Constantine Sapuntzakis fixed bug report #2784055
(http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to
  connect to SOCKS proxies when using the multi interface. It turned out to
  almost not work at all previously. We need to wait for the TCP connect to
  be properly verified before doing the SOCKS magic.

  There's still a flaw in the FTP code for this.
2009-05-08 10:59:40 +00:00
Daniel Stenberg 6ca321ca75 Curl_sndbufset is (at times) defined in the header, no need to do it again here 2009-05-07 20:02:51 +00:00
Daniel Stenberg 9c788a529b - Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
well. See change 28 Apr 2009.
2009-05-07 20:00:44 +00:00
Yang Tse ac9d92587e Fix an issue, affecting FTP transfers, introduced with the transfer.c patch committed May 4.
Additionally some identation fixes.
2009-05-07 18:03:49 +00:00
Daniel Stenberg 7bdd14a994 - Vijay G filed bug report #2723236
(http://curl.haxx.se/bug/view.cgi?id=2723236) identifying a problem with
  libcurl's TFTP code and its lack of dealing with the OACK packet.
2009-05-07 08:30:43 +00:00
Yang Tse a1708730c3 fix compiler warning 2009-05-05 13:04:33 +00:00
Daniel Stenberg b40b989523 I simplified the SSL session id re-use code now to *always* ditch the previous
one and store the current one, as it makes the code less complex and I'm not
even sure I can check for the same session id using memcmp() like that.
2009-05-05 08:33:29 +00:00
Daniel Stenberg 915dfb494e - Inspired by Michael Smith's session id fix for OpenSSL, I did the
corresponding fix in the GnuTLS code: make sure to store the new session id
  in case the re-used one is rejected.
2009-05-04 22:20:09 +00:00
Daniel Stenberg a16cca7680 - Michael Smith posted bug report #2786255
(http://curl.haxx.se/bug/view.cgi?id=2786255) with a patch, identifying how
  libcurl did not deal with SSL session ids properly if the server rejected a
  re-use of one. Starting now, it will forget the rejected one and remember
  the new. This change was for OpenSSL only, it is likely that other SSL lib
  code needs similar fixes.
2009-05-04 21:57:14 +00:00
Yang Tse 4422f80ae7 David McCreedy's "transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII platform HTTP requests" patch 2009-05-04 09:47:02 +00:00
Yang Tse 9137e717b0 Use build-time configured curl_socklen_t instead of socklen_t 2009-05-02 02:37:32 +00:00
Yang Tse 0569c9c1be David McCreedy's "http.c fix to Curl_proxyCONNECT for non-ASCII platforms" patch 2009-05-01 13:00:38 +00:00
Yang Tse 5a91746b80 David McCreedy's "TPF-platform specific changes to various files" patch 2009-05-01 12:39:40 +00:00
Yang Tse c174b13f8b fix compiler warning: unused parameter 2009-04-30 09:32:02 +00:00
Yang Tse dd50e5bdf2 Use 'unsigned int' instead of size_t attempting to avoid header inclusion 2009-04-30 01:34:04 +00:00
Yang Tse 504ecd5f7a NetWare LibC's getpeername() third argument data type is size_t 2009-04-30 00:11:20 +00:00
Yang Tse 01dabb774a curl_socklen_t NetWare follow-up 2009-04-29 17:07:19 +00:00
Daniel Stenberg e2c6e00570 - Based on bug report #2723219 (http://curl.haxx.se/bug/view.cgi?id=2723219)
I've now made TFTP "connections" not being kept for re-use within libcurl.
  TFTP is UDP-based so the benefit was really low (if even existing) to begin
  with so instead of tracking down to fix this problem we instead removed the
  re-use. I also enabled test case 1099 that I wrote a few days ago to verify
  that this change fixes the reported problem.
2009-04-29 11:30:03 +00:00
Daniel Stenberg d068001102 - Constantine Sapuntzakis filed bug report #2783090
(http://curl.haxx.se/bug/view.cgi?id=2783090) pointing out that on windows
  we need to grow the SO_SNDBUF buffer somewhat to get really good upload
  speeds. http://support.microsoft.com/kb/823764 has the details. Friends
  confirmed that simply adding 32 to CURL_MAX_WRITE_SIZE is enough.
2009-04-28 20:27:06 +00:00
Yang Tse d576be58dc allow usage of in-tree c-ares when building from outside of the cvs tree 2009-04-28 19:29:50 +00:00
Daniel Stenberg e01b7c1ede - Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim
Chen pointed out how curl couldn't upload with resume when reading from a
  pipe.

  This ended up with the introduction of a new return code for the
  CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but
  that libcurl may try to resolve the situation anyway. In our case this means
  libcurl will attempt to instead read that much data from the stream instead
  of seeking and that way curl can now upload with resume when data is read
  from a stream!
2009-04-28 11:19:10 +00:00
Daniel Stenberg d27519c0ca Add missing cmake files to the tarball (thanks to Richard Atterer's report) 2009-04-27 12:26:41 +00:00
Daniel Stenberg 14df44dd3f - Bug report #2779733 (http://curl.haxx.se/bug/view.cgi?id=2779733) by Sven
Wegener pointed out that CURLINFO_APPCONNECT_TIME didn't work with the multi
  interface and provided a patch that fixed the problem!
2009-04-26 11:56:22 +00:00
Yang Tse c0d929bed9 Further narrow the use of the icc 9.1 optimizer workaround.
Previous workaround proved useful, and finally did not trigger any warning!
2009-04-25 10:24:11 +00:00
Daniel Stenberg 828a26286d - Kamil Dudka fixed another NSS-related leak when client certs were used. 2009-04-24 21:55:18 +00:00
Yang Tse 651b4b9efa Try a simpler variation of the 'volatile' variables icc 9.1 on unix IA32 workaround.
Previous workaround proved useful, but triggered the following warning:

warning #556: a value of type "volatile Curl_addrinfo *" cannot be assigned to an entity of type "Curl_addrinfo *"
2009-04-24 10:38:12 +00:00
Yang Tse 2236a247d9 Try another variation of the 'volatile' variables icc 9.1 on unix IA32 workaround.
The #pragma optimize("", off) attempt did not fix the problem and SIGSEGV's in Curl_freeaddrinfo() were back.
2009-04-23 11:09:20 +00:00
Dan Fandrich 7291f50e8d Added new libcurl source files to Amiga, RiscOS and VC6 build files. 2009-04-23 04:12:04 +00:00
Yang Tse bc5677a47b Disable optimizations when compiling function Curl_freeaddrinfo() with icc 9.1 on unix IA32.
Previous 'volatile' variables workaround proved useful, but it triggered the following warning:

warning #167: argument of type "volatile Curl_addrinfo *" is incompatible with parameter of type "void *"
2009-04-22 15:03:05 +00:00
Yang Tse 33a3753c3f libcurl's memory.h renamed to curl_memory.h 2009-04-21 11:46:16 +00:00
Yang Tse 9770899a4b Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
Yang Tse fe8eeb5641 remove unnecessary typecast 2009-04-21 09:03:15 +00:00
Daniel Stenberg b84876ba69 - Leanic Lefever reported a crash and did some detailed research on why and
how it occurs (http://curl.haxx.se/mail/lib-2009-04/0289.html). The
  conclusion was that if an error is detected and Curl_done() is called for
  the connection, ftp_done() could at times return another error code that
  then would take precedence and that new code confused existing logic that
  works for the first error code (CURLE_SEND_ERROR) only.
2009-04-20 21:41:17 +00:00
Yang Tse 4882078469 attempt to workaround icc 9.1 optimizer induced problem 2009-04-19 05:20:04 +00:00
Gisle Vanem 53b2ff4b04 Added 'slist.obj'. 2009-04-18 16:54:15 +00:00
Gisle Vanem 0c89d71aee Added HAVE_LIMITS_H. 2009-04-18 16:50:09 +00:00
Daniel Stenberg 30f7a2ff20 - Pramod Sharma reported and tracked down a bug when doing FTP over a HTTP
proxy. libcurl would then wrongly close the connection after each
  request. In his case it had the weird side-effect that it killed NTLM auth
  for the proxy causing an inifinite loop!

  I added test case 1098 to verify this fix. The test case does however not
  properly verify that the transfers are done persistently - as I couldn't
  think of a clever way to achieve it right now - but you need to read the
  stderr output after a test run to see that it truly did the right thing.
2009-04-17 12:48:24 +00:00
Yang Tse ce7b565595 further narrow the use of the icc 9.1 optimizer workaround 2009-04-17 07:30:25 +00:00
Yang Tse 41fd08bb0d attempt to workaround icc 9.1 optimizer induced problem 2009-04-16 08:31:09 +00:00
Gunter Knauf f7400212fc moved HAVE_LIMITS_H to common defines (no idea why I didnt this initially already) 2009-04-15 04:11:33 +00:00
Yang Tse 6434b42481 HAVE_LIMITS_H definition for NetWare CLIB 2009-04-14 23:51:12 +00:00
Daniel Stenberg dd0b38b32f first take at bundling cmake-related files in the tarball 2009-04-14 22:00:37 +00:00
Yang Tse 9cc6ab3922 use HAVE_LIMITS_H symbol to protect limits.h inclusion 2009-04-14 13:50:32 +00:00
Yang Tse 2c27e24bb4 include <limits.h> for INT_MAX definition 2009-04-14 13:26:06 +00:00
Yang Tse c382c550e7 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-14 12:53:53 +00:00
Daniel Stenberg 97f27ea585 Kamil Dudka's follow-up fix 2009-04-14 09:40:53 +00:00
Daniel Stenberg 379bfa5a36 - bug report #2727981 (http://curl.haxx.se/bug/view.cgi?id=2727981) by Martin
Storsjo pointed out how setting CURLOPT_NOBODY to 0 could be downright
  confusing as it set the method to either GET or HEAD. The example he showed
  looked like:

   curl_easy_setopt(curl, CURLOPT_PUT, 1);
   curl_easy_setopt(curl, CURLOPT_NOBODY, 0);

  The new way doesn't alter the method until the request is about to start. If
  CURLOPT_NOBODY is then 1 the HTTP request will be HEAD. If CURLOPT_NOBODY is
  0 and the request happens to have been set to HEAD, it will then instead be
  set to GET. I believe this will be less surprising to users, and hopefully
  not hit any existing users badly.
2009-04-13 18:01:02 +00:00
Daniel Stenberg 235c0077b8 - Toshio Kuratomi reported a memory leak problem with libcurl+NSS that turned
out to be leaking cacerts. Kamil Dudka helped me complete the fix. The issue
  is found in Redhat's bug tracker:
  https://bugzilla.redhat.com/show_bug.cgi?id=453612

  There are still memory leaks present, but they seem to have other reasons.
2009-04-13 17:42:10 +00:00