Commit Graph

509 Commits

Author SHA1 Message Date
Daniel Stenberg 6173e38fdc - Kamil Dudka made the curl tool properly call curl_global_init() before any
other libcurl function.
2009-03-11 22:56:03 +00:00
Daniel Stenberg 9274d31690 - Bill Egert pointed out (http://curl.haxx.se/bug/view.cgi?id=2671602) that
curl didn't use sprintf() in a way that is documented to work in POSIX but
  since we use our own printf() code (from libcurl) that shouldn't be a
  problem. Nonetheless I modified the code to not rely on such particular
  features and to not cause further raised eyebrowse with no good reason.
2009-03-08 22:42:50 +00:00
Daniel Stenberg 8f81fd6be5 - CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 in addition to 1 for
plain FTP connections, and it will then allow MKD to fail once and retry the
  CWD afterwards. This is especially useful if you're doing many simultanoes
  connections against the same server and they all have this option enabled,
  as then CWD may first fail but then another connection does MKD before this
  connection and thus MKD fails but trying CWD works! The numbers can
  (should?) now be set with the convenience enums now called
  CURLFTP_CREATE_DIR and CURLFTP_CREATE_DIR_RETRY.

  Tests has proven that if you're making an application that uploads a set of
  files to an ftp server, you will get a noticable gain in speed if you're
  using multiple connections and this option will be then be very useful.
2009-02-17 09:07:25 +00:00
Dan Fandrich 77da9a0087 Added an explicit buffer limit check in msdosify() (patch based on FreeBSD).
This couldn't ever overflow in curl, but might if the code were used
elsewhere or under different conditions.
2009-02-05 00:13:40 +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 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
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 80ffd3581f Created a CURLMIN macro to match CURLMAX 2009-01-07 19:39:35 +00:00
Gisle Vanem 2025193b7a Added the use of Watt-32 tcp/ip stack for Win32 targets.
Added USE_WATT32 unconditionally for MSDOS targets since
it's the only option. Adjusted the text for '--wdebug'.
2008-12-16 08:48:44 +00:00
Daniel Stenberg a65ce7b107 check for NULL returns from strdup() - reported by Jim Meyering
also prevent buffer overflow on MSDOS when you do for example -O on a url
with a file name part longer than PATH_MAX letters
2008-11-14 16:42:05 +00:00
Dan Fandrich 6cdd067faf curlx.h isn't a system include file so it gets double quotes 2008-10-28 19:51:04 +00:00
Yang Tse 6ea91af2f8 fix compiler warning 2008-10-24 01:27:00 +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 2688cf343b Fixed potential memory leak in OOM situations. Detected by coverity.com 2008-10-19 21:00:40 +00:00
Daniel Stenberg 3f1b9f095a dumpeasycode() uses warnf() which uses config->errors so we must not close
that before dumpeasycode() is called. Found by coverity.com
2008-10-19 20:37:24 +00:00
Daniel Stenberg 8a6eeb82c5 Removed dead code, identified by coverity.com. 2008-10-19 20:28:41 +00:00
Daniel Stenberg a0d906739d After having studied one of the coverity.com reports at length last night, I
decided it was a good idea to properly document my thoughts in a comment near
the code that was identified as a possible flaw. A false positive as far as I
can see.
2008-10-17 06:03:37 +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 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 b7722e7037 Prevent the accidental passing along NULL for the cases where the --trace
options don't succeed in opening the target file etc. Detected by coverity.com
2008-10-13 22:21:01 +00:00
Dan Fandrich bfeae0b5f5 Update docs now that SFTP supports file ranges. 2008-10-09 18:47:02 +00:00
Yang Tse 91bc396178 remove unnecessary typecast, otherwise triggering compiler warning:
dereferencing type-punned pointer will break strict-aliasing rules
2008-09-30 18:59:02 +00:00
Dan Fandrich df725aade2 Removed reference to curl-ca-bundle.crt in the host verification failure
error message.
2008-09-17 17:33:23 +00:00
Yang Tse 09aa4cf2ca fix compiler warning: external declaration in primary source file 2008-09-13 03:55:21 +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 59e378f48f remove unnecessary typecasting of malloc() 2008-09-06 05:29:05 +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
Yang Tse 3dcd2b82c4 fix print formatting string directives 2008-09-04 18:59:05 +00:00
Yang Tse c0f3e32447 remove duplicate va_start() call 2008-09-04 14:57:03 +00:00
Daniel Stenberg 18a21d5802 in the --libcurl output, mention that the large file stuff is only needed for
pre 7.19.0 libcurl-using apps
2008-09-02 06:48:11 +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 2fdd24c724 Fix default SIZEOF_OFF_T definition logic 2008-08-26 10:48:52 +00:00
Yang Tse 3e2487493e Use SIZEOF_OFF_T definition from config file 2008-08-26 01:40:19 +00:00
Dan Fandrich e3ad6d2bd1 Fixed a problem when --dump-header - was given with more than one URL,
which caused an error when the second header was dumped due to stdout
being closed.  Added test case 1066 to verify.  Also fixed a potential
problem where a closed file descriptor might be used for an upload
when more than one URL is given.
2008-08-22 22:57:25 +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 cebaab8ee5 Use our CURL_LLONG_MAX and CURL_LLONG_MIN which are defined with the proper suffix. 2008-08-14 03:39:45 +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
Yang Tse 64e3a091c3 Split comparison among several lines for debugging 2008-08-13 13:07: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
Yang Tse 24b1890710 s/SIZEOF_CURL_OFF_T/CURL_SIZEOF_CURL_OFF_T/g 2008-08-11 01:22:57 +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 d69a630989 Fixed a couple of buffer overflows in the MS-DOS port of the curl tool.
Factored out unslashquote. Added some 'const's in function parameters.
2008-07-31 01:12:06 +00:00
Daniel Stenberg 9b0fd007fd --remote-name-all 2008-07-10 20:29:27 +00:00
Dan Fandrich 8c377ad965 Honour --stderr with the -v option.
Fixed a file handle leak in the command line client if more than one
--stderr option was given.
2008-06-26 01:43:53 +00:00
Dan Fandrich 65ee4e4555 Fixed a memory leak in the command-line tool that caused a valgrind error. 2008-06-19 00:30:02 +00:00
Daniel Stenberg 5abfdc0140 - curl the tool now deals with its command line options somewhat differently!
All boolean options (such as -O, -I, -v etc), both short and long versions,
  now always switch on/enable the option named. Using the same option multiple
  times thus make no difference. To switch off one of those options, you need
  to use the long version of the option and type --no-OPTION. Like to disable
  verbose mode you use --no-verbose!

- Added --remote-name-all to curl, which if used changes the default for all
  given URLs to be dealt with as if -O is used. So if you want to disable that
  for a specific URL after --remote-name-all has been used, you muse use -o -
  or --no-remote-name.
2008-06-08 20:53:49 +00:00
Dan Fandrich c0d258ca17 Mention a few options that require an argument in --help 2008-06-04 23:44:53 +00:00
Marty Kuhrt 01e1c85304 return CURLE_OK instead of CURLE_FAILED_INIT if PARAM_HEKP_REQUESTED returned by getparameter 2008-06-01 16:01:37 +00:00
Dan Fandrich d0a506661f Made --stderr able to redirect all stderr messages. 2008-04-25 00:41:44 +00:00