1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 09:05:04 -05:00
Commit Graph

4867 Commits

Author SHA1 Message Date
Daniel Stenberg
d4ac3d53fc - Patrick Scott found a rather large memory leak when using the multi
interface and setting CURLMOPT_MAXCONNECTS to something less than the number
  of handles you add to the multi handle. All the connections that didn't fit
  in the cache would not be properly disconnected nor freed!
2009-02-02 21:36:47 +00:00
Daniel Stenberg
f0332c0b58 minor comment fix 2009-02-02 21:20:59 +00:00
Daniel Stenberg
bdd4294e79 - Craig A West brought us: libcurl now defaults to do CONNECT with HTTP
version 1.1 instead of 1.0 like before. This change also introduces the new
  proxy type for libcurl called 'CURLPROXY_HTTP_1_0' that then allows apps to
  switch (back) to CONNECT 1.0 requests. The curl tool also got a --proxy1.0
  option that works exactly like --proxy but sets CURLPROXY_HTTP_1_0.

  I updated all test cases cases that use CONNECT and I tried to do some using
  --proxy1.0 and some updated to do CONNECT 1.1 to get both versions run.
2009-02-02 16:19:23 +00:00
Daniel Stenberg
dcf92bffd2 - When building with c-ares 1.6.1 (not yet released) or later and IPv6 support
enabled, we can now take advantage of its brand new AF_UNSPEC support in
  ares_gethostbyname(). This makes test case 241 finally run fine for me wtih
  this setup since it now parses the "::1 ip6-localhost" line fine in my
  /etc/hosts file!
2009-01-31 20:25:55 +00:00
Dan Fandrich
09f4a1c5e5 Fixed --disable-proxy for FTP and SOCKS. Thanks to Daniel Egger for reporting
the problem.
2009-01-30 19:29:25 +00:00
Yang Tse
99b4912688 ensure that we use the ANSI version functions 2009-01-30 02:35:40 +00:00
Yang Tse
0a6312d66f fix typo in comment 2009-01-30 01:54:22 +00:00
Yang Tse
a97f52db20 Provide another definition missing in MinGW's headers 2009-01-30 01:37:37 +00:00
Yang Tse
5267be57f7 Provide some definitions missing in MinGW's headers 2009-01-29 21:44:36 +00:00
Yang Tse
e813bf31d7 Introduced curl_sspi.c and curl_sspi.h for the implementation of functions
Curl_sspi_global_init() and Curl_sspi_global_cleanup() which previously were
named Curl_ntlm_global_init() and Curl_ntlm_global_cleanup() in http_ntlm.c
Also adjusted socks_sspi.c to remove the link-time dependency on the Windows
SSPI library using it now in the same way as it was done in http_ntlm.c.
2009-01-29 20:32:27 +00:00
Yang Tse
1bd0be0361 added some more messages to SSPI error function 2009-01-29 15:25:23 +00:00
Yang Tse
996c8ca7c2 Avoid inclusion of ntsecapi.h and directly provide the KERB_WRAP_NO_ENCRYPT
definition to avoid a 'STRING' duplicate definition from OpenSSL's safestack.h
2009-01-29 14:00:18 +00:00
Yang Tse
fec65fbff6 fix compiler warnings 2009-01-29 03:39:10 +00:00
Daniel Stenberg
de4610a55f - Markus Moeller introduced two new options to libcurl:
CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC to allow libcurl
  to do GSS-style authentication with SOCKS5 proxies. The curl tool got the
  options called --socks5-gssapi-service and --socks5-gssapi-nec to enable
  these.
2009-01-28 21:33:58 +00:00
Yang Tse
6e34c2d59a fix compiler warning: conversion from 'int' to 'bool', possible loss of data 2009-01-28 17:43:11 +00:00
Yang Tse
34b09398d5 fix compiler warning: enumerated type mixed with another type 2009-01-28 17:26:26 +00:00
Daniel Stenberg
0516ce7786 - Chad Monroe provided the new CURLOPT_TFTP_BLKSIZE option that allows an app
to set desired block size to use for TFTP transfers instead of the default
  512 bytes.
2009-01-26 22:43:06 +00:00
Daniel Stenberg
8fa8df95fb - The "-no_ticket" option was introduced in Openssl0.9.8j. It's a flag to
disable "rfc4507bis session ticket support".  rfc4507bis was later turned
  into the proper RFC5077 it seems: http://tools.ietf.org/html/rfc5077

  The enabled extension concerns the session management. I wonder how often
  libcurl stops a connection and then resumes a TLS session. also, sending the
  session data is some overhead. .I suggest that you just use your proposed
  patch (which explicitly disables TICKET).

  If someone writes an application with libcurl and openssl who wants to
  enable the feature, one can do this in the SSL callback.

  Sharad Gupta brought this to my attention. Peter Sylvester helped me decide
  on the proper action.
2009-01-26 14:36:18 +00:00
Daniel Stenberg
82ca52713b - Alexey Borzov filed bug report #2535504
(http://curl.haxx.se/bug/view.cgi?id=2535504) pointing out that realms with
  quoted quotation marks in HTTP Digest headers didn't work. I've now added
  test case 1095 that verifies my fix.
2009-01-26 13:19:03 +00:00
Daniel Stenberg
5aeef9c1c8 - Craig A West brought CURLOPT_NOPROXY and the corresponding --noproxy option.
They basically offer the same thing the NO_PROXY environment variable only
  offered previously: list a set of host names that shall not use the proxy
  even if one is specified.
2009-01-25 23:26:25 +00:00
Dan Fandrich
5591550167 Fixed a couple more locale-dependent toupper conversions, mainly for
clarity.  This does fix one problem that causes ;type=i FTP URLs
to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is
used (test case 561)

Added tests 561 and 1092 through 1094 to test various combinations
of ;type= and ;mode= URLs that could potentially fail in the Turkish
locale.
2009-01-21 04:42:47 +00:00
Daniel Stenberg
14a6788535 - Lisa Xu pointed out that the ssh.obj file was missing from the lib/Makefile.vc6
file (and thus from the vc8 and vc9 ones too).
2009-01-20 06:24:25 +00:00
Daniel Stenberg
6f86826516 fix typo in comment that made it confusing 2009-01-19 19:09:39 +00:00
Daniel Stenberg
5e74c58b73 - Tim Ansell fixed a compiler warning in lib/cookie.c 2009-01-15 08:32:58 +00:00
Daniel Stenberg
1225d36188 Grant Erickson fixed timeouts for TFTP 2009-01-13 23:24:06 +00:00
Daniel Stenberg
a19e02be5e - Michael Wallner fixed a NULL pointer deref when calling
curl_easy_setup(curl, CURLOPT_COOKIELIST, "SESS") on a CURL handle with no
  cookies data.
2009-01-13 22:21:14 +00:00
Daniel Stenberg
87c71953be spell-checked a bunch of comments 2009-01-13 06:44:03 +00:00
Daniel Stenberg
452e52f958 - Emil Romanus fixed:
When using the multi interface over HTTP and the server returns a Location
  header, the running easy handle will get stuck in the CURLM_STATE_PERFORM
  state, leaving the external event loop stuck waiting for data from the
  ingoing socket (when using the curl_multi_socket_action stuff). While this
  bug was pretty hard to find, it seems to require only a one-line fix. The
  break statement on line 1374 in multi.c caused the function to skip the call
  to multistate().

  How to reproduce this bug? Well, that's another question.  evhiperfifo.c in
  the examples directory chokes on this bug only _sometimes_, probably
  depending on how fast the URLs are added. One way of testing the bug out is
  writing to hiper.fifo from more than one source at the same time.
2009-01-10 22:10:57 +00:00
Dan Fandrich
bc93011554 Unified much of the SessionHandle initialization done in Curl_open() and
curl_easy_reset() by creating Curl_init_userdefined(). This had the side effect
of fixing curl_easy_reset() so it now also resets CURLOPT_FTP_FILEMETHOD and
CURLOPT_SSL_SESSIONID_CACHE
2009-01-08 00:31:49 +00:00
Dan Fandrich
80ffd3581f Created a CURLMIN macro to match CURLMAX 2009-01-07 19:39:35 +00:00
Daniel Stenberg
dd058b8de6 fix compiler warnings 2009-01-07 14:12:01 +00:00
Daniel Stenberg
3c2ad4022c - Rob Crittenden did once again provide an NSS update:
I have to jump through a few hoops now with the NSS library initialization
  since another part of an application may have already initialized NSS by the
  time Curl gets invoked. This patch is more careful to only shutdown the NSS
  library if Curl did the initialization.

  It also adds in a bit of code to set the default ciphers if the app that
  call NSS_Init* did not call NSS_SetDomesticPolicy() or set specific
  ciphers. One might argue that this lets other application developers get
  lazy and/or they aren't using the NSS API correctly, and you'd be right.
  But still, this will avoid terribly difficult-to-trace crashes and is
  generally helpful.
2009-01-07 14:10:35 +00:00
Gunter Knauf
d839230402 added HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID to ares Makefile.netware and sync'd with other Makefile.netware. 2008-12-30 08:16:24 +00:00
Gunter Knauf
1cc50d31f9 changed HAVE_SIN6_SCOPE_ID define to HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID since just found that ares already uses this define. 2008-12-30 08:05:38 +00:00
Gunter Knauf
104377d718 added HAVE_SIN6_SCOPE_ID define to all non-configure platforms which seem to be IPv6-aware. 2008-12-30 07:31:04 +00:00
Daniel Stenberg
83640b2ee5 - Phil Lisiecki filed bug report #2413067
(http://curl.haxx.se/bug/view.cgi?id=2413067) that identified a problem that
  would cause libcurl to mark a DNS cache entry "in use" eternally if the
  subsequence TCP connect failed. It would thus never get pruned and refreshed
  as it should've been.
2008-12-29 22:25:50 +00:00
Daniel Stenberg
59227bf075 - Peter Korsgaard fixed building libcurl with "configure --with-ssl
--disable-verbose".
2008-12-28 22:00:36 +00:00
Gunter Knauf
122b0bfe82 silent 'unused' warnings. 2008-12-28 05:49:39 +00:00
Gisle Vanem
e9895ea2e7 Remove trailing #undef value. Typo? 2008-12-22 18:46:12 +00:00
Daniel Stenberg
eab8c0d754 libssh2_sftp_seek2 was just renamed to libssh2_sftp_seek64 ... 2008-12-22 13:21:23 +00:00
Daniel Stenberg
7ffe62d901 - Given a recent enough libssh2, libcurl can now seek/resume with SFTP even
on file indexes beyond 2 or 4GB.
2008-12-22 13:12:36 +00:00
Daniel Stenberg
d5bfec70af - Anthony Bryan provided a set of patches that cleaned up manual language,
corrected spellings and more.
2008-12-22 13:07:13 +00:00
Daniel Stenberg
2a86817349 malloc+memset => calloc 2008-12-20 22:51:57 +00:00
Daniel Stenberg
5be7d88b34 same procedure, simpler code 2008-12-20 22:47:49 +00:00
Daniel Stenberg
216ad2680b - Igor Novoseltsev fixed a bad situation for the multi_socket() API when doing
pipelining, as libcurl could then easily get confused and A) work on the
  handle that was not "first in queue" on a pipeline, or even B) tell the app
  to REMOVE a socket while it was in use by a second handle in a pipeline. Both
  errors caused hanging or stalling applications.
2008-12-20 22:03:22 +00:00
Daniel Stenberg
e16509d5cf make the debug/helper function output to stderr as that makes it play nicer
in combination with infof() calls
2008-12-20 21:48:34 +00:00
Daniel Stenberg
ffd08df863 - curl_multi_timeout() could return a timeout value of 0 even though nothing
was actually ready to get done, as the internal time resolution is higher
  than the returned millisecond timer. Therefore it could cause applications
  running on fast processors to do short bursts of busy-loops.
  curl_multi_timeout() will now only return 0 if the timeout is actually
  alreay triggered.
2008-12-19 22:58:22 +00:00
Daniel Stenberg
460459e8db oops, removing debug output that wasn't supposed to be there 2008-12-19 22:27:11 +00:00
Daniel Stenberg
07416b61e3 - Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl
now has an improved ability to do right when the multi interface (both
  "regular" and multi_socket) is used for SCP and SFTP transfers. This should
  result in (much) less busy-loop situations and thus less CPU usage with no
  speed loss.
2008-12-19 21:14:52 +00:00
Daniel Stenberg
03ca98b0df - SCP and SFTP with the multi interface had the same flaw: the 'DONE'
operation didn't complete properly if the EAGAIN equivalent was returned but
  libcurl would simply continue with a half-completed close operation
  performed. This ruined persistent connection re-use and cause some
  SSH-protocol errors in general. The correction is unfortunately adding a
  blocking function - doing it entirely non-blocking should be considered for
  a better fix.
2008-12-17 12:32:41 +00:00
Gisle Vanem
abb74a1203 Updated dependencies based on "gcc -MM". 2008-12-16 09:12:46 +00:00
Gisle Vanem
77c1d556bb Added the use of Watt-32 tcp/ip stack for Win32 target.
If USE_WATT32=1 one needs to use stack-based calls (-3s).
So to keep the makefile nice and clean, specify -3s for
Winsock target too (there's hardly any speed-gain using -3r).
2008-12-16 09:03:58 +00:00
Gisle Vanem
418683f537 Added the use of Watt-32 tcp/ip stack for Win32 targets. 2008-12-16 08:25:55 +00:00
Daniel Stenberg
008b848dcc - libssh2_sftp_last_error() was wrongly used at some places in libcurl which
made libcurl sometimes not properly abort problematic SFTP transfers.
2008-12-15 23:04:51 +00:00
Daniel Stenberg
792279581b - More work with Igor Novoseltsev to first fix the remaining stuff for
removing easy handles from multi handles when the easy handle is/was within
  a HTTP pipeline. His bug report #2351653
  (http://curl.haxx.se/bug/view.cgi?id=2351653) was also related and was
  eventually fixed by a patch by Igor himself.
2008-12-12 12:21:11 +00:00
Daniel Stenberg
3ca360391a Make the getoff all pipelines function only set _inuse to FALSE if the
specified data pointer was head.
2008-12-12 12:04:10 +00:00
Daniel Stenberg
0f5895faee - Bug report #2416182 titled "crash in ConnectionExists when using
duphandle+curl_mutli" (http://curl.haxx.se/bug/view.cgi?id=2416182) showed
  that curl_easy_duphandle() wrongly also copied the pointer to the connection
  cache, which was plain wrong and caused a segfault if the handle would be
  used in a different multi handle than the handle it was duplicated from.
2008-12-11 23:52:56 +00:00
Daniel Stenberg
c0dfe6e51d Dan F pointed out that we don't need to scan IPv6 addresses for '%'-letters
in the parse_remote_port() function as the scope id has already been stripped
from the string.
2008-12-11 23:27:22 +00:00
Daniel Stenberg
1b4af1f8d8 - Keshav Krity found out that libcurl failed to deal with dotted IPv6
addresses if they were very long (>39 letters) due to a too strict address
  validity parser. It now accepts addresses up to 45 bytes long.
2008-12-11 22:22:46 +00:00
Patrick Monnerat
8e255534a1 _ Use getaddrinfo/getnameinfo ascii wrappers on OS400.
_ Adjust OS400 make script for non-CVS distributions.
_ Upgrade ILE/RPG binding.
_ Define CURL_HIDDEN_SYMBOLS on OS400, since only CURL_EXTERN-marked symbols are exported.
2008-12-11 19:20:03 +00:00
Daniel Stenberg
6e376532b0 - Internet Explorer had a broken HTTP digest authentication before v7 and
there are servers "out there" that relies on the client doing this broken
  Digest authentication. Apache even comes with an option to work with such
  broken clients.

  The difference is only for URLs that contain a query-part (a '?'-letter and
  text to the right of it).

  libcurl now supports this quirk, and you enable it by setting the
  CURLAUTH_DIGEST_IE bit in the bitmask you pass to the CURLOPT_HTTPAUTH or
  CURLOPT_PROXYAUTH options. They are thus individually controlled to server
  and proxy.
2008-12-10 23:13:31 +00:00
Daniel Stenberg
4b62cd3616 - Ken Hirsch simplified how libcurl does FTPS: now it doesn't assume any
particular state for the control connection like it did before for implicit
  FTPS (libcurl assumed such control connections to be encrypted while some
  FTPS servers such as FileZilla assumes such connections to be clear
  mode). Use the CURLOPT_USE_SSL option to set your desired level.
2008-12-09 15:02:37 +00:00
Daniel Stenberg
18371aaff9 - Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command
  and then I fell over the text in RFC3659 that says:

   The presence of the 550 error response to a SIZE command MUST NOT be taken
   by the client as an indication that the file cannot be transferred in the
   current MODE and TYPE.

  In other words: the change I did on September 30th 2008 and that has been
  included in the last two releases were a regression and a bad idea. We MUST
  NOT take a 550 response from SIZE as a hint that the file doesn't exist.
2008-12-08 20:20:51 +00:00
Daniel Stenberg
42365aa7ef - Christian Krause filed bug #2221237
(http://curl.haxx.se/bug/view.cgi?id=2221237) that identified an infinite
  loop during GSS authentication given some specific conditions. With his
  patience and great feedback I managed to narrow down the problem and
  eventually fix it although I can't test any of this myself!
2008-12-08 13:52:20 +00:00
Dan Fandrich
7abdc4b218 Fixed the getifaddrs version of Curl_if2ip to work on systems without IPv6
support (e.g. Minix)
2008-12-04 06:24:00 +00:00
Daniel Stenberg
479ddb1fee - Igor Novoseltsev filed bug #2351645
(http://curl.haxx.se/bug/view.cgi?id=2351645) that identified a problem with
  the multi interface that occured if you removed an easy handle while in
  progress and the handle was used in a HTTP pipeline.
2008-12-03 15:20:27 +00:00
Daniel Stenberg
58ebde9502 - Pawel Kierski pointed out a mistake in the cookie code that could lead to a
bad fclose() after a fatal error had occured.
  (http://curl.haxx.se/bug/view.cgi?id=2382219)
2008-12-03 15:08:09 +00:00
Daniel Stenberg
f7ea431516 explain the two *channel_inuse fields somewhat better 2008-12-02 23:00:10 +00:00
Yang Tse
39d0b57ebf Further adjust a libssh2 preprocessor function-symbol definition check 2008-11-29 17:45:16 +00:00
Yang Tse
c036f6ae2d Adjust some libssh2 preprocessor symbol definition checks 2008-11-29 16:39:56 +00:00
Daniel Stenberg
baeebb2b57 narrow the comment to < 80 columns 2008-11-26 12:35:24 +00:00
Daniel Stenberg
53a8a6e5a6 - Based on a patch by Vlad Grachov, libcurl now uses a new libssh2 0.19
function when built to support SCP and SFTP that helps the library to know
  in which direction a particular libssh2 operation would return EAGAIN so
  that libcurl knows what socket conditions to wait for before trying the
  function call again. Previously (and still when using libssh2 0.18 or
  earlier), libcurl will busy-loop in this situation when the easy interface
  is used!
2008-11-24 13:59:51 +00:00
Daniel Stenberg
40e8b4e527 - I removed the default use of "Pragma: no-cache" from libcurl when a proxy is
used. It has been used since forever but it was never a good idea to use
  unless explicitly asked for.
2008-11-19 22:00:14 +00:00
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
Daniel Stenberg
36e56f36ad remove Curl_strcasestr() since there is no code at all using this function! 2008-10-15 09:56:34 +00:00
Daniel Stenberg
0ecdcc253b - John Wilkinson filed bug #2155496
(http://curl.haxx.se/bug/view.cgi?id=2155496) pointing out an error case
  without a proper human-readable error message. When a read callback returns
  a too large value (like when trying to return a negative number) it would
  trigger and the generic error message then makes the proplem slightly
  different to track down. I've added an error message for this now.
2008-10-15 07:43:48 +00:00
Yang Tse
ad61b58036 fix compiler warning 2008-10-14 02:35:39 +00:00
Daniel Stenberg
18be9882f7 Removed superfluous check of clist->name, as in this code path that pointer
has already been dereferenced so it is bound to be valid. Pointed out to us
by coverity.com
2008-10-13 21:03:12 +00:00
Yang Tse
d6114165d3 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-13 06:23:42 +00:00
Yang Tse
c3a959cc37 There's no guarantee that a socket was involved at this point, so avoid displaying any error code.
And on the other hand a message after setsockopt() certainly must use SOCKERRNO.
2008-10-13 06:16:02 +00:00
Dan Fandrich
8eb64ad600 Changed Curl_strlcat to strlcat, which is the one guaranteed to exist 2008-10-12 15:17:15 +00:00
Yang Tse
a754ea1326 fix compiler warning 2008-10-11 15:32:32 +00:00
Yang Tse
2ecf22e37e fix compiler warning: explicit conversion of a 64-bit integral type to a smaller integral type 2008-10-11 01:56:04 +00:00
Dan Fandrich
9dcd0756ba Fixed some compiler warnings with CURL_DISABLE_HTTP 2008-10-10 19:10:44 +00:00
Yang Tse
c455254fd1 attempt to fix or allow further detection of an elusive icc SIGSEGV 2008-10-10 17:25:53 +00:00
Patrick Monnerat
bb1f6e6818 _ Adapt OS400 EBCDIC wrappers to new options.
_ Update RPG binding accordingly.
_ Fix new options comments.
2008-10-10 15:54:07 +00:00
Dan Fandrich
8cd76d3921 Allow compilation when no IPv6 stack is available. 2008-10-10 03:46:32 +00:00
Yang Tse
885805b5df move struct namebuf6 declaration out of Curl_ip2addr6() 2008-10-10 03:01:50 +00:00
Yang Tse
d0a48627b2 fix compiler warning 2008-10-10 02:14:46 +00:00
Dan Fandrich
5b9a57f536 Get rid of some more code in the CURL_DISABLE_HTTP case 2008-10-09 22:14:38 +00:00
Daniel Stenberg
ba9963b8fa I replaced the use of 'struct tm' with a private clone of that struct simply
because the struct is declared on the stack and not all members are used so
we could just as well make struct with only struct members we actually need.
2008-10-09 21:57:51 +00:00
Dan Fandrich
fad3288d20 Fixed the --interface option to work with IPv6 connections on glibc
systems supporting getifaddrs(). Also fixed a problem where an IPv6
address could be chosen instead of an IPv4 one for --interface when it
involved a name lookup.
2008-10-09 19:23:50 +00:00
Daniel Stenberg
830018aa38 - Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and
fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing:

  Any subsequent transfer with a redirect leaks memory, eventually crashing
  the process potentially.

  Any subsequent transfer WITHOUT a redirect causes the most recent redirect
  that DID occur on some previous transfer to still be reported.
2008-10-08 22:01:23 +00:00
Daniel Stenberg
544f2f74df - Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) that
eventually identified a flaw in how the multi_socket interface in some cases
  missed to call the timeout callback when easy interfaces are removed and
  added within the same millisecond.
2008-10-08 21:42:29 +00:00
Dan Fandrich
450348d6bd Fixed a memory leak in the new CURLOPT_USERPWD handling 2008-10-08 20:14:46 +00:00
Yang Tse
4754880099 fix missing null-pointer check 2008-10-08 18:32:06 +00:00
Daniel Stenberg
08cf6780ba - Igor Novoseltsev brought a patch that introduced two new options to
curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of
  deprecates the good old CURLOPT_USERPWD since they allow applications to set
  the user name and password independently and perhaps more importantly allow
  both to contain colon(s) which CURLOPT_USERPWD doesn't fully support.
2008-10-08 10:39:43 +00:00
Dan Fandrich
95456b8e78 Added const to some pointer variables 2008-10-08 01:17:51 +00:00
Dan Fandrich
79fc481a2b Split off Curl_isxdigit function 2008-10-07 23:20:06 +00:00
Dan Fandrich
b9ce871463 Changed the handling of read/write errors in Curl_perform() to allow a
a fresh connection to be made in such cases and the request retransmitted.
This should fix test case 160.  Added test case 1079 in an attempt to
test a similar connection dropping scenario, but as a race condition, it's
hard to test reliably.
2008-10-07 23:15:02 +00:00
Daniel Stenberg
61cfbecc74 - Fixed CURLINFO_PRIMARY_IP: When libcurl created a connection to host A then
the app re-used the handle to do a connection to host B and then again
  re-used the handle to host A, it would not update the info with host A's IP
  address (due to the connection being re-used) but it would instead report
  the info from host B.
2008-10-07 21:56:56 +00:00
Yang Tse
27db045095 fix compiler warning: dereferencing type-punned pointer will break strict-aliasing rules 2008-10-07 18:28:24 +00:00
Yang Tse
aec761916e fix another error introduced in previously mentioned commit 2008-10-03 02:25:52 +00:00
Yang Tse
7d750d2b92 fix error introduced in previous commit 2008-10-03 00:35:22 +00:00
Yang Tse
bdf1724412 take 2 at fixing compiler warning: argument might be clobbered by longjmp' or vfork' 2008-10-02 22:58:09 +00:00
Yang Tse
00dec36c72 fix compiler warning: variable' might be clobbered by longjmp' or `vfork' 2008-10-02 14:42:57 +00:00
Yang Tse
26a651f7ae fix compiler warning: variable' might be clobbered by longjmp' or `vfork' 2008-10-02 13:28:10 +00:00
Dan Fandrich
88513d2d1a Fixed some compiler warnings with gcc 2008-10-01 17:34:24 +00:00
Yang Tse
aed98c5125 fix compiler warning: declaration of 'err' shadows a previous local 2008-09-30 15:10:27 +00:00
Yang Tse
2d77f7cd48 fix compiler warning: function declaration isn't a prototype 2008-09-30 15:06:03 +00:00
Yang Tse
d61688923d fix compiler warning: enumerated type mixed with another type 2008-09-30 12:50:52 +00:00
Daniel Stenberg
038542ea3e - The libcurl FTP code now returns CURLE_REMOTE_FILE_NOT_FOUND error when SIZE
gets a 550 response back for the cases where a download (or NOBODY) is
  wanted. It still allows a 550 as response if the SIZE is used as part of an
  upload process (like if resuming an upload is requested and the file isn't
  there before the upload). I also modified the FTP test server and a few test
  cases accordingly to match this modified behavior.
2008-09-30 09:51:58 +00:00
Dan Fandrich
4114129ac0 Fixed a couple of compile warnings. 2008-09-29 23:45:43 +00:00
Dan Fandrich
6d24719167 Made the month days table static const 2008-09-29 23:22:41 +00:00
Dan Fandrich
2393c94363 Fixed a compile problem with --disable-proxy 2008-09-29 22:45:25 +00:00
Daniel Stenberg
f3ab5d5500 - Daniel Egger provided a patch that allows you to disable proxy support in
libcurl to somewhat reduce the size of the binary. Run configure
  --disable-proxy.
2008-09-29 21:46:04 +00:00
Dan Fandrich
8f467b4288 Removed unneeded includes of signal.h and setjmp.h 2008-09-29 21:44:50 +00:00
Dan Fandrich
4adcf7e9ed Moved all signal-based name resolution timeout handling into a single new
Curl_resolv_timeout function to reduce coupling.
2008-09-29 21:02:22 +00:00
Daniel Stenberg
c27d2d4b93 - Ian Lynagh provided a patch that now makes CURLOPT_RANGE work fine for SFTP
downloads!
2008-09-29 13:21:21 +00:00
Daniel Stenberg
0a305eb79f - Bug #2107803 (http://curl.haxx.se/bug/view.cgi?id=2107803) "no
CURLINFO_REDIRECT_URL in multi mode" also contained a patch that fixed the
  problem.
2008-09-29 12:22:10 +00:00
Daniel Stenberg
aff5408633 made Curl_read_plain() return an 'int' instead of CURLcode since it actually
returns -1 in EAGAIN cases and that's not valid CURLcode
2008-09-29 11:13:37 +00:00
Dan Fandrich
426ec2d399 Fixed a few comment typos 2008-09-26 19:55:12 +00:00
Daniel Stenberg
1b9d311b5c - Fixed the HTTP Digest auth code to not behave badly when getting a blank realm
with realm="". http://curl.haxx.se/bug/view.cgi?id=2126435
2008-09-25 14:09:22 +00:00
Yang Tse
4d437416da HAVE_INET_PTON will only be defined when an IPv6 capable working
inet_pton function is available.
2008-09-24 19:13:01 +00:00
Yang Tse
267b942383 configure script now checks availability of the inet_ntop() function,
and when not crosscompiling verifies if it is IPv6 capable.

HAVE_INET_NTOP will only be defined when an IPv6 capable working
inet_ntop function is available.
2008-09-24 16:43:40 +00:00
Yang Tse
21b523fcd3 Official OpenSSL released versions up to and including 0.9.8i as well as
2008-09-24 stable snapshot have a buf_mem_st.length structure member with
'int' data type.

OpenSSL un-released 0.9.9 CVS version has a buf_mem_st.length structure member
with 'size_t' data type since 2007-Oct-09.

These 4 typecasts should silence compiler warnings in all cases.
2008-09-24 13:55:23 +00:00
Yang Tse
4e909ee8b1 ntoa() and inet_ntoa_r() no longer used 2008-09-24 12:22:16 +00:00
Dan Fandrich
515893595d Make sure not to dereference the wrong UrlState proto union member when
switching from one protocol to another in a single request (e.g.
redirecting from HTTP to FTP as in test 1055) by resetting
state.expect100header before every request.
2008-09-24 01:08:01 +00:00
Yang Tse
3800be3898 Remove usage of inet_ntoa and inet_ntoa_r 2008-09-23 19:17:19 +00:00
Yang Tse
c9ad952604 Replace inet_ntoa and inet_ntoa_r with Curl_inet_ntop 2008-09-23 19:16:56 +00:00
Gisle Vanem
2a09ffc648 Avoid 'warning: comparison between signed and unsigned'. 2008-09-23 13:16:36 +00:00
Daniel Stenberg
d369a2b775 - Introducing Jamie Lokier's function for date to epoch conversion used in the
date parser function. This makes our function less dependent on system-
  provided functions and instead we do all the magic ourselves. We also no
  longer depend on the TZ environment variable.
2008-09-23 11:00:01 +00:00
Daniel Stenberg
23e5402bec - Rob Crittenden brought a patch to "add some locking for thread-safety to NSS
implementation".
2008-09-23 10:27:04 +00:00
Daniel Stenberg
391e8afd1f - Made the SOCKS code use the new Curl_read_plain() function to fix the bug
Markus Moeller reported: http://curl.haxx.se/mail/archive-2008-09/0016.html

- recv() errors other than those equal to EAGAIN now cause proper
  CURLE_RECV_ERROR to get returned. This made test case 160 fail so I've now
  disabled it until we can figure out another way to exercise that logic.
2008-09-22 23:12:00 +00:00
Daniel Stenberg
c4a694862c - Michael Goffioul filed bug report #2107377 "Problem with mutli + GnuTLS +
proxy" (http://curl.haxx.se/bug/view.cgi?id=2107377) that showed how a multi
  interface using program didn't work when built with GnuTLS and a CONNECT
  request was done over a proxy (basically test 502 over a proxy to a HTTPS
  site). It turned out the ssl connect function would get called twice which
  caused the second call to fail.
2008-09-22 20:42:13 +00:00
Yang Tse
19bc92289d HAVE_ALARM definition for static config-*.h files 2008-09-19 23:51:16 +00:00
Yang Tse
4e4f6c1ec8 configure script now checks availability of the alarm() function 2008-09-19 18:39:24 +00:00
Dan Fandrich
459e67b2a7 Only define alarmfunc when signals are used 2008-09-19 17:46:59 +00:00
Dan Fandrich
dfa0fd5b33 Don't bother to install a SIGALRM handler unless alarm() is available.
Also, leave the existing SIGALRM handler alone if the timeout is too small
to handle.
2008-09-19 00:43:51 +00:00
Yang Tse
f7ef60c13f fix compiler warning: external definition with no prior declaration 2008-09-18 19:17:28 +00:00
Yang Tse
a6c915aab9 fix compiler warning: external declaration in primary source file 2008-09-18 16:21:09 +00:00
Yang Tse
7d7f63059a NetWare seems to have writev() 2008-09-16 18:23:16 +00:00
Yang Tse
ee5f13cb6b NetWare CLIB target has stricmp() and strnicmp() 2008-09-16 01:21:04 +00:00
Dan Fandrich
849318138e Note that the long long issue is fixed in Symbian OS 9.4 2008-09-15 18:24:23 +00:00
Yang Tse
842de91168 HAVE_STRNCASECMP and HAVE_STRNICMP definitions for WIN32 2008-09-15 14:57:56 +00:00
Yang Tse
4c621bc697 improve detection of:
strcasecmp()
  strcasestr()
  strcmpi()
  stricmp()
  strlcat()
  strncasecmp()
  strncmpi()
  strnicmp()
2008-09-15 00:32:08 +00:00
Yang Tse
651dad0cc1 fix compiler warning: external declaration in primary source file 2008-09-13 16:37:16 +00:00
Yang Tse
f591ab3ba0 fix compiler warning: defined but not used 2008-09-13 15:59:14 +00:00
Yang Tse
61c0bdb09c fix compiler warning: external declaration in primary source file 2008-09-13 03:49:33 +00:00
Yang Tse
89367d47a8 Disable tracking of fdopen() calls in the low-level memory leak tracking
code when fdopen() is not available, to avoid compiler error.
2008-09-13 03:45:03 +00:00
Yang Tse
7fdfd938e0 remove dead code portion inoperative long time ago 2008-09-13 01:54:45 +00:00
Yang Tse
adb974960d fix compiler warning: enumerated type mixed with another type 2008-09-13 01:12:07 +00:00
Yang Tse
aac739ccd2 ANSI C compatibility adjustment 2008-09-12 11:18:17 +00:00
Yang Tse
c3d1b07c45 ensure that errno is not modified inside Curl_strerror() 2008-09-12 10:51:57 +00:00
Yang Tse
2bcd13aaee ANSI C compatibility fix 2008-09-12 03:24:27 +00:00
Dan Fandrich
6cea51585f Checked in some code improvements and minor fixes that I discovered in the
FreeBSD ports system.
2008-09-10 20:05:45 +00:00
Yang Tse
a834b98232 fix compiler warning 2008-09-10 13:39:35 +00:00
Dan Fandrich
152cf6325d Checked in some grammatical and minor other fixes in the documentation and
examples that I found in the FreeBSD ports system.
2008-09-10 07:11:45 +00:00
Dan Fandrich
c98ab69cc7 Factored out Curl_isalnum 2008-09-09 21:15:50 +00:00
Yang Tse
2ef72f7abb fix compiler warning 2008-09-08 19:34:58 +00:00
Daniel Stenberg
2816902f0e Dmitry Kurochkin fixed pipelining over proxy using the multi interface 2008-09-08 12:15:09 +00:00
Daniel Stenberg
f72a26d340 - Stefan Krause pointed out that libcurl would wrongly send away cookies to
sites in cases where the cookie clearly has a very old expiry date. The
  condition was simply that libcurl's date parser would fail to convert the
  date and it would then count as a (timed-based) match. Starting now, a
  missed date due to an unsupported date format or date range will now cause
  the cookie to not match.
2008-09-08 11:36:19 +00:00
Daniel Stenberg
387521bb6d comment < 80 columns 2008-09-08 07:39:05 +00:00
Yang Tse
59e378f48f remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +00:00
Yang Tse
a622fd90b4 remove unnecessary typecasting of calloc() 2008-09-06 04:47:14 +00:00
Yang Tse
861b647e7b remove unnecessary typecasting of realloc() 2008-09-06 04:28:43 +00:00
Dan Fandrich
70e57dad88 Only compile Curl_ssl_free_certinfo when SSL is enabled 2008-09-05 18:35:29 +00:00
Dan Fandrich
91ff938035 Improved the logic the decides whether to use HTTP 1.1 features or not in a
request.

Detect cases where an upload must be sent chunked and the server supports
only HTTP 1.0 and return CURLE_UPLOAD_FAILED.
2008-09-05 17:58:53 +00:00
Dan Fandrich
3acd1146f9 Use realloc when paused in Curl_client_write 2008-09-05 17:21:54 +00:00
Daniel Stenberg
18110b519c - Martin Drasar provided the CURLOPT_POSTREDIR patch. It renames
CURLOPT_POST301 (but adds a define for backwards compatibility for you who
  don't define CURL_NO_OLDIES). This option allows you to now also change the
  libcurl behavior for a HTTP response 302 after a POST to not use GET in the
  subsequent request (when CURLOPT_FOLLOWLOCATION is enabled). I edited the
  patch somewhat before commit. The curl tool got a matching --post302
  option. Test case 1076 was added to verify this.
2008-09-05 16:13:20 +00:00
Daniel Stenberg
4c9768565e - Introducing CURLOPT_CERTINFO and the corresponding CURLINFO_CERTINFO. By
enabling this feature with CURLOPT_CERTINFO for a request using SSL (HTTPS
  or FTPS), libcurl will gather lots of server certificate info and that info
  can then get extracted by a client after the request has completed with
  curl_easy_getinfo()'s CURLINFO_CERTINFO option. Linus Nielsen Feltzing
  helped me test and smoothen out this feature.

  Unfortunately, this feature currently only works with libcurl built to use
  OpenSSL.

  This feature was sponsored by networking4all.com - thanks!
2008-09-05 14:29:21 +00:00
Daniel Stenberg
873e734c39 - Dmitriy Sergeyev pointed out that curl_easy_pause() didn't unpause properly
during certain conditions. I also changed this code to use realloc() based
  on Daniel Fandrich's suggestion.
2008-09-05 09:37:37 +00:00
Yang Tse
62519bfe05 somewhat protect Mac OS X users from using Mac OS 9 config file 2008-09-05 01:27:24 +00:00
Gunter Knauf
9c36a5fd06 fixed largefile feature for MingW32 non-configure builds. 2008-09-04 22:04:53 +00:00
Gunter Knauf
4558c8f37a enabled largefile feature for LIBC builds. 2008-09-04 22:01:19 +00:00
Dan Fandrich
bb67388bbe Made some variables const 2008-09-04 19:43:35 +00:00
Yang Tse
3dcd2b82c4 fix print formatting string directives 2008-09-04 18:59:05 +00:00
Dan Fandrich
29ec219b82 Fixed an out of memory problem that caused torture test failures in tests
706 and 707.
2008-09-02 23:12:00 +00:00
Dan Fandrich
0994d7811f Removed some redundant type casts 2008-09-02 18:36:39 +00:00
Dan Fandrich
934708d950 Made some variables const which eliminated some casts 2008-09-02 17:41:20 +00:00
Daniel Stenberg
72ea805298 Add README.curl_off_t to the release archive 2008-09-01 14:25:37 +00:00
Yang Tse
79ffbf7fe1 MSVC adjustment 2008-08-31 12:12:35 +00:00
Daniel Stenberg
c67a99ff27 - When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the
  response-body, libcurl could still have outstanding data to send and it
  would not properly notice this and stop sending. This caused weirdness and
  sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222

  Note that there are still reasons to consider libcurl's behavior when
  getting a >= 400 response code while sending data, as Craig Perras' note
  "http upload: how to stop on error" specifies:
  http://curl.haxx.se/mail/archive-2008-08/0138.html
2008-08-29 10:47:59 +00:00
Yang Tse
9b7b2b347f When not using large file support WIN32's lseek offset is a 'long'. 2008-08-28 22:41:35 +00:00
Yang Tse
004dde18a7 Adjust generation of MSVC project files 2008-08-28 13:53:44 +00:00
Daniel Stenberg
e138ae5ec9 - I'm abandoning the system with the web site mirrors (but keeping download
files bing mirrored) and thus I've changed the URL in the cookiejar header
  to no longer use curlm.haxx.se but instead use the main site curl.haxx.se
2008-08-28 11:35:54 +00:00
Daniel Stenberg
19d0a7495e minor code indent fixes 2008-08-28 07:41:15 +00:00
Daniel Stenberg
099b62f124 - Dengminwen reported that libcurl would lock a (cookie) share twice (without
an unlock in between) for a certain case and that in fact works when using
  regular windows mutexes but not with pthreads'! Locks should of course not
  get locked again so this is now fixed.
  http://curl.haxx.se/mail/lib-2008-08/0422.html
2008-08-28 07:37:29 +00:00
Dan Fandrich
8ce78ca488 Fixed test case 1065 by changing the handling of CURLOPT_UPLOAD to set
the HTTP method to GET (or HEAD) when given a value of 0.
2008-08-28 06:28:07 +00:00
Yang Tse
fc9610919c This file must be kept in CVS with DOS style CR+LF line endings. 2008-08-28 03:31:54 +00:00
Yang Tse
b150e6866d DLL's resource file specification for VC6 generated .dsp file 2008-08-28 01:22:26 +00:00
Yang Tse
2f475fa9ea Add /D "CURL_STATICLIB" to LIB's BASE configuration 2008-08-27 23:46:33 +00:00
Yang Tse
ecff50c2b4 VC6 generated .dsp file now supports 4 configurations:
libcurl - Win32 DLL Debug
libcurl - Win32 DLL Release
libcurl - Win32 LIB Debug
libcurl - Win32 LIB Release
2008-08-27 23:31:58 +00:00
Daniel Stenberg
1056202b48 spell! (most of it fixed by Tor Arntsen) 2008-08-27 06:10:47 +00:00
Dan Fandrich
709de3d621 Fix large file support for Symbian OS on the emulator. 2008-08-27 01:48:33 +00:00
Yang Tse
f9894f4ebc Don't abort configuration if recvfrom() is not available. 2008-08-27 00:25:02 +00:00
Dan Fandrich
4b01dfe369 Fixed out of memory problems that caused torture test failures in tests
1021 and 1067.
2008-08-26 21:28:57 +00:00
Yang Tse
9258928c2d minor language adjustment 2008-08-26 13:35:06 +00:00
Daniel Stenberg
132cd3aa2c spell out some benefits of this new approach of doing curl_off_t 2008-08-26 12:57:29 +00:00
Yang Tse
2fdd24c724 Fix default SIZEOF_OFF_T definition logic 2008-08-26 10:48:52 +00:00
Patrick Monnerat
852a02daff Fix _LARGE_FILES definition (thanks to Yang Tse for signaling the bug) 2008-08-26 09:26:06 +00:00
Yang Tse
3e2487493e Use SIZEOF_OFF_T definition from config file 2008-08-26 01:40:19 +00:00
Yang Tse
ec28988bfa leftover 2008-08-25 03:50:51 +00:00
Yang Tse
f164260eee For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,
the name of the curl_off_t data type used now becomes CURL_TYPEOF_CURL_OFF_T

CURL_OFF_T -> CURL_TYPEOF_CURL_OFF_T
2008-08-25 01:18:49 +00:00
Yang Tse
c9f2c54c49 Remove debug tracing and nearly all changes introduced since revision 1.72
The effective result of this commit is revision 1.72 plus two changed lines. These
can be viewed in http://cool.haxx.se/cvs.cgi/curl/lib/mprintf.c.diff?r1=1.72&r2=1.77
2008-08-24 23:21:46 +00:00
Daniel Stenberg
8dabd34432 Introduced the configure option --enable-soname-bump that lets a user enforce
an SONAME bump.
2008-08-24 21:26:42 +00:00
Daniel Stenberg
a104a365e3 Added firefox-db2pem.sh to the release archive 2008-08-24 20:42:51 +00:00
Yang Tse
cbc04a7d40 Debug trace curl_mprintf() on x86_64 and ia64 systems. 2008-08-24 16:01:15 +00:00
Yang Tse
bc69e46ad1 x86_64 fixes 2008-08-24 10:40:38 +00:00
Yang Tse
13f035b905 x86_64 fixes 2008-08-24 03:59:43 +00:00
Yang Tse
79cbe50894 Test if type casting a 'signed int' to a 'signed long long' fails to do sign extension on x86_64. 2008-08-24 00:15:59 +00:00
Daniel Stenberg
1c04aa54a7 - Running 'make ca-firefox' in the root build dir will now run the new
firefox-db2pem.sh conversion script that converts a local Firefox db of ca
  certs into PEM format, suitable for use with a OpenSSL or GnuTLS built
  libcurl.
2008-08-23 22:02:41 +00:00
Gunter Knauf
b718283327 removed obsolete slash in URL. 2008-08-23 21:31:09 +00:00
Daniel Stenberg
f46d47239f revert accidental commit 2008-08-23 12:14:05 +00:00
Daniel Stenberg
13dc82b9d4 - Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multi
interface, and the proxy would send Connection: close during the
  authentication phase.  http://curl.haxx.se/bug/view.cgi?id=2069047
2008-08-23 12:11:38 +00:00
Daniel Stenberg
a243dd4587 mention the no soname bump too 2008-08-23 11:37:42 +00:00
Daniel Stenberg
9d5d6c557b my first take at documenting the curl_off_t situation when doing an upgrade
< 7.19.0 to >= 7.19.x
2008-08-23 11:34:42 +00:00
Yang Tse
70b1cd798f explicit value assignment for comparison result 2008-08-23 02:35:16 +00:00
Yang Tse
578f42d588 typecast constant in comparison 2008-08-23 02:04:55 +00:00
Yang Tse
fcc8700218 Reinstate struct_stat definition that got lost in previous commit. 2008-08-22 19:01:00 +00:00
Yang Tse
9849c6b847 Adjustments to better select/differentiate when large/small file
support is provided using WIN32 functions directly.
2008-08-22 18:09:03 +00:00
Yang Tse
9bb5da968c Improved curl_m*printf() integral data type size and signedness handling 2008-08-22 11:11:33 +00:00
Yang Tse
f07c3171e3 cleanup the BOOL usage 2008-08-22 06:53:01 +00:00
Daniel Stenberg
81b64f69a5 use a more updated certdata.txt URL 2008-08-21 17:51:22 +00:00
Gisle Vanem
17e1f58fd6 Work around a scanf() bug in djgpp 2.04. The assignments for this
format is working okay. But the return value is incorrectly EOF.
2008-08-21 16:20:38 +00:00
Gisle Vanem
582833b338 Added '#define HAVE_STRUCT_IN6_ADDR 1' needed when
building with 'USE_ARES'.
2008-08-21 14:08:47 +00:00
Gisle Vanem
48be4fa069 Added rule to generate '../include/curl/curlbuild.h'. 2008-08-21 13:51:07 +00:00
Gisle Vanem
2af05bdd3c Assume we have 'CRYPTO_cleanup_all_ex_data()' on OpenSSL/DOS too. 2008-08-21 13:47:18 +00:00
Yang Tse
4dbfc91e2b MSVC's __int64 data type is only available when _INTEGRAL_MAX_BITS >= 64 2008-08-21 06:58:12 +00:00
Yang Tse
afe7bb4b33 Fix a LONG_MIN and LLONG_MIN related bug in internal m*printf() 2008-08-21 01:49:19 +00:00
Yang Tse
f209a4804b Fix one bug detected thanks to test case 557. 2008-08-21 00:12:03 +00:00
Yang Tse
5794ffe4bd Some data type size adjustments. 2008-08-21 00:10:27 +00:00
Yang Tse
ceb49d3742 Get rid of ENABLE_64BIT symbol definition and usage.
Improve HAVE_LONGLONG symbol description.
2008-08-21 00:06:15 +00:00
Yang Tse
8ca51bc68a Added option to use c-ares resolver lib. 2008-08-20 23:35:48 +00:00
Yang Tse
56f852a64f Use 'Curl_inet_pton()' instead of 'inet_pton()'. 2008-08-20 23:32:50 +00:00
Yang Tse
1c68e79091 Simplify condition check 2008-08-20 23:29:07 +00:00
Daniel Stenberg
3743f515cf - Phil Pellouchoud pointed out that the windows version of libcurl had a
memory leak because it never called the OpenSSL function
  CRYPTO_cleanup_all_ex_data() as it was supposed to. This was because of a
  missing define in config-win32.h!
2008-08-20 19:29:00 +00:00
Gisle Vanem
68bb51c55b Rewritten to also produce a static library (libcurl_wc.lib). 2008-08-17 13:34:15 +00:00
Yang Tse
fb8fe6f2b3 OpenSSl enabled NetWare builds are changed to use the 'openssl' subdirectory
when including the OpenSSL header files. This is the recommended setting, this
prevents the undesired inclusion of header files with the same name as those
of OpenSSL but which do not belong to the OpenSSL package. The visible change
from previously released libcurl versions is that now OpenSSl enabled NetWare
builds also define USE_OPENSSL in config files, and that OpenSSL header files
must be located in a subdirectory named 'openssl'.
2008-08-17 13:25:54 +00:00
Yang Tse
3e61c90dbe Adjust usage of conditional definition of USE_OPENSSL 2008-08-17 01:57:10 +00:00
Yang Tse
ac18b471d2 libcurl internal base64.h header file renamed to curl_base64.h 2008-08-17 00:25:38 +00:00
Yang Tse
bbe2386bff libcurl internal md5.h header file renamed to curl_md5.h 2008-08-17 00:01:26 +00:00
Yang Tse
0033535e21 Oops, missed FORMAT_OFF_TU 2008-08-16 03:40:25 +00:00
Yang Tse
3e4a8cb800 Fix Use of conditional definition of USE_OPENSSL 2008-08-16 03:27:07 +00:00
Yang Tse
ad638da2c2 Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TU
remain in use as internal curl_off_t print formatting strings for the internal
*printf functions which still cannot handle print formatting string directives
such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and
other DOS/Windows compilers.

This reverts previous commit part which did:

FORMAT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-16 01:33:59 +00:00
Yang Tse
66fb9ca5f6 For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,
the names of the curl_off_t formatting string directives now become
CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU.

CURL_FMT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU

Remove the use of an internal name for the curl_off_t formatting string directives
and use the common one available from the inside and outside of the library.

FORMAT_OFF_T  -> CURL_FORMAT_CURL_OFF_T
FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-15 02:58:15 +00:00
Yang Tse
ecd30cc8bb When using our internal curlx_strtoll function NEED_CURL_STRTOLL must be defined,
the source code of curlx_strtoll is excluded if NEED_CURL_STRTOLL isn't defined.
2008-08-14 11:56:55 +00:00
Yang Tse
0105ad5e39 CURL_LLONG_MIN should now be signed 2008-08-14 10:30:45 +00:00
Yang Tse
c125d83e9e Sync config.h generation from lib/Makefile.netware and src/Makefile.netware 2008-08-13 18:43:53 +00:00
Yang Tse
feb03e4717 The size of long is a build time characteristic and as such it is now recorded
in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process
and in CVS curlbuild.h.dist for non-configure systems.
2008-08-13 15:32:20 +00:00
Gisle Vanem
0aa704935b Remved '-dDEBUG_THREADING_GETADDRINFO' (no longer used). 2008-08-13 08:19:51 +00:00
Gisle Vanem
ede7f8f5de Update dependencies. 2008-08-13 08:17:50 +00:00
Yang Tse
55a8098d48 Adjustment due to curl_off_t no longer following off_t 2008-08-13 03:05:00 +00:00
Dan Fandrich
b000b8a736 Removed unneeded header files 2008-08-12 20:21:40 +00:00
Dan Fandrich
7eab7fa353 Fixed a buffer overflow problem in Curl_proxyCONNECT that could occur
when a server responded with long headers and data.  Luckily, the buffer
overflowed into another unused buffer, so no actual harm was done.
Added test cases 1060 and 1061 to verify.
2008-08-12 20:07:52 +00:00
Yang Tse
58f7c82d52 Fix 'result' may be used uninitialized in function readwrite_data() 2008-08-12 19:09:20 +00:00
Yang Tse
4d1cd0da93 Fix curl_off_t sized constants usage 2008-08-12 18:49:33 +00:00
Yang Tse
e1ab7db87d DOS/Windows 'shells' eat echoed percent sign characters unless escaped. 2008-08-12 10:08:14 +00:00
Dan Fandrich
f1fe04245a Fixed a boundary condition error in ftp_readresp() whereby a non-terminal
line of a multiline FTP response whose last byte landed exactly at the end
of the BUFSIZE-length buffer would be treated as the terminal response
line.  The following response code read in would then actually be the
end of the previous response line, and all responses from then on would
correspond to the wrong command. Test case 1062 verifies this.

Stop closing a never-opened ftp socket.
2008-08-11 23:16:08 +00:00
Daniel Stenberg
f8a3aa91cd - Constantine Sapuntzakis filed bug report #2042430
(http://curl.haxx.se/bug/view.cgi?id=2042430) with a patch. "NTLM Windows
  SSPI code is not thread safe". This was due to libcurl using static
  variables to tell wether to load the necessary SSPI DLL, but now the loading
  has been moved to the more suitable curl_global_init() call.
2008-08-11 20:29:36 +00:00
Daniel Stenberg
019bde82ce - Constantine Sapuntzakis filed bug report #2042440
(http://curl.haxx.se/bug/view.cgi?id=2042440) with a patch. He identified a
  problem when using NTLM over a proxy but the end-point does Basic, and then
  libcurl would do wrong when the host sent "Connection: close" as the proxy's
  NTLM state was erroneously cleared.
2008-08-11 19:26:01 +00:00
Yang Tse
b5b25b39e9 Added missing signed and unsigned curl_off_t integer constant suffixes for
internal and external use. CURL_SUFFIX_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_TU.
2008-08-11 18:27:21 +00:00
Yang Tse
62a6b8d4a6 Fix NetWare missing curl_off_t typedef!! 2008-08-11 02:40:19 +00:00
Yang Tse
24b1890710 s/SIZEOF_CURL_OFF_T/CURL_SIZEOF_CURL_OFF_T/g 2008-08-11 01:22:57 +00:00
Gunter Knauf
c57285d199 fixed creation of curlbuild.h. 2008-08-10 22:28:51 +00:00
Yang Tse
68cfe929c4 Fix NetWare curlbuild.h
NetWare curlbuild.h settings depend on whether LIBC or CLIB is used.

The NetWare specific Makefile is capable of knowing which target is being built.
So, finally, the NetWare Makefile will take care of generating curlbuild.h
2008-08-10 18:33:41 +00:00
Dan Fandrich
ab83c0fd5b Refactored Curl_readwrite() into a number of smaller functions. 2008-08-08 20:37:54 +00:00
Yang Tse
012dcb4893 Remove rule no longer needed since tests/testcurl.pl revision 1.63
See CVS commit comment on tests/testcurl.pl revision 1.63
2008-08-08 15:16:59 +00:00
Dan Fandrich
e54209d643 Fixed an uninitialized variable in multi_runsingle() that could cause a
request to prematurely end.
2008-08-08 01:52:08 +00:00
Gunter Knauf
2548e7b23f use CP macro rather than cp command. 2008-08-07 21:43:30 +00:00
Gunter Knauf
97046a3548 added rule to create include/curl/curlbuild.h from include/curl/curlbuild.h.dist. 2008-08-07 21:34:35 +00:00
Yang Tse
14240e9e10 Initial support of curlbuild.h and curlrules.h which allows
to have a curl_off_t data type no longer gated to off_t.
2008-08-07 00:29:08 +00:00
Daniel Stenberg
b0685b3576 remove debug code I accidentally left in here 2008-08-06 09:54:34 +00:00
Gisle Vanem
138c57c76a Removed TRACE() code. 2008-08-06 08:05:09 +00:00
Daniel Stenberg
ed50e3f1b4 - Yehoshua Hershberg found a problem that would make libcurl re-use a
connection with the multi interface even if a previous use of it caused a
  CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed
  SSL connections properly close the connections.
2008-08-04 22:07:50 +00:00
Daniel Stenberg
3a499099af - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and
proved how PUT and POST with a redirect could lead to a "hang" due to the
  data stream not being rewound properly when it had to in order to get sent
  properly (again) to the subsequent URL. This is now fixed and these test
  cases are no longer disabled.
2008-08-04 22:00:22 +00:00
Daniel Stenberg
8d012181b0 - Test case 1041 (added by Daniel Fandrich April 14th) proved a bug where PUT
with -C - sent garbage in the Content-Range: header. I fixed this problem by
  making sure libcurl always sets the size of the _entire_ upload if an app
  attemps to do resumed uploads since libcurl simply cannot know the size of
  what is currently at the server end. Test 1041 is no longer disabled.
2008-08-03 22:20:58 +00:00
Dan Fandrich
42cabc14d4 Added support for --append on SFTP uploads. Unfortunately, OpenSSH doesn't
support this so it goes untested.
2008-08-01 18:41:14 +00:00
Dan Fandrich
9251dd7b24 User names embedded in proxy URLs without a password were parsed
incorrectly--the host name is treated as part of the user name and the
port number becomes the password.  This can be observed in test 279
(was KNOWN_ISSUE #54).
2008-08-01 02:09:08 +00:00
Dan Fandrich
3615063fbc Added more code under #ifndef CURL_DISABLE_HTTP to fix builds with
--disable-http
2008-08-01 01:39:24 +00:00
Dan Fandrich
09664f1ab8 Refactored create_conn by breaking it up into many smaller functions 2008-08-01 00:55:43 +00:00
Dan Fandrich
bdf1157d55 Made a parameter const 2008-08-01 00:49:29 +00:00
Dan Fandrich
b4a5ce89c2 Fixed a problem with any FTP URL or any URLs containing an IPv6 address
being mangled when passed to proxies when CURLOPT_PORT is also set
(reported by Pramod Sharma).
2008-07-31 22:46:29 +00:00
Dan Fandrich
660516914e Fixed parsing of an IPv6 proxy address to support a scope identifier,
as well as IPv4 addresses in IPv6 format. Also, better handle the case
of a malformatted IPv6 address (avoid empty and NULL strings).
2008-07-31 20:04:00 +00:00
Dan Fandrich
fe1d024351 Fixed a couple of problems in the IPv6 scope code. First, a host name in
an URL in a Location: header didn't have the scope ID removed, so an
invalid host name was used.  Second, when the scope ID was removed, it
also removed any port number that may have existed in the URL.
2008-07-31 02:18:01 +00:00
Daniel Stenberg
5aed78e183 - Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URL
parser to allow numerical IPv6-addresses to be specified with the scope
  given, as per RFC4007 - with a percent letter that itself needs to be URL
  escaped. For example, for an address of fe80::1234%1 the HTTP URL is:
  "http://[fe80::1234%251]/"
2008-07-30 21:55:26 +00:00
Daniel Stenberg
ae654266df - PHP's bug report #43158 (http://bugs.php.net/bug.php?id=43158) identifies a
true bug in libcurl built with OpenSSL. It made curl_easy_getinfo() more or
  less always return 0 for CURLINFO_SSL_VERIFYRESULT because the function that
  would set it to something non-zero would return before the assign in almost
  all error cases. The internal variable is now set to non-zero from the start
  of the function only to get cleared later on if things work out fine.
2008-07-30 21:24:59 +00:00
Dan Fandrich
cc0285da7f Factored out Curl_copy_header_value 2008-07-30 20:11:51 +00:00
Yang Tse
5febd06c25 Sync comment with reality. 2008-07-30 08:21:25 +00:00
Yang Tse
537490e391 Undo using the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-30 05:10:42 +00:00
Dan Fandrich
1c8f689ecb Minor Symbian updates. 2008-07-30 00:10:32 +00:00
Dan Fandrich
7a8b11d716 Fixed --use-ascii to properly convert text files on Symbian OS, MS-DOS
and OS/2.
2008-07-30 00:09:02 +00:00
Dan Fandrich
248c2b9bf5 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-29 18:26:35 +00:00
Yang Tse
d785ed2588 ignore *.dist files 2008-07-29 02:05:07 +00:00
Dan Fandrich
bc0ebfcdeb Fixed display of the interface bind address in the trace output when it's
an IPv6 address.
2008-07-28 18:35:34 +00:00
Yang Tse
1ac1212925 setup.h handles definition of _REENTRANT based on NEED_REENTRANT
definition which might be defined in config.h or config-*.h files
2008-07-27 03:16:37 +00:00
Dan Fandrich
432945e422 Eliminate a unnecessary socket creation in Curl_getaddrinfo for an IPv4
address in an IPv6 capable libcurl.
2008-07-27 02:20:34 +00:00
Daniel Stenberg
a96784b98e - David Bau filed bug report #2026240 "CURL_READFUNC_PAUSE leads to buffer
overrun" (http://curl.haxx.se/bug/view.cgi?id=2026240) identifying two
  problems, and providing the fix for them:

  - CURL_READFUNC_PAUSE did in fact not pause the _sending_ of data that it is
    designed for but paused _receiving_ of data!

  - libcurl didn't internally set the read counter to zero when this return
    code was detected, which would potentially lead to junk getting sent to
    the server.
2008-07-26 21:15:47 +00:00
Yang Tse
a7abd5bf70 ignore curllib.vcproj 2008-07-24 15:11:24 +00:00
Yang Tse
f22114aeed minor reordering in OS/400 config/setup files 2008-07-22 00:12:06 +00:00
Yang Tse
0919de4511 Change recvfrom's sixth argument data type to the 'historically standard' 'int'
data type for systems where this sixth argument is prototyped as a void pointer.

Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html
2008-07-21 18:24:32 +00:00
Gisle Vanem
3e5292a052 Undefine 'byte' due to dict.c. 2008-07-21 15:39:54 +00:00
Yang Tse
775d9e0615 fix compiler warning: comparison between signed and unsigned 2008-07-21 03:59:23 +00:00
Yang Tse
a20d55fb64 Adjust recvfrom's sixth arg data type definition for NetWare (LIBC) 2008-07-21 03:50:02 +00:00
Yang Tse
1b37baf656 Use the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-21 03:06:07 +00:00
Yang Tse
bffe69a151 when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
now cause the definition of RECVFROM_TYPE_ARG2_IS_VOID, RECVFROM_TYPE_ARG5_IS_VOID
or RECVFROM_TYPE_ARG6_IS_VOID, as appropriate.
2008-07-21 00:36:55 +00:00
Yang Tse
39f23aec6b RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
2008-07-17 03:07:54 +00:00
Yang Tse
362422641e fix comment 2008-07-16 19:24:03 +00:00
Yang Tse
a9dc900515 Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions
for non-configure systems config files, and introduced macro sreadfrom which
will be used on udp sockets as a recvfrom() wrapper.
2008-07-16 19:16:41 +00:00
Yang Tse
1e7125ae7b add comment for include paths 2008-07-15 05:46:49 +00:00
Yang Tse
0f50cd7623 Move _REENTRANT definition earlier in lib/setup.h 2008-07-14 17:31:39 +00:00
Yang Tse
669c555874 Removed inclusion of remaining system header files from configuration files.
These are included from lib/setup.h or specific source code file.
2008-07-14 16:58:34 +00:00
Yang Tse
1cfb73a129 Inclusion of <extra/stricmp.h> and <extra/strdup.h> is moved to lib/setup.h 2008-07-14 16:10:29 +00:00
Yang Tse
2a585c2fba Remove duplicate file inclusions. These are already done in lib/setup.h
and lib/setup_once.h
2008-07-14 15:58:02 +00:00
Yang Tse
32a83128e6 Remove duplicate file inclusions. These are already done in lib/setup.h 2008-07-14 15:30:26 +00:00
Yang Tse
fe7bb33af8 HTTP_ONLY definition check in lib/setup.h is now done once that configuration
file has been included. In this way if symbol is defined in the config file
it will no longer be ignored.
2008-07-14 12:39:50 +00:00
Yang Tse
da6fa34f02 fix multiple header inclusion prevention definition 2008-07-11 18:59:00 +00:00
Yang Tse
37a358ab93 move multiple header inclusion prevention definition to top of file 2008-07-11 18:52:35 +00:00
Yang Tse
3452c8d693 Added missing multiple header inclusion prevention definition 2008-07-11 18:42:30 +00:00
Daniel Stenberg
57625b6c4c indent and comment cleanup (no code change) 2008-07-11 09:18:30 +00:00
Daniel Stenberg
0d058d2174 - Daniel Fandrich found out we didn't pass on the user-agent properly when
doing "proxy-tunnels" with non-HTTP prototols and that was simply because
  the code assumed the user-agent was only needed for HTTP.
2008-07-11 09:08:27 +00:00
Dan Fandrich
b4b6cfdb1c Changed slightly the SFTP quote commands chmod, chown and chgrp to only
set the attribute that has changed instead of all possible ones. Hopefully,
this will solve the "Permission denied" problem that Nagarajan Sreenivasan
reported when setting some modes, but regardless, it saves a protocol
round trip in the chmod case.
2008-07-11 04:38:11 +00:00
Dan Fandrich
6f3ef94836 Fixed another OOM problem, this time with test 64. 2008-07-10 18:15:22 +00:00
Yang Tse
08ac9866e0 Peter Lamberg filed bug report #2015126: "poll gives WSAEINVAL when POLLPRI
is set in fdset.events" (http://curl.haxx.se/bug/view.cgi?id=2015126) which
exactly pinpointed the problem only triggered on Windows Vista, provided
reference to docs and also a fix. There is much work behind Peter Lamberg's
excellent bug report. Thank You!
2008-07-10 18:01:44 +00:00
Daniel Stenberg
0cd8840dba - Andreas Schuldei improved Phil Blundell's patch for IPv6 using c-ares, and I
edited it slightly. Now you should be able to use IPv6 addresses fine even
  with libcurl built to use c-ares.
2008-07-09 18:39:49 +00:00
Dan Fandrich
d4b253ba3e Fixed an OOM handling problem that cause test 11 to fail the torture test. 2008-07-09 18:33:35 +00:00
Dan Fandrich
60f0b4fffe Fixed test 554 to pass the torture test. 2008-07-08 21:16:18 +00:00
Daniel Stenberg
0e5da5b8bc - Scott Barrett provided a test case for a segfault in the FTP code and the
fix for it. It occured when you did a FTP transfer using
  CURLFTPMETHOD_SINGLECWD and then did another one on the same easy handle but
  switched to CURLFTPMETHOD_NOCWD. Due to the "dir depth" variable not being
  cleared properly.  Scott's test case is now known as test 539 and it
  verifies the fix.
2008-07-07 20:37:07 +00:00
Patrick Monnerat
ddfa4b8896 New options added to OS400 wrapper and ILERPG definitions.
Wrong defines (typos) for QSSL layer fixed.
2008-07-07 10:39:46 +00:00
Yang Tse
7820391cb9 fix compiler warning: empty body in an if-statement 2008-07-05 03:31:41 +00:00
Daniel Stenberg
82412f218f Phil Blundell provided a fix for libcurl's treatment of unexpected 1xx
response codes. Previously libcurl would hang on such occurances. I added
test case 1033 to verify.
2008-07-03 08:47:53 +00:00
Daniel Stenberg
7c648782bc Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
handshake/connection is completed (typically SSL, TLS or SSH). By using this
you can figure out the application layer's own connect time. You can extract
the time stamp using curl's -w option and the new variable named
'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
2008-07-03 06:56:03 +00:00
Dan Fandrich
ee64d14733 Support Open Watcom C on Linux (as well as Windows). 2008-07-02 18:34:00 +00:00
Yang Tse
97333deb3f fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-02 03:04:56 +00:00
Daniel Stenberg
ad1145a201 CreateConnection collided with a function using the exact same name in the
INTEGRITY RTOS, so I renamed it to create_conn. It then made sense to also
rename SetupConnection to setup_conn to match it.
2008-07-01 21:53:18 +00:00
Daniel Stenberg
eb60ba23f5 - Stephen Collyer and Tor Arntsen helped identify a flaw in the range code
which output the range using a signed variable where it should rather use
  unsigned.
2008-06-30 13:07:05 +00:00
Daniel Stenberg
69aac49f79 made %llu work for printing unsigned long longs, added the generic curl source
header
2008-06-30 12:58:15 +00:00
Daniel Stenberg
a81a16beac Added README.NSS to describe the current NSS situation. 2008-06-24 08:52:35 +00:00
Daniel Stenberg
d92945bb8a - Eduard Bloch filed the debian bug report #487567
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487567) pointing out that
  libcurl used Content-Range: instead of Range when doing a range request with
  --head (CURLOPT_NOBODY). This is now fixed and test case 1032 was added to
  verify.
2008-06-22 20:38:16 +00:00
Dan Fandrich
90a6a59a2f Stopped using ranges in scanf character sequences (e.g. %[a-z]) since that
is not ANSI C, just a common extension.  This caused problems on
at least Open Watcom C.
2008-06-22 06:57:00 +00:00
Daniel Stenberg
8bae3d9007 Oops, that was an experimental change not meant to be committed! 2008-06-21 21:21:29 +00:00
Daniel Stenberg
98042b858d made Curl_nss_send() take const data to kill compiler warning 2008-06-21 21:19:42 +00:00
Daniel Stenberg
da97f78ae0 - Phil Pellouchoud found a case where libcurl built with NSS failed to
handshake with a SSLv2 server, and it turned out to be because it didn't
  recognize the cipher named "rc4-md5". In our list that cipher was named
  plainly "rc4". I've now added rc4-md5 to work as an alias as Phil reported
  that it made things work for him again.
2008-06-20 11:15:54 +00:00
Daniel Stenberg
2e1a9da5e2 remove leftover proto that isn't used, I made it a macro instead 2008-06-20 10:45:26 +00:00
Daniel Stenberg
422fd933f5 - Hans-Jurgen May pointed out that trying SCP or SFTP over a SOCKS proxy
crashed libcurl. This is now addressed by making sure we use "plain send"
  internally when doing the socks handshake instead of the Curl_write()
  function which is designed to use the "target" protocol. That's then SCP or
  SFTP in this case. I also took the opportunity and cleaned up some ssh-
  related #ifdefs in the code for readability.
2008-06-20 10:43:32 +00:00
Daniel Stenberg
d09b6ecaa5 - Christopher Palow fixed a curl_multi_socket() issue which previous caused
libcurl to not tell the app properly when a socket was closed (when the name
  resolve done by c-ares is done) and then immediately re-created and put to
  use again (for the actual connection). Since the closure will make the
  "watch status" get lost in several event-based systems libcurl will need to
  tell the app about this close/re-create case.
2008-06-19 21:32:51 +00:00
Daniel Stenberg
fb2e71b9bd - Dengminwen found a bug in the connection re-use function when using the
multi interface with pipelining enabled as it would wrongly check for,
  detect and close "dead connections" even though that connection was already
  in use!
2008-06-19 08:31:22 +00:00
Daniel Stenberg
68b67e24f2 Removed the #define of ciphernum since keeping a define updated to be the
number of entries in a provided table is doomed to fail in the long run. Now
we use the NUM_OF_CIPHERS define instead to figure out the amount.
2008-06-19 05:47:27 +00:00
Daniel Stenberg
c1e2341f0a s/strcasecmp/strequal to make it more portable 2008-06-19 05:42:45 +00:00
Daniel Stenberg
e547bfa933 - Rob Crittenden brought a fix for the NSS layer that makes libcurl no longer
always fire up a new connection rather than using the existing one when the
  multi interface is used. Original bug report:
  https://bugzilla.redhat.com/show_bug.cgi?id=450140
2008-06-18 22:01:55 +00:00
Daniel Stenberg
36ddb13d1f removed warning about unused argument by simply removing that argument from
the check_issuer_cert() proto
2008-06-18 21:50:40 +00:00